修改确认收货页面
This commit is contained in:
@@ -12,6 +12,6 @@ export function image() {
|
||||
}
|
||||
|
||||
// 发送短信验证码
|
||||
export const sendSmsCaptcha = (data) => {
|
||||
return request.post(api.sendSmsCaptcha, data)
|
||||
export function sendSmsCaptcha(data) {
|
||||
return request.post(api.sendSmsCaptcha, data, { load: false })
|
||||
}
|
||||
@@ -67,13 +67,16 @@
|
||||
import {
|
||||
uploadFile
|
||||
} from '@/api/upload'
|
||||
import {
|
||||
http
|
||||
} from '@/websoft/api/index.js'
|
||||
import {
|
||||
pageOrder,
|
||||
removeOrder,
|
||||
receipt,
|
||||
receiptOrder,
|
||||
getOrder
|
||||
} from '@/websoft/api/order.js'
|
||||
import { sendSmsCaptcha } from '@/api/captcha.js'
|
||||
import { sendSmsCaptcha } from '@/websoft/api/captcha.js'
|
||||
import { fileUrl } from '@/config.js'
|
||||
import { isMobile } from '@/utils/verify'
|
||||
|
||||
@@ -181,10 +184,11 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
sendSmsCaptcha({
|
||||
phone: that.receiptPhone,
|
||||
type: 'RECEIPT'
|
||||
}).then(result => {
|
||||
}).then(function (result) {
|
||||
console.log(result)
|
||||
if(result){
|
||||
if(result.code == 0) {
|
||||
@@ -199,12 +203,9 @@
|
||||
that.$toast(result.message)
|
||||
}
|
||||
}
|
||||
|
||||
}).catch(err => {
|
||||
console.log('e2: ',err);
|
||||
console.log('err: ',err);
|
||||
that.$toast(err.message)
|
||||
}).finally(e => {
|
||||
console.log('e3: ',e);
|
||||
})
|
||||
},
|
||||
|
||||
@@ -247,20 +248,34 @@
|
||||
}, */
|
||||
// 表单提交
|
||||
handleSubmit() {
|
||||
// if(orderSourceData.length < 5) {
|
||||
// return
|
||||
// }
|
||||
const that = this
|
||||
const app = this
|
||||
const { orderId,orderSourceData,captcha,receiptPhone,emergentUser,officeAddress, homeAddress } = app
|
||||
if(orderSourceData.length < 5) {
|
||||
return
|
||||
}
|
||||
receipt(app).then(result => {
|
||||
|
||||
|
||||
receiptOrder({
|
||||
orderId: orderId,
|
||||
orderSourceData: JSON.stringify(orderSourceData),
|
||||
captcha: captcha,
|
||||
receiptPhone: receiptPhone,
|
||||
emergentUser: emergentUser,
|
||||
officeAddress: officeAddress,
|
||||
homeAddress: homeAddress
|
||||
}).then(result => {
|
||||
if(result.code == 0) {
|
||||
app.$success("上传成功")
|
||||
uni.navigateBack()
|
||||
that.$success("确认收货成功!")
|
||||
// uni.navigateBack()
|
||||
setTimeout(()=>{
|
||||
that.$navTo('pages/order/index',{}, 'redirectTo')
|
||||
}, 1000)
|
||||
} else {
|
||||
app.$toast(result.message)
|
||||
that.$toast(result.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
app.$toast(err.message)
|
||||
that.$toast(err.message)
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
8
websoft/api/captcha.js
Normal file
8
websoft/api/captcha.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import http from './index.js'
|
||||
|
||||
// 发送短信验证码
|
||||
export const sendSmsCaptcha = (params) => http.post('sendSmsCaptcha', params)
|
||||
|
||||
export default {
|
||||
sendSmsCaptcha
|
||||
}
|
||||
Reference in New Issue
Block a user