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
53686f54
Commit
53686f54
authored
Jun 02, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
386bd704
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
92 additions
and
6 deletions
+92
-6
app.js
src/app.js
+1
-0
categoryTab.wxss
src/component/categoryTab/categoryTab.wxss
+3
-3
picNav.js
src/component/picNav/picNav.js
+77
-1
index.js
src/config/index.js
+1
-0
project.config.json
src/project.config.json
+2
-2
currentLinkRouter.js
src/utils/currentLinkRouter.js
+8
-0
No files found.
src/app.js
View file @
53686f54
...
...
@@ -171,6 +171,7 @@ App({
isPlusVip
:
isPlusVip
,
cityJson
:
cityJson
,
brandId
:
envInfo
.
brandId
,
themeColor
:
envInfo
.
themeColor
},
//跳转10级
navigateTo
(
routerObj
){
...
...
src/component/categoryTab/categoryTab.wxss
View file @
53686f54
...
...
@@ -13,7 +13,7 @@
height: 80rpx;
width: 100%;
border-bottom: solid 1rpx #dddddd;
position: sticky;
/* position: sticky; */
}
.category-tab-container .category-tab .scroll-view_H {
...
...
@@ -41,9 +41,9 @@
}
.category-tab-container .category-tab.fixed{
/* position: fixed; */
position: fixed;
z-index: 8;
/* left: 0; */
left: 0;
top: 0;
}
...
...
src/component/picNav/picNav.js
View file @
53686f54
...
...
@@ -102,8 +102,84 @@ Component({
})
},
preview
(
event
)
{
utilLink
.
currentLinkRouter
(
event
,
this
)
let
ret
=
utilLink
.
currentLinkRouter
(
event
,
this
);
if
(
ret
&&
typeof
ret
===
'object'
){
if
(
ret
.
type
==
11
){
this
.
hanlderOrderActivity
(
ret
);
}
}
},
//处理活动预约
hanlderOrderActivity
(
info
){
//判断用户是否已经预约过此活动
this
.
userHasOrderedActivity
(
info
.
id
,
info
);
},
//判断活动是否已经预约过
userHasOrderedActivity
(
id
,
info
){
let
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
);
wxService
.
post
(
`/merchant/message/wxSubMsgSubscride/getByParams`
,{
memberId
:
baseUserInfo
.
memberId
,
businessId
:
id
}).
then
(
res
=>
{
if
(
res
){
let
data
=
res
.
data
.
data
?
res
.
data
.
data
:
[];
if
(
data
.
length
==
0
){
//未预约
if
(
info
.
templateId
){
this
.
getOrderActivityInfo
(
info
.
templateId
,
info
);
}
}
else
{
console
.
log
(
data
)
wx
.
showModal
({
title
:
'预约成功'
,
showCancel
:
false
,
confirmText
:
'确定'
,
content
:
'您已订阅消息通知~'
,
confirmColor
:
app
.
globalData
.
themeColor
,
success
(){},
})
}
}
})
},
//获取预约活动详情
getOrderActivityInfo
(
id
,
info
){
wxService
.
get
(
`/merchant/message/wxTemplateMappingMiniProgram/
${
id
}
`
).
then
(
res
=>
{
if
(
res
){
let
templateObj
=
res
.
data
.
data
?
res
.
data
.
data
:
null
;
if
(
templateObj
){
let
templateId
=
templateObj
.
templateId
;
wx
.
requestSubscribeMessage
({
tmplIds
:
[
templateId
],
success
:
(
reqRes
)
=>
{
this
.
orderActivity
(
info
.
id
,
templateId
,
info
);
},
complete
:
(
reqComp
)
=>
{}
})
}
}
});
},
//预约活动
orderActivity
(
activityId
,
templateId
,
info
){
let
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
);
wxService
.
post
(
`
${
'/merchant/message/wxSubMsgSubscride/member/subscribe'
}
`
,
{
businessId
:
activityId
,
memberId
:
baseUserInfo
.
memberId
,
templateId
:
templateId
,
}).
then
(
resp
=>
{
wx
.
showModal
({
title
:
'预约成功'
,
showCancel
:
false
,
confirmText
:
'确定'
,
content
:
info
.
prompt
,
confirmColor
:
app
.
globalData
.
themeColor
,
success
(){},
})
});
},
//激活开卡
activeTocard
(
e
)
{
if
(
e
.
detail
)
{
wxService
.
openCard
()
...
...
src/config/index.js
View file @
53686f54
...
...
@@ -660,6 +660,7 @@ const envInfo = (() => {
hasKeFu
:
hasKeFu
,
signUrl
:
signUrl
,
productInfoImgRatio
:
productInfoImgRatio
,
themeColor
:
themeColor
,
}
})()
...
...
src/project.config.json
View file @
53686f54
...
...
@@ -22,7 +22,7 @@
"disablePlugins"
:
[],
"outputPath"
:
""
},
"useCompilerModule"
:
fals
e
,
"useCompilerModule"
:
tru
e
,
"userConfirmedUseCompilerModuleSwitch"
:
false
},
"compileType"
:
"miniprogram"
,
...
...
@@ -143,7 +143,7 @@
"id"
:
13
,
"name"
:
"subPage"
,
"pathName"
:
"subPackage/page/pages/subPage/subPage"
,
"query"
:
"pageId=7
2
"
,
"query"
:
"pageId=7
5
"
,
"scene"
:
null
},
{
...
...
src/utils/currentLinkRouter.js
View file @
53686f54
...
...
@@ -84,6 +84,10 @@ function currentLinkRouter(event, _this) {
}
else
if
(
rowObj
.
type
==
10
)
{
wxService
.
router
(
`/subPackage/page/pages/categoryPro/categoryPro?id=
${
currentClickRow
}
&type=pTag`
)
}
else
if
(
rowObj
.
type
==
11
){
//这个是活动预约的
return
rowObj
;
}
}
}
else
if
(
curItemType
.
row
)
{
let
rowObj
=
typeof
(
curItemType
.
row
)
==
"string"
?
JSON
.
parse
(
curItemType
.
row
)
:
curItemType
.
row
...
...
@@ -106,6 +110,10 @@ function currentLinkRouter(event, _this) {
}
else
if
(
rowObj
.
type
==
10
)
{
wxService
.
router
(
`/subPackage/page/pages/categoryPro/categoryPro?id=
${
currentClickRow
}
&type=pTag`
)
}
else
if
(
rowObj
.
type
==
11
){
//这个是活动预约的
return
rowObj
;
}
}
}
//导出
...
...
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