|
@@ -1,71 +1,69 @@
|
|
|
<template>
|
|
|
- <view class="container">
|
|
|
- <view class="order-row" @click="goToOrderDetail()">
|
|
|
- <view class="shop-info" v-if="orderData" @click.stop="gotoShop()">
|
|
|
- <text class="iconfont icondianpu"></text>
|
|
|
- <text class="shop-name">{{orderData.supplierName}}</text>
|
|
|
- <text class="iconfont iconfangxiang" v-if="orderData.tenantCode != 'admin'"></text>
|
|
|
- <text class="order-type">{{orderData.auctionStatus == null ? getOrderType(orderData.orderStatus) : getAuctionType(orderData.auctionStatus,orderData.orderStatus)}}</text>
|
|
|
- </view>
|
|
|
- <view class="goods-list" v-if="orderData">
|
|
|
- <view class="goods-row" v-for="(site, index) in orderData.products" :key="index">
|
|
|
- <image class="goods-img" :src="site.imgUrl" mode="aspectFill"></image>
|
|
|
- <view class="goods-info">
|
|
|
- <view class="goods-name">{{site.productName}}</view>
|
|
|
- <view class="goods-type">
|
|
|
- 类型:{{site.productType == 1 ? '普通商品' : (site.productType == 2 ? '拍卖' : (site.productType == 3 ? '自助采摘' : '共享种植'))}}
|
|
|
- </view>
|
|
|
- <view class="goods-price-number">
|
|
|
- <text class="goods-unit">¥</text>
|
|
|
- <text class="goods-price">{{site.bizPrice}}</text>
|
|
|
- <text class="goods-number">x{{site.buyNum}}</text>
|
|
|
+ <view>
|
|
|
+ <view class="order-row" @click="goToOrderDetail()">
|
|
|
+ <view class="shop-info" v-if="orderData" @click.stop="gotoShop()">
|
|
|
+ <text class="iconfont icondianpu"></text>
|
|
|
+ <text class="shop-name">{{orderData.supplierName}}</text>
|
|
|
+ <text class="iconfont iconfangxiang" v-if="orderData.tenantCode != 'admin'"></text>
|
|
|
+ <text class="order-type">{{orderData.auctionStatus == null ? getOrderType(orderData.orderStatus) : getAuctionType(orderData.auctionStatus,orderData.orderStatus)}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="goods-list" v-if="orderData">
|
|
|
+ <view class="goods-row" v-for="(site, index) in orderData.products" :key="index">
|
|
|
+ <image class="goods-img" :src="site.imgUrl" mode="aspectFill"></image>
|
|
|
+ <view class="goods-info">
|
|
|
+ <view class="goods-name">{{site.productName}}</view>
|
|
|
+ <view class="goods-type">
|
|
|
+ 类型:{{site.productType == 1 ? '普通商品' : (site.productType == 2 ? '拍卖' : (site.productType == 3 ? '自助采摘' : '共享种植'))}}
|
|
|
+ </view>
|
|
|
+ <view class="goods-price-number">
|
|
|
+ <text class="goods-unit">¥</text>
|
|
|
+ <text class="goods-price">{{site.bizPrice}}</text>
|
|
|
+ <text class="goods-number">x{{site.buyNum}}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="pay-info">总价¥{{getAllPrice()}},实付¥{{orderData.paySum}}</view>
|
|
|
- <view class="handle-box" v-if="tabIndex > 1">
|
|
|
- <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
- v-if="tabIndex == 2" @click.stop="handleOrder(1)">取消订单</u-button>
|
|
|
- <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
- v-if="tabIndex == 2" @click.stop="handleOrder(2)">立即支付</u-button>
|
|
|
- <!-- <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
+ <view class="pay-info">总价¥{{getAllPrice()}},实付¥{{orderData.paySum}}</view>
|
|
|
+ <view class="handle-box" v-if="tabIndex > 1">
|
|
|
+ <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
+ v-if="tabIndex == 2" @click.stop="handleOrder(1)">取消订单</u-button>
|
|
|
+ <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
+ v-if="tabIndex == 2" @click.stop="handleOrder(2)">立即支付</u-button>
|
|
|
+ <!-- <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
v-if="tabIndex != 1 && tabIndex != 2" @click.stop="handleOrder(3)">申请售后</u-button> -->
|
|
|
- <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
- v-if="(tabIndex == 2 || tabIndex == 3) && pickHandle" @click.stop="handleOrder(4)">自助采摘</u-button>
|
|
|
- <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
- v-if="tabIndex == 3 && sharePlant" @click.stop="handleOrder(8)">我的种植</u-button>
|
|
|
- <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
- v-if="tabIndex == 4 && sharePlant" @click.stop="handleOrder(8)">我的种植</u-button>
|
|
|
- <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
- v-if="tabIndex == 4" @click.stop="handleOrder(5)">确认收货</u-button>
|
|
|
- <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
- v-if="tabIndex == 4" @click.stop="handleOrder(6)">追踪物流</u-button>
|
|
|
- <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
- v-if="tabIndex == 5 && sharePlant" @click.stop="handleOrder(8)">我的种植</u-button>
|
|
|
- <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
- v-if="tabIndex == 5 && orderData.evaluateStatus == 1" @click.stop="handleOrder(7)">评价</u-button>
|
|
|
- </view>
|
|
|
- <u-modal v-model="modalShow" :content="modalContent" @confirm="submitHandle" :async-close="true" :show-cancel-button="true"></u-modal>
|
|
|
- <u-top-tips ref="uTips"></u-top-tips>
|
|
|
-
|
|
|
- </view>
|
|
|
- <view class="uni-popup-dialog" :hidden="show_qx">
|
|
|
- <view class="uni-dialog-title">
|
|
|
- <text class="uni-dialog-title-text">提示</text>
|
|
|
+ <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
+ v-if="(tabIndex == 2 || tabIndex == 3) && pickHandle" @click.stop="handleOrder(4)">自助采摘</u-button>
|
|
|
+ <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
+ v-if="tabIndex == 3 && sharePlant" @click.stop="handleOrder(8)">我的种植</u-button>
|
|
|
+ <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
+ v-if="tabIndex == 4 && sharePlant" @click.stop="handleOrder(8)">我的种植</u-button>
|
|
|
+ <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
+ v-if="tabIndex == 4" @click.stop="handleOrder(5)">确认收货</u-button>
|
|
|
+ <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
+ v-if="tabIndex == 4" @click.stop="handleOrder(6)">追踪物流</u-button>
|
|
|
+ <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
+ v-if="tabIndex == 5 && sharePlant" @click.stop="handleOrder(8)">我的种植</u-button>
|
|
|
+ <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
|
|
|
+ v-if="tabIndex == 5 && orderData.evaluateStatus == 1" @click.stop="handleOrder(7)">评价</u-button>
|
|
|
+ </view>
|
|
|
+ <u-modal v-model="modalShow" :content="modalContent" @confirm="submitHandle" :async-close="true" :show-cancel-button="true"></u-modal>
|
|
|
+ <u-top-tips ref="uTips"></u-top-tips>
|
|
|
</view>
|
|
|
- <view class="uni-dialog-content">
|
|
|
- <text class="uni-dialog-content-text">请在设置中开启摄像头权限和麦克风权限</text>
|
|
|
+ <view class="uni-popup-dialog" :hidden="show_qx">
|
|
|
+ <view class="uni-dialog-title">
|
|
|
+ <text class="uni-dialog-title-text">提示</text>
|
|
|
+ </view>
|
|
|
+ <view class="uni-dialog-content">
|
|
|
+ <text class="uni-dialog-content-text">请在设置中开启摄像头权限和麦克风权限</text>
|
|
|
+ </view>
|
|
|
+ <view class="uni-dialog-button-group">
|
|
|
+ <button class="uni-dialog-button uni-border-left" open-type="openSetting" @click="closeSetting">
|
|
|
+ 设置权限
|
|
|
+ </button>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="uni-dialog-button-group">
|
|
|
- <button class="uni-dialog-button uni-border-left" open-type="openSetting" @click="closeSetting">
|
|
|
- 设置权限
|
|
|
- </button>
|
|
|
+ <view class="qx_bg" :hidden="show_qx">
|
|
|
</view>
|
|
|
-
|
|
|
- </view>
|
|
|
- <view class="qx_bg" :hidden="show_qx">
|
|
|
- </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -104,7 +102,7 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- show_qx:true,
|
|
|
+ show_qx: true,
|
|
|
pickHandle: false,
|
|
|
sharePlant: false,
|
|
|
modalShow: false,
|
|
@@ -119,17 +117,17 @@
|
|
|
this.goodType = this.pickHandle ? 3 : ''
|
|
|
},
|
|
|
methods: {
|
|
|
- closeSetting:function(){
|
|
|
- this.show_qx=true;
|
|
|
+ closeSetting: function() {
|
|
|
+ this.show_qx = true;
|
|
|
},
|
|
|
// 跳转商铺
|
|
|
gotoShop() {
|
|
|
if (this.orderData.tenantCode != 'admin') {
|
|
|
- if (this.orderData.products.length) {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pagesGood/shopDetails?goodId=' + this.orderData.products[0].productId
|
|
|
- });
|
|
|
- }
|
|
|
+ if (this.orderData.products.length) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pagesGood/shopDetails?goodId=' + this.orderData.products[0].productId
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
// 获取订单总价
|
|
@@ -198,8 +196,8 @@
|
|
|
} else if (type == 4) {
|
|
|
// 自助采摘
|
|
|
// #ifdef MP-WEIXIN
|
|
|
- var that=this;
|
|
|
- if(uni.getStorageSync("firstTimeLiveUser")==""){
|
|
|
+ var that = this;
|
|
|
+ if (uni.getStorageSync("firstTimeLiveUser") == "") {
|
|
|
uni.setStorage({
|
|
|
key: 'firstTimeLiveUser',
|
|
|
data: 1
|
|
@@ -207,23 +205,23 @@
|
|
|
uni.navigateTo({
|
|
|
url: '/pagesGood/pickVideo?orderId=' + that.orderData.orderId + '&tenantCode=' + that.orderData.tenantCode
|
|
|
});
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
wx.getSetting({
|
|
|
- success(res) {
|
|
|
- /*if (!res.authSetting['scope.camera']){
|
|
|
- that.show_qx=false;
|
|
|
- }else*/
|
|
|
- if (!res.authSetting['scope.record']){
|
|
|
- that.show_qx=false;
|
|
|
- }else{
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pagesGood/pickVideo?orderId=' + that.orderData.orderId + '&tenantCode=' + that.orderData.tenantCode
|
|
|
- });
|
|
|
+ success(res) {
|
|
|
+ /*if (!res.authSetting['scope.camera']){
|
|
|
+ that.show_qx=false;
|
|
|
+ }else*/
|
|
|
+ if (!res.authSetting['scope.record']) {
|
|
|
+ that.show_qx = false;
|
|
|
+ } else {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pagesGood/pickVideo?orderId=' + that.orderData.orderId + '&tenantCode=' + that.orderData.tenantCode
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return false;
|
|
|
// #endif
|
|
|
// #ifdef APP-PLUS
|
|
@@ -247,7 +245,8 @@
|
|
|
} else if (type == 8) {
|
|
|
// 去我的种植
|
|
|
uni.navigateTo({
|
|
|
- url: '/pagesGood/goodDetails?minePlant=true&goodId=' + this.orderData.products[0].productId + '&orderId=' + this.orderData.orderId
|
|
|
+ url: '/pagesGood/goodDetails?minePlant=true&goodId=' + this.orderData.products[0].productId + '&orderId=' +
|
|
|
+ this.orderData.orderId
|
|
|
});
|
|
|
}
|
|
|
},
|
|
@@ -283,12 +282,12 @@
|
|
|
mid: uni.getStorageSync("userData").userId,
|
|
|
orderCode: this.orderData.orderCode,
|
|
|
orderId: this.orderData.orderId,
|
|
|
- // #ifdef APP-PLUS
|
|
|
+ // #ifdef APP-PLUS
|
|
|
channel: 2
|
|
|
- //#endif
|
|
|
+ //#endif
|
|
|
}, 'POST').then(res => {
|
|
|
this.modalShow = false
|
|
|
- // #ifdef MP-WEIXIN
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
uni.requestPayment({
|
|
|
provider: 'wxpay',
|
|
|
timeStamp: res.data.timeStamp,
|
|
@@ -303,9 +302,9 @@
|
|
|
// url: '/pagesMain/paySuccess?orderId=' + this.orderData.orderId + '&goodType=' + this.goodType + '&tenantCode=' + this.orderData.tenantCode
|
|
|
// });
|
|
|
// } else {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pagesMain/paySuccess?orderId=' + this.orderData.orderId
|
|
|
- });
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pagesMain/paySuccess?orderId=' + this.orderData.orderId
|
|
|
+ });
|
|
|
// }
|
|
|
},
|
|
|
fail: (error) => {
|
|
@@ -316,12 +315,12 @@
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
- //#endif
|
|
|
-
|
|
|
- // #ifdef APP-PLUS
|
|
|
+ //#endif
|
|
|
+
|
|
|
+ // #ifdef APP-PLUS
|
|
|
uni.requestPayment({
|
|
|
provider: 'wxpay',
|
|
|
- orderInfo:{
|
|
|
+ orderInfo: {
|
|
|
"package": res.data.packageValue,
|
|
|
"appid": res.data.appId,
|
|
|
"sign": res.data.paySign,
|
|
@@ -344,7 +343,7 @@
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
- //#endif
|
|
|
+ //#endif
|
|
|
|
|
|
}).catch(error => {
|
|
|
this.modalShow = false
|
|
@@ -533,7 +532,7 @@
|
|
|
/deep/button {
|
|
|
padding: 0 12px;
|
|
|
border: 1px solid #BFBFBF !important;
|
|
|
- background-color: #FFFFFF!important;
|
|
|
+ background-color: #FFFFFF !important;
|
|
|
color: #333333 !important;
|
|
|
}
|
|
|
}
|
|
@@ -547,6 +546,7 @@
|
|
|
/deep/.u-round-circle {
|
|
|
padding: 0 12px;
|
|
|
}
|
|
|
+
|
|
|
.uni-popup-dialog {
|
|
|
width: 80vw;
|
|
|
border-radius: 15px;
|
|
@@ -557,7 +557,7 @@
|
|
|
z-index: 11;
|
|
|
left: 0px;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.uni-dialog-title {
|
|
|
/* #ifndef APP-NVUE */
|
|
|
display: flex;
|
|
@@ -567,12 +567,12 @@
|
|
|
padding-top: 15px;
|
|
|
padding-bottom: 5px;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.uni-dialog-title-text {
|
|
|
font-size: 16px;
|
|
|
font-weight: 500;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.uni-dialog-content {
|
|
|
/* #ifndef APP-NVUE */
|
|
|
display: flex;
|
|
@@ -583,12 +583,12 @@
|
|
|
padding: 5px 15px 15px 15px;
|
|
|
text-align: center;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.uni-dialog-content-text {
|
|
|
font-size: 14px;
|
|
|
color: #6e6e6e;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.uni-dialog-button-group {
|
|
|
/* #ifndef APP-NVUE */
|
|
|
display: flex;
|
|
@@ -598,55 +598,56 @@
|
|
|
border-top-style: solid;
|
|
|
border-top-width: 1px;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.uni-dialog-button {
|
|
|
/* #ifndef APP-NVUE */
|
|
|
display: flex;
|
|
|
/* #endif */
|
|
|
- background: rgba(0, 0, 0, 0);
|
|
|
- border: none;
|
|
|
+ background: rgba(0, 0, 0, 0);
|
|
|
+ border: none;
|
|
|
flex: 1;
|
|
|
flex-direction: row;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
height: 45px;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.uni-border-left {
|
|
|
border-left-color: #f0f0f0;
|
|
|
border-left-style: solid;
|
|
|
border-left-width: 0px;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.uni-dialog-button-text {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.uni-button-color {
|
|
|
color: #007aff;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.uni-dialog-input {
|
|
|
flex: 1;
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.uni-popup__success {
|
|
|
color: #4cd964;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.uni-popup__warn {
|
|
|
color: #f0ad4e;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.uni-popup__error {
|
|
|
color: #dd524d;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.uni-popup__info {
|
|
|
color: #909399;
|
|
|
}
|
|
|
- .qx_bg{
|
|
|
+
|
|
|
+ .qx_bg {
|
|
|
width: 100vw;
|
|
|
height: 100vh;
|
|
|
background: rgba(0, 0, 0, 0.25);
|