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
f5abf9f7
Commit
f5abf9f7
authored
Jun 11, 2019
by
赵雅纹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-zyw' into 'dev'
Feature zyw See merge request
!20
parents
e43eb651
56cf9ad9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
25 additions
and
37 deletions
+25
-37
app.js
src/app.js
+2
-2
authorization-modal.js
src/component/authorization-modal/authorization-modal.js
+1
-7
authorization-modal.wxml
src/component/authorization-modal/authorization-modal.wxml
+1
-1
personCenter.wxml
src/component/personCenter/personCenter.wxml
+2
-2
picNav.js
src/component/picNav/picNav.js
+8
-2
index.js
src/config/index.js
+1
-1
project.config.json
src/project.config.json
+1
-1
Http.js
src/utils/Http.js
+1
-1
wxService.js
src/utils/wxService.js
+8
-20
No files found.
src/app.js
View file @
f5abf9f7
...
@@ -113,7 +113,7 @@ App({
...
@@ -113,7 +113,7 @@ App({
loginFirst
:
false
,
loginFirst
:
false
,
imageUrl
:
""
,
//图片地址
imageUrl
:
""
,
//图片地址
isFullSucreen
:
false
,
// 当前设备是否为 FullSucreen
isFullSucreen
:
false
,
// 当前设备是否为 FullSucreen
//
brandId: 2005,
brandId
:
2005
,
brandId
:
1001
,
//
brandId: 1001,
}
}
})
})
src/component/authorization-modal/authorization-modal.js
View file @
f5abf9f7
...
@@ -43,19 +43,13 @@ Component({
...
@@ -43,19 +43,13 @@ Component({
//立即兑换
//立即兑换
query
()
{},
query
()
{},
_getUserInfo
(
res
=
{})
{
_getUserInfo
(
res
=
{})
{
if
(
!
this
.
data
.
checkAll
)
{
wx
.
showToast
({
title
:
'请同意会员规则'
,
icon
:
'none'
})
return
false
}
this
.
setData
({
this
.
setData
({
isAuthorization
:
false
isAuthorization
:
false
})
})
const
userInfo
=
res
.
detail
||
{}
const
userInfo
=
res
.
detail
||
{}
if
(
res
.
detail
.
userInfo
)
{
if
(
res
.
detail
.
userInfo
)
{
utils
.
getUserInfoByBtn
(
userInfo
).
then
(
(
data
=
{}
)
=>
{
utils
.
getUserInfoByBtn
(
userInfo
).
then
(
(
data
=
{}
)
=>
{
console
.
log
(
'----'
,
data
)
const
{
token
}
=
data
const
{
token
}
=
data
wx
.
setStorageSync
(
'_accreditUserInfo'
,
userInfo
)
wx
.
setStorageSync
(
'_accreditUserInfo'
,
userInfo
)
wx
.
hideNavigationBarLoading
()
wx
.
hideNavigationBarLoading
()
...
...
src/component/authorization-modal/authorization-modal.wxml
View file @
f5abf9f7
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<view class='auth-shop'>
<view class='auth-shop'>
广东7-Eleven申请获取授权,用于会员服务
广东7-Eleven申请获取授权,用于会员服务
</view>
</view>
<button type='primary' bindgetuserinfo="_getUserInfo" open-type='getUserInfo' class='agree' >同意</button>
<button type='primary' bindgetuserinfo="_getUserInfo" open-type='getUserInfo' class='agree'
disabled='{{!checkAll}}'
>同意</button>
<view class='rule-wrap'>
<view class='rule-wrap'>
<view class='agree-rule'>
<view class='agree-rule'>
<view class="agree-icon"><icon size="18" type="{{checkAll ? 'success' : 'circle'}}" bindtap="checkAll"></icon></view>
<view class="agree-icon"><icon size="18" type="{{checkAll ? 'success' : 'circle'}}" bindtap="checkAll"></icon></view>
...
...
src/component/personCenter/personCenter.wxml
View file @
f5abf9f7
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
<button type="primary" plain='false' bindtap="handleTtoActiveMemebr">激活立享会员特权</button>
<button type="primary" plain='false' bindtap="handleTtoActiveMemebr">激活立享会员特权</button>
</view>-->
</view>-->
<view wx:if='{{!memberActivateStatus}}' class="member-unActive">
<view wx:if='{{!memberActivateStatus}}' class="member-unActive"
bindtap="handleTtoActiveMemebr"
>
<text class="un-active-btn"
bindtap="handleTtoActiveMemebr"
>激活立享会员特权</text>
<text class="un-active-btn" >激活立享会员特权</text>
</view>
</view>
<view wx:if='{{memberActivateStatus}}' class="activation-content activation-bg {{true ? 'user-content' : ''}}" style="{{personData.backgroundImageUrl ? 'background-image: url('+ personData.backgroundImageUrl +');' : 'background-image: url(' + baseUrl + ');'}}">
<view wx:if='{{memberActivateStatus}}' class="activation-content activation-bg {{true ? 'user-content' : ''}}" style="{{personData.backgroundImageUrl ? 'background-image: url('+ personData.backgroundImageUrl +');' : 'background-image: url(' + baseUrl + ');'}}">
...
...
src/component/picNav/picNav.js
View file @
f5abf9f7
...
@@ -37,13 +37,18 @@ Component({
...
@@ -37,13 +37,18 @@ Component({
},
},
preview
(
e
)
{
preview
(
e
)
{
const
{
appid
,
path
}
=
e
.
currentTarget
.
dataset
const
{
appid
,
path
}
=
e
.
currentTarget
.
dataset
const
{
memberActivateStatus
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
// 获取当前帐号信息
// 获取当前帐号信息
const
accountInfo
=
utils
.
getAccountInfo
()
const
accountInfo
=
utils
.
getAccountInfo
()
const
userInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
userInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
if
(
userInfo
){
if
(
userInfo
){
// 是当前小程序 直接跳转
if
(
accountInfo
.
miniProgram
.
appId
==
appid
){
if
(
accountInfo
.
miniProgram
.
appId
==
appid
){
if
(
!
memberActivateStatus
){
wxService
.
openCard
()
}
else
{
wxService
.
router
(
`
${
path
}
`
)
wxService
.
router
(
`
${
path
}
`
)
}
}
else
{
}
else
{
// 跳转其他小程序
// 跳转其他小程序
wx
.
navigateToMiniProgram
({
wx
.
navigateToMiniProgram
({
...
@@ -59,9 +64,10 @@ Component({
...
@@ -59,9 +64,10 @@ Component({
console
.
log
(
e
)
console
.
log
(
e
)
},
},
})
})
}
}
// 是当前小程序 直接跳转
}
else
{
}
else
{
console
.
log
(
'222'
)
this
.
setData
({
this
.
setData
({
isAuthorization
:
true
isAuthorization
:
true
})
})
...
...
src/config/index.js
View file @
f5abf9f7
const
PROJECT_ENV
=
'
dev
'
// 生产 prod, 测试 dev, 预生产 pre
const
PROJECT_ENV
=
'
pre
'
// 生产 prod, 测试 dev, 预生产 pre
const
needMock
=
''
//
const
needMock
=
''
//
// appid_dev_wx wxc3b64b09b1d3dfc2
// appid_dev_wx wxc3b64b09b1d3dfc2
...
...
src/project.config.json
View file @
f5abf9f7
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
},
},
"compileType"
:
"miniprogram"
,
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.6.6"
,
"libVersion"
:
"2.6.6"
,
"appid"
:
"wx
c3b64b09b1d3dfc2
"
,
"appid"
:
"wx
358b56af62edbde1
"
,
"projectname"
:
"7-Eleven"
,
"projectname"
:
"7-Eleven"
,
"debugOptions"
:
{
"debugOptions"
:
{
"hidedInDevtools"
:
[]
"hidedInDevtools"
:
[]
...
...
src/utils/Http.js
View file @
f5abf9f7
...
@@ -148,7 +148,7 @@ class Http {
...
@@ -148,7 +148,7 @@ class Http {
content
:
'请求数据超时'
content
:
'请求数据超时'
})
})
}
}
if
(
error
.
msg
){
if
(
error
.
msg
&&
error
.
msg
!=
'该用户尚未登录'
){
wx
.
showToast
({
wx
.
showToast
({
title
:
`
${
error
.
msg
}
`
,
title
:
`
${
error
.
msg
}
`
,
icon
:
'none'
icon
:
'none'
...
...
src/utils/wxService.js
View file @
f5abf9f7
...
@@ -47,15 +47,10 @@ class WXService extends Http {
...
@@ -47,15 +47,10 @@ class WXService extends Http {
this
.
setPageLoadStatus
()
this
.
setPageLoadStatus
()
wx
.
hideLoading
()
wx
.
hideLoading
()
}).
catch
(
res
=>
{
}).
catch
(
res
=>
{
console
.
log
(
'res'
,
res
)
console
.
log
(
res
)
if
(
res
.
state
===
401
)
{
if
(
res
.
msg
===
'该用户尚未登录'
)
{
// this.openCard(
)
wx
.
setStorageSync
(
'token'
,
''
)
var
_this
=
this
var
_this
=
this
wx
.
showModal
({
title
:
'温馨提示'
,
content
:
'登录已过期,请重新登录'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
let
userInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
let
userInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
_this
.
login
().
then
(
result
=>
{
_this
.
login
().
then
(
result
=>
{
if
(
result
.
code
){
if
(
result
.
code
){
...
@@ -63,22 +58,14 @@ class WXService extends Http {
...
@@ -63,22 +58,14 @@ class WXService extends Http {
code
:
result
.
code
,
code
:
result
.
code
,
wechatInfo
:
userInfo
,
wechatInfo
:
userInfo
,
brandId
:
2005
,
brandId
:
2005
,
}).
then
(
data
=>
{
}).
then
(
response
=>
{
const
{
token
}
=
data
let
dataResp
=
response
.
data
.
data
if
(
token
)
{
wx
.
setStorageSync
(
'token'
,
dataResp
.
token
)
wx
.
setStorageSync
(
'token'
,
token
)
wx
.
setStorageSync
(
'_baseUserInfo'
,
dataResp
)
}
else
{
wx
.
setStorageSync
(
'token'
,
''
)
}
wx
.
setStorageSync
(
'_baseUserInfo'
,
data
)
})
})
}
}
})
})
}
else
if
(
res
.
cancel
)
{
}
}
})
}
else
if
(
res
.
state
===
402
)
{
}
else
if
(
res
.
state
===
402
)
{
return
this
.
getUserInfo
().
then
(()
=>
{
return
this
.
getUserInfo
().
then
(()
=>
{
if
(
!
this
.
getUserInfoLimitCount
)
{
if
(
!
this
.
getUserInfoLimitCount
)
{
...
@@ -508,6 +495,7 @@ class WXService extends Http {
...
@@ -508,6 +495,7 @@ class WXService extends Http {
if
(
memberActivateStatus
)
{
if
(
memberActivateStatus
)
{
resolve
(
baseUserInfo
)
resolve
(
baseUserInfo
)
}
else
{
}
else
{
console
.
log
(
'开卡'
,
baseUserInfo
)
return
this
.
navigateToMiniProgram
({
return
this
.
navigateToMiniProgram
({
biz
:
baseUserInfo
.
biz
,
biz
:
baseUserInfo
.
biz
,
encrypt_card_id
:
baseUserInfo
.
encryptCardId
,
encrypt_card_id
:
baseUserInfo
.
encryptCardId
,
...
...
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