@@ -0,0 +1,14 @@ | |||
const env = 'dev' // 开发环境 | |||
// const env = 'prod' // 生产环境 | |||
const configOption = { | |||
dev: { | |||
prefix: '/newDev/ndev' | |||
}, | |||
prod: { | |||
prefix: '/newProd/prod' | |||
} | |||
} | |||
export default configOption[env] |
@@ -487,6 +487,7 @@ | |||
vehicUsePropert, | |||
vehicCharge, | |||
ocrAllQuery, | |||
contractQuery, | |||
} from "@/utils/network/api.js"; | |||
import { request, requestNew } from "@/utils/network/request.js"; | |||
@@ -677,10 +678,23 @@ | |||
// } | |||
// } | |||
// }); | |||
navTo( | |||
`/subpackage/orders/product-detail?orderId=${state.form.orderNo}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}&&isValueCard=${getItem("isValueCard")}&vehicleId=${state.form.vehicleId}`, | |||
); | |||
const options = { | |||
type: 2, | |||
data: { | |||
orderNo: state.form.orderNo, //订单编号 | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
requestNew(contractQuery, options).then(res => { | |||
if (res.flag) { | |||
navTo( | |||
`/subpackage/orders/product-detail?orderId=${state.form.orderNo}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}&&isValueCard=${getItem("isValueCard")}&vehicleId=${state.form.vehicleId}`, | |||
); | |||
} else { | |||
navTo(`/subpackage/orders/order_payment?orderId=${state.form.orderNo}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}&&isValueCard=${getItem("isValueCard")}&vehicleId=${state.form.vehicleId}`); | |||
} | |||
}) | |||
} | |||
} |
@@ -32,9 +32,10 @@ | |||
<u-icon name="checkbox-mark" :color="state.checked ? '#FFFFFF' : '#FFFFFF'"></u-icon> | |||
</view> | |||
</view> | |||
<text class='txt'>签署协议</text> | |||
<text class='txt'>我已阅读并同意</text> | |||
<!-- <text class='txt'>签署协议</text> --> | |||
</view> | |||
<!-- <text v-for="(item,index) in state.agreeURL" class="txt xieyi" @click="downAuthD(item)">《{{item.name}}》</text> --> | |||
<text v-for="(item,index) in state.agreeURL" class="txt xieyi" @click="downAuthD(item)">《{{item.name}}》</text> | |||
</view> | |||
</view> | |||
</view> | |||
@@ -207,7 +208,7 @@ | |||
state.typeScanCode = option.typeScanCode | |||
console.log("state.agreeURL", state.agreeURL) | |||
} | |||
// queryAgreement(); | |||
queryAgreement(); | |||
}); | |||
onShow(() => { | |||
@@ -268,7 +269,11 @@ | |||
msg("请勾选协议"); | |||
} | |||
} else { | |||
goNextPage() | |||
if (state.checked) { | |||
goNextPage() | |||
} else { | |||
msg("请勾选协议"); | |||
} | |||
} | |||
} | |||
@@ -285,28 +290,28 @@ | |||
} | |||
const checkboxChange = () => { | |||
wx.navigateToMiniProgram({ | |||
appId: 'wx371151823f6f3edf', // 电子签appId; 联调时, 请使用demo小程序appId: 'wx371151823f6f3edf' | |||
path: 'pages/home/home-index', // 跳转的页面路径,可选,默认跳转到目标小程序首页; 签署时,需使用后台API返回的完整链接(类似pages/guide?id=xxx&foo=bar) | |||
extraData: { // 需要传递给目标小程序的数据,可选;签署时,腾讯电子签小程序未使用到该参数 | |||
foo: 'bar' | |||
}, | |||
envVersion: 'release', // 跳转正式或demo小程序,都需要传 'release' | |||
success(res) { | |||
// 成功跳转到目标小程序后的回调函数 | |||
console.log(res) | |||
}, | |||
fail(res) { | |||
console.log(res) | |||
// 跳转失败的回调函数 | |||
} | |||
}) | |||
// wx.navigateToMiniProgram({ | |||
// appId: 'wx371151823f6f3edf', // 电子签appId; 联调时, 请使用demo小程序appId: 'wx371151823f6f3edf' | |||
// path: 'pages/home/home-index', // 跳转的页面路径,可选,默认跳转到目标小程序首页; 签署时,需使用后台API返回的完整链接(类似pages/guide?id=xxx&foo=bar) | |||
// extraData: { // 需要传递给目标小程序的数据,可选;签署时,腾讯电子签小程序未使用到该参数 | |||
// foo: 'bar' | |||
// }, | |||
// envVersion: 'release', // 跳转正式或demo小程序,都需要传 'release' | |||
// success(res) { | |||
// // 成功跳转到目标小程序后的回调函数 | |||
// console.log(res) | |||
// }, | |||
// fail(res) { | |||
// console.log(res) | |||
// // 跳转失败的回调函数 | |||
// } | |||
// }) | |||
// if (state.isWatchContract) { | |||
// state.checked = !state.checked; | |||
// } else { | |||
// msg("请先阅读相关文件"); | |||
// } | |||
if (state.isWatchContract) { | |||
state.checked = !state.checked; | |||
} else { | |||
msg("请先阅读相关文件"); | |||
} | |||
}; | |||
const refresh = () => { | |||
let source = "" | |||
@@ -423,20 +428,20 @@ | |||
signFlag = "YES" | |||
console.log("查询是否签署协议", res) | |||
// let data = res; | |||
// let supAgreeArr = data.agreements; | |||
// if (state.agreeURL && state.agreeURL.length === 0) { | |||
// state.agreeURL = []; | |||
// console.log("data==", supAgreeArr) | |||
// for (var m = 0; m < supAgreeArr.length; m++) { | |||
// let obj = {} | |||
// for (let key in supAgreeArr[m]) { | |||
// obj['name'] = key; | |||
// obj['url'] = supAgreeArr[m][key]; | |||
// state.agreeURL.push(obj); | |||
// } | |||
// } | |||
// } | |||
let data = res; | |||
let supAgreeArr = data.agreements; | |||
if (state.agreeURL && state.agreeURL.length === 0) { | |||
state.agreeURL = []; | |||
console.log("data==", supAgreeArr) | |||
for (var m = 0; m < supAgreeArr.length; m++) { | |||
let obj = {} | |||
for (let key in supAgreeArr[m]) { | |||
obj['name'] = key; | |||
obj['url'] = supAgreeArr[m][key]; | |||
state.agreeURL.push(obj); | |||
} | |||
} | |||
} | |||
console.log("查协议", state.agreeURL, state.agreements) | |||
}); | |||
} |
@@ -1,3 +1,4 @@ | |||
import config from '@/config/index.js' | |||
import { appId, envs } from "./api"; | |||
import { encryption, sign, arrayToJson } from "./encryption"; | |||
import { setItem, getItem, StorageKeys, removeItem } from "../storage"; | |||
@@ -317,13 +318,9 @@ export function requestNew(code, options = {}, start = false, clie = () => {}) { | |||
accessToken: getItem(StorageKeys.Token), | |||
customerId: getItem('userInfo') ? (getItem('userInfo')['customerId'] || '' ) : "", | |||
}; | |||
if (process.env.NODE_ENV === 'development') { | |||
options.url = envs[process.env.NODE_ENV].baseUrl + "/newDev/ndev" + code; | |||
// options.url = envs[process.env.NODE_ENV].baseUrl + "/newProd/prod" + code; | |||
} else if (process.env.NODE_ENV === 'production') { | |||
// options.url = envs[process.env.NODE_ENV].baseUrl + "/newDev/ndev" + code; | |||
options.url = envs[process.env.NODE_ENV].baseUrl + "/newProd/prod" + code; | |||
} | |||
options.url = `${envs[process.env.NODE_ENV].baseUrl}${config.prefix}${code}` | |||
//默认json数据格式提交` | |||
let contentType = "application/json"; | |||
@@ -1,3 +1,4 @@ | |||
import config from '@/config/index.js' | |||
import { getItem, StorageKeys } from "./storage"; | |||
import { OrderStatus, OrderTypes } from "@/datas/enum.ts"; | |||
import { envs, ocrDo } from "@/utils/network/api.js"; | |||
@@ -591,13 +592,8 @@ function formatNumber(n : any) { | |||
export const uploadFile = (tempImagePath, imageType: number | string = 100) => { | |||
console.log("tempImagePath", tempImagePath, tempImagePath.size,imageType) | |||
return new Promise((resolve, reject) => { | |||
let url = '' | |||
if (process.env.NODE_ENV === 'development') { | |||
url = envs[process.env.NODE_ENV].baseUrl + "/newDev/ndev/minIo/upload"; | |||
} else if (process.env.NODE_ENV === 'production') { | |||
// url = envs[process.env.NODE_ENV].baseUrl + "/newDev/ndev/minIo/upload"; | |||
url = envs[process.env.NODE_ENV].baseUrl + "/newProd/prod/minIo/upload"; | |||
} | |||
let url = `${envs[process.env.NODE_ENV].baseUrl}${config.prefix}/minIo/upload` | |||
uni.uploadFile({ | |||
url: url, | |||
filePath: tempImagePath, |