revert: 所有代码与custom/common分支同

This commit is contained in:
2026-01-05 15:56:49 +08:00
parent 8ef6975ee1
commit 60a0e5133e
219 changed files with 14860 additions and 15585 deletions

View File

@@ -1,8 +1,7 @@
<template>
<view class="detail-container" :class="{ 'safe-area': isIphoneX }" :style="themeColor">
<!-- 订单状态 -->
<view class="status-wrap color-base-bg"
:style="{ backgroundImage: 'url(' + $util.img('public/uniapp/order/status-wrap-bg.png') + ')' }">
<view class="status-wrap color-base-bg" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/order/status-wrap-bg.png') + ')' }">
<view class="order-status-left">
<image :src="$util.img(action.icon)"></image>
<view class="status-name">
@@ -65,9 +64,9 @@
</view>
<view class="store-info-detail">
<view class="store-name" @click="
$util.redirectTo('/pages_tool/store/detail', {
store_id: orderData.delivery_store_id
})
$util.redirectTo('/pages_tool/store/detail', {
store_id: orderData.delivery_store_id
})
">
<text class="name font-size-base">{{ orderData.delivery_store_name }}</text>
<text class="iconfont icon-right font-size-base"></text>
@@ -109,11 +108,8 @@
<text class="copy" @click="$util.copy(orderData.delivery_code)">复制</text>
</view>
<view class="code">
<image :src="$util.img(orderData.pickup_barcode)"
@click="previewMedia($util.img(orderData.pickup_barcode))" class="barcode"
mode="widthFix" />
<image :src="$util.img(orderData.pickup)" @click="previewMedia($util.img(orderData.pickup))"
class="qrcode" mode="widthFix" />
<image :src="$util.img(orderData.pickup_barcode)" @click="previewMedia($util.img(orderData.pickup_barcode))" class="barcode" mode="widthFix"/>
<image :src="$util.img(orderData.pickup)" @click="previewMedia($util.img(orderData.pickup))" class="qrcode" mode="widthFix"/>
</view>
</view>
</view>
@@ -125,8 +121,7 @@
<view v-for="(goodsItem, goodsIndex) in orderData.order_goods" :key="goodsIndex" class="goods-item">
<view class="goods-wrap">
<view class="goods-img" @click="goDetail(goodsItem)">
<image :src="$util.img(goodsItem.sku_image, { size: 'mid' })"
@error="imageError(goodsIndex)" mode="aspectFill" />
<image :src="$util.img(goodsItem.sku_image, { size: 'mid' })" @error="imageError(goodsIndex)" mode="aspectFill"/>
</view>
<view class="goods-info" @click="goDetail(goodsItem)">
<view class="goods-name">{{ goodsItem.sku_name }}</view>
@@ -134,18 +129,16 @@
<view class="goods-spec">
<block v-for="(x, i) in goodsItem.sku_spec_format" :key="i">
{{ x.spec_value_name }}
{{ i < goodsItem.sku_spec_format.length - 1 ? '; ' : '' }} </block>
{{ i < goodsItem.sku_spec_format.length - 1 ? '; ' : '' }}
</block>
</view>
</view>
<view class="goods-sub-section">
<view>
<text class="goods-price ">
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
<text class="price-style large">{{
parseFloat(goodsItem.price).toFixed(2).split('.')[0]
}}</text>
<text class="unit price-style small">.{{
parseFloat(goodsItem.price).toFixed(2).split('.')[1] }}</text>
<text class="price-style large">{{ parseFloat(goodsItem.price).toFixed(2).split('.')[0] }}</text>
<text class="unit price-style small">.{{ parseFloat(goodsItem.price).toFixed(2).split('.')[1] }}</text>
</text>
</view>
<view>
@@ -159,10 +152,8 @@
次卡抵扣
<text class="goods-price ">
<text class="unit price-style small">-{{ $lang('common.currencySymbol') }}</text>
<text class="price-style large">{{
parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[0] }}</text>
<text class="unit price-style small">.{{
parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[1] }}</text>
<text class="price-style large">{{ parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[0] }}</text>
<text class="unit price-style small">.{{ parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[1] }}</text>
</text>
</view>
</view>
@@ -173,8 +164,7 @@
<text class="tit">{{ item.value.title }}</text>
<view class="box img-box" v-if="item.controller == 'Img'">
<view class="img" v-for="(img, imgIndex) in item.img_lists" :key="imgIndex">
<image :src="$util.img(img)" mode="widthFix"
@click="previewMedia($util.img(img))" />
<image :src="$util.img(img)" mode="widthFix" @click="previewMedia($util.img(img))"/>
</view>
</view>
<view class="box" v-else>
@@ -186,15 +176,13 @@
<view class="goods-action">
<block v-if="orderData.is_enable_refund">
<view @click="goRefund(goodsItem.order_goods_id)"
v-if="orderData.order_scene == 'online' && (goodsItem.refund_status == 0 || goodsItem.refund_status == -1)">
<view @click="goRefund(goodsItem.order_goods_id)" v-if="orderData.order_scene == 'online' && (goodsItem.refund_status == 0 || goodsItem.refund_status == -1)">
<view class="order-box-btn" v-if="orderData.promotion_type != 'blindbox'">
{{ orderData.order_status == 10 ? '申请售后' : '申请退款' }}
</view>
</view>
</block>
<view @click="goRefundDetail(goodsItem.order_goods_id)"
v-if="goodsItem.refund_status != 0 && goodsItem.refund_status != -1">
<view @click="goRefundDetail(goodsItem.order_goods_id)" v-if="goodsItem.refund_status != 0 && goodsItem.refund_status != -1">
<view class="order-box-btn">{{ orderData.order_status == 10 ? '查看售后' : '查看退款' }}</view>
</view>
</view>
@@ -327,12 +315,11 @@
<block v-if="orderData.goods_class == 5">
<view class="order-cell">
<text class="tit">我的卡包</text>
<view class="box"><text class="color-base-text"
@click="$util.redirectTo('/pages_promotion/cardservice/card/my_card')">查看</text></view>
<view class="box"><text class="color-base-text" @click="$util.redirectTo('/pages_promotion/cardservice/card/my_card')">查看</text></view>
</view>
</block>
<!-- 联系客服 -->
<!-- <ns-contact :niushop="{ order_id: orderData.order_id }">
<!-- <ns-contact :niushop="{ order_id: orderData.order_id }">
<view class="kefu">
<view>
<text class="iconfont icon-ziyuan"></text>
@@ -362,27 +349,23 @@
<text class="tit">核销次数</text>
<view class="box align-right">
<text class="color-title">
剩余{{ orderData.virtual_goods.verify_total_count - orderData.virtual_goods.verify_use_num
}}/{{
orderData.virtual_goods.verify_total_count }}
剩余{{ orderData.virtual_goods.verify_total_count - orderData.virtual_goods.verify_use_num }}/{{ orderData.virtual_goods.verify_total_count }}
</text>
</view>
</view>
<view class="order-cell">
<text class="tit">有效期</text>
<view class="box align-right">
<text class="color-title" v-if="orderData.virtual_goods.expire_time > 0">{{
$util.timeStampTurnTime(orderData.virtual_goods.expire_time) }}</text>
<text class="color-title" v-if="orderData.virtual_goods.expire_time > 0">{{ $util.timeStampTurnTime(orderData.virtual_goods.expire_time) }}</text>
<text v-else>永久有效</text>
</view>
</view>
</view>
<view class="verify-info-wrap">
<view class="head">核销记录</view>
<view v-if="orderData.virtual_goods.verify_record.length">
<view v-for="(item, index) in orderData.virtual_goods.verify_record" :key="index"
class="record-item">
<view v-for="(item, index) in orderData.virtual_goods.verify_record" :key="index" class="record-item">
<view class="order-cell">
<text class="tit">核销人</text>
<view class="box align-right">
@@ -443,17 +426,14 @@
<text class="tit">核销次数</text>
<view class="box align-right">
<text class="color-title">
剩余{{ orderData.virtual_goods.verify_total_count - orderData.virtual_goods.verify_use_num
}}/{{
orderData.virtual_goods.verify_total_count }}
剩余{{ orderData.virtual_goods.verify_total_count - orderData.virtual_goods.verify_use_num }}/{{ orderData.virtual_goods.verify_total_count }}
</text>
</view>
</view>
<view class="order-cell">
<text class="tit">有效期</text>
<view class="box align-right">
<text class="color-title" v-if="orderData.virtual_goods.expire_time > 0">{{
$util.timeStampTurnTime(orderData.virtual_goods.expire_time) }}</text>
<text class="color-title" v-if="orderData.virtual_goods.expire_time > 0">{{ $util.timeStampTurnTime(orderData.virtual_goods.expire_time) }}</text>
<text v-else>永久有效</text>
</view>
</view>
@@ -462,8 +442,7 @@
<view class="verify-info-wrap">
<view class="head">核销记录</view>
<view v-if="orderData.virtual_goods.verify_record.length">
<view v-for="(item, index) in orderData.virtual_goods.verify_record" :key="index"
class="record-item">
<view v-for="(item, index) in orderData.virtual_goods.verify_record" :key="index" class="record-item">
<view class="order-cell">
<text class="tit">核销人</text>
<view class="box align-right">
@@ -595,9 +574,7 @@
</view>
<view class="order-action fixed-bottom bottom-safe-area" v-if="orderData.action.length > 0">
<view class="order-box-btn white"
v-if="evaluateConfig.evaluate_status == 1 && orderData.is_evaluate == 1"
@click="operation('memberOrderEvaluation')">
<view class="order-box-btn white" v-if="evaluateConfig.evaluate_status == 1 && orderData.is_evaluate == 1" @click="operation('memberOrderEvaluation')">
<text v-if="orderData.evaluate_status == 0">评价</text>
<text v-else-if="orderData.evaluate_status == 1">追评</text>
</view>
@@ -611,8 +588,7 @@
</block>
</view>
<view class="order-action fixed-bottom bottom-safe-area"
v-else-if="orderData.action.length == 0 && orderData.is_evaluate == 1 && evaluateConfig.evaluate_status == 1">
<view class="order-action fixed-bottom bottom-safe-area" v-else-if="orderData.action.length == 0 && orderData.is_evaluate == 1 && evaluateConfig.evaluate_status == 1">
<view class="order-box-btn white" @click="operation('memberOrderEvaluation')">
<text v-if="orderData.evaluate_status == 0">评价</text>
<text v-else-if="orderData.evaluate_status == 1">追评</text>
@@ -621,8 +597,7 @@
</view>
<!-- 订单 -->
<view class="fixed-bottom-box bottom-safe-area"
v-if="orderData.action.length > 0 || (orderData.is_evaluate == 1 && evaluateConfig.evaluate_status == 1)">
<view class="fixed-bottom-box bottom-safe-area" v-if="orderData.action.length > 0 || (orderData.is_evaluate == 1 && evaluateConfig.evaluate_status == 1)">
</view>
<ns-goods-recommend ref="goodrecommend" route="order_detail"></ns-goods-recommend>
@@ -633,218 +608,216 @@
</template>
<script>
import orderMethod from '../public/js/orderMethod.js';
export default {
components: {
nsGoodsRecommend: () => import('@/components/ns-goods-recommend/ns-goods-recommend.vue'),
nsPayment: () => import('@/components/payment/payment.vue'),
nsContact: () => import('@/components/ns-contact/ns-contact.vue'),
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
},
data() {
return {
isIphoneX: false,
orderId: 0,
merchantTradeNo: '',
orderData: {
action: [],
virtual_goods: {
is_veirfy: 0,
verify_record: []
}
},
action: {
icon: ''
},
evaluateConfig: {
evaluate_audit: 1,
evaluate_show: 0,
evaluate_status: 1
}
};
},
mixins: [orderMethod],
onLoad(option) {
if (option.order_id) this.orderId = option.order_id;
if (option.merchant_trade_no) this.merchantTradeNo = option.merchant_trade_no;
},
onShow() {
this.isIphoneX = this.$util.uniappIsIPhoneX();
if (this.storeToken) {
this.getEvaluateConfig();
this.getOrderData();
} else {
this.$util.redirectTo('/pages_tool/login/login', {
back: '/pages_order/detail/detail?order_id=' + this.orderId + '&merchant_trade_no=' + this.merchantTradeNo
});
}
},
methods: {
goDetail(e) {
this.$util.redirectTo('/pages_goods/detail', {
goods_id: e.goods_id
});
},
goRefund(id) {
this.$util.redirectTo('/pages_tool/order/refund', {
order_goods_id: id
});
},
goRefundDetail(id) {
this.$util.redirectTo('/pages_tool/order/refund_detail', {
order_goods_id: id
});
},
getOrderData() {
this.$api.sendRequest({
url: '/api/order/detail',
data: {
order_id: this.orderId,
merchant_trade_no: this.merchantTradeNo
import nsGoodsRecommend from '@/components/ns-goods-recommend/ns-goods-recommend.vue';
import orderMethod from './public/js/orderMethod.js';
import nsPayment from '@/components/payment/payment.vue';
import nsContact from '@/components/ns-contact/ns-contact.vue';
export default {
data() {
return {
isIphoneX: false,
orderId: 0,
merchantTradeNo: '',
orderData: {
action: [],
virtual_goods: {
is_veirfy: 0,
verify_record: []
}
},
success: res => {
if (res.code >= 0) {
if (res.data.order_status == 0) {
let date = Date.parse(new Date()) / 1000;
res.data.closeTimeMachine = this.$util.countDown(res.data.create_time + res.data.auto_close - date);
}
let num = 0;
this.orderData = res.data;
this.orderId = this.orderData.order_id;
let refund_order_goods_ids = [];
this.orderData.order_goods.forEach(v => {
if (v.sku_spec_format) {
v.sku_spec_format = JSON.parse(v.sku_spec_format);
action: {
icon: ''
},
evaluateConfig: {
evaluate_audit: 1,
evaluate_show: 0,
evaluate_status: 1
}
};
},
mixins: [orderMethod],
components: {
nsGoodsRecommend,
nsPayment,
nsContact
},
onLoad(option) {
if (option.order_id) this.orderId = option.order_id;
if (option.merchant_trade_no) this.merchantTradeNo = option.merchant_trade_no;
},
onShow() {
this.isIphoneX = this.$util.uniappIsIPhoneX();
if (this.storeToken) {
this.getEvaluateConfig();
this.getOrderData();
} else {
this.$util.redirectTo('/pages_tool/login/login', {
back: '/pages_order/detail?order_id=' + this.orderId + '&merchant_trade_no=' + this.merchantTradeNo
});
}
},
methods: {
goDetail(e) {
this.$util.redirectTo('/pages_goods/detail', {
goods_id: e.goods_id
});
},
goRefund(id) {
this.$util.redirectTo('/pages_tool/order/refund', {
order_goods_id: id
});
},
goRefundDetail(id) {
this.$util.redirectTo('/pages_tool/order/refund_detail', {
order_goods_id: id
});
},
getOrderData() {
this.$api.sendRequest({
url: '/api/order/detail',
data: {
order_id: this.orderId,
merchant_trade_no: this.merchantTradeNo
},
success: res => {
if (res.code >= 0) {
if (res.data.order_status == 0) {
let date = Date.parse(new Date()) / 1000;
res.data.closeTimeMachine = this.$util.countDown(res.data.create_time + res.data.auto_close - date);
}
let num = 0;
this.orderData = res.data;
this.orderId = this.orderData.order_id;
let refund_order_goods_ids = [];
this.orderData.order_goods.forEach(v => {
if (v.sku_spec_format) {
v.sku_spec_format = JSON.parse(v.sku_spec_format);
} else {
v.sku_spec_format = [];
}
if (v.refund_status == 0 || v.refund_status == -1) {
num += 1;
refund_order_goods_ids.push(v.order_goods_id);
}
});
this.action = JSON.parse(res.data.order_status_action);
//退1
if (num > 1) {
this.orderData.refund_batch_status = true;
this.orderData.refund_order_goods_ids = refund_order_goods_ids;
} else {
v.sku_spec_format = [];
this.orderData.refund_batch_status = false;
}
if (v.refund_status == 0 || v.refund_status == -1) {
num += 1;
refund_order_goods_ids.push(v.order_goods_id);
}
});
this.action = JSON.parse(res.data.order_status_action);
if (this.orderData.delivery_store_info != '') this.orderData.delivery_store_info = JSON.parse(this.orderData.delivery_store_info);
//退1
if (num > 1) {
this.orderData.refund_batch_status = true;
this.orderData.refund_order_goods_ids = refund_order_goods_ids;
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
} else {
this.orderData.refund_batch_status = false;
this.$util.showToast({
title: '未获取到订单信息!'
});
setTimeout(() => {
this.$util.redirectTo('/pages_order/list');
}, 1500);
}
if (this.orderData.delivery_store_info != '') this.orderData.delivery_store_info = JSON.parse(this.orderData.delivery_store_info);
},
fail: res => {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
} else {
this.$util.showToast({
title: '未获取到订单信息!'
});
setTimeout(() => {
this.$util.redirectTo('/pages_order/base/list');
}, 1500);
}
},
fail: res => {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
});
},
/**
* 下拉刷新
*/
onPullDownRefresh() {
this.getOrderData();
},
operation(action) {
switch (action) {
case 'orderPay': //
this.orderPay(this.orderData);
break;
case 'orderClose': //
this.orderClose(this.orderData.order_id, () => {
this.getOrderData();
});
break;
case 'memberTakeDelivery': //
this.orderDelivery(this.orderData, () => {
this.getOrderData();
});
break;
case 'trace': //
this.$util.redirectTo('/pages_tool/order/logistics', {
order_id: this.orderData.order_id
});
break;
case 'memberOrderEvaluation': //
this.$util.redirectTo('/pages_tool/order/evaluate', {
order_id: this.orderData.order_id
});
break;
//退
case 'memberBatchRefund':
this.$util.redirectTo('/pages_tool/order/refund_type_select', {
order_id: this.orderId
});
break;
case 'memberVirtualTakeDelivery':
this.orderVirtualDelivery(this.orderData, () => {
this.getOrderData();
});
break;
}
});
},
/**
* 下拉刷新
*/
onPullDownRefresh() {
this.getOrderData();
},
operation(action) {
switch (action) {
case 'orderPay': //
this.orderPay(this.orderData);
break;
case 'orderClose': //
this.orderClose(this.orderData.order_id, () => {
this.getOrderData();
});
break;
case 'memberTakeDelivery': //
this.orderDelivery(this.orderData, () => {
this.getOrderData();
});
break;
case 'trace': //
this.$util.redirectTo('/pages_tool/order/logistics', {
order_id: this.orderData.order_id
});
break;
case 'memberOrderEvaluation': //
this.$util.redirectTo('/pages_tool/order/evaluate', {
order_id: this.orderData.order_id
});
break;
//退
case 'memberBatchRefund':
this.$util.redirectTo('/pages_tool/order/refund_type_select', {
order_id: this.orderId
});
break;
case 'memberVirtualTakeDelivery':
this.orderVirtualDelivery(this.orderData, () => {
this.getOrderData();
});
break;
},
imageError(index) {
this.orderData.order_goods[index].sku_image = this.$util.getDefaultImage().goods;
this.$forceUpdate();
},
getEvaluateConfig() {
this.$api.sendRequest({
url: '/api/goodsevaluate/config',
success: res => {
if (res.code == 0) {
var data = res.data;
this.evaluateConfig = data;
}
}
});
},
//
openChoosePayment() {
this.$refs.choosePaymentPopup.open();
},
//
previewMedia(pickup) {
var paths = [];
paths.push(pickup);
uni.previewImage({
urls: paths
});
}
},
imageError(index) {
this.orderData.order_goods[index].sku_image = this.$util.getDefaultImage().goods;
this.$forceUpdate();
},
getEvaluateConfig() {
this.$api.sendRequest({
url: '/api/goodsevaluate/config',
success: res => {
if (res.code == 0) {
var data = res.data;
this.evaluateConfig = data;
}
}
});
},
//
openChoosePayment() {
this.$refs.choosePaymentPopup.open();
},
//
previewMedia(pickup) {
var paths = [];
paths.push(pickup);
uni.previewImage({
urls: paths
});
filters: {
abs(value) {
return Math.abs(parseFloat(value)).toFixed(2);
}
}
},
filters: {
abs(value) {
return Math.abs(parseFloat(value)).toFixed(2);
}
}
};
};
</script>
<style lang="scss">
@import '../public/css/detail.scss';
@import './public/css/detail.scss';
</style>
<style scoped>
.pickup-code-info .code img:nth-child(1) {
margin-bottom: 30rpx;
}
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
max-height: unset !important;
}
.pickup-code-info .code img:nth-child(1) {
margin-bottom: 30rpx;
}
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
max-height: unset !important;
}
</style>

View File

@@ -6,15 +6,12 @@
<script>
export default {
components: {
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
},
data() {
return {};
},
onLoad(option) {
if (option.order_id) {
this.$util.redirectTo('/pages_order/detail/detail', {order_id: option.order_id}, 'redirectTo');
this.$util.redirectTo('/pages_order/detail', {order_id: option.order_id}, 'redirectTo');
}
}
};

View File

@@ -6,15 +6,12 @@
<script>
export default {
components: {
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
},
data() {
return {};
},
onLoad(option) {
if (option.order_id) {
this.$util.redirectTo('/pages_order/detail/detail', {order_id: option.order_id}, 'redirectTo');
this.$util.redirectTo('/pages_order/detail', {order_id: option.order_id}, 'redirectTo');
}
}
};

View File

@@ -1,18 +1,14 @@
<template>
<view class="detail-container" :class="{ 'safe-area': isIphoneX }" :style="themeColor">
<!-- 订单状态 -->
<view class="status-wrap color-base-bg"
:style="{ backgroundImage: 'url(' + $util.img('public/uniapp/order/status-wrap-bg.png') + ')' }">
<view class="status-wrap color-base-bg" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/order/status-wrap-bg.png') + ')' }">
<view class="order-status-left">
<image v-if="orderData.order_status == 0" :src="$util.img('public/uniapp/order/order-icon.png')" />
<image v-if="orderData.order_status == 1"
:src="$util.img('public/uniapp/order/order-icon-received.png')" />
<image v-if="orderData.order_status == -1"
:src="$util.img('public/uniapp/order/order-icon-close.png')" />
<image v-if="orderData.order_status == 0" :src="$util.img('public/uniapp/order/order-icon.png')"/>
<image v-if="orderData.order_status == 1" :src="$util.img('public/uniapp/order/order-icon-received.png')"/>
<image v-if="orderData.order_status == -1" :src="$util.img('public/uniapp/order/order-icon-close.png')"/>
<view class="status-name">
<view class="status-name">
{{ orderData.order_status == 0 ? '待支付' : orderData.order_status == 1 ? '已完成' :
orderData.order_status == -1 ? '已关闭' : '' }}
{{ orderData.order_status == 0 ? '待支付' : orderData.order_status == 1 ? '已完成' : orderData.order_status == -1 ? '已关闭' : '' }}
</view>
</view>
</view>
@@ -83,7 +79,7 @@
</view>
</view>
<!-- 联系客服 -->
<!-- <ns-contact :niushop="{ order_id: orderData.order_id }">
<!-- <ns-contact :niushop="{ order_id: orderData.order_id }">
<view class="kefu">
<view>
<text class="iconfont icon-ziyuan"></text>
@@ -124,8 +120,7 @@
<view class="order-action" v-if="orderData.order_status == 0 && orderData.type == 1">
<view class="order-box-btn" @click="orderClose()">关闭</view>
<view class="order-box-btn color-base-bg color-base-border color-text-white"
@click="openChoosePayment()">支付</view>
<view class="order-box-btn color-base-bg color-base-border color-text-white" @click="openChoosePayment()">支付</view>
</view>
</view>
@@ -138,173 +133,171 @@
</template>
<script>
export default {
components: {
nsGoodsRecommend: () => import('@/components/ns-goods-recommend/ns-goods-recommend.vue'),
nsContact: () => import('@/components/ns-contact/ns-contact.vue'),
nsPayment: () => import('@/components/payment/payment.vue'),
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
},
data() {
return {
isIphoneX: false,
orderId: 0,
orderData: {
action: []
},
action: {
icon: ''
},
storeDetail: {}
};
},
onLoad(option) {
if (option.order_id) this.orderId = option.order_id;
},
onShow() {
this.isIphoneX = this.$util.uniappIsIPhoneX();
import nsGoodsRecommend from '@/components/ns-goods-recommend/ns-goods-recommend.vue';
import nsContact from '@/components/ns-contact/ns-contact.vue';
export default {
components: {
nsGoodsRecommend,
nsContact
},
data() {
return {
isIphoneX: false,
orderId: 0,
orderData: {
action: []
},
action: {
icon: ''
},
storeDetail: {}
};
},
onLoad(option) {
if (option.order_id) this.orderId = option.order_id;
},
onShow() {
this.isIphoneX = this.$util.uniappIsIPhoneX();
if (this.storeToken) {
this.getOrderData();
} else {
this.$util.redirectTo('/pages_tool/login/login', {
back: '/pages_order/detail/detail_point?order_id=' + this.orderId
});
}
},
methods: {
goRefund(id) {
this.$util.redirectTo('/pages_tool/order/refund', {
order_goods_id: id
});
if (this.storeToken) {
this.getOrderData();
} else {
this.$util.redirectTo('/pages_tool/login/login', {
back: '/pages_order/detail_point?order_id=' + this.orderId
});
}
},
goRefundDetail(id) {
this.$util.redirectTo('/pages_tool/order/refund_detail', {
order_goods_id: id
});
},
goDetail(id) {
this.$util.redirectTo('/pages_promotion/point/detail', {
id: id
});
},
navigateBack() {
this.$util.goBack();
},
getOrderData() {
this.$api.sendRequest({
url: '/pointexchange/api/order/info',
data: {
order_id: this.orderId
},
success: res => {
uni.stopPullDownRefresh();
if (res.code >= 0) {
methods: {
goRefund(id) {
this.$util.redirectTo('/pages_tool/order/refund', {
order_goods_id: id
});
},
goRefundDetail(id) {
this.$util.redirectTo('/pages_tool/order/refund_detail', {
order_goods_id: id
});
},
goDetail(id) {
this.$util.redirectTo('/pages_promotion/point/detail', {
id: id
});
},
navigateBack() {
this.$util.goBack();
},
getOrderData() {
this.$api.sendRequest({
url: '/pointexchange/api/order/info',
data: {
order_id: this.orderId
},
success: res => {
uni.stopPullDownRefresh();
if (res.code >= 0) {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
this.orderData = res.data;
if (this.orderData.delivery_store_info != '') this.orderData.delivery_store_info =
JSON.parse(this.orderData.delivery_store_info);
} else {
this.$util.showToast({
title: '未获取到订单信息!'
});
setTimeout(() => {
this.$util.redirectTo('/pages_order/list');
}, 1500);
}
},
fail: res => {
uni.stopPullDownRefresh();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
this.orderData = res.data;
if (this.orderData.delivery_store_info != '') this.orderData.delivery_store_info =
JSON.parse(this.orderData.delivery_store_info);
} else {
this.$util.showToast({
title: '未获取到订单信息!'
});
setTimeout(() => {
this.$util.redirectTo('/pages_order/base/list');
}, 1500);
}
},
fail: res => {
uni.stopPullDownRefresh();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}
});
},
/**
* 下拉刷新
*/
onPullDownRefresh() {
this.getOrderData();
},
orderClose() {
uni.showModal({
title: '提示',
content: '确定关闭此次兑换?',
success: res => {
if (res.confirm) {
this.$api.sendRequest({
url: '/pointexchange/api/order/close',
data: {
order_id: this.orderData.order_id
},
success: res => {
if (res.code >= 0) {
this.$util.showToast({
title: '关闭成功'
});
this.getOrderData();
});
},
/**
* 下拉刷新
*/
onPullDownRefresh() {
this.getOrderData();
},
orderClose() {
uni.showModal({
title: '提示',
content: '确定关闭此次兑换?',
success: res => {
if (res.confirm) {
this.$api.sendRequest({
url: '/pointexchange/api/order/close',
data: {
order_id: this.orderData.order_id
},
success: res => {
if (res.code >= 0) {
this.$util.showToast({
title: '关闭成功'
});
this.getOrderData();
}
}
}
});
});
}
}
});
},
//
openChoosePayment() {
this.$refs.choosePaymentPopup.open();
},
orderPay() {
uni.setStorageSync('paySource', 'pointexchange');
this.$refs.choosePaymentPopup.getPayInfo(this.orderData.out_trade_no);
},
exchangeImage(data) {
let img = '';
switch (data.type) {
case 1:
img = this.$util.img(data.exchange_image, {
size: 'mid'
});
break;
case 2:
img = data.exchange_image ? this.$util.img(data.exchange_image) : this.$util.img(
'public/uniapp/point/coupon.png');
break;
case 3:
img = data.exchange_image ? this.$util.img(data.exchange_image) : this.$util.img(
'public/uniapp/point/hongbao.png');
break;
}
});
return img;
},
imageError() {
switch (this.orderData.type) {
case 2:
this.orderData.exchange_image = this.$util.img('public/uniapp/point/coupon.png');
break;
case 3:
this.orderData.exchange_image = this.$util.img('public/uniapp/point/hongbao.png');
break;
default:
this.orderData.exchange_image = this.$util.getDefaultImage().goods;
}
this.$forceUpdate();
},
},
//
openChoosePayment() {
this.$refs.choosePaymentPopup.open();
},
orderPay() {
uni.setStorageSync('paySource', 'pointexchange');
this.$refs.choosePaymentPopup.getPayInfo(this.orderData.out_trade_no);
},
exchangeImage(data) {
let img = '';
switch (data.type) {
case 1:
img = this.$util.img(data.exchange_image, {
size: 'mid'
});
break;
case 2:
img = data.exchange_image ? this.$util.img(data.exchange_image) : this.$util.img(
'public/uniapp/point/coupon.png');
break;
case 3:
img = data.exchange_image ? this.$util.img(data.exchange_image) : this.$util.img(
'public/uniapp/point/hongbao.png');
break;
filters: {
abs(value) {
return Math.abs(parseFloat(value)).toFixed(2);
}
return img;
},
imageError() {
switch (this.orderData.type) {
case 2:
this.orderData.exchange_image = this.$util.img('public/uniapp/point/coupon.png');
break;
case 3:
this.orderData.exchange_image = this.$util.img('public/uniapp/point/hongbao.png');
break;
default:
this.orderData.exchange_image = this.$util.getDefaultImage().goods;
}
this.$forceUpdate();
},
},
filters: {
abs(value) {
return Math.abs(parseFloat(value)).toFixed(2);
}
}
};
};
</script>
<style lang="scss">
@import '../public/css/detail.scss';
@import './public/css/detail.scss';
</style>
<style scoped>
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
max-height: unset !important;
}
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
max-height: unset !important;
}
</style>

View File

@@ -165,15 +165,20 @@
</template>
<script>
import orderMethod from '../public/js/orderMethod.js';
import orderMethod from './public/js/orderMethod.js';
import nsPayment from '@/components/payment/payment.vue';
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
import nsLogin from '@/components/ns-login/ns-login.vue';
import loadingCover from '@/components/loading-cover/loading-cover.vue';
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
export default {
components: {
nsPayment: () => import('@/components/payment/payment.vue'),
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
nsPayment,
MescrollUni,
nsLogin,
loadingCover,
nsEmpty
},
data() {
return {
@@ -214,7 +219,7 @@ export default {
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
} else {
this.$nextTick(() => {
this.$refs.login.open('/pages_order/base/list?status=' + this.orderStatus);
this.$refs.login.open('/pages_order/list?status=' + this.orderStatus);
})
}
},
@@ -367,13 +372,13 @@ export default {
switch (parseInt(data.order_type)) {
case 2:
//
this.$util.redirectTo('/pages_order/detail/detail_pickup', {
this.$util.redirectTo('/pages_order/detail_pickup', {
order_id: data.order_id
});
break;
case 3:
//
this.$util.redirectTo('/pages_order/detail/detail_local_delivery', {
this.$util.redirectTo('/pages_order/detail_local_delivery', {
order_id: data.order_id
});
break;
@@ -384,7 +389,7 @@ export default {
});
break;
default:
this.$util.redirectTo('/pages_order/detail/detail', {
this.$util.redirectTo('/pages_order/detail', {
order_id: data.order_id
});
break;
@@ -462,7 +467,7 @@ export default {
</script>
<style lang="scss">
@import '../public/css/list.scss';
@import './public/css/list.scss';
</style>
<style lang="scss" scoped>

View File

@@ -6,9 +6,6 @@
<script>
export default {
components: {
commonPayment: () => import('@/components/common-payment/common-payment.vue'),
},
data() {
return {
api: {