Commit 76255d73 by 李伟康

修复IPhone时间为null

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