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

455 lines
9.0 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view>
  3. <view class="containers po-r">
  4. <image src="" mode="" class="mainBg"></image>
  5. <view class="w-100 po-a content">
  6. <stepProgress :step="3"></stepProgress>
  7. <view class="step mt24">
  8. <view class="li flex-rowl">
  9. <view class="num flex-rowc">
  10. 1
  11. </view>
  12. <view class="item">
  13. <view class="flex-between mb10">
  14. <view class="flex-rowl">
  15. <image class="img" src="@/static/images/ydd/end12.png" mode=""></image>
  16. <text class="size-30 color-000 fw700">实名认证</text>
  17. </view>
  18. <view class="size-22 color-ffb">
  19. 已完成
  20. </view>
  21. </view>
  22. <view class="info">
  23. <!-- todo: 实名认证 -->
  24. <view class="size-22 color-777">
  25. {{ `真实姓名:${form.name}` }}
  26. </view>
  27. <view class="size-22 color-777">
  28. {{ `身份证号码:${form.idCard}` }}
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="li flex-rowl po-r">
  34. <view class="line po-a">
  35. </view>
  36. <view class="num flex-rowc">
  37. 2
  38. </view>
  39. <view class="item">
  40. <view class="flex-between mb10">
  41. <view class="flex-rowl">
  42. <image class="img" src="@/static/images/ydd/end13.png" mode="widthFix"></image>
  43. <text class="size-30 color-000 fw700">履约保证金缴纳</text>
  44. </view>
  45. <view class="size-22 color-ffb jiao" @click="jumpToBond">
  46. 去缴纳
  47. </view>
  48. <!-- todo -->
  49. <!-- <view class="size-22 highlight">
  50. 已完成
  51. </view> -->
  52. </view>
  53. <view class="info color-777 size-22">
  54. 请缴纳履约保证金保证金注销时可申请退还
  55. </view>
  56. </view>
  57. </view>
  58. <view class="li flex-rowl po-r">
  59. <view class="line po-a" style="height: 150rpx;">
  60. </view>
  61. <view class="num flex-rowc">
  62. 3
  63. </view>
  64. <view class="item">
  65. <view class="flex-between mb10">
  66. <view class="flex-rowl">
  67. <image class="img" src="@/static/images/ydd/end1(4).png" mode="widthFix"></image>
  68. <text class="size-30 color-000 fw700">添加客服微信</text>
  69. </view>
  70. <view class="size-22 highlight">
  71. 请自行添加
  72. </view>
  73. </view>
  74. <view class="info color-777 size-22 flex-rowl">
  75. <text class="size-22 color-777">微信二维码</text>
  76. <image :src="configList.wx_image.paramValueImage" mode="widthFix" style="width: 150rpx;height: 150rpx;"></image>
  77. </view>
  78. </view>
  79. </view>
  80. <view class="li flex-rowl po-r">
  81. <view class="line po-a" style="height: 150rpx;">
  82. </view>
  83. <view class="num flex-rowc">
  84. 4
  85. </view>
  86. <view class="item">
  87. <view class="flex-between mb10">
  88. <view class="flex-rowl">
  89. <image class="img" src="@/static/images/ydd/end13.png" mode="widthFix"></image>
  90. <text class="size-30 color-000 fw700">服务工具准备</text>
  91. </view>
  92. <view class="size-22 flex-rowr" @click="openToolsInfoModal">
  93. <text>查看工具包</text>
  94. <up-icon name="arrow-down" color="#7F7F7F" size="17rpx" style="margin-left: 5rpx;"></up-icon>
  95. </view>
  96. </view>
  97. <view class="info color-777 size-22">
  98. <view class="flex-between">
  99. <text class="size-22">所在地区:</text>
  100. <view plain class="flex-rowr" @click="selectAddr">
  101. <text>{{ form.area ? form.area : '请选择' }}</text>
  102. <up-icon style="margin-left: 22rpx;" name="arrow-down" color="#7F7F7F" size="21rpx"></up-icon>
  103. </view>
  104. </view>
  105. </view>
  106. <view class="info color-777 size-22 mt20">
  107. <view class="flex-between">
  108. <text class="size-22">详细地址:</text>
  109. <input v-model="form.address" type="text" placeholder="请输入道路、小区、门牌号等" />
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. <view class="footer-btn" @click="onSave">
  116. <view class="btn">
  117. 提交审核
  118. </view>
  119. </view>
  120. </view>
  121. <up-modal
  122. :show="showToolsInfoModal"
  123. :showConfirmButton="false"
  124. :showCancelButton="false"
  125. :closeOnClickOverlay="true"
  126. @close="closeToolsInfoModal"
  127. >
  128. <up-parse class="size-28" :content="configList.pet_tools.paramValueArea"></up-parse>
  129. </up-modal>
  130. </view>
  131. <button plain class="chat" open-type="contact">
  132. <image src="@/static/images/ydd/chat.png" mode="widthFix"></image>
  133. </button>
  134. </view>
  135. </template>
  136. <script setup>
  137. import { ref, reactive, computed } from "vue";
  138. import { onShow } from '@dcloudio/uni-app'
  139. import { useStore } from 'vuex'
  140. import { udpateUser, getUserOne } from '@/api/userTeacher'
  141. import stepProgress from '../components/stepProgress.vue';
  142. const store = useStore()
  143. const configList = computed(() => {
  144. return store.getters.configList
  145. })
  146. const userId = computed(() => {
  147. return store.state.user.userInfo.userId
  148. })
  149. const id = ref()
  150. const form = reactive({
  151. name: null,
  152. idCard: null,
  153. area: null,
  154. latitude: null,
  155. longitude: null,
  156. address: null,
  157. })
  158. const initData = async () => {
  159. console.log('--initData')
  160. try {
  161. const data = await getUserOne(userId.value)
  162. const {
  163. id: _id,
  164. name,
  165. idCard,
  166. } = data
  167. id.value = _id
  168. form.name = name
  169. form.idCard = idCard
  170. } catch (err) {
  171. console.log('--err', err)
  172. }
  173. }
  174. onShow(() => {
  175. initData()
  176. })
  177. const jumpToBond = () => {
  178. uni.navigateTo({
  179. url: "/otherPages/myOrdersManage/bond/index"
  180. })
  181. }
  182. const showToolsInfoModal = ref(false)
  183. const openToolsInfoModal = () => {
  184. showToolsInfoModal.value = true
  185. }
  186. const closeToolsInfoModal = () => {
  187. showToolsInfoModal.value = false
  188. }
  189. const setAddress = (res) => {
  190. //经纬度信息
  191. form.latitude = res.latitude
  192. form.longitude = res.longitude
  193. if (!res.address && res.name) { //用户直接选择城市的逻辑
  194. return form.area = res.name
  195. }
  196. if (res.address || res.name) {
  197. return form.area = res.address + res.name
  198. }
  199. form.area = '' //用户啥都没选就点击勾选
  200. }
  201. const selectAddr = () => {
  202. uni.chooseLocation({
  203. success: function(res) {
  204. setAddress(res)
  205. }
  206. })
  207. }
  208. const onSave = async () => {
  209. try {
  210. const {
  211. area,
  212. latitude,
  213. longitude,
  214. address,
  215. } = form
  216. const data = {
  217. id: id.value,
  218. area,
  219. latitude,
  220. longitude,
  221. address,
  222. }
  223. await udpateUser(data)
  224. uni.showToast({
  225. title: '提交成功!',
  226. icon: "none"
  227. })
  228. setTimeout(() => {
  229. uni.reLaunch({
  230. url: "/pages/workbenchManage/index"
  231. })
  232. }, 1000)
  233. } catch (err) {
  234. }
  235. }
  236. </script>
  237. <style lang="scss" scoped>
  238. .chat {
  239. position: fixed;
  240. right: 20rpx;
  241. bottom: 400rpx;
  242. z-index: 9999;
  243. border: none;
  244. padding: 0;
  245. width: 97rpx;
  246. height: auto;
  247. image {
  248. width: 100%;
  249. }
  250. }
  251. .line {
  252. width: 3rpx;
  253. height: 100rpx;
  254. background-color: #BDBDBD;
  255. left: 25rpx;
  256. top: -50rpx;
  257. }
  258. .jiao {
  259. padding: 5px 20rpx;
  260. border-radius: 30rpx;
  261. background-color: #FFBF60;
  262. color: #fff;
  263. }
  264. .li {
  265. width: 710rpx;
  266. .num {
  267. width: 50rpx;
  268. height: 50rpx;
  269. border-radius: 50%;
  270. background-color: #FFBF60;
  271. color: #fff;
  272. font-weight: 700;
  273. font-size: 26rpx;
  274. margin-right: 20rpx;
  275. }
  276. }
  277. .item {
  278. padding: 26rpx 36rpx;
  279. border-radius: 24rpx;
  280. background-color: #fff;
  281. margin-bottom: 24rpx;
  282. width: 590rpx;
  283. .info {
  284. padding: 16rpx;
  285. background-color: #f3f3f3;
  286. border-radius: 16rpx;
  287. }
  288. }
  289. .img {
  290. width: 40rpx;
  291. height: 40rpx;
  292. margin-right: 8rpx;
  293. }
  294. .bt120 {
  295. margin-bottom: 120rpx;
  296. width: 716rpx;
  297. box-sizing: border-box;
  298. }
  299. .footer-btn {
  300. z-index: 9999;
  301. width: 100vw;
  302. height: 144rpx;
  303. background-color: #fff;
  304. display: flex;
  305. justify-content: center;
  306. position: fixed;
  307. bottom: 0;
  308. left: 0;
  309. align-items: center;
  310. .btn {
  311. font-size: 30rpx;
  312. color: #fff;
  313. display: flex;
  314. justify-content: center;
  315. align-items: center;
  316. width: 574rpx;
  317. height: 94rpx;
  318. border-radius: 94rpx;
  319. background-color: #FFBF60;
  320. }
  321. }
  322. .type {
  323. width: 190rpx;
  324. margin-bottom: 74rpx;
  325. }
  326. .form {
  327. padding: 40rpx 32rpx;
  328. box-sizing: border-box;
  329. width: 716rpx;
  330. }
  331. .title {
  332. &::before {
  333. content: "";
  334. display: block;
  335. width: 9rpx;
  336. height: 33rpx;
  337. background-color: #FFBF60;
  338. margin-right: 7rpx;
  339. }
  340. }
  341. .mb6 {
  342. margin-bottom: 6rpx;
  343. }
  344. .containers {
  345. .neir {
  346. padding: 47rpx 27rpx 36rpx 27rpx;
  347. border-radius: 16rpx;
  348. box-sizing: border-box;
  349. width: 716rpx;
  350. .steps {
  351. .line {
  352. width: 163rpx;
  353. height: 3rpx;
  354. background-color: #BDBDBD;
  355. margin-bottom: 30rpx;
  356. }
  357. .num {
  358. width: 50rpx;
  359. height: 50rpx;
  360. background-color: #FFBF60;
  361. border-radius: 50%;
  362. }
  363. }
  364. }
  365. .mainBg {
  366. width: 100vw;
  367. height: 442rpx;
  368. background-image: linear-gradient(to bottom, #FFBF60, #f5f5f5);
  369. }
  370. .content {
  371. top: 0;
  372. left: 0;
  373. padding: 16rpx;
  374. padding-bottom: 200rpx;
  375. .logo {
  376. width: 194rpx;
  377. height: 70rpx;
  378. }
  379. .renz {
  380. image {
  381. width: 26rpx;
  382. height: 26rpx;
  383. }
  384. }
  385. }
  386. }
  387. .highlight {
  388. color: #FFBF60;
  389. }
  390. </style>