|
|
@@ -20,7 +20,7 @@
|
|
|
<block v-if="!$util.isEmpty(list.data)">
|
|
|
<div class="list" v-for="(item, index) in list.data" :key="index">
|
|
|
|
|
|
- <OrderItem :ref="`orderRef${item.id}`" :item="item" :isScanEnv="isScanEnv" @printOrder="printOrder" @directFh="directFh" @fillNoFh="fillNoFh">
|
|
|
+ <OrderItem :ref="`orderRef${item.id}`" :item="item" :isScanEnv="isScanEnv" @printOrder="printOrder" @directFh="directFh" @fillNoFh="fillNoFh" @shareOrder="shareOrder">
|
|
|
</OrderItem>
|
|
|
|
|
|
</div>
|
|
|
@@ -65,6 +65,7 @@ import AppSearchModule from "@/components/module/app-search";
|
|
|
import DropShopSelect from "@/components/module/shopSelect";
|
|
|
import OrderItem from "./components/OrderItem";
|
|
|
import DateSelect from "@/components/module/dateSelect";
|
|
|
+import { IMGHOST } from '@/config'
|
|
|
export default {
|
|
|
name: "order",
|
|
|
components: {
|
|
|
@@ -78,7 +79,10 @@ export default {
|
|
|
NotLogin
|
|
|
},
|
|
|
mixins: [list],
|
|
|
- computed: { ...mapGetters(["getLoginInfo", "getDictionariesInfo"]) },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(["getLoginInfo", "getDictionariesInfo"]),
|
|
|
+ ...mapGetters({dictInfo:"getDictionariesInfo" }),
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
fhWlInfo:[],
|
|
|
@@ -134,7 +138,9 @@ export default {
|
|
|
searchTime:'',
|
|
|
startTime:'',
|
|
|
endTime:'',
|
|
|
- fromDetail:{status:1}
|
|
|
+ fromDetail:{status:1},
|
|
|
+ currentInfo:{},
|
|
|
+ currentTitle:''
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
@@ -174,6 +180,16 @@ export default {
|
|
|
this.init()
|
|
|
}
|
|
|
},
|
|
|
+ onShareAppMessage(res) {
|
|
|
+ this.fromDetail.status = 1
|
|
|
+ console.log("pagesOrder/showOrder?id="+this.currentInfo.purchaseId)
|
|
|
+ return {
|
|
|
+ title: this.currentTitle,
|
|
|
+ desc: "",
|
|
|
+ imageUrl: IMGHOST+'/custom/order_share.jpg',
|
|
|
+ path: "pagesOrder/showOrder?id="+this.currentInfo.purchaseId,
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
directFh(info){
|
|
|
let that = this
|
|
|
@@ -186,6 +202,41 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ shareOrder(info){
|
|
|
+ this.currentInfo = info
|
|
|
+ console.log("pagesOrder/showOrder?id="+info.purchaseId)
|
|
|
+ let that = this
|
|
|
+ let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.ghs ? that.dictInfo.miniOriginalId.current.ghs : ''
|
|
|
+ let actPrice = info.actPrice ? parseFloat(info.actPrice) : 0
|
|
|
+ let customName = info.customName ? info.customName : ''
|
|
|
+ let title = customName+' '+info.addTime.substr(5,11)+' ¥'+actPrice
|
|
|
+ if(info.tkPrice && Number(info.tkPrice)>0){
|
|
|
+ title = title+' 已退¥'+parseFloat(info.tkPrice)
|
|
|
+ }
|
|
|
+ this.currentTitle = title
|
|
|
+ // #ifdef APP-PLUS
|
|
|
+ uni.share({
|
|
|
+ provider: "weixin", //分享服务提供商(即weixin|qq|sinaweibo)
|
|
|
+ scene: 'WXSceneSession', //场景,可取值参考下面说明。
|
|
|
+ type: 5, //分享形式
|
|
|
+ title: title, //分享内容的标题
|
|
|
+ summary: '暂无', //分享内容的摘要
|
|
|
+ imageUrl: IMGHOST+'/custom/order_share.jpg',//图片一定要有,不然会分享失败
|
|
|
+ miniProgram: {
|
|
|
+ id: miniOriginalId,//小程序原始id,发起分享的 App 与小程序属于同一微信开放平台帐号
|
|
|
+ path: "pagesOrder/showOrder?id="+info.purchaseId,
|
|
|
+ type: 0,// 0-正式版; 1-测试版; 2-体验版
|
|
|
+ webUrl: 'https://www.wixhb.com'
|
|
|
+ },
|
|
|
+ success: function(res) {
|
|
|
+ console.log(res)
|
|
|
+ },
|
|
|
+ fail: function(err) {
|
|
|
+ console.log(err)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // #endif
|
|
|
+ },
|
|
|
fillNoFh(info){
|
|
|
let that = this
|
|
|
this.fhLabelShow = true
|