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. 139
      pages/goods/HM-search/HM-search.vue
  6. 49
      pages/login/login.vue
  7. 49
      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 => {
return POST('GET', `${base}/userDiscount/getUserNormalDiscountList`, params).then(res => res.data);
}
//修改密码
export const sendUserPass = params => {
return POST('GET', `${base}/secUser/sendUserPass`, params).then(res => res.data);
//搜索门店
export const getStoreList = params => {
return POST('GET', `${base}/highMerchantStore/getStoreList`, params).then(res => res.data);
}
//**门店//
export const userLogin = params => {
return POST('POST', `${brestBase}/login/userLogin`, params).then(res => res.data);
@ -172,3 +171,7 @@ export const getAgentSalesCodeList = params => {
export const getAgentSalesPriceCount = params => {
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() {
console.log('blur');
this.isFocus = false;
if (!this.inputVal) {
this.active = false;

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

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

File diff suppressed because one or more lines are too long

@ -18,8 +18,8 @@
</view>
<view class="btn mart50" @tap="doLogin"> </view>
<view class="res flright mart20">
<!-- <view @tap="toPage('register')">用户注册</view> -->
<!-- <view @tap="toPage('resetpasswd')">重置密码</view> -->
<!-- <view @tap="toPage('register')">用户注册</view> -->
<!-- <view @tap="toPage('resetpasswd')">重置密码</view> -->
</view>
<!-- <view class="mart30 flright marRight20 font15 fcorfff">重置密码</view> -->
</view>
@ -40,7 +40,7 @@
import md5 from "@/common/SDK/md5.min.js";
import {
userLogin
} from "../../Utils/Api.js";
} from "../../Utils/Api.js";
let app = getApp();
export default {
data() {
@ -54,24 +54,11 @@
sinaweibo: false,
xiaomi: false
},
typeId:''
typeId: ''
}
},
onShow() {
},
onLoad(options) {
let that = this;
that.typeId = options.id;
if(that.typeId == 1){
uni.setNavigationBarTitle({
title:'门店登录'
})
}else{
uni.setNavigationBarTitle({
title:'代理商登录'
})
}
uni.getStorage({
key: 'phoneNum',
success(e) {
@ -84,7 +71,21 @@
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
// #ifdef APP-PLUS
that.isShowOauth = true;
@ -196,20 +197,20 @@
uni.setStorage({
key: "pasNum",
data: this.passwd
})
})
uni.hideLoading();
if(this.typeId == 1){
if (this.typeId == 1) {
uni.navigateTo({
url: '../user/business/business'
})
}else{
} else {
uni.navigateTo({
url: '/pages/user/minePromotion/minePromotion'
})
}
app.globalData.brestUserInfo = res.return_data.object.secUser;
}
app.globalData.brestUserInfo = res.return_data.object.secUser;
app.globalData.brestToken = res.return_data.uniqueCode;
} else {
} else {
uni.hideLoading();
uni.showToast({
title: res.return_msg,

@ -11,12 +11,12 @@
<input placeholder="请输入旧密码" v-model="phoneNumber" placeholder-style="color: rgba(255,255,255,0.8);"/>
</view>
<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 class="password">
<input placeholder="确认新密码" v-model="passwd" password=true placeholder-style="color: rgba(255,255,255,0.8);"/>
</view>
<view class="btn" @tap="doReset">重置密码</view>
<view class="btn" @click="sendUserPass">重置密码</view>
</view>
@ -25,6 +25,10 @@
<script>
import md5 from "@/common/SDK/md5.min.js";
let app = getApp()
import {
sendUserPass
} from "../../Utils/Api.js";
export default {
data() {
return {
@ -37,7 +41,6 @@
}
},
onLoad() {
},
methods: {
Timer(){},
@ -129,7 +132,45 @@
},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>

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

@ -470,6 +470,18 @@ $uni-font-size-paragraph:30upx;
margin-top: 40px;
background-color: #089bf5;
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;
}
/* 下滑线 */

Loading…
Cancel
Save