edit.vue 6.0 KB

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