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
8806fba4
Commit
8806fba4
authored
Dec 06, 2019
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
860a385d
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
21 deletions
+54
-21
project.config.json
src/project.config.json
+1
-1
openCard.js
src/shoppingGuid/page/pages/openCard/openCard.js
+21
-15
openCard.wxml
src/shoppingGuid/page/pages/openCard/openCard.wxml
+3
-0
openCard.wxss
src/shoppingGuid/page/pages/openCard/openCard.wxss
+23
-0
qrcode.js
src/shoppingGuid/page/pages/qrcode/qrcode.js
+4
-4
wxService.js
src/utils/wxService.js
+2
-1
No files found.
src/project.config.json
View file @
8806fba4
...
@@ -501,7 +501,7 @@
...
@@ -501,7 +501,7 @@
"scene"
:
null
"scene"
:
null
},
},
{
{
"id"
:
-1
,
"id"
:
69
,
"name"
:
"开卡页"
,
"name"
:
"开卡页"
,
"pathName"
:
"shoppingGuid/page/pages/openCard/openCard"
,
"pathName"
:
"shoppingGuid/page/pages/openCard/openCard"
,
"query"
:
""
,
"query"
:
""
,
...
...
src/shoppingGuid/page/pages/openCard/openCard.js
View file @
8806fba4
...
@@ -11,27 +11,40 @@ wxService.page({
...
@@ -11,27 +11,40 @@ wxService.page({
*/
*/
data
:
{
data
:
{
showOpenCardModal
:
false
,
showOpenCardModal
:
false
,
imageUrl
:
'https://
img3.bigaka.com/test/1001/201912/20191202/1001854598a6-67dd-4b3e-9a02-934c1b28a295.jp
g'
imageUrl
:
'https://
bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_u_open_card_small.pn
g'
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
//判断用户是不是已经登录了
//判断用户是不是已经登录了
let
userInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
);
let
userInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
);
if
(
userInfo
)
{
// if (userInfo)
{
wx
.
reLaunch
({
//
wx.reLaunch({
url
:
'/pages/userCenter/userCenter'
,
//
url: '/pages/userCenter/userCenter',
});
//
});
return
;
//
return;
}
//
}
//未登录 需要授权登录 弹出设置的开卡图片
//未登录 需要授权登录 弹出设置的开卡图片
this
.
setData
({
this
.
setData
({
showOpenCardModal
:
true
,
showOpenCardModal
:
true
,
});
});
},
//进入首页
onTapToMall
(){
wx
.
reLaunch
({
url
:
'/pages/userCenter/userCenter'
,
});
},
},
//授权回调
//授权回调
...
@@ -82,10 +95,4 @@ wxService.page({
...
@@ -82,10 +95,4 @@ wxService.page({
});
});
},
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
},
});
});
\ No newline at end of file
src/shoppingGuid/page/pages/openCard/openCard.wxml
View file @
8806fba4
...
@@ -20,5 +20,8 @@
...
@@ -20,5 +20,8 @@
<button bindgetuserinfo="userAuthBtnCallBack" open-type='getUserInfo'>
<button bindgetuserinfo="userAuthBtnCallBack" open-type='getUserInfo'>
<image src='{{imageUrl}}' mode='widthFix'></image>
<image src='{{imageUrl}}' mode='widthFix'></image>
</button>
</button>
<view class='enter-mall'>
<view class='enter' bindtap='onTapToMall'>进入商城</view>
</view>
</view>
</view>
</view>
</view>
src/shoppingGuid/page/pages/openCard/openCard.wxss
View file @
8806fba4
...
@@ -54,6 +54,29 @@ view{
...
@@ -54,6 +54,29 @@ view{
border: none;
border: none;
}
}
.enter-mall{
width: 100%;
height: auto;
display: flex;
align-items: center;
justify-content: center;
}
.enter-mall .enter{
width: 220rpx;
height: 70rpx;
border: solid 1px #ffffff;
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
border-radius: 35rpx;
}
.enter-mall .enter:active{
opacity: 0.7;
}
/* 加载 */
/* 加载 */
/*动画一:单个渐变 */
/*动画一:单个渐变 */
.circle-line{
.circle-line{
...
...
src/shoppingGuid/page/pages/qrcode/qrcode.js
View file @
8806fba4
...
@@ -9,12 +9,12 @@ wxService.page({
...
@@ -9,12 +9,12 @@ wxService.page({
// https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/demo_qrcode.png
// https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/demo_qrcode.png
// https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/biaka_default_u_logo.png
// https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/biaka_default_u_logo.png
data
:
{
data
:
{
codeImg
:
'
https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/demo_qrcode.png
'
,
codeImg
:
''
,
avator
:
'
https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/biaka_default_u_logo.png
'
,
avator
:
''
,
name
:
'
谢中龙
'
,
name
:
''
,
template
:
{},
template
:
{},
cardImg
:
''
,
cardImg
:
''
,
companyName
:
'
上海舞象
'
,
companyName
:
''
,
bottomTypeArr
:
[
bottomTypeArr
:
[
{
{
name
:
"关注公众号"
,
name
:
"关注公众号"
,
...
...
src/utils/wxService.js
View file @
8806fba4
...
@@ -142,7 +142,8 @@ class WXService extends Http {
...
@@ -142,7 +142,8 @@ class WXService extends Http {
let
dataResp
=
response
.
data
.
data
let
dataResp
=
response
.
data
.
data
wx
.
setStorageSync
(
'token'
,
dataResp
.
token
)
wx
.
setStorageSync
(
'token'
,
dataResp
.
token
)
wx
.
setStorageSync
(
'_baseUserInfo'
,
dataResp
)
wx
.
setStorageSync
(
'_baseUserInfo'
,
dataResp
)
_this
.
currentPage
.
onLoad
&&
_this
.
currentPage
.
onLoad
(
_this
.
currentPage
.
options
);
_this
.
currentPage
.
onShow
&&
_this
.
currentPage
.
onShow
();
return
Promise
.
resolve
({
return
Promise
.
resolve
({
response
response
})
})
...
...
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