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