Commit b5a85426 by 谢中龙

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

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