Browse Source

添加自提核销码 等一系列优化

master
Enzo 4 years ago
parent
commit
23208dbfa5
  1. 6
      pages/index/activity/detail.vue
  2. 9
      pages/order/index/onlineorder.vue
  3. 41
      pages/order/newdetail/newdetail.vue
  4. 12
      pages/user/my/myregister.vue

6
pages/index/activity/detail.vue

@ -1,18 +1,18 @@
<template>
<view>
<lf-nav title="活动详情" :showIcon="true"></lf-nav>
<view class="content">
<view class="content" v-if="$isRight(activity_details)">
<view class="title">{{activity_details.name}}</view>
<view class="level2-title">
{{activity_details.username}}
</view>
<view class="level3-title">
<text>活动时间</text>
<text class="color1">{{activity_details.time_start}}</text>
<text class="color1">{{activity_details.time_start}}~{{activity_details.time_end}}</text>
</view>
<view class="level3-title">
<text>报名时间</text>
<text class="color2">{{activity_details.apply_start}}</text>
<text class="color2">{{activity_details.apply_start}}~{{activity_details.apply_end}}</text>
</view>
<view class="level3-title lf-flex">
<text>活动内容</text>

9
pages/order/index/onlineorder.vue

@ -18,7 +18,7 @@
<swiper-item v-for="(tabItem, tabIndex) in tab_list" :key="tabIndex">
<scroll-view :style="{height: autoHeight}" class="com" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="tabItem.isRefresher" @scrolltolower="onScrolltolower" @refresherrefresh="onRefresherrefresh">
<view v-for="(item2,index2) of tabItem.list" :key="index2" class="online-card" @click="$url('/pages/order/newdetail/newdetail?order_id='+item2.order_no)">
<view v-for="(item2,index2) of tabItem.list" :key="index2" class="online-card" @click="goDetails(item2.pick_self,item2.order_no)">
<view class="lf-font-24 lf-color-777">
订单编号{{item2.order_no}}
</view>
@ -173,6 +173,13 @@
this.getData()
},
methods: {
goDetails(type,id) {
if(type==0) {
this.$url('/pages/order/newdetail/newdetail?pick_type=0&order_id='+id)
}else {
this.$url('/pages/order/newdetail/newdetail?pick_type=1&order_id='+id)
}
},
changeTab(index) {
this.online_tab = index
if(this.online_tab == 0) {

41
pages/order/newdetail/newdetail.vue

@ -55,6 +55,12 @@
</view>
</view>
</view>
<view style="margin-top: 60rpx;display: flex;justify-content: center;" v-if="$isRight(order_details) && order_details.status == 2">
<view class="lf-flex-column">
<lf-qrcode :options="config.qrc"></lf-qrcode>
<view class="lf-font-28 lf-row-center" style="color: #15716E;">{{order_details.status_text}}</view>
</view>
</view>
<view class="card" v-if="type == 'point'">
<view class="lf-row-between lf-font-28">
<text class="lf-color-777">积分数量</text>
@ -185,6 +191,7 @@
</template>
<script>
import lfQrcode from '@/components/lf-code/lf-qrcode.vue';
import countdownTimer from '@/components/countdown-timer/countdown-timer';
export default {
data() {
@ -195,15 +202,41 @@
order_details: '',
countdown_minute: '',
time: '',
show: false
show: false,
pick_type: 0,
config: {
bar: {
code: 'E01181016286106',
color: '#000', //
bgColor: '#FFFFFF', //
width: 586, //
height: 210 //
},
qrc: {
code: "",
size: 352, //
level: 4, // 04
bgColor: '#FFFFFF', //
// border: {
// color: ['#8A2387', '#F27121'], //
// lineWidth: 3, //
// },
// img: '/static/logo.png', //
// iconSize: 40, //
color: '#000000', //
}
},
}
},
components: {
countdownTimer
countdownTimer,
lfQrcode
},
onLoad(options) {
this.type = options.type || this.type;
this.order_no = options.order_id;
this.pick_type = options.pick_type;
console.log('字体',this.pick_type)
if (this.order_no) {
this.getOrderDetails();
}
@ -280,6 +313,10 @@
}
}).then(res => {
this.order_details = res.data.data
this.config.qrc.code = JSON.stringify({
u_id: this.order_details.user_id,
no: this.order_details.order_no
})
var date = this.getTime()
this.time = new Date(this.order_details.will_closed_at).getTime() - new Date(date).getTime()
if(this.time > 0) {

12
pages/user/my/myregister.vue

@ -28,7 +28,7 @@
<text class="lf-font-28 lf-color-black lf-m-l-10" v-if="activity_details.activity.price == 0">免费</text>
<text class="lf-font-28 lf-color-black lf-m-l-10" v-else>{{activity_details.activity.price}}</text>
</view>
<view style="margin-top: 60rpx;display: flex;justify-content: center;">
<view style="margin-top: 60rpx;display: flex;justify-content: center;" v-if="$isRight(activity_details)">
<view class="lf-flex-column">
<lf-qrcode :options="config.qrc"></lf-qrcode>
<view class="lf-font-28 lf-row-center" style="color: #15716E;">{{activity_details.state}}</view>
@ -65,7 +65,7 @@
height: 210 //
},
qrc: {
code: "https://weixin.qq.com/g/AwYAAHO3aO4zlasEij6bLsk4hlZd5XNFkkBmqyS55mLPFxmn5c9PaI1omqLhd24fABCD23333",
code: "",
size: 352, //
level: 4, // 04
bgColor: '#FFFFFF', //
@ -103,6 +103,14 @@
if (res.data.code == 200) {
if (res.data.status) {
this.activity_details = res.data.data;
this.config.qrc.code = JSON.stringify({
u_id: this.activity_details.user_id,
a_id: this.activity_details.activity_id
})
console.log('活动详情',this.activity_details);
} else {
wx.showModal({

Loading…
Cancel
Save