|
|
@@ -223,7 +223,7 @@
|
|
|
</view>
|
|
|
<div class="app-footer">
|
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
|
- <button class="admin-button-com default" v-if="detailInfo.status == 4" open-type="share">分享给客户</button>
|
|
|
+ <button class="admin-button-com default" v-if="detailInfo.status == 4" @click="shareTo()">打开并分享</button>
|
|
|
<!-- #endif -->
|
|
|
<button @click="cancelOrderFn(detailInfo)" v-if="detailInfo.status == 1" class="admin-button-com default" :class="active">取消</button>
|
|
|
<template v-for="s in detailInfo.buttonList">
|
|
|
@@ -256,6 +256,7 @@ import { ORDER_STATUS } from "@/utils/declare";
|
|
|
import BLE from "@/mixins/BLE";
|
|
|
import { cloudPrintOrder, cancelOrder } from "@/api/order";
|
|
|
import { hasHitNavigate } from "@/api/map";
|
|
|
+import { getWeixinId } from "@/api/invite/index";
|
|
|
export default {
|
|
|
name: "orderDetail",
|
|
|
components: {
|
|
|
@@ -278,7 +279,8 @@ export default {
|
|
|
freeShipModal: false,
|
|
|
loading: false,
|
|
|
settlePrice:0,
|
|
|
- showCancelBtn: true
|
|
|
+ showCancelBtn: true,
|
|
|
+ getappIdList: {}
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
@@ -286,22 +288,40 @@ export default {
|
|
|
uni.stopPullDownRefresh()
|
|
|
})
|
|
|
},
|
|
|
- onShareAppMessage(res) {
|
|
|
- console.log("pagesOrder/info?id="+this.detailInfo.id)
|
|
|
- let price = this.detailInfo.orderPrice ? parseFloat(this.detailInfo.orderPrice):0
|
|
|
- return {
|
|
|
- title: this.detailInfo.addTime.substr(5,5)+' ¥'+price,
|
|
|
- desc: "",
|
|
|
- path: "pagesOrder/info?id="+this.detailInfo.id,
|
|
|
- }
|
|
|
- },
|
|
|
onShow() {
|
|
|
+
|
|
|
+ getWeixinId().then(res => {
|
|
|
+ this.getappIdList = res.data
|
|
|
+ })
|
|
|
+
|
|
|
this.init();
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters({ loginInfo: "getLoginInfo" }),
|
|
|
},
|
|
|
methods: {
|
|
|
+ shareTo(){
|
|
|
+ // #ifdef APP-PLUS
|
|
|
+ this.$msg('暂时只支持小程序')
|
|
|
+ // #endif
|
|
|
+ if(this.$util.isEmpty(this.detailInfo)){
|
|
|
+ this.$msg('稍等3秒再点')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ let that = this
|
|
|
+ console.log('pagesPurchase/purDetails?id='+ that.detailInfo.purchaseId)
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ uni.navigateToMiniProgram({
|
|
|
+ appId: that.getappIdList.hd.miniAppId,
|
|
|
+ path: 'pagesPurchase/purDetails?id='+ that.detailInfo.purchaseId,
|
|
|
+ //develop 开发版 trial 体验版 release 正式版
|
|
|
+ envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
|
|
|
+ extraData: {},
|
|
|
+ success (res) {
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // #endif
|
|
|
+ },
|
|
|
goRefund(){
|
|
|
if(this.detailInfo.payWay == 1){
|
|
|
this.$msg('支付宝订单暂不支持退款,请线下退款')
|