Browse Source

代码冗余删除

master
Enzo 4 years ago
parent
commit
72c45c469a
  1. 16
      pages/order/apply-details.vue
  2. 32
      pages/order/apply-refund.vue
  3. 7
      pages/order/confirm-order.vue
  4. 7
      pages/order/index.vue
  5. 14
      pages/order/order-details.vue
  6. 12
      pages/order/unpay-details.vue

16
pages/order/apply-details.vue

@ -15,9 +15,6 @@
<view class="flex justify-between" style="margin-top: 28rpx;">
<lf-price :price="orderDetails.order.selling_price" style="margin-top: 8rpx;" />
<!-- <view class="text-red text-price lf-font-42 lf-font-bold" style="margin-top: 16rpx;">
{{orderDetails.order.selling_price}}
</view> -->
<view>
<button class="cu-btn line-gray bg-white border round margin-left-sm lf-font-28">等待审核</button>
</view>
@ -63,7 +60,6 @@
<text class="text-gray lf-font-32">订单编号</text>
<view>
<text class="lf-font-32 text-black">{{orderDetails.order_sn}}</text>
<!-- <text class="text-orange lf-font-28" @tap="copy(orderDetails.order_sn)">复制</text> -->
</view>
</view>
<view class="padding-lr bg-white" style="padding-top: 30rpx;">
@ -108,11 +104,6 @@
data() {
return {
skeletonLoading: true,
loading: false,
//
hostImg: '',
//
serverImg:'',
order_id:1,
orderDetails: {},
checkArea: '',
@ -143,11 +134,8 @@
this.images = res.data.refund.images
this.checkAreaId = res.data.agreement.article_id
this.skeletonLoading = false
}
}).catch(err => {
});
}
})
},
//
showImg(index) {

32
pages/order/apply-refund.vue

@ -15,9 +15,6 @@
<view class="flex justify-between" style="margin-top: 44rpx;">
<lf-price :price="applyDetails.order.selling_price" />
<!-- <view class="text-red text-price lf-font-42 lf-font-bold">
{{applyDetails.order.selling_price}}
</view> -->
</view>
</view>
</view>
@ -84,11 +81,6 @@
<textarea :cursor-spacing="120" :adjust-position="true" type="text" v-model="applyInfo" class="text-left lf-font-32 area-self" placeholder="请输入反馈信息" />
</view>
</view>
<!-- <view class="padding bg-white">
<view class="cu-self menu">
<view class="lf-font-32 text-gray">请上传退款凭证</view>
</view>
</view> -->
<view class="cu-form-group">
<view class="grid col-4 grid-square flex-sub">
<view style="width: 212rpx;height: 212rpx;border-radius: 10rpx;" class="bg-img" v-for="(item,index) in img_list" :key="index" @tap="showImg(index)" :data-url="img_list[index]">
@ -101,14 +93,6 @@
<text class='cuIcon-cameraadd'></text>
</view>
</view>
<!-- <view class="grid col-4 grid-square flex-sub">
<view class="solids" @tap="ChooseImage" v-if="hostImg == ''"><text class="cuIcon-cameraadd"></text></view>
<view class="bg-img" v-else>
<image :src="hostImg" @tap="showImg" mode="aspectFill"></image>
<view class="cu-tag bg-red" @tap.stop="DelImg"><text class="cuIcon-close"></text></view>
</view>
</view> -->
</view>
<view class="padding-lr-lg" style="margin-top: 80rpx;">
@ -134,8 +118,6 @@
loading: false,
//
hostImg: '',
//
serverImg:'',
order_id: 1,
applyDetails: {},
applyInfo: '',
@ -166,12 +148,8 @@
if(res.code == 0) {
this.applyDetails = res.data
this.skeletonLoading = false
console.log(this.applyDetails)
}
}).catch(err => {
});
}
})
},
checkImgInfo(tempFilePath, suc){
uni.getImageInfo({
@ -206,11 +184,6 @@
sourceType: ['album', 'camera'], // album camera 使
success: res => {
that.hostImg = res.tempFilePaths[0];
console.log('元数据')
console.log(res)
// this.upload(this.hostImg)
let tempFile = res.tempFiles.shift();
let tempFilePath = res.tempFilePaths.shift();
that.checkImgInfo(tempFilePath, (res) => {
@ -332,7 +305,6 @@
current: index
})
}, 200);
// let image = this.img_list[index];
},
//

7
pages/order/confirm-order.vue

@ -67,9 +67,8 @@
</view> -->
</view>
<button class="cu-btn block bg-orange round shadow" @tap="submit">
<text class="cuIcon-loading2 cuIconfont-spin margin-right-xs text-white" v-if="loading"></text>
<text class="lf-font-32 text-white" v-if="type == 1">{{ loading ? '支付中...' : '立即付款' }}</text>
<text class="lf-font-32 text-white" v-else>{{ loading ? '支付中...' : '下单付款' }}</text>
<text class="lf-font-32 text-white" v-if="type == 1">立即付款</text>
<text class="lf-font-32 text-white" v-else>下单付款</text>
</button>
</view>
</view>
@ -86,9 +85,7 @@
data() {
return {
num: 1,
base64Img: '', //
skeletonLoading: true,
loading: false,
checkbox: [{
value: 'A',
checked: true

7
pages/order/index.vue

@ -3,7 +3,6 @@
<!-- 当设置tab-width,指定每个tab宽度时,则不使用flex布局,改用水平滑动 -->
<view class="padding-lr" style="margin-bottom: 10rpx;margin-top: 20rpx;">
<me-tabs v-model="current" :tabs="tab_list" :fixed="true" @change="change"></me-tabs>
<!-- <u-tabs :list="tab_list" :is-scroll="true" :show-bar="false" :current="current" @change="change"></u-tabs> -->
</view>
<view class="com" v-for="(tab, tabIndex) in tab_list" v-if="tabIndex == current" :key="tab.id">
<view class="flex-direction justify-around list" v-for="(item, index) in tab.list" :key="item.id" @tap="goDetails(tabIndex,index)">
@ -19,10 +18,6 @@
<text class="bought">x {{item.number}}</text>
</view>
<view class="lf-row-between price" style="padding-right: 6rpx;">
<!-- <text class="lf-font-bold">
<text class="lf-font-24"></text>
<text class="lf-font-42">{{item.selling_price}}</text>
</text> -->
<lf-price :price="item.selling_price" style="margin-top: 10rpx;" />
<button v-if="item.state==1" @tap.stop="$routerGo('/pages/order/confirm-order?type=1&goods_id='+item.goods_id+'&goods_specs_id='+item.goods_specs_id +'&order_id='+ item.id)">立即付款</button>
<button v-if="item.state==2" class="cu-btn bg-green round margin-left-sm" @tap="$routerGo('/pages/order/order-details?order_id='+item.id)">立即使用</button>
@ -140,8 +135,6 @@
this.getUserOrder();
},
goDetails(tabIndex,index) {
// this.$routerGo('/pages/order/order-details?order_id=55')
console.log(tabIndex,index)
let item = this.tab_list[tabIndex].list[index]
if (item.state == 1) {

14
pages/order/order-details.vue

@ -4,7 +4,6 @@
<block v-if="isRight(orderDetails)">
<view class="bg-white">
<skeleton :loading="skeletonLoading" :row="2" :showAvatar="false" :showTitle="true">
<view class="flex justify-between align-start" style="padding: 32rpx 32rpx 30rpx 32rpx;">
<image :src="orderDetails.goods.cover" mode="aspectFill" style="width: 240rpx; height: 240rpx;border-radius: 10rpx;"></image>
<view class="flex-sub padding-left-sm">
@ -15,9 +14,6 @@
<view class="flex justify-between" style="margin-top: 28rpx;">
<lf-price :price="orderDetails.selling_price" style="margin-top: 8rpx;" />
<!-- <view class="text-red text-price lf-font-42 lf-font-bold" style="margin-top: 16rpx;">
{{Number(orderDetails.selling_price || 0)}}
</view> -->
<view>
<button v-if="orderDetails.state == 2" class="cu-btn line-orange text-orange round margin-left-sm lf-font-28" @tap="$routerGo('/pages/order/apply-refund?order_id='+orderDetails.id)">申请退款</button>
<button v-else class="cu-btn line-gray bg-white border round margin-left-sm lf-font-28">{{orderDetails.state_text.text}}</button>
@ -67,7 +63,6 @@
<view>
<tki-qrcode ref="qrcode" @result="qrR" :val="checkArea" :size="115" unit="px" background="#fff" foreground="#000"
pdground="#000" :onval="true" :loadMake="true" />
<!-- :icon="require('@/static/images/system/user-default.jpg')" -->
</view>
<view class="flex justify-around align-center text-center" style="margin-top: 10rpx;">
<view @tap="refreshCode()" v-if="orderDetails.state==2">
@ -87,11 +82,6 @@
<view class="flex align-center">
<text class="text-gray lf-font-28" style="margin-right: 20rpx;">实付款</text>
<lf-price :price="orderDetails.amount" />
<!-- <view class="text-red text-price lf-font-42 lf-font-bold">
{{Number(orderDetails.amount || 0)}}
</view> -->
</view>
<view class="lf-font-32 text-black1">
{{orderDetails.state_text.text}}
@ -153,7 +143,9 @@
}
}).catch(err => {
setTimeout(() => {
this.$toBack()
},1000)
});
},
//

12
pages/order/unpay-details.vue

@ -16,9 +16,6 @@
<view class="flex justify-between" style="margin-top: 28rpx;">
<lf-price :price="orderDetails.selling_price" />
<!-- <view class="text-red text-price lf-font-42 lf-font-bold" style="margin-top: 16rpx;">
{{Number(orderDetails.selling_price || 0)}}
</view> -->
<view>
<button v-if="orderDetails.state == 2" class="cu-btn line-orange text-orange round margin-left-sm lf-font-28" @tap="$routerGo('/pages/order/apply-refund?order_id='+orderDetails.id)">申请退款</button>
<button v-if="orderDetails.state == 5" class="cu-btn line-gray bg-white border round margin-left-sm lf-font-28">{{orderDetails.state_text.text}}</button>
@ -72,9 +69,7 @@
export default {
data() {
return {
base64Img: '', //
skeletonLoading: true,
loading: false,
order_id:1,
orderDetails: {},
}
@ -101,10 +96,11 @@
if(res.code == 0) {
this.orderDetails = res.data
this.skeletonLoading = false
}
}
}).catch(err => {
setTimeout(() => {
this.$toBack()
},1000)
});
},
//

Loading…
Cancel
Save