|
@@ -1,18 +1,29 @@
|
|
|
<template>
|
|
<template>
|
|
|
<appResult :title="option.title">
|
|
<appResult :title="option.title">
|
|
|
- <button v-if="option.title != '报损成功'" class="admin-button-com big" @click="gotoOrderDetail">订单详情</button>
|
|
|
|
|
- <button class="admin-button-com big" @click="goBackHome">返回首页</button>
|
|
|
|
|
|
|
+
|
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
|
- <button v-if="option.title != '报损成功'" class="admin-button-com big" @click="shareTo">打开分享给 {{customName}}</button>
|
|
|
|
|
|
|
+ <button v-if="option.title != '报损成功'" class="admin-button-com big blue" open-type="share">
|
|
|
|
|
+ 分享给<text style="font-weight:bold;margin-left:12upx;">{{customName}}</text>
|
|
|
|
|
+ </button>
|
|
|
<!-- #endif -->
|
|
<!-- #endif -->
|
|
|
|
|
+ <!-- #ifdef APP-PLUS -->
|
|
|
|
|
+ <button v-if="option.title != '报损成功'" class="admin-button-com big blue" @click="shareOrder">
|
|
|
|
|
+ 分享给<text style="font-weight:bold;margin-left:12upx;">{{customName}}</text>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ <!-- #endif -->
|
|
|
|
|
+
|
|
|
|
|
+ <button v-if="option.title != '报损成功'" class="admin-button-com big" @click="gotoOrderDetail">订单详情</button>
|
|
|
|
|
+ <button class="admin-button-com big" @click="goBackHome">返回首页</button>
|
|
|
</appResult>
|
|
</appResult>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
-import appResult from "@/components/app-result";
|
|
|
|
|
-import { getDetail} from "@/api/order/index";
|
|
|
|
|
-import { getWeixinId } from "@/api/invite/index";
|
|
|
|
|
|
|
+import { mapGetters } from "vuex"
|
|
|
|
|
+import appResult from "@/components/app-result"
|
|
|
|
|
+import { getDetail} from "@/api/order/index"
|
|
|
|
|
+import { getWeixinId } from "@/api/invite/index"
|
|
|
|
|
+import { IMGHOST } from '@/config'
|
|
|
export default {
|
|
export default {
|
|
|
- name: "BillingResult",
|
|
|
|
|
|
|
+ name: "result",
|
|
|
components: {
|
|
components: {
|
|
|
appResult,
|
|
appResult,
|
|
|
},
|
|
},
|
|
@@ -21,32 +32,48 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
detailInfo: {},
|
|
detailInfo: {},
|
|
|
customName:'客户',
|
|
customName:'客户',
|
|
|
- getappIdList: {}
|
|
|
|
|
|
|
+ getappIdList: {},
|
|
|
|
|
+ title:'新订单'
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ ...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo" }),
|
|
|
|
|
+ },
|
|
|
|
|
+ onShareAppMessage(res) {
|
|
|
|
|
+ console.log("pagesOrder/showOrder?id="+this.detailInfo.purchaseId)
|
|
|
|
|
+ return {
|
|
|
|
|
+ title: this.title,
|
|
|
|
|
+ desc: "",
|
|
|
|
|
+ imageUrl: IMGHOST+'/custom/order_share.jpg',
|
|
|
|
|
+ path: "pagesOrder/showOrder?id="+this.detailInfo.purchaseId,
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
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
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ shareOrder(){
|
|
|
|
|
+ console.log("pagesOrder/showOrder?id="+this.detailInfo.purchaseId)
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.ghs ? that.dictInfo.miniOriginalId.current.ghs : ''
|
|
|
|
|
+ uni.share({
|
|
|
|
|
+ provider: "weixin", //分享服务提供商(即weixin|qq|sinaweibo)
|
|
|
|
|
+ scene: 'WXSceneSession', //场景,可取值参考下面说明。
|
|
|
|
|
+ type: 5, //分享形式
|
|
|
|
|
+ title: that.title, //分享内容的标题
|
|
|
|
|
+ summary: '暂无', //分享内容的摘要
|
|
|
|
|
+ imageUrl: IMGHOST+'/custom/order_share.jpg',//图片一定要有,不然会分享失败
|
|
|
|
|
+ miniProgram: {
|
|
|
|
|
+ id: miniOriginalId,//小程序原始id,发起分享的 App 与小程序属于同一微信开放平台帐号
|
|
|
|
|
+ path: "pagesOrder/showOrder?id="+this.detailInfo.purchaseId,
|
|
|
|
|
+ type: 0,// 0-正式版; 1-测试版; 2-体验版
|
|
|
|
|
+ webUrl: 'https://www.wixhb.com'
|
|
|
|
|
+ },
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ //console.log(res)
|
|
|
|
|
+ },
|
|
|
|
|
+ fail: function(err) {
|
|
|
|
|
+ //console.log(err)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
async init() {
|
|
async init() {
|
|
|
if (this.option.title != "报损成功") {
|
|
if (this.option.title != "报损成功") {
|
|
|
|
|
|
|
@@ -58,6 +85,10 @@ export default {
|
|
|
id: this.option.orderId,
|
|
id: this.option.orderId,
|
|
|
});
|
|
});
|
|
|
this.detailInfo = res.data;
|
|
this.detailInfo = res.data;
|
|
|
|
|
+
|
|
|
|
|
+ let actPrice = this.detailInfo.actPrice ? parseFloat(this.detailInfo.actPrice) : 0
|
|
|
|
|
+ this.title = this.detailInfo.addTime.substr(5,11)+' ¥'+actPrice
|
|
|
|
|
+
|
|
|
if(this.detailInfo.customName && !this.$util.isEmpty(this.detailInfo.customName)) {
|
|
if(this.detailInfo.customName && !this.$util.isEmpty(this.detailInfo.customName)) {
|
|
|
this.customName = this.detailInfo.customName
|
|
this.customName = this.detailInfo.customName
|
|
|
}
|
|
}
|