From 9631e9f82758a93a7af88f1451e78556cbbcb35d Mon Sep 17 00:00:00 2001 From: ghusermoon <2673031505@qq.com> Date: Sun, 9 Aug 2020 14:23:59 +0800 Subject: [PATCH] specil 8.9 --- pageB/follow/index.vue | 4 ++-- pageB/sdetails/index.vue | 30 +++++++++++++++++++++--------- pageB/search/index.vue | 22 +++++++++++++++------- pageC/classify/index.vue | 9 ++++++--- pageE/mine/MemberServe.vue | 4 ++-- pageE/mine/MineProgress.vue | 14 ++++++-------- pages/index/index.vue | 4 +++- pages/shop/index.vue | 5 ++++- 8 files changed, 59 insertions(+), 33 deletions(-) diff --git a/pageB/follow/index.vue b/pageB/follow/index.vue index 479d97c..57c8711 100644 --- a/pageB/follow/index.vue +++ b/pageB/follow/index.vue @@ -5,7 +5,7 @@ 输入达人名称 - + @@ -76,7 +76,7 @@ export default { }, searchValue() { uni.navigateTo({ - url: '/pageB/search/index' + url: '/pageB/search/index?type=1' }) }, }, diff --git a/pageB/sdetails/index.vue b/pageB/sdetails/index.vue index efe5c84..180aed4 100644 --- a/pageB/sdetails/index.vue +++ b/pageB/sdetails/index.vue @@ -443,15 +443,25 @@ export default { * @params {Number} ifcart 结算方式 1:购物车 0:直接结算(立即购买/拼团/秒杀) **/ settlementOrder({type, num = this.goodsNumber, ifcart = 0} = {}) { - if(!this.showSpec) { - this.showSpec = true; - return false; - } - if(!this.quanxuan) { - this.$refs.uToast.show({ - title: '请选择规格' - }) - return false; + if(type != 'involvement') { + if(!this.showSpec) { + this.showSpec = true; + return false; + } + if(!this.showSpec) { + this.showSpec = true; + return false; + } + // 如果没有规格设规格已全选 + if(this.goodsInfo.spec_value == null) { + this.quanxuan = true; + } + if(!this.quanxuan) { + this.$refs.uToast.show({ + title: '请选择规格' + }) + return false; + } } if(!this.debounce) return; this.debounce = false; @@ -516,6 +526,8 @@ export default { }, xuanze(id){ // console.log(id) + // 选择完规格后设商品type = 1 + this.type = 1; this.getGoodsDetails(this.glist[id]) this.id = this.glist[id]; }, diff --git a/pageB/search/index.vue b/pageB/search/index.vue index 9cab438..30263d2 100644 --- a/pageB/search/index.vue +++ b/pageB/search/index.vue @@ -13,12 +13,15 @@ export default { name:"search", data(){ return{ + type: '', // 1 商家达人社区 2 商品 keyword: "", searchwordlist: [], } }, - created() { - this.getWordList(); + // type: 2 商品 1: 其他 + onLoad(option) { + this.type = option.type; + if(option.type == 2) this.getWordList(); }, // 点击搜索按钮 onNavigationBarButtonTap(e) { @@ -44,13 +47,18 @@ export default { this.$u.toast('搜索内容不可为空'); return false; } + let params = { + value: value, + type: this.type, + } + if(this.type == 2) { + Object.assign(params, { + order: 'goods_salenum' + }) + } this.$u.route({ url: "/pageB/search/out", - params: { - value: value, - type: "shop", - order: 'goods_salenum' - } + params: params, }) } } diff --git a/pageC/classify/index.vue b/pageC/classify/index.vue index 4e8b34f..ac65825 100644 --- a/pageC/classify/index.vue +++ b/pageC/classify/index.vue @@ -50,15 +50,18 @@ this.getMenuItemTop() }, onNavigationBarButtonTap(e) { - if(e.index == 0) this.$u.route('/pageB/search/index'); + if(e.index == 0) this.$u.route('/pageB/search/index',{ type: 2 }); }, onNavigationBarSearchInputClicked() { - this.$u.route('/pageB/search/index'); + this.$u.route('/pageB/search/index', { type: 2 }); }, methods: { toSearchPage() { this.$u.route({ - url: "pageB/search/index" + url: "pageB/search/index", + prarms: { + type: 2 + } }) }, // 获取分类列表 diff --git a/pageE/mine/MemberServe.vue b/pageE/mine/MemberServe.vue index 2f94ac3..b459e2f 100644 --- a/pageE/mine/MemberServe.vue +++ b/pageE/mine/MemberServe.vue @@ -101,9 +101,9 @@ export default { }, getMemberPointsStat() { this.$u.api.getMemberPointsStat().then((res)=>{ - if (res.errCode == 0) { + if(res.errCode == 0) { this.memberInfo = res.data; - this.nodes = common.unescapeHTML(this.memberInfo.points_rule); + this.nodes = common.unescapeHTML(this.memberInfo.points_rule.document_content); } }) }, diff --git a/pageE/mine/MineProgress.vue b/pageE/mine/MineProgress.vue index 1d6957d..79c56c7 100644 --- a/pageE/mine/MineProgress.vue +++ b/pageE/mine/MineProgress.vue @@ -5,17 +5,17 @@ lv{{ memberInfo.member_level }} - {{ memberInfo.member_exppoints | percentExp(memberInfo.next_grade_exppoints_diff) }} + {{ memberInfo.member_exppoints + '/' + memberInfo.next_member_level_exppoints }} - lv{{ memberInfo.member_level + 1 }} + lv{{ memberInfo.next_member_level }} 经验值{{ memberInfo.member_exppoints }} - 距离下一级还需要{{ memberInfo.next_grade_exppoints_diff }}经验值 + 距离下一级还需要 {{ memberInfo.next_member_level_exppoints_diff }} 经验值 - 等级定义 + {{ memberInfo.level_rule.document_title }}