method: "POST", | method: "POST", | ||||
showLoading: true, | showLoading: true, | ||||
}; | }; | ||||
// #ifdef MP-WEIXIN | |||||
request(getGlobalParam, options).then((res) => { | request(getGlobalParam, options).then((res) => { | ||||
const result = stringToJson(res.bizContent); | const result = stringToJson(res.bizContent); | ||||
setItem('globalParam', result.data) | setItem('globalParam', result.data) | ||||
console.log("配置", result); | console.log("配置", result); | ||||
}); | }); | ||||
// #endif | |||||
}, | }, | ||||
"enablePullDownRefresh": false | "enablePullDownRefresh": false | ||||
} | } | ||||
}, { | |||||
"path": "pages/zaweb/zaweb", | |||||
"style": { | |||||
"navigationBarTitleText": "在线签约", | |||||
"enablePullDownRefresh": false | |||||
} | |||||
} | } | ||||
,{ | |||||
"path" : "pages/zaweb/zaweb", | |||||
"style" : | |||||
{ | |||||
"navigationBarTitleText": "在线签约", | |||||
"enablePullDownRefresh": false | |||||
} | |||||
} | |||||
], | |||||
], | |||||
"subPackages": [{ | "subPackages": [{ | ||||
"root": "subpackage/after-sale", //售后相关 | "root": "subpackage/after-sale", //售后相关 | ||||
"pages": [{ | "pages": [{ | ||||
"path": "empty", | |||||
"style": { | |||||
"navigationBarTitleText": "支付", | |||||
"enablePullDownRefresh": false | |||||
} | |||||
}, | |||||
{ | |||||
"path": "inventory-equipment", | "path": "inventory-equipment", | ||||
"style": { | "style": { | ||||
"navigationBarTitleText": "库存设备统计", | "navigationBarTitleText": "库存设备统计", |
// .catch((err) => { | // .catch((err) => { | ||||
// console.log(err); | // console.log(err); | ||||
// }); | // }); | ||||
uni.navigateTo({ | |||||
url: "/subpackage/orders/payment/payment?token=445dff5be89c4dcaa89386d1c390930a&openId=0e716af635634d749a981524cc6146a5&orderId=20231016175113823159477&qdOrderNo=20231016175113823159477" | |||||
}) | |||||
// uni.navigateTo({ | |||||
// url: "/subpackage/orders/payment/payment?token=445dff5be89c4dcaa89386d1c390930a&openId=0e716af635634d749a981524cc6146a5&orderId=20231016175113823159477&qdOrderNo=20231016175113823159477" | |||||
// }) | |||||
// uni.navigateTo({ | |||||
// url: "/subpackage/orders/sign/sign-up-ali?token=dcb93cca0dde44cdb444b6afab95b66e&openId=c3e66c33299e4faea553ba32a028418c&orderId=20231017142743224495637&qdOrderNo=20231017142747520101000029802083" | |||||
// }) | |||||
my.navigateToMiniProgram({ | |||||
appId: '2021004124602167', // 16 位 | |||||
path: `/subpackage/orders/payment/payment?qdOrderNo=1&type=3&orderId=1&isPay=1`, | |||||
query: { | |||||
a: 'foo', | |||||
b: 'bar', | |||||
}, | |||||
envVersion: "develop", | |||||
extraData: { | |||||
x: { | |||||
y: 'z', | |||||
}, | |||||
}, | |||||
success: function (res) { | |||||
console.log(res); | |||||
}, | |||||
fail: function (err) { | |||||
console.log(err); | |||||
} | |||||
}); | |||||
}; | }; | ||||
//轮播跳转 | //轮播跳转 |
<template> | |||||
</template> | |||||
<script setup lang="ts"> | |||||
import { onLoad } from "@dcloudio/uni-app"; | |||||
import { reactive } from "vue"; | |||||
const state = reactive({ | |||||
qdOrderNo: "", //渠道订单编号 | |||||
orderId: "", | |||||
isPay: "", | |||||
openId: "", | |||||
id: "", | |||||
clientFee: "", | |||||
code: "", | |||||
token: "" | |||||
}); | |||||
onLoad((option : any) => { | |||||
state.orderId = option.orderId; | |||||
state.qdOrderNo = option.qdOrderNo; | |||||
state.isPay = option.isPay; | |||||
state.token = option.token; | |||||
state.openId = option.openId; | |||||
console.log("option11111", option) | |||||
if (state.isPay == "1") { | |||||
// 为1时跳转到2小程序支付 | |||||
my.navigateToMiniProgram({ | |||||
appId: '2021004124602167', // 16 位 | |||||
path: `/subpackage/orders/payment/payment?qdOrderNo=${state.qdOrderNo}&openId=${state.openId}&token=${state.token}&type=3&orderId=${state.orderId}&isPay=${state.isPay}`, | |||||
query: { | |||||
a: 'foo', | |||||
b: 'bar', | |||||
}, | |||||
envVersion: "develop", | |||||
extraData: { | |||||
x: { | |||||
y: 'z', | |||||
}, | |||||
}, | |||||
success: function (res) { | |||||
console.log(res); | |||||
}, | |||||
fail: function (err) { | |||||
console.log(err); | |||||
} | |||||
}); | |||||
} else { | |||||
const param = `https://qtzl.etcjz.cn/order/#/pages/payment/payment?qdOrderNo=${state.qdOrderNo}&type=3` | |||||
const params = encodeURIComponent(JSON.stringify(param)) | |||||
console.log('支付结果查询params', params) | |||||
uni.navigateTo({ | |||||
url: `/subpackage/personal-center/webview?url=` + params | |||||
}) | |||||
} | |||||
}); | |||||
</script> | |||||
<style> | |||||
</style> |
clientFee: "", | clientFee: "", | ||||
code: "", | code: "", | ||||
qdOrderNo: "", //渠道订单编号 | qdOrderNo: "", //渠道订单编号 | ||||
isPay: "", | |||||
}); | }); | ||||
onLoad((option : any) => { | onLoad((option : any) => { | ||||
console.log("option11111", option) | console.log("option11111", option) | ||||
setItem('accessToken', option.token); | setItem('accessToken', option.token); | ||||
setItem(StorageKeys.Token, option.token); | setItem(StorageKeys.Token, option.token); | ||||
setItem('openId', option.openId); | setItem('openId', option.openId); | ||||
state.isPay = option.isPay; | |||||
}); | }); | ||||
const savaHandle = () => { | const savaHandle = () => { | ||||
request(checkOrderStatus, optionsaliquery).then((res) => { | request(checkOrderStatus, optionsaliquery).then((res) => { | ||||
console.log('支付结果查询:', res) | console.log('支付结果查询:', res) | ||||
// 支付完成跳转到h5 | // 支付完成跳转到h5 | ||||
const param = `https://qtzl.etcjz.cn/order/#/pages/payment/payment?qdOrderNo=${state.qdOrderNo}&type=3` | |||||
const params = encodeURIComponent(JSON.stringify(param)) | |||||
console.log('支付结果查询params', params) | |||||
uni.navigateTo({ | |||||
url: `/subpackage/personal-center/webview?url=` + params | |||||
}) | |||||
// const param = `https://qtzl.etcjz.cn/order/#/pages/payment/payment?qdOrderNo=${state.qdOrderNo}&type=3` | |||||
// const params = encodeURIComponent(JSON.stringify(param)) | |||||
// console.log('支付结果查询params', params) | |||||
// uni.navigateTo({ | |||||
// url: `/subpackage/personal-center/webview?url=` + params | |||||
// }) | |||||
if (state.isPay == "1") { | |||||
my.navigateToMiniProgram({ | |||||
appId: '2021004102619032', // 16 位 | |||||
path: `/subpackage/after-sale/empty?qdOrderNo=${state.qdOrderNo}&type=3&orderId=${state.orderId}isPay=2`, | |||||
query: { | |||||
a: 'foo', | |||||
b: 'bar', | |||||
}, | |||||
extraData: { | |||||
x: { | |||||
y: 'z', | |||||
}, | |||||
}, | |||||
success: function (res) { | |||||
console.log(res); | |||||
}, | |||||
fail: function (err) { | |||||
console.log(err); | |||||
} | |||||
}); | |||||
} | |||||
// my.navigateBackMiniProgram({ | |||||
// extraData: { | |||||
// 'qdOrderNo': state.qdOrderNo, | |||||
// 'type': 3 | |||||
// }, | |||||
// success: (res) => { | |||||
// console.log(res) | |||||
// }, | |||||
// fail: (err) => { | |||||
// console.log(err) | |||||
// } | |||||
// }); | |||||
}) | }) | ||||
}, | }, | ||||
fail: res => { | fail: res => { |