specil 8.9

This commit is contained in:
2020-08-09 14:23:59 +08:00
parent 228e34d8fc
commit 9631e9f827
8 changed files with 59 additions and 33 deletions

View File

@@ -5,7 +5,7 @@
<text>输入达人名称</text>
</view>
<view class="list">
<darenItem style="margin-top:20rpx;margin-right:23rpx" v-for="item in recommendList" :key="item.id" :info="item" v-on:pChangeType="changeType" ></darenItem>
<darenItem style="margin-top:20rpx;margin-right:23rpx" v-for="item in recommendList" :key="item.id" :info="item" v-on:pChangeType="changeType"></darenItem>
</view>
</view>
</template>
@@ -76,7 +76,7 @@ export default {
},
searchValue() {
uni.navigateTo({
url: '/pageB/search/index'
url: '/pageB/search/index?type=1'
})
},
},

View File

@@ -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];
},

View File

@@ -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,
})
}
}