| xqd
@@ -23,17 +23,18 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view>
|
|
|
+ <view style="background-color: #f9f9f9;">
|
|
|
<view class="card" v-for="(item,index) in orderList" :key="index" @click="goOrderDetail(item.id)">
|
|
|
<view class="toptitle">
|
|
|
<view>订单号:{{item.order_no}}</view>
|
|
|
|
|
|
<view v-if="item.status == 1 && item.is_virtual == 0">待兑换</view>
|
|
|
<view v-if="item.status == 2 && item.is_virtual == 0 && item.express_type == 1">待发货</view>
|
|
|
+ <view v-if="item.status == 2 && item.is_virtual == 0 && item.express_type == 2">待核销</view>
|
|
|
<view v-if="item.status == 3 && item.is_virtual == 0 && item.express_type == 1">待收货</view>
|
|
|
<view v-if="item.status == 3 && item.is_virtual == 1">待核销</view>
|
|
|
<view v-if="item.status == 3 && item.is_virtual == 0 && item.express_type == 2">待核销</view>
|
|
|
- <view v-if="item.status == 4 && item.is_virtual == 0 && item.express_type == 1" >已完成</view>
|
|
|
+ <view v-if="item.status == 4 && item.is_virtual == 0 && item.express_type == 1">已完成</view>
|
|
|
<view v-if="item.status == 4 && item.is_virtual == 1">已核销</view>
|
|
|
<view v-if="item.status == 4 && item.is_virtual == 0 && item.express_type == 2">已核销</view>
|
|
|
</view>
|
| xqd
@@ -41,19 +42,25 @@
|
|
|
<image :src="item.img_urls"></image>
|
|
|
<view style="margin-left: 24rpx;">
|
|
|
<text class="name">{{item.product_name}}</text>
|
|
|
- <!-- <text class="tag">礼盒装 2000积分</text> -->
|
|
|
+ <text class="tag" v-if="item.source_type == 3">{{item.integral}}积分</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="points">
|
|
|
<text class="totalName" style="margin-right: 50rpx;">共{{item.product_num}}件</text>
|
|
|
- <text class="totalName" v-if="item.integral != 0">共计:</text>
|
|
|
- <text class="totalContent" v-if="item.integral !=0">2000积分</text>
|
|
|
+ <text class="totalName" v-if="item.source_type == 3">共计:</text>
|
|
|
+ <text class="totalContent" v-if="item.source_type == 3">{{item.integral}}积分</text>
|
|
|
</view>
|
|
|
<view class="btn">
|
|
|
- <view class="btnitem" @click.stop="openVFcode" v-if="item.status == 3 && item.is_virtual == 1">
|
|
|
+ <view class="btnitem" @click.stop="openVFcode(item.check_qrcode)"
|
|
|
+ v-if="item.status == 3 && item.is_virtual == 1">
|
|
|
<text>核销码</text>
|
|
|
</view>
|
|
|
- <view class="btnitem" @click.stop="openVFcode" v-if="item.status == 3 && item.is_virtual == 0&&item.express_type == 2">
|
|
|
+ <view class="btnitem" @click.stop="openVFcode(item.check_qrcode)"
|
|
|
+ v-if="item.status == 3 && item.is_virtual == 0&&item.express_type == 2">
|
|
|
+ <text>核销码</text>
|
|
|
+ </view>
|
|
|
+ <view class="btnitem" @click.stop="openVFcode(item.check_qrcode)"
|
|
|
+ v-if="item.status ==2 && item.is_virtual == 0&&item.express_type == 2">
|
|
|
<text>核销码</text>
|
|
|
</view>
|
|
|
<view class="btnitem" v-if="item.status == 1">
|
| xqd
@@ -80,7 +87,7 @@
|
|
|
<view class="title"><text>核销码</text></view>
|
|
|
<view style="margin-left:30rpx;width: 580rpx;height: 2rpx;background: #F0F0F0;"></view>
|
|
|
<view class="img">
|
|
|
- <image :src="qrcode"></image>
|
|
|
+ <image :src="check_qrcode"></image>
|
|
|
</view>
|
|
|
<view class="btn">
|
|
|
<view class="cancel" @click="closeVFcode"><text>取消</text></view>
|
| xqd
@@ -98,7 +105,7 @@
|
|
|
data() {
|
|
|
return {
|
|
|
//核销码
|
|
|
- qrcode: 12231231, //二维码内容(扫码识别后需要访问的网址)
|
|
|
+ check_qrcode: '', //二维码内容(扫码识别后需要访问的网址)
|
|
|
// 搜索
|
|
|
search: '',
|
|
|
// 分段器标题
|
| xqd
@@ -195,13 +202,11 @@
|
|
|
})
|
|
|
},
|
|
|
// 打开弹出层
|
|
|
- openVFcode() {
|
|
|
+ openVFcode(check_qrcode) {
|
|
|
+ console.log(check_qrcode, '----->check_qrcode');
|
|
|
+ this.check_qrcode = check_qrcode
|
|
|
this.$refs.popup.open()
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
// 关闭弹出层
|
|
|
closeVFcode() {
|
| xqd
@@ -209,27 +214,43 @@
|
|
|
},
|
|
|
// 保存图片
|
|
|
handleDownImg() {
|
|
|
- this.$refs.popup.close()
|
|
|
- // const that = this;
|
|
|
- // uni.downloadFile({
|
|
|
- // url:'网络路径',
|
|
|
- // success: res => {
|
|
|
- // if (res.statusCode === 200) {
|
|
|
- // uni.saveImageToPhotosAlbum({
|
|
|
- // filePath: res.tempFilePath,
|
|
|
- // success: function() {
|
|
|
- // this.tools.toast('保存成功');
|
|
|
- // this.$refs.popup.close()
|
|
|
- // },
|
|
|
- // fail: function() {
|
|
|
- // this.tools.toast('保存失败,请稍后重试');
|
|
|
- // }
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // this.tools.toast('下载失败');
|
|
|
- // }
|
|
|
- // }
|
|
|
- // });
|
|
|
+ uni.showLoading({
|
|
|
+ title: "保存中..."
|
|
|
+ })
|
|
|
+ const that = this;
|
|
|
+ uni.downloadFile({
|
|
|
+ url: that.check_qrcode,
|
|
|
+ success: res => {
|
|
|
+ if (res.statusCode === 200) {
|
|
|
+ uni.hideLoading()
|
|
|
+ uni.saveImageToPhotosAlbum({
|
|
|
+ filePath: res.tempFilePath,
|
|
|
+ success: function() {
|
|
|
+ uni.showToast({
|
|
|
+ title: '已保存到相册',
|
|
|
+ icon: 'success',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ this.$refs.popup.close()
|
|
|
+ },
|
|
|
+ fail: function() {
|
|
|
+ uni.showToast({
|
|
|
+ title: '保存失败,请稍后重试',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.hideLoading()
|
|
|
+ uni.showToast({
|
|
|
+ title: '下载失败',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
}
|