TM
2020-12-15 874a5a8f1353666c10a2aa0b6963873cecff5bab
修改头像
1 files added
6 files modified
102 ■■■■■ changed files
components/fitler/fitler.js 1 ●●●● patch | view | raw | blame | history
pages/businessData/businessData.axml 4 ●●●● patch | view | raw | blame | history
pages/changePassword/changePassword.js 91 ●●●●● patch | view | raw | blame | history
pages/hbfqPage/orderInfo/orderInfo.axml 2 ●●● patch | view | raw | blame | history
pages/shskPage/orderInfo/orderInfo.axml 2 ●●● patch | view | raw | blame | history
pages/userCenter/userCenter.axml 2 ●●● patch | view | raw | blame | history
static/img/touxiang.png patch | view | raw | blame | history
components/fitler/fitler.js
@@ -100,6 +100,7 @@
      }
      this.setData({
        queryObj:{},
        priceCode:''
        // 'queryObj.startDay':'',
        // 'queryObj.endDay':'',
      })
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>
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
      )
    })
  }
});
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>
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>
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">
static/img/touxiang.png