Merge pull request 'specil 8.9' (#138) from zhy into master

Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/138
This commit is contained in:
hansu 2020-08-09 14:24:30 +08:00
commit d00b4a75ac
8 changed files with 59 additions and 33 deletions

View File

@ -76,7 +76,7 @@ export default {
}, },
searchValue() { searchValue() {
uni.navigateTo({ uni.navigateTo({
url: '/pageB/search/index' url: '/pageB/search/index?type=1'
}) })
}, },
}, },

View File

@ -443,16 +443,26 @@ export default {
* @params {Number} ifcart 结算方式 1:购物车 0:直接结算立即购买/拼团/秒杀 * @params {Number} ifcart 结算方式 1:购物车 0:直接结算立即购买/拼团/秒杀
**/ **/
settlementOrder({type, num = this.goodsNumber, ifcart = 0} = {}) { settlementOrder({type, num = this.goodsNumber, ifcart = 0} = {}) {
if(type != 'involvement') {
if(!this.showSpec) { if(!this.showSpec) {
this.showSpec = true; this.showSpec = true;
return false; return false;
} }
if(!this.showSpec) {
this.showSpec = true;
return false;
}
//
if(this.goodsInfo.spec_value == null) {
this.quanxuan = true;
}
if(!this.quanxuan) { if(!this.quanxuan) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '请选择规格' title: '请选择规格'
}) })
return false; return false;
} }
}
if(!this.debounce) return; if(!this.debounce) return;
this.debounce = false; this.debounce = false;
let params = { let params = {
@ -516,6 +526,8 @@ export default {
}, },
xuanze(id){ xuanze(id){
// console.log(id) // console.log(id)
// type = 1
this.type = 1;
this.getGoodsDetails(this.glist[id]) this.getGoodsDetails(this.glist[id])
this.id = this.glist[id]; this.id = this.glist[id];
}, },

View File

@ -13,12 +13,15 @@ export default {
name:"search", name:"search",
data(){ data(){
return{ return{
type: '', // 1 2
keyword: "", keyword: "",
searchwordlist: [], searchwordlist: [],
} }
}, },
created() { // type: 2 1:
this.getWordList(); onLoad(option) {
this.type = option.type;
if(option.type == 2) this.getWordList();
}, },
// //
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
@ -44,13 +47,18 @@ export default {
this.$u.toast('搜索内容不可为空'); this.$u.toast('搜索内容不可为空');
return false; return false;
} }
let params = {
value: value,
type: this.type,
}
if(this.type == 2) {
Object.assign(params, {
order: 'goods_salenum'
})
}
this.$u.route({ this.$u.route({
url: "/pageB/search/out", url: "/pageB/search/out",
params: { params: params,
value: value,
type: "shop",
order: 'goods_salenum'
}
}) })
} }
} }

View File

@ -50,15 +50,18 @@
this.getMenuItemTop() this.getMenuItemTop()
}, },
onNavigationBarButtonTap(e) { 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() { onNavigationBarSearchInputClicked() {
this.$u.route('/pageB/search/index'); this.$u.route('/pageB/search/index', { type: 2 });
}, },
methods: { methods: {
toSearchPage() { toSearchPage() {
this.$u.route({ this.$u.route({
url: "pageB/search/index" url: "pageB/search/index",
prarms: {
type: 2
}
}) })
}, },
// //

View File

@ -103,7 +103,7 @@ export default {
this.$u.api.getMemberPointsStat().then((res)=>{ this.$u.api.getMemberPointsStat().then((res)=>{
if(res.errCode == 0) { if(res.errCode == 0) {
this.memberInfo = res.data; this.memberInfo = res.data;
this.nodes = common.unescapeHTML(this.memberInfo.points_rule); this.nodes = common.unescapeHTML(this.memberInfo.points_rule.document_content);
} }
}) })
}, },

View File

@ -5,17 +5,17 @@
<view class="rank-value">lv{{ memberInfo.member_level }}</view> <view class="rank-value">lv{{ memberInfo.member_level }}</view>
<view class="line-box"> <view class="line-box">
<u-line-progress :percent="percent" :show-percent="false" inactive-color="#FFFFFF" active-color="#F1A36B" height="30" :striped="true" :striped-active="true"></u-line-progress> <u-line-progress :percent="percent" :show-percent="false" inactive-color="#FFFFFF" active-color="#F1A36B" height="30" :striped="true" :striped-active="true"></u-line-progress>
<text>{{ memberInfo.member_exppoints | percentExp(memberInfo.next_grade_exppoints_diff) }}</text> <text>{{ memberInfo.member_exppoints + '/' + memberInfo.next_member_level_exppoints }}</text>
</view> </view>
<view class="rank-value">lv{{ memberInfo.member_level + 1 }}</view> <view class="rank-value">lv{{ memberInfo.next_member_level }}</view>
</view> </view>
<view class="exp-value">经验值<span>{{ memberInfo.member_exppoints }}</span></view> <view class="exp-value">经验值<span>{{ memberInfo.member_exppoints }}</span></view>
<view class="distance">距离下一级还需要{{ memberInfo.next_grade_exppoints_diff }}经验值</view> <view class="distance">距离下一级还需要 {{ memberInfo.next_member_level_exppoints_diff }} 经验值</view>
</view> </view>
<view class="body"> <view class="body">
<view class="title"> <view class="title">
<image src="/static/image/mine/34.png"></image> <image src="/static/image/mine/34.png"></image>
<text>等级定义</text> <text>{{ memberInfo.level_rule.document_title }}</text>
</view> </view>
<!-- <view class="rank-list"> <!-- <view class="rank-list">
<view v-for="(rank, index) in rank" :key="index" class="list-item"> <view v-for="(rank, index) in rank" :key="index" class="list-item">
@ -57,11 +57,9 @@ export default {
this.$u.api.getMemberPointsStat().then((res)=>{ this.$u.api.getMemberPointsStat().then((res)=>{
if (res.errCode == 0) { if (res.errCode == 0) {
this.memberInfo = res.data; this.memberInfo = res.data;
this.nodes = common.unescapeHTML(res.data.points_rule); this.nodes = common.unescapeHTML(res.data.level_rule.document_content);
// console.log(this.percent); // console.log(this.percent);
this.percent = typeof(res.data.next_grade_exppoints_diff) == 'Number' this.percent = (res.data.member_exppoints / res.data.next_member_level_exppoints) * 100;
? res.data.member_exppoints / (res.data.next_grade_exppoints_diff + res.data.member_exppoints)
: 100;
} }
}) })
}, },

View File

@ -441,7 +441,9 @@
}) })
}, },
goSearch() { goSearch() {
this.$u.route("/pageB/search/index"); this.$u.route("/pageB/search/index", {
type: 1,
});
} }
}, },
} }

View File

@ -112,7 +112,10 @@
sousuo() { sousuo() {
// console.log(123) // console.log(123)
this.$u.route({ this.$u.route({
url: "pageB/search/index" url: "pageB/search/index",
params: {
type: 2,
}
}) })
}, },
// //