|
@@ -44,8 +44,8 @@
|
|
|
<view class="order-info">
|
|
|
<u-cell-group :border="false">
|
|
|
<u-cell-item title="商品金额" :value="'¥' + orderData.orderSum" :arrow="false" :border-bottom="false"></u-cell-item>
|
|
|
- <u-cell-item title="积分抵扣" :value="'-¥' + orderData.integralAmount" :arrow="false" :border-bottom="false" v-if="goodType == 1"></u-cell-item>
|
|
|
- <u-cell-item title="优惠券" :value="'-¥' + orderData.couponDiscountAmount" :arrow="false" :border-bottom="false" v-if="goodType == 1"></u-cell-item>
|
|
|
+ <u-cell-item title="积分抵扣" :value="'-¥' + orderData.integralAmount" :arrow="false" :border-bottom="false" v-if="goodType == 1 || goodType == 3"></u-cell-item>
|
|
|
+ <u-cell-item title="优惠券" :value="'-¥' + orderData.couponDiscountAmount" :arrow="false" :border-bottom="false" v-if="goodType == 1 || goodType == 3"></u-cell-item>
|
|
|
<u-cell-item title="备注" :value="orderData.notes" :arrow="false" :border-bottom="false"></u-cell-item>
|
|
|
</u-cell-group>
|
|
|
</view>
|
|
@@ -205,21 +205,41 @@
|
|
|
}
|
|
|
if (this.orderData.merchantInfoResVO.products.length && this.orderData.merchantInfoResVO.products[0].productType !=
|
|
|
2 && this.orderData.merchantInfoResVO.products[0].productType != 4) {
|
|
|
- this.goodType = 1
|
|
|
+ if (this.orderData.merchantInfoResVO.products[0].productType != 3) {
|
|
|
+ this.goodType = 1
|
|
|
+ } else {
|
|
|
+ this.goodType = 3
|
|
|
+ }
|
|
|
} else {
|
|
|
this.goodType = 2
|
|
|
}
|
|
|
switch (JSON.stringify(this.orderData.orderStatus)) {
|
|
|
case '1':
|
|
|
- this.buttonGroup = [{
|
|
|
- text: '取消订单',
|
|
|
- backgroundColor: '#75BD60',
|
|
|
- color: '#fff'
|
|
|
- }, {
|
|
|
- text: '立即支付',
|
|
|
- backgroundColor: '#52A63A',
|
|
|
- color: '#fff'
|
|
|
- }]
|
|
|
+ if (this.goodType == 3) {
|
|
|
+ this.buttonGroup = [{
|
|
|
+ text: '取消订单',
|
|
|
+ backgroundColor: '#75BD60',
|
|
|
+ color: '#fff'
|
|
|
+ }, {
|
|
|
+ text: '立即支付',
|
|
|
+ backgroundColor: '#52A63A',
|
|
|
+ color: '#fff'
|
|
|
+ }, {
|
|
|
+ text: '自助采摘',
|
|
|
+ backgroundColor: '#75BD60',
|
|
|
+ color: '#fff'
|
|
|
+ }]
|
|
|
+ } else {
|
|
|
+ this.buttonGroup = [{
|
|
|
+ text: '取消订单',
|
|
|
+ backgroundColor: '#75BD60',
|
|
|
+ color: '#fff'
|
|
|
+ }, {
|
|
|
+ text: '立即支付',
|
|
|
+ backgroundColor: '#52A63A',
|
|
|
+ color: '#fff'
|
|
|
+ }]
|
|
|
+ }
|
|
|
break;
|
|
|
case '2':
|
|
|
var someVaule = this.orderData.merchantInfoResVO.products.some(v => {
|
|
@@ -420,6 +440,9 @@
|
|
|
this.modalContent = '请确定是否立即支付'
|
|
|
this.handleType = 2
|
|
|
this.modalShow = true
|
|
|
+ } else if (e.index == 2) {
|
|
|
+ // 跳转自助采摘
|
|
|
+ this.goPickVideo()
|
|
|
}
|
|
|
} else {
|
|
|
if (e.index == 0) {
|
|
@@ -438,33 +461,8 @@
|
|
|
})
|
|
|
} else {
|
|
|
if (this.orderData.orderStatus == 2) {
|
|
|
- var that=this;
|
|
|
- if(uni.getStorageSync("firstTimeLiveUser")==""){
|
|
|
- uni.setStorage({
|
|
|
- key: 'firstTimeLiveUser',
|
|
|
- data: 1
|
|
|
- })
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pagesGood/pickVideo?orderId=' + that.orderData.orderId + '&tenantCode=' + that.orderData.tenantCode
|
|
|
- });
|
|
|
- }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
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
// 自助采摘
|
|
|
+ this.goPickVideo()
|
|
|
} else if (this.orderData.orderStatus == 3) {
|
|
|
if (e.index == 1) {
|
|
|
// 确认收货
|
|
@@ -537,9 +535,15 @@
|
|
|
paySign: res.data.paySign,
|
|
|
success: (payRes) => {
|
|
|
console.log('success:' + JSON.stringify(payRes));
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pagesMain/paySuccess?orderId=' + this.orderData.orderId
|
|
|
- });
|
|
|
+ if (this.goodType == 3) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pagesMain/paySuccess?orderId=' + this.orderData.orderId + '&goodType=' + this.goodType + '&tenantCode=' + this.orderData.tenantCode
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pagesMain/paySuccess?orderId=' + this.orderData.orderId
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
fail: (error) => {
|
|
|
console.log('fail:' + JSON.stringify(error));
|
|
@@ -585,6 +589,34 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ // 跳转自助采摘直播
|
|
|
+ goPickVideo() {
|
|
|
+ var that=this;
|
|
|
+ if(uni.getStorageSync("firstTimeLiveUser")==""){
|
|
|
+ uni.setStorage({
|
|
|
+ key: 'firstTimeLiveUser',
|
|
|
+ data: 1
|
|
|
+ })
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pagesGood/pickVideo?orderId=' + that.orderData.orderId + '&tenantCode=' + that.orderData.tenantCode
|
|
|
+ });
|
|
|
+ }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
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
// 跳转留言列表
|
|
|
goToMessage() {
|
|
|
uni.navigateTo({
|