Commit b5a85426 by 谢中龙

修改bug,触点缓存时间根据商户配置

parent a2601669
......@@ -69,6 +69,7 @@ const prod_brand_config = {
isMall: isMall,// 商城或门户 true 商城 false 门户
orderingMustOpenCard : false, //下单是否必须卡开
canUseWechatAddress: false,//是否使用获取微信地址
touchPointStorageTime : 30*60*1000,//单位毫秒
isOpenSelfMention : true, // 是否开启门店自提
canRefundDaysAfterDelivery : 15,//发货后多少天之内可显示申请退款按钮
isNeedGetLocation : true,//是否开启小程序获取位置(提交订单时获取门店信息)
......@@ -90,6 +91,7 @@ const prod_brand_config = {
isMall: isMall,
hasLiveVideo: true,//是否有直播功能
orderingMustOpenCard: true,
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
isOpenSelfMention: true, // 是否开启门店自提
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
guiderCanScanQrcode: true,//导购是否有扫一扫功能
......@@ -104,6 +106,7 @@ const prod_brand_config = {
brandId: 2007,
plusIsOpen: false,
contactUsIsOpen: true,
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
canUseWechatAddress: false,//是否使用获取微信地址
contactUsPluginId: '78353bb39251a60b473f3d4ae81b1c39',
hasTrial: false,
......@@ -124,6 +127,7 @@ const prod_brand_config = {
brandId: 2008,
plusIsOpen: false,
contactUsIsOpen: false,
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
canUseWechatAddress: false,//是否使用获取微信地址
contactUsPluginId: '',
hasTrial: false,
......@@ -145,6 +149,7 @@ const prod_brand_config = {
plusIsOpen: false,
contactUsIsOpen: false,
contactUsPluginId: '',
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
canUseWechatAddress: false,//是否使用获取微信地址
hasTrial: false,
hasLiveVideo: false,//是否有直播功能
......@@ -171,6 +176,7 @@ const prod_brand_config = {
isMall: isMall,// 商城或门户 true 商城 false 门户
orderingMustOpenCard: false,//下单是否必须卡开
isOpenSelfMention: false, // 是否开启门店自提
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
guiderCanScanQrcode: true,//导购是否有扫一扫功能
isNeedGetLocation: false,//是否开启小程序获取位置(提交订单时获取门店信息)
......@@ -190,6 +196,7 @@ const prod_brand_config = {
hasLiveVideo: false,//是否有直播功能
canUseWechatAddress: false,//是否使用获取微信地址
orderingMustOpenCard: false,
touchPointStorageTime: 48 * 60 * 60 * 1000,//单位毫秒
guiderCanScanQrcode: false,//导购是否有扫一扫功能
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
isOpenSelfMention: false, // 是否开启门店自提
......@@ -208,6 +215,7 @@ const prod_brand_config = {
contactUsPluginId: 'e61babc802dd4d0d1e819130f7aa4bc5',
hasTrial: false,
hasLiveVideo: true,//是否有直播功能
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
isMall: isMall,
orderingMustOpenCard: true,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
......@@ -229,6 +237,7 @@ const prod_brand_config = {
hasLiveVideo: false,//是否有直播功能
isMall: isMall,
canUseWechatAddress: false,//是否使用获取微信地址
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
orderingMustOpenCard: false,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
isOpenSelfMention: false, // 是否开启门店自提
......@@ -248,6 +257,7 @@ const prod_brand_config = {
hasLiveVideo: false,//是否有直播功能
hasTrial: false,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
canUseWechatAddress: false,//是否使用获取微信地址
isMall: isMall,
orderingMustOpenCard: false,
......@@ -269,6 +279,7 @@ const prod_brand_config = {
isMall: isMall,
hasLiveVideo: false,//是否有直播功能
canUseWechatAddress: false,//是否使用获取微信地址
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
orderingMustOpenCard: false,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
isOpenSelfMention: false, // 是否开启门店自提
......@@ -289,6 +300,7 @@ const prod_brand_config = {
isMall: isMall,
hasLiveVideo: false,//是否有直播功能
canUseWechatAddress: false,//是否使用获取微信地址
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
orderingMustOpenCard: false,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
isOpenSelfMention: false, // 是否开启门店自提
......@@ -308,6 +320,7 @@ const prod_brand_config = {
hasLiveVideo: false,//是否有直播功能
hasTrial: false,
canUseWechatAddress: false,//是否使用获取微信地址
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
isMall: isMall,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
orderingMustOpenCard: true,
......@@ -328,6 +341,7 @@ const prod_brand_config = {
hasTrial: false,
isMall: isMall,
canUseWechatAddress: false,//是否使用获取微信地址
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
orderingMustOpenCard: true,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
isOpenSelfMention: true, // 是否开启门店自提
......@@ -348,6 +362,7 @@ const prod_brand_config = {
hasTrial: true,
isMall: isMall,
canUseWechatAddress: false,//是否使用获取微信地址
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
orderingMustOpenCard: false,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
isOpenSelfMention: true, // 是否开启门店自提
......@@ -455,6 +470,7 @@ let canUseWechatAddress = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].c
let hasLiveVideo = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].hasLiveVideo : false;
let guiderCanScanQrcode = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].guiderCanScanQrcode : true;
let canRefundDaysAfterDelivery = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].canRefundDaysAfterDelivery : 15;
let touchPointStorageTime = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].touchPointStorageTime : 1800000;
//配置信息导出
const envInfo = (() => {
return {
......@@ -479,6 +495,7 @@ const envInfo = (() => {
hasLiveVideo: hasLiveVideo,
guiderCanScanQrcode: guiderCanScanQrcode,
canRefundDaysAfterDelivery: canRefundDaysAfterDelivery,
touchPointStorageTime: touchPointStorageTime,
}
})()
......
......@@ -130,7 +130,9 @@ wxService.page({
// 去积分商城
handleGoIntegralMall() {
// wxService.router(`/pages/IntegralMall/IntegralMall`)
wxService.router(`/subPackage/page/pages/IntegralMallGoods/IntegralMallGoods`)
// wxService.router(`/subPackage/page/pages/IntegralMallGoods/IntegralMallGoods`)
//现在修改为跳转到积分活动分组列表
wxService.router(`/subPackageA/page/pages/pointActicityGroup/pointActivityGroup`);
},
// 消费详情
handleGoDetail(e) {
......
......@@ -129,7 +129,7 @@ wxService.page({
};
//存储
var timestamp = Date.parse(new Date())
var expiration = timestamp + 1800000
var expiration = timestamp + envInfo.touchPointStorageTime;
wx.setStorageSync('TIME_EXPIRATION', expiration);
wx.setStorageSync('TEMP_TENTACLE_INFO', tempObj);
wxService.router(`/pages/productDetail/productDetail?id=${productId}&fromZc=1`);
......
......@@ -4,7 +4,7 @@ const wxService = require('../../../../utils/wxService')
const utils = require('../../../../utils/util')
const { memberId } = wx.getStorageSync('_baseUserInfo')
import { Integer } from '../../../../utils/integerDigitalConvertion'
const envInfo = require('../../../../config/index').envInfo
wxService.page({
......@@ -152,7 +152,7 @@ wxService.page({
};
//存储
var timestamp = Date.parse(new Date())
var expiration = timestamp + 1800000
var expiration = timestamp + envInfo.touchPointStorageTime;
wx.setStorageSync('TEMP_TENTACLE_INFO', tempObj);
wx.setStorageSync('TIME_EXPIRATION', expiration);
wxService.router(`/pages/productDetail/productDetail?id=${productId}&fromZc=1`);
......
......@@ -224,12 +224,11 @@ class Http {
let time = Date.parse(new Date())
let TIME_EXPIRATION = wx.getStorageSync('TIME_EXPIRATION')
let storage = wx.getStorageSync('TENTACLE_CONTENT') , tentacle = '';
if (storage){
tentacle = storage.obj;
}
if (tentacle && TIME_EXPIRATION > time){
wx.setStorageSync('TIME_EXPIRATION', time + 30*60*1000);
wx.setStorageSync('TIME_EXPIRATION', time + envInfo.touchPointStorageTime);
return JSON.stringify(tentacle);
}else{
// wx.removeStorageSync('TENTACLE_CONTENT')
......
......@@ -182,28 +182,6 @@ class WXService extends Http {
reject(res)
}
})
// 企业 wx.qy.login
// if (currentEnv) {
// wx.qy.login({
// success: (res) => {
// resolve(res)
// wx.setStorageSync('_loginCode', res.code)
// },
// fail: (res) => {
// reject(res)
// }
// })
// } else {
// wx.login({
// success: (res) => {
// resolve(res)
// wx.setStorageSync('_loginCode', res.code)
// },
// fail: (res) => {
// reject(res)
// }
// })
// }
})
}
......@@ -298,7 +276,7 @@ class WXService extends Http {
if (data.status == 1) {
var timestamp = Date.parse(new Date())
var expiration = timestamp + 1800000
var expiration = timestamp + envInfo.touchPointStorageTime;
wx.setStorageSync('TENTACLE_CONTENT', storageObj)
wx.setStorageSync('TIME_EXPIRATION', expiration)
}
......@@ -306,9 +284,7 @@ class WXService extends Http {
wx.removeStorageSync('TENTACLE_CONTENT')
wx.removeStorageSync('TIME_EXPIRATION')
}
}).finally(() => {
})
}).finally(() => {})
}
//记录触点信息
......@@ -349,7 +325,7 @@ class WXService extends Http {
if (res.data.result == 0) {
//调用接口成功 开始保存
var currentTimestamp = Date.parse(new Date())
var expiration = currentTimestamp + 1800000;
var expiration = currentTimestamp + envInfo.touchPointStorageTime;
wx.setStorageSync('lastRemarkTime', expiration);
wx.setStorageSync('lastRemarkTentacle', tentacleContent);
}
......
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