1.对接修改密码

2.对接搜索门店接口
yj-dev
杨杰 4 years ago
parent 078b097fc4
commit 05f9aab3c3
  1. 11
      Utils/Api.js
  2. 1
      components/mehaotian-search-revision/mehaotian-search-revision.vue
  3. 12
      manifest.json
  4. 2
      pages.json
  5. 61
      pages/goods/HM-search/HM-search.vue
  6. 33
      pages/login/login.vue
  7. 47
      pages/login/resetpasswd.vue
  8. 6
      pages/user/minePromotion/minePromotion.vue
  9. 12
      uni.scss

@ -127,16 +127,15 @@ export const getDiscountByUserDiscountId = params => {
export const getUserNormalDiscountList = params => { export const getUserNormalDiscountList = params => {
return POST('GET', `${base}/userDiscount/getUserNormalDiscountList`, params).then(res => res.data); return POST('GET', `${base}/userDiscount/getUserNormalDiscountList`, params).then(res => res.data);
} }
//修改密码 //搜索门店
export const sendUserPass = params => { export const getStoreList = params => {
return POST('GET', `${base}/secUser/sendUserPass`, params).then(res => res.data); return POST('GET', `${base}/highMerchantStore/getStoreList`, params).then(res => res.data);
} }
//**门店// //**门店//
export const userLogin = params => { export const userLogin = params => {
return POST('POST', `${brestBase}/login/userLogin`, params).then(res => res.data); return POST('POST', `${brestBase}/login/userLogin`, params).then(res => res.data);
@ -172,3 +171,7 @@ export const getAgentSalesCodeList = params => {
export const getAgentSalesPriceCount = params => { export const getAgentSalesPriceCount = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getAgentSalesPriceCount`, params).then(res => res.data); return POSTBREST('GET', `${brestBase}/highCouponAgent/getAgentSalesPriceCount`, params).then(res => res.data);
} }
//修改密码
export const sendUserPass = params => {
return POSTBREST('POST', `${brestBase}/secUser/sendUserPass`, params).then(res => res.data);
}

@ -82,7 +82,6 @@
} }
}, },
blur() { blur() {
console.log('blur');
this.isFocus = false; this.isFocus = false;
if (!this.inputVal) { if (!this.inputVal) {
this.active = false; this.active = false;

@ -71,5 +71,17 @@
"desc" : "你的位置信息将用于小程序定位" "desc" : "你的位置信息将用于小程序定位"
} }
} }
},
"h5" : {
"sdkConfigs" : {
"maps" : {}
},
"title" : "嗨森逛",
"router" : {
"mode" : "history"
},
"devServer" : {
"port" : 80
}
} }
} }

@ -130,7 +130,7 @@
{ {
"path": "pages/login/resetpasswd", "path": "pages/login/resetpasswd",
"style": { "style": {
"navigationBarTitleText": "重置密码", "navigationBarTitleText": "修改密码",
"navigationBarBackgroundColor": "#f06c7a", "navigationBarBackgroundColor": "#f06c7a",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus": { "app-plus": {

File diff suppressed because one or more lines are too long

@ -54,24 +54,11 @@
sinaweibo: false, sinaweibo: false,
xiaomi: false xiaomi: false
}, },
typeId:'' typeId: ''
} }
}, },
onShow() { onShow() {
},
onLoad(options) {
let that = this; let that = this;
that.typeId = options.id;
if(that.typeId == 1){
uni.setNavigationBarTitle({
title:'门店登录'
})
}else{
uni.setNavigationBarTitle({
title:'代理商登录'
})
}
uni.getStorage({ uni.getStorage({
key: 'phoneNum', key: 'phoneNum',
success(e) { success(e) {
@ -84,6 +71,20 @@
that.passwd = e.data; that.passwd = e.data;
} }
}) })
},
onLoad(options) {
let that = this;
that.typeId = options.id;
if (that.typeId == 1) {
uni.setNavigationBarTitle({
title: '门店登录'
})
} else {
uni.setNavigationBarTitle({
title: '代理商登录'
})
}
//APP //APP
// #ifdef APP-PLUS // #ifdef APP-PLUS
@ -198,11 +199,11 @@
data: this.passwd data: this.passwd
}) })
uni.hideLoading(); uni.hideLoading();
if(this.typeId == 1){ if (this.typeId == 1) {
uni.navigateTo({ uni.navigateTo({
url: '../user/business/business' url: '../user/business/business'
}) })
}else{ } else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/user/minePromotion/minePromotion' url: '/pages/user/minePromotion/minePromotion'
}) })

@ -11,12 +11,12 @@
<input placeholder="请输入旧密码" v-model="phoneNumber" placeholder-style="color: rgba(255,255,255,0.8);"/> <input placeholder="请输入旧密码" v-model="phoneNumber" placeholder-style="color: rgba(255,255,255,0.8);"/>
</view> </view>
<view class="code"> <view class="code">
<input placeholder="请输入新密码" v-model="code" placeholder-style="color: rgba(255,255,255,0.8);"/> <input placeholder="请输入新密码" v-model="code" password=true placeholder-style="color: rgba(255,255,255,0.8);"/>
</view> </view>
<view class="password"> <view class="password">
<input placeholder="确认新密码" v-model="passwd" password=true placeholder-style="color: rgba(255,255,255,0.8);"/> <input placeholder="确认新密码" v-model="passwd" password=true placeholder-style="color: rgba(255,255,255,0.8);"/>
</view> </view>
<view class="btn" @tap="doReset">重置密码</view> <view class="btn" @click="sendUserPass">重置密码</view>
</view> </view>
@ -25,6 +25,10 @@
<script> <script>
import md5 from "@/common/SDK/md5.min.js"; import md5 from "@/common/SDK/md5.min.js";
let app = getApp()
import {
sendUserPass
} from "../../Utils/Api.js";
export default { export default {
data() { data() {
return { return {
@ -37,7 +41,6 @@
} }
}, },
onLoad() { onLoad() {
}, },
methods: { methods: {
Timer(){}, Timer(){},
@ -129,7 +132,45 @@
},1000) },1000)
},
//
sendUserPass() {
if(this.phoneNumber == ''){
uni.showToast({title: '请输入旧密码',icon:"none"});
return false;
}
if(this.code == ''){
uni.showToast({title: '请输入新密码',icon:"none"});
return false;
}
if(this.passwd == ''){
uni.showToast({title: '请确认新密码',icon:"none"});
return false;
}
if(this.passwd != this.code){
uni.showToast({title: '您输入的两次不相同',icon:"none"});
return false;
}
let datas = {
userId: app.globalData.brestUserInfo.id,
oldPassword: this.phoneNumber,
password : this.passwd
}
sendUserPass(datas).then(res => {
if (res.return_code == '000000') {
uni.setStorage({
key: "pasNum",
data: this.passwd
})
uni.navigateBack()
} else {
uni.showToast({
title: res.return_msg,
icon: "none"
})
} }
})
},
} }
} }
</script> </script>

@ -88,6 +88,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="btnw50 mart50 marb30" @click="toPage()">修改密码</view>
</view> </view>
</template> </template>
@ -133,6 +134,11 @@
uni.navigateTo({ uni.navigateTo({
url: '../agentCoupons/agentCoupons?id='+item +'&couponsId='+ items url: '../agentCoupons/agentCoupons?id='+item +'&couponsId='+ items
}) })
},
toPage(page) {
uni.navigateTo({
url: '../../login/resetpasswd'
});
} }
} }
} }

@ -472,6 +472,18 @@ $uni-font-size-paragraph:30upx;
border-radius: 6px; border-radius: 6px;
} }
.btnw50 {
width: 50%;
margin-left: 25%;
height: 45px;
line-height: 45px;
color: white;
text-align: center;
margin-top: 40px;
background-color: #f06c7a;
border-radius: 6px;
}
/* 下滑线 */ /* 下滑线 */
.line1 { .line1 {
height: 1px; height: 1px;

Loading…
Cancel
Save