Commit 2d23fada by 王志慧

fixed

1 parent b1f2ab71
...@@ -38,12 +38,18 @@ Component({ ...@@ -38,12 +38,18 @@ Component({
isForbidden: !(userInfo?.isSuper || userInfo?.loginRole == 3), isForbidden: !(userInfo?.isSuper || userInfo?.loginRole == 3),
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
selectedSceneName: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneName, selectedSceneName: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneName,
selectedSceneDesc: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneDesc selectedSceneDesc: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneDesc,
userInfo
}) })
if (userInfo.createdDate) {
let date = userInfo.createdDate + ''
date = date.replace(/-/g, '/').split(' ')[0] // 日期格式处理
this.setData({
['userInfo.createdTime']: date
})
}
this.getStaffBankList() this.getStaffBankList()
this.getVersionInfo() this.getVersionInfo()
} }
}, },
...@@ -51,9 +57,6 @@ Component({ ...@@ -51,9 +57,6 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
onLoad() {
this.getStaffInfo()
},
/**跳转至银行卡 */ /**跳转至银行卡 */
toAddBankAccount(e) { toAddBankAccount(e) {
const { const {
...@@ -68,28 +71,6 @@ Component({ ...@@ -68,28 +71,6 @@ Component({
}) })
}) })
}, },
getStaffInfo() {
const userInfo = wx.$util.getUserInfo()
let para = {
staffUuid: userInfo.uuid,
};
api.getStaffDetailApi(para).then((res) => {
wx.hideLoading();
this.setData({
userInfo: {
...userInfo,
...res.data
}
})
});
if (userInfo.createdDate) {
let date = userInfo.createdDate + ''
date = date.replace(/-/g, '/').split(' ')[0] // 日期格式处理
this.setData({
['userInfo.createdTime']: date
})
}
},
async getStaffBankList() { async getStaffBankList() {
let userInfo = wx.$util.getUserInfo(), let userInfo = wx.$util.getUserInfo(),
res = await api.getStaffBankList({ res = await api.getStaffBankList({
...@@ -142,9 +123,7 @@ Component({ ...@@ -142,9 +123,7 @@ Component({
}, },
// 跳转到工资绩效 // 跳转到工资绩效
jump(e) { jump(e) {
let { let { url } = e.currentTarget.dataset
url
} = e.currentTarget.dataset
const baseUrl = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/html/' const baseUrl = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/html/'
const path = `${baseUrl}${url}.html` const path = `${baseUrl}${url}.html`
wx.navigateTo({ wx.navigateTo({
...@@ -191,10 +170,7 @@ Component({ ...@@ -191,10 +170,7 @@ Component({
}) })
wx.showLoading() wx.showLoading()
api.logout().then(_res_ => { api.logout().then(_res_ => {
let { let { code, message } = _res_
code,
message
} = _res_
if (code == 0) { if (code == 0) {
app.login(false) app.login(false)
} else { } else {
......
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
</view> </view>
<view class="name_box"> <view class="name_box">
<view class="item name text-hide">{{userInfo.name}} <view class="item name text-hide">{{userInfo.name}}
<view class="flex" wx:if="{{userInfo.openId}}"> <!-- <view class="flex" wx:if="{{userInfo.openId}}">
<gl-image mode="widthFix" class="wechat_icon" src="/wechat-icon.png" /> <gl-image mode="widthFix" class="wechat_icon" src="/wechat-icon.png" />
<view class="nickname">{{userInfo.nickname}}</view> <view class="nickname">{{userInfo.nickname}}</view>
</view> </view> -->
</view> </view>
<view class="point-box" wx:if="{{isForbidden}}"> <view class="point-box" wx:if="{{isForbidden}}">
<view class="change_btn" bind:tap="toPoint">我的积分</view> <view class="change_btn" bind:tap="toPoint">我的积分</view>
......
...@@ -67,6 +67,7 @@ Page({ ...@@ -67,6 +67,7 @@ Page({
} }
MineApi.wechatBindApi(para).then((res) => { MineApi.wechatBindApi(para).then((res) => {
if (res.code == 0) { if (res.code == 0) {
wx.$util.showToast('绑定成功')
_this.getStaffInfo(); _this.getStaffInfo();
} }
......
// tabComponents/pages/index/index.js // tabComponents/pages/index/index.js
import api from '../../api.js' import api from '../../api.js'
const app = getApp() const app = getApp()
import constantData from '~/pages/constant/data' import constantData from '~/pages/constant/data'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/mine/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/mine/'
...@@ -404,18 +403,6 @@ Page({ ...@@ -404,18 +403,6 @@ Page({
changeAccount() { changeAccount() {
wx.$router.reLaunch('pages.accountItems') wx.$router.reLaunch('pages.accountItems')
}, },
getStaffInfo() {
const userStorage = wx.$util.getUserInfo()
let para = {
staffUuid: userStorage.uuid,
};
api.getStaffDetailApi(para).then((res) => {
wx.hideLoading();
this.setData({
userInfo: {...this.data.userInfo,...res.data}
})
});
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
...@@ -431,7 +418,6 @@ Page({ ...@@ -431,7 +418,6 @@ Page({
}) })
this.getVersionInfo() this.getVersionInfo()
this.getByYqShop() this.getByYqShop()
// this.getStaffBankList() // this.getStaffBankList()
// console.log(app.globalData.isYqdSuper) // console.log(app.globalData.isYqdSuper)
...@@ -457,7 +443,6 @@ Page({ ...@@ -457,7 +443,6 @@ Page({
onShow: function () { onShow: function () {
// this.getTotal() // this.getTotal()
this.getStaffBankList() this.getStaffBankList()
this.getStaffInfo();
}, },
/** /**
......
...@@ -16,13 +16,7 @@ ...@@ -16,13 +16,7 @@
</block> </block>
</view> </view>
<view class="name_box"> <view class="name_box">
<view class="item name text-hide">{{userInfo.name}} <view class="item name text-hide">{{userInfo.name}}</view>
<view class="flex" wx:if="{{userInfo.openId}}">
<gl-image mode="widthFix" class="wechat_icon" src="/wechat-icon.png" />
<view class="nickname">{{userInfo.nickname}}</view>
</view>
</view>
<view class="point-box" wx:if="{{isForbidden}}"> <view class="point-box" wx:if="{{isForbidden}}">
<view class="change_btn" bind:tap="toPoint">我的积分</view> <view class="change_btn" bind:tap="toPoint">我的积分</view>
<image class="icon_card" bindtap="jumpAccount" src="{{IMG_URL}}bank-card.png" mode="" /> <image class="icon_card" bindtap="jumpAccount" src="{{IMG_URL}}bank-card.png" mode="" />
...@@ -225,6 +219,6 @@ ...@@ -225,6 +219,6 @@
<view class="modal_error">原因:手机号非银行预留手机号</view> <view class="modal_error">原因:手机号非银行预留手机号</view>
<view class="btns"> <view class="btns">
<button class="modal_btn default" catchtap="toCloseModal" data-name="showAccountErrorModal">我知道了</button> <button class="modal_btn default" catchtap="toCloseModal" data-name="showAccountErrorModal">我知道了</button>
<button class="modal_btn" catchtap="toEditBankAccount">去编辑</button> <button class="modal_btn" catchtap="toEditBankAccount" >去编辑</button>
</view> </view>
</van-popup> </van-popup>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!