Commit a982b8ab by 张立顺

Merge branch 'dev_v4.17.0' into dev_v4.17.1

2 parents d17ca447 3aaa20c9
...@@ -84,10 +84,10 @@ module.exports = { ...@@ -84,10 +84,10 @@ module.exports = {
return api.post('dj.api.smartcarlife.config.list', data) return api.post('dj.api.smartcarlife.config.list', data)
}, },
// /** 获取指定商户指定日期范围的邀约统计 */ /** 获取指定商户指定日期范围的邀约统计 */
// getInviteDateList(data) { getInviteDateList(data) {
// return api.post('dj.api.smartcarlife.inviteStat.merchant.list', data) return api.post('dj.api.smartcarlife.inviteStat.merchant.list', data)
// }, },
/** 获取WebSocket地址 */ /** 获取WebSocket地址 */
getWsUrl() { getWsUrl() {
return api.post('dj.api.smartcarlife.getWsUrl') return api.post('dj.api.smartcarlife.getWsUrl')
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* 2测试 * 2测试
* 3生产环境 * 3生产环境
*/ */
export let env = 2 export let env = 3
// 配置预发布的小程序aapId // 配置预发布的小程序aapId
// export const preReleaseAppId = 'wx24ebae5768e74138' // export const preReleaseAppId = 'wx24ebae5768e74138'
......
...@@ -207,12 +207,16 @@ ...@@ -207,12 +207,16 @@
.list .item { .list .item {
box-sizing: border-box; box-sizing: border-box;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0 6rpx 16rpx 0 #cdcdd159; box-shadow: 0 6rpx 16rpx 0 rgba(205, 205, 209, 0.5);
border-radius: 16rpx; border-radius: 16rpx;
/* padding: 20rpx 32rpx; */ /* padding: 20rpx 32rpx; */
margin: 0 6rpx 20rpx; margin: 0 6rpx 20rpx;
} }
.list .item:first-child {
margin-top: 6rpx;
}
.item .item-content { .item .item-content {
position: relative; position: relative;
padding: 0 32rpx; padding: 0 32rpx;
......
...@@ -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')
......
...@@ -163,8 +163,9 @@ ...@@ -163,8 +163,9 @@
height: 24rpx; height: 24rpx;
} }
.total-box { .total-box {
padding: 24rpx 30rpx 20rpx; display: flex;
padding: 24rpx 30rpx;
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #222222; color: #222222;
...@@ -184,7 +185,7 @@ ...@@ -184,7 +185,7 @@
.list { .list {
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
padding: 20rpx; padding: 0 20rpx 20rpx;
padding-bottom: 0; padding-bottom: 0;
/* height: calc(100% - 20rpx); */ /* height: calc(100% - 20rpx); */
height: calc(100% - 60rpx); height: calc(100% - 60rpx);
...@@ -194,12 +195,16 @@ ...@@ -194,12 +195,16 @@
.list .item { .list .item {
box-sizing: border-box; box-sizing: border-box;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0 6rpx 16rpx 0 #cdcdd159; box-shadow: 0 6rpx 16rpx 0 rgba(205, 205, 209, 0.5);
border-radius: 16rpx; border-radius: 16rpx;
margin: 0 6rpx 20rpx; margin: 0 6rpx 20rpx;
} }
.item .itme-content { .list .item:first-child {
margin-top: 20rpx;
}
.item .item-content {
padding: 20rpx 32rpx 0; padding: 20rpx 32rpx 0;
} }
...@@ -399,6 +404,13 @@ ...@@ -399,6 +404,13 @@
color: #EB9B2F; color: #EB9B2F;
} }
.icon-info {
width: 28rpx;
height: 28rpx;
margin-right: 8rpx;
vertical-align: middle;
}
.order-btn { .order-btn {
box-sizing: border-box; box-sizing: border-box;
height: 56rpx; height: 56rpx;
......
...@@ -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!