edit.vue 5.7 KB

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