Commit d167bd8b by 谢中龙

优化功能

parent 67460242
......@@ -18,7 +18,7 @@ App({
wx.setStorageSync('reLoginErr', false)
try {
this.isFromQiyeConsoleIn(e);
this.checkForUpdate();
let res = wx.getSystemInfoSync(); // 获取当前运行环境
config.pixelRate = res.windowWidth / 750;
config.platform = res.platform;
......@@ -83,6 +83,9 @@ App({
},
onShow: function (options = {}) {
//检查是不是有更新
this.checkForUpdate();
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
// 获取当前会员是否是体验者
const { member } = baseUserInfo
......
......@@ -68,7 +68,7 @@ Component({
},
},
attached() {
console.log("isvip", this.data.isVip)
// console.log("isvip", this.data.isVip)
const { imageUrl } = app.globalData
const { personData, isVip } = this.data
this.setData({
......@@ -94,6 +94,7 @@ Component({
},
_userInfoChange(newVal, oldVal) {
if (newVal !== oldVal) {
// console.log(newVal)
this.setData({
memberActivateStatus: newVal && newVal.memberActivateStatus || false,
memberCardNo: newVal && newVal.memberCardNo || '',
......
......@@ -57,6 +57,15 @@ const needMock = '' //
* contactUspluginId = a6ea55b56eb09ced8f9aeeaa14383b52 联系我插件id
*/
/**
* 多多一上 生产环境配置
* appId = wxf7bc302c51166dc0 //小程序 appId
* tunnel-token = //token 杨辰提供
* brandId= 2007 //商户Id
* contactUspluginId = 联系我插件id
*/
// appid_dev_wx wxc3b64b09b1d3dfc2
// appid_test_wx wx857ea77f4f7f4f34// wxac09792264c49b5c // 1002商城
......@@ -121,6 +130,8 @@ const envInfo = (() => {
appId: appId[PROJECT_ENV],
brandId: 3001,// 1001 1002 3001 3002 //2711 711生产brandId,
plusIsOpen : true, //是否开启plus
contactUsPluginId: '766c50920993bf9c41c6c3d2761a2df5',
contactUsIsOpen : true,//是否开启联系我
}
})()
......
......@@ -228,10 +228,11 @@ page{
}
.empty{
color: #808080;
text-align: center;
width: 100%;
margin-top: 458rpx;
margin-top: 350rpx;
display: flex;
flex-direction: column;
height: 320rpx;
}
.empty-img{
margin: 0 auto;
......
......@@ -24,9 +24,6 @@ wxService.page({
})
// 条形码
if(cardno){
setTimeout(()=> {
wxbarcode.barcode('barcode', cardno, 600, 180);
}, 200)
this.getCouponDetail(cardno)
}
},
......@@ -54,6 +51,12 @@ wxService.page({
},()=> {
wx.hideLoading()
})
// 重新渲染条形码
wxbarcode.barcode('barcode', this.data.cardno, 600, 180);
setTimeout(() => {
wxbarcode.barcode('barcode', this.data.cardno, 600, 180);
}, 200)
} else {
wx.hideLoading()
wx.showToast({
......
......@@ -5,6 +5,22 @@ const utils = require('../../utils/util')
const envInfo = require('../../config/index').envInfo
var wxbarcode = require('../../codeUtils/index.js');
var count = 0;
const COLOR_OBJ = {
Color010: '#63B359',
Color020: '#2C9F67',
Color030: '#509FC9',
Color040: '#5885CF',
Color050: '#9062C0',
Color060: '#D09A45',
Color070: '#E4B138',
Color080: '#EE903C',
Color081: '#F08500',
Color082: '#A9D92D',
Color090: '#DD6549',
Color100: '#CC463D',
Color101: '#CF3E36',
Color102: '#5E6671',
}
wxService.page({
/**
......@@ -33,6 +49,14 @@ wxService.page({
}
],
index: 0,
cardStyle : {
bgColor : '',
bgUrl : ''
},
cardNoOffline : '',
qrCardNo : '',
membershipCardnoType: '1', ////1 舞象会员卡号 2 关联实卡号
codeType: '',//CODE_TYPE_QRCODE 二维码 //CODE_TYPE_BARCODE 条形码 ///CODE_TYPE_TEXT 仅展示卡号
},
bindPickerChange(e) {
this.setData({
......@@ -44,10 +68,77 @@ wxService.page({
*/
onLoad(options) {
wx.hideShareMenu();
const { memberCardNo, memberId } = wx.getStorageSync('_baseUserInfo')
const { memberCardNo, memberId , member} = wx.getStorageSync('_baseUserInfo')
// if(memberCardNo){
// }
if (member){
this.data.cardNoOffline = member.cardNoOffline;
}
},
//获取会员卡面设置
getMemberCardSetting(){
wxService.post(`/member/cardSetting/getByBrandId`).then(res => {
let obj = res.data.data ? res.data.data.cardStyle : {};
if (obj.backgroundPicUrl){
this.data.cardStyle.bgUrl = obj.backgroundPicUrl;
this.data.cardStyle.bgColor = '';
}
else if(obj.color){
this.data.cardStyle.bgUrl = '';
this.data.cardStyle.bgColor = COLOR_OBJ[obj.color];
}
else{
this.data.cardStyle.bgUrl = 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/711_08.png';
this.data.cardStyle.bgColor = '';
}
let tempObj = res.data.data ? res.data.data : {};
this.data.membershipCardnoType = tempObj.membershipCardnoType ? tempObj.membershipCardnoType : 1;
this.data.codeType = tempObj.codeType ? tempObj.codeType : 'CODE_TYPE_BARCODE';
// this.data.codeType = 'CODE_TYPE_TEXT';
// this.data.codeType = 'CODE_TYPE_QRCODE';
// this.data.codeType = 'CODE_TYPE_BARCODE';
if (this.data.membershipCardnoType == 1){
//舞象会员卡号
this.data.qrCardNo = this.data.memberCardNo;
}
else{
//三方实体卡
this.data.qrCardNo = this.data.cardNoOffline;
}
// this.data.qrCardNo = this.data.memberCardNo;
this.setData({
qrCardNo: this.data.qrCardNo,
membershipCardnoType: this.data.membershipCardnoType,
codeType: this.data.codeType,
cardStyle: this.data.cardStyle
},() => {
if (this.data.codeType == 'CODE_TYPE_QRCODE'){
this.generateQrcode();
}
else if (this.data.codeType == 'CODE_TYPE_BARCODE'){
this.generateBarCode();
}
});
})
},
//生成条形码
generateBarCode(){
wxbarcode.barcode('barcode', this.data.qrCardNo, 500, 120);
setTimeout(() => {
wxbarcode.barcode('barcode', this.data.qrCardNo, 500, 120);
}, 200);
},
//生成二维码
generateQrcode(){
wxbarcode.qrcode('qrcode', this.data.qrCardNo, 300, 300);
setTimeout(() => {
wxbarcode.qrcode('qrcode', this.data.qrCardNo, 300, 300);
}, 200);
},
//微信支付
onTapWxPay() {
......@@ -159,15 +250,13 @@ wxService.page({
data.member.sex = 2
}
this.setData({
cardNoOffline: data.member.cardNoOffline,
memberInfo: data.member,
index: data.member.sex,
date: data.member.birthday
},() => {
this.getMemberCardSetting();
})
wxbarcode.barcode('barcode', this.data.memberCardNo, 500, 120);
setTimeout(() => {
wxbarcode.barcode('barcode', this.data.memberCardNo, 500, 120);
}, 200);
// this.setInternal();
}
})
......
<!--pages/userCenter.wxml-->
<view class='page-memberOfOwn'>
<view class='own-content'>
<view class='user-info'>
<view class='user-info'
style='background-image:url({{cardStyle.bgUrl}});background-color:{{cardStyle.bgColor}}'
>
<view class="user-avatar">
<open-data type="userAvatarUrl" />
</view>
......@@ -15,10 +17,21 @@
<image src='/assets/imgs/711_11.png' bindtap='handleGoWxCard' />
</view>-->
</view>
<view class='user-qr-code'>
<!-- 条形码 -->
<view class='user-qr-code' wx:if="{{codeType == 'CODE_TYPE_BARCODE' && qrCardNo}}">
<canvas canvas-id="barcode" binderror="canvasIdErrorCallback" />
<view class='card-no'>{{qrCardNo}}</view>
<!-- <view class='wx-pay-code' bindtap="onTapWxPay">微信支付</view>-->
</view>
<!-- 二维码 -->
<view class='u-qr-code' wx:if="{{codeType == 'CODE_TYPE_QRCODE' && qrCardNo}}">
<canvas canvas-id="qrcode" binderror="canvasIdErrorCallback" />
<view class='card-no'>{{qrCardNo}}</view>
</view>
<!-- 仅展示卡号 -->
<view class='u-qr-code' wx:if="{{codeType == 'CODE_TYPE_TEXT' && qrCardNo}}">
<label>{{qrCardNo}}</label>
</view>
</view>
<view class="form-info">
......
......@@ -36,7 +36,7 @@
<view class="bottom-fixed" style="padding-bottom:{{paddingBottom}}"></view>
<share-benefit-modal show="{{shareBenefitModalShow}}" benefit-data="{{benefitData}}"/>
<!-- 联系我 -->
<view class="cell-me" wx:if="{{!isQiye}}">
<view class="cell-me" wx:if="{{!isQiye && contactUsIsOpen}}">
<cell
bind:startmessage='startmessage'
isMask="0"
......@@ -46,7 +46,7 @@
buttonText="0"
bubbleColor="cb3c3c"
bind:completemessage="completemessage"
plugid='766c50920993bf9c41c6c3d2761a2df5' />
plugid='{{contactUsPluginId}}' />
</view>
<!-- 联系我点击成功之后的回调 -->
......
......@@ -290,6 +290,7 @@ wxService.page({
const renderData = render.next()
this.data.renderPageOver = renderData.done
this.renderPageFunc({ products: renderData.value })
// this.renderPageFunc({ products: products })
//是否有tabbar 或 plus
let tabbar = products.filter(item => item.type == 5);
let plus = products.filter(item => item.type == 9);
......@@ -309,10 +310,7 @@ wxService.page({
paddingBottom: '40rpx'
})
}
}
}).finally(() => {
wx.hideLoading();
})
......@@ -324,6 +322,7 @@ wxService.page({
* @param now
*/
renderPageFunc({ products }) {
this.data.pages = [];
// 9 plus(9/5-权重高)
let newProducts = [...products]
let typeArr = []
......@@ -334,10 +333,7 @@ wxService.page({
})
}
// let productData = handlerDataOnPage.handlerArray(products)
let productData = handlerDataOnPage.handlerArray(newProducts)
logger.log('productData.keysNum', productData.keysNum(), productData)
this.setData({
...productData
}, () => {
......
......@@ -47,7 +47,7 @@
<view class="bottom-fixed" style="padding-bottom:{{paddingBottom}}"></view>
<!--联系我 客服ID-->
<!-- style='left:{{x}}px;top:{{y}}px' -->
<view class="cell-me" wx:if="{{!isQiye}}" >
<view class="cell-me" wx:if="{{!isQiye && contactUsIsOpen}}" >
<cell
bind:startmessage='startmessage'
isMask="0"
......@@ -57,7 +57,7 @@
buttonText="0"
bubbleColor="cb3c3c"
bind:completemessage="completemessage"
plugid='766c50920993bf9c41c6c3d2761a2df5' />
plugid='{{contactUsPluginId}}' />
<!-- 766c50920993bf9c41c6c3d2761a2df5 -->
<!-- 泰华 a6ea55b56eb09ced8f9aeeaa14383b52 -->
</view>
......
......@@ -19,7 +19,6 @@ wxService.page({
*/
onLoad: function (options) {
let param = options.id;
console.log(param)
if(param){
this.getCurrentStoreId();
this.data.couponId = param;
......@@ -51,8 +50,6 @@ wxService.page({
//获取优惠券详情
getCouponDetail(){
wxService.post(`/coupon/coupon/get?cardNo=${this.data.couponId}`).then(res => {
console.log('请求卡券详情接口cardNo----',this.data.couponId)
console.log('获取卡券结果----',res)
if(res){
this.data.couponInfo = res.data.data ? res.data.data : {};
this.data.couponInfo.takeCouponBgimg = this.data.couponInfo.couponDetail.style.takeCouponBgimg;
......@@ -93,7 +90,6 @@ wxService.page({
} else if (res.cancel) {}
}
})
},
//核销优惠券
......@@ -101,26 +97,28 @@ wxService.page({
wx.showLoading({
title: '核销中..',
});
wxService.post(`/coupon/coupon/checkAndInvalid`,{
cardNo : this.data.couponId,
useStoreId: this.data.useStoreId,
brandId: app.globalData.brandId
}).then(res => {
let param = {};
param.cardNo = this.data.couponId;
param.useStoreId = this.data.useStoreId;
param.brandId = app.globalData.brandId;
wxService.post(`/coupon/coupon/checkAndInvalid`, param).then(res => {
wx.hideLoading();
if(res){
if (res.data.result == 0) {
wx.showToast({
title: '核销成功',
});
setTimeout(() => {
icon : 'success',
duration : 2000,
mask : true,
success : function(){
wx.navigateBack({
delta: 1
});
},500);
}
});
}
}
}).finally(() => {
wx.hideLoading();
});
}
});
\ No newline at end of file
......@@ -219,7 +219,7 @@ wxService.page({
let content = {
title: item.title,
id: id,
url: item.couponBg
url: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_get_coupon.png'
}
let tentacleInfo = {
content: JSON.stringify(content),
......@@ -236,8 +236,8 @@ wxService.page({
let inner_tentacleId = Integer.digit(tentacleId, 10, 64);
var path = 'subPackage/page/pages/scanCoupon/scanCoupon' + '?i=' + inner_id + '&t=' + inner_tentacleId;
this.data.shareModel.title = item.title;
this.data.shareModel.imageUrl = item.couponBg;
this.data.shareModel.path = item.path;
this.data.shareModel.imageUrl = 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_get_coupon.png';
this.data.shareModel.path = path;
this.setData({
shareModel: this.data.shareModel,
showModal: true
......@@ -258,7 +258,7 @@ wxService.page({
let content = {
title: item.title,
id: item.id,
url: item.imageBg
url: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_get_coupon.png'
}
let tentacleInfo = {
......@@ -279,7 +279,7 @@ wxService.page({
wx.qy.shareToExternalContact({
appid: app.globalData.appId,//小程序的appid
title: item.couponName, //小程序消息的title
imgUrl: item.imageBg,//小程序消息的封面图
imgUrl: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_get_coupon.png',//小程序消息的封面图
page: path, //小程序消息打开后的路径
success: function (r) {
wx.showToast({
......@@ -431,6 +431,8 @@ wxService.page({
* 用户点击右上角分享
*/
onShareAppMessage: function (res) {
console.log(res)
console.log(this.data.shareModel)
if (res.from == 'button') {
return {
title: this.data.shareModel.title,
......
......@@ -35,7 +35,7 @@ wxService.page({
onShow: function () {
},
getTaskPage(pageSize, pageNo,current) { // 1 销售任务 2 招募任务
getTaskPage(pageSize, pageNo,current,refresh) { // 1 销售任务 2 招募任务
wx.showLoading({
title: '加载中'
})
......@@ -69,11 +69,19 @@ wxService.page({
}
})
this.setData({
list: pageNo == 1? [...data.content]: [...this.data.list,...data.content],
list: pageNo == 1 ? [...data.content]: [...this.data.list,...data.content],
totalPages: data.totalPages
})
}
}
if(refresh){
wx.showToast({
title: '刷新成功',
});
wx.stopPullDownRefresh();
}
})
},
// 点击事件
......@@ -130,7 +138,11 @@ wxService.page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.data.pageSize = 10;
this.data.pageNo = 1;
this.data.list = [];
const { pageSize, pageNo, current } = this.data
this.getTaskPage(pageSize, pageNo, current,true)
},
/**
......
{
"navigationBarTitleText": "任务中心",
"enablePullDownRefresh": true,
"usingComponents": {
"empty": "../../../../component/empty/empty"
}
}
\ No newline at end of file
......@@ -16,7 +16,8 @@
</view>
<!-- list -->
<view class='list' wx:if="{{current == 1}}">
<view wx:if="{{current == 1}}">
<view class='list' wx:if="{{list.length > 0}}">
<view class='list-item'
wx:for="{{list}}"
wx:for-index="idx"
......@@ -43,9 +44,12 @@
</view>
</view>
</view>
<empty text="暂无进行中销售任务哦~" wx:else/>
</view>
<!-- 招募任务 -->
<view class='list' wx:if="{{current == 2}}">
<view wx:if="{{current == 2}}">
<view class='list' wx:if="{{list.length > 0}}">
<view class='list-item'
wx:for="{{list}}"
wx:for-index="idx"
......@@ -72,6 +76,6 @@
</view>
</view>
</view>
<empty text="暂无进行中招募任务哦~" wx:else/>
</view>
</view>
......@@ -91,8 +91,8 @@ wxService.page({
let inner_tentacleId = Integer.digit(tentacleId, 10, 64);
var path = 'subPackage/page/pages/scanCoupon/scanCoupon' + '?i=' + inner_id + '&t=' + inner_tentacleId;
this.data.shareCouponObj.title = item.title;
this.data.shareCouponObj.imageUrl = item.imageBg;
this.data.shareCouponObj.path = item.path;
this.data.shareCouponObj.imageUrl = 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_get_coupon.png';
this.data.shareCouponObj.path = path;
this.setData({
shareCouponObj: this.data.shareCouponObj,
showShareModel : true
......@@ -134,7 +134,7 @@ wxService.page({
wx.qy.shareToExternalContact({
appid: app.globalData.appId,//小程序的appid
title: item.couponName, //小程序消息的title
imgUrl: item.imageBg,//小程序消息的封面图
imgUrl: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_get_coupon.png',//小程序消息的封面图
page: path, //小程序消息打开后的路径
success: function (r) {
wx.showToast({
......
......@@ -148,8 +148,8 @@ wxService.page({
let inner_tentacleId = Integer.digit(tentacleId, 10, 64);
var path = 'subPackage/page/pages/scanCoupon/scanCoupon' + '?i=' + inner_id + '&t=' + inner_tentacleId;
this.data.shareModel.title = item.title;
this.data.shareModel.imageUrl = item.couponBg;
this.data.shareModel.path = item.path;
this.data.shareModel.imageUrl = 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_get_coupon.png';
this.data.shareModel.path = path;
this.setData({
shareModel: this.data.shareModel,
showModal: true
......@@ -192,7 +192,7 @@ wxService.page({
wx.qy.shareToExternalContact({
appid: app.globalData.appId,//小程序的appid
title: item.couponName, //小程序消息的title
imgUrl: item.imageBg,//小程序消息的封面图
imgUrl: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_get_coupon.png',//小程序消息的封面图
page: path, //小程序消息打开后的路径
success: function (r) {
wx.showToast({
......
......@@ -2,7 +2,6 @@
var app = getApp()
const wxService = require('../../../../utils/wxService')
import { Integer } from '../../../../utils/integerDigitalConvertion'
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
wxService.page({
......@@ -64,17 +63,18 @@ wxService.page({
this.generatePointObject(tentacleInfo);
}
this.setData({
'form.sortType': this.data.currentTab
})
this.getProList();
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
this.setData({
'form.sortType': this.data.currentTab
})
this.getProList();
},
// 切换tab
......@@ -101,11 +101,13 @@ wxService.page({
},
//获取商品列表
getProList() {
getProList(refresh) {
wx.showLoading({
title: '加载中'
})
wxService.post(`/sale/product/buyer/listPageByCategoryId?pageNo=${this.data.pageNo}&pageSize=${this.data.pageSize}`, this.data.form).then(res => {
});
let pageNo = this.data.pageNo,
pageSize = this.data.pageSize;
wxService.post(`/sale/product/buyer/listPageByCategoryId?pageNo=${pageNo}&pageSize=${pageSize}`, this.data.form).then(res => {
const { result, data } = res.data
if (result == 0 && data.content) {
wx.hideLoading()
......@@ -115,6 +117,14 @@ wxService.page({
totalElements: data.totalElements
})
}
if (refresh){
wx.showToast({
title: '数据已刷新',
});
wx.stopPullDownRefresh();
}
}).finally(() => {
wx.hideLoading()
})
......@@ -128,28 +138,12 @@ wxService.page({
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.setData({
pageNo: 1,
})
this.getProList()
wx.stopPullDownRefresh();
this.data.pageNo = 1;
this.data.totalPages = 0;
this.getProList(true);
},
/**
......
{
"navigationBarTitleText": "商品列表",
"enablePullDownRefresh": true,
"usingComponents": {
"product-list-style-one": "/component/productListStyleOne/productListStyleOne",
"product-list-style-two": "/component/productListStyleTwo/productListStyleTwo",
......
......@@ -82,8 +82,8 @@ class Http {
get (url, parmas) {
let baseUserInfo = wx.getStorageSync('_baseUserInfo')
console.log(this.getTentacle())
if(baseUserInfo){
let guideUserInfo = wx.getStorageSync('guidBaseInfo');
if (baseUserInfo || guideUserInfo){
return this.request({
url,
method: 'GET',
......@@ -196,7 +196,6 @@ class Http {
})
})
}
console.log(JSON.stringify(error))
return Promise.reject(error)
}
......
......@@ -165,7 +165,7 @@ class WXService extends Http {
login() {
const currentEnv = wx.getStorageSync('_qyWeChat')
console.log('全局', currentEnv)
// console.log('全局', currentEnv)
return new Promise((resolve, reject) => {
wx.login({
success: (res) => {
......@@ -217,12 +217,12 @@ class WXService extends Http {
icon: 'none'
})
console.log(JSON.stringify(baseUserInfo))
// console.log(JSON.stringify(baseUserInfo))
return this.get('i-user/info', {
unionId: baseUserInfo.unionId,
minaOpenId: baseUserInfo.openId
}).then((res) => {
console.log('i-user/info res is %o ', res)
// console.log('i-user/info res is %o ', res)
if (res.data.code === -10001) {
this.showToast(`${res.data.message}`)
return Promise.reject({
......@@ -257,7 +257,7 @@ class WXService extends Http {
//生成触点对象Id
getTentacleContent(tentacleInfo) {
console.log('生成触点对象Id', tentacleInfo)
// console.log('生成触点对象Id', tentacleInfo)
return this.post('/marketing/tentacleContent/getTentacleContent', tentacleInfo).then((res) => {
let data = res.data.data
return Promise.resolve(data);
......@@ -349,7 +349,7 @@ class WXService extends Http {
//判断tentacleInfo是否为空
if (!tentacleInfo) {
wx.setStorageSync('TENTACLE_CONTENT', tempTentacleInfo);
console.log('TENTACLE_CONTENT', wx.getStorageSync('TENTACLE_CONTENT'))
// console.log('TENTACLE_CONTENT', wx.getStorageSync('TENTACLE_CONTENT'))
return;
}
//tentacleInfo 不为空
......@@ -576,6 +576,8 @@ class WXService extends Http {
// 集点体验者
config.data.experAccessible;
config.data.plusIsOpen = envInfo.plusIsOpen;
config.data.contactUsPluginId = envInfo.contactUsPluginId;
config.data.contactUsIsOpen = envInfo.contactUsIsOpen;
const CONFIG_PAPGE = {
onLoad: function (...args) {
......@@ -604,8 +606,8 @@ class WXService extends Http {
pageIsFromShare = true;
let idParam = decodeURIComponent(item['scene']).split('&')[0];
let shareId = idParam && idParam.split('=')[1] || 0;
console.log(shareId)
console.log(idParam)
// console.log(shareId)
// console.log(idParam)
//处理pageId的
if (idParam.indexOf('pageId') > -1){
item['pageId'] = shareId;
......@@ -623,8 +625,6 @@ class WXService extends Http {
_self.getTentacleContentByTentacleId(id);
}
// console.log('args ----',args)
config.onLoad && config.onLoad.apply(page, args);
},
onShow: function (...args) {
......@@ -644,8 +644,8 @@ class WXService extends Http {
let currentEndTime = (new Date(premiumExpireStorage.replace(/-/g, '/'))).getTime(); // 到期时间
let currentTime = (new Date()).getTime();
let vipFlag = currentTime <= currentEndTime ? true : false // 当前时间 < 到期时间为vip
console.log('premiumExpireStorage', premiumExpireStorage)
console.log('当前时间 < 到期时间为vip', vipFlag)
// console.log('premiumExpireStorage', premiumExpireStorage)
// console.log('当前时间 < 到期时间为vip', vipFlag)
if (baseUserInfo && wx.getStorageSync('token')) {
page.setData({
......@@ -727,12 +727,12 @@ class WXService extends Http {
},
//处理分享页面打开时参数为memberId时生成触点对象信息
generatePointObject(tentacleInfo) {
console.log('---call 生成触点接口----')
console.log(tentacleInfo)
// console.log('---call 生成触点接口----')
// console.log(tentacleInfo)
_self.getTentacleContent(tentacleInfo).then(res => {
console.log('-----处理分享页面打开时参数为memberId时生成触点对象信息------')
console.log('-----成功返回是------', res);
// console.log('-----处理分享页面打开时参数为memberId时生成触点对象信息------')
// console.log('-----成功返回是------', res);
if (res && res.tentacleId) {
let data = res;
let TENTACLE_CONTENT = {
......@@ -899,11 +899,11 @@ class WXService extends Http {
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
return new Promise((resolve, reject) => {
if (baseUserInfo && baseUserInfo.memberActivateStatus) {
console.log('已开卡', baseUserInfo)
// console.log('已开卡', baseUserInfo)
wxService.openCardList()
resolve(baseUserInfo)
} else if (!baseUserInfo || !baseUserInfo.memberActivateStatus) {
console.log('去开卡', baseUserInfo)
// console.log('去开卡', baseUserInfo)
return this.navigateToMiniProgram({
biz: baseUserInfo.biz,
encrypt_card_id: baseUserInfo.encryptCardId,
......@@ -980,7 +980,6 @@ class WXService extends Http {
getCitysEnterty() {
const citys = citysData.default
console.log('8888', citys)
let list = {}
if (this.citysEntertys) {
list = this.citysEntertys
......@@ -988,7 +987,6 @@ class WXService extends Http {
for (const key in citys) {
if (citys.hasOwnProperty(key)) {
const element = citys[key]
console.log('element', element)
handler2citys({
city: element,
result: { name: [], code: [] },
......
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