Commit 065dc74b by 谢中龙

修改订单相关

parent d167bd8b
......@@ -91,8 +91,8 @@ App({
const { member } = baseUserInfo
const curMemberTrial = member && member.trial || false
wx.setStorageSync('isExperiencer', curMemberTrial)
if (options.referrerInfo && options.referrerInfo.extraData!=null){
// console.log('调用微信开卡组件回调参数---', options)
if (options.referrerInfo && options.referrerInfo.extraData != null && options.referrerInfo.extraData != undefined){
const { activate_ticket, card_id, code, errCode, wx_activate_after_submit_url } = options.referrerInfo.extraData
let urlData = wx_activate_after_submit_url.split("?");
let url = urlData[0];
......
......@@ -179,6 +179,22 @@ Component({
}
}
if (this.data.skuStock == 0){
wx.showToast({
title: '您所选择的商品规格库存不足,请选择其他规格',
icon : 'none'
})
return ;
}
if (this.data.skuStock < this.data.proNum){
wx.showToast({
title: '您所选择的商品规格库存不足,请选择其他规格',
icon: 'none'
})
return;
}
this.triggerEvent('skuselect', {
skuId: this.data.skuId,
count: this.data.proNum,
......
......@@ -62,7 +62,7 @@ const needMock = '' //
* appId = wxf7bc302c51166dc0 //小程序 appId
* tunnel-token = //token 杨辰提供
* brandId= 2007 //商户Id
* contactUspluginId = 联系我插件id
* contactUspluginId = 64bf88d82b3f0d506bd00ed90d5706f1 联系我插件id
*/
......
......@@ -29,10 +29,13 @@ wxService.page({
this.handleGoActivateCard(this.options)
},
handleGoActivateCard(options={}) {
if(!options) {
console.log('options------------', options)
if (Object.keys(options).length == 0){
this.goUserCenter()
return false
}
options.activate_ticket = decodeURIComponent(options.activate_ticket)
// 解析 url 参数 {}
const parmasSubmitUrl = utils.parseUrl(options.wx_activate_after_submit_url)
......
......@@ -253,7 +253,10 @@ wxService.page({
title: `修改成功`,
icon: 'none'
})
wxService.router(`/pages/myAddress/myAddress`)
wx.navigateBack({
delta : 1
})
}
}).finally(() => {
wx.hideLoading()
......@@ -267,7 +270,9 @@ wxService.page({
title: `保存成功`,
icon: 'none'
})
wxService.router(`/pages/myAddress/myAddress`)
wx.navigateBack({
delta: 1
})
}
}).finally(() => {
wx.hideLoading()
......
......@@ -47,47 +47,21 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
console.log('dddd', app.globalData.isPlusVip)
let pages = getCurrentPages();
let currPage = pages[pages.length - 1];
const { trolleySku2Buy } = this.options
const { trolleySku2Buy } = this.options;
let tradeDto = {
trolleySku2Buy: JSON.parse(trolleySku2Buy)
}
// 下单 && 计算优惠价
this.setData({
trolleySku2Buy: tradeDto.trolleySku2Buy
}, () => {
this.initCitys()
// 地址列表
this.getAddressList()
const { trolleySku2Buy, checkByPremium, addressId, addressInfo } = this.data
let params = {
checkByPremium,
trolleySku2Buy,
addressId: addressId ? addressId : addressInfo.id // 微信地址 or 地址id
}
this.calPreferentialPrice(params) // 计算优惠价
// if (!this.data.wxAddress){
// this.getAddressList()
// }
})
// this.initCitys()
// // 地址列表
// this.getAddressList()
// // if (!this.data.wxAddress){
// // this.getAddressList()
// // }
});
},
// select 传过来
updateCoupon(e) {
......@@ -106,8 +80,7 @@ wxService.page({
const { orderPrice } = this.data
// couponId---id couponSettingId --sid
let finCouponId = id ? id : sid
let finCouponName = id ? 'couponId' : 'couponSettingId'
console.log('sele', finCouponName, finCouponId)
let finCouponName = id ? 'couponId' : 'couponSettingId';
if (type == 1) {
this.setData({
defalutCoupon: true,
......@@ -179,6 +152,7 @@ console.log('sele', finCouponName, finCouponId)
})
return false;
}
const { memberId } = wx.getStorageSync('_baseUserInfo')
this.setData({
params: {
......@@ -191,10 +165,11 @@ console.log('sele', finCouponName, finCouponId)
address: e.detail.value.address,
type: this.data.isSelect ? 1 : 0
}
})
});
wx.showLoading({
title: '加载中'
})
});
wxService.post(`/member/addressManage/save`, this.data.params).then(res => {
const { result } = res.data
......@@ -203,7 +178,14 @@ console.log('sele', finCouponName, finCouponId)
wx.showToast({
title: `保存成功`,
icon: 'none'
})
});
this.data.addressId = res.data.data;
this.setData({
addressId: this.data.addressId
});
// 调起支付
this.handelGobuy()
}
......@@ -300,7 +282,6 @@ console.log('sele', finCouponName, finCouponId)
isSelect: !this.data.isSelect
}, () => {
const { isSelect } = this.data
console.log('isSelect', isSelect)
this.setData({
checkByPremium: isSelect,
defalutCoupon: 0,
......@@ -345,11 +326,10 @@ console.log('sele', finCouponName, finCouponId)
},
// 默认地址
selectAddress() {
wxService.router('/pages/myAddress/myAddress')
wxService.router('/pages/myAddress/myAddress?isFrom=order')
},
// 计算优惠价
calPreferentialPrice(params) {
console.log('params', params)
wx.showLoading({
title: '加载中'
})
......@@ -381,9 +361,18 @@ console.log('sele', finCouponName, finCouponId)
// id / couponSettingId
this.setData({
currentOrderList: data,
defalutCoupon: data && data.couponDiscountPreviews.length && data.couponDiscountPreviews[0].couponSettingDTO.type == 1 ? data && data.couponDiscountPreviews.length && data.couponDiscountPreviews[0].couponSettingDTO.faceAmount / 100 : data && data.couponDiscountPreviews.length && data.couponDiscountPreviews[0] && data.couponDiscountPreviews[0].couponDiscount,
defalutCouponId: data && data.couponDiscountPreviews.length && data.couponDiscountPreviews[0] && data.couponDiscountPreviews[0].couponDTOS[0] && data.couponDiscountPreviews[0].couponDTOS[0].id || '',
couponSettingId: data && data.couponDiscountPreviews.length && data.couponDiscountPreviews[0] && data.couponDiscountPreviews[0].couponDTOS[0] && data.couponDiscountPreviews[0].couponDTOS[0].couponSettingId || '',
defalutCoupon: data && data.couponDiscountPreviews.length &&
data.couponDiscountPreviews[0].couponSettingDTO.type == 1 ?
data && data.couponDiscountPreviews.length &&
data.couponDiscountPreviews[0].couponSettingDTO.faceAmount / 100 : data &&
data.couponDiscountPreviews.length && data.couponDiscountPreviews[0] &&
data.couponDiscountPreviews[0].couponDiscount,
defalutCouponId: data && data.couponDiscountPreviews.length &&
data.couponDiscountPreviews[0] && data.couponDiscountPreviews[0].couponDTOS[0] &&
data.couponDiscountPreviews[0].couponDTOS[0].id || '',
couponSettingId: data && data.couponDiscountPreviews.length &&
data.couponDiscountPreviews[0] && data.couponDiscountPreviews[0].couponDTOS[0] &&
data.couponDiscountPreviews[0].couponDTOS[0].couponSettingId || '',
orderInitPrice: data.amount
}, () => {
// 实付款
......@@ -395,8 +384,16 @@ console.log('sele', finCouponName, finCouponId)
},
handelGobuy() {
// 第一项 defalutCouponId couponId/
const { isSelect, defalutCoupon,trolleySku2Buy, couponId, couponSettingId, addressId, addressInfo, defalutCouponId } = this.data
// let NoPlusCouponId = couponId ? couponId : defalutCouponId // couponId / 第一项 id
const {
isSelect,
defalutCoupon,
trolleySku2Buy,
couponId,
couponSettingId,
addressId,
addressInfo,
defalutCouponId
} = this.data;
let finCouponName,finCouponId
if(!defalutCoupon) {
......@@ -422,7 +419,16 @@ console.log('sele', finCouponName, finCouponId)
trolleySku2Buy,
addressId: addressId ? addressId : addressInfo.id // 微信地址 or 地址id
}
console.log('params', params)
//判断addressId是不是有
if (!params.addressId){
wx.showToast({
title: '请添加地址或选择地址',
icon : 'none'
})
return ;
}
this.getBill(params) // 下单
},
// 下单
......@@ -437,18 +443,21 @@ console.log('sele', finCouponName, finCouponId)
const { result, data } = res.data
if (result == 0) {
delete data.appId
console.log('dddd', data.amount)
let amount = data.amount || 0
wx.requestPayment(Object.assign({
success(res) {
wx.hideLoading()
// 支付成功页面
wxService.router(`/subPackage/page/pages/paymentStatus/paymentStatus?status=S&amount=${amount}`)
wx.redirectTo({
url: `/subPackage/page/pages/paymentStatus/paymentStatus?status=S&amount=${amount}`,
});
},
fail(res) {
wx.hideLoading()
// wxService.router(`/subPackage/page/pages/paymentStatus/paymentStatus?status=F`)
wxService.router(`/pages/order/order`)
wx.redirectTo({
url: '/pages/order/order',
});
// wxService.router(`/pages/orderDetail/orderDetail?id=${id}`)
}
}, data.wxParams))
......@@ -466,17 +475,45 @@ console.log('sele', finCouponName, finCouponId)
const { result, data } = res.data
if (result == 0) {
if (!data.length) {
wx.removeStorageSync('_defalutAddress');
this.data.addressId = '';
this.data.addressInfo = null;
this.setData({
goodsAddress: true
})
} else {
});
const { trolleySku2Buy, checkByPremium, addressId, addressInfo } = this.data
let params = {
checkByPremium,
trolleySku2Buy,
}
this.calPreferentialPrice(params) // 计算优惠价
}
else {
// 缓存有没有地址
let hasDefalut = wx.getStorageSync('_defalutAddress')
let _defalutAddress = null
if (hasDefalut) {
//有默认地址 但是需要判断当前缓存的默认地址在地址列表中还是否存在 如果不存在则删除 存在则使用
if (hasDefalut){
let id = hasDefalut.id;
let filterArr = data.filter(item => item.id == id);
if(filterArr.length > 0){
_defalutAddress = hasDefalut
} else {
}
else{
//移除地址
wx.removeStorageSync('_defalutAddress');
this.setData({
goodsAddress: true
});
const { trolleySku2Buy, checkByPremium} = this.data;
let params = {
checkByPremium,
trolleySku2Buy,
}
this.calPreferentialPrice(params)
}
}
else{
data.forEach(item => {
item.fullArea = item.province + ' ' + item.city + ' ' + item.district
if (item.type == 1) {
......@@ -485,8 +522,10 @@ console.log('sele', finCouponName, finCouponId)
})
}
this.data.addressId = _defalutAddress ? _defalutAddress.id : '';
this.setData({
addressInfo: _defalutAddress
addressInfo: _defalutAddress,
addressId: this.data.addressId
}, () => {
// preview
const { trolleySku2Buy, checkByPremium, addressId, addressInfo } = this.data
......@@ -495,6 +534,7 @@ console.log('sele', finCouponName, finCouponId)
trolleySku2Buy,
addressId: addressId ? addressId : addressInfo.id // 微信地址 or 地址id
}
this.calPreferentialPrice(params) // 计算优惠价
})
}
......@@ -554,6 +594,4 @@ console.log('sele', finCouponName, finCouponId)
showSelectCoupon: true
})
}
})
\ No newline at end of file
......@@ -166,7 +166,11 @@
<text class="cost-label">实付款:</text>
<text class="cost-price">¥{{utils.numberFormat(orderPrice)}}</text>
</view>
<view class="theme-color buy-btn">
<view class="theme-color buy-btn positionRe">
<!-- <button wx:if="{{!currentHasUserInfo}}"
bindgetuserinfo="_getUserInfo"
open-type='getUserInfo'
class='positionAbs' ></button> -->
<button form-type="submit" style="display: inline;" class="theme-color buy-btn">立即购买</button>
</view>
</view>
......
......@@ -15,15 +15,19 @@ wxService.page({
addressList:[],
startX: '',
delBtnWidth: 132,//删除按钮宽度单位(rpx)
isFrom : ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.data.isFrom = options.isFrom;
wx.hideShareMenu()
},
//处理设为默认按钮
handelCheckShopAddress(e) {
if (this.data.isFrom == 'order'){
const index = e.currentTarget.dataset.index
const item = this.data.addressList[index]
item.fullArea = item.province + ' ' + item.city + ' ' + item.district
......@@ -32,11 +36,11 @@ wxService.page({
let beforePage = pages[pages.length - 2];
beforePage.setData({
wxAddress: false
})
console.log('beforePage+++++++', beforePage)
});
setTimeout(() => {
wxService.router().back()
}, 300)
}
},
/**
......@@ -64,7 +68,6 @@ wxService.page({
})
},
//获取微信地址
chooseWxAddress() {
wx.chooseAddress({
......@@ -90,7 +93,6 @@ wxService.page({
//设置默认地址
settingDefalutAddress(e){
const { memberId } = wx.getStorageSync('_baseUserInfo')
console.log(e)
let params = {
userId: memberId,
id: e.currentTarget.dataset.id
......
......@@ -154,7 +154,9 @@
report-submit
name='nav'
>
<button disabled="{{productInfo.productStatus != 2}}" class="buy-button get-formId--btn {{productInfo.productStatus != 2 ? 'btn-default' : 'btn-buy'}}" formType="submit">立即购买</button>
<button disabled="{{productInfo.productStatus != 2}}"
class="buy-button get-formId--btn {{productInfo.productStatus != 2 ? 'btn-default' : 'btn-buy'}}"
formType="submit">立即购买</button>
</form>
</block>
......
......@@ -13,6 +13,44 @@ export default class InviteFriends {
posterImgHeight = windowHeight - 200;
}
}
// explain = ['妍希送你很多豪礼的静安寺到就看', '很好三等奖啊可是很好三等奖啊可是','数据库大吉点击奥斯卡数据库大吉点击奥斯卡'];
let textOneBottom = '', textTwoBottom = '' , textThreeBottom = '';
if(explain.length == 1){
textOneBottom = '80rpx';
if (explain[0].length > 11){
explain[0] = explain[0].substr(0,10) + '..';
}
}
else if (explain.length == 2){
textOneBottom = '100rpx';
textTwoBottom = '70rpx';
if (explain[0].length > 11) {
explain[0] = explain[0].substr(0, 9) + '..';
}
if (explain[1].length > 15) {
explain[1] = explain[1].substr(0, 14) + '..';
}
}
else if (explain.length == 3){
textOneBottom = '108rpx';
textTwoBottom = '78rpx';
textThreeBottom = '50rpx';
if (explain[0].length > 11) {
explain[0] = explain[0].substr(0, 9) + '..';
}
if (explain[1].length > 15) {
explain[1] = explain[1].substr(0, 14) + '..';
}
if (explain[2].length > 15) {
explain[2] = explain[2].substr(0, 14) + '..';
}
}
return ({
width: '750rpx',
height: windowHeight - 100 + 'px',
......@@ -30,44 +68,43 @@ export default class InviteFriends {
type: 'image',
url: qrcodeImg,
css: {
width: '100rpx',
height: '100rpx',
width: '140rpx',
height: '140rpx',
right: '28rpx',
bottom: '43rpx',
bottom: '33rpx',
}
},
{
type: 'image',
url: avatarUrl,
css: {
width: '50rpx',
height: '50rpx',
left: '23rpx',
bottom: '43rpx',
borderRadius: '25rpx'
width: '80rpx',
height: '80rpx',
left: '28rpx',
bottom: '53rpx',
borderRadius: '40rpx'
}
},
{
type: 'text',
text: userName + explain[0],
css: {
width: '180rpx',
left: '82rpx',
bottom: '83rpx',
fontSize: '18rpx',
color: '#333333'
width: '320rpx',
left: '120rpx',
bottom: textOneBottom,
fontSize: '28rpx',
color: '#000000'
},
},
{
type: 'text',
text: explain[1],
css: {
width: '180rpx',
left: '82rpx',
bottom: '63rpx',
width: '320rpx',
left: '120rpx',
bottom: textTwoBottom,
fontSize: '18rpx',
color: '#333333'
color: '#666666'
},
},
......@@ -75,11 +112,11 @@ export default class InviteFriends {
type: 'text',
text: explain[2],
css: {
width: '180rpx',
left: '82rpx',
bottom: '43rpx',
width: '320rpx',
left: '120rpx',
bottom: textThreeBottom,
fontSize: '18rpx',
color: '#333333'
color: '#666666'
},
},
......
......@@ -39,7 +39,7 @@
"list": []
},
"miniprogram": {
"current": -1,
"current": 32,
"list": [
{
"id": -1,
......@@ -253,8 +253,8 @@
"scene": null
},
{
"id": -1,
"name": "分享",
"id": 32,
"name": "邀请好友编辑海报页面",
"pathName": "subPackage/page/pages/share/share",
"query": "",
"scene": null
......
......@@ -40,7 +40,6 @@ wxService.page({
this.getMiniCode()
this.getShareImg()
wx.hideShareMenu();
},
//轮播图的切换事件
......@@ -105,6 +104,11 @@ wxService.page({
this.setData({
posterImgData: initiatorPage,
explain: explain
},() => {
if (this.data.posterImgData.length > 0){
this.data.currentPosterImg = this.data.posterImgData[0];
this.generatePoster();
}
})
}
}
......@@ -113,12 +117,23 @@ wxService.page({
//获取二维码
getMiniCode() {
this.saveTentacleContent().then(res => {
if(res){
let tentacleId = res.id;
let inner_tentacleId = Integer.digit(tentacleId, 10, 64);
this.getPageQrcode(inner_tentacleId)
}
});
},
//获取界面二维码
getPageQrcode(t){
const urls = utils.getCurrentPageUrlWithArgs()
let _this = this;
let data = {
"autoColor": true,
"page": 'pages/userCenter/userCenter',
"scene": 'type=-1',
"scene": 'type=-1&t=' + t,
"width": 100
}
wxService.post(`/marketing/quickMark/getAppQrCodePicture`, data).then(res => {
......@@ -127,39 +142,15 @@ wxService.page({
this.setData({
codeImg: app.globalData.imageUrl + data
// codeImg: "https://hwimagecdn.ihotwind.cn/usr/201908/miniQrCode-f00c5051fef7479395efb193431762c4.jpg"
},()=>{
const { member } = wx.getStorageSync('_baseUserInfo')
const { avatarUrl } = wx.getStorageSync('_userInfo')
wx.getSystemInfo({
success: function (system) {
wx.getImageInfo({
src: _this.data.posterImgData[0],
success: function (res) {
let posterImgWidth = res.width,
posterImgHeight = res.height;
_this.setData({
template: new Card().palette(_this.data.posterImgData[0],
_this.data.codeImg,
member.memberWeixin.nickname,
avatarUrl,
{
posterImgWidth: posterImgWidth,
posterImgHeight: posterImgHeight,
windowWidth: system.windowWidth,
windowHeight: system.windowHeight
}, _this.data.explain),
});
}
})
}
})
}, () => {
_this.generatePoster();
})
}
})
},
// 保存海报
savePoster(){
//生成触点对象信息
saveTentacleContent(){
let tentacleInfo = {
content: "我的邀请页面",
contentType: app.globalData.contants.SHARE_TYPE.INVITE_FRIENDS, //内容类型
......@@ -167,22 +158,37 @@ wxService.page({
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.id) {
return wxService.getTentacleContent(tentacleInfo);
},
// 保存海报
savePoster(){
// let tentacleInfo = {
// content: "我的邀请页面",
// contentType: app.globalData.contants.SHARE_TYPE.INVITE_FRIENDS, //内容类型
// title: '我的邀请', //标题
// type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
// }
// wxService.getTentacleContent(tentacleInfo).then(res => {
// if (res && res.id) {
// }
// })
wx.saveImageToPhotosAlbum({
filePath: this.imagePath,
success(res) {
setTimeout(()=>{
setTimeout(() => {
wx.showToast({
title: '保存成功,请前往相册查看~',
icon: 'none'
},2000)
}, 2000)
})
},
fail(err){
fail(err) {
console.log(err)
let txt = '保存失敗';
if (err.errMsg == 'saveImageToPhotosAlbum:fail auth deny'){
if (err.errMsg == 'saveImageToPhotosAlbum:fail auth deny') {
txt = '获取相册授权失败'
}
setTimeout(() => {
......@@ -193,8 +199,6 @@ wxService.page({
})
}
});
}
})
},
onImgOK(e) {
this.setData({
......
......@@ -37,17 +37,13 @@
wx:for="{{posterImgData}}"
wx:for-index="idx"
wx:for-item="navItem"
wx:key="idx"
>
wx:key="idx">
<view
class="scroll-view-item {{currentTab == idx ?'poster-active':''}}"
data-current="{{idx}}"
data-img="{{navItem}}"
bindtap="switchPoster"
>
<image class="poster-img" src="{{navItem}}"></image>
bindtap="switchPoster">
<image class="poster-img" src="{{navItem}}" mode='aspectFit'></image>
<view class="select-plus" wx:if="{{idx == currentTab}}">
<view class="circle-radio theme-color">
<image class="tick-success" src="/assets/imgs/7_1_0/tick-success.png" mode="widthFix"></image>
......
......@@ -39,9 +39,9 @@ swiper-item{
}
.code-img{
position: absolute;
width: 100rpx;
height: 100rpx;
bottom: 43rpx;
width: 120rpx;
height: 120rpx;
bottom: 23rpx;
right: 24rpx;
}
.active{
......@@ -90,23 +90,27 @@ swiper-item{
}
.scroll-view-item {
display: inline-block;
width: 125rpx;
width: 150rpx;
height: 215rpx;
background-color: #d8d8d8;
margin-right: 23rpx;
position: relative;
}
.poster-tips{
position: fixed;
bottom: 220rpx;
left: 33rpx;
}
.poster-tips image{
width: 362rpx;
}
.poster-img{
width: 100%;
height: 215rpx;
/* height: 215rpx; */
max-height: 215rpx;
}
.select-plus{
position: absolute;
......@@ -161,5 +165,7 @@ swiper-item{
height: 100vh;
/* background: #ffffff; */
z-index: -9999;
/* z-index: 999999; */
/* top: 0; */
}
\ No newline at end of file
......@@ -604,7 +604,21 @@ class WXService extends Http {
}
if (item['scene']) {
pageIsFromShare = true;
let idParam = decodeURIComponent(item['scene']).split('&')[0];
let sceneParam = decodeURIComponent(item['scene']);
console.log('sceneParam---', sceneParam)
let tParam = '';
//判断是不是有触点参数
if (sceneParam.indexOf('t=') > -1){
let tArr = sceneParam.split('&');
for (let i = 0; i < tArr.length ; i ++){
if (tArr[i].indexOf('t=') > -1){
tParam = tArr[i].split('t=')[1];
break;
}
}
}
let idParam = sceneParam.split('&')[0];
let shareId = idParam && idParam.split('=')[1] || 0;
// console.log(shareId)
// console.log(idParam)
......@@ -612,10 +626,12 @@ class WXService extends Http {
if (idParam.indexOf('pageId') > -1){
item['pageId'] = shareId;
}
if (tParam){
id = Integer.digit(tParam, 64, 10);
}
//
if (shareId && shareId !=0){
item['id'] = Integer.digit(shareId, 64, 10)
id = item['id'];
item['id'] = Integer.digit(shareId, 64, 10);
}
}
});
......@@ -624,7 +640,6 @@ class WXService extends Http {
//调用接口
_self.getTentacleContentByTentacleId(id);
}
config.onLoad && config.onLoad.apply(page, args);
},
onShow: function (...args) {
......@@ -843,6 +858,7 @@ class WXService extends Http {
}
this.showOpenCardModelLock = true // 避免多次弹出开卡对话窗
// 开卡
console.log('开卡参数为-----', options)
wx.navigateToMiniProgram({
appId: 'wxeb490c6f9b154ef9', // 固定为此 appid,不可改动
extraData: options, // 包括 encrypt_card_id, outer_str, biz三个字段,须从 step3 中获得的链接中获取参数
......@@ -898,11 +914,19 @@ class WXService extends Http {
openCard() {
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
return new Promise((resolve, reject) => {
if (!baseUserInfo){
reject({
state: 0
})
return ;
}
if (baseUserInfo && baseUserInfo.memberActivateStatus) {
// console.log('已开卡', baseUserInfo)
wxService.openCardList()
resolve(baseUserInfo)
} else if (!baseUserInfo || !baseUserInfo.memberActivateStatus) {
}
else if (!baseUserInfo.memberActivateStatus) {
// console.log('去开卡', baseUserInfo)
return this.navigateToMiniProgram({
biz: baseUserInfo.biz,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment