猫妈狗爸伴宠师小程序前端代码
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.

305 lines
6.0 KiB

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