Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
严立
/
mini-shimao
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
188cc4dc
authored
Sep 25, 2020
by
严立
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
LL - banner 跳转
parent
0050ff0e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
17 deletions
app.js
pages/commodity/project/project.js
app.js
View file @
188cc4dc
...
@@ -338,7 +338,8 @@ App({
...
@@ -338,7 +338,8 @@ App({
// 商品通用属性设置
// 商品通用属性设置
let
funcInfo
=
{
let
funcInfo
=
{
'id'
:
funcInfoRaw
.
id
,
'id'
:
funcInfoRaw
.
id
,
'typeId'
:
funcInfoRaw
.
genre
,
// 分类
'typeId'
:
Number
(
funcInfoRaw
.
genre
),
// 分类
'shopId'
:
funcInfoRaw
.
officeId
,
// 门店
'name'
:
funcInfoRaw
.
name
,
// 名称
'name'
:
funcInfoRaw
.
name
,
// 名称
'cover'
:
funcInfoRaw
.
ticketsImg
,
// 封面
'cover'
:
funcInfoRaw
.
ticketsImg
,
// 封面
'notificationId'
:
funcInfoRaw
.
notificationId
,
// 购买须知
'notificationId'
:
funcInfoRaw
.
notificationId
,
// 购买须知
...
@@ -353,6 +354,11 @@ App({
...
@@ -353,6 +354,11 @@ App({
'dateValid'
:
this
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 有效时间
'dateValid'
:
this
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 有效时间
'dateInvalid'
:
funcInfoRaw
.
cardNam
,
// 失效时间
'dateInvalid'
:
funcInfoRaw
.
cardNam
,
// 失效时间
'quantity'
:
1
,
'quantityMin'
:
1
,
'quantityMax'
:
1
,
'isActive'
:
true
}
}
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
...
...
pages/commodity/project/project.js
View file @
188cc4dc
...
@@ -235,11 +235,10 @@ Page({
...
@@ -235,11 +235,10 @@ Page({
* @returns
* @returns
*/
*/
onBanner
:
function
(
event
)
{
onBanner
:
function
(
event
)
{
return
let
funcItme
=
event
.
currentTarget
.
dataset
.
item
let
funcItme
=
event
.
currentTarget
.
dataset
.
item
// 月卡商品
// 月卡商品
funcItme
.
targetId
=
'94b7a6a7f82845d3a1875ee1e7a033fa'
//
funcItme.targetId = '94b7a6a7f82845d3a1875ee1e7a033fa'
// 门票商品
// 门票商品
// funcItme.targetId = '0ac170457a8546469976753ea21cd8e9'
// funcItme.targetId = '0ac170457a8546469976753ea21cd8e9'
...
@@ -253,7 +252,7 @@ Page({
...
@@ -253,7 +252,7 @@ Page({
// 餐品
// 餐品
// funcItme.targetId = '329f304aca104ff1887dde5877e15126'
// funcItme.targetId = '329f304aca104ff1887dde5877e15126'
funcItme
.
targetType
=
4
//
funcItme.targetType = 4
let
funcUrl
=
''
let
funcUrl
=
''
if
(
funcItme
.
targetType
)
{
if
(
funcItme
.
targetType
)
{
...
@@ -285,17 +284,17 @@ Page({
...
@@ -285,17 +284,17 @@ Page({
case
3
:
case
3
:
// 攻略详情
// 攻略详情
if
(
funcItme
.
targetId
)
{
if
(
funcItme
.
targetId
===
''
)
return
funcUrl
=
'/pages/play/strategy-detail/strategy-detail?id='
+
funcItme
.
targetId
funcUrl
=
'/pages/play/strategy-detail/strategy-detail?id='
+
funcItme
.
targetId
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
funcUrl
url
:
funcUrl
})
})
}
break
break
case
4
:
case
4
:
// 商品
// 商品
// 跳转商品下单,需要查询商品参数
// 跳转商品下单,需要查询商品参数
if
(
funcItme
.
targetId
===
''
)
return
App
.
wxRequest
({
App
.
wxRequest
({
url
:
'/api/v1/commodity/getCommodityParticulars'
,
url
:
'/api/v1/commodity/getCommodityParticulars'
,
data
:
{
data
:
{
...
@@ -304,15 +303,24 @@ Page({
...
@@ -304,15 +303,24 @@ Page({
success
:
(
response
)
=>
{
success
:
(
response
)
=>
{
console
.
log
(
response
)
console
.
log
(
response
)
console
.
log
(
App
.
setCommodityInfo
(
response
.
data
))
console
.
log
(
App
.
setCommodityInfo
(
response
.
data
))
let
funcCommodityInfo
=
App
.
setCommodityInfo
(
response
.
data
)
let
funcShopInfo
=
App
.
globalData
.
shopId
for
(
let
i
=
0
,
l
=
funcShopInfo
.
length
;
i
<
l
;
i
++
)
{
if
(
funcCommodityInfo
.
shopId
===
funcShopInfo
[
i
].
id
)
{
App
.
setShopInfo
(
funcShopInfo
[
i
].
appId
,
funcCommodityInfo
.
typeId
)
break
}
}
wx
.
setStorageSync
(
'shoppingCartBuffer'
,
[
funcCommodityInfo
])
funcUrl
=
'/pages/pay/order-input/order-input?type='
+
funcCommodityInfo
.
typeId
wx
.
navigateTo
({
url
:
funcUrl
})
}
}
})
})
// if (funcItme.targetId) {
// funcUrl = '/pages/pay/order-input/order-input?type=' + funcItme.targetId
// wx.navigateTo({
// url: funcUrl
// })
// }
break
break
}
}
}
}
...
...
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