edit.vue 6.5 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 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. console.log(this.formData)
  54. await this.$http.api.authClubSave(this.formData)
  55. this.$toast('保存成功')
  56. this.$router.push(`${this.routePrefix}/record/club/detail`)
  57. } catch (error) {
  58. console.log(error)
  59. }
  60. },
  61. // 获取认证机构信息
  62. async fetchAuthDetail() {
  63. try {
  64. const result = await this.$http.api.fetchClubAuthInfo({
  65. clubUserId: this.clubUserId,
  66. })
  67. this.formData.authId = result.data.auth.authId
  68. const res = await this.$http.api.fetchClubAuthInfoData({
  69. authId: result.data.auth.authId,
  70. })
  71. this.clubInfo = res.data
  72. this.$refs.formClubInfo.init(this.clubInfo)
  73. } catch (error) {
  74. console.log(error)
  75. }
  76. },
  77. onClubInfoFormStep(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. @include useTheme() {
  87. background: #fff;
  88. .page-top {
  89. height: 360px;
  90. background: fetch('pc-banner-record-club');
  91. background-size: auto 360px;
  92. .logo {
  93. display: block;
  94. width: 120px;
  95. height: 120px;
  96. border-radius: 50%;
  97. background: #fff;
  98. }
  99. .name {
  100. font-size: 30px;
  101. color: #fff;
  102. }
  103. }
  104. .page-content {
  105. width: 700px;
  106. margin: 0 auto;
  107. overflow: hidden;
  108. min-height: calc(100vh - 80px - 80px - 360px);
  109. box-sizing: border-box;
  110. padding-bottom: 40px;
  111. .page-title {
  112. font-size: 24px;
  113. font-weight: bold;
  114. text-align: center;
  115. padding: 40px 0;
  116. }
  117. .control {
  118. margin-top: 62px;
  119. .button {
  120. width: 295px;
  121. height: 50px;
  122. cursor: pointer;
  123. &.submit {
  124. background-color: fetch('color');
  125. color: #fff;
  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(~assets/theme-images/common/icon-position.png)
  160. no-repeat center;
  161. background-size: 16px 16px;
  162. }
  163. }
  164. }
  165. }
  166. }
  167. }
  168. }
  169. @media screen and (max-width: 768px) {
  170. ::v-deep {
  171. .el-form-item__label {
  172. font-size: 3.4vw;
  173. }
  174. }
  175. .page {
  176. @include useTheme() {
  177. background: #fff;
  178. .page-top {
  179. height: 46vw;
  180. background: fetch('h5-banner-record-club');
  181. background-size: auto 46vw;
  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. background-color: fetch('color');
  211. color: #fff;
  212. }
  213. }
  214. }
  215. .normal-row {
  216. position: relative;
  217. .label {
  218. font-size: 14px;
  219. color: #606266;
  220. span {
  221. color: #b2b2b2;
  222. font-size: 2.6vw;
  223. }
  224. }
  225. .postion-btn {
  226. position: absolute;
  227. top: 50%;
  228. right: 0;
  229. transform: translateY(-50%);
  230. width: 14vw;
  231. height: 6.8vw;
  232. line-height: 6.8vw;
  233. font-size: 3.2vw;
  234. color: #fff;
  235. background: #1890ff;
  236. display: flex;
  237. justify-content: center;
  238. align-items: center;
  239. cursor: pointer;
  240. border-radius: 0.4vw;
  241. &::before {
  242. content: '';
  243. display: inline-block;
  244. width: 3.58vw;
  245. height: 3.58vw;
  246. background: url(~assets/theme-images/common/icon-position.png)
  247. no-repeat center;
  248. background-size: 3.58vw;
  249. }
  250. }
  251. }
  252. }
  253. }
  254. }
  255. }
  256. </style>