phoneSettled.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <template>
  2. <view class="container">
  3. <view class="wrapper">
  4. <view style="padding-left:60upx;" class="margin-tb-lg">
  5. <view style="color:#333333;font-size:42upx;">商户登录体验更多功能</view>
  6. <view style="color:#999999" class="text-sm margin-top-xs">商户入驻信息修改,获取已入驻的信息</view>
  7. </view>
  8. <view class="input-content">
  9. <view class="cu-form-group margin-top" style="border-bottom: 1px solid #E6E6E6;">
  10. <input type="text" :value="phone" placeholder="请输入入驻提交的手机号码" maxlength="11" data-key="phone"
  11. @input="inputChange" />
  12. </view>
  13. <view class="cu-form-group margin-top" style="border-bottom: 1px solid #E6E6E6;">
  14. <input type="number" placeholder="请输入验证码" maxlength="6" v-model="codes" @input="inputChange"
  15. @confirm="toLogin" />
  16. <button class="send-msg" @click="sendMsg">{{sendTime}}</button>
  17. </view>
  18. </view>
  19. <button class="confirm-btn" @click="toLogin">立即查询</button>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. data() {
  26. return {
  27. phone: '',
  28. codes: '',
  29. banners: [],
  30. invitation: '',
  31. loginName: '',
  32. sending: false,
  33. sendTime: '获取验证码',
  34. count: 60,
  35. captcha: '',
  36. captchaPath: '',
  37. uuid: '',
  38. show: false
  39. }
  40. },
  41. onLoad() {
  42. // this.getCaptcha()
  43. },
  44. methods: {
  45. //申请商户入驻
  46. bindRuzhu() {
  47. uni.navigateTo({
  48. url: '/my/publish/index'
  49. })
  50. },
  51. bindRuzhus() {
  52. uni.navigateTo({
  53. url: '/pages/my/phoneSettled'
  54. })
  55. },
  56. // 获取验证码
  57. sendMsg() {
  58. const {
  59. phone
  60. } = this;
  61. if (!phone) {
  62. this.$queue.showToast("请输入手机号");
  63. } else if (phone.length !== 11) {
  64. this.$queue.showToast("请输入正确的手机号");
  65. } else {
  66. this.$queue.showLoading("正在发送验证码...");
  67. this.$Request.getT("/app/Login/sendMsg/" + phone + "/selectShop").then(res => {
  68. if (res.code === 0) {
  69. this.sending = true;
  70. this.$queue.showToast('验证码发送成功请注意查收');
  71. this.countDown();
  72. uni.hideLoading();
  73. } else {
  74. uni.hideLoading();
  75. uni.showModal({
  76. showCancel: false,
  77. title: '短信发送失败',
  78. content: res.msg ? res.msg : '请一分钟后再获取验证码'
  79. });
  80. }
  81. });
  82. }
  83. },
  84. countDown() {
  85. const {
  86. count
  87. } = this;
  88. if (count === 1) {
  89. this.count = 60;
  90. this.sending = false;
  91. this.sendTime = '获取验证码'
  92. } else {
  93. this.count = count - 1;
  94. this.sending = true;
  95. this.sendTime = count - 1 + '秒后重新获取';
  96. setTimeout(this.countDown.bind(this), 1000);
  97. }
  98. },
  99. forget() {
  100. uni.navigateTo({
  101. url: '/pages/public/forgetPwd'
  102. });
  103. },
  104. register() {
  105. uni.navigateTo({
  106. url: '/pages/public/register'
  107. });
  108. },
  109. inputChange(e) {
  110. const key = e.currentTarget.dataset.key;
  111. this[key] = e.detail.value;
  112. },
  113. navBack() {
  114. uni.navigateBack();
  115. },
  116. toLogin() {
  117. // 获取入驻信息
  118. const {
  119. phone,
  120. codes
  121. } = this;
  122. console.log(phone, codes)
  123. if (!phone) {
  124. this.$queue.showToast("请输入手机号");
  125. } else if (phone.length !== 11) {
  126. this.$queue.showToast("请输入正确的手机号");
  127. } else if (!codes) {
  128. this.$queue.showToast("请输入六位数验证码");
  129. } else {
  130. let data = {
  131. msg: codes,
  132. phone: phone
  133. }
  134. this.$Request.getA("/admin/goodsShop/selectGoodsShop", data).then(res => {
  135. if (res.code == 0 && res.data) {
  136. //0待审核 1通过 (你就可以直接弹框提示 您已审核通过,点击跳转登录)类似这种 2拒绝的话 就让他修改信息
  137. if (res.data.status == 1) {
  138. this.$queue.showToast('您已审核通过,可以直接登录!');
  139. } else {
  140. uni.setStorageSync("Settedlist", res.data)
  141. uni.navigateTo({
  142. url: '/my/publish/index'
  143. })
  144. }
  145. } else {
  146. this.$queue.showToast(res.msg);
  147. }
  148. });
  149. }
  150. }
  151. },
  152. }
  153. </script>
  154. <style lang='scss'>
  155. page {
  156. height: 100%;
  157. background: #FFFFFF !important;
  158. }
  159. .send-msg {
  160. border-radius: 30px;
  161. /* color: #FFFFFF; */
  162. background: #FCD202;
  163. height: 30px;
  164. font-size: 14px;
  165. line-height: 30px;
  166. }
  167. .container {
  168. top: 0;
  169. padding-top: 32upx;
  170. position: relative;
  171. width: 100%;
  172. height: 100%;
  173. overflow: hidden;
  174. /* background: #1E1F31 !important; */
  175. }
  176. .wrapper {
  177. position: relative;
  178. z-index: 90;
  179. /* background: #1E1F31; */
  180. padding-bottom: 32upx;
  181. }
  182. .input-content {
  183. /* margin-top: 300upx; */
  184. /* padding-top: 300upx; */
  185. padding: 40upx 60upx;
  186. }
  187. .confirm-btn {
  188. width: 600upx;
  189. line-height: 88upx;
  190. height: 88upx;
  191. border-radius: 10upx;
  192. margin-top: 32upx;
  193. background: #FCD202;
  194. /* color: #fff; */
  195. font-size: 32upx;
  196. &:after {
  197. border-radius: 10px;
  198. }
  199. }
  200. .ruzhu {
  201. width: 100%;
  202. text-align: center;
  203. color: #999999;
  204. margin-top: 20upx;
  205. }
  206. </style>