猫妈狗爸伴宠师小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

286 lines
5.5 KiB

  1. <template>
  2. <!-- <view>基本考核完成</view> -->
  3. <view class="page po-r">
  4. <image src="" mode="" class="mainBg"></image>
  5. <view class="w-100 po-a content">
  6. <stepProgress :step="2"></stepProgress>
  7. <view class="info">
  8. <view class="top">
  9. <view class="flex-rowl top-title">
  10. <up-icon class="icon" name="checkmark-circle-fill" color="#FFBF60" size="34rpx"></up-icon>
  11. <text>基本考核答题已完成</text>
  12. </view>
  13. <view class="flex-rowl top-desc">
  14. <image class="icon" :src="configList.pet_base_test.paramValueImage"></image>
  15. <view>
  16. <up-parse :content="configList.pet_base_test.paramValueArea" containerStyle="{
  17. color: '#707070',
  18. fontSize: '22rpx',
  19. lineHeight: '29rpx',
  20. }"></up-parse>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="info-box">
  25. <view class="info-box-title">
  26. 平台&服务介绍
  27. </view>
  28. <view class="info-box-content">
  29. <view class="flex-colc info-item"
  30. v-for="item in serviceList"
  31. :key="`service-${item.id}`"
  32. >
  33. <view class="video">
  34. <video
  35. :src="item.video"
  36. play-btn-position="center"
  37. :picture-in-picture-mode="[]"
  38. ></video>
  39. </view>
  40. <text class="desc">{{ item.title }}</text>
  41. </view>
  42. </view>
  43. </view>
  44. <!-- <view class="info-box">
  45. <view class="info-box-title">
  46. 服务培训
  47. </view>
  48. <view class="info-box-content">
  49. v-for="item in trainList"
  50. :key="`train-${item.id}`"
  51. @click="openPopup(item.title, item.content)"
  52. <view class="flex-colc info-item"
  53. @click="openPopup('服务培训', configList.pet_service_training.paramValueArea)"
  54. >
  55. <image :src="configList.pet_service_training.paramValueImage" mode="widthFix"></image>
  56. <text class="desc">{{ item.title }}</text>
  57. </view>
  58. </view>
  59. <up-popup
  60. :show="popupData.show"
  61. round="16rpx"
  62. @close="closePopup"
  63. >
  64. <view class="popup">
  65. <view class="popup-header">
  66. <text class="popup-title">{{ popupData.title }}</text>
  67. </view>
  68. <view class="popup-content">
  69. <up-parse class="size-28" :content="popupData.content"></up-parse>
  70. </view>
  71. </view>
  72. </up-popup>
  73. </view> -->
  74. <view class="flex-rowc tools">
  75. <view class="flex-rowc btn" @click="toNext">
  76. 进入培训考核
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. </template>
  83. <script setup>
  84. import { ref, reactive } from 'vue'
  85. import { onShow } from '@dcloudio/uni-app'
  86. import { store } from '@/store'
  87. import { getServiceList, getTrainList } from '@/api/examination'
  88. import stepProgress from '../components/stepProgress.vue';
  89. const configList = store.state.system.configList
  90. const toNext = () => {
  91. uni.navigateTo({
  92. url: "/otherPages/authentication/examination/train"
  93. })
  94. }
  95. const serviceList = ref([])
  96. const fetchServiceList = async () => {
  97. try {
  98. serviceList.value = await getServiceList()
  99. } catch (err) {
  100. }
  101. }
  102. // const trainList = ref([])
  103. // const fetchTrainList = async () => {
  104. // try {
  105. // trainList.value = await getTrainList()
  106. // } catch (err) {
  107. // }
  108. // }
  109. const popupData = reactive({
  110. show: false,
  111. title: null,
  112. content: null,
  113. })
  114. const openPopup = (title, content) => {
  115. popupData.show = true
  116. popupData.title = title
  117. popupData.content = content
  118. }
  119. const closePopup = () => {
  120. popupData.show = false
  121. }
  122. onShow(() => {
  123. fetchServiceList()
  124. // fetchTrainList()
  125. })
  126. </script>
  127. <style scoped lang="scss">
  128. .page {
  129. position: relative;
  130. width: 100vw;
  131. .mainBg {
  132. width: 100vw;
  133. height: 442rpx;
  134. background-image: linear-gradient(to bottom, #FFBF60, #f5f5f5);
  135. }
  136. .content {
  137. top: 0;
  138. left: 0;
  139. padding: 16rpx;
  140. width: 100%;
  141. box-sizing: border-box;
  142. }
  143. }
  144. .info{
  145. margin-top: 22rpx;
  146. box-sizing: border-box;
  147. width: 100%;
  148. height: auto;
  149. background-color: #FFFFFF;
  150. padding: 22rpx 20rpx 38rpx 20rpx;
  151. border-radius: 16rpx;
  152. .top{
  153. width: 100%;
  154. background-color: #FFFCF1;
  155. box-sizing: border-box;
  156. padding: 19rpx 26rpx;
  157. border-radius: 16rpx;
  158. color: #707070;
  159. &-title {
  160. font-size: 28rpx;
  161. .icon {
  162. margin-right: 5rpx;
  163. }
  164. }
  165. &-desc {
  166. margin-top: 22rpx;
  167. font-size: 22rpx;
  168. .icon {
  169. margin-right: 12rpx;
  170. width: 27rpx;
  171. height: 27rpx;
  172. }
  173. }
  174. }
  175. &-box {
  176. margin-top: 30rpx;
  177. &-title {
  178. display: inline-block;
  179. font-size: 30rpx;
  180. &::before {
  181. content: "";
  182. display: inline-block;
  183. width: 9rpx;
  184. height: 33rpx;
  185. background-color: #FFBF60;
  186. margin-right: 7rpx;
  187. border-radius: 5rpx;
  188. }
  189. }
  190. &-content {
  191. display: grid;
  192. grid-template-columns: repeat(2, 1fr);
  193. grid-column-gap: 27rpx;
  194. }
  195. }
  196. &-item {
  197. width: 100%;
  198. margin-top: 30rpx;
  199. .video {
  200. width: 100%;
  201. height: 197rpx;
  202. border-radius: 16rpx;
  203. overflow: hidden;
  204. }
  205. video {
  206. width: 100%;
  207. height: 100%;
  208. }
  209. image {
  210. width: 100%;
  211. }
  212. .desc {
  213. color: #707070;
  214. font-size: 22rpx;
  215. line-height: 40rpx;
  216. }
  217. }
  218. }
  219. .tools {
  220. margin-top: 79rpx;
  221. }
  222. .btn {
  223. font-size: 30rpx;
  224. line-height: 40rpx;
  225. color: #fff;
  226. width: 574rpx;
  227. padding: 27rpx 0;
  228. box-sizing: border-box;
  229. border-radius: 41rpx;
  230. background-color: #FFBF60;
  231. }
  232. .popup {
  233. padding: 28rpx;
  234. &-header {
  235. margin-bottom: 28rpx;
  236. }
  237. &-content {
  238. max-height: 80vh;
  239. overflow-y: auto;
  240. }
  241. &-title {
  242. color: #000000;
  243. font-weight: 700;
  244. font-size: 30rpx;
  245. line-height: 40rpx;
  246. }
  247. }
  248. </style>