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 303626e8
authored
Oct 09, 2023
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
0e91027e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
26 deletions
api/usersApi/UsersApi.js
packageDiscovery/pages/pay/components/CouponGoods/CouponGoods.js
packageMall/pages/coupon/coupon.wxml
packageMall/pages/coupon/coupon.wxss
packageMall/pages/detail/detail.js
packageMine/pages/coupon/index/index.js
api/usersApi/UsersApi.js
View file @
303626e
...
@@ -83,7 +83,10 @@ class UsersApi {
...
@@ -83,7 +83,10 @@ class UsersApi {
/**更新客户手机号 */
/**更新客户手机号 */
updataCustomerPhone
()
{
updataCustomerPhone
()
{
let
customerId
=
wx
.
p
.
storage
.
get
(
'srcm_shopmall_customer_id'
),
let
customerId
=
wx
.
p
.
storage
.
get
(
'srcm_shopmall_customer_id'
),
merchantId
=
wx
.
p
.
storage
.
get
(
'srcm_shopmall_merchant_id'
)
// merchantId = wx.p.storage.get('srcm_shopmall_merchant_id')
{
merchantId
}
=
wx
.
p
.
storage
.
get
(
'merchant_info'
)
api
api
.
post
({
.
post
({
method
:
'scrm.api.sso.weapp.mark.phone'
,
method
:
'scrm.api.sso.weapp.mark.phone'
,
...
...
packageDiscovery/pages/pay/components/CouponGoods/CouponGoods.js
View file @
303626e
...
@@ -43,7 +43,9 @@ Component({
...
@@ -43,7 +43,9 @@ Component({
*/
*/
methods
:
{
methods
:
{
getCoupon
(
e
)
{
getCoupon
(
e
)
{
let
merchantId
=
wx
.
p
.
storage
.
get
(
'srcm_shopmall_merchant_id'
)
const
{
merchantId
}
=
wx
.
p
.
storage
.
get
(
'merchant_info'
)
let
{
item
}
=
e
.
currentTarget
.
dataset
let
{
item
}
=
e
.
currentTarget
.
dataset
wx
.
p
.
wxApi
.
showLoading
(
'领取中...'
)
wx
.
p
.
wxApi
.
showLoading
(
'领取中...'
)
wx
.
p
.
api
.
shopmallApi
wx
.
p
.
api
.
shopmallApi
...
...
packageMall/pages/coupon/coupon.wxml
View file @
303626e
...
@@ -127,7 +127,7 @@
...
@@ -127,7 +127,7 @@
</block>
</block>
<block wx:else>
<block wx:else>
<view class="qr-box box" style="padding: 0;">
<view class="qr-box box" style="padding: 0;">
<view class="btn-box">
<view class="btn-box
btn_box_no_center
">
<view class="flex">
<view class="flex">
<view class="title_text_X qrText">{{couponDetail.couponName}}</view>
<view class="title_text_X qrText">{{couponDetail.couponName}}</view>
<image webp class="baseImage" src="{{IMGURL}}mine/coupon/{{couponDetail.discountType}}.png?v={{img_version}}"></image>
<image webp class="baseImage" src="{{IMGURL}}mine/coupon/{{couponDetail.discountType}}.png?v={{img_version}}"></image>
...
...
packageMall/pages/coupon/coupon.wxss
View file @
303626e
...
@@ -141,6 +141,8 @@
...
@@ -141,6 +141,8 @@
background: #FFF5F3;
background: #FFF5F3;
border-radius: 8rpx;
border-radius: 8rpx;
padding: 32rpx;
padding: 32rpx;
display: flex;
flex-direction: column;
}
}
.layout .qr-box .btn-box .text {
.layout .qr-box .btn-box .text {
width: 100%;
width: 100%;
...
@@ -531,3 +533,6 @@
...
@@ -531,3 +533,6 @@
right: 0;
right: 0;
top: 0;
top: 0;
}
}
.btn_box_no_center{
align-items: flex-start;
}
\ No newline at end of file
\ No newline at end of file
packageMall/pages/detail/detail.js
View file @
303626e
...
@@ -61,7 +61,7 @@ Page({
...
@@ -61,7 +61,7 @@ Page({
add_way
:
104
,
add_way
:
104
,
merchant_id
:
merchantId
,
merchant_id
:
merchantId
,
guest_no
:
wx
.
p
.
$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
const
jsonList
=
[
JSON
.
stringify
(
data
)]
const
jsonList
=
[
JSON
.
stringify
(
data
)]
...
@@ -235,7 +235,7 @@ Page({
...
@@ -235,7 +235,7 @@ Page({
hasCouponFlag
hasCouponFlag
}
=
this
.
options
}
=
this
.
options
if
((
upgrade
||
isCarOwner
)
&&
hasCouponFlag
)
{
if
((
upgrade
||
isCarOwner
)
&&
hasCouponFlag
)
{
wx
.
p
.
router
.
go
(
`/packageMall/pages/getCoupon/getCoupon?discoverGoodsType=
${
upgrade
?
1
:
2
}
&from=
${
upgrade
?
1
:
2
}
`
,
{
wx
.
p
.
router
.
go
(
`/packageMall/pages/getCoupon/getCoupon?discoverGoodsType=
${
upgrade
?
1
:
2
}
&from=
${
upgrade
?
1
:
2
}
`
,
{
notIntercept
:
true
notIntercept
:
true
});
});
}
else
{
}
else
{
...
@@ -314,13 +314,13 @@ Page({
...
@@ -314,13 +314,13 @@ Page({
}
}
console
.
log
(
this
.
data
.
goodsInfo
,
'goodsInfo'
)
console
.
log
(
this
.
data
.
goodsInfo
,
'goodsInfo'
)
wx
.
p
.
router
.
go
(
'/packageDiscovery/pages/pay/index'
,
{
wx
.
p
.
router
.
go
(
'/packageDiscovery/pages/pay/index'
,
{
goodsList
:
upgrade
?
goodsList
:
[
goodsList
]
,
goodsList
:
upgrade
?
goodsList
:
[
goodsList
],
deliveryType
:
upgrade
?
1
:
0
,
deliveryType
:
upgrade
?
1
:
0
,
showAddr
:
(
isCarOwner
&&
this
.
data
.
goodsInfo
.
deliveryType
==
1
)
?
0
:
1
,
showAddr
:
(
isCarOwner
&&
this
.
data
.
goodsInfo
.
deliveryType
==
1
)
?
0
:
1
,
// deliveryType: upgrade || (isCarOwner && this.data.goodsInfo.deliveryType == 1) ? 1 : 0,
// deliveryType: upgrade || (isCarOwner && this.data.goodsInfo.deliveryType == 1) ? 1 : 0,
buyType
:
'pay'
,
buyType
:
'pay'
,
discoverGoodsSource
:
goodsInfo
.
discoverGoodsSource
,
discoverGoodsSource
:
goodsInfo
.
discoverGoodsSource
,
pageForm
:
'goodsDetail'
pageForm
:
'goodsDetail'
})
})
return
return
}
}
...
@@ -402,8 +402,8 @@ Page({
...
@@ -402,8 +402,8 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
console
.
log
(
options
,
'options'
);
console
.
log
(
options
,
'options'
);
if
(
options
&&
options
.
openId
)
{
if
(
options
&&
options
.
openId
)
{
this
.
shareOpenId
=
options
.
openId
this
.
shareOpenId
=
options
.
openId
}
}
this
.
data
.
enter_time
=
new
Date
().
format
(
'yyyy-MM-dd hh:mm:ss'
)
this
.
data
.
enter_time
=
new
Date
().
format
(
'yyyy-MM-dd hh:mm:ss'
)
...
@@ -498,7 +498,11 @@ Page({
...
@@ -498,7 +498,11 @@ Page({
const
[
key
,
val
]
=
item
.
split
(
'='
)
const
[
key
,
val
]
=
item
.
split
(
'='
)
op
[
key
]
=
val
op
[
key
]
=
val
})
})
if
(
op
.
merchantId
)
wx
.
p
.
storage
.
set
(
'srcm_shopmall_merchant_id'
,
op
.
merchantId
)
if
(
op
.
merchantId
)
{
wx
.
p
.
storage
.
set
(
'merchant_info'
,
{
merchantId
:
op
.
merchantId
,
})
}
if
(
op
.
isActivity
)
{
if
(
op
.
isActivity
)
{
this
.
setData
({
this
.
setData
({
isActivity
:
true
isActivity
:
true
...
@@ -561,7 +565,7 @@ Page({
...
@@ -561,7 +565,7 @@ Page({
code
,
code
,
data
,
data
,
message
message
})
=>
{})
})
=>
{
})
}
else
{
}
else
{
wx
.
p
.
api
.
shopmallApi
[
target
](
id
).
then
(({
wx
.
p
.
api
.
shopmallApi
[
target
](
id
).
then
(({
code
,
code
,
...
@@ -665,6 +669,8 @@ Page({
...
@@ -665,6 +669,8 @@ Page({
addressFlag
:
true
addressFlag
:
true
})
})
wx
.
hideLoading
()
wx
.
hideLoading
()
// 分享埋点设置
this
.
handlerShareQuery
()
}
else
{
}
else
{
wx
.
hideLoading
()
wx
.
hideLoading
()
this
.
setData
({
this
.
setData
({
...
@@ -798,7 +804,7 @@ Page({
...
@@ -798,7 +804,7 @@ Page({
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
onHide
:
function
()
{},
onHide
:
function
()
{
},
/**
/**
* 生命周期函数--监听页面卸载
* 生命周期函数--监听页面卸载
...
@@ -813,27 +819,30 @@ Page({
...
@@ -813,27 +819,30 @@ Page({
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
:
function
()
{},
onPullDownRefresh
:
function
()
{
},
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom
:
function
()
{},
onReachBottom
:
function
()
{
},
/**
/**
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage
:
function
()
{
onShareAppMessage
:
function
()
{
const
merchantId
=
wx
.
p
.
storage
.
get
(
'srcm_shopmall_merchant_id'
)
},
handlerShareQuery
()
{
const
{
merchantId
}
=
wx
.
p
.
storage
.
get
(
'merchant_info'
)
const
userInfo
=
wx
.
p
.
cache
.
userInfo
.
getUserInfo
()
const
userInfo
=
wx
.
p
.
cache
.
userInfo
.
getUserInfo
()
let
{
let
{
isActivity
,
isActivity
,
isLive
,
isLive
,
goodsInfo
goodsInfo
}
=
this
.
data
,
open_id
=
''
}
=
this
.
data
,
open_id
=
''
this
.
trackQuery
.
view
=
4
if
(
userInfo
)
open_id
=
userInfo
.
openId
this
.
addTrack
(
this
.
trackQuery
)
if
(
userInfo
)
open_id
=
userInfo
.
openId
let
title
=
goodsInfo
.
goodsName
let
title
=
goodsInfo
.
goodsName
let
path
=
`
${
this
.
route
}
?id=
${
goodsInfo
.
id
}
&openId=
${
open_id
}
`
let
path
=
`
${
this
.
route
}
?id=
${
goodsInfo
.
id
}
&openId=
${
open_id
}
`
let
imageUrl
=
''
let
imageUrl
=
''
...
@@ -846,11 +855,18 @@ Page({
...
@@ -846,11 +855,18 @@ Page({
}
}
if
(
isLive
)
path
=
`
${
path
}
&isLive=true`
if
(
isLive
)
path
=
`
${
path
}
&isLive=true`
if
(
merchantId
)
path
=
`
${
path
}
&merchantId=
${
merchantId
}
&isUpgrade=
${
this
.
isUpgrade
||
false
}
&isCarOwner=
${
this
.
isCarOwner
||
false
}
`
if
(
merchantId
)
path
=
`
${
path
}
&merchantId=
${
merchantId
}
&isUpgrade=
${
this
.
isUpgrade
||
false
}
&isCarOwner=
${
this
.
isCarOwner
||
false
}
`
return
{
this
.
shareTitle
=
title
;
imageUrl
,
this
.
shareImage
=
imageUrl
title
,
this
.
shareQuery
=
path
path
this
.
trackQuery
.
view
=
4
this
.
shareFun
=
()
=>
{
this
.
addTrack
(
this
.
trackQuery
)
}
}
// return {
// imageUrl,
// title,
// path
// }
},
},
countDown
(
params
)
{
countDown
(
params
)
{
let
{
let
{
...
@@ -888,7 +904,7 @@ Page({
...
@@ -888,7 +904,7 @@ Page({
let
type
=
{
let
type
=
{
1
:
'距开始'
,
1
:
'距开始'
,
2
:
'距结束'
2
:
'距结束'
}
[
activityStatus
]
}[
activityStatus
]
if
(
this
.
time
)
clearTimeout
(
this
.
time
)
if
(
this
.
time
)
clearTimeout
(
this
.
time
)
this
.
time
=
setTimeout
(()
=>
{
this
.
time
=
setTimeout
(()
=>
{
let
dayList
=
[
h
,
m
,
s
]
let
dayList
=
[
h
,
m
,
s
]
...
...
packageMine/pages/coupon/index/index.js
View file @
303626e
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
// 获取应用实例
// 获取应用实例
Page
({
Page
({
data
:
{
data
:
{
tabs
:
[
'
店铺
优惠券'
,
'权益优惠券'
],
tabs
:
[
'
甄选
优惠券'
,
'权益优惠券'
],
curTabIndex
:
0
,
curTabIndex
:
0
,
couponsList
:
[],
couponsList
:
[],
imgBaseURL
:
'https://img01.glsx.com.cn/weapp/resource/equity-h5-new/mini/'
,
imgBaseURL
:
'https://img01.glsx.com.cn/weapp/resource/equity-h5-new/mini/'
,
...
...
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