From df52535848722485dbbbba0d41747ad6bdec61e7 Mon Sep 17 00:00:00 2001 From: ghusermoon <2673031505@qq.com> Date: Sat, 15 Aug 2020 17:16:11 +0800 Subject: [PATCH] mine concerns 8.15 --- common/api/user.js | 6 +- common/store/index.js | 6 +- components/mine/collection-item/index.vue | 12 + pageB/sdetails/index.vue | 15 +- pageC/merchant/index.vue | 6 +- pageE/mine/MineConcerns.vue | 276 ++++++---------------- pageE/mine/storeConcerns.vue | 176 ++++++++++++++ pageE/setting/Index.vue | 4 +- pageE/setting/feedback.vue | 35 ++- pageE/setting/question.vue | 51 ++++ pages.json | 17 +- 11 files changed, 377 insertions(+), 227 deletions(-) create mode 100644 pageE/mine/storeConcerns.vue create mode 100644 pageE/setting/question.vue diff --git a/common/api/user.js b/common/api/user.js index f45dc6f..a3f8cba 100644 --- a/common/api/user.js +++ b/common/api/user.js @@ -415,7 +415,7 @@ export default { }, // 关注用户列表 attentionMemberList({ page = 1,role } = {}) { - return vm.$u.post('member/attentionMemberList', { page,role }); + return vm.$u.post('member/attentionMemberList', { page, role }); }, // 可用优惠券商品 couponGoodsList({ voucher_id, page, order }) { @@ -437,6 +437,10 @@ export default { friend_tomid:id }); }, + // 设置里的帮助 + getSettingHelpList() { + return vm.$u.post('document/help'); + } } } diff --git a/common/store/index.js b/common/store/index.js index d3f4929..91a1a40 100644 --- a/common/store/index.js +++ b/common/store/index.js @@ -18,7 +18,8 @@ const store = new Vuex.Store({ loadmore: {}, // 下拉加载返回的数据 hasLogin: false, // 登录状态 token: "", // 储存token - showLoginModel: false, // 登录框 + showLoginModel: false, // 登录框 + question: {}, // 帮助与反馈 }, getters: { getOrderAddress(state) { @@ -75,6 +76,9 @@ const store = new Vuex.Store({ }, setLoadMore(state, info) { state.loadmore = info; + }, + setQuestion(state, question) { + state.question = question; } } }) diff --git a/components/mine/collection-item/index.vue b/components/mine/collection-item/index.vue index f10dca3..6c3f3a9 100644 --- a/components/mine/collection-item/index.vue +++ b/components/mine/collection-item/index.vue @@ -46,6 +46,7 @@ export default { }, methods: { viewGoodsDetails(item) { + if(this.closeAction()) return false; const list = this.list.filter(item => { return item.show; }) @@ -57,6 +58,17 @@ export default { } }) }, + closeAction() { + let status = false; + this.list.map((val, idx) => { + if(val.show) { + status = true; + this.$set(this.list[idx], 'show', false); + }; + }) + this.$forceUpdate(); + return status; + }, getGoodsFavoritesList() { this.$u.api.getFavoritesList().then(res => { if(res.errCode == 0) { diff --git a/pageB/sdetails/index.vue b/pageB/sdetails/index.vue index c8d4af4..5e80184 100644 --- a/pageB/sdetails/index.vue +++ b/pageB/sdetails/index.vue @@ -31,9 +31,9 @@ ¥{{ goodsInfo.goods_price || '0.00' }} - - - {{ !goodsInfo.is_collect == 1 ? '收藏' : '已收藏' }} + + + {{ goodsInfo.is_collect == 1 ? '已收藏' : '收藏' }} @@ -638,7 +638,7 @@ export default { current: arr[index] }) }, - switchCollect(status) { + switchCollect(status = 0) { if(status == 1) { this.removeFavorite(); } else { @@ -646,6 +646,13 @@ export default { } }, addFavoriteGoods() { + // // 尝试登录 + // if (!this.$store.state.hasLogin) { + // uni.navigateTo({ + // url: "pageA/login/login" + // }) + // return false; + // } this.$u.api.addFavoriteGoods({ fid: this.goodsInfo.goods_id }).then(res => { if(res.errCode == 0) { this.getGoodsDetails(this.id); diff --git a/pageC/merchant/index.vue b/pageC/merchant/index.vue index 0c1b0b7..f709d3a 100644 --- a/pageC/merchant/index.vue +++ b/pageC/merchant/index.vue @@ -169,9 +169,9 @@ export default { } }, getStoreInfo() { - console.log(this.sid ) + // console.log(this.sid ) this.$u.api.getStoreInfo({ id: this.sid }).then((res)=>{ - console.log(JSON.stringify(res)) + // console.log(JSON.stringify(res)) this.info = res.data; uni.stopPullDownRefresh(); }) @@ -221,7 +221,7 @@ export default { const res = uni.getSystemInfoSync(); this.scrollHeiht = res.windowHeight - (73 + 20 + 170) + 'px'; this.paddingTop = res.windowWidth / 750 * (90 + 50) + 'px'; - console.log(this.paddingTop); + // console.log(this.paddingTop); } }, onLoad(option){ diff --git a/pageE/mine/MineConcerns.vue b/pageE/mine/MineConcerns.vue index 15de9ce..e07ff62 100644 --- a/pageE/mine/MineConcerns.vue +++ b/pageE/mine/MineConcerns.vue @@ -1,259 +1,121 @@ \ No newline at end of file diff --git a/pageE/setting/Index.vue b/pageE/setting/Index.vue index d7b084d..f89d52c 100644 --- a/pageE/setting/Index.vue +++ b/pageE/setting/Index.vue @@ -1,11 +1,11 @@