|
|
@@ -51,7 +51,6 @@
|
|
|
<view class="">
|
|
|
预约时间: {{ showTime(item.reservation_time) }}
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
<view class="totalPrice">
|
|
|
共{{ item.info.length || 0 }}件商品,总金额
|
|
|
@@ -59,24 +58,8 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="bottom acea-row row-right row-middle" >
|
|
|
- <!-- <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.order_id)">取消订单</view> -->
|
|
|
<view class="bnt bg-color" v-if="item.status == 0"
|
|
|
@click="goEnd(item,index)">完成订单</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>
|
|
|
</view>
|
|
|
@@ -89,11 +72,6 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<home v-if="navigation"></home>
|
|
|
- <payment :payMode="payMode" :pay_close="pay_close" @onChangeFun="onChangeFun" :order_id="pay_order_id"
|
|
|
- :totalPrice="totalPrice"></payment>
|
|
|
- <!-- #ifdef MP -->
|
|
|
- <!-- <authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> -->
|
|
|
- <!-- #endif -->
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -207,37 +185,6 @@
|
|
|
var dateString = year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds; // 自定义时间格式
|
|
|
return dateString
|
|
|
},
|
|
|
- call(phone) {
|
|
|
- uni.makePhoneCall({
|
|
|
- phoneNumber: phone,
|
|
|
- });
|
|
|
- },
|
|
|
- showMaoLocation(e) {
|
|
|
- let self = this;
|
|
|
- // #ifdef H5
|
|
|
- if (self.$wechat.isWeixin()) {
|
|
|
- self.$wechat.seeLocation({
|
|
|
- latitude: Number(e.latitude),
|
|
|
- longitude: Number(e.longitude),
|
|
|
- name: e.name,
|
|
|
- scale: 13,
|
|
|
- address: `${e.address}-${e.detailed_address}`,
|
|
|
- }).then(res => {})
|
|
|
- } else {
|
|
|
- // #endif
|
|
|
- uni.openLocation({
|
|
|
- latitude: Number(e.latitude),
|
|
|
- longitude: Number(e.longitude),
|
|
|
- name: e.name,
|
|
|
- address: `${e.address}-${e.detailed_address}`,
|
|
|
- success: function() {
|
|
|
- Number
|
|
|
- }
|
|
|
- });
|
|
|
- // #ifdef H5
|
|
|
- }
|
|
|
- // #endif
|
|
|
- },
|
|
|
showTolPrice(list) {
|
|
|
let price = 0;
|
|
|
list.forEach(item => {
|
|
|
@@ -249,24 +196,6 @@
|
|
|
// this.getOrderData();
|
|
|
this.getUserInfo();
|
|
|
},
|
|
|
- onLoadFun(){
|
|
|
- this.getFun();
|
|
|
- this.isShowAuth = false;
|
|
|
- },
|
|
|
- // 授权关闭
|
|
|
- authColse: function(e) {
|
|
|
- this.isShowAuth = e;
|
|
|
- },
|
|
|
- /**
|
|
|
- * 事件回调
|
|
|
- *
|
|
|
- */
|
|
|
- onChangeFun: function(e) {
|
|
|
- let opt = e;
|
|
|
- let action = opt.action || null;
|
|
|
- let value = opt.value != undefined ? opt.value : null;
|
|
|
- action && this[action] && this[action](value);
|
|
|
- },
|
|
|
/**
|
|
|
* 获取用户信息
|
|
|
*
|
|
|
@@ -280,13 +209,6 @@
|
|
|
that.$set(that, 'payMode', that.payMode);
|
|
|
});
|
|
|
},
|
|
|
- /**
|
|
|
- * 关闭支付组件
|
|
|
- *
|
|
|
- */
|
|
|
- payClose: function() {
|
|
|
- this.pay_close = false;
|
|
|
- },
|
|
|
/**
|
|
|
* 获取订单统计数据
|
|
|
*
|
|
|
@@ -345,109 +267,6 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- /**
|
|
|
- * 取消订单
|
|
|
- *
|
|
|
- */
|
|
|
- cancelOrder: function(index, order_id) {
|
|
|
- let that = this;
|
|
|
- if (!order_id)
|
|
|
- return that.$util.Tips({
|
|
|
- title: '缺少订单号无法取消订单'
|
|
|
- });
|
|
|
- uni.showModal({
|
|
|
- title: '取消订单',
|
|
|
- content: '您是否确认取消此订单',
|
|
|
- confirmText: '确认',
|
|
|
- cancelText: '再想想',
|
|
|
- success: (res) => {
|
|
|
- if (res.confirm) {
|
|
|
- orderCancel(order_id)
|
|
|
- .then(res => {
|
|
|
- return that.$util.Tips({
|
|
|
- title: res.msg,
|
|
|
- icon: 'success'
|
|
|
- },
|
|
|
- function() {
|
|
|
- that.orderList.splice(index, 1);
|
|
|
- that.$set(that, 'orderList', that.orderList);
|
|
|
- that.$set(that.orderData, 'unpaid_count', that.orderData.unpaid_count - 1);
|
|
|
- that.getOrderData();
|
|
|
- }
|
|
|
- );
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- return that.$util.Tips({
|
|
|
- title: err
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- /**
|
|
|
- * 打开支付组件
|
|
|
- *
|
|
|
- */
|
|
|
- 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);
|
|
|
- },
|
|
|
- /**
|
|
|
- * 支付成功回调
|
|
|
- *
|
|
|
- */
|
|
|
- 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();
|
|
|
- },
|
|
|
- /**
|
|
|
- * 支付失败回调
|
|
|
- *
|
|
|
- */
|
|
|
- pay_fail: function() {
|
|
|
- this.pay_close = false;
|
|
|
- this.pay_order_id = '';
|
|
|
- },
|
|
|
- /**
|
|
|
- * 去订单详情
|
|
|
- */
|
|
|
- goOrderDetails: function(order_id) {
|
|
|
- if (!order_id)
|
|
|
- return that.$util.Tips({
|
|
|
- title: '缺少订单号无法查看订单详情'
|
|
|
- });
|
|
|
- // #ifdef MP
|
|
|
- uni.showLoading({
|
|
|
- title: '正在加载'
|
|
|
- });
|
|
|
- openOrderSubscribe()
|
|
|
- .then(() => {
|
|
|
- uni.hideLoading();
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/goods/order_details/index?order_id=' + order_id
|
|
|
- })
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- uni.hideLoading();
|
|
|
- });
|
|
|
- // #endif
|
|
|
- // #ifndef MP
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/goods/order_details/index?order_id=' + order_id
|
|
|
- });
|
|
|
- // #endif
|
|
|
- },
|
|
|
/**
|
|
|
* 切换类型
|
|
|
*/
|
|
|
@@ -500,42 +319,6 @@
|
|
|
that.loadTitle = '加载更多';
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
- /**
|
|
|
- * 删除订单
|
|
|
- */
|
|
|
- delOrder: function(order_id, index) {
|
|
|
- let that = this;
|
|
|
- uni.showModal({
|
|
|
- title: '删除订单',
|
|
|
- content: '确定删除该订单',
|
|
|
- success: function (res) {
|
|
|
- if (res.confirm) {
|
|
|
- orderDel(order_id)
|
|
|
- .then(res => {
|
|
|
- that.orderList.splice(index, 1);
|
|
|
- that.$set(that, 'orderList', that.orderList);
|
|
|
- that.$set(that.orderData, 'unpaid_count', that.orderData.unpaid_count - 1);
|
|
|
- that.getOrderData();
|
|
|
- return that.$util.Tips({
|
|
|
- title: '删除成功',
|
|
|
- icon: 'success'
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- return that.$util.Tips({
|
|
|
- title: err
|
|
|
- });
|
|
|
- });
|
|
|
- } else if (res.cancel) {
|
|
|
- return that.$util.Tips({
|
|
|
- title: '已取消'
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- }
|
|
|
},
|
|
|
onReachBottom: function() {
|
|
|
this.getOrderList();
|