Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 07d1a5f6
authored
Oct 23, 2024
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复一轮bug
1 parent
6e48aae7
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
109 additions
and
16 deletions
components/TabMine/TabMine.js
components/TabMine/TabMine.wxml
components/TabMine/TabMine.wxss
packageEquity/pages/TabBar/equityPage.js
pages/tabMine/api.js
pages/tabMine/pages/index/index.js
pages/tabMine/pages/index/index.wxml
pages/tabMine/pages/index/index.wxss
components/TabMine/TabMine.js
View file @
07d1a5f
...
@@ -38,18 +38,12 @@ Component({
...
@@ -38,18 +38,12 @@ 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
()
}
}
},
},
...
@@ -57,6 +51,9 @@ Component({
...
@@ -57,6 +51,9 @@ Component({
* 组件的方法列表
* 组件的方法列表
*/
*/
methods
:
{
methods
:
{
onLoad
()
{
this
.
getStaffInfo
()
},
/**跳转至银行卡 */
/**跳转至银行卡 */
toAddBankAccount
(
e
)
{
toAddBankAccount
(
e
)
{
const
{
const
{
...
@@ -71,6 +68,28 @@ Component({
...
@@ -71,6 +68,28 @@ 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
({
...
@@ -123,7 +142,9 @@ Component({
...
@@ -123,7 +142,9 @@ Component({
},
},
// 跳转到工资绩效
// 跳转到工资绩效
jump
(
e
)
{
jump
(
e
)
{
let
{
url
}
=
e
.
currentTarget
.
dataset
let
{
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
({
...
@@ -170,7 +191,10 @@ Component({
...
@@ -170,7 +191,10 @@ Component({
})
})
wx
.
showLoading
()
wx
.
showLoading
()
api
.
logout
().
then
(
_res_
=>
{
api
.
logout
().
then
(
_res_
=>
{
let
{
code
,
message
}
=
_res_
let
{
code
,
message
}
=
_res_
if
(
code
==
0
)
{
if
(
code
==
0
)
{
app
.
login
(
false
)
app
.
login
(
false
)
}
else
{
}
else
{
...
...
components/TabMine/TabMine.wxml
View file @
07d1a5f
...
@@ -14,7 +14,12 @@
...
@@ -14,7 +14,12 @@
</block>
</block>
</view>
</view>
<view class="name_box">
<view class="name_box">
<view class="item name text-hide">{{userInfo.name}}</view>
<view class="item name text-hide">{{userInfo.name}}
<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="" />
...
...
components/TabMine/TabMine.wxss
View file @
07d1a5f
...
@@ -467,3 +467,19 @@ page {
...
@@ -467,3 +467,19 @@ page {
color: #333;
color: #333;
border: 2rpx solid #e1e1e1;
border: 2rpx solid #e1e1e1;
}
}
.flex{
margin-top:7rpx;
display: flex;
align-items: center;
}
.wechat_icon {
width: 32rpx;
height: 32rpx;
}
.nickname {
font-weight: 400;
font-size: 24rpx;
color: #5A5E66;
margin-left: 8rpx;
}
\ No newline at end of file
\ No newline at end of file
packageEquity/pages/TabBar/equityPage.js
View file @
07d1a5f
...
@@ -287,6 +287,7 @@ Page({
...
@@ -287,6 +287,7 @@ Page({
});
});
},
},
init
(
userInfo
)
{
init
(
userInfo
)
{
console
.
log
(
8989
)
this
.
setData
({
this
.
setData
({
userInfo
,
userInfo
,
});
});
...
@@ -590,7 +591,6 @@ Page({
...
@@ -590,7 +591,6 @@ Page({
},
},
onRoute
(
options
)
{
onRoute
(
options
)
{
// console.log(options, "options");
wx
.
__HAS_SHOW_MODAL
=
false
;
wx
.
__HAS_SHOW_MODAL
=
false
;
if
(
options
&&
options
.
tabIndex
)
{
if
(
options
&&
options
.
tabIndex
)
{
this
.
changeTabBar
({
this
.
changeTabBar
({
...
...
pages/tabMine/api.js
View file @
07d1a5f
...
@@ -43,4 +43,12 @@ module.exports = {
...
@@ -43,4 +43,12 @@ module.exports = {
params
,
params
,
);
);
},
},
// 查询员工微信openid
getStaffDetailApi
(
data
)
{
let
params
=
data
||
{}
return
api
.
post
(
"dj.api.smartcarlife.staff.wechat.detail"
,
params
);
},
}
}
\ No newline at end of file
\ No newline at end of file
pages/tabMine/pages/index/index.js
View file @
07d1a5f
// 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/'
...
@@ -403,6 +404,18 @@ Page({
...
@@ -403,6 +404,18 @@ 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
}
})
});
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
...
@@ -418,6 +431,7 @@ Page({
...
@@ -418,6 +431,7 @@ Page({
})
})
this
.
getVersionInfo
()
this
.
getVersionInfo
()
this
.
getByYqShop
()
this
.
getByYqShop
()
// this.getStaffBankList()
// this.getStaffBankList()
// console.log(app.globalData.isYqdSuper)
// console.log(app.globalData.isYqdSuper)
...
@@ -443,6 +457,7 @@ Page({
...
@@ -443,6 +457,7 @@ Page({
onShow
:
function
()
{
onShow
:
function
()
{
// this.getTotal()
// this.getTotal()
this
.
getStaffBankList
()
this
.
getStaffBankList
()
this
.
getStaffInfo
();
},
},
/**
/**
...
...
pages/tabMine/pages/index/index.wxml
View file @
07d1a5f
...
@@ -16,7 +16,13 @@
...
@@ -16,7 +16,13 @@
</block>
</block>
</view>
</view>
<view class="name_box">
<view class="name_box">
<view class="item name text-hide">{{userInfo.name}}</view>
<view class="item name text-hide">{{userInfo.name}}
<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="" />
...
@@ -219,6 +225,6 @@
...
@@ -219,6 +225,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>
\ No newline at end of file
\ No newline at end of file
pages/tabMine/pages/index/index.wxss
View file @
07d1a5f
...
@@ -53,6 +53,7 @@ page {
...
@@ -53,6 +53,7 @@ page {
color: #323436;
color: #323436;
font-weight: 600;
font-weight: 600;
}
}
.point-box {
.point-box {
display: flex;
display: flex;
align-items: center;
align-items: center;
...
@@ -455,6 +456,7 @@ page {
...
@@ -455,6 +456,7 @@ page {
.work-box .disabled {
.work-box .disabled {
opacity: .5;
opacity: .5;
}
}
.logout-box {
.logout-box {
width: calc(100% - 40rpx);
width: calc(100% - 40rpx);
background: #FFFFFF;
background: #FFFFFF;
...
@@ -513,6 +515,7 @@ page {
...
@@ -513,6 +515,7 @@ page {
bottom: 100rpx;
bottom: 100rpx;
}
}
.popclass {
.popclass {
position: relative;
position: relative;
border-radius: 24rpx 24rpx 0 0;
border-radius: 24rpx 24rpx 0 0;
...
@@ -556,7 +559,7 @@ page {
...
@@ -556,7 +559,7 @@ page {
height: 88rpx;
height: 88rpx;
margin: 0 auto;
margin: 0 auto;
margin-top: 120rpx;
margin-top: 120rpx;
margin-bottom:20rpx;
margin-bottom:
20rpx;
background: #347BFF;
background: #347BFF;
border-radius: 12rpx;
border-radius: 12rpx;
font-weight: 500;
font-weight: 500;
...
@@ -573,3 +576,19 @@ page {
...
@@ -573,3 +576,19 @@ page {
color: #333;
color: #333;
border: 2rpx solid #e1e1e1;
border: 2rpx solid #e1e1e1;
}
}
.flex{
margin-top:7rpx;
display: flex;
align-items: center;
}
.wechat_icon {
width: 32rpx;
height: 32rpx;
}
.nickname {
font-weight: 400;
font-size: 24rpx;
color: #5A5E66;
margin-left: 8rpx;
}
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment