diff --git a/pages/chatbox/chat.vue b/pages/chatbox/chat.vue index e429e0d..5de8d58 100644 --- a/pages/chatbox/chat.vue +++ b/pages/chatbox/chat.vue @@ -54,6 +54,10 @@ + + + + @@ -61,11 +65,16 @@ import { mapState, mapActions, mapGetters } from 'vuex' import dateTime from '@/common/dateTime.js' import {myCache,logindo,clearBadgeNumber} from "../../utils/utils"; +import openlogin from "../components/openlogin.vue"; export default { + components: { + openlogin + }, data() { return { loadStatus: 'loadmore', + userid:"", activeSwipeId:-1, options: [ { @@ -106,9 +115,20 @@ export default { onShow() { //判断登录,跳转去登录 // logindo(); - console.log("this.chats列表.......",this.chats) - this.loadStatus = 'nomore' - this.setBadge(this.unreadCount) + // console.log("this.chats列表.......",this.chats) + var user = myCache('user'); + this.userid = user.userid? user.userid:''; + if(this.userid==""||this.userid=="0"){ + } + else{ + this.loadStatus = 'nomore' + this.setBadge(this.unreadCount) + } + }, + mounted() { + if(this.userid==""||this.userid=="0"){ + this.$refs.loginId.open(); + } }, onPullDownRefresh() { // 下拉刷新仅刷新角标,数据由全局WebSocket维护 @@ -120,6 +140,11 @@ export default { methods: { ...mapActions('chatStore', ['removeChat', 'moveTop','loadFriend']), + getPhoneNumber(e){ + if(e.userid){ + this.userid = e.userid + } + }, // 设置底部角标 setBadge(count) { myCache("massageCount",count); diff --git a/pages/index/index.vue b/pages/index/index.vue index 123320d..42feb5f 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -319,8 +319,9 @@ }, mounted() { + uni.setStorageSync("privacyType", "1"); let firstLaunchFlag = uni.getStorageSync("firstLaunchFlag"); - uni.setStorageSync("firstLaunchFlag", false) + // uni.setStorageSync("firstLaunchFlag", false) // 隐私政策判定start------------------------------ // #ifdef APP-PLUS if (firstLaunchFlag) { diff --git a/pages/login/login.vue b/pages/login/login.vue index af92ed2..80fef5a 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -78,7 +78,7 @@ - + @@ -133,7 +133,7 @@ address:'', longitude:'', // 经度 latitude:'', // 维度 - checkbox1: [1], + checkbox1: [0], checkboxitem: [{ text: '', value: 1, @@ -147,9 +147,53 @@ onLoad(){ this.getcheckImg(); this.getsystemInfo(); + }, + mounted() { + uni.setStorageSync("privacyType", "2"); + let firstLoginFlag = uni.getStorageSync("firstLoginFlag"); + // 隐私政策判定start------------------------------ + // #ifdef APP-PLUS + if (firstLoginFlag) { + this.checkbox1=[1]; + this.$forceUpdate(); + return true; + }else{ + uni.navigateTo({ + url: `/pages/user/privacy` + }); + } + // #endif + // 隐私政策判定end-------------- + }, + onShow(){ + let firstLoginFlag = uni.getStorageSync("firstLoginFlag"); + // 隐私政策判定start------------------------------ + // #ifdef APP-PLUS + if (firstLoginFlag) { + this.checkbox1=[1]; + this.$forceUpdate(); + // 获取定位信息 + this.getPosition(); + } + // #endif + // 隐私政策判定end-------------- + + // #ifdef H5 + this.checkbox1=[1]; + this.$forceUpdate(); + // 获取定位信息 this.getPosition(); + // #endif }, methods: { + change(e){ + console.log('e:',e); + if(e.detail.value.length>0&&e.detail.value[0]){ + // 选中 + // 获取定位信息 + this.getPosition(); + } + }, gotoregister() { // 注册账号 uni.navigateTo({ diff --git a/pages/product/collect.vue b/pages/product/collect.vue index da1c9f8..f09b884 100644 --- a/pages/product/collect.vue +++ b/pages/product/collect.vue @@ -189,7 +189,6 @@ if(e.customer_id){ this.customer_id = e.customer_id } - this.getmember(); }, async getList() { // console.log('customer_id2',this.customer_id) diff --git a/pages/product/cxlist.vue b/pages/product/cxlist.vue index b065f72..26eafa1 100644 --- a/pages/product/cxlist.vue +++ b/pages/product/cxlist.vue @@ -497,7 +497,6 @@ if(e.userid){ this.userid = e.userid } - this.getmember(); }, async getList() { if(this.loadStatus!=="noMore") diff --git a/pages/product/list.vue b/pages/product/list.vue index 6de3f01..f7002d1 100644 --- a/pages/product/list.vue +++ b/pages/product/list.vue @@ -560,7 +560,6 @@ if(e.userid){ this.userid = e.userid } - this.getmember(); }, // 达人好物及精品课程 async getggList() { diff --git a/pages/user/mycollect.vue b/pages/user/mycollect.vue index 0970ec8..7aad00a 100644 --- a/pages/user/mycollect.vue +++ b/pages/user/mycollect.vue @@ -479,7 +479,6 @@ if(e.userid){ this.userid = e.userid } - this.getmember(); }, async getList() { if(this.loadStatus!=="noMore") diff --git a/pages/user/myevaluat.vue b/pages/user/myevaluat.vue index da1c9f8..f09b884 100644 --- a/pages/user/myevaluat.vue +++ b/pages/user/myevaluat.vue @@ -189,7 +189,6 @@ if(e.customer_id){ this.customer_id = e.customer_id } - this.getmember(); }, async getList() { // console.log('customer_id2',this.customer_id) diff --git a/pages/user/privacy.vue b/pages/user/privacy.vue index 8c84b88..7dbf6af 100644 --- a/pages/user/privacy.vue +++ b/pages/user/privacy.vue @@ -2,7 +2,7 @@ - @@ -47,7 +47,13 @@ export default { }, // 同意并进入应用 agreeEnter(){ - uni.setStorageSync("firstLaunchFlag", true) + let privacyType = uni.getStorageSync("privacyType"); + if(privacyType=="1"){ + uni.setStorageSync("firstLaunchFlag", true); + } + else if(privacyType=="2"){ + uni.setStorageSync("firstLoginFlag", true); + } plus.runtime.agreePrivacy() this.close(); uni.navigateBack();