@@ -1340,6 +1340,13 @@ | |||
{ | |||
"root": "subpackage/personal-center", //个人中心 | |||
"pages": [{ | |||
"path": "get-code", | |||
"style": { | |||
"navigationBarTitleText": "验证", | |||
"enablePullDownRefresh": false | |||
} | |||
}, | |||
{ | |||
"path": "webview", | |||
"style": { | |||
"navigationBarTitleText": "", |
@@ -327,15 +327,7 @@ | |||
onLoad((option : any) => { | |||
console.log("传递过来的", option) | |||
if (option.q) { | |||
const q = decodeURIComponent(option.q); // 获取到二维码原始链接内容 | |||
console.log(q); | |||
var json = getRequest(q); | |||
console.log("json", json); | |||
state.orderId = json.orderId; | |||
} else { | |||
state.orderId = option.orderId; | |||
} | |||
state.orderId = option.orderId; | |||
state.isValueCard = option.isValueCard; | |||
let source = "" | |||
@@ -109,7 +109,8 @@ | |||
getOpenidApi, | |||
getAgreementApi, | |||
PAYDETECTION, | |||
envs | |||
envs, | |||
agreementConfirmApi | |||
} from "@/utils/network/api.js"; | |||
import { | |||
request | |||
@@ -162,13 +163,21 @@ | |||
// }); | |||
// msg("确定绑定权益产品"); | |||
// wxPayment(); | |||
if (state.checked) { | |||
uni.navigateTo({ | |||
url: `/subpackage/orders/order_payment?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}&&isValueCard=${state.isValueCard}`, | |||
}); | |||
if (state.typeScanCode == 2) { | |||
console.log("state.typeScanCode", state.typeScanCode) | |||
// 扫码进来 | |||
agreementConfirm(); | |||
} else { | |||
msg("请勾选协议"); | |||
console.log("state.checked", state.checked) | |||
if (state.checked) { | |||
uni.navigateTo({ | |||
url: `/subpackage/orders/order_payment?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}&&isValueCard=${state.isValueCard}`, | |||
}); | |||
} else { | |||
msg("请勾选协议"); | |||
} | |||
} | |||
}; | |||
const downAuthD = () => { | |||
// tools.showLoadingAlert("加载中"); | |||
@@ -290,14 +299,32 @@ | |||
}) | |||
}); | |||
}; | |||
// 协议确认接口 | |||
const agreementConfirm = () => { | |||
const options = { | |||
type: 2, | |||
data: { | |||
orderId: state.orderId, | |||
protocol: state.checked ? 1 : 0, | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
console.log("协议确认接口", options) | |||
request(agreementConfirmApi, options).then((res) => { | |||
console.log("确认协议", res) | |||
msg("协议确认成功"); | |||
return; | |||
}); | |||
}; | |||
onLoad((option : any) => { | |||
state.orderId = option.orderId; | |||
state.isValueCard = option.isValueCard; | |||
console.log("传递过来的参数", option) | |||
// state.clientFee = option.clientFee / 100; | |||
state.id = option.id; | |||
getOpenID(); | |||
queryAgreement(); | |||
// const data = JSON.parse(decodeURIComponent(option.data)); | |||
// for (var i = 0; i < data.length; i++) { | |||
// data['isOpened'] = 'node'; | |||
@@ -307,6 +334,13 @@ | |||
// state.list = data; | |||
// queryDetailsData(); | |||
refresh(); | |||
if (option.url) { | |||
state.agreeURL = envs[process.env.NODE_ENV].baseUrl + option.url | |||
state.typeScanCode = option.typeScanCode | |||
console.log("state.agreeURL", state.agreeURL) | |||
} else { | |||
queryAgreement(); | |||
} | |||
}); | |||
const state = reactive({ | |||
@@ -335,6 +369,7 @@ | |||
dataArray: [], | |||
checked: false, | |||
agreeURL: "", | |||
typeScanCode: 0,//扫码进来得 | |||
}); | |||
const bindClick = (i) => { | |||
console.log(i); | |||
@@ -411,8 +446,8 @@ | |||
const options = { | |||
type: 2, | |||
data: { | |||
orderId: state.orderId, //订单编号 | |||
// orderId: "20231016180507480853307", //订单编号 | |||
// orderId: state.orderId, //订单编号 | |||
orderId: "20231016180507480853307", //订单编号 | |||
}, | |||
method: "POST", | |||
showLoading: true, |
@@ -0,0 +1,188 @@ | |||
<!-- 密码登录 --> | |||
<template> | |||
<view class="login-main as-gravity-center as-layout-vertical"> | |||
<view class="form"> | |||
<view class="form-input"> | |||
<view> +86</view> | |||
<image :src="`${$imgUrl}common/arror_down_black.png`" class="arror" mode="aspectFill" /> | |||
<input class="input" v-model="state.mobile" focus placeholder="请输入手机号" | |||
placeholder-class="form-placeholder" type="number" maxlength="11" disabled /> | |||
</view> | |||
<view class="form-input" v-if="state.loginType === 'code'"> | |||
<input class="input" v-model="state.code" placeholder="请输入验证码" placeholder-class="form-placeholder" | |||
maxlength="6" type="number" /> | |||
<verification-code :bg="false" :mobile="state.mobile"></verification-code> | |||
</view> | |||
</view> | |||
<view class="btn"> | |||
<submit-button title="下一步" @submit="toNext"></submit-button> | |||
</view> | |||
</view> | |||
</template> | |||
<script setup lang="ts"> | |||
import { reactive } from "vue"; | |||
import { checkStr, msg, navTo } from "@/utils/utils"; | |||
import { onLoad, onUnload } from "@dcloudio/uni-app"; | |||
import { checkCode } from "@/utils/network/api.js"; | |||
import { request } from "@/utils/network/request.js"; | |||
import { stringToJson } from "@/utils/network/encryption"; | |||
import { useUserStore } from "@/stores/user"; | |||
import { getItem } from "@/utils/storage"; | |||
const userStore = useUserStore(); | |||
const { fetchToken } = userStore; | |||
const state = reactive({ | |||
loginType: "code", //pwd-密码登录 code-验证码登录 | |||
mobile: "", //用户名 | |||
password: "", //密码 | |||
code: "", //验证码 | |||
json: {} | |||
}); | |||
onLoad((option) => { | |||
// https://qtzl.etcjz.cn/default-bucket/20231204/scanPay.html?orderId=20231016180507480853307&phone=18786896573&type=1 | |||
if (option.q) { | |||
const q = decodeURIComponent(option.q); // 获取到二维码原始链接内容 | |||
console.log(q); | |||
// var json = getRequest(q); | |||
state.json = getRequest(q) | |||
console.log("state.json", state.json, getItem("mobile")) | |||
if (getItem("mobile") == state.json.phone) { | |||
state.mobile = state.json.phone | |||
} else { | |||
msg("号码错误"); | |||
return; | |||
} | |||
console.log("state.json", state.json); | |||
} | |||
}); | |||
onUnload(() => { | |||
}); | |||
const toNext = () => { | |||
if (!state.mobile) { | |||
msg("请输入手机号!"); | |||
return; | |||
} | |||
if (state.loginType === "code" && !state.code) { | |||
msg("请输入验证码!"); | |||
return; | |||
} | |||
if (!checkStr(state.mobile, "mobile")) { | |||
msg("请输入正确的手机号!"); | |||
return; | |||
} | |||
const options = { | |||
type: 2, | |||
data: { | |||
mobile: state.mobile, | |||
code: state.code | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(checkCode, options).then((res) => { | |||
console.log("过来了", res) | |||
if (state.json.type == 1) { | |||
uni.navigateTo({ | |||
url: `/subpackage/orders/order_payment?orderId=${state.json.orderId}`, | |||
}); | |||
} else if (state.json.type == 2) { | |||
uni.navigateTo({ | |||
url: `/subpackage/orders/product-detail?orderId=${state.json.orderId}&url=${state.json.url}&typeScanCode=${state.json.type}`, | |||
}); | |||
} | |||
}) | |||
.catch((err) => { | |||
// msg("验证码错误"); | |||
}); | |||
}; | |||
//解析URL获取参数 | |||
const getRequest = (urlStr) => { | |||
if (typeof urlStr == "undefined") { | |||
// 获取url中"?"符后的字符串 | |||
var url = decodeURI(location.search); | |||
} else { | |||
var url = "?" + urlStr.split("?")[1]; | |||
} | |||
var theRequest = new Object(); | |||
if (url.indexOf("?") != -1) { | |||
var str = url.substr(1); | |||
var strs = str.split("&"); | |||
for (var i = 0; i < strs.length; i++) { | |||
theRequest[strs[i].split("=")[0]] = decodeURI(strs[i].split("=")[1]); | |||
} | |||
} | |||
return theRequest; | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.login-main { | |||
border-top: 1rpx solid #dcdcdc; | |||
padding: 22rpx 30rpx 140rpx; | |||
.title { | |||
font-size: 46rpx; | |||
color: #333333; | |||
margin-top: 30rpx; | |||
font-weight: 600; | |||
} | |||
.form { | |||
width: 100%; | |||
margin-top: 100rpx; | |||
.form-input { | |||
display: flex; | |||
flex-direction: row; | |||
align-items: center; | |||
height: 90rpx; | |||
border-bottom: 1rpx solid #dcdcdc; | |||
padding: 0rpx 12rpx; | |||
color: #333333; | |||
&:last-child { | |||
margin-top: 50rpx; | |||
} | |||
.input { | |||
flex: 1; | |||
padding-right: 48rpx; | |||
font-size: 28rpx; | |||
font-family: Microsoft YaHei; | |||
background-color: transparent; | |||
} | |||
.arror { | |||
width: 28rpx; | |||
height: 25rpx; | |||
margin-left: 16rpx; | |||
margin-right: 40rpx; | |||
} | |||
.eye { | |||
width: 48rpx; | |||
height: 48rpx; | |||
} | |||
} | |||
.form-placeholder { | |||
color: #999999; | |||
} | |||
} | |||
.btn { | |||
width: 100%; | |||
margin: 120rpx 40rpx 50rpx; | |||
} | |||
} | |||
</style> |
@@ -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", | |||
}, | |||
} | |||
@@ -247,4 +247,5 @@ export const inventoryEquipmentApi = "5570160d4b8d46408664b6c289de6b57" //库存 | |||
export const getOpenidApi = "53c0698b512a44539ea05cc88157e68b" //获取微信小程序openid | |||
export const getAgreementApi = "32a9d99a781a4bf2af29a46d903702bd" //根据订单编号获取渠道产品的补充协议 | |||
export const mobileIsRepeatApi = "19d58812148d41bbb7d435ab93928787" //个人账号重复注册校验 | |||
export const transferRecordApi = "323bc6e1f3304c83921155fc220e9e37" //过户记录查询 | |||
export const transferRecordApi = "323bc6e1f3304c83921155fc220e9e37" //过户记录查询 | |||
export const agreementConfirmApi = "96fa039a85f54655af06d980c8ddc057" //协议确认接口 |