edit.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. <template>
  2. <div class="club-info page">
  3. <div class="page-top flex flex-col justify-center items-center">
  4. <img class="logo" :src="supplierInfo.logo" />
  5. <div class="name mt-2" v-text="supplierInfo.shopName + '认证记录'"></div>
  6. </div>
  7. <div class="page-content">
  8. <div class="page-title">机构认证</div>
  9. <FormClubInfo ref="formClubInfo" @step="onClubInfoFormStep" />
  10. <div class="control flex flex-col items-center">
  11. <div
  12. class="button submit flex justify-center items-center"
  13. @click="onSubmit"
  14. >
  15. 提交
  16. </div>
  17. </div>
  18. </div>
  19. </div>
  20. </template>
  21. <script>
  22. import SimpleUploadImage from '@/components/SimpleUploadImage'
  23. import SimpleRadio from '@/components/SimpleRadio'
  24. import { mapGetters } from 'vuex'
  25. import FormClubInfo from '../../form/components/form-club-info.vue'
  26. export default {
  27. layout: 'app',
  28. components: {
  29. SimpleUploadImage,
  30. SimpleRadio,
  31. FormClubInfo,
  32. },
  33. computed: {
  34. ...mapGetters(['supplierInfo', 'authUserId', 'routePrefix', 'clubUserId']),
  35. },
  36. data() {
  37. return {
  38. clubInfo: {},
  39. formData: {},
  40. }
  41. },
  42. created() {
  43. this.fetchAuthDetail()
  44. },
  45. methods: {
  46. async onSubmit() {
  47. try {
  48. await this.$refs.formClubInfo.validate()
  49. this.formData.authUserId = this.authUserId
  50. this.formData.source = 2
  51. await this.$http.api.authClubSave(this.formData)
  52. this.$toast('保存成功')
  53. this.$router.push(`${this.routePrefix}/record/club/detail`)
  54. } catch (error) {
  55. console.log(error)
  56. }
  57. },
  58. // 获取认证机构信息
  59. async fetchAuthDetail() {
  60. try {
  61. const result = await this.$http.api.fetchClubAuthInfo({
  62. clubUserId: this.clubUserId,
  63. })
  64. this.formData.authId = result.data.auth.authId
  65. const res = await this.$http.api.fetchClubAuthInfoData({
  66. authId: result.data.auth.authId,
  67. })
  68. this.clubInfo = res.data
  69. this.$refs.formClubInfo.init(this.clubInfo)
  70. } catch (error) {}
  71. },
  72. onClubInfoFormStep(data) {
  73. console.log(data)
  74. this.formData = data
  75. },
  76. },
  77. }
  78. </script>
  79. <style lang="scss" scoped>
  80. @media screen and (min-width: 768px) {
  81. .page {
  82. background: #fff;
  83. }
  84. .page-top {
  85. height: 360px;
  86. @include themify($themes) {
  87. background: themed('banner-club-register');
  88. background-size: auto 360px;
  89. }
  90. .logo {
  91. display: block;
  92. width: 120px;
  93. height: 120px;
  94. border-radius: 50%;
  95. background: #fff;
  96. }
  97. .name {
  98. font-size: 30px;
  99. color: #fff;
  100. }
  101. }
  102. .page-content {
  103. width: 700px;
  104. margin: 0 auto;
  105. overflow: hidden;
  106. min-height: calc(100vh - 80px - 80px - 360px);
  107. box-sizing: border-box;
  108. padding-bottom: 40px;
  109. .page-title {
  110. font-size: 24px;
  111. font-weight: bold;
  112. text-align: center;
  113. padding: 40px 0;
  114. }
  115. .control {
  116. margin-top: 62px;
  117. .button {
  118. width: 295px;
  119. height: 50px;
  120. cursor: pointer;
  121. &.submit {
  122. @include themify($themes) {
  123. background-color: themed('color');
  124. color: #fff;
  125. }
  126. }
  127. }
  128. }
  129. .normal-row {
  130. position: relative;
  131. .label {
  132. font-size: 14px;
  133. color: #606266;
  134. span {
  135. color: #b2b2b2;
  136. }
  137. }
  138. .postion-btn {
  139. position: absolute;
  140. top: 50%;
  141. right: 0;
  142. transform: translateY(-50%);
  143. width: 62px;
  144. height: 28px;
  145. line-height: 28px;
  146. font-size: 14px;
  147. color: #fff;
  148. background: #1890ff;
  149. display: flex;
  150. justify-content: center;
  151. align-items: center;
  152. cursor: pointer;
  153. border-radius: 4px;
  154. &::before {
  155. content: '';
  156. display: inline-block;
  157. width: 16px;
  158. height: 16px;
  159. background: url(https://static.caimei365.com/www/authentic/pc/icon-position.png)
  160. no-repeat center;
  161. background-size: 16px 16px;
  162. }
  163. }
  164. }
  165. }
  166. }
  167. @media screen and (max-width: 768px) {
  168. ::v-deep {
  169. .el-form-item__label {
  170. font-size: 3.4vw;
  171. }
  172. }
  173. .page {
  174. background: #fff;
  175. }
  176. .page-top {
  177. height: 46vw;
  178. @include themify($themes) {
  179. background: themed('banner-home-h5');
  180. background-size: auto 46vw;
  181. }
  182. .logo {
  183. display: block;
  184. width: 14.8vw;
  185. height: 14.8vw;
  186. border-radius: 50%;
  187. background: #fff;
  188. }
  189. .name {
  190. font-size: 4vw;
  191. color: #fff;
  192. }
  193. }
  194. .page-content {
  195. box-sizing: border-box;
  196. padding: 8vw 7vw;
  197. .page-title {
  198. font-size: 4.2vw;
  199. font-weight: bold;
  200. text-align: center;
  201. margin-bottom: 8vw;
  202. color: #282828;
  203. }
  204. .control {
  205. .button {
  206. width: 100%;
  207. height: 12vw;
  208. cursor: pointer;
  209. &.submit {
  210. @include themify($themes) {
  211. background-color: themed('color');
  212. color: #fff;
  213. }
  214. }
  215. }
  216. }
  217. .normal-row {
  218. position: relative;
  219. .label {
  220. font-size: 14px;
  221. color: #606266;
  222. span {
  223. color: #b2b2b2;
  224. font-size: 2.6vw;
  225. }
  226. }
  227. .postion-btn {
  228. position: absolute;
  229. top: 50%;
  230. right: 0;
  231. transform: translateY(-50%);
  232. width: 14vw;
  233. height: 6.8vw;
  234. line-height: 6.8vw;
  235. font-size: 3.2vw;
  236. color: #fff;
  237. background: #1890ff;
  238. display: flex;
  239. justify-content: center;
  240. align-items: center;
  241. cursor: pointer;
  242. border-radius: 0.4vw;
  243. &::before {
  244. content: '';
  245. display: inline-block;
  246. width: 3.58vw;
  247. height: 3.58vw;
  248. background: url(https://static.caimei365.com/www/authentic/pc/icon-position.png)
  249. no-repeat center;
  250. background-size: 3.58vw;
  251. }
  252. }
  253. }
  254. }
  255. }
  256. </style>