club-register.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. <template>
  2. <div class="page">
  3. <div class="page-top flex flex-col justify-center items-center">
  4. <img class="logo" :src="supplierInfo.logo" />
  5. <div
  6. class="name mt-2"
  7. v-text="supplierInfo.shopName + '正品授权申请'"
  8. ></div>
  9. </div>
  10. <div class="page-content">
  11. <template v-if="false">
  12. <!-- 进步条 -->
  13. <SimpleStep :list="stepList" :active="step" />
  14. <div class="step-list py-4">
  15. <keep-alive>
  16. <!-- 账号注册表单 -->
  17. <template><FormClubRegister v-if="step === 0" /></template>
  18. <!-- 机构认证表单 -->
  19. <template><FormClubInfo v-if="step === 1" /></template>
  20. <!-- 设备认证表单 -->
  21. <template><FormClubDevice v-if="step === 2" /></template>
  22. </keep-alive>
  23. </div>
  24. </template>
  25. <!-- 机构已认证 || 机构认证中 -->
  26. <template v-else>
  27. <div class="message">
  28. <div class="status-icon danger"></div>
  29. <div class="status">机构已认证</div>
  30. <div class="tip">提示:可点击认证记录看查看详情</div>
  31. </div>
  32. </template>
  33. <!-- 操作 -->
  34. <div class="control flex flex-col items-center">
  35. <div
  36. class="button prev flex justify-center items-center mb-2"
  37. @click="onPrevStep"
  38. v-if="step > 0"
  39. >
  40. 上一步
  41. </div>
  42. <div
  43. class="button next flex justify-center items-center"
  44. @click="onNextStep"
  45. >
  46. 下一步
  47. </div>
  48. <div class="record mt-2" @click="toRecord">认证记录</div>
  49. </div>
  50. </div>
  51. </div>
  52. </template>
  53. <script>
  54. import SimpleStep from '@/components/SimpleStep'
  55. import FormClubRegister from './components/form-club-register.vue'
  56. import FormClubInfo from './components/form-club-info.vue'
  57. import FormClubDevice from './components/form-club-device.vue'
  58. import { mapGetters } from 'vuex'
  59. export default {
  60. layout: 'app',
  61. components: {
  62. SimpleStep,
  63. FormClubRegister,
  64. FormClubInfo,
  65. FormClubDevice,
  66. },
  67. computed: {
  68. ...mapGetters(['supplierInfo', 'authUserId', 'routePrefix']),
  69. },
  70. data() {
  71. return {
  72. step: 0,
  73. stepList: [
  74. {
  75. label: '账号注册',
  76. id: 0,
  77. recordRoute: '/record/club/detail',
  78. },
  79. {
  80. label: '机构认证',
  81. id: 1,
  82. recordRoute: '/record/club/detail',
  83. },
  84. {
  85. label: '设备认证',
  86. id: 2,
  87. recordRoute: '/record/device',
  88. },
  89. ],
  90. }
  91. },
  92. methods: {
  93. onNextStep() {
  94. if (this.step < this.stepList.length - 1) {
  95. this.step++
  96. }
  97. },
  98. onPrevStep() {
  99. if (this.step > 0) {
  100. this.step--
  101. }
  102. },
  103. toRecord() {
  104. const step = this.stepList.find((item) => item.id === this.step)
  105. this.$router.push(`${this.routePrefix + step.recordRoute}`)
  106. },
  107. },
  108. }
  109. </script>
  110. <style lang="scss" scoped>
  111. // pc 端
  112. @media screen and (min-width: 768px) {
  113. .page {
  114. background: #fff;
  115. }
  116. .page-top {
  117. height: 360px;
  118. @include themify($themes) {
  119. background: themed('banner-club-register');
  120. background-size: auto 360px;
  121. }
  122. .logo {
  123. display: block;
  124. width: 120px;
  125. height: 120px;
  126. border-radius: 50%;
  127. background: #fff;
  128. }
  129. .name {
  130. font-size: 30px;
  131. color: #fff;
  132. }
  133. }
  134. .page-content {
  135. width: 1200px;
  136. margin: 0 auto;
  137. overflow: hidden;
  138. min-height: calc(100vh - 80px - 80px - 360px);
  139. box-sizing: border-box;
  140. padding-bottom: 40px;
  141. .message {
  142. display: flex;
  143. justify-content: center;
  144. align-items: center;
  145. flex-direction: column;
  146. margin-top: 60px;
  147. .status-icon {
  148. width: 88px;
  149. height: 88px;
  150. background-repeat: no-repeat;
  151. background-size: 75px auto;
  152. background-position: center;
  153. &.success {
  154. background-image: url(https://static.caimei365.com/www/authentic/pc/icon-auth-primary.png);
  155. }
  156. &.warning {
  157. background-image: url(https://static.caimei365.com/www/authentic/pc/icon-auth-warning.png);
  158. }
  159. &.danger {
  160. background-image: url(https://static.caimei365.com/www/authentic/pc/icon-auth-danger.png);
  161. }
  162. }
  163. .status {
  164. font-size: 18px;
  165. color: #282828;
  166. margin: 12px 0;
  167. }
  168. .tip {
  169. color: #999999;
  170. font-size: 14px;
  171. }
  172. }
  173. .control {
  174. margin-top: 62px;
  175. .button {
  176. width: 295px;
  177. height: 50px;
  178. cursor: pointer;
  179. &.prev {
  180. @include themify($themes) {
  181. border: 1px solid themed('color');
  182. color: themed('color');
  183. }
  184. }
  185. &.next {
  186. @include themify($themes) {
  187. background-color: themed('color');
  188. color: #fff;
  189. }
  190. }
  191. }
  192. .record {
  193. font-size: 14px;
  194. cursor: pointer;
  195. @include themify($themes) {
  196. color: themed('color');
  197. }
  198. }
  199. }
  200. .step-list {
  201. width: 700px;
  202. margin: 0 auto;
  203. }
  204. }
  205. }
  206. // 移动端
  207. @media screen and (max-width: 768px) {
  208. .page {
  209. background: #fff;
  210. }
  211. .page-top {
  212. height: 46vw;
  213. @include themify($themes) {
  214. background: themed('banner-home-h5');
  215. background-size: auto 46vw;
  216. }
  217. .logo {
  218. display: block;
  219. width: 14.8vw;
  220. height: 14.8vw;
  221. border-radius: 50%;
  222. background: #fff;
  223. }
  224. .name {
  225. font-size: 4vw;
  226. color: #fff;
  227. }
  228. }
  229. .page-content {
  230. padding: 0 7vw 7vw;
  231. .message {
  232. display: flex;
  233. justify-content: center;
  234. align-items: center;
  235. flex-direction: column;
  236. margin: 22.8vw 0;
  237. .status-icon {
  238. width: 23.6vw;
  239. height: 23.6vw;
  240. background-repeat: no-repeat;
  241. background-size: 20vw auto;
  242. background-position: center;
  243. &.success {
  244. background-image: url(https://static.caimei365.com/www/authentic/h5/icon-auth-primary.png);
  245. }
  246. &.warning {
  247. background-image: url(https://static.caimei365.com/www/authentic/h5/icon-auth-warning.png);
  248. }
  249. &.danger {
  250. background-image: url(https://static.caimei365.com/www/authentic/h5/icon-auth-danger.png);
  251. }
  252. }
  253. .status {
  254. font-size: 4.2vw;
  255. color: #282828;
  256. margin: 3.2vw 0 2.4vw;
  257. }
  258. .tip {
  259. color: #999999;
  260. font-size: 3.2vw;
  261. }
  262. }
  263. .control {
  264. .button {
  265. width: 85.6vw;
  266. height: 12vw;
  267. cursor: pointer;
  268. &.prev {
  269. @include themify($themes) {
  270. border: 1px solid themed('color');
  271. color: themed('color');
  272. }
  273. }
  274. &.next {
  275. @include themify($themes) {
  276. background-color: themed('color');
  277. color: #fff;
  278. }
  279. }
  280. }
  281. .record {
  282. margin-top: 4.8vw;
  283. font-size: 3.4vw;
  284. cursor: pointer;
  285. @include themify($themes) {
  286. color: themed('color');
  287. }
  288. }
  289. }
  290. }
  291. }
  292. </style>