Commit 8ff86788 by 杨北旺

提交个人中心

1 parent 5996a8c7
......@@ -8,6 +8,9 @@ Page({
sumbitScore: ''
},
toSumbitData() {
let {sumbitScore} = this.data
if(!sumbitScore)return wx.$api.showToast('请输入提现积分')
if(sumbitScore==0)return wx.$api.showToast('提现积分不能为0')
wx.$router.go('packageMine.withdrawalSuccess.index')
},
onRoute(options) {
......
<wxs module="strSubstr">
var getString = function(str,len=8){
if(!str)return ''
if(str.length<len+1)return str
var newStr = str.substring(0,len)+'...'
return newStr
}
module.exports.getString = getString
</wxs>
<view class="container">
<view class="tip_wrapper flex_scb">
<view class="label">提现人</view>
<view class="tip flex_sc">
<image mode="aspectFill" class="icon" src="{{user.headImgUrl}}" />
<text>{{user.nickName}}</text>
<text>{{strSubstr.getString(user.nickName)}}</text>
</view>
</view>
<view class="input_wrapper">
......
import { IMG_URL } from '~/utils/constantData'
Page({
data: {
IMGURL:IMG_URL,
},
toWatchNote(){
wx.$router.go('packageMine.withdrawalNote.index')
},
toBackMine(){
wx.switchTab({
url: '/pages/tab/mine/mine',
});
}
})
\ No newline at end of file
......@@ -5,6 +5,6 @@
<view class="tip_text">到达您的微信零钱,请留意到账情况</view>
<view class="btn_group flex_cc">
<view class="btn_left flex_cc" bind:tap="toWatchNote">查看提现记录</view>
<view class="btn_right flex_cc">返回我的积分</view>
<view class="btn_right flex_cc" bind:tap="toBackMine">返回我的积分</view>
</view>
</view>
\ No newline at end of file
......@@ -17,21 +17,21 @@ Component({
toEditPage() {
wx.$router.go('packageMine.editBasicInfo.index', { user: this.data.user })
},
toAddEvent() {
wx.$eventbus.on('SETTING', (res) => {
let user = this.data.user
if (res) {
Object.assign(user, res.user)
this.setData({
user
})
}
})
}
// toAddEvent() {
// wx.$eventbus.on('SETTING', (res) => {
// let user = this.data.user
// if (res) {
// Object.assign(user, res.user)
// this.setData({
// user
// })
// }
// })
// }
},
lifetimes: {
attached() {
this.toAddEvent()
// this.toAddEvent()
}
}
})
......@@ -20,7 +20,7 @@
<view class="wecat_wrap flex_cc">
<block wx:if="{{user.bindStatus}}">
<image class="icon" src="{{IMGURL}}wechat_active_icon.png" />
<text>{{user.brandName}}</text>
<text>{{strSubstr.getString(user.brandName)}}</text>
</block>
<block wx:else>
<image class="icon" src="{{IMGURL}}wechat_icon.png" />
......
......@@ -28,14 +28,26 @@ Page({
seriseName: '销售部',
merchantName: '广联数科4S店广联数科4S店广联数科4S店广联数科4S店',
brandName: '绑定的名称名称',
bindStatus: 1
bindStatus: 0
}
this.setData({
user: USERINFO
})
},
toAddEvent() {
wx.$eventbus.on('SETTING', (res) => {
let user = this.data.user
if (res) {
Object.assign(user, res.user)
this.setData({
user
})
}
})
},
onLoad: function (options) {
this.getUserInfo()
this.toAddEvent()
},
})
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!