|
@@ -46,11 +46,16 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="to_bottom" v-if="isLast"> -----{{ !productList.length && toSelectedCity ? "请选择您的城市" : "到底啦" }}-----</view>
|
|
<view class="to_bottom" v-if="isLast"> -----{{ !productList.length && toSelectedCity ? "请选择您的城市" : "到底啦" }}-----</view>
|
|
|
|
+ <uni-popup ref="addFollow" type="center" class="center_popup">
|
|
|
|
+ <FollowPopup :closePopup="closePopup" />
|
|
|
|
+ </uni-popup>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import FollowPopup from "@/components/FollowPopup/FollowPopup.vue";
|
|
export default {
|
|
export default {
|
|
|
|
+ components: { FollowPopup },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
// 轮播图
|
|
// 轮播图
|
|
@@ -115,6 +120,40 @@ export default {
|
|
// 登录并且未选择城市,才可以选择城市
|
|
// 登录并且未选择城市,才可以选择城市
|
|
(this.toSelectedCity = !this.$checkAccess.getCity() ? true : false);
|
|
(this.toSelectedCity = !this.$checkAccess.getCity() ? true : false);
|
|
// 数据
|
|
// 数据
|
|
|
|
+
|
|
|
|
+ //未选城市先弹窗提醒选择城市
|
|
|
|
+ if (!this.$checkAccess.getCity()) {
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: "",
|
|
|
|
+ content: "请先选择城市",
|
|
|
|
+ success: (res) => {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: "/pages/user/info",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //如果已选城市且没有添加客服每天弹窗一次
|
|
|
|
+ if (this.$checkAccess.getCity() && this.$checkAccess.getFollowQrcode()) {
|
|
|
|
+ uni.getStorage({
|
|
|
|
+ key: "followPopupTime",
|
|
|
|
+ success: (res) => {
|
|
|
|
+ if (!res.data || new Date().getTime() - res.data > 1000 * 60 * 60 * 24) {
|
|
|
|
+ uni.setStorage({
|
|
|
|
+ key: "followPopupTime",
|
|
|
|
+ data: new Date().getTime(),
|
|
|
|
+ });
|
|
|
|
+ this.$refs.addFollow.open("center");
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ fail: (err) => {
|
|
|
|
+ this.$refs.addFollow.open("center");
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ }
|
|
this.isManager = this.$checkAccess.isManager();
|
|
this.isManager = this.$checkAccess.isManager();
|
|
// 没有数据的话,或者请求中,不允许刷新
|
|
// 没有数据的话,或者请求中,不允许刷新
|
|
if (this.isReqing) return;
|
|
if (this.isReqing) return;
|
|
@@ -238,6 +277,14 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ closePopup() {
|
|
|
|
+ this.$refs.addFollow.close();
|
|
|
|
+ //存key以及时间
|
|
|
|
+ uni.setStorage({
|
|
|
|
+ key: "followPopupTime",
|
|
|
|
+ data: new Date().getTime(),
|
|
|
|
+ });
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|