Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
zhwy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 44baa854
authored
Sep 27, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
方法修改
1 parent
00f48990
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
47 additions
and
37 deletions
api/usersApi/UsersApi.js
packageEquity/pages/freecard/freecard.js
packageMall/pages/detail/detail.js
packageMall/pages/pay/pay.js
packageMall/pages/shoppingCart/shoppingCart.js
packageMine/pages/coupon/detail/detail.js
packageMine/pages/device/index/index.js
packageMine/pages/device/tachograph/tachograph.js
packageMine/pages/setting/index.js
packageSaveMoney/pages/allEquity/allEquity.js
packageSaveMoney/pages/chargeDetail/chargeDetail.js
packageSaveMoney/pages/detail/detail.js
packageSaveMoney/pages/kaqDetail/kaqDetail.js
packageSaveMoney/pages/kaqDetail/orderDetail.js
packageSaveMoney/pages/open/open.js
pages/tab/equity/index.js
pages/tab/mall/components/CarOwner/CarOwner.js
pages/tab/mall/components/CarOwner/CarOwner.wxml
pages/tab/mall/index.js
pages/tab/mall/index.sass
pages/tab/mall/index.wxml
api/usersApi/UsersApi.js
View file @
44baa85
...
@@ -60,7 +60,7 @@ class UsersApi {
...
@@ -60,7 +60,7 @@ class UsersApi {
/**授权手机号 */
/**授权手机号 */
async
authUserPhone
(
detail
,
sessionId
)
{
async
authUserPhone
(
detail
,
sessionId
)
{
if
(
!
sessionId
)
{
if
(
!
sessionId
)
{
wx
.
$a
pi
.
showToast
(
'缺少sessionId'
)
wx
.
p
.
wxA
pi
.
showToast
(
'缺少sessionId'
)
Promise
.
reject
({
Promise
.
reject
({
errMsg
:
'缺少sessionId'
errMsg
:
'缺少sessionId'
})
})
...
@@ -134,7 +134,7 @@ class UsersApi {
...
@@ -134,7 +134,7 @@ class UsersApi {
/**授权手机号登录 */
/**授权手机号登录 */
async
authStorePhone
(
detail
,
loginToken
)
{
async
authStorePhone
(
detail
,
loginToken
)
{
if
(
!
loginToken
)
{
if
(
!
loginToken
)
{
wx
.
$a
pi
.
showToast
(
'缺少loginToken'
)
wx
.
p
.
wxA
pi
.
showToast
(
'缺少loginToken'
)
Promise
.
reject
({
Promise
.
reject
({
errMsg
:
'缺少loginToken'
errMsg
:
'缺少loginToken'
})
})
...
...
packageEquity/pages/freecard/freecard.js
View file @
44baa85
...
@@ -106,7 +106,7 @@ Page({
...
@@ -106,7 +106,7 @@ Page({
let
{
merchantId
,
phone
}
=
data
let
{
merchantId
,
phone
}
=
data
this
.
toPostFreeCard
(
merchantId
,
phone
,
data
)
this
.
toPostFreeCard
(
merchantId
,
phone
,
data
)
this
.
handlerCustomerId
()
this
.
handlerCustomerId
()
}
else
wx
.
$a
pi
.
showToast
(
message
)
}
else
wx
.
p
.
wxA
pi
.
showToast
(
message
)
})
})
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
...
@@ -189,7 +189,7 @@ Page({
...
@@ -189,7 +189,7 @@ Page({
// wx.$storage.set('bindInfo', temp)
// wx.$storage.set('bindInfo', temp)
// wx.$router.reLaunch('/pages/tab/shopMall/index?tabIndex=1', { notIntercept: true })
// wx.$router.reLaunch('/pages/tab/shopMall/index?tabIndex=1', { notIntercept: true })
}
else
{
}
else
{
wx
.
$a
pi
.
showToast
(
message
||
'系统异常'
)
wx
.
p
.
wxA
pi
.
showToast
(
message
||
'系统异常'
)
}
}
})
})
},
},
...
...
packageMall/pages/detail/detail.js
View file @
44baa85
...
@@ -56,7 +56,7 @@ Page({
...
@@ -56,7 +56,7 @@ Page({
business_type
:
1
,
business_type
:
1
,
add_way
:
104
,
add_way
:
104
,
merchant_id
:
wx
.
p
.
storage
.
get
(
'srcm_shopmall_merchant_id'
),
merchant_id
:
wx
.
p
.
storage
.
get
(
'srcm_shopmall_merchant_id'
),
guest_no
:
wx
.
$Track
.
getGuestNo
(),
//游客ID,
guest_no
:
wx
.
p
.
$Track
.
getGuestNo
(),
//游客ID,
user_open_id
:
this
.
shareOpenId
||
''
user_open_id
:
this
.
shareOpenId
||
''
}
}
this
.
firstEnter
=
false
this
.
firstEnter
=
false
...
@@ -93,7 +93,7 @@ Page({
...
@@ -93,7 +93,7 @@ Page({
wx
.
saveImageToPhotosAlbum
({
wx
.
saveImageToPhotosAlbum
({
filePath
:
res
.
path
,
filePath
:
res
.
path
,
success
()
{
success
()
{
wx
.
$a
pi
.
showToast
(
'保存成功'
)
wx
.
p
.
wxA
pi
.
showToast
(
'保存成功'
)
},
},
fail
(
err
)
{
fail
(
err
)
{
if
(
err
.
errMsg
===
'saveImageToPhotosAlbum:fail auth deny'
)
{
if
(
err
.
errMsg
===
'saveImageToPhotosAlbum:fail auth deny'
)
{
...
@@ -127,7 +127,7 @@ Page({
...
@@ -127,7 +127,7 @@ Page({
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
wx
.
hideLoading
()
wx
.
hideLoading
()
wx
.
$a
pi
.
showToast
(
'图片保存失败,请重试'
)
wx
.
p
.
wxA
pi
.
showToast
(
'图片保存失败,请重试'
)
})
})
},
},
previewImage
(
e
)
{
previewImage
(
e
)
{
...
@@ -301,7 +301,7 @@ Page({
...
@@ -301,7 +301,7 @@ Page({
params
.
orderGoodsList
=
[
orderGoodsList
]
params
.
orderGoodsList
=
[
orderGoodsList
]
goodsList
.
expressFee
=
goodsInfo
.
expressFee
goodsList
.
expressFee
=
goodsInfo
.
expressFee
if
(
!
contactInfo
.
contactAddress
&&
goodsInfo
.
deliveryType
!=
1
)
{
if
(
!
contactInfo
.
contactAddress
&&
goodsInfo
.
deliveryType
!=
1
)
{
wx
.
$a
pi
.
showToast
(
'请填写收货地址'
)
wx
.
p
.
wxA
pi
.
showToast
(
'请填写收货地址'
)
return
return
}
}
if
(
upgrade
||
isCarOwner
)
{
if
(
upgrade
||
isCarOwner
)
{
...
@@ -348,8 +348,8 @@ Page({
...
@@ -348,8 +348,8 @@ Page({
params
.
cartType
=
4
params
.
cartType
=
4
}
}
wx
.
p
.
api
.
shopmallApi
.
addShoppingcart
(
params
).
then
(
data
=>
{
wx
.
p
.
api
.
shopmallApi
.
addShoppingcart
(
params
).
then
(
data
=>
{
wx
.
$a
pi
.
showToast
(
'添加成功!在购物车等亲~'
)
wx
.
p
.
wxA
pi
.
showToast
(
'添加成功!在购物车等亲~'
)
wx
.
$Track
.
setTrack
({
wx
.
p
.
$Track
.
setTrack
({
...
data
...
data
},
},
7
7
...
@@ -574,7 +574,7 @@ Page({
...
@@ -574,7 +574,7 @@ Page({
...
data
,
...
data
,
goodsId
:
data
.
id
goodsId
:
data
.
id
}
}
// wx.$Track.setTrack(trackobj, 6)
// wx.
p.
$Track.setTrack(trackobj, 6)
let
activeSku
=
null
let
activeSku
=
null
if
(
data
.
expressFee
!=
null
)
data
.
expressFee
=
wx
.
p
.
format
.
centsToyuan
(
data
.
expressFee
)
if
(
data
.
expressFee
!=
null
)
data
.
expressFee
=
wx
.
p
.
format
.
centsToyuan
(
data
.
expressFee
)
if
(
isActivity
)
{
if
(
isActivity
)
{
...
...
packageMall/pages/pay/pay.js
View file @
44baa85
...
@@ -343,7 +343,7 @@ Page({
...
@@ -343,7 +343,7 @@ Page({
})
})
.
then
(({
needPay
,
payParams
})
=>
{
.
then
(({
needPay
,
payParams
})
=>
{
wx
.
hideLoading
()
wx
.
hideLoading
()
// wx.$Track.setTrack(
// wx.
p.
$Track.setTrack(
// {
// {
// goodsList
// goodsList
// },
// },
...
...
packageMall/pages/shoppingCart/shoppingCart.js
View file @
44baa85
...
@@ -257,7 +257,7 @@ Page({
...
@@ -257,7 +257,7 @@ Page({
}
}
wx
.
p
.
api
.
shopmallApi
.
delShoppingcart
(
para
).
then
(
res
=>
{
wx
.
p
.
api
.
shopmallApi
.
delShoppingcart
(
para
).
then
(
res
=>
{
wx
.
p
.
wxApi
.
showToast
(
'删除成功'
)
wx
.
p
.
wxApi
.
showToast
(
'删除成功'
)
wx
.
$Track
.
setTrack
({
wx
.
p
.
$Track
.
setTrack
({
id
,
id
,
type
:
'购物车移除商品'
type
:
'购物车移除商品'
},
},
...
...
packageMine/pages/coupon/detail/detail.js
View file @
44baa85
...
@@ -78,7 +78,7 @@ Page({
...
@@ -78,7 +78,7 @@ Page({
this
.
setData
({
this
.
setData
({
couponInfo
couponInfo
})
})
// wx.$Track.setTrack(
// wx.
p.
$Track.setTrack(
// {
// {
// couponInfo
// couponInfo
// },
// },
...
...
packageMine/pages/device/index/index.js
View file @
44baa85
...
@@ -40,12 +40,12 @@ Page({
...
@@ -40,12 +40,12 @@ Page({
wx
.
saveImageToPhotosAlbum
({
wx
.
saveImageToPhotosAlbum
({
filePath
:
res
.
path
filePath
:
res
.
path
}).
then
(()
=>
{
}).
then
(()
=>
{
wx
.
$a
pi
.
showToast
(
'保存成功'
)
wx
.
p
.
wxA
pi
.
showToast
(
'保存成功'
)
})
})
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
wx
.
hideLoading
()
wx
.
hideLoading
()
wx
.
$a
pi
.
showToast
(
'图片保存失败,请重试'
)
wx
.
p
.
wxA
pi
.
showToast
(
'图片保存失败,请重试'
)
})
})
},
},
authSuccess
()
{
authSuccess
()
{
...
...
packageMine/pages/device/tachograph/tachograph.js
View file @
44baa85
...
@@ -10,7 +10,7 @@ Page({
...
@@ -10,7 +10,7 @@ Page({
setCopyData
(
e
)
{
setCopyData
(
e
)
{
const
text
=
e
.
currentTarget
.
dataset
.
title
;
const
text
=
e
.
currentTarget
.
dataset
.
title
;
wx
.
$api
.
setCopyData
(
text
,
()
=>
{
wx
.
$api
.
setCopyData
(
text
,
()
=>
{
wx
.
$a
pi
.
showToast
(
'复制成功'
)
wx
.
p
.
wxA
pi
.
showToast
(
'复制成功'
)
})
})
},
},
/**
/**
...
...
packageMine/pages/setting/index.js
View file @
44baa85
...
@@ -11,7 +11,7 @@ Page({
...
@@ -11,7 +11,7 @@ Page({
})
=>
{
})
=>
{
wx
.
p
.
wxApi
.
showLoading
()
wx
.
p
.
wxApi
.
showLoading
()
if
(
code
==
'0'
)
{
if
(
code
==
'0'
)
{
// wx.$Track.setTrack({}, 4)
// wx.
p.
$Track.setTrack({}, 4)
wx
.
$LoginStatus
=
true
wx
.
$LoginStatus
=
true
// wx.$util.removeSystemStorage()
// wx.$util.removeSystemStorage()
wx
.
p
.
storage
.
rm
(
'userInfo'
)
wx
.
p
.
storage
.
rm
(
'userInfo'
)
...
...
packageSaveMoney/pages/allEquity/allEquity.js
View file @
44baa85
...
@@ -27,7 +27,7 @@ Page({
...
@@ -27,7 +27,7 @@ Page({
)
)
if
(
options
.
showToast
)
{
if
(
options
.
showToast
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
wx
.
$a
pi
.
showToast
(
'原商品及品牌均已下架,您可查看其他权益商品'
)
wx
.
p
.
wxA
pi
.
showToast
(
'原商品及品牌均已下架,您可查看其他权益商品'
)
},
500
)
},
500
)
}
}
},
},
...
...
packageSaveMoney/pages/chargeDetail/chargeDetail.js
View file @
44baa85
...
@@ -160,7 +160,7 @@ Page({
...
@@ -160,7 +160,7 @@ Page({
return
return
}
}
if
(
!
this
.
data
.
rechageNum
)
{
if
(
!
this
.
data
.
rechageNum
)
{
wx
.
$a
pi
.
showToast
(
'请输入充值账号'
)
wx
.
p
.
wxA
pi
.
showToast
(
'请输入充值账号'
)
return
return
}
}
if
(
this
.
data
.
isGameUse
)
return
this
.
comfirmBuyItem
()
if
(
this
.
data
.
isGameUse
)
return
this
.
comfirmBuyItem
()
...
@@ -224,7 +224,7 @@ Page({
...
@@ -224,7 +224,7 @@ Page({
paySign
:
paySign
,
paySign
:
paySign
,
success
()
{
success
()
{
//跳转商品详情
//跳转商品详情
// wx.
$a
pi.showToast('支付成功')
// wx.
p.wxA
pi.showToast('支付成功')
let
{
query
,
selectedItem
,
rechageNum
}
=
self
.
data
let
{
query
,
selectedItem
,
rechageNum
}
=
self
.
data
let
obj
=
{
let
obj
=
{
...
query
,
...
query
,
...
...
packageSaveMoney/pages/detail/detail.js
View file @
44baa85
...
@@ -316,7 +316,7 @@ Page({
...
@@ -316,7 +316,7 @@ Page({
},
},
// /**获取当前位置 */
// /**获取当前位置 */
getLocation
(
query
)
{
getLocation
(
query
)
{
wx
.
$Track
.
getAddressInfo
().
then
(({
location
})
=>
{
wx
.
p
.
$Track
.
getAddressInfo
().
then
(({
location
})
=>
{
query
.
lat
=
location
.
lat
query
.
lat
=
location
.
lat
query
.
lng
=
location
.
lng
query
.
lng
=
location
.
lng
this
.
toGetCommodity
(
query
)
this
.
toGetCommodity
(
query
)
...
...
packageSaveMoney/pages/kaqDetail/kaqDetail.js
View file @
44baa85
...
@@ -25,7 +25,7 @@ Page({
...
@@ -25,7 +25,7 @@ Page({
},
},
setCopyData
(
e
)
{
setCopyData
(
e
)
{
wx
.
$api
.
setCopyData
(
e
.
currentTarget
.
dataset
.
item
,
()
=>
{
wx
.
$api
.
setCopyData
(
e
.
currentTarget
.
dataset
.
item
,
()
=>
{
wx
.
$a
pi
.
showToast
(
'复制成功'
)
wx
.
p
.
wxA
pi
.
showToast
(
'复制成功'
)
})
})
}
}
})
})
packageSaveMoney/pages/kaqDetail/orderDetail.js
View file @
44baa85
...
@@ -79,7 +79,7 @@ Page({
...
@@ -79,7 +79,7 @@ Page({
},
},
setCopyData
(
e
)
{
setCopyData
(
e
)
{
wx
.
$api
.
setCopyData
(
e
.
currentTarget
.
dataset
.
item
,
()
=>
{
wx
.
$api
.
setCopyData
(
e
.
currentTarget
.
dataset
.
item
,
()
=>
{
wx
.
$a
pi
.
showToast
(
"复制成功"
);
wx
.
p
.
wxA
pi
.
showToast
(
"复制成功"
);
});
});
},
},
});
});
packageSaveMoney/pages/open/open.js
View file @
44baa85
...
@@ -21,7 +21,7 @@ Page({
...
@@ -21,7 +21,7 @@ Page({
this
.
setData
({
this
.
setData
({
memberInfo
:
res
memberInfo
:
res
})
})
wx
.
$Track
.
setTrack
(
wx
.
p
.
$Track
.
setTrack
(
{
{
memberInfo
:
res
memberInfo
:
res
},
},
...
@@ -67,7 +67,7 @@ Page({
...
@@ -67,7 +67,7 @@ Page({
orderCode
:
memberInfo
.
orderCode
,
orderCode
:
memberInfo
.
orderCode
,
orderSource
:
3
orderSource
:
3
}
}
wx
.
$Track
.
setTrack
(
wx
.
p
.
$Track
.
setTrack
(
{
{
...
para
,
...
para
,
type
:
'购买权益卡'
type
:
'购买权益卡'
...
...
pages/tab/equity/index.js
View file @
44baa85
...
@@ -49,7 +49,7 @@ Page({
...
@@ -49,7 +49,7 @@ Page({
// 定位
// 定位
async
getLocation
()
{
async
getLocation
()
{
try
{
try
{
const
res
=
await
wx
.
$Track
.
getAddressInfo
()
const
res
=
await
wx
.
p
.
$Track
.
getAddressInfo
()
this
.
toGetCommodity
(
res
.
location
.
lat
,
res
.
location
.
lng
,
1
)
this
.
toGetCommodity
(
res
.
location
.
lat
,
res
.
location
.
lng
,
1
)
this
.
setData
({
this
.
setData
({
currentAddress
:
res
,
currentAddress
:
res
,
...
...
pages/tab/mall/components/CarOwner/CarOwner.js
View file @
44baa85
...
@@ -83,7 +83,7 @@ Component({
...
@@ -83,7 +83,7 @@ Component({
categoryStyle
:
res
[
0
].
categoryStyle
||
0
categoryStyle
:
res
[
0
].
categoryStyle
||
0
})
})
this
.
triggerEvent
(
'showShoppingCar'
,
res
[
0
].
categoryStyle
)
this
.
triggerEvent
(
'showShoppingCar'
,
res
[
0
].
categoryStyle
)
console
.
log
(
res
[
0
].
id
,
'res[0].id'
);
//
console.log(res[0].id,'res[0].id');
this
.
getCategoryGoodsList
(
res
[
0
].
id
)
this
.
getCategoryGoodsList
(
res
[
0
].
id
)
}
}
})
})
...
@@ -97,7 +97,7 @@ Component({
...
@@ -97,7 +97,7 @@ Component({
categoryType
:
'2'
categoryType
:
'2'
}
}
const
res
=
await
discoveryApi
.
getDiscoverChannelCategoryGoods
(
_para
)
const
res
=
await
discoveryApi
.
getDiscoverChannelCategoryGoods
(
_para
)
console
.
log
(
res
)
//
console.log(res)
if
(
res
&&
res
.
length
)
{
if
(
res
&&
res
.
length
)
{
res
.
forEach
(
el
=>
{
res
.
forEach
(
el
=>
{
el
.
activityPrice
=
centsToyuan
(
el
.
activityPrice
)
el
.
activityPrice
=
centsToyuan
(
el
.
activityPrice
)
...
@@ -241,7 +241,7 @@ Component({
...
@@ -241,7 +241,7 @@ Component({
}
}
const
res
=
await
shopmallApi
.
addShoppingcart
(
_para
)
const
res
=
await
shopmallApi
.
addShoppingcart
(
_para
)
if
(
res
)
{
if
(
res
)
{
wx
.
$a
pi
.
showToast
(
'添加成功'
)
wx
.
p
.
wxA
pi
.
showToast
(
'添加成功'
)
this
.
getBuyCarList
()
this
.
getBuyCarList
()
}
}
},
},
...
...
pages/tab/mall/components/CarOwner/CarOwner.wxml
View file @
44baa85
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</view>
</view>
<view wx:if="{{categoryStyle>-1}}" class="{{ categoryStyle=='2' ? 'goods_ctnr_waterfall': categoryStyle=='3' ? 'goods_ctnr_grass_B' : categoryStyle=='1' ? 'goods_ctnr_row' : 'goods_ctnr_col' }}">
<view wx:if="{{categoryStyle>-1}}" class="{{ categoryStyle=='2' ? 'goods_ctnr_waterfall': categoryStyle=='3' ? 'goods_ctnr_grass_B' : categoryStyle=='1' ? 'goods_ctnr_row' : 'goods_ctnr_col' }}">
<view wx:if="{{categoryStyle==0 || categoryStyle==1}}" class="goods_wrap">
<view wx:if="{{categoryStyle==0 || categoryStyle==1}}" class="goods_wrap">
<view catch:tap="toGoodsDetail" data-item="{{item}}" class="goods_box" wx:for="{{goodsList}}" wx:key="
{{index}}
">
<view catch:tap="toGoodsDetail" data-item="{{item}}" class="goods_box" wx:for="{{goodsList}}" wx:key="
index
">
<image mode="aspectFill" class="cover" src="{{item.commerceVideo ? item.coverUrl : item.goodsImage}}"/>
<image mode="aspectFill" class="cover" src="{{item.commerceVideo ? item.coverUrl : item.goodsImage}}"/>
<view class="info {{categoryStyle?'flex_cccb':''}}">
<view class="info {{categoryStyle?'flex_cccb':''}}">
<text class="name">{{item.goodsName}}</text>
<text class="name">{{item.goodsName}}</text>
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
</view>
</view>
</view>
</view>
<view wx:elif="{{categoryStyle==3}}" class="goods_wrap">
<view wx:elif="{{categoryStyle==3}}" class="goods_wrap">
<view catch:tap="toGoodsDetail" data-item="{{item}}" wx:for="{{goodsList}}" wx:key="
{{index}}
">
<view catch:tap="toGoodsDetail" data-item="{{item}}" wx:for="{{goodsList}}" wx:key="
index
">
<image wx:if="{{item.styleBImg}}" mode="aspectFill" class="publicity-img" src="{{item.styleBImg}}"/>
<image wx:if="{{item.styleBImg}}" mode="aspectFill" class="publicity-img" src="{{item.styleBImg}}"/>
<view class="goods_box">
<view class="goods_box">
<video show-fullscreen-btn="{{false}}" show-play-btn="{{false}}" wx:if="{{curPlayIdx==index && (item.commerceVideo || item.goodsVideo)}}" loop id="video{{index}}" muted="{{false}}" autoplay class="cover" src="{{item.commerceVideo || item.goodsVideo}}"></video>
<video show-fullscreen-btn="{{false}}" show-play-btn="{{false}}" wx:if="{{curPlayIdx==index && (item.commerceVideo || item.goodsVideo)}}" loop id="video{{index}}" muted="{{false}}" autoplay class="cover" src="{{item.commerceVideo || item.goodsVideo}}"></video>
...
@@ -61,8 +61,8 @@
...
@@ -61,8 +61,8 @@
</view>
</view>
</view>
</view>
<block wx:else>
<block wx:else>
<view class="{{parentIndex==0 ? 'left-box' : 'right-box'}}" wx:for-item="parentItem" wx:for-index="parentIndex" wx:for="{{['leftList','rightList']}}" wx:key="
{{index}}
">
<view class="{{parentIndex==0 ? 'left-box' : 'right-box'}}" wx:for-item="parentItem" wx:for-index="parentIndex" wx:for="{{['leftList','rightList']}}" wx:key="
index
">
<block wx:for="{{goodsList}}" wx:key="
{{index}}
">
<block wx:for="{{goodsList}}" wx:key="
index
">
<view catch:tap="toGoodsDetail" data-item="{{item}}" wx:if="{{index%2 == parentIndex}}" class="goods_box">
<view catch:tap="toGoodsDetail" data-item="{{item}}" wx:if="{{index%2 == parentIndex}}" class="goods_box">
<image mode="widthFix" class="cover" src="{{item.commerceVideo ? item.coverUrl : item.goodsImage}}"/>
<image mode="widthFix" class="cover" src="{{item.commerceVideo ? item.coverUrl : item.goodsImage}}"/>
<view class="info">
<view class="info">
...
...
pages/tab/mall/index.js
View file @
44baa85
...
@@ -12,7 +12,7 @@ Page({
...
@@ -12,7 +12,7 @@ Page({
}
=
this
.
data
}
=
this
.
data
let
newMerchantId
=
wx
.
$merchant_id
let
newMerchantId
=
wx
.
$merchant_id
// debugger
// debugger
console
.
log
(
newMerchantId
,
'wx.$merchant_id'
);
//
console.log(newMerchantId, 'wx.$merchant_id');
if
(
newMerchantId
!=
merchantId
&&
newMerchantId
)
{
if
(
newMerchantId
!=
merchantId
&&
newMerchantId
)
{
this
.
setData
({
this
.
setData
({
merchantId
:
newMerchantId
merchantId
:
newMerchantId
...
...
pages/tab/mall/index.sass
View file @
44baa85
...
@@ -8,11 +8,19 @@ page{
...
@@ -8,11 +8,19 @@ page{
z-index
:
2
;
z-index
:
2
;
background
:
#ffffff
;
background
:
#ffffff
;
}
}
.banner
{
display
:
flex
;
// align-items: center;
justify-content
:
center
;
}
.bg
{
.bg
{
box-sizing
:
border-box
;
display
:
inline-block
;
width
:
690rpx
;
width
:
690rpx
;
height
:
280rpx
;
height
:
280rpx
;
border-radius
:
10rpx
;
border-radius
:
10rpx
;
margin
:
24rpx
auto
30rpx
;
margin
:
24rpx
auto
0
;
text-align
:
center
;
}
}
.layout
{
.layout
{
padding-top
:
84px
;
padding-top
:
84px
;
...
...
pages/tab/mall/index.wxml
View file @
44baa85
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
</view>
</view>
<!-- 优选 -->
<!-- 优选 -->
<view class="layout">
<view class="layout">
<glsx-image webp class="bg" src="mall/bg.png"></glsx-image>
<view class="banner">
<glsx-image webp custom-class="bg" src="mall/bg.png"></glsx-image>
</view>
<carOwner id="currentChannel_6" bindshowShoppingCar="showShoppingCarFn" merchantid="{{merchantId}}" channelID="{{currentChannel.id}}"></carOwner>
<carOwner id="currentChannel_6" bindshowShoppingCar="showShoppingCarFn" merchantid="{{merchantId}}" channelID="{{currentChannel.id}}"></carOwner>
</view>
</view>
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment