diff --git a/pages/register/register.vue b/pages/register/register.vue index dfaede6..ff70b2a 100644 --- a/pages/register/register.vue +++ b/pages/register/register.vue @@ -69,25 +69,7 @@ @select="sexSelect" > - + { - wx.switchTab({ - url: `/pages/index/index`, - }); - }, 1000); - // await getLogin(); - // await verifyPhone(this.form.phone); - - // } else { - // this.errorShow = true; - // } + // this.successShow = true; + uni.showToast({ + title: '注册成功', + duration: 2000 + }); + uni.setStorageSync('registerPhone', this.form.phone); + setTimeout(() => { + wx.switchTab({ + url: `/pages/index/index`, + }); + }, 2000); }, //允许获取 permit() { // this.sqShow = false; this.jujueShow = false; }, - //拒绝获取 - // reject() { - // // this.sqShow = false; - // this.jujueShow = true; - // }, //任然要拒绝 rejectAll() { this.jujueShow = false; @@ -268,20 +242,6 @@ this.jujueShow = true; } }, - //获取用户手机号 - // getUserInfo() { - // this.sqShow = true; - // uni.getUserInfo({ - // provider: "weixin", - // success: (res) => { - // console.log("getUserInfo", res); - // }, - // }); - // }, - //关闭授权获取手机号弹窗 - // close() { - // this.sqShow = false; - // }, //选中员工类型 sexSelect(e) { setTimeout(() => { @@ -337,78 +297,6 @@ // white-space: nowrap; width: 390rpx; } - // .popup { - // width: 700rpx; - // height: 450rpx; - - // .popup-title { - // text-align: center; - // font-size: 36rpx; - // margin: 35rpx; - // } - - // .popup-content { - // width: 70%; - // margin-left: 135rpx; - // line-height: 54rpx; - // } - - // .popup-error-title { - // margin-left: 36rpx; - // margin-right: 36rpx; - // margin-top: 80rpx; - // font-size: 38rpx; - // } - - // .popup-login { - // margin-left: 240rpx; - // margin-top: 120rpx; - // width: 180rpx; - // height: 52rpx; - // background-color: skyblue; - // border-radius: 8rpx; - // line-height: 52rpx; - // border: #000 1px solid; - // text-align: center; - // color: #fff; - // } - - // .popup-buttom { - // padding: 70rpx; - // margin-top: 72rpx; - // display: flex; - // justify-content: space-between; - // } - - // .popup-jujue-fanhui { - // border: none; - // border-radius: 8rpx; - // background-color: gray; - // color: #fff; - // } - - // .popup-jujue-queren { - // border: none; - // border-radius: 8rpx; - // background-color: skyblue; - // color: #fff; - // } - - // .popup-buttom view { - // width: 180rpx; - // height: 56rpx; - // text-align: center; - // line-height: 56rpx; - // border-radius: 6rpx; - // border: 1px #000 solid; - // } - - // .popup-all-title { - // text-align: center; - // font-size: 42rpx; - // margin-top: 142rpx; - // } - // } .popup { .title { font-size: 36rpx; diff --git a/pages/register/register.vue b/pages/register/register.vue index dfaede6..ff70b2a 100644 --- a/pages/register/register.vue +++ b/pages/register/register.vue @@ -69,25 +69,7 @@ @select="sexSelect" > - + { - wx.switchTab({ - url: `/pages/index/index`, - }); - }, 1000); - // await getLogin(); - // await verifyPhone(this.form.phone); - - // } else { - // this.errorShow = true; - // } + // this.successShow = true; + uni.showToast({ + title: '注册成功', + duration: 2000 + }); + uni.setStorageSync('registerPhone', this.form.phone); + setTimeout(() => { + wx.switchTab({ + url: `/pages/index/index`, + }); + }, 2000); }, //允许获取 permit() { // this.sqShow = false; this.jujueShow = false; }, - //拒绝获取 - // reject() { - // // this.sqShow = false; - // this.jujueShow = true; - // }, //任然要拒绝 rejectAll() { this.jujueShow = false; @@ -268,20 +242,6 @@ this.jujueShow = true; } }, - //获取用户手机号 - // getUserInfo() { - // this.sqShow = true; - // uni.getUserInfo({ - // provider: "weixin", - // success: (res) => { - // console.log("getUserInfo", res); - // }, - // }); - // }, - //关闭授权获取手机号弹窗 - // close() { - // this.sqShow = false; - // }, //选中员工类型 sexSelect(e) { setTimeout(() => { @@ -337,78 +297,6 @@ // white-space: nowrap; width: 390rpx; } - // .popup { - // width: 700rpx; - // height: 450rpx; - - // .popup-title { - // text-align: center; - // font-size: 36rpx; - // margin: 35rpx; - // } - - // .popup-content { - // width: 70%; - // margin-left: 135rpx; - // line-height: 54rpx; - // } - - // .popup-error-title { - // margin-left: 36rpx; - // margin-right: 36rpx; - // margin-top: 80rpx; - // font-size: 38rpx; - // } - - // .popup-login { - // margin-left: 240rpx; - // margin-top: 120rpx; - // width: 180rpx; - // height: 52rpx; - // background-color: skyblue; - // border-radius: 8rpx; - // line-height: 52rpx; - // border: #000 1px solid; - // text-align: center; - // color: #fff; - // } - - // .popup-buttom { - // padding: 70rpx; - // margin-top: 72rpx; - // display: flex; - // justify-content: space-between; - // } - - // .popup-jujue-fanhui { - // border: none; - // border-radius: 8rpx; - // background-color: gray; - // color: #fff; - // } - - // .popup-jujue-queren { - // border: none; - // border-radius: 8rpx; - // background-color: skyblue; - // color: #fff; - // } - - // .popup-buttom view { - // width: 180rpx; - // height: 56rpx; - // text-align: center; - // line-height: 56rpx; - // border-radius: 6rpx; - // border: 1px #000 solid; - // } - - // .popup-all-title { - // text-align: center; - // font-size: 42rpx; - // margin-top: 142rpx; - // } - // } .popup { .title { font-size: 36rpx; diff --git a/utils/common.js b/utils/common.js index 6b05fdd..1515529 100644 --- a/utils/common.js +++ b/utils/common.js @@ -16,7 +16,11 @@ }, }) } else { - console.log('订阅消息未开启') + uni.showToast({ + title: '请到小程序设置-订阅消息-接收通知中开启订阅消息', + icon: 'none', + duration: 8000 + }); } }, fail: function(error) {