Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
hmd
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 1fc672bc
authored
Jul 18, 2023
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
解决冲突
2 parents
a47e1d8e
f3660b39
Hide whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
360 additions
and
372 deletions
api/index.js
api/module/common.js
api/module/entmicro.js
api/module/index.js
api/module/shopmall.js
api/request/http.js
packageEquity/pages/open/open.js
packageEquity/pages/open/open.wxml
packageEquity/pages/saleApply/saleApply.js
packageMall/pages/detail/detail.js
packageMall/pages/pay/pay.js
packageMall/pages/shoppingCart/shoppingCart.js
packageMall/pages/shoppingCart/shoppingCart.scss
packageMall/pages/shoppingCart/shoppingCart.wxml
packageMine/pages/address/detail/detail.js
packageMine/pages/coupon/usedDetail/usedDetail.js
packageMine/pages/order/afterSaleDetail/afterSaleDetail.js
packageMine/pages/order/afterSale_step_two/afterSale_step_two.js
packageMine/pages/order/afterSale_step_two/afterSale_step_two.json
packageMine/pages/order/afterSale_step_two/afterSale_step_two.wxml
packageMine/pages/order/detail/detail.js
packageMine/pages/order/index/index.js
packageMine/pages/setting/index.js
pages/Login/Login.js
pages/Login/Login.wxml
pages/Login/Login.wxss
pages/loading/loading.js
pages/loading/loading.json
pages/tab/index/components/activity/activity.wxml
pages/tab/index/components/activity/activity.wxss
pages/tab/index/components/customer/customer.wxml
pages/tab/index/components/customer/customer.wxss
pages/tab/index/components/good-tab/good-tab.wxml
pages/tab/index/components/good-tab/good-tab.wxss
pages/tab/index/components/goods/goods.wxml
pages/tab/index/components/goods/goods.wxss
pages/tab/index/components/store-equity/store-equity.wxml
pages/tab/index/components/store-equity/store-equity.wxss
pages/tab/index/index.scss
pages/tab/index/index.wxml
pages/tab/mine/index.js
api/index.js
View file @
1fc672b
import
http
from
'./request/http'
import
apis
from
'./module/index'
const
common
=
'scrm.api.carlife.common.'
module
.
exports
=
{
...
apis
,
common
:
{
/**上传图片
*/
uploadImg
(
data
)
{
return
http
.
post
({
method
:
`
${
common
}
uploadImg`
,
...
data
,
noSignAttr
:
[
'file'
]
})
},
/**视频上传
*/
uploadVideo
(
data
)
{
return
http
.
post
({
method
:
`
${
common
}
uploadVideo`
,
...
data
,
noSignAttr
:
[
'file'
]
})
},
// /**根据sceneId 查参数 */
// getSceneById(data) {
// return http.post('dj.api.smartcarlife.common.getSceneById', data)
// },
/** 首页、发现列表 搜索接口 */
search
(
data
)
{
return
http
.
post
({
method
:
'scrm.api.carlife.weapp.homeSearch.search'
,
pageSize
:
10
,
...
data
})
},
/** 根据sap编码获取商户详情 */
getBySapCode
(
data
)
{
return
http
.
post
({
method
:
`scrm.api.carlife.merchant.getBySapCode`
,
...
data
,
},
true
)
},
/**获取图片版本号 */
getImgVersion
()
{
return
http
.
getMock
()
},
}
}
\ No newline at end of file
import
apiModules
from
'./module/index'
module
.
exports
=
apiModules
\ No newline at end of file
api/module/common.js
0 → 100644
View file @
1fc672b
import
http
from
'../request/http'
const
common
=
'scrm.api.carlife.common.'
module
.
exports
=
{
/**上传图片
*/
uploadImg
(
data
)
{
return
http
.
post
({
method
:
`
${
common
}
uploadImg`
,
...
data
,
noSignAttr
:
[
"file"
],
});
},
/**视频上传
*/
uploadVideo
(
data
)
{
return
http
.
post
({
method
:
`
${
common
}
uploadVideo`
,
...
data
,
noSignAttr
:
[
"file"
],
});
},
/** 首页、发现列表 搜索接口 */
search
(
data
)
{
return
http
.
post
({
method
:
"scrm.api.carlife.weapp.homeSearch.search"
,
pageSize
:
10
,
...
data
,
});
},
/** 根据sap编码获取商户详情 */
getBySapCode
(
data
)
{
return
http
.
fetch
(
`scrm.api.carlife.merchant.getBySapCode`
,
data
);
},
/**获取图片版本号 */
getImgVersion
()
{
return
http
.
getMock
();
},
};
api/module/entmicro.js
deleted
100644 → 0
View file @
a47e1d8
import
http
from
"../request/http"
;
module
.
exports
=
{
// 智能名片详情
getCardDetail
(
data
)
{
// return api.post(
// {
// method: `entmicro.api.business.card.cardDetail`,
// ...data,
// },
// true
// );
return
http
.
fetch
(
`entmicro.api.business.card.cardDetail`
,
data
);
},
}
\ No newline at end of file
api/module/index.js
View file @
1fc672b
import
wechatApi
from
'./wechat'
import
entmicroApi
from
'./entmicro'
import
userApi
from
'./user'
import
homeApi
from
'./home'
import
discoveryApi
from
'./discovery'
...
...
@@ -8,10 +7,10 @@ import mineApi from './mine'
import
systemApi
from
'./system'
import
couponsApi
from
'./coupons'
import
equityApi
from
'./equity'
import
common
from
'./common'
module
.
exports
=
{
wechatApi
,
entmicroApi
,
userApi
,
homeApi
,
discoveryApi
,
...
...
@@ -19,5 +18,6 @@ module.exports = {
mineApi
,
systemApi
,
couponsApi
,
equityApi
equityApi
,
common
}
\ No newline at end of file
api/module/shopmall.js
View file @
1fc672b
...
...
@@ -123,4 +123,28 @@ module.exports = {
...
data
})
},
//取消付款
cancelPay
(
orderCode
)
{
return
api
.
fetch
(
'scrm.api.shopmall.weapp.order.cancelPay'
,
{
orderCode
})
},
/** 申请售后 */
afterSale
(
data
)
{
return
api
.
fetch
(
'scrm.api.shopmall.weapp.orderRefund.apply'
,
data
)
},
//申请售后待审核的订单取消售后
cancelOrder
(
orderCode
)
{
return
api
.
fetch
(
'scrm.api.shopmall.weapp.orderRefund.cancel'
,{
orderCode
})
},
/** 为售后添加退货快递信息 */
addDelivery
(
data
)
{
return
api
.
post
({
method
:
`scrm.api.shopmall.weapp.orderRefund.addDelivery`
,
...
data
})
},
}
\ No newline at end of file
api/request/http.js
View file @
1fc672b
...
...
@@ -54,7 +54,7 @@ class Request {
}
:
{
'Cache-Control'
:
'no-cache'
}
header
.
merchantId
=
defaultMerchantId
header
.
merchantId
=
wx
.
$merchant_id
||
defaultMerchantId
let
projectName
=
this
.
getRopProject
(
params
.
method
)
if
(
!
projectName
)
projectName
=
this
.
getRopProject
(
params
.
method
)
const
path
=
pathEnum
[
projectName
]
...
...
@@ -81,8 +81,18 @@ class Request {
}
if
(
code
==
20
||
code
==
21
)
{
wx
.
hideLoading
()
return
wx
.
reLaunch
({
url
:
'/pages/loading/loading'
const
thisPage
=
wx
.
p
.
router
.
getPageInstance
(),
options
=
Object
.
keys
(
thisPage
.
options
)
let
currentRoute
=
thisPage
.
route
,
query
=
[]
if
(
options
.
length
)
{
options
.
map
(
key
=>
{
query
.
push
(
`
${
key
}
=
${
options
[
key
]}
`
)
})
}
if
(
query
.
length
)
currentRoute
+=
`?
${
query
.
join
(
'&'
)}
`
return
wx
.
p
.
router
.
redirectTo
(
'/pages/loading/loading'
,
{
url
:
`/
${
currentRoute
}
`
})
}
else
{
if
(
code
==
'0'
)
{
...
...
packageEquity/pages/open/open.js
View file @
1fc672b
...
...
@@ -6,12 +6,14 @@ Page({
data
:
{
isOpen
:
false
,
openingStatus
:
false
,
IMGURKBASE
:
'equity/version/1_0_0/'
,
IMGURKBASE
:
'equity/version/1_0_0/'
,
},
// 获取门店会员卡信息
getMemberCardData
()
{
const
{
merchantId
}
=
wx
.
p
.
storage
.
get
(
'merchant_info'
)
const
{
merchantId
}
=
wx
.
p
.
storage
.
get
(
'merchant_info'
)
let
newMerchantId
=
merchantId
||
defaultMerchantId
let
para
=
{
merchantId
:
newMerchantId
...
...
@@ -56,27 +58,24 @@ Page({
},
// 去购买会员
async
openMemberFn
()
{
let
sid
=
wx
.
$util
.
getSessionId
()
if
(
!
sid
)
{
this
.
setData
({
showLogin
:
true
})
return
}
const
{
memberInfo
}
=
this
.
data
wx
.
$api
.
showLoading
()
const
loginStatu
=
await
wx
.
p
.
router
.
intercept
()
if
(
loginStatu
)
return
const
{
memberInfo
}
=
this
.
data
wx
.
p
.
wxApi
.
showLoading
()
let
para
=
{
equityClassId
:
memberInfo
.
equityClassId
,
orderCode
:
memberInfo
.
orderCode
,
orderSource
:
3
}
wx
.
$Track
.
setTrack
(
{
...
para
,
type
:
'购买权益卡'
},
7
)
//
wx.$Track.setTrack(
//
{
//
...para,
//
type: '购买权益卡'
//
},
//
7
//
)
wx
.
p
.
api
.
equityApi
.
buyMemberCard
(
para
).
then
(
res
=>
{
wx
.
hideLoading
()
this
.
handlePay
(
res
)
...
...
@@ -84,7 +83,13 @@ Page({
},
// 处理购买参数拉起支付
handlePay
(
payData
)
{
const
{
timeStamp
,
nonceStr
,
packages
,
signType
,
paySign
}
=
payData
const
{
timeStamp
,
nonceStr
,
packages
,
signType
,
paySign
}
=
payData
let
self
=
this
wx
.
requestPayment
({
timeStamp
:
timeStamp
,
...
...
@@ -118,4 +123,4 @@ Page({
// url: '/packageShopmall/packageEquity/pages/active/active'
// })
// }
})
})
\ No newline at end of file
packageEquity/pages/open/open.wxml
View file @
1fc672b
...
...
@@ -34,5 +34,4 @@
</view>
</view>
</view>
</view>
<login show="{{showLogin}}"></login>
\ No newline at end of file
</view>
\ No newline at end of file
packageEquity/pages/saleApply/saleApply.js
View file @
1fc672b
...
...
@@ -46,8 +46,7 @@ Page({
encoding
:
'base64'
,
//编码格式
success
(
_res
)
{
wx
.
p
.
wxApi
.
showLoading
(
'上传中...'
)
wx
.
p
.
api
.
common
.
uploadImg
({
wx
.
p
.
api
.
commonApi
.
uploadImg
({
file
:
`
${
type
}
@
${
_res
.
data
}
`
})
.
then
(
img
=>
{
...
...
packageMall/pages/detail/detail.js
View file @
1fc672b
...
...
@@ -235,7 +235,8 @@ Page({
})
},
async
join
(
e
)
{
wx
.
p
.
router
.
intercept
()
const
loginStatu
=
await
wx
.
p
.
router
.
intercept
()
if
(
loginStatu
)
return
let
params
=
e
&&
e
.
detail
if
(
!
params
)
{
params
=
{
...
...
@@ -263,11 +264,11 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
if
(
options
&&
options
.
id
)
{
this
.
setData
(
options
)
this
.
getGoodsDetail
(
options
.
id
)
if
(
!
options
.
isActivity
)
this
.
getGoodscouponList
(
options
.
id
)
}
if
(
options
&&
options
.
id
)
{
this
.
setData
(
options
)
this
.
getGoodsDetail
(
options
.
id
)
if
(
!
options
.
isActivity
)
this
.
getGoodscouponList
(
options
.
id
)
}
// 推荐人+推荐人埋点
if
(
options
.
shareStaffUuid
)
{
let
shareStaff
=
{
...
...
@@ -310,8 +311,8 @@ Page({
// wx.$Track.setTrack(trackobj, 6)
//设置分享
let
shareQuery
=
`id=
${
data
.
id
}
`
,
shareTitle
=
data
.
goodsName
,
shareImage
=
''
shareTitle
=
data
.
goodsName
,
shareImage
=
''
data
.
goodsDetailImageList
.
map
(
e
=>
{
if
(
e
.
resType
==
1
)
shareImage
=
e
.
content
})
...
...
@@ -446,7 +447,9 @@ Page({
})
})
},
getUserAddressList
()
{
async
getUserAddressList
()
{
const
res
=
await
wx
.
p
.
router
.
intercept
(
false
)
if
(
res
)
return
wx
.
p
.
api
.
mineApi
.
getUserAddressList
().
then
(
data
=>
{
if
(
!
data
.
length
)
{
this
.
setData
({
...
...
packageMall/pages/pay/pay.js
View file @
1fc672b
...
...
@@ -138,7 +138,7 @@ Page({
sum
:
sum
,
expressFee
,
goodsNumber
,
money
money
:
money
<
0
?
0
:
money
})
},
//获取最大优惠券
...
...
@@ -363,11 +363,11 @@ Page({
payParams
})
=>
{
wx
.
hideLoading
()
wx
.
$Track
.
setTrack
({
goodsList
},
7
)
//
wx.$Track.setTrack({
//
goodsList
//
},
//
7
//
)
if
(
needPay
)
{
let
params
=
{
nonceStr
:
payParams
.
nonceStr
,
...
...
packageMall/pages/shoppingCart/shoppingCart.js
View file @
1fc672b
...
...
@@ -171,12 +171,12 @@ Page({
}
wx
.
p
.
api
.
shopmallApi
.
delShoppingcart
(
para
).
then
(
res
=>
{
wx
.
p
.
wxApi
.
showToast
(
'删除成功'
)
wx
.
$Track
.
setTrack
({
id
,
type
:
'购物车移除商品'
},
7
)
//
wx.$Track.setTrack({
//
id,
//
type: '购物车移除商品'
//
},
//
7
//
)
setTimeout
(()
=>
{
this
.
getShoppingcartList
()
},
1.5
*
1000
)
...
...
packageMall/pages/shoppingCart/shoppingCart.scss
View file @
1fc672b
...
...
@@ -164,6 +164,15 @@
background
:
var
(
--
btnColor
);
border-radius
:
var
(
--
borderRadius
);
font-weight
:
500
;
padding
:
0
!
important
;
margin
:
0
!
important
;
font-size
:
28rpx
;
&
[
disabled
]
:not
([
type
])
{
background
:
#CCCED1
!
important
;
border-color
:
#CCCED1
!
important
;
color
:
#fff
!
important
;
box-shadow
:
none
;
}
}
.goods-action
.total
{
...
...
packageMall/pages/shoppingCart/shoppingCart.wxml
View file @
1fc672b
...
...
@@ -68,7 +68,7 @@
<text class="unit">¥</text>{{sum||0}}
</view>
</view>
<
view class="btn text-center" bindtap="checkOut">结算({{count||0}})</view
>
<
button class="btn text-center" bindtap="checkOut" disabled="{{count<1}}">结算({{count||0}})</button
>
</view>
</goods-action>
</block>
\ No newline at end of file
packageMine/pages/address/detail/detail.js
View file @
1fc672b
...
...
@@ -16,6 +16,7 @@ Page({
}
},
onLoad
:
function
(
options
)
{
console
.
log
(
options
,
'=========='
)
if
(
options
.
id
)
{
wx
.
setNavigationBarTitle
({
title
:
'编辑收货地址'
...
...
@@ -49,10 +50,6 @@ Page({
'userObj.areaId'
:
ad_info
.
adcode
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
},
/**获取当前位置 */
getLocation
()
{
let
{
currentAddress
}
=
this
.
data
...
...
packageMine/pages/coupon/usedDetail/usedDetail.js
View file @
1fc672b
...
...
@@ -18,7 +18,9 @@ Page({
let
url
=
'/packageMine/pages/order/detail/detail'
// if (orderStatus > 5 && orderStatus != 14 && orderStatus != 13&&orderStatus != 15) url = 'afterSaleDetail'
wx
.
p
.
router
.
go
(
url
,
item
)
wx
.
p
.
router
.
go
(
url
,
{
orderCode
:
item
})
// wx.navigateTo({
// url: '/packageMine/pages/order/detail/detail?orderCode=S2112081509592138'
// })
...
...
packageMine/pages/order/afterSaleDetail/afterSaleDetail.js
View file @
1fc672b
...
...
@@ -51,9 +51,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
wx
.
p
.
router
.
getData
(
orderCode
=>
{
this
.
getOrderRefundDetail
(
orderCode
)
})
this
.
getOrderRefundDetail
(
options
.
orderCode
)
},
getOrderRefundDetail
(
orderCode
)
{
wx
.
p
.
wxApi
.
showLoading
(
'加载中...'
)
...
...
packageMine/pages/order/afterSale_step_two/afterSale_step_two.js
View file @
1fc672b
...
...
@@ -81,8 +81,7 @@ Page({
encoding
:
'base64'
,
//编码格式
success
(
_res
)
{
wx
.
p
.
wxApi
.
showLoading
(
'上传中...'
)
commonApi
.
uploadImg
({
wx
.
p
.
api
.
commonApi
.
uploadImg
({
file
:
`
${
type
}
@
${
_res
.
data
}
`
})
.
then
(
img
=>
{
...
...
@@ -113,7 +112,7 @@ Page({
wx
.
p
.
wxApi
.
showToast
(
'申请成功!'
)
setTimeout
(()
=>
{
wx
.
p
.
router
.
back
(
prevPage
=>
{
prevPage
.
clearData
()
prevPage
.
clearData
&&
prevPage
.
clearData
()
},
2
)
},
1.5
*
1000
)
}
else
{
...
...
packageMine/pages/order/afterSale_step_two/afterSale_step_two.json
View file @
1fc672b
{
"navigationBarTitleText"
:
"申请售后"
"navigationBarTitleText"
:
"申请售后"
,
"usingComponents"
:
{
"gl-textarea"
:
"/components/GlTextarea/GlTextarea"
}
}
\ No newline at end of file
packageMine/pages/order/afterSale_step_two/afterSale_step_two.wxml
View file @
1fc672b
...
...
@@ -19,7 +19,7 @@
<block wx:if="{{imgUrls.length < 1}}">
<view class="one text-center" bindtap="upLoad">
<view class="icon">
<
image webp src="{{IMGURL}}mine/camera.png?v={{img_version}}"></
image>
<
glsx-image webp src="mine/camera.png"></glsx-
image>
</view>
</view>
</block>
...
...
@@ -29,7 +29,7 @@
<image webp src="{{item}}"></image>
<view class="del text-center" catchtap="del" data-index="{{index}}">
<view class="icon">
<
image webp src="{{IMGURL}}mine/del.png?v={{img_version}}"></
image>
<
glsx-image webp src="mine/del.png"></glsx-
image>
</view>
</view>
</view>
...
...
@@ -37,7 +37,7 @@
<block wx:if="{{imgUrls.length < 5}}">
<view class="upload-item item text-center" bindtap="upLoad">
<view class="icon">
<
image webp src="{{IMGURL}}mine/camera.png?v={{img_version}}"></
image>
<
glsx-image webp src="mine/camera.png"></glsx-
image>
</view>
</view>
</block>
...
...
packageMine/pages/order/detail/detail.js
View file @
1fc672b
import
QR
from
'~/utils/lib/wxqrcode'
import
{
orderMixin
}
from
'~/mixins/index'
import
{
iosTimeFormat
,
}
from
'~/utils/format'
import
{
wxqrcode
as
QR
}
from
"~/lib/index"
;
import
{
orderMixin
}
from
"~/mixins/index"
;
import
{
iosTimeFormat
}
from
"~/utils/format"
;
Page
({
behaviors
:
[
orderMixin
],
/**
...
...
@@ -12,124 +8,126 @@ Page({
*/
data
:
{
couponsList
:
[],
orderObj
:
[{
label
:
'下单日期'
,
key
:
'time'
orderObj
:
[
{
label
:
"下单日期"
,
key
:
"time"
,
},
{
label
:
'订单编号'
,
key
:
'orderCode'
label
:
"订单编号"
,
key
:
"orderCode"
,
},
{
label
:
'收货地址'
,
key
:
'shipAddress'
,
alignItems
:
'flex-start'
label
:
"收货地址"
,
key
:
"shipAddress"
,
alignItems
:
"flex-start"
,
},
{
label
:
'订单状态'
,
key
:
'orderStatus'
,
enum
:
true
}
label
:
"订单状态"
,
key
:
"orderStatus"
,
enum
:
true
,
}
,
],
deliveryStatus
:
{
1
:
'待发货'
,
2
:
'已发货'
,
3
:
'已收货'
}
},
onRoute
(
orderCode
)
{
if
(
Object
.
keys
(
orderCode
).
length
!==
0
)
{
console
.
log
(
orderCode
)
this
.
getOrderDetail
(
orderCode
)
}
1
:
"待发货"
,
2
:
"已发货"
,
3
:
"已收货"
,
},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
console
.
log
(
options
,
'======='
)
if
(
options
&&
options
.
orderCode
)
{
let
orderCode
=
options
.
orderCode
this
.
getOrderDetail
(
orderCode
)
let
orderCode
=
options
.
orderCode
;
this
.
getOrderDetail
(
orderCode
)
;
}
},
getOrderDetail
(
orderCode
)
{
let
{
orderObj
}
=
this
.
data
wx
.
p
.
wxApi
.
showLoading
(
'加载中...'
)
wx
.
p
.
api
.
shopmallApi
.
getOrderDetail
(
orderCode
).
then
(
data
=>
{
wx
.
hideLoading
()
console
.
log
(
data
)
data
.
time
=
new
Date
(
iosTimeFormat
(
data
.
createdDate
)).
format
(
'yyyy.MM.dd hh:mm:ss'
)
data
.
orderGoods
.
map
(
e
=>
{
e
.
retailPrice
=
Number
(
e
.
retailPrice
).
toFixed
(
2
)
if
(
e
.
activityPrice
)
e
.
activityPrice
=
Number
(
e
.
activityPrice
).
toFixed
(
2
)
})
data
.
orderPrice
=
Number
(
data
.
orderPrice
).
toFixed
(
2
)
data
.
expressFee
=
Number
(
data
.
expressFee
).
toFixed
(
2
)
data
.
payPrice
=
Number
(
data
.
payPrice
).
toFixed
(
2
)
let
{
orderObj
}
=
this
.
data
;
wx
.
p
.
wxApi
.
showLoading
(
"加载中..."
);
wx
.
p
.
api
.
shopmallApi
.
getOrderDetail
(
orderCode
).
then
((
data
)
=>
{
wx
.
hideLoading
();
console
.
log
(
data
);
data
.
time
=
new
Date
(
iosTimeFormat
(
data
.
createdDate
)).
format
(
"yyyy.MM.dd hh:mm:ss"
);
data
.
orderGoods
.
map
((
e
)
=>
{
e
.
retailPrice
=
Number
(
e
.
retailPrice
).
toFixed
(
2
);
if
(
e
.
activityPrice
)
e
.
activityPrice
=
Number
(
e
.
activityPrice
).
toFixed
(
2
);
});
data
.
orderPrice
=
Number
(
data
.
orderPrice
).
toFixed
(
2
);
data
.
expressFee
=
Number
(
data
.
expressFee
).
toFixed
(
2
);
data
.
payPrice
=
Number
(
data
.
payPrice
).
toFixed
(
2
);
if
(
data
.
orderSource
==
4
)
{
orderObj
[
2
]
=
{
label
:
'商户订单号'
,
key
:
'outTradeNo'
,
}
label
:
"商户订单号"
,
key
:
"outTradeNo"
,
}
;
}
this
.
setData
({
orderInfo
:
data
,
orderObj
})
if
(
data
.
deliveryType
==
1
&&
data
.
orderVerification
)
this
.
setQr
(
data
.
orderVerification
.
verificationCode
)
orderObj
,
});
if
(
data
.
deliveryType
==
1
&&
data
.
orderVerification
)
this
.
setQr
(
data
.
orderVerification
.
verificationCode
);
if
(
data
.
relatedUserCoupon
)
{
let
list
=
data
.
relatedUserCoupon
.
map
(
item
=>
{
item
.
receiveStartTime
=
new
Date
(
iosTimeFormat
(
item
.
receiveStartTime
)).
format
(
'yyyy.MM.dd'
)
let
list
=
data
.
relatedUserCoupon
.
map
((
item
)
=>
{
item
.
receiveStartTime
=
new
Date
(
iosTimeFormat
(
item
.
receiveStartTime
)
).
format
(
"yyyy.MM.dd"
);
if
(
item
.
effectiveType
==
1
)
{
item
.
receiveEndTime
=
new
Date
(
iosTimeFormat
(
item
.
receiveEndTime
)).
format
(
'yyyy.MM.dd hh:mm:ss'
)
item
.
receiveEndTime
=
new
Date
(
iosTimeFormat
(
item
.
receiveEndTime
)
).
format
(
"yyyy.MM.dd hh:mm:ss"
);
}
else
{
item
.
receiveEndTime
=
new
Date
(
iosTimeFormat
(
item
.
receiveEndTime
)).
format
(
'yyyy.MM.dd'
)
item
.
receiveEndTime
=
new
Date
(
iosTimeFormat
(
item
.
receiveEndTime
)
).
format
(
"yyyy.MM.dd"
);
}
return
item
})
return
item
;
})
;
this
.
setData
({
couponsList
:
list
})
couponsList
:
list
,
})
;
}
})
})
;
},
toDetail
()
{
let
[
temp
]
=
this
.
data
.
orderInfo
.
relatedUserCoupon
,
{
discountType
,
useChannel
,
id
}
=
temp
,
detailInfo
=
{
xx
:
'xx'
}
let
[
temp
]
=
this
.
data
.
orderInfo
.
relatedUserCoupon
,
{
discountType
,
useChannel
,
id
}
=
temp
,
detailInfo
=
{
xx
:
"xx"
,
};
if
(
discountType
==
2
||
discountType
==
4
)
{
wx
.
p
.
router
.
go
(
'/packageMall/pages/coupon/coupon'
,
{
wx
.
p
.
router
.
go
(
"/packageMall/pages/coupon/coupon"
,
{
userCouponId
:
id
,
useMemberType
:
this
.
data
.
useMemberType
,
detailInfo
})
return
detailInfo
,
})
;
return
;
}
/**线上商品代金券 */
if
(
discountType
==
3
&&
useChannel
==
1
)
{
if
(
this
.
data
.
useMemberType
==
1
)
{
wx
.
p
.
wxApi
.
showToast
(
'代金券已使用'
)
return
wx
.
p
.
wxApi
.
showToast
(
"代金券已使用"
);
return
;
}
wx
.
p
.
router
.
go
(
'/packageMine/pages/coupon/recommend/recommend'
,
{
couponInfo
:
temp
})
return
wx
.
p
.
router
.
go
(
"/packageMine/pages/coupon/recommend/recommend"
,
{
couponInfo
:
temp
,
})
;
return
;
}
wx
.
p
.
router
.
go
(
'/packageMine/pages/coupon/detail/detail'
,
{
item
:
temp
})
wx
.
p
.
router
.
go
(
"/packageMine/pages/coupon/detail/detail"
,
{
item
:
temp
,
})
;
},
setQr
(
data
)
{
this
.
setData
({
qr
:
QR
.
createQrCodeImg
(
`t=1&c=
${
data
}
`
)
})
qr
:
QR
.
createQrCodeImg
(
`t=1&c=
${
data
}
`
)
,
})
;
},
/**
* 生命周期函数--监听页面初次渲染完成
...
...
@@ -159,5 +157,5 @@ Page({
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{}
})
\ No newline at end of file
onReachBottom
:
function
()
{},
});
packageMine/pages/order/index/index.js
View file @
1fc672b
...
...
@@ -161,6 +161,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
console
.
log
(
options
,
'========='
)
this
.
setData
({
hasUserInfo
:
true
,
tabIndex
:
options
.
tabIndex
,
...
...
@@ -451,100 +452,5 @@ Page({
orderCode
,
type
:
2
,
})
},
/**平台商城跳转 */
async
jumpPlatformShop
(
e
)
{
let
{
item
,
url
}
=
e
.
currentTarget
.
dataset
if
(
item
.
afterSaleStatus
&&
url
==
'afterSaleDetail/index'
&&
item
.
afterSaleStatus
==
8
)
url
=
'applySale/index'
if
(
url
==
'applySale/index'
)
{
const
res
=
await
this
.
getReturnCount
(
item
)
if
(
!
res
.
applyQty
)
return
wx
.
p
.
wxApi
.
showToast
(
'该商品不支持售后'
)
item
.
applyQty
=
res
.
applyQty
}
wx
.
p
.
router
.
go
(
`/packageMall/pages/platformShop/
${
url
}
`
,
item
)
},
/**平台商城取消订单*/
cancelPlatformOrder
(
e
)
{
wx
.
showModal
({
title
:
'温馨提示'
,
content
:
'请问您是否要取消付款'
,
confirmText
:
'确定'
,
cancelText
:
'取消'
,
confirmColor
:
'#F13C3D'
,
}).
then
(
async
res
=>
{
if
(
res
.
confirm
)
{
wx
.
p
.
wxApi
.
showLoading
()
try
{
const
{
orderCode
}
=
e
.
currentTarget
.
dataset
,
{
code
,
message
}
=
await
wx
.
p
.
api
.
shopmallApi
.
cancelPlatformOrder
({
subOrderCode
:
orderCode
})
wx
.
hideLoading
()
if
(
code
==
0
)
{
wx
.
p
.
wxApi
.
showToast
(
'取消成功'
)
setTimeout
(()
=>
{
this
.
getOrderList
()
},
1.5e3
)
}
else
throw
message
}
catch
(
error
)
{
wx
.
p
.
wxApi
.
showToast
(
error
)
}
}
})
},
/**平台商城支付 */
toPayOrder
(
e
)
{
wx
.
p
.
wxApi
.
showLoading
()
const
{
orderCode
}
=
e
.
currentTarget
.
dataset
wx
.
p
.
api
.
shopmallApi
.
platformGoodsPayOrder
({
orderCode
,
paymentSource
:
1
}).
then
(
res
=>
{
wx
.
hideLoading
()
if
(
res
)
{
const
{
timeStamp
,
nonceStr
,
packages
,
signType
,
paySign
}
=
res
.
payParams
wx
.
requestPayment
({
timeStamp
:
timeStamp
,
nonceStr
:
nonceStr
,
package
:
packages
,
signType
:
signType
,
paySign
:
paySign
,
success
()
{
wx
.
p
.
router
.
go
(
'/packageMine/pages/order/complete/complete'
,
{
success
:
true
})
},
fail
(
res
)
{
if
(
res
.
errMsg
==
'requestPayment:fail cancel'
)
{
wx
.
p
.
wxApi
.
showToast
(
'取消支付'
)
}
}
})
}
})
},
/**获取可申请的售后数量 */
getReturnCount
(
orderInfo
)
{
const
PARAMS
=
{
subOrderCode
:
orderInfo
.
orderCode
,
goodsSkuCode
:
orderInfo
.
orderGoods
[
0
].
goodsSkuCode
}
return
wx
.
p
.
api
.
shopmallApi
.
platformApplyCount
(
PARAMS
)
},
}
})
\ No newline at end of file
packageMine/pages/setting/index.js
View file @
1fc672b
...
...
@@ -9,6 +9,7 @@ Page({
code
,
message
})
=>
{
wx
.
p
.
wxApi
.
showLoading
()
if
(
code
==
'0'
)
{
// wx.$Track.setTrack({}, 4)
wx
.
$authStatus
=
true
...
...
@@ -19,14 +20,18 @@ Page({
prevPage
.
setData
({
userInfo
:
null
,
isMember
:
false
,
vipInfo
:
null
,
orderNumberList
:
null
})
})
}
else
{
if
(
code
==
'21'
||
code
==
'20'
)
{
try
{
const
res
=
await
wx
.
p
.
api
.
userApi
.
login
()
if
(
res
.
code
==
0
)
this
.
logout
()
else
throw
res
.
message
if
(
res
.
code
==
0
)
{
wx
.
p
.
storage
.
set
(
'sessionId'
,
res
.
data
.
sessionId
)
this
.
logout
()
}
else
throw
res
.
message
}
catch
(
error
)
{
wx
.
p
.
wxApi
.
showToast
(
error
)
}
...
...
pages/Login/Login.js
View file @
1fc672b
...
...
@@ -35,8 +35,14 @@ Page({
async
onLoad
()
{
wx
.
p
.
wxApi
.
showLoading
()
const
{
data
data
,
code
}
=
await
wx
.
p
.
api
.
userApi
.
login
()
if
(
code
==
'0'
)
{
wx
.
p
.
storage
.
set
(
'userInfo'
,
data
)
wx
.
p
.
storage
.
set
(
'sessionId'
,
data
.
sessionId
)
wx
.
p
.
router
.
back
()
}
if
(
data
)
this
.
sessionId
=
data
.
sessionId
wx
.
hideLoading
()
},
...
...
@@ -159,7 +165,7 @@ Page({
wx
.
p
.
storage
.
set
(
'sessionId'
,
data
.
sessionId
)
// 返回上一页
wx
.
p
.
router
.
back
(
thisPage
=>
{
thisPage
.
setData
({
thisPage
&&
thisPage
.
setData
({
userInfo
:
data
})
})
...
...
pages/Login/Login.wxml
View file @
1fc672b
<view class="layout">
<view class="login-bg x-center">
<glsx-image src="login/login-bg.png"></glsx-image>
</view>
<navigation-bar navStyle="background:transparent;" custom page-title="登录">
<view class="nav-bar flex">
<view class="back flex" bindtap="back">
...
...
pages/Login/Login.wxss
View file @
1fc672b
/* pages/login/login.wxss */
page {
background-color: #000 !important;
page {}
.login-bg {
position: fixed;
z-index: -2;
width: 1350rpx;
height: 1664rpx;
top: -60rpx;
}
.layout::before{
position: fixed;
left: 0;
top: 0;
width: 100vw;
height: 600rpx;
background-image: linear-gradient(0deg, #0a030300 22%, #0A0303 100%);
z-index: -1;
content: '';
}
.layout::after {
position: fixed;
left: 0;
bottom: 0;
width: 100vw;
height: 400rpx;
transform: scaleY(-1);
background-image: linear-gradient(0deg, #0a030300 22%, #0A0303 90%);
z-index: -1;
content: '';
}
.nav-bar {
...
...
@@ -78,7 +107,6 @@ page {
border-color: #CCCED1 !important;
color: #fff !important;
box-shadow: none;
}
.wx-auth-button[disabled]:not([type])::after {
...
...
pages/loading/loading.js
View file @
1fc672b
...
...
@@ -12,8 +12,19 @@ Page({
* 生命周期函数--监听页面加载
*/
async
onLoad
(
options
)
{
console
.
log
(
options
,
'==='
)
this
.
tabList
=
__wxConfig
.
tabBar
.
list
wx
.
p
.
wxApi
.
showLoading
()
//scenc获取页面参数并跳转
if
(
options
.
scene
)
{
return
this
.
getSceneById
(
options
.
scene
)
}
if
(
options
.
url
)
{
return
this
.
login
(
options
)
}
},
async
login
(
options
)
{
if
(
options
.
merchantId
)
wx
.
$merchant_id
=
options
.
merchantId
try
{
const
{
code
,
...
...
@@ -34,10 +45,6 @@ Page({
wx
.
p
.
storage
.
rm
(
'sessionId'
)
}
console
.
log
(
data
,
'============='
)
//scenc获取页面参数并跳转
if
(
options
.
scene
)
{
return
this
.
getSceneById
(
options
.
scene
)
}
if
(
options
.
url
)
{
return
this
.
jumpPage
(
options
.
url
)
}
...
...
@@ -46,8 +53,8 @@ Page({
}
catch
(
error
)
{
console
.
log
(
error
)
wx
.
p
.
wxApi
.
showToast
(
String
(
error
))
wx
.
p
.
router
.
goHome
()
}
},
async
getSceneById
(
scene
)
{
const
id
=
decodeURIComponent
(
scene
).
split
(
'='
).
at
(
-
1
)
...
...
@@ -58,7 +65,7 @@ Page({
}
=
await
wx
.
p
.
api
.
wechatApi
.
getSceneById
({
id
})
if
(
code
==
0
)
this
.
jumpPage
(
data
.
scene
)
if
(
code
==
0
)
this
.
login
(
data
.
scene
)
else
throw
{}
}
catch
(
error
)
{
wx
.
p
.
wxApi
.
showToast
(
error
||
'获取scene失败'
)
...
...
pages/loading/loading.json
View file @
1fc672b
{
"usingComponents"
:
{}
"usingComponents"
:
{},
"navigationStyle"
:
"custom"
}
\ No newline at end of file
pages/tab/index/components/activity/activity.wxml
View file @
1fc672b
...
...
@@ -23,7 +23,7 @@
<image webp src="{{item.activityImg}}" lazy-load></image>
</view>
<view class="item-box-content">
<view class='item-box-title'><text>{{item.activityName}}</text></view>
<view class='item-box-title'><text
class="item-box-title-text"
>{{item.activityName}}</text></view>
<view class='item-box-time'>
<view class="text text-hide">{{item.viewAmount||0}}人查看|售出{{item.saleAmount || 0}}</view>
</view>
...
...
@@ -43,7 +43,7 @@
</view>
<view class="item-box-bubble">
<!-- 活动 -->
<view>
<view
class="item-box-bubble-view"
>
<text class="activity-text">秒杀价</text>
<view class="time-box">
<view class="time {{item.activityStatus == 1 ? 'start' : 'end'}} " wx:if="{{item.activityStatus != 3}}">
...
...
pages/tab/index/components/activity/activity.wxss
View file @
1fc672b
...
...
@@ -53,14 +53,14 @@
color: #0A0D14;
}
.item-box-title image {
.item-box-title
.item-box-title-
image {
flex: 0 0 48rpx;
height: 32rpx;
margin-right: 12rpx;
margin-top: 5rpx;
}
.item-box-title text {
.item-box-title
.item-box-title-
text {
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
...
...
@@ -106,7 +106,7 @@
margin-bottom: -6rpx;
}
.item-box-bubble>view {
.item-box-bubble>
.item-box-bubble-
view {
position: relative;
background: #FFF5F3;
height: 40rpx;
...
...
@@ -119,7 +119,7 @@
display: flex;
}
.item-box-bubble>view::after {
.item-box-bubble>
.item-box-bubble-
view::after {
content: '';
position: absolute;
width: 0;
...
...
pages/tab/index/components/customer/customer.wxml
View file @
1fc672b
...
...
@@ -3,17 +3,17 @@
<view class="bgkf">
<glsx-image webp src="home/home-kf-bg.png"></glsx-image>
<view class="close-icon" bindtap="showFlex">
<glsx-image webp src="home/kf-close.png"></glsx-image>
<glsx-image
class="image-close"
webp src="home/kf-close.png"></glsx-image>
</view>
<view class="qr-box">
<view class="userinfo-wrap">
<view class="icon">
<image wx:if="{{customerlist[0].thumbAvatar}}" webp src="{{customerlist[0].thumbAvatar}}"></image>
<glsx-image wx:else webp src="home/kf-persion-icon.png"></glsx-image>
<image
class="image-icon"
wx:if="{{customerlist[0].thumbAvatar}}" webp src="{{customerlist[0].thumbAvatar}}"></image>
<glsx-image
class="image-icon"
wx:else webp src="home/kf-persion-icon.png"></glsx-image>
</view>
<view class="name">{{customerlist[0].staffName || ''}}</view>
<view class="mobile" wx:if="{{customerlist[0].staffPhone}}">
<glsx-image webp src="home/kf-mobile.png"></glsx-image>
<glsx-image
class="image-mobile"
webp src="home/kf-mobile.png"></glsx-image>
<text>{{customerlist[0].staffPhone}}</text>
</view>
<view class="qr-icon">
...
...
@@ -26,8 +26,8 @@
</view>
</view>
<view class="kf-text">
<view class="text-left
"><glsx-image
webp src="home/home-Kf-down.png"></glsx-image><text>保存图片\n到相册</text></view>
<view
><glsx-image webp
src="home/home-Kf-phone.png"></glsx-image><text>打开微信扫一扫添加客服企微</text></view>
<view class="text-left
kf-text-view" ><glsx-image class="kf-image"
webp src="home/home-Kf-down.png"></glsx-image><text>保存图片\n到相册</text></view>
<view
class="kf-text-view"><glsx-image webp class="kf-image"
src="home/home-Kf-phone.png"></glsx-image><text>打开微信扫一扫添加客服企微</text></view>
</view>
<view class="save-btn">
<view class="btn text-center" bindtap="saveClick">
...
...
pages/tab/index/components/customer/customer.wxss
View file @
1fc672b
...
...
@@ -16,7 +16,7 @@
right: 16rpx;
top: -68rpx;
}
.close-icon
imag
e{
.close-icon
.image-clos
e{
width:48rpx;
height:48rpx;
}
...
...
@@ -54,7 +54,7 @@
top: -28rpx;
}
.model .bgkf .icon
image
{
.model .bgkf .icon
.image-icon
{
border-radius: 50%;
}
...
...
@@ -91,7 +91,7 @@
margin-bottom: 20rpx;
}
.qr-box .mobile
imag
e{
.qr-box .mobile
.image-mobil
e{
width: 24rpx;
height: 26rpx;
}
...
...
@@ -124,7 +124,7 @@
padding: 0 40rpx;
box-sizing: border-box;
}
.kf-text view{
.kf-text
.kf-text-
view{
flex: 1;
display: flex;
align-items: center;
...
...
@@ -134,7 +134,7 @@
margin-left: 20rpx;
color: #B1B1B3;
}
.kf-text image{
.kf-text
.kf-
image{
flex-shrink: 0;
width: 60rpx;
height: 60rpx;
...
...
pages/tab/index/components/good-tab/good-tab.wxml
View file @
1fc672b
...
...
@@ -4,7 +4,7 @@
<view class="tab {{index==count?'active':''}}" bindtap="click" data-count="{{index}}" id="to-{{index}}">
<view class="text">{{item}}</view>
<view class="line">
<glsx-image src="home/tab-line.png"></glsx-image>
<glsx-image
class="line-image"
src="home/tab-line.png"></glsx-image>
</view>
</view>
</block>
...
...
pages/tab/index/components/good-tab/good-tab.wxss
View file @
1fc672b
...
...
@@ -56,7 +56,7 @@
transition: all .25s;
}
.tab .line image {
.tab .line
.line-
image {
width: 40rpx;
height: 16rpx;
}
...
...
pages/tab/index/components/goods/goods.wxml
View file @
1fc672b
...
...
@@ -23,8 +23,8 @@
</view>
<view class="item-box-content">
<view class='item-box-title'>
<image wx:if="{{item.goods.isMemberGoods}}" webp src="{{item.IMGURL}}index/member-goods-icon.png" />
<text>{{item.goods.goodsName}}</text>
<image
class="item-box-title-image"
wx:if="{{item.goods.isMemberGoods}}" webp src="{{item.IMGURL}}index/member-goods-icon.png" />
<text
class="item-box-title-text"
>{{item.goods.goodsName}}</text>
</view>
<view class='item-box-time'>
<view class="text text-hide">
...
...
@@ -45,8 +45,8 @@
</view>
<view class="item-box-bubble">
<!-- 会员商品 -->
<view wx:if="{{item.goods.isMemberGoods}}" class="text">
<text>会员价</text>
<view wx:if="{{item.goods.isMemberGoods}}" class="text
item-box-bubble-view
">
<text
class="item-box-bubble-text"
>会员价</text>
开通会员权益立享
</view>
</view>
...
...
pages/tab/index/components/goods/goods.wxss
View file @
1fc672b
...
...
@@ -49,14 +49,14 @@
color: #0A0D14;
}
.item-box-title image{
.item-box-title
.item-box-title-
image{
flex: 0 0 48rpx;
height: 32rpx;
margin-right: 12rpx;
margin-top: 5rpx;
}
.item-box-title text{
.item-box-title
.item-box-title-
text{
font-size: 28rpx;
text-overflow: ellipsis;
overflow: hidden;
...
...
@@ -103,7 +103,7 @@
margin-bottom: -10rpx;
}
.item-box-bubble view{
.item-box-bubble
.item-box-bubble-
view{
position: relative;
background: #FFF5F3;
height: 40rpx;
...
...
@@ -114,7 +114,7 @@
font-size: 20rpx;
color: #FF6038;
}
.item-box-bubble view::after {
.item-box-bubble
.item-box-bubble-
view::after {
content: '';
position: absolute;
width: 0;
...
...
@@ -126,7 +126,7 @@
border-bottom: 16rpx solid #FFF5F3;
}
.item-box-bubble text{
.item-box-bubble
.item-box-bubble-
text{
margin-right: 16rpx;
}
...
...
pages/tab/index/components/store-equity/store-equity.wxml
View file @
1fc672b
...
...
@@ -16,7 +16,7 @@
<glsx-image class="equity-icon" src="home/vip-icon.png"></glsx-image>
<text class="text">生活权益|专享超百种生活权益</text>
<block wx:if="{{!memberInfo.equityName}}">
<view class="equity-btn" bindtap="toBuyMember">立即开通</view>
<view class="
content-view
equity-btn" bindtap="toBuyMember">立即开通</view>
</block>
</view>
</view>
...
...
pages/tab/index/components/store-equity/store-equity.wxss
View file @
1fc672b
...
...
@@ -63,7 +63,7 @@
align-items: center;
}
.equity-box .content view {
.equity-box .content
.content-
view {
height: 100%;
display: flex;
align-items: center;
...
...
pages/tab/index/index.scss
View file @
1fc672b
...
...
@@ -38,7 +38,6 @@ page {
.layout
{
padding-bottom
:
200rpx
;
position
:
relative
;
padding-top
:
16rpx
;
background
:
transparent
;
...
...
pages/tab/index/index.wxml
View file @
1fc672b
<navigation-bar page-title="首页" custom bindnavbarReady="navbarReady" navStyle="background-color:
transparent
;">
<navigation-bar page-title="首页" custom bindnavbarReady="navbarReady" navStyle="background-color:
#F9F7F7
;">
<view class="home-top flex">
海马刀
<view class="widget-box" bindtap="openKF">
...
...
@@ -57,7 +57,7 @@
<view class="btn text-center" bindtap="jump" data-url="activity.index">
查看更多
<view class="icon">
<
image webp src="{{IMGURL}}index/more.png"></
image>
<
glsx-image webp src="home/more.png"></glsx-
image>
</view>
</view>
</block>
...
...
@@ -66,7 +66,7 @@
<block wx:else>
<view class="nothing flex">
<view class="icon">
<
image webp src="{{IMGURL}}index/index-activity-nothing.png"></
image>
<
glsx-image webp src="home/index-activity-nothing.png"></glsx-
image>
</view>
暂无优惠活动,敬请期待
</view>
...
...
pages/tab/mine/index.js
View file @
1fc672b
...
...
@@ -22,13 +22,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
let
{
userInfo
}
=
this
.
data
if
(
userInfo
)
{
this
.
getOrderNumberList
()
this
.
getMemberCardData
()
}
this
.
getMemberCardData
()
},
navbarReady
(
e
)
{
let
{
...
...
@@ -66,17 +60,25 @@ Page({
})
}
else
{
wx
.
p
.
api
.
equityApi
.
checkOpenMember
().
then
(
res
=>
{
let
flag
=
false
console
.
log
(
res
,
'----------'
)
res
.
data
=
{
}
let
flag
=
false
,
identity
=
0
// 普通会员3 银卡2 金卡1 非会员 0
if
(
res
.
data
&&
res
.
data
.
validitDate
)
{
res
.
data
.
time
=
new
Date
(
res
.
data
.
validitDate
).
format
(
'yyyy.MM.dd'
)
}
if
(
res
.
code
==
0
&&
res
.
data
)
{
flag
=
true
identity
=
3
if
(
res
.
data
&&
res
.
data
.
cardTypeSpecial
)
identity
=
res
.
data
.
cardTypeSpecial
}
wx
.
p
.
storage
.
set
(
'isVIP'
,
flag
)
this
.
setData
({
isMember
:
flag
,
vipInfo
:
res
.
data
vipInfo
:
res
.
data
,
identity
})
})
}
...
...
@@ -86,7 +88,9 @@ Page({
},
// 获取门店会员卡信息
getMemberCardData
()
{
const
{
merchantId
}
=
wx
.
p
.
storage
.
get
(
'merchant_info'
)
const
{
merchantId
}
=
wx
.
p
.
storage
.
get
(
'merchant_info'
)
let
para
=
{
merchantId
}
...
...
@@ -96,7 +100,7 @@ Page({
})
})
},
goInterests
(){
goInterests
()
{
wx
.
p
.
router
.
switchTab
(
'/pages/tab/equity/index'
)
},
// 开通会员页面
...
...
@@ -114,7 +118,13 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow
()
{
this
.
toCheckMember
()
let
{
userInfo
}
=
this
.
data
if
(
userInfo
&&
userInfo
.
phone
)
{
this
.
getOrderNumberList
()
this
.
toCheckMember
()
}
},
/**
...
...
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