Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
26632ab1
Commit
26632ab1
authored
Apr 23, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改超值卡按钮
parent
748ed1cc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
4 deletions
+64
-4
valueCard.js
src/subPackage/page/pages/valueCard/valueCard.js
+53
-0
valueCard.wxml
src/subPackage/page/pages/valueCard/valueCard.wxml
+10
-3
valueCard.wxss
src/subPackage/page/pages/valueCard/valueCard.wxss
+1
-1
No files found.
src/subPackage/page/pages/valueCard/valueCard.js
View file @
26632ab1
...
...
@@ -16,6 +16,7 @@ wxService.page({
onLoad
:
function
(
options
)
{
wx
.
hideShareMenu
();
this
.
getValueCardList
();
console
.
log
(
this
.
data
)
},
/**
...
...
@@ -58,6 +59,58 @@ wxService.page({
});
},
//授权
_getUserInfo
(
res
=
{})
{
const
userInfo
=
res
.
detail
||
{}
if
(
res
.
detail
.
userInfo
)
{
utils
.
getUserInfoByBtn
(
userInfo
).
then
((
data
=
{})
=>
{
const
{
token
}
=
data
wx
.
setStorageSync
(
'_accreditUserInfo'
,
userInfo
)
if
(
token
)
{
wx
.
setStorageSync
(
'token'
,
token
)
}
else
{
wx
.
setStorageSync
(
'token'
,
''
)
}
wx
.
setStorageSync
(
'_baseUserInfo'
,
data
)
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
// 获取当前会员是否是体验者
const
{
member
}
=
baseUserInfo
const
curMemberTrial
=
member
&&
member
.
trial
||
false
wx
.
setStorageSync
(
'isExperiencer'
,
curMemberTrial
)
this
.
setUserInfo
()
}).
catch
(
err
=>
{
if
(
err
)
{
wx
.
showToast
({
title
:
`会员系统异常请稍后重试!`
,
icon
:
'none'
})
}
})
}
},
setUserInfo
()
{
// 判断有无开卡
const
userInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
// 新用户去激活领卡
if
(
userInfo
&&
userInfo
.
member
&&
!
userInfo
.
member
.
mobile
&&
!
userInfo
.
member
.
cardNoWeixin
)
{
wxService
.
openCard
()
return
false
}
this
.
setData
({
currentHasUserInfo
:
true
,
});
// 跳转
setTimeout
(()
=>
{
this
.
onLoad
();
},
200
)
},
//跳转到我的超值卡
onTapToMyValueCard
(){
wxService
.
router
(
`/subPackage/page/pages/myValueCard/myValueCard`
);
},
/**
* 页面相关事件处理函数--监听用户下拉动作
...
...
src/subPackage/page/pages/valueCard/valueCard.wxml
View file @
26632ab1
...
...
@@ -15,6 +15,13 @@
<empty text="暂无任何超值卡活动哦~" wx:else/>
<!-- <view class='no-more'>-- 我也是有底线滴 --</view> -->
<!-- <view class="float-bottom">
<view class="float-bottom positionRe" wx:if="{{!currentHasUserInfo}}">
<button bindgetuserinfo="_getUserInfo"
open-type='getUserInfo'
class="clear-btn positionAbs"></button>
我的超值卡
</view> -->
\ No newline at end of file
</view>
<view class="float-bottom" wx:if="{{currentHasUserInfo}}" bindtap="onTapToMyValueCard">
我的超值卡
</view>
\ No newline at end of file
src/subPackage/page/pages/valueCard/valueCard.wxss
View file @
26632ab1
...
...
@@ -3,7 +3,7 @@ page{
background: #ffffff;
box-sizing: border-box;
-webkit-box-sizing: border-box;
/* padding-bottom: 80rpx; */
padding-bottom: 80rpx;
}
view{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment