新增首页园区和商户的交互
This commit is contained in:
@@ -19,16 +19,8 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
console.log('options', options)
|
||||
const querys = decodeURIComponent(options.scene)
|
||||
console.log('querys', querys)
|
||||
// const search = new URLSearchParams(querys)
|
||||
// const { id } = querys;
|
||||
const id = querys.slice(querys.indexOf("=") + 1)
|
||||
// const id = seach.get('id')
|
||||
console.log('更换')
|
||||
console.log('id', id)
|
||||
// this.setData({ id, name })
|
||||
this.getInfo(id);
|
||||
},
|
||||
async getInfo(id) {
|
||||
@@ -52,11 +44,8 @@ Page({
|
||||
},
|
||||
async handleLogin(phoneCode) {
|
||||
const { id, nickName } = this.data;
|
||||
console.log('准备开始')
|
||||
loadingFunc(async () => {
|
||||
console.log('开始')
|
||||
const wxLoginCode = await wxLogin()
|
||||
console.log('wxLoginCode', wxLoginCode)
|
||||
const result = await userApply({ code: wxLoginCode, phoneCode, id, name: nickName })
|
||||
const { code, message, data } = result;
|
||||
if (code !== OK) {
|
||||
@@ -78,7 +67,6 @@ Page({
|
||||
},
|
||||
getPhoneNumber(e) {
|
||||
const { nickName } = this.data;
|
||||
console.log('nickName', e, nickName)
|
||||
if (!nickName) {
|
||||
alertInfo("请填写你的名字")
|
||||
return;
|
||||
@@ -93,7 +81,6 @@ Page({
|
||||
alertInfo("服务达到上限")
|
||||
return;
|
||||
default:
|
||||
console.log("进入登录流程")
|
||||
this.handleLogin(phoneCode)
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user