detail.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  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 class="name mt-2" v-text="supplierInfo.shopName + '认证记录'"></div>
  6. </div>
  7. <div class="page-content">
  8. <template v-if="true">
  9. <div class="page-title">机构认证</div>
  10. <div class="row">
  11. <div class="col">机构名称:</div>
  12. <div class="col">{{ clubInfo.authParty }}</div>
  13. </div>
  14. <div class="row">
  15. <div class="col">联系电话:</div>
  16. <div class="col">{{ clubInfo.mobile }}</div>
  17. </div>
  18. <div class="row">
  19. <div class="col">所在地区:</div>
  20. <div class="col">{{ clubInfo.area }}</div>
  21. </div>
  22. <div class="row">
  23. <div class="col">所在位置:</div>
  24. <div class="col">{{ clubInfo.address }}</div>
  25. </div>
  26. <div class="row">
  27. <div class="col max-width">logo:</div>
  28. <div class="col">
  29. <el-image
  30. :src="clubInfo.logo"
  31. :preview-src-list="[clubInfo.logo]"
  32. ></el-image>
  33. </div>
  34. </div>
  35. <div class="row">
  36. <div class="col max-width">门头照:</div>
  37. <div class="col">
  38. <template v-for="(image, index) in clubInfo.bannerList">
  39. <el-image
  40. :key="index"
  41. :src="image"
  42. :preview-src-list="clubInfo.bannerList"
  43. />
  44. </template>
  45. </div>
  46. </div>
  47. <div class="row">
  48. <div class="col">机构类型:</div>
  49. <div class="col">
  50. {{
  51. ['医美', '生美', '项目公司', '个人', '其他'][
  52. clubInfo.firstClubType - 1
  53. ]
  54. }}
  55. </div>
  56. </div>
  57. <div
  58. class="row"
  59. v-if="clubInfo.firstClubType === 1 || clubInfo.firstClubType === 2"
  60. >
  61. <div class="col">医美类型:</div>
  62. <div class="col">
  63. {{
  64. ['诊所', '门诊', '医院', '其他', '美容院', '养生馆', '其他'][
  65. clubInfo.secondClubType - 1
  66. ]
  67. }}
  68. </div>
  69. </div>
  70. <div class="row">
  71. <div class="col">员工人数:</div>
  72. <div class="col">{{ clubInfo.empNum }}</div>
  73. </div>
  74. <div class="row">
  75. <div class="col">状态:</div>
  76. <div class="col">
  77. <div>
  78. <span v-if="clubInfo.auditStatus === 1">认证成功</span>
  79. <span v-else-if="clubInfo.auditStatus === 2">认证中</span>
  80. <span v-else>认证失败</span>
  81. </div>
  82. </div>
  83. </div>
  84. <div class="control flex flex-col items-center">
  85. <div
  86. class="button edit flex justify-center items-center mb-2"
  87. @click="onEdit"
  88. >
  89. 编辑
  90. </div>
  91. <div
  92. class="button search flex justify-center items-center"
  93. @click="onToDeviceList"
  94. >
  95. 查看认证设备
  96. </div>
  97. </div>
  98. </template>
  99. <template v-else>
  100. <SimpleEmpty name="icon-club-empty.png" description="暂无机构认证~" />
  101. </template>
  102. </div>
  103. </div>
  104. </template>
  105. <script>
  106. import SimpleEmpty from '@/components/SimpleEmpty'
  107. import { mapGetters } from 'vuex'
  108. export default {
  109. layout: 'app',
  110. components: {
  111. SimpleEmpty,
  112. },
  113. data() {
  114. return {
  115. clubInfo: {},
  116. }
  117. },
  118. computed: {
  119. ...mapGetters(['supplierInfo', 'routePrefix', 'clubUserId']),
  120. },
  121. created() {
  122. this.fetchAuthDetail()
  123. },
  124. methods: {
  125. // 获取认证机构信息
  126. async fetchAuthDetail() {
  127. try {
  128. const result = await this.$http.api.fetchClubAuthInfo({
  129. clubUserId: this.clubUserId,
  130. })
  131. const res = await this.$http.api.fetchClubAuthInfoData({
  132. authId: result.data.auth.authId,
  133. })
  134. this.clubInfo = res.data
  135. console.log(res)
  136. } catch (error) {}
  137. },
  138. onToDeviceList() {
  139. this.$router.push(`${this.routePrefix}/record/device`)
  140. },
  141. onEdit() {
  142. this.$router.push(`${this.routePrefix}/record/club/edit`)
  143. },
  144. },
  145. }
  146. </script>
  147. <style lang="scss" scoped>
  148. @media screen and (min-width: 768px) {
  149. .page {
  150. background: #fff;
  151. }
  152. .page-top {
  153. height: 360px;
  154. @include themify($themes) {
  155. background: themed('banner-club-register');
  156. background-size: auto 360px;
  157. }
  158. .logo {
  159. display: block;
  160. width: 120px;
  161. height: 120px;
  162. border-radius: 50%;
  163. background: #fff;
  164. }
  165. .name {
  166. font-size: 30px;
  167. color: #fff;
  168. }
  169. }
  170. .page-content {
  171. width: 700px;
  172. margin: 0 auto;
  173. overflow: hidden;
  174. min-height: calc(100vh - 80px - 80px - 360px);
  175. box-sizing: border-box;
  176. padding-bottom: 40px;
  177. .page-title {
  178. font-size: 24px;
  179. font-weight: bold;
  180. text-align: center;
  181. padding: 40px 0;
  182. }
  183. .row {
  184. display: flex;
  185. justify-content: flex-start;
  186. align-items: flex-start;
  187. font-size: 18px;
  188. margin: 24px 0;
  189. .col {
  190. &:first-child {
  191. width: 90px;
  192. color: #666;
  193. }
  194. &:last-child {
  195. color: #282828;
  196. }
  197. }
  198. .el-image {
  199. width: 120px;
  200. height: 120px;
  201. margin-right: 12px;
  202. }
  203. }
  204. .control {
  205. margin-top: 62px;
  206. .button {
  207. width: 295px;
  208. height: 50px;
  209. cursor: pointer;
  210. &.edit {
  211. @include themify($themes) {
  212. border: 1px solid themed('color');
  213. color: themed('color');
  214. }
  215. }
  216. &.search {
  217. @include themify($themes) {
  218. background-color: themed('color');
  219. color: #fff;
  220. }
  221. }
  222. }
  223. }
  224. }
  225. }
  226. @media screen and (max-width: 768px) {
  227. .page {
  228. background: #fff;
  229. }
  230. .page-top {
  231. height: 46vw;
  232. @include themify($themes) {
  233. background: themed('banner-home-h5');
  234. background-size: auto 46vw;
  235. }
  236. .logo {
  237. display: block;
  238. width: 14.8vw;
  239. height: 14.8vw;
  240. border-radius: 50%;
  241. background: #fff;
  242. }
  243. .name {
  244. font-size: 4vw;
  245. color: #fff;
  246. }
  247. }
  248. .page-content {
  249. box-sizing: border-box;
  250. padding: 8vw 7.2vw;
  251. .page-title {
  252. font-size: 4.2vw;
  253. font-weight: bold;
  254. text-align: center;
  255. margin-bottom: 8vw;
  256. color: #282828;
  257. }
  258. .row {
  259. display: flex;
  260. justify-content: flex-start;
  261. align-items: flex-start;
  262. font-size: 3.4vw;
  263. margin-bottom: 5.6vw;
  264. flex-wrap: wrap;
  265. .col {
  266. &:first-child {
  267. width: 17vw;
  268. color: #666;
  269. &.max-width {
  270. width: 100% !important;
  271. margin-bottom: 2.6vw;
  272. }
  273. }
  274. &:last-child {
  275. color: #282828;
  276. }
  277. }
  278. .el-image {
  279. width: 25.6vw;
  280. height: 25.6vw;
  281. }
  282. }
  283. .control {
  284. margin-top: 22.8vw;
  285. .button {
  286. width: 100%;
  287. height: 12vw;
  288. cursor: pointer;
  289. &.edit {
  290. @include themify($themes) {
  291. border: 1px solid themed('color');
  292. color: themed('color');
  293. }
  294. }
  295. &.search {
  296. @include themify($themes) {
  297. background-color: themed('color');
  298. color: #fff;
  299. }
  300. }
  301. }
  302. }
  303. }
  304. }
  305. </style>