Commit a83cee68 by cen

Merge branch 'SAAS+V5.5.3' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V5.5.3

2 parents 496b80f0 5f9c3a9b
...@@ -57,6 +57,7 @@ export default { ...@@ -57,6 +57,7 @@ export default {
onShow: async function () { onShow: async function () {
this.$store.dispatch('setBackgroundState', false) this.$store.dispatch('setBackgroundState', false)
this.$store.dispatch('setActivityWindowPopCount', 1) //冷启动重置活动弹框次数
// const systemInfo = await uni.$api.systemApi.getMockData(); // const systemInfo = await uni.$api.systemApi.getMockData();
// if (systemInfo.isCheckedUpdate) { // if (systemInfo.isCheckedUpdate) {
// checkUpdate(); // checkUpdate();
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<view class="activity-box"> <view class="activity-box">
<view <view
class="close flex" class="close flex"
@click="close" @click="clickClose"
> >
<uni-icons <uni-icons
type="closeempty" type="closeempty"
...@@ -61,12 +61,15 @@ export default { ...@@ -61,12 +61,15 @@ export default {
this.data = data this.data = data
this.$refs.popup.open("center"); this.$refs.popup.open("center");
}, },
close () { close(){
this.$refs.popup.close() this.$refs.popup.close()
},
clickClose () {
this.close()
this.updateActivity() this.updateActivity()
}, },
jump () { jump () {
this.close() this.clickClose()
uni.$emit('ActivityCenter') uni.$emit('ActivityCenter')
}, },
async updateActivity () { async updateActivity () {
......
...@@ -122,7 +122,13 @@ export default { ...@@ -122,7 +122,13 @@ export default {
console.log('userInfo', n) console.log('userInfo', n)
if (n.shopMerchantId) this.haveCustomerAccess(n) if (n.shopMerchantId) this.haveCustomerAccess(n)
}, },
activityWindowPopStatus:{
handler (n) {
if(n == 1) this.getMessageInfo()
},
immediate: true,
deep: true
}
// trackId (n) { // trackId (n) {
// if (!n) { // if (!n) {
// clearInterval(this.trackInterval) // clearInterval(this.trackInterval)
...@@ -209,7 +215,10 @@ export default { ...@@ -209,7 +215,10 @@ export default {
if (sceneType == 7) tabs[1].hidden = true if (sceneType == 7) tabs[1].hidden = true
console.log('tabs', tabs) console.log('tabs', tabs)
return tabs return tabs
} },
activityWindowPopStatus () {
return this.$store.getters.activityWindowPopStatus
},
}, },
created () { created () {
// 监听自定义事件 // 监听自定义事件
...@@ -394,7 +403,6 @@ export default { ...@@ -394,7 +403,6 @@ export default {
// }, // },
// 学习中心消息弹窗,优先级高于有修改话术弹窗 // 学习中心消息弹窗,优先级高于有修改话术弹窗
async getMessagePop () { async getMessagePop () {
this.$store.dispatch('setIndexMessagePopupStatus', true)
const res = await uni.$api.commonApi.getMessagePop({}) const res = await uni.$api.commonApi.getMessagePop({})
if (res.ids && res.ids.length > 0) { if (res.ids && res.ids.length > 0) {
if (Array.isArray(res.moduleTypeList) && (res.moduleTypeList.includes(3) || res.moduleTypeList.includes(4)) if (Array.isArray(res.moduleTypeList) && (res.moduleTypeList.includes(3) || res.moduleTypeList.includes(4))
...@@ -416,11 +424,13 @@ export default { ...@@ -416,11 +424,13 @@ export default {
} }
} else { } else {
const data = await this.getMessage() const data = await this.getMessage()
if(!data) this.$store.dispatch('setIndexMessagePopupStatus', false) if (!data && this.activityWindowPopStatus == 1) this.$store.dispatch('setActivityWindowPopCount', 2)
} }
}, },
openStudyPopup () { openStudyPopup () {
this.$refs.kfRef.open() this.$refs.kfRef.open()
this.$store.dispatch('setActivityWindowPopCount', 0)
this.$emit('closeActivityCenter')
}, },
openPop () { openPop () {
uni.navigateTo({ uni.navigateTo({
......
...@@ -195,7 +195,6 @@ export default { ...@@ -195,7 +195,6 @@ export default {
this.$refs.home.updateApp(true) this.$refs.home.updateApp(true)
}, },
async onShow () { async onShow () {
this.getActivityMessage()
const userInfo = uni.$storage.get("userInfo") const userInfo = uni.$storage.get("userInfo")
if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) { if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) {
uni.$storage.rm("userInfo"); uni.$storage.rm("userInfo");
...@@ -211,10 +210,6 @@ export default { ...@@ -211,10 +210,6 @@ export default {
computed: { computed: {
}, },
methods: { methods: {
getActivityMessage () {
if (this.$refs.home) this.$refs.home.getActivityMessage()
else setTimeout(this.getActivityMessage, 200)
},
...mapMutations("audio", ["setReceptionStatus"]), ...mapMutations("audio", ["setReceptionStatus"]),
init () { init () {
const userInfo = uni.$storage.get("userInfo"), const userInfo = uni.$storage.get("userInfo"),
......
...@@ -93,7 +93,6 @@ export default { ...@@ -93,7 +93,6 @@ export default {
this.$refs.home.updateApp(true) this.$refs.home.updateApp(true)
}, },
async onShow () { async onShow () {
this.getActivityMessage()
const userInfo = uni.$storage.get('userInfo') const userInfo = uni.$storage.get('userInfo')
if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) { if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) {
uni.$storage.rm('userInfo') uni.$storage.rm('userInfo')
...@@ -106,10 +105,6 @@ export default { ...@@ -106,10 +105,6 @@ export default {
this.init() this.init()
}, },
methods: { methods: {
getActivityMessage () {
if (this.$refs.home) this.$refs.home.getActivityMessage()
else setTimeout(this.getActivityMessage, 200)
},
...mapMutations('audio', ['setReceptionStatus']), ...mapMutations('audio', ['setReceptionStatus']),
init () { init () {
this.findPayInfo() this.findPayInfo()
......
...@@ -516,10 +516,11 @@ export default { ...@@ -516,10 +516,11 @@ export default {
this.getDailyReportCarBrand() this.getDailyReportCarBrand()
}, },
async getDailyReportCarBrand () { async getDailyReportCarBrand () {
const { HMCarBandId } = await uni.$api.systemApi.getMockData(true) const { HMCarBandId, moreTemplatingIds } = await uni.$api.systemApi.getMockData(true)
let isHmStore = false, let { userInfo } = this,
{ userInfo } = this, { shopMerchantId } = userInfo,
{ shopMerchantId } = userInfo hmPresent = false,
containsShangJie = false
const data = await uni.$api.boutiqueApi.getDailyReportCarBrand({ const data = await uni.$api.boutiqueApi.getDailyReportCarBrand({
merchantId: shopMerchantId, merchantId: shopMerchantId,
sceneType: 0 sceneType: 0
...@@ -527,10 +528,11 @@ export default { ...@@ -527,10 +528,11 @@ export default {
data.map(e => { data.map(e => {
let { firstBrandId, firstBrandName, brandName } = e let { firstBrandId, firstBrandName, brandName } = e
e.tabName = firstBrandId == -1 ? firstBrandName : brandName e.tabName = firstBrandId == -1 ? firstBrandName : brandName
if (e.firstBrandId == HMCarBandId) isHmStore = true if (e.firstBrandId == HMCarBandId) hmPresent = true
if (moreTemplatingIds.includes(+e.brandId)) containsShangJie = true
}) })
this.carBandList = data this.carBandList = data
this.isHmStore = isHmStore this.isHmStore = hmPresent && !containsShangJie
this.getStaffDailyReportDetail() this.getStaffDailyReportDetail()
}, },
setMonthDay () { setMonthDay () {
......
...@@ -10,5 +10,5 @@ export default { ...@@ -10,5 +10,5 @@ export default {
booksList: (state) => state.audio.booksList, booksList: (state) => state.audio.booksList,
receptionKey: (state) => state.user.receptionKey, receptionKey: (state) => state.user.receptionKey,
customerKey: (state) => state.user.customerKey, customerKey: (state) => state.user.customerKey,
indexMessagePopupStatus: (state) => state.sys.indexMessagePopupStatus, activityWindowPopStatus: (state) => state.sys.activityWindowPopStatus
}; };
...@@ -2,15 +2,15 @@ export default { ...@@ -2,15 +2,15 @@ export default {
state() { state() {
return { return {
isInBackgound: false, isInBackgound: false,
indexMessagePopupStatus: true, // 首页弹窗状态 activityWindowPopStatus: 0 , //0 无次数 1 有次数 2打开弹框
} }
}, },
mutations: { mutations: {
SET_BACKGROUND_STATE(state, value) { SET_BACKGROUND_STATE(state, value) {
state.isInBackgound = value state.isInBackgound = value
}, },
SET_INDEX_MESSAGE_POPUP_STATUS(state, value){ SET_ACTIVITY_WINDOW_POP_COUNT(state, value){
state.indexMessagePopupStatus = value state.activityWindowPopStatus = value
} }
}, },
actions: { actions: {
...@@ -19,8 +19,8 @@ export default { ...@@ -19,8 +19,8 @@ export default {
commit('SET_BACKGROUND_STATE', value) commit('SET_BACKGROUND_STATE', value)
}, },
setIndexMessagePopupStatus({ commit }, value){ setActivityWindowPopCount({ commit }, value){
commit('SET_INDEX_MESSAGE_POPUP_STATUS', value) commit('SET_ACTIVITY_WINDOW_POP_COUNT', value)
} }
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!