Commit a8ece0fc authored by qipeng's avatar qipeng

订单详情 新增短信接口

parent 6e62d5e0
...@@ -405,6 +405,7 @@ ...@@ -405,6 +405,7 @@
}, },
data() { data() {
return { return {
orderDataType:false,
openId:'',//用户信息 openId:'',//用户信息
id:'',//订单ID id:'',//订单ID
companyId:'',//公司ID companyId:'',//公司ID
...@@ -436,6 +437,7 @@ ...@@ -436,6 +437,7 @@
qrCodeType:false,//是否是多个二维码 qrCodeType:false,//是否是多个二维码
btnRefundType:false,//是否可退款 btnRefundType:false,//是否可退款
ifyukuaiCode:'', ifyukuaiCode:'',
visitorIndex:'',//短信特殊字段
} }
}, },
onShow() { onShow() {
...@@ -458,11 +460,21 @@ ...@@ -458,11 +460,21 @@
}) })
}, },
onLoad(option) { onLoad(option) {
console.log(option.orderId)
console.log("-----------------------")
if(option.orderId!=undefined){
this.id = option.orderId this.id = option.orderId
this.orderDataType = true
}else{
this.id = option.thirdOrderId
this.visitorIndex = option.visitorIndex
this.orderDataType = false
}
this.ifyukuaiCode = option.ifyukuaiCode||'' this.ifyukuaiCode = option.ifyukuaiCode||''
//this.id = "z00167956572219584dc15634b62cf75" //this.id = "z00167956572219584dc15634b62cf75"
//this.openId = uni.getStorageSync("openid") //openid oroHZ5FaUQ_SOOC_uQQP92fJpBRE oh2UV1lyYABHMZ1rMlgjhVHyyYDQ this.openId = uni.getStorageSync("openid") //openid oroHZ5FaUQ_SOOC_uQQP92fJpBRE oh2UV1lyYABHMZ1rMlgjhVHyyYDQ
this.openId = "oh2UV1lyYABHMZ1rMlgjhVHyyYDQ" //this.openId = "oh2UV1lyYABHMZ1rMlgjhVHyyYDQ"
this.getDetail(); this.getDetail();
}, },
...@@ -481,11 +493,23 @@ ...@@ -481,11 +493,23 @@
}, },
methods: { methods: {
getDetail(){//*-----------------加载订单 getDetail(){//*-----------------加载订单
let data={ var postHttpUrl = '';
let data = {}
if(this.orderDataType == true){//为小程序
data={
orderId:this.id,//订单ID orderId:this.id,//订单ID
userId:this.openId,//用户Id userId:this.openId,//用户Id
} }
this.$request('order/userOrder/findOrderDetail',data).then((res)=>{ postHttpUrl = 'order/userOrder/findOrderDetail'
}else{//为短信
data={
thirdOrderId:this.id,//订单ID
userId:this.openId,//用户Id
}
postHttpUrl = 'order/userOrder/findOrderDetailByThirdOrderId'
}
this.$request(postHttpUrl,data).then((res)=>{
if(res.code=="00"){ if(res.code=="00"){
this.orderInfo = res.data this.orderInfo = res.data
this.orderExtendList = res.data.orderExtendList this.orderExtendList = res.data.orderExtendList
...@@ -626,10 +650,16 @@ ...@@ -626,10 +650,16 @@
// height: 180, // height: 180,
// text:this.verifyCode // text:this.verifyCode
// }) // })
let verifyCode=""
if(this.visitorIndex!==""){
verifyCode=this.verifyCode+":"+this.visitorIndex
}else{
verifyCode=this.verifyCode
}
uQRCode.make({ uQRCode.make({
canvasId: 'qrcode', canvasId: 'qrcode',
componentInstance: this, componentInstance: this,
text: this.verifyCode, text: verifyCode,
size: 180, size: 180,
margin: 10, margin: 10,
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
...@@ -677,10 +707,16 @@ ...@@ -677,10 +707,16 @@
// height: 180, // height: 180,
// text:this.codeNo // text:this.codeNo
// }) // })
let verifyCode=""
if(this.visitorIndex!==""){
verifyCode=this.codeNo+":"+this.visitorIndex
}else{
verifyCode=this.codeNo
}
uQRCode.make({ uQRCode.make({
canvasId: 'qrcode', canvasId: 'qrcode',
componentInstance: this, componentInstance: this,
text: this.codeNo, text: verifyCode,
size: 180, size: 180,
margin: 10, margin: 10,
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment