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
65e7cb51
Commit
65e7cb51
authored
Sep 23, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
集点
parent
27e00ab0
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
79 additions
and
61 deletions
+79
-61
app.js
src/app.js
+4
-0
pointDetail.js
src/pages/pointDetail/pointDetail.js
+39
-39
pointDetail.json
src/pages/pointDetail/pointDetail.json
+2
-2
pointDetail.wxml
src/pages/pointDetail/pointDetail.wxml
+1
-2
pointList.json
src/pages/pointList/pointList.json
+2
-2
pointList.wxml
src/pages/pointList/pointList.wxml
+0
-4
goToHome.js
src/subPackage/page/pages/goToHome/goToHome.js
+16
-3
goToHome.json
src/subPackage/page/pages/goToHome/goToHome.json
+2
-1
goToHome.wxml
src/subPackage/page/pages/goToHome/goToHome.wxml
+9
-8
goToHome.wxss
src/subPackage/page/pages/goToHome/goToHome.wxss
+0
-0
wxService.js
src/utils/wxService.js
+4
-0
No files found.
src/app.js
View file @
65e7cb51
...
@@ -40,6 +40,10 @@ App({
...
@@ -40,6 +40,10 @@ App({
onShow
:
function
(
options
=
{})
{
onShow
:
function
(
options
=
{})
{
console
.
log
(
'app-onshow'
,
options
)
console
.
log
(
'app-onshow'
,
options
)
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
// 获取当前会员是否是体验者
const
{
member
}
=
baseUserInfo
const
curMemberTrial
=
member
&&
member
.
trial
||
false
wx
.
setStorageSync
(
'isExperiencer'
,
curMemberTrial
)
if
(
options
.
referrerInfo
&&
options
.
referrerInfo
.
extraData
!=
null
){
if
(
options
.
referrerInfo
&&
options
.
referrerInfo
.
extraData
!=
null
){
const
{
activate_ticket
,
card_id
,
code
,
errCode
,
wx_activate_after_submit_url
}
=
options
.
referrerInfo
.
extraData
const
{
activate_ticket
,
card_id
,
code
,
errCode
,
wx_activate_after_submit_url
}
=
options
.
referrerInfo
.
extraData
...
...
src/pages/pointDetail/pointDetail.js
View file @
65e7cb51
...
@@ -58,46 +58,46 @@ wxService.page({
...
@@ -58,46 +58,46 @@ wxService.page({
},
},
watch
:
{
watch
:
{
experAccessible
(
newVal
,
oldVal
)
{
experAccessible
(
newVal
,
oldVal
)
{
if
(
newVal
)
{
if
(
newVal
)
{
// 登录接口返回err
// 登录接口返回err
const
reLoginErrFlag
=
wx
.
getStorageSync
(
'reLoginErr'
)
const
reLoginErrFlag
=
wx
.
getStorageSync
(
'reLoginErr'
)
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
let
id
let
id
if
(
baseUserInfo
&&
!
reLoginErrFlag
)
{
if
(
baseUserInfo
&&
!
reLoginErrFlag
)
{
this
.
setData
({
this
.
setData
({
isAuthorization
:
false
isAuthorization
:
false
},
()
=>
{
},
()
=>
{
const
option
=
this
.
options
||
{}
const
option
=
this
.
options
||
{}
const
{
scene
}
=
option
const
{
scene
}
=
option
if
(
scene
)
{
if
(
scene
)
{
let
idParam
=
decodeURIComponent
(
scene
).
split
(
'&'
)[
0
]
let
idParam
=
decodeURIComponent
(
scene
).
split
(
'&'
)[
0
]
let
shareId
=
idParam
&&
idParam
.
split
(
'='
)[
1
]
||
0
let
shareId
=
idParam
&&
idParam
.
split
(
'='
)[
1
]
||
0
id
=
shareId
id
=
shareId
}
else
{
}
else
{
id
=
option
.
id
id
=
option
.
id
}
}
if
(
id
)
{
if
(
id
)
{
this
.
setData
({
this
.
setData
({
id
id
},
()
=>
{
},
()
=>
{
this
.
getPointDetail
(
id
)
this
.
getPointDetail
(
id
)
})
})
}
}
// 隐藏 dialog
// 隐藏 dialog
this
.
isShowDialog
(
false
)
this
.
isShowDialog
(
false
)
})
})
}
}
else
if
(
!
baseUserInfo
&&
reLoginErrFlag
)
{
else
if
(
!
baseUserInfo
&&
reLoginErrFlag
)
{
this
.
setData
({
this
.
setData
({
isAuthorization
:
true
isAuthorization
:
true
})
})
}
}
else
{
else
{
this
.
setData
({
this
.
setData
({
isAuthorization
:
true
isAuthorization
:
true
})
})
}
}
}
else
{
}
else
{
// 去别的页面
// 去别的页面
wxService
.
router
(
`/subPackage/page/pages/goToHome/goToHome`
).
replace
()
wxService
.
router
(
`/subPackage/page/pages/goToHome/goToHome`
).
replace
()
...
...
src/pages/pointDetail/pointDetail.json
View file @
65e7cb51
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
"x-dialog"
:
"/component/dialog/dialog"
,
"x-dialog"
:
"/component/dialog/dialog"
,
"x-progress-point"
:
"/component/progressPoint/progressPoint"
,
"x-progress-point"
:
"/component/progressPoint/progressPoint"
,
"x-progress-image"
:
"/component/progressImage/progressImage"
,
"x-progress-image"
:
"/component/progressImage/progressImage"
,
"authorization-modal-point"
:
"/component/authorization-modal-point/authorization-modal-point"
,
"authorization-modal-point"
:
"/component/authorization-modal-point/authorization-modal-point"
"go-home"
:
"/component/goHome/goHome"
}
}
}
}
\ No newline at end of file
src/pages/pointDetail/pointDetail.wxml
View file @
65e7cb51
...
@@ -70,7 +70,6 @@
...
@@ -70,7 +70,6 @@
bind:_closeDialog="_closeDialog"
bind:_closeDialog="_closeDialog"
show="{{dialog.show}}"
show="{{dialog.show}}"
/>
/>
<!--goHome-->
<go-home/>
<authorization-modal-point isAuthorization='{{isAuthorization}}' />
<authorization-modal-point isAuthorization='{{isAuthorization}}' />
src/pages/pointList/pointList.json
View file @
65e7cb51
{
{
"navigationBarTitleText"
:
"集点列表"
,
"navigationBarTitleText"
:
"集点列表"
,
"usingComponents"
:
{
"usingComponents"
:
{
"status-img"
:
"/component/statusPoint/statusPoint"
,
"status-img"
:
"/component/statusPoint/statusPoint"
"go-home"
:
"/component/goHome/goHome"
}
}
}
}
\ No newline at end of file
src/pages/pointList/pointList.wxml
View file @
65e7cb51
...
@@ -30,7 +30,3 @@
...
@@ -30,7 +30,3 @@
</view>
</view>
</block>
</block>
</view>
</view>
<!--goHome-->
<go-home/>
src/subPackage/page/pages/goToHome/goToHome.js
View file @
65e7cb51
// subPackage/page/pages/goToHome/goToHome.js
// subPackage/page/pages/goToHome/goToHome.js
Page
({
var
app
=
getApp
()
const
wxService
=
require
(
'../../../../utils/wxService'
)
const
utils
=
require
(
'../../../../utils/util'
)
const
envInfo
=
require
(
'../../../../config/index'
).
envInfo
wxService
.
page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
curHeight
:
''
},
},
/**
/**
...
@@ -15,6 +20,10 @@ Page({
...
@@ -15,6 +20,10 @@ Page({
},
},
handelGoHome
()
{
wxService
.
router
(
'/pages/userCenter/userCenter'
).
replace
()
},
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
...
@@ -26,7 +35,11 @@ Page({
...
@@ -26,7 +35,11 @@ Page({
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
wxService
.
getSystemInfo
().
then
(
res
=>
{
this
.
setData
({
curHeight
:
res
.
windowHeight
})
})
},
},
/**
/**
...
...
src/subPackage/page/pages/goToHome/goToHome.json
View file @
65e7cb51
{
{
"navigationBarTitleText"
:
"
回到首页
"
,
"navigationBarTitleText"
:
"
敬请期待
"
,
"usingComponents"
:
{}
"usingComponents"
:
{}
}
}
\ No newline at end of file
src/subPackage/page/pages/goToHome/goToHome.wxml
View file @
65e7cb51
<!--subPackage/page/pages/goToHome/goToHome.wxml-->
<!--subPackage/page/pages/goToHome/goToHome.wxml-->
<!-- <view class="bottom-img" bindtap="handelGoHome">
<view class="go-home" style="height:{{curHeight}}px" bindtap="handelGoHome"></view>
<image class="img-top" mode="widthFix" src="/assets/imgs/7_1_0/go-top.png" bindtap="goTop"></image>
</view> -->
<!--<view class="go-tips">敬请期待</view>
<view class="btn-wrap">
<view class="btn-wrap">
<view class="btn-home">
<view class="btn-home" bindtap="handelGoHome">
<button class="btn btn-primary">回到首页</button>
<button type='primary' class='btn-primary'>回到首页</button>
</view>
</view>
</view>
</view-->
src/subPackage/page/pages/goToHome/goToHome.wxss
View file @
65e7cb51
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/utils/wxService.js
View file @
65e7cb51
...
@@ -384,6 +384,7 @@ class WXService extends Http {
...
@@ -384,6 +384,7 @@ class WXService extends Http {
trialList
()
{
trialList
()
{
let
localPath
=
this
.
getAssPath
()
let
localPath
=
this
.
getAssPath
()
wx
.
showLoading
({
wx
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
})
})
...
@@ -395,6 +396,8 @@ class WXService extends Http {
...
@@ -395,6 +396,8 @@ class WXService extends Http {
// 对应的path
// 对应的path
let
currentPaths
=
[];
let
currentPaths
=
[];
localPath
.
forEach
(
item
=>
{
localPath
.
forEach
(
item
=>
{
console
.
log
(
'---------'
,
item
,
data
)
if
(
item
.
hasOwnProperty
(
data
))
{
if
(
item
.
hasOwnProperty
(
data
))
{
currentPaths
=
item
[
data
]
currentPaths
=
item
[
data
]
}
else
{
}
else
{
...
@@ -574,6 +577,7 @@ class WXService extends Http {
...
@@ -574,6 +577,7 @@ class WXService extends Http {
config
.
onLoad
&&
config
.
onLoad
.
apply
(
page
,
args
);
config
.
onLoad
&&
config
.
onLoad
.
apply
(
page
,
args
);
},
},
onShow
:
function
(...
args
)
{
onShow
:
function
(...
args
)
{
const
isExperiencer
=
wx
.
getStorageSync
(
'isExperiencer'
)
const
page
=
this
const
page
=
this
_self
.
currentPage
=
page
_self
.
currentPage
=
page
config
.
onShow
&&
config
.
onShow
.
apply
(
page
,
args
)
config
.
onShow
&&
config
.
onShow
.
apply
(
page
,
args
)
...
...
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