Commit 76255d73 by 李伟康

修复IPhone时间为null

1 parent 43796e83
......@@ -8,7 +8,8 @@ const WxConfig = {
if (e == 'chooseImage') jsApiList.push('getLocalImgData')
})
let [redirectUrl] = window.location.href.split('#')
const { corpId } = util.getLocalStorage('dj_scrm_corpId')
let { corpId } = util.getQuery()
if (!corpId) corpId = util.getLocalStorage('dj_scrm_corpId').corpId
/** 获取企微应用AgentConfig */
let data = {
corpId,
......@@ -227,7 +228,7 @@ const WxConfig = {
onHistoryBack () {
return new Promise(resolve => {
wx.onHistoryBack(function(res){
wx.onHistoryBack(function (res) {
resolve(res)
})
})
......@@ -365,19 +366,19 @@ const WxConfig = {
})
},
/**自建应用发起审批 */
/**自建应用发起审批 */
thirdPartyOpenPage (params) {
console.log(params,'参数')
console.log(params, '参数')
return new Promise(resolve => {
wx.invoke('thirdPartyOpenPage', params, function (res){
wx.invoke('thirdPartyOpenPage', params, function (res) {
if (res && res.err_msg == 'thirdPartyOpenPage:ok') {
resolve(res,'回调')
resolve(res, '回调')
}
})
})
},
}
export default WxConfig
......@@ -119,14 +119,17 @@ export default {
tabList: ['新车精品礼券', '商城优惠券'],
showTips: true,
showCouponModal: false,
modalChecked: false
modalChecked: false,
corpId: ''
}
},
mounted () {
const { corpId } = this.getLocalStorage('dj_scrm_corpId')
let { corpId } = this.getQuery()
if (!corpId) corpId = this.getLocalStorage('dj_scrm_corpId').corpId
const tomorrow = this.getLocalStorage(`dj_scrm_coupon_tips_${corpId}`)
const couponModal = this.getLocalStorage(`dj_scrm_coupon_modal_${corpId}`)
const now = new Date().getTime()
this.corpId = corpId
if (tomorrow) this.showTips = now >= tomorrow
this.showCouponModal = !couponModal
},
......@@ -144,17 +147,16 @@ export default {
})
},
closeTips () {
const now = new Date()
const { corpId } = this.getLocalStorage('dj_scrm_corpId')
let { corpId } = this
this.showTips = false
let tomorrow = new Date(`${new Date(now.setDate(now.getDate() + 1)).format('yyyy-MM-dd')} 00:00:00`).getTime()
let tomorrow = new Date(`${new Date(new Date().setDate(new Date().getDate() + 1)).format('yyyy/MM/dd')} 00:00:00`).getTime()
this.setLocalStorage(`dj_scrm_coupon_tips_${corpId}`, tomorrow)
},
closeCouponModal () {
let { modalChecked } = this
let { modalChecked, corpId } = this
console.log(modalChecked)
if (!modalChecked) return
const { corpId } = this.getLocalStorage('dj_scrm_corpId')
this.setLocalStorage(`dj_scrm_coupon_modal_${corpId}`, modalChecked)
this.setLocalStorage(`dj_scrm_coupon_modal_${corpId}`, true)
}
}
}
......
......@@ -50,7 +50,7 @@ const spritesmithFunction = data => {
return `${shared}\n${perSprite}`
}
module.exports = {
publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-main/', // 本地调试时需登录时使用
publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-main-lwk/', // 本地调试时需登录时使用
// publicPath: './',
// publicPath: '/dj-scrm-wx-work-attachment-activity/', // 署应用包时的基本 URL。 vue-router history模式使用
outputDir: 'dist', // 生产环境构建文件的目录
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!