Compare commits
9 Commits
d520fe8017
...
dc03b9f410
| Author | SHA1 | Date | |
|---|---|---|---|
| dc03b9f410 | |||
| 1541851988 | |||
| 0c40a45155 | |||
| cb2e91f65a | |||
| f06f211417 | |||
| aa1d4631b2 | |||
| b266c9c775 | |||
| 899b93fc4f | |||
| 1f4fac94ae |
@@ -54,12 +54,30 @@ export default {
|
||||
select: 0
|
||||
}
|
||||
},
|
||||
props:['item','title'],
|
||||
watch:{
|
||||
props:['item','title', 'default'],
|
||||
watch: {
|
||||
select(){
|
||||
// console.log(this.select)
|
||||
this.$emit("sel", this.select);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.setDefaultValue();
|
||||
},
|
||||
methods: {
|
||||
setDefaultValue() {
|
||||
for (const ikey in this.item) {
|
||||
if (this.item.hasOwnProperty(ikey)) {
|
||||
const ielement = this.item[ikey];
|
||||
for (const dkey in this.default) {
|
||||
if (this.default.hasOwnProperty(dkey)) {
|
||||
const delement = this.default[dkey];
|
||||
if(ikey == dkey) this.select = ikey;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -135,7 +135,7 @@
|
||||
<text v-else-if="type == 3">¥{{ groupbuyInfo.groupbuy_price }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<guige @sel="self" ref="guige" v-for="(item,index) in goodsInfo.spec_value" :key="index" :title="goodsInfo.spec_name[index]" :item="item"></guige>
|
||||
<guige @sel="self" ref="guige" v-for="(item,index) in goodsInfo.spec_value" :key="index" :title="goodsInfo.spec_name[index]" :item="item" :default="goodsInfo.goods_spec"></guige>
|
||||
<view class="num">
|
||||
<text>购买数量</text>
|
||||
<u-number-box v-model="goodsNumber" :min="1"></u-number-box>
|
||||
@@ -245,7 +245,7 @@ export default {
|
||||
// this.type = 1;
|
||||
this.id = option.id;
|
||||
// 先请求普通商品详情获取商品类型再渲染页面
|
||||
this.ordinaryDetails(this.id);
|
||||
this.ordinaryDetails();
|
||||
},
|
||||
onShow() {
|
||||
this.debounce = true;
|
||||
@@ -381,10 +381,10 @@ export default {
|
||||
purchase() {
|
||||
this.settlementOrder();
|
||||
},
|
||||
getGoodsDetails(id) {
|
||||
getGoodsDetails() {
|
||||
switch (this.type) {
|
||||
case 1:
|
||||
this.ordinaryDetails(id);
|
||||
this.ordinaryDetails();
|
||||
break;
|
||||
case 2:
|
||||
this.pinTuanDetails();
|
||||
@@ -397,8 +397,8 @@ export default {
|
||||
}
|
||||
},
|
||||
// 普通商品详情
|
||||
ordinaryDetails(id) {
|
||||
this.$u.api.getGoodsDetails({ id: id }).then(res => {
|
||||
ordinaryDetails() {
|
||||
this.$u.api.getGoodsDetails({ id: this.id }).then(res => {
|
||||
if (res.errCode == 0) {
|
||||
this.evaluate = res.data.goods_evaluate_info;
|
||||
this.goodsInfo = res.data.goods;
|
||||
@@ -424,6 +424,7 @@ export default {
|
||||
},
|
||||
// 拼团详情
|
||||
pinTuanDetails() {
|
||||
console.log(this.id);
|
||||
this.$u.api.getPinTuanDetails({
|
||||
pintuan_id: this.pintuan_id,
|
||||
goods_id: this.id,
|
||||
@@ -574,6 +575,9 @@ export default {
|
||||
}
|
||||
}
|
||||
// console.log(arr)
|
||||
// 后台的 spec 是按升序排的
|
||||
arr.sort((a, b) => a - b);
|
||||
// console.log(arr)
|
||||
if(arr.length == index){
|
||||
this.sel = arr.join("|")
|
||||
this.quanxuan = true;
|
||||
@@ -586,7 +590,9 @@ export default {
|
||||
// 选择完规格后设商品type = 1
|
||||
// this.type = 1;
|
||||
// 改变 goods_id
|
||||
// console.log(this.glist);
|
||||
this.id = this.glist[id];
|
||||
// console.log(this.id);
|
||||
this.getGoodsDetails();
|
||||
},
|
||||
// 设置页面标题
|
||||
|
||||
@@ -139,7 +139,7 @@ export default {
|
||||
goods_id: this.goodsInfo.goods_id,
|
||||
num: this.number,
|
||||
store_id: this.store.store_id,
|
||||
appointment_time: new Date(this.time),
|
||||
appointment_time: Math.floor(new Date(this.time).getTime() / 1000),
|
||||
}).then(res => {
|
||||
if (res.errCode == 0) {
|
||||
this.$refs.uToast.show({
|
||||
|
||||
@@ -2,27 +2,21 @@
|
||||
<view class="progress" v-if="memberInfo">
|
||||
<view class="header">
|
||||
<view class="line-progress">
|
||||
<view class="rank-value">lv{{ memberInfo.member_level }}</view>
|
||||
<view class="rank-value">lv{{ memberInfo.member_level || 0 }}</view>
|
||||
<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>
|
||||
<text>{{ memberInfo.member_exppoints + '/' + memberInfo.next_member_level_exppoints }}</text>
|
||||
<text>{{ (memberInfo.member_exppoints || 0) + '/' + (memberInfo.next_member_level_exppoints || 0) }}</text>
|
||||
</view>
|
||||
<view class="rank-value">lv{{ memberInfo.next_member_level }}</view>
|
||||
<view class="rank-value">lv{{ memberInfo.next_member_level || 0 }}</view>
|
||||
</view>
|
||||
<view class="exp-value">经验值<span>{{ memberInfo.member_exppoints }}</span></view>
|
||||
<view class="distance">距离下一级还需要 {{ memberInfo.next_member_level_exppoints_diff }} 经验值</view>
|
||||
<view class="exp-value">经验值<span>{{ memberInfo.member_exppoints || 0 }}</span></view>
|
||||
<view class="distance">距离下一级还需要 {{ memberInfo.next_member_level_exppoints_diff || '--' }} 经验值</view>
|
||||
</view>
|
||||
<view class="body">
|
||||
<view class="title" v-if="memberInfo.level_rule">
|
||||
<image src="/static/image/mine/34.png"></image>
|
||||
<text>{{ memberInfo.level_rule.document_title }}</text>
|
||||
<text>{{ memberInfo.level_rule.document_title || '' }}</text>
|
||||
</view>
|
||||
<!-- <view class="rank-list">
|
||||
<view v-for="(rank, index) in rank" :key="index" class="list-item">
|
||||
<view class="rank-value">lv{{ rank.level }}</view>
|
||||
<view class="rank-interval"><span>经验值:</span>{{ rank.max == '--' ? rank.min + '及以上' : rank.min + '~' + rank.max }}</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="rich">
|
||||
<rich-text :nodes="nodes"></rich-text>
|
||||
</view>
|
||||
@@ -41,7 +35,6 @@ export default {
|
||||
},
|
||||
filters: {
|
||||
percentExp(value, next) {
|
||||
// console.log(rank);
|
||||
let result = '0 / 0';
|
||||
result = typeof(next) == 'Number'
|
||||
? value + ' / ' + (value + next)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<u-empty text="暂无订单" mode="order" color="#000000" v-if="!orderList[index] || !orderList[index].length"></u-empty>
|
||||
<u-loadmore :status="loadStatus[index]" bgColor="#ECECEC" margin-bottom="20" v-if="current != 4 && (!orderList[index] || orderList[index].length>3)" class="order-loadmore"></u-loadmore>
|
||||
<u-loadmore :status="loadStatus[index]" bgColor="#ECECEC" font-size="14" margin-bottom="20" v-if="current != 4 && (!orderList[index] || orderList[index].length>3)" class="order-loadmore"></u-loadmore>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
@@ -76,7 +76,7 @@ export default {
|
||||
// console.log(goodsList);
|
||||
this.goods = goodsList[0];
|
||||
this.num = this.goods.goods_num;
|
||||
console.log(this.goods);
|
||||
// console.log(this.goods);
|
||||
},
|
||||
getOrderInfo(id) {
|
||||
this.$u.api.getOrderInfo({
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</view>
|
||||
<u-action-sheet :list="actionList" v-model="showAction" :cancel-btn="true" @click="delHistory" border-radius="20"></u-action-sheet>
|
||||
<u-empty text="暂无足迹" mode="list" color="#000" v-if="!historyList.length"></u-empty>
|
||||
<u-loadmore :status="loadStatus" bgColor="#ECECEC" margin-bottom="20" v-if="historyList.length > 9"></u-loadmore>
|
||||
<u-loadmore :status="loadStatus" bgColor="#ECECEC" margin-top="20" margin-bottom="20" v-if="historyList.length > pageSize" @loadmore="reachBottom"></u-loadmore>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -28,6 +28,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageSize: 12,
|
||||
hid: '', // 选中的商品 id
|
||||
historyList: [],
|
||||
page: 1, // 默认1
|
||||
|
||||
@@ -192,14 +192,14 @@ export default {
|
||||
.info-left {
|
||||
margin-right: 15rpx;
|
||||
.user-nickname {
|
||||
width: 100rpx;
|
||||
max-width: 200rpx;
|
||||
font-size: 30rpx;
|
||||
color: rgba(51,51,51,1);
|
||||
margin-bottom: 19rpx;
|
||||
}
|
||||
.user-medal {
|
||||
display: flex;
|
||||
// width: 110rpx;
|
||||
width: 110rpx;
|
||||
// height: 25rpx;
|
||||
background: linear-gradient(269deg,rgba(175,175,175,1) 0%,rgba(224,224,224,1) 100%);
|
||||
border-radius: 13rpx;
|
||||
|
||||
Reference in New Issue
Block a user