</view> | </view> | ||||
<view class="btn"> | <view class="btn"> | ||||
<submit-button title="同意协议并获取验证码" @submit="nextStep"></submit-button> | |||||
<submit-button title="同意协议并获取验证码" @submit="mobileIsRepeat"></submit-button> | |||||
</view> | </view> | ||||
</template> | </template> | ||||
// import uCheckBox from "@/uni_modules/vk-uview-ui/components/u-checkbox/u-checkbox.vue"; | // import uCheckBox from "@/uni_modules/vk-uview-ui/components/u-checkbox/u-checkbox.vue"; | ||||
import { reactive } from "vue"; | import { reactive } from "vue"; | ||||
import { checkStr, msg, navTo } from "@/utils/utils"; | 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 { request } from "@/utils/network/request.js"; | ||||
import { stringToJson } from "@/utils/network/encryption"; | |||||
const state = reactive({ | const state = reactive({ | ||||
phone: "", //电话 | phone: "", //电话 | ||||
checked: false, //是否勾选阅读协议 | checked: false, //是否勾选阅读协议 | ||||
console.log(e); | console.log(e); | ||||
state.checked = !state.checked; | state.checked = !state.checked; | ||||
}; | }; | ||||
// 去协议页面 | // 去协议页面 | ||||
const toRead=()=>{ | |||||
const toRead = () => { | |||||
navTo("/login/agreement") | navTo("/login/agreement") | ||||
} | } | ||||
/* 下一步 */ | /* 下一步 */ | ||||
const nextStep = () => { | const nextStep = () => { | ||||
if (!state.phone) { | if (!state.phone) { | ||||
console.log(err); | 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> | </script> | ||||
<style lang="scss" scoped> | <style lang="scss" scoped> |
/* 接口中常量 */ | /* 接口中常量 */ | ||||
// export const URL = "192.168.100.63"; | // 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 = { | export const envs = { | ||||
//开发环境配置 | //开发环境配置 | ||||
development: { | 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", | // baseUrl: "http://192.168.100.158:8085", | ||||
}, | }, | ||||
//生产环境配置 | //生产环境配置 | ||||
production: { | production: { | ||||
// baseUrl: "http://192.168.124.6:8087", | // baseUrl: "http://192.168.124.6:8087", | ||||
// baseUrl: "http://222.85.144.89:19002", | // 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", | // baseUrl: "http://192.168.100.158:8085", | ||||
}, | }, | ||||
} | } | ||||
export const businessApi = "b275644e586b447791eede4ad6a41640" //业务完成日志 | export const businessApi = "b275644e586b447791eede4ad6a41640" //业务完成日志 | ||||
export const inventoryEquipmentApi = "5570160d4b8d46408664b6c289de6b57" //库存设备统计 | export const inventoryEquipmentApi = "5570160d4b8d46408664b6c289de6b57" //库存设备统计 | ||||
export const getOpenidApi = "53c0698b512a44539ea05cc88157e68b" //获取微信小程序openid | export const getOpenidApi = "53c0698b512a44539ea05cc88157e68b" //获取微信小程序openid | ||||
export const getAgreementApi = "32a9d99a781a4bf2af29a46d903702bd" //根据订单编号获取渠道产品的补充协议 | |||||
export const getAgreementApi = "32a9d99a781a4bf2af29a46d903702bd" //根据订单编号获取渠道产品的补充协议 | |||||
export const mobileIsRepeatApi = "19d58812148d41bbb7d435ab93928787" //个人账号重复注册校验 |