link-register.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <template>
  2. <div class="page">
  3. <div class="page-content link-register flex justify-center items-center">
  4. <div class="link-register-section flex justify-center items-center">
  5. <div class="content">
  6. <div class="logo"><img :src="supplierInfo.logo" alt="" /></div>
  7. <div class="message">
  8. 完成账号注册与设备认证信息后,将获得<span>{{supplierInfo.shopName}}</span>授权牌匾制作及寄送
  9. </div>
  10. <div class="control">
  11. <div class="button" @click="toRegister">点击进入</div>
  12. </div>
  13. </div>
  14. </div>
  15. </div>
  16. <SimpleDialog
  17. v-model="active"
  18. @confirm="onConfirm"
  19. :cancel="false"
  20. description="抱歉,该手机号已注册,您可以登录后再来进行正品授权申请!"
  21. :center="true"
  22. />
  23. </div>
  24. </template>
  25. <script>
  26. import { mapGetters } from 'vuex'
  27. export default {
  28. layout: 'app',
  29. data() {
  30. return {
  31. authId: '',
  32. clubUser: null,
  33. active: false,
  34. }
  35. },
  36. computed: {
  37. ...mapGetters([
  38. 'supplierInfo',
  39. 'authUserId',
  40. 'routePrefix',
  41. 'accessToken',
  42. 'userInfo',
  43. ]),
  44. },
  45. created() {
  46. this.authId = this.$route.query.authId
  47. if(this.accessToken) this.checkouMobileBindClub()
  48. },
  49. methods: {
  50. onConfirm() {
  51. this.$router.push(`${this.routePrefix}`)
  52. },
  53. // 判断用户手机号是否绑定机构
  54. async checkouMobileBindClub() {
  55. try {
  56. const res = await this.$http.api.fetchClubAuthInfo({
  57. authUserId: this.authUserId,
  58. mobile: this.userInfo.mobile,
  59. })
  60. this.clubUser = res.data.clubUser
  61. } catch (error) {
  62. console.log(error)
  63. }
  64. },
  65. toRegister() {
  66. // 已登录
  67. // 用户未绑定机构
  68. // 填写设备信息提交认证即可
  69. // 用户已绑定机构(提示:该用户已绑定机构)
  70. // 未登录
  71. // 填写用户信息
  72. // 手机号已绑定机构(提示:该手机号已绑定机构)
  73. // 手机号未绑定机构
  74. // 下一步:填写设备信息提交认证即可
  75. const link = `${this.routePrefix}/form/club-register?type=link&authId=${this.authId}`
  76. if (this.accessToken) {
  77. if (this.clubUser) {
  78. this.active = true
  79. } else {
  80. this.$router.push(link)
  81. }
  82. } else {
  83. this.$router.push(link)
  84. }
  85. },
  86. },
  87. }
  88. </script>
  89. <style lang="scss" scoped>
  90. @media screen and (min-width: 768px) {
  91. .page-content {
  92. position: fixed;
  93. top: 0;
  94. left: 0;
  95. z-index: 10000;
  96. width: 100vw;
  97. height: 100vh;
  98. background: url(https://static.caimei365.com/www/authentic/pc/link-register-bg.png)
  99. no-repeat center;
  100. .link-register-section {
  101. width: 1200px;
  102. height: 530px;
  103. background: url(https://static.caimei365.com/www/authentic/pc/link-register-section-bg.png)
  104. no-repeat center;
  105. .content {
  106. width: 1030px;
  107. height: 400px;
  108. background: #fff;
  109. background-image: url(https://static.caimei365.com/www/authentic/pc/link-register-icon.png);
  110. background-repeat: no-repeat;
  111. background-position: 580px center;
  112. box-sizing: border-box;
  113. padding-left: 70px;
  114. .logo {
  115. height: 40px;
  116. width: auto;
  117. margin-top: 48px;
  118. img {
  119. display: block;
  120. height: 40px;
  121. }
  122. }
  123. .message {
  124. width: 360px;
  125. font-size: 20px;
  126. line-height: 36px;
  127. color: #282828;
  128. margin: 40px 0 76px;
  129. span {
  130. font-weight: bold;
  131. }
  132. }
  133. .control {
  134. .button {
  135. width: 295px;
  136. height: 50px;
  137. background: #409eff;
  138. border-radius: 4px;
  139. text-align: center;
  140. font-size: 18px;
  141. line-height: 50px;
  142. color: #fff;
  143. cursor: pointer;
  144. }
  145. }
  146. }
  147. }
  148. }
  149. }
  150. @media screen and (max-width: 768px) {
  151. .page-content {
  152. position: fixed;
  153. top: 0;
  154. left: 0;
  155. z-index: 10000;
  156. width: 100vw;
  157. height: 100vh;
  158. background: url(https://static.caimei365.com/www/authentic/h5/link-register-bg.png)
  159. no-repeat center;
  160. .link-register-section {
  161. width: 100vw;
  162. height: 119.5vw;
  163. background: url(https://static.caimei365.com/www/authentic/h5/link-register-section-bg.png)
  164. no-repeat center;
  165. .content {
  166. width: 88.6vw;
  167. height: 106.6vw;
  168. background: #fff;
  169. background-image: url(https://static.caimei365.com/www/authentic/h5/link-register-icon.png);
  170. background-repeat: no-repeat;
  171. background-position: center 32vw;
  172. background-size: 62vw auto;
  173. box-sizing: border-box;
  174. padding-left: 8vw;
  175. position: relative;
  176. .logo {
  177. height: 8vw;
  178. width: auto;
  179. margin-top: 6.4vw;
  180. img {
  181. display: block;
  182. height: 8vw;
  183. }
  184. }
  185. .message {
  186. width: 72vw;
  187. font-size: 4vw;
  188. line-height: 7.2vw;
  189. color: #282828;
  190. margin-top: 4vw;
  191. span {
  192. font-weight: bold;
  193. }
  194. }
  195. .control {
  196. position: absolute;
  197. bottom: 7.2vw;
  198. left: 50%;
  199. transform: translateX(-50%);
  200. .button {
  201. width: 62vw;
  202. height: 8.8vw;
  203. background: #409eff;
  204. border-radius: 0.4vw;
  205. text-align: center;
  206. font-size: 3.6vw;
  207. line-height: 8.8vw;
  208. color: #fff;
  209. cursor: pointer;
  210. }
  211. }
  212. }
  213. }
  214. }
  215. }
  216. </style>