Commit 276bb2a7 by 张立顺

重复提交bug修复

1 parent 7dd6d7e4
...@@ -11,7 +11,9 @@ Page({ ...@@ -11,7 +11,9 @@ Page({
certificateNo: '', certificateNo: '',
carVin: '', carVin: '',
seat: '5', seat: '5',
price: '' price: '',
confirmStatus: false,
saveStatus: false
}, },
// owner: { // owner: {
// owner: 'test2', // owner: 'test2',
...@@ -123,13 +125,18 @@ Page({ ...@@ -123,13 +125,18 @@ Page({
async handleSecondConfirm() { async handleSecondConfirm() {
// owner, orderInfo, // owner, orderInfo,
// 修改权益报价逻辑 // 修改权益报价逻辑
let { modifyEquityQuotation } = this.data let { modifyEquityQuotation, confirmStatus } = this.data
if (confirmStatus) return false
if (modifyEquityQuotation) { if (modifyEquityQuotation) {
return this.updateEquityPrice() return this.updateEquityPrice()
} }
// orderInfo.check = false // orderInfo.check = false
// orderInfo.owner = owner // orderInfo.owner = owner
// this.setData({ orderInfo }) // this.setData({ orderInfo })
wx.showLoading('报价中...')
this.setData({
confirmStatus: true
})
let result = await this.handleSecondConfirmCheck() let result = await this.handleSecondConfirmCheck()
let { code, data: id, message } = result let { code, data: id, message } = result
...@@ -137,14 +144,20 @@ Page({ ...@@ -137,14 +144,20 @@ Page({
if (id) { if (id) {
// 校验生成告知书是否成功 // 校验生成告知书是否成功
let status = await this.getQuotationGenerate(id) let status = await this.getQuotationGenerate(id)
wx.hideLoading()
this.setData({
confirmStatus: false
})
console.log('id', id) console.log('id', id)
status.code == 0 ? this.navigatorNext(id) : wx.$util.showToast(status.message || '报价失败') status.code == 0 ? this.navigatorNext(id) : wx.$util.showToast(status.message || '报价失败')
// let // let
// status && this.navigatorNext(id) // status && this.navigatorNext(id)
} else { } else {
console.log(message) console.log(message)
wx.hideLoading()
this.setData({
confirmStatus: false
})
wx.$util.showToast(message || '报价失败') wx.$util.showToast(message || '报价失败')
} }
...@@ -272,14 +285,22 @@ Page({ ...@@ -272,14 +285,22 @@ Page({
}, },
// 不需要检验 存草稿 // 不需要检验 存草稿
async handleEditSave() { async handleEditSave() {
let { owner, orderInfo, modifyEquityQuotation } = this.data let { owner, orderInfo, modifyEquityQuotation, saveStatus } = this.data
if (modifyEquityQuotation) { if (modifyEquityQuotation) {
return this.updateEquityPrice('saveEdit') return this.updateEquityPrice('saveEdit')
} }
if (saveStatus) return false
wx.showLoading('保存中...')
this.setData({
saveStatus: true
})
orderInfo.check = false orderInfo.check = false
orderInfo.owner = owner orderInfo.owner = owner
this.setData({ orderInfo }) this.setData({ orderInfo })
let id = await this.handleSecondConfirmCheck() let id = await this.handleSecondConfirmCheck()
this.setData({
saveStatus: false
})
console.log('id', id) console.log('id', id)
// this.navigatorNext() // this.navigatorNext()
// wx.$router.go('packageEquity.index') // wx.$router.go('packageEquity.index')
......
...@@ -50,7 +50,7 @@ Page({ ...@@ -50,7 +50,7 @@ Page({
if (name == 'confirm') { if (name == 'confirm') {
console.log(wx.$router) console.log(wx.$router)
// this.triggerEvent('confirm') // this.triggerEvent('confirm')
wx.$router.reLaunch('signature', { id }) wx.$router.redirectTo('signature', { id })
} else if (name == 'edit') { } else if (name == 'edit') {
// this.triggerEvent('editSave') // this.triggerEvent('editSave')
this.backEdit() this.backEdit()
......
...@@ -55,6 +55,28 @@ const secretKey_items = { ...@@ -55,6 +55,28 @@ const secretKey_items = {
secret: '4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353' secret: '4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353'
} }
} }
const scrmSecretKey_items = {
ip: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
},
dev: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
},
uat: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
},
prod: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
},
preRelease: {
appKey: 'd7ffc3346fc9a45bccaaa35300d59022',
secret: '4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353'
}
}
const domain_items = { const domain_items = {
ip: { ip: {
// dj: 'http://192.168.1.165:8292', // dj: 'http://192.168.1.165:8292',
...@@ -94,5 +116,6 @@ const target = ['ip', 'dev', 'uat', 'prod', 'preRelease'] ...@@ -94,5 +116,6 @@ const target = ['ip', 'dev', 'uat', 'prod', 'preRelease']
// console.log(domain_items[target[index]]); // console.log(domain_items[target[index]]);
module.exports = { module.exports = {
domain: domain_items[target[index]], domain: domain_items[target[index]],
secretKey: secretKey_items[target[index]] secretKey: secretKey_items[target[index]],
scrmSecretKey: scrmSecretKey_items[target[index]]
} }
import { secretKey, domain, path, sign } from './http.js' import { secretKey, domain, path, sign,scrmSecretKey } from './http.js'
import util from '~/utils/util.js' import util from '~/utils/util.js'
/**接口 */ /**接口 */
class Request { class Request {
...@@ -94,14 +94,23 @@ class Request { ...@@ -94,14 +94,23 @@ class Request {
getData(data, method, noSignAttr) { getData(data, method, noSignAttr) {
let sessionId = util.getSessionId() let sessionId = util.getSessionId()
if (sessionId) data['sessionId'] = sessionId if (sessionId) data['sessionId'] = sessionId
console.log(data,'request');
data['v'] = '1.0.0' data['v'] = '1.0.0'
data['method'] = method data['method'] = method
data['format'] = 'json' data['format'] = 'json'
data['locale'] = 'zh_CN' data['locale'] = 'zh_CN'
data['source'] = 'dj-wechat' data['source'] = 'dj-wechat'
data['appKey'] = secretKey.appKey
let obj = sign(data, secretKey.secret, noSignAttr) // 兼容线上appkey和secret不一样的情况
let djapi = data.method.includes('dj.api')
let scmrapi = data.method.includes('scrm.api')
console.log(scmrapi,'scmrapi');
const appKey = scmrapi?scrmSecretKey.appKey:djapi?secretKey.appKey:''
const secret = scmrapi?scrmSecretKey.secret:djapi?secretKey.secret:''
data['appKey'] = appKey
let obj = sign(data, secret, noSignAttr)
//data['sign'] = obj.sign; //data['sign'] = obj.sign;
return obj return obj
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!