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
96f956b6
Commit
96f956b6
authored
Sep 04, 2019
by
赵雅纹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_7.1.0' into feature-zyw-sc
# Conflicts: # src/utils/wxService.js
parents
4d5ba602
98a4beaf
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
235 additions
and
119 deletions
+235
-119
app.json
src/app.json
+3
-0
bottom.json
src/component/bottom/bottom.json
+2
-1
dialog.js
src/component/dialog/dialog.js
+0
-6
dialog.wxml
src/component/dialog/dialog.wxml
+30
-5
dialog.wxss
src/component/dialog/dialog.wxss
+2
-23
imageSwiper.json
src/component/imageSwiper/imageSwiper.json
+2
-1
personCenter.json
src/component/personCenter/personCenter.json
+2
-1
picNav.json
src/component/picNav/picNav.json
+2
-1
picNav.wxml
src/component/picNav/picNav.wxml
+0
-31
plus.js
src/component/plus/plus.js
+57
-1
plus.wxml
src/component/plus/plus.wxml
+20
-5
userCenter.js
src/pages/userCenter/userCenter.js
+1
-0
userCenter.json
src/pages/userCenter/userCenter.json
+2
-1
userCenter.wxml
src/pages/userCenter/userCenter.wxml
+2
-3
subPage.json
src/subPackage/page/pages/subPage/subPage.json
+0
-1
subPage.wxml
src/subPackage/page/pages/subPage/subPage.wxml
+0
-1
wxService.js
src/utils/wxService.js
+110
-38
No files found.
src/app.json
View file @
96f956b6
...
...
@@ -53,6 +53,9 @@
]
}
],
"usingComponents"
:
{
"authorization-modal"
:
"/component/authorization-modal/authorization-modal"
},
"window"
:
{
"backgroundTextStyle"
:
"dark"
,
"navigationBarBackgroundColor"
:
"#fff"
,
...
...
src/component/bottom/bottom.json
View file @
96f956b6
{
"component"
:
true
,
"usingComponents"
:
{
"authorization-modal"
:
"./../../component/authorization-modal/authorization-modal"
}
}
\ No newline at end of file
src/component/dialog/dialog.js
View file @
96f956b6
...
...
@@ -82,12 +82,6 @@ Component({
this
.
_updateData
({
show
:
false
})
},
confirm
(){
this
.
_updateData
({
show
:
false
})
// 触发父级事件
wxService
.
nextTick
(()
=>
{
this
.
triggerEvent
(
'_closeDialog'
)
...
...
src/component/dialog/dialog.wxml
View file @
96f956b6
<!--component/dialog/dialog.wxml-->
<view class='wxy-dialog fade {{show ? "in":""}}'>
<view wx:if="{{show}}">
<view data-id="mask" class="dialog-mask" capture-catch:touchstart='_close'></view>
<view class='dialog-body' wx:if="{{showDefalut && dialog.state !== 'success'}}">
<view class='main' bindtap='_handleGo'>
<view class="main-close" bindtap='_close'>x</view>
<view class='content'>
<text>确认删除此作品吗?</text>
<view class="check-del" bindtap='confirm'>确认</view>
<view class='content' style="background-image: url('{{dialog.image}}');">
</view>
</view>
<view class="close" bindtap='_close'></view>
</view>
<view class='dialog-body' bindtap='_close' wx:if="{{showDefalut && dialog.state === 'success'}}">
<view wx:if="{{dialog.image}}">
<image class="image" mode="widthFix" src='{{dialog.image}}'></image>
</view>
</view>
<slot name="after"></slot>
</view>
</view>
<!--<view class='wxy-dialog fade {{show ? "in":""}}'>
<view wx:if="{{show}}">
<view data-id="mask" class="dialog-mask" capture-catch:touchstart='_close'></view>
<view class='dialog-body' wx:if="{{showDefalut && dialog.state !== 'success'}}">
<view class='main'>
<view class='content' style="background-image: url('{{dialog.image}}');">
<view class="">恭喜你,领取成功!</view>
<view class="p">可在{{dialog.content}}中查看奖励哦~</view>
<view class="tip-text" bindtap='_handleGo'>{{dialog.tip}}</view>
</view>
</view>
<view class="close" bindtap='_close'></view>
</view>
<view class='dialog-body' bindtap='_close' wx:if="{{showDefalut && dialog.state === 'success'}}">
<view wx:if="{{dialog.image}}">
<image class="image" mode="widthFix" src='{{dialog.image}}'></image>
</view>
</view>
<slot name="after"></slot>
</view>
</view>-->
src/component/dialog/dialog.wxss
View file @
96f956b6
...
...
@@ -26,37 +26,16 @@
.dialog-body .main {
outline: 0;
background-color: #FFF;
background-clip: padding-box;
border-radius: 15rpx;
margin-top: 0; }
.dialog-body .content {
height:
3
80rpx;
height:
6
80rpx;
position: relative;
background-size: 100% 100%;
background-repeat: no-repeat;
box-sizing: border-box;
padding-top: 50rpx;
}
.dialog-body .main-close {
height: 100rpx;
box-sizing: border-box;
text-align: right;
padding: 20px;
}
.check-del {
width: 416rpx;
height: 88rpx;
line-height: 88rpx;
color: #fff;
text-align: center;
border-radius: 15rpx;
background-color: rgba(255, 51, 51, 1);
box-shadow: 0px 2px 9px 0px rgba(255, 51, 51, 0.6);
margin: 0 auto;
margin-top: 100rpx;
}
padding-top: 180px;}
.dialog-body .image {
position: absolute;
...
...
src/component/imageSwiper/imageSwiper.json
View file @
96f956b6
{
"component"
:
true
,
"usingComponents"
:
{
"authorization-modal"
:
"./../../component/authorization-modal/authorization-modal"
}
}
\ No newline at end of file
src/component/personCenter/personCenter.json
View file @
96f956b6
{
"component"
:
true
,
"usingComponents"
:
{
"authorization-modal"
:
"./../../component/authorization-modal/authorization-modal"
}
}
\ No newline at end of file
src/component/picNav/picNav.json
View file @
96f956b6
...
...
@@ -2,6 +2,6 @@
"component"
:
true
,
"onReachBottomDistance"
:
0
,
"usingComponents"
:
{
"authorization-modal"
:
"./../../component/authorization-modal/authorization-modal"
}
}
\ No newline at end of file
src/component/picNav/picNav.wxml
View file @
96f956b6
...
...
@@ -26,34 +26,3 @@
isAuthorizationType="{{isAuthorizationType}}"
isAuthorizationActiveText="{{isAuthorizationActiveText}}"
/>
<!--<view class="pic-nav">
<view
wx:for="{{picNav}}"
wx:key="{{index}}"
wx:for-item="item"
class="nav-block"
style="width: {{imagewidth}}px;height: {{imageheight}}px;"
>
<image
wx:if="{{baseImgUrl}}"
class="pic-img"
style="width: {{imagewidth}}px;height: {{imageheight}}px;"
src="{{baseImgUrl}}{{item.imageUrl}}"
data-appid="{{item.link.appid}}"
data-path="{{item.link.url}}"
data-link="{{item.link}}"
data-item="{{item}}"
bindload="imageLoad"
bindtap='preview'
/>
</view>
</view>
<authorization-modal
isAuthorization='{{isAuthorization}}'
bind:activeTocard="activeTocard"
isAuthorizationType="{{isAuthorizationType}}"
isAuthorizationActiveText="{{isAuthorizationActiveText}}"
/>
-->
src/component/plus/plus.js
View file @
96f956b6
// component/plus/plus.js
const
wxService
=
require
(
'../../utils/wxService'
)
const
utils
=
require
(
'../../utils/util'
)
Component
({
/**
...
...
@@ -13,6 +14,10 @@ Component({
plusBgi
:{
type
:
Object
,
value
:
null
},
currentHasUserInfo
:{
type
:
Boolean
,
type
:
false
}
},
...
...
@@ -22,11 +27,62 @@ Component({
data
:
{
currentTab
:
'999'
},
/**
* 组件的方法列表
*/
methods
:
{
_getUserInfo
(
res
=
{})
{
const
userInfo
=
res
.
detail
||
{}
console
.
log
(
'userInfo'
,
userInfo
)
// 先授权再领卡
if
(
res
.
detail
.
userInfo
)
{
utils
.
getUserInfoByBtn
(
userInfo
).
then
(
(
data
=
{}
)
=>
{
const
{
token
}
=
data
wx
.
setStorageSync
(
'_accreditUserInfo'
,
userInfo
)
wx
.
hideNavigationBarLoading
()
if
(
token
)
{
wx
.
setStorageSync
(
'token'
,
token
)
}
else
{
wx
.
setStorageSync
(
'token'
,
''
)
}
wx
.
setStorageSync
(
'_baseUserInfo'
,
data
)
// 缓存用户信息
this
.
setUserInfo
()
// 判断有无开卡
}).
catch
(
err
=>
{
if
(
err
)
{
wx
.
showToast
({
title
:
`会员系统异常请稍后重试!`
,
icon
:
'none'
})
}
})
}
},
setUserInfo
()
{
const
userInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
// 新用户去激活领卡
if
(
userInfo
&&
userInfo
.
member
&&
!
userInfo
.
member
.
mobile
)
{
console
.
log
(
'去开'
)
wxService
.
openCard
()
return
false
}
else
{
console
.
log
(
'已开'
)
}
// 跳转
const
urls
=
getCurrentPages
()
setTimeout
(()
=>
{
const
item
=
urls
[
0
].
options
if
(
item
.
route
)
{
try
{
const
options
=
JSON
.
parse
(
item
.
options
)
wxService
.
router
(
`/
${
item
.
route
}
`
).
search
(
options
).
replace
()
}
catch
(
e
)
{
wxService
.
router
(
'/pages/userCenter/userCenter'
).
replace
()
}
}
else
{
wxService
.
router
(
'/pages/userCenter/userCenter'
).
replace
()
}
},
200
)
},
switchNav
(
e
){
this
.
setData
({
currentTab
:
e
.
currentTarget
.
dataset
.
current
,
...
...
src/component/plus/plus.wxml
View file @
96f956b6
...
...
@@ -15,7 +15,7 @@
data-btnText="{{navItem.buttonText}}"
data-id="{{navItem.id}}"
bindtap="switchNav"
style="{{currentTab == idx ? 'background-image: url('+ plusBgi.activeUrl +');' : 'background-image: url('+ plusBgi.inactiveUrl +');'}}"
style="{{currentTab == idx ? 'background-image: url('+ plusBgi.activeUrl +');' : 'background-image: url('+ plusBgi.inactiveUrl +');'}}"
>
<view class="plus-choose">
<text>每月仅¥{{navItem.price / navItem.duration * 30}}</text>
...
...
@@ -36,10 +36,25 @@
</block>
</scroll-view>
<view class="pay">
<button class="btn btn-primary" bindtap="payPlus">
<text>立即支付</text>
<text>¥158</text>
</button>
<!--微信授权-->
<block wx:if="{{!currentHasUserInfo}}">
<button
bindgetuserinfo="_getUserInfo"
data-jflag="false"
open-type='getUserInfo'
class='btn btn-primary'
hover-class="btn-hover"
>
<text>{{currentHasUserInfo}}立即支付</text>
<text>¥158</text>
</button>
</block>
<block wx:else>
<button class="btn btn-primary" bindtap="payPlus">
<text>{{currentHasUserInfo}}立即支付</text>
<text>¥158</text>
</button>
</block>
</view>
</view>
src/pages/userCenter/userCenter.js
View file @
96f956b6
...
...
@@ -75,6 +75,7 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow
()
{
console
.
log
(
'0this.data.currentHasUserInfo'
,
this
.
data
.
currentHasUserInfo
)
// 取会员卡号
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
cardMember
=
wx
.
getStorageSync
(
'_cardMember'
)
...
...
src/pages/userCenter/userCenter.json
View file @
96f956b6
...
...
@@ -5,7 +5,6 @@
"person-center"
:
"/component/personCenter/personCenter"
,
"pic-nav"
:
"/component/picNav/picNav"
,
"bottom"
:
"/component/bottom/bottom"
,
"authorization-modal"
:
"/component/authorization-modal/authorization-modal"
,
"tab-sort"
:
"/component/tabSort/tabSort"
,
"announcement"
:
"/component/announcement/announcement"
,
"icon-swiper"
:
"/component/iconSwiper/iconSwiper"
,
...
...
@@ -14,6 +13,7 @@
"attention"
:
"/component/attention/attention"
,
"guide-page-modal"
:
"/component/guidePageModal/guidePageModal"
,
"bottom-tabs"
:
"/component/bottomTabs/bottomTabs"
,
"authorization-modal"
:
"/component/authorization-modal/authorization-modal"
,
"plus"
:
"/component/plus/plus"
}
}
\ No newline at end of file
src/pages/userCenter/userCenter.wxml
View file @
96f956b6
...
...
@@ -27,10 +27,9 @@
<attention focus-wx="{{pItem.focusWx}}" />
</view>
<view class="" wx:if="{{pItem.type == 9}}">
<plus sku-list="{{skuVOList}}" plus-bgi="{{pItem.plus}}"/>
<plus sku-list="{{skuVOList}}" plus-bgi="{{pItem.plus}}"
currentHasUserInfo="{{currentHasUserInfo}}"
/>
</view>
</block>
</view>
<authorization-modal isAuthorization='{{isAuthorization}}' />
<guide-page-modal show="{{guidePageModalShow}}" />
<!--<authorization-modal isAuthorization='{{isAuthorization}}'/>-->
src/subPackage/page/pages/subPage/subPage.json
View file @
96f956b6
...
...
@@ -5,7 +5,6 @@
"person-center"
:
"/component/personCenter/personCenter"
,
"pic-nav"
:
"/component/picNav/picNav"
,
"bottom"
:
"/component/bottom/bottom"
,
"authorization-modal"
:
"/component/authorization-modal/authorization-modal"
,
"tab-sort"
:
"/component/tabSort/tabSort"
,
"announcement"
:
"/component/announcement/announcement"
,
"icon-swiper"
:
"/component/iconSwiper/iconSwiper"
,
...
...
src/subPackage/page/pages/subPage/subPage.wxml
View file @
96f956b6
...
...
@@ -33,5 +33,4 @@
<!--goHome-->
<go-home wx:if="{{goHome}}"/>
</view>
<authorization-modal isAuthorization='{{isAuthorization}}' />
<guide-page-modal show="{{guidePageModalShow}}" />
src/utils/wxService.js
View file @
96f956b6
...
...
@@ -100,12 +100,15 @@ class WXService extends Http {
duration
:
2000
})
}
else
{
this
.
reLogin
()
// 重新登陆之前判断是否登陆过 重新登陆
const
baseUserInfo
=
this
.
getBaseUserInfo
()
if
(
baseUserInfo
)
{
this
.
reLogin
()
return
false
}
}
}
else
if
(
res
.
msg
&&
res
.
msg
.
indexOf
(
'请重新授权'
)
>
-
1
)
{
wx
.
setStorageSync
(
'reLoginErr'
,
true
)
// wxService.router(`/pages/userCenter/userCenter`).replace()
console
.
log
(
"授权跳转"
)
wxService
.
router
(
`/pages/userCenter/userCenter`
).
back
()
}
})
...
...
@@ -220,7 +223,8 @@ class WXService extends Http {
})
}
else
if
(
res
.
data
.
data
.
isMember
===
'1'
)
{
let
baseUserInfo
=
this
.
getBaseUserInfo
()
let
newBaseUserInfo
=
{
...
baseUserInfo
,
let
newBaseUserInfo
=
{
...
baseUserInfo
,
...
res
.
data
.
data
}
this
.
baseUserInfo
=
newBaseUserInfo
...
...
@@ -245,7 +249,7 @@ class WXService extends Http {
}
//生成触点对象Id
getTentacleContent
(
tentacleInfo
){
getTentacleContent
(
tentacleInfo
)
{
return
this
.
post
(
'/marketing/tentacleContent/getTentacleContent'
,
tentacleInfo
).
then
((
res
)
=>
{
let
data
=
res
.
data
.
data
return
Promise
.
resolve
(
data
);
...
...
@@ -255,8 +259,8 @@ class WXService extends Http {
}
//根据触点对象id获取触点对象信息
getTentacleContentByTentacleId
(
tentacleId
){
this
.
post
(
'/marketing/tentacleContent/getTentacleContent'
,
{
tentacleId
:
tentacleId
}).
then
((
res
)
=>
{
getTentacleContentByTentacleId
(
tentacleId
)
{
this
.
post
(
'/marketing/tentacleContent/getTentacleContent'
,
{
tentacleId
:
tentacleId
}).
then
((
res
)
=>
{
let
data
=
res
.
data
.
data
let
TENTACLE_CONTENT
=
{
id
:
data
.
id
,
...
...
@@ -267,7 +271,7 @@ class WXService extends Http {
}
let
storageObj
=
{
memberId
:
''
,
memberId
:
''
,
obj
:
TENTACLE_CONTENT
}
...
...
@@ -285,7 +289,6 @@ class WXService extends Http {
})
}
//根据页面类型判断content取值
getContentByContentType
(
item
){
//1,2,3,8,9,10,11 页面 取页面标题
...
...
@@ -318,7 +321,7 @@ class WXService extends Http {
}
//更新本地触点对象信息
updateLocalTentacleInfo
(){
updateLocalTentacleInfo
()
{
//先获取本地触点对象信息
let
tentacleInfo
=
wx
.
getStorageSync
(
'TENTACLE_CONTENT'
);
//获取从种草详情商品购买时存储的临时触点对象信息
...
...
@@ -332,18 +335,18 @@ class WXService extends Http {
*
*/
//判断tentacleInfo是否为空
if
(
!
tentacleInfo
){
if
(
!
tentacleInfo
)
{
wx
.
setStorageSync
(
'TENTACLE_CONTENT'
,
tempTentacleInfo
);
return
;
return
;
}
//tentacleInfo 不为空
//判断先获取本地触点对象信息 中memberid 是否为空
let
memberId
=
tentacleInfo
.
memberId
;
// 若memberId 为空 表示从分享过来的链接 此时不能更新wx.getStorageSync('TENTACLE_CONTENT') 信息
if
(
!
memberId
){
return
;
if
(
!
memberId
)
{
return
;
}
//不为空 则表示 之前从种草详情中的商品直接购买过 直接更新本地TENTACLE_CONTENT
wx
.
setStorageSync
(
'TENTACLE_CONTENT'
,
tempTentacleInfo
);
}
...
...
@@ -362,7 +365,7 @@ class WXService extends Http {
scrollOffset
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
wx
.
createSelectorQuery
().
selectViewport
().
scrollOffset
(
function
(
res
)
{
wx
.
createSelectorQuery
().
selectViewport
().
scrollOffset
(
function
(
res
)
{
resolve
(
res
)
}).
exec
()
})
...
...
@@ -402,7 +405,7 @@ class WXService extends Http {
})
}
getNavBarBackGroundColor
(
fc
,
bgc
)
{
getNavBarBackGroundColor
(
fc
,
bgc
)
{
wx
.
setNavigationBarColor
({
frontColor
:
fc
,
backgroundColor
:
bgc
,
...
...
@@ -413,6 +416,62 @@ class WXService extends Http {
})
}
handlerPage
(
page
)
{
const
AccreditWhitePages
=
[
'pages/welcome/welcome'
]
// 免授权页面白名单
const
_self
=
this
const
app
=
_self
.
getApp
()
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
if
(
baseUserInfo
&&
baseUserInfo
.
isMember
===
'1'
)
{
app
.
globalData
.
openCard
=
true
}
return
new
Promise
((
resolve
,
reject
)
=>
{
let
accreditUserInfo
=
wx
.
getStorageSync
(
'_accreditUserInfo'
)
if
(
app
.
globalData
.
openCard
&&
accreditUserInfo
)
{
resolve
()
return
false
}
if
(
AccreditWhitePages
.
indexOf
(
page
.
route
)
>
-
1
)
{
resolve
()
}
else
if
(
accreditUserInfo
)
{
getAppUserInfo
().
then
(()
=>
{
if
(
this
.
lock
)
{
return
false
}
if
((
!
baseUserInfo
||
baseUserInfo
.
isMember
!==
'1'
)
&&
needOpenCard
())
{
reject
({
state
:
1
})
_self
.
lock
=
false
}
else
{
_self
.
lock
=
false
resolve
()
}
}).
catch
((
res
)
=>
{
reject
()
})
}
else
{
reject
({
state
:
1
})
}
}).
catch
((
err
)
=>
{
if
(
err
&&
err
.
state
===
1
)
{
const
modifyMottoRoute
=
[
"pos/express/pages/orderList/orderList"
,
"pos/express/pages/confirm/confirm"
]
let
router
=
'/pages/welcome/welcome'
;
if
(
modifyMottoRoute
.
indexOf
(
page
.
route
)
>
-
1
)
{
page
.
options
.
motto
=
'express'
;
}
wxService
.
router
(
'/pages/welcome/welcome'
).
search
({
route
:
`
${
page
.
route
}
`
,
options
:
JSON
.
stringify
(
page
.
options
)
}).
replace
()
}
return
Promise
.
reject
()
})
}
// handlerPage (page) {
// const AccreditWhitePages = [
...
...
@@ -489,53 +548,66 @@ class WXService extends Http {
page
(
config
)
{
const
_self
=
this
// 当前是否有用户信息
config
.
data
.
currentHasUserInfo
=
false
;
// 当前页面是否需要授权
config
.
data
.
currentPageRequireAuth
=
false
;
const
CONFIG_PAPGE
=
{
onLoad
:
function
(...
args
)
{
onLoad
:
function
(...
args
)
{
const
page
=
this
_self
.
initAppGlobalDataSync
()
//修改参数
let
pageIsFromShare
=
false
,
tentacleId
=
null
;
args
.
forEach
(
item
=>
{
if
(
item
[
't'
])
{
if
(
item
[
't'
])
{
pageIsFromShare
=
true
;
tentacleId
=
Integer
.
digit
(
item
[
't'
],
64
,
10
);
if
(
item
[
'i'
]){
tentacleId
=
Integer
.
digit
(
item
[
't'
],
64
,
10
);
if
(
item
[
'i'
])
{
item
[
'id'
]
=
Integer
.
digit
(
item
[
'i'
],
64
,
10
);
}
}
});
console
.
log
(
'--------'
,
args
)
//如果打开的是分享界面则进行触点对象信息请求并存储到本地 放到后续的header中
if
(
pageIsFromShare
){
if
(
pageIsFromShare
)
{
//调用接口
_self
.
getTentacleContentByTentacleId
(
tentacleId
);
}
config
.
onLoad
&&
config
.
onLoad
.
apply
(
page
,
args
);
},
onShow
:
function
(...
args
)
{
onShow
:
function
(...
args
)
{
const
page
=
this
_self
.
currentPage
=
page
config
.
onShow
&&
config
.
onShow
.
apply
(
page
,
args
)
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
if
(
baseUserInfo
)
{
page
.
setData
({
currentHasUserInfo
:
true
});
}
else
{
page
.
setData
({
currentHasUserInfo
:
false
});
}
},
onReady
:
function
(...
args
)
{
onReady
:
function
(...
args
)
{
config
.
onReady
&&
config
.
onReady
.
apply
(
this
,
args
)
},
onHide
:
function
(...
args
)
{
onHide
:
function
(...
args
)
{
const
page
=
this
config
.
onHide
&&
config
.
onHide
.
apply
(
this
,
args
)
// page.setData({
// currentHasUserInfo: false
// });
},
onUnload
:
function
(...
args
)
{
onUnload
:
function
(...
args
)
{
config
.
onUnload
&&
config
.
onUnload
.
apply
(
this
,
args
)
},
onPageScroll
:
function
(...
args
)
{
onPageScroll
:
function
(...
args
)
{
config
.
onPageScroll
&&
config
.
onPageScroll
.
apply
(
this
,
args
)
},
onShareAppMessage
:
function
(...
args
)
{
onShareAppMessage
:
function
(...
args
)
{
const
page
=
this
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
let
openId
=
''
...
...
@@ -605,7 +677,7 @@ class WXService extends Http {
fail
:
(
res
)
=>
{
reject
(
res
)
},
complete
:
()
=>
{}
complete
:
()
=>
{
}
})
})
}
...
...
@@ -614,7 +686,7 @@ class WXService extends Http {
const
_self
=
this
const
promise
=
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!
openCardLister
)
{
openCardLister
=
cEvent
.
on
(
'openCardSuccess'
,
function
(
data
)
{
openCardLister
=
cEvent
.
on
(
'openCardSuccess'
,
function
(
data
)
{
openCardLister
=
null
resolve
(
data
)
})
...
...
@@ -641,11 +713,11 @@ class WXService extends Http {
wx
.
navigateToMiniProgram
({
appId
:
'wxeb490c6f9b154ef9'
,
// 固定为此 appid,不可改动
extraData
:
options
,
// 包括 encrypt_card_id, outer_str, biz三个字段,须从 step3 中获得的链接中获取参数
success
:
function
(
data
)
{
success
:
function
(
data
)
{
console
.
log
(
'navigateToMiniProgram success data is %o'
,
data
)
_self
.
lock
=
false
},
fail
:
function
(
data
)
{
fail
:
function
(
data
)
{
console
.
log
(
'navigateToMiniProgram fail data is %o'
,
data
)
this
.
router
(
'/pages/userCenter/userCenter'
)
// this.router('/pages/welcome/welcome')
...
...
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