Browse Source

优化活动报名按钮,优化订单详情页运费显示

master
邓平艺 4 years ago
parent
commit
bcd8b848ba
  1. 21
      pages/index/activity/detail.vue
  2. 16
      pages/order/newdetail/newdetail.vue
  3. 2
      pages/order/pointconfirm/confirm.vue

21
pages/index/activity/detail.vue

@ -33,18 +33,16 @@
<view>{{activity_details.rule}}</view>
</view>
</view>
<button v-if="enter_type==0" class="btn"
<button v-if="$isRight(activity_details.apply)" class="btn lf-opacity" :disabled="true">
已经报名
</button>
<button v-else-if="enter_type == 0" class="btn"
hover-class="lf-opacity"
:disabled="is_end"
:class="{'lf-opacity': is_end}"
@click="submit">{{ is_end ? '名额已满' : '立即报名' }}
</button>
<button v-if="activity_details.apply != null" class="btn lf-opacity"
:disabled="true"
>
已经报名
</button>
</view>
</view>
</template>
@ -56,7 +54,8 @@
is_end: false ,// false
activity_id: 0,
activity_details: '',
enter_type: 0
enter_type: 0,
show_count: 0
}
},
onLoad(e){
@ -70,6 +69,12 @@
console.log('传来的type',this.is_end);
this.getActivityDetails();
},
onShow(){
this.show_count++;
if(this.show_count > 1){
this.getActivityDetails();
}
},
methods: {
getActivityDetails() {
this.$http

16
pages/order/newdetail/newdetail.vue

@ -56,13 +56,13 @@
</view>
</view>
<view class="card goods">
<view>
<view @click="$url('/pages/shop/shopdetail?id='+ order_details.brand.id)">
<text class="lf-iconfont icon-Group- lf-font-30"></text>
<text class="shop-name">{{order_details.brand.name}}</text>
<text class="lf-iconfont icon-xiangyou lf-font-24"></text>
</view>
<view class="lf-flex lf-m-t-20" v-for="(item,index) of order_details.items" :key="index">
<image class="goods-img" :src="item.item_meta.image"></image>
<image class="goods-img" :src="item.item_meta.image" @click="$url('/pages/shop/goodsdetail?id='+ item.item_meta.detail_id)"></image>
<view class="info">
<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>
@ -87,11 +87,11 @@
</view>
<view class="lf-row-between lf-m-t-30 lf-font-28">
<text class="lf-color-777">应付运费</text>
<text class="lf-color-222">+¥{{order_details.payable_freight}}</text>
<text class="lf-color-222">¥{{unitConversion(order_details.payable_freight)}}</text>
</view>
<view class="lf-row-between lf-m-t-30 lf-font-28">
<text class="lf-color-777">实付运费</text>
<text class="lf-color-222">+¥{{order_details.real_freight}}</text>
<text class="lf-color-222">¥{{unitConversion(order_details.real_freight)}}</text>
</view>
</view>
<view class="card" v-if="type == 'default'">
@ -216,6 +216,7 @@
<script>
import lfQrcode from '@/components/lf-code/lf-qrcode.vue';
import countdownTime from '@/components/uni-countdown/uni-countdown.vue';
import Bigc from '@/common/js/bigc.js';
export default {
data() {
return {
@ -256,6 +257,13 @@
countdownTime,
lfQrcode
},
computed: {
unitConversion(){
return function(val){
return new Bigc(val).div(100);
}
}
},
onLoad(options) {
this.type = options.type || this.type;
this.order_no = options.order_id;

2
pages/order/pointconfirm/confirm.vue

@ -84,7 +84,7 @@
<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 class="lf-m-r-10">运费: {{order_detail.order.payable_freight_yuan}}</text>
<!-- <text class="lf-m-r-10">运费: {{order_detail.order.payable_freight_yuan}}</text> -->
<text>积分: {{order_detail.order.redeem_point}}积分</text>
</view>
<view class="confirm-btn" hover-class="lf-opacity" @click="confirm">立即兑换</view>

Loading…
Cancel
Save