diff --git a/pages/index/index.vue b/pages/index/index.vue index 1f62e3b..80d6e15 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -351,6 +351,9 @@ case 'tj': url = '/pages/shop/dataStatistics' break; + case 'dy': + url = '/pages/myCenter/setPrint' + break; case 'db': url = '/pages/shop/shopOrderList?index=' + index break; diff --git a/pages/login/login.vue b/pages/login/login.vue index 3081d6f..6b54a4c 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -36,9 +36,9 @@ - + diff --git a/pages/login/regist.vue b/pages/login/regist.vue index 77e828d..8639402 100644 --- a/pages/login/regist.vue +++ b/pages/login/regist.vue @@ -8,12 +8,18 @@ :placeholder="i18n.login.placePhone" /> + 旧密码 + + + {{i18n.login.loginPWD}} { - - this.saveLocal(data.info[0]) - }).catch(data => { - - }) - - return - // #ifdef MP-WEIXIN - var that = this - uni.login({ - success: res => { - uni.hideLoading(); - uni.request({ - url: getApp().globalData.site_url + "App.Login.getUnionid", - method: 'GET', - data: { - 'code': res.code - }, - success: function(res2) { - var openid = res2.data.data.openid; - getApp().globalData.openid = openid; - that.NB.sendRequest('Login.Reg', dic, true).then(data => { - setTimeout(() => { - uni.navigateBack({ - delta: 1 - }); - }, 1000) - }) - }, - }); - } - }); - // #endif - }, - saveLocal(info) { - getApp().globalData.userinfo = info - uni.setStorage({ - key: 'userinfo', - data: info, - success: function() { - setTimeout(() => { - uni.reLaunch({ - url: '../index/index' - }) - }, 1000) - } - }); - var uiddd = info.im.userId; - const userSig = info.im.UserSig; - uni.$TUIKit.login({ - userID: uiddd, - userSig: userSig - }) - .then(function(imResponse) { - - if (imResponse.data.repeatLogin === true) { - // 标识帐号已登录,本次登录操作为重复登录。v2.5.1 起支持 - - } + dic.username = userInfo.shop.contactPhone + dic.password = this.oldpsd + dic.newPass = this.password + dic.userId = userInfo.user.id + this.NB.sendRequest("/user/modifyPassAndMobile", dic, false, 'post','application/x-www-form-urlencoded').then(data => { + uni.clearStorageSync(); + uni.showToast({ + title:'修改成功', + duration:1000 }) - .catch(function(imError) { - console.warn('login error:', imError); // 登录失败的相关信息 + uni.reLaunch({ + url: '/pages/login/login' }); - // 修改个人标配资料 - let promise = uni.$TUIKit.updateMyProfile({ - avatar: info.avatar, - nick: info.user_nickname - }); - promise.then(function(imResponse) { - - }).catch(function(imError) { - console.warn('updateMyProfile error:', imError); // 更新资料失败的相关信息 - }); - }, + }).catch(data => { + console.log(data) + }) + } } }