Browse Source

订单详情核销码优化 搜索优化 确认订单添加提示

master
Enzo 4 years ago
parent
commit
5ed3d8af08
  1. 2
      components/lf-nav/lf-nav.vue
  2. 27
      pages/order/confirm_atonce.vue
  3. 67
      pages/order/order_details.vue
  4. 7
      pages/search/search.vue
  5. 2
      pages/search/searchList.vue

2
components/lf-nav/lf-nav.vue

@ -85,7 +85,7 @@
methods: { methods: {
goSearch() { goSearch() {
console.log(1) console.log(1)
uni.redirectTo({
uni.navigateTo({
url: '/pages/search/search' url: '/pages/search/search'
}) })
}, },

27
pages/order/confirm_atonce.vue

@ -78,20 +78,31 @@
}) })
}, },
fail: (err) => { fail: (err) => {
wx.navigateBackMiniProgram({
extraData: {
backPayState: false,
payorder_id: that.order_id
},
success(res) {}
})
uni.showModal({
title: '提示',
content: JSON.stringify(err),
confirmColor: '#1998FE',
showCancel: false,
success(res2) {
if (res2.confirm) {
wx.navigateBackMiniProgram({
extraData: {
backPayState: false,
payorder_id: that.order_id
},
success(res) {}
})
}
}
});
}, },
}) })
}).catch(err => { }).catch(err => {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '支付获取订单失败',
content: JSON.stringify(err),
showCancel: false, showCancel: false,
confirmColor: '#1998FE',
success(res2) { success(res2) {
if (res2.confirm) { if (res2.confirm) {
wx.navigateBackMiniProgram({ wx.navigateBackMiniProgram({

67
pages/order/order_details.vue

@ -56,28 +56,16 @@
<text class="lf-font-28 text-black1">{{orderDetails.mobile}}</text> <text class="lf-font-28 text-black1">{{orderDetails.mobile}}</text>
</view> </view>
</view> </view>
<!-- <self-line />
<view class="bg-white">
<view class="cu-bar padding-lr">
<text class="lf-color-555 lf-font-28">优惠</text>
<view v-if="orderDetails.coupon != ''">
<text class="lf-color-price lf-font-28 lf-m-l-10" v-for="(item,index) of orderDetails.coupon">{{item.tag}}</text>
</view>
<view v-else>
<text class="lf-color-price lf-font-28 lf-m-l-10">暂无优惠</text>
</view>
</view>
</view> -->
<view> <view>
<self-line /> <self-line />
<view class="bg-white flex flex-direction justify-around align-center text-center padding-tb" <view class="bg-white flex flex-direction justify-around align-center text-center padding-tb"
style="padding-bottom: 140rpx;"> style="padding-bottom: 140rpx;">
<view> <view>
<!-- <tki-qrcode ref="qrcode" @result="qrR" :val="checkArea" :size="115" unit="px" background="#fff"
foreground="#000" pdground="#000" :onval="true" :loadMake="true" /> -->
<image v-if="orderDetails.verify_qrcode" :src="orderDetails.verify_qrcode" mode="aspectFill" style="width: 300rpx;height: 300rpx;"></image>
<image v-if="orderDetails.verify_qrcode" :src="orderDetails.verify_qrcode" mode="aspectFill" style="width: 300rpx;height: 300rpx;" :class="!orderDetails.verify_qrcode?'filter-code':''"></image>
<view class="qrcode-loading" v-else>
<text class="lf-font-40 lf-color-333" :class="!orderDetails.verify_qrcode?'loading-more-text':''"></text>
<view class="lf-m-t-40 lf-color-gray">核销码生成中</view>
</view>
</view> </view>
<view class="lf-m-t-10"> <view class="lf-m-t-10">
<view class="lf-font-28 text-black1"> <view class="lf-font-28 text-black1">
@ -89,31 +77,14 @@
<view class="lf-color-green lf-font-28 lf-flex lf-m-t-10"> <view class="lf-color-green lf-font-28 lf-flex lf-m-t-10">
<text v-if="orderDetails.verify_code && orderDetails.status != 16">待使用</text> <text v-if="orderDetails.verify_code && orderDetails.status != 16">待使用</text>
<text v-if="orderDetails.verify_code && orderDetails.status == 16">已使用</text> <text v-if="orderDetails.verify_code && orderDetails.status == 16">已使用</text>
<!-- <text class="lf-iconfont lf-icon-shuaxin1 lf-font-40"
style="color: #999;position: relative;left: 84rpx;top: -42rpx;display: inherit;"
@tap="refreshCode()"></text> -->
<!-- <image src="../../static/center/refresh.png"
style="color: #999;position: relative;left: 28rpx;top: 0rpx;display: inherit; width: 30rpx;height: 30rpx;"
@tap="refreshCode()">
</image> -->
</view> </view>
</view>
<!-- <view style="margin-top: 44rpx;" v-else>
<view class="lf-color-999 lf-font-28">
</view>
</view> -->
</view>
</view> </view>
<view class="padding-lr padding-tb-sm bg-white flex justify-between align-center solid-top1 btn-bottom"> <view class="padding-lr padding-tb-sm bg-white flex justify-between align-center solid-top1 btn-bottom">
<view class="flex align-center"> <view class="flex align-center">
<text class="lf-color-555 lf-font-28" style="margin-right: 20rpx;">实付款</text> <text class="lf-color-555 lf-font-28" style="margin-right: 20rpx;">实付款</text>
<lf-price :price="orderDetails.price" /> <lf-price :price="orderDetails.price" />
</view> </view>
<!-- <button class="btn bg-green" v-if="orderDetails.status == 2 || orderDetails.status == 3">
<text class="lf-font-32 text-white">立即使用</text>
</button> -->
<button class="btn bg-green" v-if="orderDetails.status == 0" @click="payAtonce()"> <button class="btn bg-green" v-if="orderDetails.status == 0" @click="payAtonce()">
<text class="lf-font-32 text-white">立即付款</text> <text class="lf-font-32 text-white">立即付款</text>
</button> </button>
@ -122,10 +93,6 @@
<text class="lf-font-32 text-white">支付尾款</text> <text class="lf-font-32 text-white">支付尾款</text>
</button> </button>
<!-- <button class="btn bg-blue" v-if="orderDetails.status == 16">
<text class="lf-font-32 text-white">已使用</text>
</button> -->
<button class="btn lf-bg-gray" v-if="orderDetails.status == 6"> <button class="btn lf-bg-gray" v-if="orderDetails.status == 6">
<text class="lf-font-32 text-white">等待审核</text> <text class="lf-font-32 text-white">等待审核</text>
</button> </button>
@ -145,10 +112,6 @@
<button class="btn lf-bg-gray" v-if="orderDetails.status == -1"> <button class="btn lf-bg-gray" v-if="orderDetails.status == -1">
<text class="lf-font-32 text-white">已取消</text> <text class="lf-font-32 text-white">已取消</text>
</button> </button>
<!-- <button class="btn lf-bg-gray" v-else>
<text class="lf-font-32 text-white">{{orderDetails.status_text}}</text>
</button> -->
</view> </view>
</view> </view>
</block> </block>
@ -252,6 +215,24 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.loading-more-text::before {
height: 60rpx;
width: 60rpx;
}
.qrcode-loading {
width: 300rpx;
height: 300rpx;
background-color: rgba(25, 152, 254, 0.05);
display: flex;
align-items: center;
text-align: center;
flex-direction: column;
justify-content: center;
border-radius: 10rpx;
}
.filter-code{
filter: blur(6rpx);
}
.btn{ .btn{
margin: 0; margin: 0;
padding: 0; padding: 0;

7
pages/search/search.vue

@ -9,7 +9,7 @@
历史搜索 历史搜索
</view> </view>
<view class="lf-flex lf-flex-wrap lf-p-l-20 lf-p-r-20"> <view class="lf-flex lf-flex-wrap lf-p-l-20 lf-p-r-20">
<view class="search-tag" v-for="i of historySearch" @click="gosearch(i)">{{i}}</view>
<view class="search-tag" v-for="(i,index) of historySearch" :key="index" @click="gosearch(i)">{{i}}</view>
</view> </view>
</view> </view>
<view class="history-card" v-else> <view class="history-card" v-else>
@ -39,9 +39,8 @@
}) })
}, },
setSearch() { setSearch() {
console.log(this.searchContent)
// let list = [];
list.push(this.searchContent)
list.push(this.searchContent);
list = [...new Set(list)];
uni.navigateTo({ uni.navigateTo({
url: '/pages/search/searchList?serach_content=' + this.searchContent url: '/pages/search/searchList?serach_content=' + this.searchContent
}) })

2
pages/search/searchList.vue

@ -12,7 +12,7 @@
<u-icon name="arrow-down" style="font-size: 20rpx;" :class="sort==0?'lf-color-blue':''"></u-icon> <u-icon name="arrow-down" style="font-size: 20rpx;" :class="sort==0?'lf-color-blue':''"></u-icon>
</view> </view>
</view> </view>
<swiper :style="{height: '800rpx', width: '750rpx'}" :current="current" @change="swiperChange">
<swiper :style="{height: '1300rpx', width: '750rpx'}" :current="current" @change="swiperChange">
<swiper-item v-for="(tabItem, tabIndex) in tab_list" :key="tabIndex"> <swiper-item v-for="(tabItem, tabIndex) in tab_list" :key="tabIndex">
<scroll-view class="com" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="tabItem.isRefresher" @scrolltolower="onScrolltolower" @refresherrefresh="onRefresherrefresh"> <scroll-view class="com" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="tabItem.isRefresher" @scrolltolower="onScrolltolower" @refresherrefresh="onRefresherrefresh">
<view class="lf-m-t-20"></view> <view class="lf-m-t-20"></view>

Loading…
Cancel
Save