|
@@ -105,27 +105,17 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="bottom acea-row row-right row-middle" v-if="item.status != 2">
|
|
|
- <!-- <view class="icon acea-row row-middle" style="justify-self: flex-start;">
|
|
|
- <view class="iconfont icon-dianhua" @click.stop="call(item.store.phone)"></view>
|
|
|
- <view class="iconfont icon-dingwei2" @click.stop="showMaoLocation(tem.store)"></view>
|
|
|
- </view> -->
|
|
|
<view class="bnt cancelBnt" v-if="item.status == 0 || item.status==1"
|
|
|
@click="cancelOrder(index, item.id)">取消订单</view>
|
|
|
<view class="bnt cancelBnt" v-if="item.status == -1 && (item.refund_status == 1 || item.refund_status == 2 || item.refund_status == 3)">退款审核中</view>
|
|
|
<view class="bnt cancelBnt" v-if="item.status == -1 && (item.refund_status == 4 || item.refund_status == 5)">退款完成</view>
|
|
|
<view class="bnt cancelBnt" v-if="item.status == -1 && item.refund_status == -1 ">退款已拒绝</view>
|
|
|
- <!-- <view class="bnt bg-color" v-if="item._status._type == 0"
|
|
|
- @click="goPay(item.pay_price, item.order_id)">立即付款</view> -->
|
|
|
- <!-- <view class="bnt bg-color" v-else-if="item._status._type == 3"
|
|
|
- @click="goOrderDetails(item.order_id)">去评价</view> -->
|
|
|
- <!-- <view class="bnt bg-color"
|
|
|
- v-else-if="item.seckill_id < 1 && item.bargain_id < 1 && item.combination_id < 1 && item._status._type == 4"
|
|
|
- @click="goOrderDetails(item.order_id)">
|
|
|
- 再次购买
|
|
|
- </view> -->
|
|
|
- <!-- <view class="bnt cancelBnt" v-if="item._status._type == 4"
|
|
|
- @click="delOrder(item.order_id, index)">删除订单</view> -->
|
|
|
- <!-- <view class="bnt bg-color" @click="goOrderDetails(item.order_id)">查看详情</view> -->
|
|
|
+ </view>
|
|
|
+ <view class="bottom acea-row row-right row-middle" v-if="item.status == 2">
|
|
|
+ <view class="bnt cancelBnt" v-if="item.reward && item.reward.id">已打赏</view>
|
|
|
+ <view class="bnt cancelBnt showbtn" v-else @click="das(item)">打赏</view>
|
|
|
+ <view class="bnt cancelBnt " v-if="item.complaint && item.complaint.id" >已投诉</view>
|
|
|
+ <view class="bnt cancelBnt " v-else @click="ts(item)">投诉</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -139,10 +129,42 @@
|
|
|
</view>
|
|
|
<home v-if="navigation"></home>
|
|
|
<payment :payMode="payMode" :pay_close="pay_close" @onChangeFun="onChangeFun" :order_id="pay_order_id"
|
|
|
- :totalPrice="totalPrice"></payment>
|
|
|
+ :totalPrice="totalPrice" :payTT="true" @onChooseType="onChooseType"></payment>
|
|
|
<!-- #ifdef MP -->
|
|
|
<!-- <authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> -->
|
|
|
<!-- #endif -->
|
|
|
+ <uni-popup type="center" ref="dspop">
|
|
|
+ <view class="ds-wrap">
|
|
|
+ <view class="tit">
|
|
|
+ 多少都是您的心意
|
|
|
+ </view>
|
|
|
+ <input type="number" v-model="dsPrice" placeholder="请输入任意打赏金额"/>
|
|
|
+ <view class="btn-wrap">
|
|
|
+ <view class="btn" @click="closeDs">
|
|
|
+ 取消
|
|
|
+ </view>
|
|
|
+ <view class="btn s-btn" @click="confirmDs">
|
|
|
+ 确定
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+ <uni-popup type="center" ref="tspop">
|
|
|
+ <view class="ds-wrap">
|
|
|
+ <view class="tit">
|
|
|
+ 投诉
|
|
|
+ </view>
|
|
|
+ <input type="text" v-model="tsyy" placeholder="请输入投诉原因"/>
|
|
|
+ <view class="btn-wrap">
|
|
|
+ <view class="btn" @click="closeTs">
|
|
|
+ 取消
|
|
|
+ </view>
|
|
|
+ <view class="btn s-btn" @click="confirmTs">
|
|
|
+ 确定
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -153,7 +175,9 @@
|
|
|
orderCancel,
|
|
|
orderDel,
|
|
|
orderPay,
|
|
|
- SqRefund
|
|
|
+ SqRefund,
|
|
|
+ ds,
|
|
|
+ ts
|
|
|
} from '@/api/order.js';
|
|
|
import {
|
|
|
getUserInfo,
|
|
@@ -206,7 +230,7 @@
|
|
|
icon: 'icon-zhifubao',
|
|
|
value: 'alipay',
|
|
|
title: '使用线上支付宝支付',
|
|
|
- payStatus: true
|
|
|
+ payStatus: false
|
|
|
},
|
|
|
{
|
|
|
name: '余额支付',
|
|
@@ -221,7 +245,11 @@
|
|
|
pay_order_id: '',
|
|
|
totalPrice: '0',
|
|
|
isAuto: false, //没有授权的不会自动授权
|
|
|
- isShowAuth: false //是否隐藏授权
|
|
|
+ isShowAuth: false ,//是否隐藏授权
|
|
|
+ dsItem: {},
|
|
|
+ dsPrice: '',
|
|
|
+ tsItem: {},
|
|
|
+ tsyy: ''
|
|
|
};
|
|
|
},
|
|
|
computed: mapGetters(['isLogin']),
|
|
@@ -244,6 +272,157 @@
|
|
|
options.status);
|
|
|
},
|
|
|
methods: {
|
|
|
+ ts(item) {
|
|
|
+
|
|
|
+ },
|
|
|
+ onChooseType(payType) {
|
|
|
+ console.log(payType,'payType')
|
|
|
+ let that = this;
|
|
|
+ let dsData = {
|
|
|
+ member_id: that.dsItem.work_member_id,
|
|
|
+ pay_type: payType,
|
|
|
+ pay_price: that.dsPrice,
|
|
|
+ // #ifdef MP
|
|
|
+ 'from': 'routine',
|
|
|
+ // #endif
|
|
|
+ // #ifdef H5
|
|
|
+ 'from': this.$wechat.isWeixin() ? 'weixin' : 'weixinh5',
|
|
|
+ // #endif
|
|
|
+ subscribe_id: that.dsItem.order_id
|
|
|
+ }
|
|
|
+ uni.showLoading({
|
|
|
+ title: '支付中'
|
|
|
+ });
|
|
|
+ try{
|
|
|
+ ds(dsData).then(res => {
|
|
|
+ let jsConfig = res.data.result.jsConfig;
|
|
|
+ switch (payType) {
|
|
|
+ case 'weixin':
|
|
|
+ if (res.data.result === undefined) return that.$util.Tips({
|
|
|
+ title: '缺少支付参数'
|
|
|
+ });
|
|
|
+ let mp_pay_name=''
|
|
|
+ if(uni.requestOrderPayment){
|
|
|
+ mp_pay_name='requestOrderPayment'
|
|
|
+ }else{
|
|
|
+ mp_pay_name='requestPayment'
|
|
|
+ }
|
|
|
+ uni[mp_pay_name]({
|
|
|
+ timeStamp: jsConfig.timestamp,
|
|
|
+ nonceStr: jsConfig.nonceStr,
|
|
|
+ package: jsConfig.package,
|
|
|
+ signType: jsConfig.signType,
|
|
|
+ paySign: jsConfig.paySign,
|
|
|
+ success: function(res) {
|
|
|
+ uni.hideLoading();
|
|
|
+ return that.$util.Tips({
|
|
|
+ title: res.msg,
|
|
|
+ icon: 'success'
|
|
|
+ }, () => {
|
|
|
+ that.onChangeFun({
|
|
|
+ action: 'pay_complete'
|
|
|
+ })
|
|
|
+
|
|
|
+ });
|
|
|
+ },
|
|
|
+ fail: function(e) {
|
|
|
+ uni.hideLoading();
|
|
|
+ return that.$util.Tips({
|
|
|
+ title: '取消支付'
|
|
|
+ }, () => {
|
|
|
+ that.onChangeFun({
|
|
|
+ action: 'pay_fail'
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
+ complete: function(e) {
|
|
|
+ uni.hideLoading();
|
|
|
+ if (e.errMsg == 'requestPayment:cancel') return that.$util
|
|
|
+ .Tips({
|
|
|
+ title: '取消支付'
|
|
|
+ }, () => {
|
|
|
+ that.onChangeFun({
|
|
|
+ action: 'pay_fail'
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ case 'yue':
|
|
|
+ uni.hideLoading();
|
|
|
+ return that.$util.Tips({
|
|
|
+ title: res.msg,
|
|
|
+ icon: 'success'
|
|
|
+ }, () => {
|
|
|
+ that.onChangeFun({
|
|
|
+ action: 'pay_complete'
|
|
|
+ })
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }catch(e){
|
|
|
+ console.log('eer',e)
|
|
|
+ //TODO handle the exception
|
|
|
+ }
|
|
|
+
|
|
|
+ // console.log(that.dsItem,dsData,'dsData')
|
|
|
+ },
|
|
|
+ confirmDs() {
|
|
|
+ let that = this;
|
|
|
+ if(!that.dsPrice) {
|
|
|
+ return that.$util.Tips({
|
|
|
+ title: '请输入打赏金额'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ that.totalPrice = that.dsPrice + ''
|
|
|
+ console.log(that.totalPrice ,'that.totalPrice ')
|
|
|
+ that.$refs.dspop.close();
|
|
|
+ that.goPay()
|
|
|
+ },
|
|
|
+ confirmTs() {
|
|
|
+ let that = this;
|
|
|
+ if(!that.tsyy) {
|
|
|
+ return that.$util.Tips({
|
|
|
+ title: '请输入投诉原因'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ ts({
|
|
|
+ reason:that.tsyy,
|
|
|
+ order_id: that.tsItem.order_id,
|
|
|
+ member_id: that.tsItem.work_member_id,
|
|
|
+ }).then(res => {
|
|
|
+ that.$refs.tspop.close();
|
|
|
+ that.$util.Tips({
|
|
|
+ title: '投诉已提交'
|
|
|
+ })
|
|
|
+ }).catch(err=> {
|
|
|
+ that.$util.Tips({
|
|
|
+ title: err.msg
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ // that.goTs()
|
|
|
+
|
|
|
+ },
|
|
|
+ closeDs() {
|
|
|
+ this.$refs.dspop.close();
|
|
|
+ this.dsItem = {};
|
|
|
+ this.dsPrice = 0;
|
|
|
+ },
|
|
|
+ closeTs() {
|
|
|
+ this.$refs.tspop.close();
|
|
|
+ this.tsItem = {};
|
|
|
+ this.tsyy = '';
|
|
|
+ },
|
|
|
+ das(row) {
|
|
|
+ this.dsItem = row;
|
|
|
+ this.$refs.dspop.open();
|
|
|
+ },
|
|
|
+ ts(row) {
|
|
|
+ this.tsItem = row;
|
|
|
+ this.$refs.tspop.open();
|
|
|
+ },
|
|
|
showOrder(item) {
|
|
|
return item.info[0].paid != 0
|
|
|
},
|
|
@@ -437,25 +616,28 @@
|
|
|
*/
|
|
|
goPay: function(pay_price, order_id) {
|
|
|
this.$set(this, 'pay_close', true);
|
|
|
- this.$set(this, 'pay_order_id', order_id);
|
|
|
- this.$set(this, 'totalPrice', pay_price);
|
|
|
+ // this.$set(this, 'pay_order_id', order_id);
|
|
|
+ // this.$set(this, 'totalPrice', pay_price);
|
|
|
},
|
|
|
/**
|
|
|
* 支付成功回调
|
|
|
*
|
|
|
*/
|
|
|
pay_complete: function() {
|
|
|
- this.loadend = false;
|
|
|
- this.page = 1;
|
|
|
- this.$set(this, 'orderList', []);
|
|
|
- this.pay_close = false;
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/goods/order_pay_status/index?order_id=' + this.pay_order_id +
|
|
|
- '&msg=支付成功&type=3&totalPrice=' + this.totalPrice
|
|
|
- })
|
|
|
- this.pay_order_id = '';
|
|
|
- this.getOrderData();
|
|
|
- this.getOrderList();
|
|
|
+ this.$set(this, 'pay_close', false);
|
|
|
+ // this.page = 1;
|
|
|
+ this.getOrderList()
|
|
|
+ // this.loadend = false;
|
|
|
+ // // this.page = 1;
|
|
|
+ // this.$set(this, 'orderList', []);
|
|
|
+ // this.pay_close = false;
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: '/pages/goods/order_pay_status/index?order_id=' + this.pay_order_id +
|
|
|
+ // '&msg=支付成功&type=3&totalPrice=' + this.totalPrice
|
|
|
+ // })
|
|
|
+ // this.pay_order_id = '';
|
|
|
+ // this.getOrderData();
|
|
|
+ // this.getOrderList();
|
|
|
},
|
|
|
/**
|
|
|
* 支付失败回调
|
|
@@ -795,4 +977,47 @@
|
|
|
margin-left: 26rpx;
|
|
|
}
|
|
|
}
|
|
|
+ .showbtn {
|
|
|
+ color: #e93323 !important;
|
|
|
+ border-color: #e93323 !important;
|
|
|
+ }
|
|
|
+ .ds-wrap {
|
|
|
+ width: 623rpx;
|
|
|
+ height: 334rpx;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ background-color: #fff;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+ align-items: center;
|
|
|
+ flex-direction: column;
|
|
|
+
|
|
|
+ input {
|
|
|
+ width: 575rpx;
|
|
|
+ height: 73rpx;
|
|
|
+ background-color: #f5f5f5;
|
|
|
+ color: #000;
|
|
|
+ padding-left: 20rpx;
|
|
|
+ }
|
|
|
+ .btn-wrap {
|
|
|
+ width: 575rpx;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ .btn {
|
|
|
+ width: 277rpx;
|
|
|
+ height: 82rpx;
|
|
|
+ // background-color: ;
|
|
|
+ color: #000;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ background-color: #f5f5f5;
|
|
|
+ border-radius: 15rpx;
|
|
|
+ }
|
|
|
+ .s-btn {
|
|
|
+ color: #fff;
|
|
|
+ background-color:#e93323;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|