@@ -186,11 +186,14 @@ | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(getGlobalParam, options).then((res) => { | |||
const result = stringToJson(res.bizContent); | |||
setItem('globalParam', result.data) | |||
console.log("配置", result); | |||
}); | |||
// #ifdef MP-WEIXIN | |||
// #endif | |||
}, | |||
@@ -23,7 +23,7 @@ | |||
</view> | |||
<view class="btn"> | |||
<submit-button title="同意协议并获取验证码" @submit="nextStep"></submit-button> | |||
<submit-button title="同意协议并获取验证码" @submit="mobileIsRepeat"></submit-button> | |||
</view> | |||
</template> | |||
@@ -31,9 +31,9 @@ | |||
// import uCheckBox from "@/uni_modules/vk-uview-ui/components/u-checkbox/u-checkbox.vue"; | |||
import { reactive } from "vue"; | |||
import { checkStr, msg, navTo } from "@/utils/utils"; | |||
import { sendCode, regist } from "@/utils/network/api.js"; | |||
import { sendCode, regist, mobileIsRepeatApi } from "@/utils/network/api.js"; | |||
import { request } from "@/utils/network/request.js"; | |||
import { stringToJson } from "@/utils/network/encryption"; | |||
const state = reactive({ | |||
phone: "", //电话 | |||
checked: false, //是否勾选阅读协议 | |||
@@ -42,12 +42,12 @@ | |||
console.log(e); | |||
state.checked = !state.checked; | |||
}; | |||
// 去协议页面 | |||
const toRead=()=>{ | |||
const toRead = () => { | |||
navTo("/login/agreement") | |||
} | |||
/* 下一步 */ | |||
const nextStep = () => { | |||
if (!state.phone) { | |||
@@ -83,6 +83,40 @@ | |||
console.log(err); | |||
}); | |||
}; | |||
const mobileIsRepeat = () => { | |||
if (!state.phone) { | |||
msg("请输入手机号!"); | |||
return; | |||
} | |||
if (!checkStr(state.phone, "mobile")) { | |||
msg("请输入正确的手机号!"); | |||
return; | |||
} | |||
if (!state.checked) { | |||
msg("请勾选我已阅读并同意《平台用户服务隐私协议》"); | |||
return; | |||
} | |||
const options = { | |||
type: 2, | |||
data: { mobile: state.phone }, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(mobileIsRepeatApi, options) | |||
.then((res) => { | |||
const result = stringToJson(res.bizContent); | |||
console.log("个人账号重复注册校验", result.canRegister) | |||
if (result.canRegister) { | |||
nextStep(); | |||
} else { | |||
msg("该手机号已注册!"); | |||
} | |||
}) | |||
.catch((err) => { | |||
console.log(err); | |||
}); | |||
}; | |||
</script> | |||
<style lang="scss" scoped> |
@@ -13,6 +13,12 @@ | |||
"defaultTitle": "" // 将导航栏默认的 title 置空 | |||
} | |||
} | |||
}, { | |||
"path": "pages/hint/hint", | |||
"style": { | |||
"navigationBarTitleText": "", | |||
"enablePullDownRefresh": false | |||
} | |||
}, | |||
{ | |||
"path": "pages/order/order", | |||
@@ -34,7 +40,6 @@ | |||
} | |||
} | |||
}, | |||
{ | |||
"path": "pages/service/service", | |||
"style": { | |||
@@ -88,20 +93,26 @@ | |||
"enablePullDownRefresh": false | |||
} | |||
}, { | |||
"path": "pages/zaweb/zaweb", | |||
"style": { | |||
"navigationBarTitleText": "在线签约", | |||
"enablePullDownRefresh": false | |||
} | |||
} | |||
,{ | |||
"path" : "pages/zaweb/zaweb", | |||
"style" : | |||
{ | |||
"navigationBarTitleText": "在线签约", | |||
"enablePullDownRefresh": false | |||
} | |||
} | |||
], | |||
], | |||
"subPackages": [{ | |||
"root": "subpackage/after-sale", //售后相关 | |||
"pages": [{ | |||
"path": "empty", | |||
"style": { | |||
"navigationBarTitleText": "支付", | |||
"enablePullDownRefresh": false | |||
} | |||
}, | |||
{ | |||
"path": "inventory-equipment", | |||
"style": { | |||
"navigationBarTitleText": "库存设备统计", |
@@ -0,0 +1,11 @@ | |||
<template> | |||
<div> | |||
模拟渠道方小程序 | |||
</div> | |||
</template> | |||
<script setup lang='ts'> | |||
</script> | |||
<style lang='scss' scoped> | |||
</style> |
@@ -380,7 +380,7 @@ | |||
}); | |||
}; | |||
//轮播跳转 | |||
const test = () => { | |||
// let options = { | |||
@@ -396,17 +396,17 @@ | |||
// method: "POST", //提交方式(默认POST) | |||
// showLoading: true, //是否显示加载中(默认显示) | |||
// }; | |||
// //调用方式 | |||
// request("25", options).then((res) => { | |||
// console.log(res); | |||
// }) | |||
// .catch((err) => { | |||
// console.log(err); | |||
// }); | |||
uni.navigateTo({ | |||
url: "/subpackage/orders/payment/payment?token=445dff5be89c4dcaa89386d1c390930a&openId=0e716af635634d749a981524cc6146a5&orderId=20230922185454016794294" | |||
url: "/subpackage/orders/payment/payment?token=445dff5be89c4dcaa89386d1c390930a&openId=0e716af635634d749a981524cc6146a5&orderId=20231016175113823159477&qdOrderNo=20231016175113823159477" | |||
}) | |||
}; | |||
@@ -13,6 +13,7 @@ | |||
url.value = 'https://qtzl.etcjz.cn/wxOrder/' | |||
// #endif | |||
// #ifdef MP-ALIPAY | |||
// url.value = 'https://qtzl.etcjz.cn/wxOrder/#/pages/backPage/backPage?type=3' | |||
url.value = 'https://qtzl.etcjz.cn/aliOrder/' | |||
// #endif | |||
</script> |
@@ -0,0 +1,59 @@ | |||
<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("option1111111111", 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> |
@@ -49,6 +49,7 @@ | |||
clientFee: "", | |||
code: "", | |||
qdOrderNo: "", //渠道订单编号 | |||
isPay: "", | |||
}); | |||
onLoad((option : any) => { | |||
console.log("option11111", option) | |||
@@ -57,6 +58,7 @@ | |||
setItem('accessToken', option.token); | |||
setItem(StorageKeys.Token, option.token); | |||
setItem('openId', option.openId); | |||
state.isPay = option.isPay; | |||
}); | |||
const savaHandle = () => { | |||
@@ -107,13 +109,27 @@ | |||
}; | |||
request(checkOrderStatus, optionsaliquery).then((res) => { | |||
console.log('支付结果查询:', res) | |||
// 支付完成跳转到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 | |||
}) | |||
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); | |||
} | |||
}); | |||
} | |||
}) | |||
}, | |||
fail: res => { |
@@ -1,23 +1,23 @@ | |||
/* 接口中常量 */ | |||
// export const URL = "192.168.100.63"; | |||
// export const URL = "trial.etcjz.cn"; | |||
export const URL = "qtzl.etcjz.cn"; | |||
export const URL = "trial.etcjz.cn"; | |||
// export const URL = "qtzl.etcjz.cn"; | |||
/** | |||
* 配置信息,针对不同的平台进行配置 | |||
*/ | |||
export const envs = { | |||
//开发环境配置 | |||
development: { | |||
baseUrl: "https://qtzl.etcjz.cn", | |||
// baseUrl: "https://trial.etcjz.cn", | |||
// baseUrl: "https://qtzl.etcjz.cn", | |||
baseUrl: "https://trial.etcjz.cn", | |||
// baseUrl: "http://192.168.100.158:8085", | |||
}, | |||
//生产环境配置 | |||
production: { | |||
// baseUrl: "http://192.168.124.6:8087", | |||
// baseUrl: "http://222.85.144.89:19002", | |||
baseUrl: "https://qtzl.etcjz.cn", | |||
// baseUrl: "https://trial.etcjz.cn", | |||
// baseUrl: "https://qtzl.etcjz.cn", | |||
baseUrl: "https://trial.etcjz.cn", | |||
// baseUrl: "http://192.168.100.158:8085", | |||
}, | |||
} | |||
@@ -245,4 +245,5 @@ export const PAYMENTORDERAPPLY = "377421d6ed4f48a29575aa126838a4d2" //CSMSN-订 | |||
export const businessApi = "b275644e586b447791eede4ad6a41640" //业务完成日志 | |||
export const inventoryEquipmentApi = "5570160d4b8d46408664b6c289de6b57" //库存设备统计 | |||
export const getOpenidApi = "53c0698b512a44539ea05cc88157e68b" //获取微信小程序openid | |||
export const getAgreementApi = "32a9d99a781a4bf2af29a46d903702bd" //根据订单编号获取渠道产品的补充协议 | |||
export const getAgreementApi = "32a9d99a781a4bf2af29a46d903702bd" //根据订单编号获取渠道产品的补充协议 | |||
export const mobileIsRepeatApi = "19d58812148d41bbb7d435ab93928787" //个人账号重复注册校验 |