Browse Source

兑换优化 积分显示

master
Enzo 4 years ago
parent
commit
3faa300855
  1. 15
      pages/order/confirm/confirm.vue
  2. 9
      pages/shop/goodsdetail.vue

15
pages/order/confirm/confirm.vue

@ -56,7 +56,7 @@
<view class="lf-font-26 lf-color-333 lf-line-1">{{ item.item_name }}</view>
<view class="lf-font-24 lf-color-777">{{ item.item_meta.specs_text }}</view>
<view class="lf-row-between" style="line-height: 1;">
<text class="price">¥{{ item.total_yuan }}</text>
<text class="price"><text v-if="goods_type==1">¥</text>{{ item.total_yuan }}<text class="lf-font-24" v-if="goods_type==0">积分</text></text>
<text class="lf-font-28 lf-color-777">x {{ item.quantity }}</text>
</view>
</view>
@ -77,7 +77,7 @@
</view>
<view class="lf-row-between lf-m-t-20">
<view class="lf-font-28 lf-color-777">商品金额</view>
<view class="lf-font-26 lf-color-222">¥{{ order_detail.order.items_total_yuan }}</view>
<view class="lf-font-26 lf-color-222"><text v-if="goods_type==1">¥</text>{{ order_detail.order.items_total_yuan }}<text v-if="goods_type==0">积分</text></view>
</view>
<view class="lf-row-between lf-m-t-20" v-if="mode == 0">
<view class="lf-font-28 lf-color-777">运费</view>
@ -93,7 +93,7 @@
<view class="fixed-content">
<view class="lf-font-24 lf-color-777">{{ order_detail.order.count }}</view>
<view class="lf-flex">
<view class="lf-font-32 lf-color-primary" style="max-width: 400rpx;">合计 ¥{{ order_detail.order.total_yuan }}</view>
<view class="lf-font-32 lf-color-primary" style="max-width: 400rpx;">合计 <text v-if="goods_type==1">¥</text>{{ order_detail.order.total_yuan }} <text v-if="goods_type==0">积分</text></view>
<view class="confirm-btn" hover-class="lf-opacity" @click="confirm">提交订单</view>
</view>
</view>
@ -115,8 +115,9 @@
<view class="coupon-radius">
<view class="coupon-left">
<view class="lf-font-36 lf-color-white" style="line-height: 1;" v-if="item.discount.action_type.type == 'cash'">
<text></text>
<text v-if="goods_type==1"></text>
<text class="lf-font-70 lf-font-bold">{{item.discount.action_type.value}}</text>
<text v-if="goods_type==0">积分</text>
</view>
<view class="lf-font-36 lf-color-white" style="line-height: 1;" v-if="item.discount.action_type.type == 'discount'">
<text class="lf-font-70 lf-font-bold">{{item.discount.action_type.value}}</text>
@ -163,7 +164,8 @@
address_id: null,
order_detail: {coupons: []},
show_coupon: false,
coupon_index: null
coupon_index: null,
goods_type: 1
}
},
computed: {
@ -179,8 +181,9 @@
}
}
},
onLoad(){
onLoad(e){
this.token = this.$cookieStorage.get('user_token');
this.goods_type = e.goods_type;
let options = this.$cookieStorage.get('order_confirm');
if(this.$isRight(options)){
this.orderCheckout(options);

9
pages/shop/goodsdetail.vue

@ -177,7 +177,7 @@
<button class="btn" style="width: 349rpx;">立即秒杀</button>
</view>
<view v-else-if="type == 'point'">
<button class="btn" style="width: 349rpx;">立即兑换</button>
<button class="btn" style="width: 349rpx;" @click="goExchange()">立即兑换</button>
</view>
<view class="lf-flex" v-else>
<button class="btn1" @click="shoot(1)">加入购物车</button>
@ -319,6 +319,11 @@
this.getGoodsStock(); //
},
methods: {
goExchange() {
if(this.showSpec == '请选择规格') {
this.shoot(2)
}
},
//
switchCollect(){
if(!this.token){
@ -479,7 +484,7 @@
//
this.$cookieStorage.set('order_confirm', par);
uni.hideLoading();
this.$url('/pages/order/confirm/confirm');
this.$url('/pages/order/confirm/confirm?goods_type=0');
// this.$http.post({
// api: 'api/shopping/order/checkout',
// data: par,

Loading…
Cancel
Save