From 874a5a8f1353666c10a2aa0b6963873cecff5bab Mon Sep 17 00:00:00 2001
From: TM <923727421@qq.com>
Date: Tue, 15 Dec 2020 17:08:28 +0800
Subject: [PATCH] 修改头像
---
pages/userCenter/userCenter.axml | 2
pages/hbfqPage/orderInfo/orderInfo.axml | 2
pages/businessData/businessData.axml | 4 +-
pages/shskPage/orderInfo/orderInfo.axml | 2
components/fitler/fitler.js | 1
static/img/touxiang.png | 0
pages/changePassword/changePassword.js | 91 ++++++++++++++++++++++++++++++---------------
7 files changed, 66 insertions(+), 36 deletions(-)
diff --git a/components/fitler/fitler.js b/components/fitler/fitler.js
index 371291a..3e2c27c 100644
--- a/components/fitler/fitler.js
+++ b/components/fitler/fitler.js
@@ -100,6 +100,7 @@
}
this.setData({
queryObj:{},
+ priceCode:''
// 'queryObj.startDay':'',
// 'queryObj.endDay':'',
})
diff --git a/pages/businessData/businessData.axml b/pages/businessData/businessData.axml
index 7b48f43..f2ca353 100644
--- a/pages/businessData/businessData.axml
+++ b/pages/businessData/businessData.axml
@@ -65,7 +65,7 @@
</view>
</scroll-view>
<view a:else class="no-data">
- <cover-image src="../../static/nodata.png" class="no-data-img"/>
+ <cover-image src="../../static/img/nodata.png" class="no-data-img"/>
<view class="no-data-text">暂无数据</view>
</view>
</view>
@@ -116,7 +116,7 @@
</view>
</view>
<view a:else class="no-data">
- <cover-image src="../../static/nodata.png" class="no-data-img"/>
+ <cover-image src="../../static/img/nodata.png" class="no-data-img"/>
<view class="no-data-text">暂无数据</view>
</view>
</scroll-view>
diff --git a/pages/changePassword/changePassword.js b/pages/changePassword/changePassword.js
index d5610e0..0ceeacc 100644
--- a/pages/changePassword/changePassword.js
+++ b/pages/changePassword/changePassword.js
@@ -4,72 +4,101 @@
const app = getApp()
Page({
data: {
- userStyle:{},
- newTwo:"",
- info:{
- newPwd: "",
- oldPwd: ""
+ userStyle: {},
+ newTwo: "",
+ info: {
+ newPwd: "",
+ oldPwd: ""
},
- userInfo:{}
+ userInfo: {}
},
onLoad() {
this.setData({
- userStyle:app.userStyle,
- userInfo:app.userInfo
+ userStyle: app.userStyle,
+ userInfo: app.userInfo
})
},
- getOld(e){
+ getOld(e) {
this.setData({
- 'info.oldPwd':e.detail.value
+ 'info.oldPwd': e.detail.value
})
},
- getNem(e){
+ getNem(e) {
this.setData({
- 'info.newPwd':e.detail.value
+ 'info.newPwd': e.detail.value
})
},
- getNemTwo(e){
+ getNemTwo(e) {
this.setData({
newTwo: e.detail.value
})
},
- save(){
- console.log(this.data.userInfo.mblNo,this.data.newTwo,this.data.info)
- if(validator.checkValEmpty(this.data.info.oldPwd)){
+ save() {
+ let self = this
+ console.log(this.data.userInfo.mblNo, this.data.newTwo, this.data.info)
+ if (validator.checkValEmpty(this.data.info.oldPwd)) {
my.showToast({
content: '请输入原密码',
duration: 2000,
});
return
}
- if(validator.checkValEmpty(this.data.info.newPwd)){
+ if (validator.checkValEmpty(this.data.info.newPwd)) {
my.showToast({
content: '请输入新密码',
duration: 2000,
});
return
}
- if(this.data.newTwo != this.data.info.newPwd){
+ if (this.data.newTwo != this.data.info.newPwd) {
my.showToast({
content: '两次新密码不一致,请确认',
duration: 2000,
});
return
}
- $api.ajax(
- '/sib/user/updatePwd',
- 'POST',
- (res)=>{
+ let p = new Promise(function (re, rej) {
+ $api.ajax(
+ '/sib/user/updatePwd',
+ 'POST',
+ (res) => {
+ my.showToast({
+ content:'修改成功',
+ duration:3000,
+ success:()=>{
+ re()
+ }
+ })
+ },
+ (err) => {
- },
- (err)=>{
+ },
+ true,
+ {
+ newPwd: md5.hex_md5(self.data.userInfo.mblNo + self.data.info.newPwd),
+ oldPwd: md5.hex_md5(self.data.userInfo.mblNo + self.data.info.oldPwd)
+ }
+ )
- },
- true,
- {
- newPwd: md5.hex_md5(this.data.userInfo.mblNo+this.data.info.newPwd),
- oldPwd: md5.hex_md5(this.data.userInfo.mblNo+this.data.info.oldPwd)
- }
- )
+ })
+ p.then(() => {
+ $api.ajax(
+ '/sib/xcx/login/logout',
+ 'POST',
+ res => {
+ my.removeStorageSync({
+ key: 'sessionId',
+ });
+ my.navigateTo({
+ url: '/pages/index/index'
+ });
+ },
+ err => {
+
+ },
+ true
+ )
+ })
+
}
});
diff --git a/pages/hbfqPage/orderInfo/orderInfo.axml b/pages/hbfqPage/orderInfo/orderInfo.axml
index b937fc3..d775182 100644
--- a/pages/hbfqPage/orderInfo/orderInfo.axml
+++ b/pages/hbfqPage/orderInfo/orderInfo.axml
@@ -1,6 +1,6 @@
<view class="order-info-page">
<view class="top" style="{{background:userStyle.gradientColor}}">
- <cover-image src="../../static/img/backpic.png" class="back-pic"></cover-image>
+ <cover-image src="../../../static/img/backpic.png" class="back-pic"></cover-image>
</view>
<view class="fenqi-info-view">
<text class="title">分期信息</text>
diff --git a/pages/shskPage/orderInfo/orderInfo.axml b/pages/shskPage/orderInfo/orderInfo.axml
index ef912d3..3e92899 100644
--- a/pages/shskPage/orderInfo/orderInfo.axml
+++ b/pages/shskPage/orderInfo/orderInfo.axml
@@ -1,6 +1,6 @@
<view class="order-info-page">
<view class="top" style="{{background:userStyle.gradientColor}}">
- <cover-image src="../../static/img/backpic.png" class="back-pic"/>
+ <cover-image src="../../../static/img/backpic.png" class="back-pic"/>
</view>
<view class="fenqi-info-view">
<text class="title">分期信息</text>
diff --git a/pages/userCenter/userCenter.axml b/pages/userCenter/userCenter.axml
index a4729b1..0ae598f 100644
--- a/pages/userCenter/userCenter.axml
+++ b/pages/userCenter/userCenter.axml
@@ -1,6 +1,6 @@
<view class="user-center-page">
<view class="top" style="{{background:userStyle.gradientColor}}">
- <cover-image src="../../static/img/backcircl.png" class="img"/>
+ <cover-image src="../../static/img/touxiang.png" class="img"/>
</view>
<view class="userInfo">
<view class="left">
diff --git a/static/img/touxiang.png b/static/img/touxiang.png
new file mode 100644
index 0000000..826fb9c
--- /dev/null
+++ b/static/img/touxiang.png
Binary files differ
--
Gitblit v1.8.0