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.

1744 lines
45 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. <template>
  2. <view class="home-content">
  3. <NewUserCoupon v-if="isNewUser" @close="closeNewUserPopup" @getCoupon="handleGetCoupon"></NewUserCoupon>
  4. <view class="banner">
  5. <uni-swiper-dot class="uni-swiper-dot-box" field="content">
  6. <swiper class="swiper" indicator-dots indicator-color="rgba(255, 255, 255, 0.50)"
  7. indicator-active-color="#ffffff" autoplay interval="5000">
  8. <swiper-item v-for="(item,i) in bannerList" :key="i">
  9. <image :src="item&&item.dictValue" style="width: 100%;" mode="widthFix" />
  10. </swiper-item>
  11. </swiper>
  12. </uni-swiper-dot>
  13. </view>
  14. <view style="margin: -250px 20rpx 0 20rpx;">
  15. <image style="width: 710rpx; height: 176rpx;" slot='cover'
  16. src="https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/petServiceOrder/TopDetail.png" />
  17. </view>
  18. <view class="card-container">
  19. <uni-card :is-shadow="false" padding="40rpx 20rpx 40rpx 20rpx" margin="20rpx">
  20. <view class="normal-bolb-text">
  21. <view @click="getLocationInfo"
  22. style="display: flex; align-items: center; justify-content: space-between;">
  23. <text v-if="isCheckLocation"
  24. style="color: #333333 ;font-size: 32rpx;font-weight: 600; font-style: normal; width: 450rpx; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">{{locationName}}</text>
  25. <text v-else
  26. style="color: #C4C4C4 ;font-size: 32rpx;font-weight: 500; font-style: normal;">请选择宠物上门服务地址</text>
  27. <uni-icons type="location-filled" size="20" color="#FFB13F"></uni-icons>
  28. </view>
  29. </view>
  30. <view class="line" style="background-color: #EFEFEF;"></view>
  31. <view class="content-container">
  32. <view class="example-body hideOnPc">
  33. <view class="normal-bolb-text">
  34. <view @click="toggleCalendar('bottom')">
  35. <view v-if="isCheckTime"
  36. style="display: flex; align-items: center; justify-content: space-between;">
  37. <text
  38. style="color: #333333 ;font-size: 32rpx;font-weight: 600; font-style: normal; width: 450rpx; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">{{selectedDateShowText}}</text>
  39. <text
  40. style="color: #333333 ;font-size: 32rpx;font-weight: 600; font-style: normal;">共选择
  41. <text style="color: #FFB13F;">{{selectedDate.length}}</text>
  42. </text>
  43. </view>
  44. <view v-else
  45. style="display: flex; align-items: center; justify-content: space-between;">
  46. <text
  47. style="color: #C4C4C4 ;font-size: 32rpx;font-weight: 500; font-style: normal;">请选择宠物上门服务时间</text>
  48. <uni-icons type="right" size="20" color="#FFB13F"></uni-icons>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. <view>
  54. <uni-popup ref="popup" background-color="#fff" @change="changePopup">
  55. <view class="popupBottom">
  56. <uni-calendar ref="calendar" class="uni-calendar--hook" :selected="selectedDate"
  57. :startDate="startDate" :endDate="endDate" :showMonth="false"
  58. @change="changeCalendar" @confirm="changeCalendar" @close="close" />
  59. <view style="display: flex; justify-content: center; align-items: center;">
  60. <image @click="closePopup" style="width: 670rpx; height: 80rpx;" slot='cover' src="https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/petServiceOrder/yesButton.png" />
  61. </view>
  62. </view>
  63. </uni-popup>
  64. </view>
  65. </view>
  66. <view class="line" style="background-color: #EFEFEF;"></view>
  67. <view>
  68. <view style="display: flex;">
  69. <view @click="getOrder(true)" style="margin-right: 20rpx;">
  70. <image style="width: 304rpx; height: 100rpx;" slot='cover'
  71. src="https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/petServiceOrder/OrderByCompanion.png" />
  72. </view>
  73. <view @click="getOrder(false)">
  74. <image style="width: 304rpx; height: 100rpx;"
  75. src="https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/petServiceOrder/OrderBySystem.png" />
  76. </view>
  77. </view>
  78. </view>
  79. </uni-card>
  80. </view>
  81. <view class="coupon-list">
  82. <uni-card :is-shadow="false" padding=0 margin="10px">
  83. <view class="coupon-title" slot="title">
  84. <view class="coupon-title-left">
  85. <view class="coupon-flag"></view>
  86. <view>领券中心</view>
  87. </view>
  88. <view class="coupon-title-right">
  89. <view @click="getAllCoupon">
  90. 更多 <uni-icons type="right" size="14px" color="#AAAAAA"></uni-icons>
  91. </view>
  92. </view>
  93. </view>
  94. <view class="split-line"></view>
  95. <view class="coupon-content">
  96. <view v-for="(item,index) in couponData" style="padding:20rpx;" :key="index">
  97. <view style="border: 1px solid #FFBF60; border-radius: 8px;">
  98. <view class="card">
  99. <view class="card-left">{{switchType(item.stockType)}}</view>
  100. <view class="card-center">
  101. <view class="card-center-top"></view>
  102. <view class="card-center-bottom"></view>
  103. </view>
  104. <view class="card-right">
  105. <view class="card-content">
  106. <view class="card-info">{{item.stockName}}</view>
  107. <view class="card-type">可用于
  108. <text class="card-type-text">专业喂养</text>
  109. <text class="card-type-text">专业遛狗</text>
  110. </view>
  111. <view class="card-time">有效期至: {{item && item.availableEndTime ? item.availableEndTime.slice(0, 16) : ''}}</view>
  112. </view>
  113. <view>
  114. <view style="width: 132rpx;height: 52rpx;background-color: #FFAA48; display: flex;align-items: center;justify-content: center;border-radius: 56rpx;">
  115. <text @click="receiveCoupon(item.id)" style="font-size: 24rpx; font-weight: 500; color: #FFFFFF;">立即领取</text>
  116. </view>
  117. </view>
  118. </view>
  119. </view>
  120. <view class="card-bottom">
  121. <view class="card-bottom-text">
  122. 优惠券不可兑换现金
  123. </view>
  124. <view class="card-bottom-text" @click="showRulePopup(item)">
  125. 查看详细规则>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. </view>
  131. </uni-card>
  132. </view>
  133. <view class="companion-list">
  134. <uni-card :is-shadow="false" padding=0 margin="10px">
  135. <view class="companion-title" slot="title">
  136. <view class="companion-title-left">
  137. <view class="companion-flag"></view>
  138. <view>周边伴宠师</view>
  139. </view>
  140. <view class="companion-title-right" @click="getAllCompanion">
  141. <view>
  142. 更多 <uni-icons type="right" size="14px" color="#AAA"></uni-icons>
  143. </view>
  144. </view>
  145. </view>
  146. <view class="split-line"></view>
  147. <view class="companion-content">
  148. <view class="companion-item">
  149. <view class="companion-info">
  150. <image class="companion-img" slot='cover'
  151. :src="defaultCompanion.staffImages && defaultCompanion.staffImages.length > 0 ? defaultCompanion.staffImages[0].url : defaultStaffIamge">
  152. </image>
  153. <view class="companion-info-1">
  154. <view class="companion-info-2">
  155. <view class="companion-info-title">
  156. <view class="companion-name">
  157. {{defaultCompanion.name}}
  158. </view>
  159. <view class="companion-sex">
  160. <image :src="defaultCompanion.gender == '1' ? 'https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/personal/pet/sex_m.png' : 'https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/personal/pet/sex_f.png'" alt="sex"
  161. style="width: 40rpx;height: 40rpx;" />
  162. </view>
  163. </view>
  164. <view class="companion-info-star">
  165. <text style="color: #FFB13F;">客户点赞数{{defaultCompanion.star}}</text>
  166. <uni-icons type="hand-up-filled" size="18" color="#FFB13F"></uni-icons>
  167. </view>
  168. </view>
  169. <view class="companion-info-3" style="width: 100%;">
  170. <view class="ellipsis">
  171. 距离{{defaultCompanion.distance}}km
  172. </view>
  173. </view>
  174. <view class="companion-info-4" style="width: 100%;">
  175. <view class="ellipsis" style="max-width: 450rpx;">
  176. 简介{{defaultCompanion.shortDescription}}
  177. </view>
  178. </view>
  179. </view>
  180. </view>
  181. </view>
  182. <view>
  183. <view class="companion-item-bottom">
  184. <text class="companion-item-bottom-text">养宠{{defaultCompanion.year}} | 评价{{defaultCompanion.record}} | 服务小结{{defaultCompanion.serviceNum}}</text>
  185. </view>
  186. </view>
  187. </view>
  188. </uni-card>
  189. </view>
  190. <view class="history-record">
  191. <uni-card :is-shadow="false" padding=0 margin="10px">
  192. <view class="history-record-title" slot="title">
  193. <view class="history-record-title-left">
  194. <view class="history-record-flag"></view>
  195. <view>历史记录</view>
  196. </view>
  197. <view class="history-record-title-right">
  198. <view @click="getAllRecord">
  199. 查看服务记录和评价详情 <uni-icons type="right" size="14px" color="#AAAAAA"></uni-icons>
  200. </view>
  201. </view>
  202. </view>
  203. <view class="split-line"></view>
  204. <view class="history-record-content">
  205. <view class="history-record-content-image">
  206. <view class="history-record-content-image-1">
  207. <view class="history-record-content-image-1-text">
  208. <view class="history-record-content-image-1-text-1">{{historyRecord.dog}}</view>
  209. <view class="history-record-content-image-1-text-2">{{historyRecord.dogTime}}</view>
  210. </view>
  211. </view>
  212. <view class="history-record-content-image-2">
  213. <view class="history-record-content-image-2-text">
  214. <view class="history-record-content-image-2-text-1">{{historyRecord.cat}}</view>
  215. <view class="history-record-content-image-2-text-2">至2{{historyRecord.catTime}}</view>
  216. </view>
  217. </view>
  218. <view class="history-record-content-image-3">
  219. <view class="history-record-content-image-3-text">
  220. <view class="history-record-content-image-3-text-1">{{historyRecord.num}}</view>
  221. <view class="history-record-content-image-3-text-2">{{historyRecord.numTime}}</view>
  222. </view>
  223. </view>
  224. </view>
  225. <view class="history-record-content-text">
  226. <text>*数据来源于布丁猫妈狗爸平台</text>
  227. </view>
  228. </view>
  229. </uni-card>
  230. </view>
  231. <view class="service-content">
  232. <image src="https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/second_stage/ysbz.png"
  233. style="width: 100%;" mode="widthFix" alt="service" />
  234. </view>
  235. <view class="card-container">
  236. <uni-card :is-shadow="false" padding="0px" margin="10px">
  237. <view class="title-img4"></view>
  238. <uni-row class="demo-uni-row">
  239. <uni-col :span="12" v-for="(item,index) in peopleList" :key="index">
  240. <uni-card :is-shadow="false" margin="5px" padding="0" spacing="0" :border="false"
  241. shadow="0px 0px 0px 0px rgba(0, 0, 0, 0.08)">
  242. <image class="people-img" slot='cover' style="width: 100%;"
  243. :src="item&&item.staffImages&&item.staffImages.length>0?item.staffImages[0].url:defaultStaffIamge">
  244. </image>
  245. <text class="people-year">{{item.serviceAge}}年从业经验</text>
  246. <text class="show-text-1">姓名{{item.nickName}}</text>
  247. <text class="show-text-2">简介{{item.shortDescription}}</text>
  248. </uni-card>
  249. </uni-col>
  250. </uni-row>
  251. </uni-card>
  252. </view>
  253. <view>
  254. <image style="height: 132rpx; width: 710rpx; margin: 0 20rpx 20rpx 20rpx;"
  255. slot='cover'
  256. src="https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/petServiceOrder/joinus.png" />
  257. </view>
  258. <Kefu></Kefu>
  259. <view class="coupon_wrap" v-if="envVersion == 'dev'">
  260. <view class="details-subscribe">
  261. <view @click="getCoupon" class="details-btn">点击领取到卡包</view>
  262. </view>
  263. <view v-if="showMask" @closeMask="closeMask">
  264. <view class="mask-coupon" @click="closeMask">
  265. <view class="wx-coupon">
  266. <view class="title">
  267. 领取优惠券
  268. <i>*</i>
  269. </view>
  270. <view class="content">
  271. 优惠券列表显示
  272. </view>
  273. <view class="" v-for="(item,index) in couponList" :key="index">
  274. <send-coupon @sendcoupon="getSendCoupon" @userconfirm="redirectuser" :sign="item.sign"
  275. :send_coupon_params="item.sendCouponParams"
  276. :send_coupon_merchant="item.send_coupon_merchant">
  277. <view class="text-button">{{item.wechatStock.stockName}}</view>
  278. </send-coupon>
  279. </view>
  280. </view>
  281. </view>
  282. </view>
  283. </view>
  284. <!-- 优惠券详细规则弹窗 -->
  285. <uni-popup ref="rulePopup" type="center">
  286. <view class="rule-popup">
  287. <view class="rule-popup-title">优惠券详细规则</view>
  288. <view class="rule-popup-content">
  289. <view class="rule-item">
  290. <view class="rule-label">名称</view>
  291. <view class="rule-value">{{currentCoupon && currentCoupon.stockName || ''}}</view>
  292. </view>
  293. <view class="rule-item">
  294. <view class="rule-label">折扣</view>
  295. <view class="rule-value">{{getDiscountText(currentCoupon)}}</view>
  296. </view>
  297. <view class="rule-item">
  298. <view class="rule-label">使用规则</view>
  299. <view class="rule-value">可用于专业喂养和专业遛狗服务</view>
  300. </view>
  301. <view class="rule-item">
  302. <view class="rule-label">有效日期</view>
  303. <view class="rule-value">{{currentCoupon && currentCoupon.availableEndTime ? currentCoupon.availableEndTime.slice(0, 16) : ''}}</view>
  304. </view>
  305. <view class="rule-item">
  306. <view class="rule-label">特别说明</view>
  307. <view class="rule-value">单笔订单仅限使用1张优惠券优惠券仅限用户本人使用不可赠送不可提现不得找零</view>
  308. </view>
  309. </view>
  310. <view class="rule-popup-close" @click="closeRulePopup">关闭</view>
  311. </view>
  312. </uni-popup>
  313. </view>
  314. </template>
  315. <script>
  316. import {
  317. getStaffList,
  318. getProductList,
  319. getBannerList,
  320. getCouponList,
  321. getCouponListNoAuth,
  322. getOpenId,
  323. receiveCoupon,
  324. } from "@/api/system/user"
  325. import {
  326. setToken,
  327. getToken,
  328. getOpenIdKey,
  329. setOpenIdKey
  330. } from '@/utils/auth'
  331. import { getTeacherListIndex } from '@/api/home'
  332. import Kefu from './common/kefu.vue'
  333. import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
  334. import NewUserCoupon from './components/NewUserCoupon.vue';
  335. import positionMixin from '@/mixins/position.js';
  336. export default {
  337. mixins: [positionMixin],
  338. data() {
  339. return {
  340. current: 0,
  341. swiperDotIndex: 0,
  342. defaultSkuImage: 'https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/banner/%E5%96%82%E5%85%BB.png',
  343. defaultStaffIamge: 'https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/banner/gold_people.png',
  344. defaultLink: '/pages/details/feed',
  345. skuData: [],
  346. peopleList: [],
  347. cover: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg',
  348. bannerList: [],
  349. couponList: [],
  350. showMask: false,
  351. envVersion: 'develop',
  352. isNewUser: false,
  353. selectedDate: [],
  354. startDate: '',
  355. endDate: '',
  356. isCheckTime: false,
  357. selectedDateShowText: '',
  358. isCheckLocation: false,
  359. locationName: '',
  360. locationLatitude: '',
  361. locationLongitude: '',
  362. locationAddress: '',
  363. allInfo: {
  364. isCheckLocation: false,
  365. locationName: '',
  366. locationLatitude: '',
  367. locationLongitude: '',
  368. locationAddress: '',
  369. selectedDate: [],
  370. isCheckTime: false,
  371. selectedDateShowText: '',
  372. },
  373. defaultCompanion: {
  374. name: '宠小二',
  375. gender: 0,
  376. star: 560,
  377. distance: 1.5,
  378. shortDescription: '有一只三岁蓝猫叫憨憨,热爱小宠物,心地善良,喜欢动物',
  379. staffImages: [{
  380. url: "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/2634af25c5bf294f39b795ecc9d3c4eefa微信图片_20240126125100.png"
  381. }],
  382. year: 4,
  383. record: 11,
  384. serviceNum: 13,
  385. },
  386. couponData: [],
  387. historyRecord: {
  388. dog: "47131",
  389. dogTime: "2024.12.12",
  390. cat: "47131",
  391. catTime: "2024.12.12",
  392. num: "47131",
  393. numTime: "2024.12.12",
  394. },
  395. currentCoupon: null,
  396. }
  397. },
  398. components: {
  399. Kefu,
  400. uniPopup,
  401. NewUserCoupon
  402. },
  403. mounted() {
  404. this.getCalendarDate();
  405. this.checkNewUser();
  406. },
  407. methods: {
  408. checkNewUser() {
  409. const isFirstVisit = !uni.getStorageSync('hasVisited');
  410. if (isFirstVisit) {
  411. this.isNewUser = true;
  412. uni.setStorageSync('hasVisited', true);
  413. }
  414. },
  415. closeNewUserPopup() {
  416. this.isNewUser = false;
  417. },
  418. handleGetCoupon() {
  419. if (getToken()) {
  420. this.getCoupon();
  421. } else {
  422. uni.navigateTo({
  423. url: '/pages/personalCenter/index'
  424. });
  425. }
  426. },
  427. getAllCoupon() {
  428. uni.navigateTo({
  429. url: '/pages/companionPetList/couponList'
  430. });
  431. },
  432. getAllCompanion() {
  433. if (!this.isCheckLocation) {
  434. uni.showToast({
  435. title: '请先选择地址',
  436. duration: 1500,
  437. icon: "none"
  438. })
  439. } else {
  440. uni.navigateTo({
  441. url: `/pages/companionPetList/companionPetList?info=` + encodeURIComponent(JSON
  442. .stringify(this.allInfo))
  443. });
  444. }
  445. },
  446. getAllRecord () {
  447. },
  448. toggleCalendar(type) {
  449. this.type = type
  450. uni.hideTabBar()
  451. this.$refs.popup.open(type)
  452. },
  453. closePopup() {
  454. this.$refs.popup.close()
  455. setTimeout(() => {
  456. uni.showTabBar()
  457. }, 300)
  458. },
  459. changePopup(e) {
  460. console.log('当前模式:' + e.type + ',状态:' + e.show);
  461. if (e.show) {
  462. uni.hideTabBar()
  463. } else {
  464. setTimeout(() => {
  465. uni.showTabBar()
  466. }, 300)
  467. }
  468. },
  469. close() {
  470. console.log('弹窗关闭');
  471. },
  472. confirm(e) {
  473. console.log('confirm 返回:', e)
  474. },
  475. changeCalendar(e) {
  476. console.log('change 返回:', e)
  477. this.selectedDateShowText = ''
  478. const selectedValue = this.selectedDate.find(item => item.date === e.fulldate)
  479. console.log('const selectedValue', selectedValue)
  480. if (selectedValue) {
  481. this.selectedDate = this.selectedDate.filter(item => item.date !== e.fulldate);
  482. this.allInfo.selectedDate = this.selectedDate;
  483. } else {
  484. this.selectedDate.push({
  485. date: e.fulldate,
  486. info: 'time'
  487. })
  488. this.allInfo.selectedDate = this.selectedDate
  489. console.log('this.selectedDate', this.selectedDate)
  490. }
  491. console.log("this.selectedDate.length", this.selectedDate.length)
  492. console.log("this.selectedDate", this.selectedDate)
  493. if (this.selectedDate.length > 0) {
  494. this.isCheckTime = true
  495. this.allInfo.isCheckTime = this.isCheckTime
  496. if (this.selectedDate.length == 1) {
  497. this.selectedDateShowText = this.selectedDate[0].date + ''
  498. this.selectedDateShowText = this.selectedDateShowText.replace(/-/g, "/");
  499. this.allInfo.selectedDateShowText = this.selectedDateShowText
  500. } else if (this.selectedDate.length == 2) {
  501. this.selectedDateShowText = this.selectedDate[0].date + "," + this.selectedDate[1].date
  502. this.selectedDateShowText = this.selectedDateShowText.replace(/-/g, "/");
  503. this.allInfo.selectedDateShowText = this.selectedDateShowText
  504. } else if (this.selectedDate.length > 2) {
  505. this.selectedDateShowText = this.selectedDate[0].date + '...' + this.selectedDate[this.selectedDate
  506. .length - 1].date
  507. this.selectedDateShowText = this.selectedDateShowText.replace(/-/g, "/");
  508. this.allInfo.selectedDateShowText = this.selectedDateShowText
  509. }
  510. } else {
  511. this.isCheckTime = false
  512. this.allInfo.isCheckTime = this.isCheckTime
  513. }
  514. },
  515. getCalendarDate() {
  516. let tomorrow = new Date()
  517. tomorrow.setDate(tomorrow.getDate() + 2);
  518. this.startDate = this.formatDate(tomorrow);
  519. let threeMonthsLater = new Date();
  520. threeMonthsLater.setMonth(threeMonthsLater.getMonth() + 3);
  521. this.endDate = this.formatDate(threeMonthsLater);
  522. },
  523. formatDate(date) {
  524. let year = date.getFullYear();
  525. let month = (date.getMonth() + 1).toString().padStart(2, '0');
  526. let day = date.getDate().toString().padStart(2, '0');
  527. return year + '-' + month + '-' + day;
  528. },
  529. getLocationInfo() {
  530. wx.chooseLocation({
  531. type: 'gcj02',
  532. success: (res) => {
  533. this.isCheckLocation = true
  534. this.locationName = res.address
  535. this.locationLongitude = res.longitude
  536. this.locationLatitude = res.latitude
  537. this.locationAddress = res.address
  538. console.log('选择的位置:', res);
  539. this.allInfo.isCheckLocation = true
  540. this.allInfo.locationName = res.address
  541. this.allInfo.locationLongitude = res.longitude
  542. this.allInfo.locationLatitude = res.latitude
  543. this.allInfo.locationAddress = res.address
  544. // 保存位置信息到Vuex
  545. this.$store.commit('setPosition', {
  546. address: res.address,
  547. longitude: res.longitude,
  548. latitude: res.latitude
  549. });
  550. // 获取周边伴宠师
  551. this.getCompanionList();
  552. },
  553. fail: (err) => {
  554. console.error('选择位置失败:', err);
  555. }
  556. });
  557. },
  558. getLocationFirst() {
  559. wx.chooseLocation({
  560. type: 'gcj02',
  561. success: (res) => {
  562. this.isCheckLocation = true
  563. this.locationName = res.address
  564. this.locationLongitude = res.longitude
  565. this.locationLatitude = res.latitude
  566. this.locationAddress = res.address
  567. this.allInfo.isCheckLocation = true
  568. this.allInfo.locationName = res.address
  569. this.allInfo.locationLongitude = res.longitude
  570. this.allInfo.locationLatitude = res.latitude
  571. this.allInfo.locationAddress = res.address
  572. // 保存位置信息到Vuex
  573. this.$store.commit('setPosition', {
  574. address: res.address,
  575. longitude: res.longitude,
  576. latitude: res.latitude
  577. });
  578. // 获取周边伴宠师
  579. this.getCompanionList();
  580. },
  581. fail: (err) => {
  582. console.error('选择位置失败:', err);
  583. }
  584. });
  585. },
  586. getCompanionList() {
  587. // 构建参数,使用当前位置坐标
  588. let data = {
  589. address: this.locationAddress || "上海市浦东新区浦东南路150弄",
  590. latitude: this.locationLatitude || 31.22514,
  591. longitude: this.locationLongitude || 121.49857,
  592. petTypes: ["1", "2"],
  593. staffName: ""
  594. }
  595. console.log('获取周边伴宠师参数:', data);
  596. // 保存当前位置到Vuex,让position mixin能使用
  597. this.$store.commit('setPosition', {
  598. address: this.locationAddress,
  599. longitude: this.locationLongitude,
  600. latitude: this.locationLatitude
  601. });
  602. getTeacherListIndex(data).then(response => {
  603. if (response.code == 200 && response.rows && response.rows.length > 0) {
  604. const nearbyTeacher = response.rows[0];
  605. console.log('伴宠师原始数据:', nearbyTeacher);
  606. // 如果伴宠师有地址信息,使用mixin的calculateDistanceAddress计算距离
  607. let distance = 0;
  608. if (nearbyTeacher.addressList && nearbyTeacher.addressList.length > 0) {
  609. distance = this.calculateDistanceAddress(nearbyTeacher.addressList);
  610. } else if (nearbyTeacher.latitude && nearbyTeacher.longitude) {
  611. // 如果没有地址列表但有经纬度信息,则构造地址对象
  612. const addressList = [{
  613. latitude: nearbyTeacher.latitude,
  614. longitude: nearbyTeacher.longitude
  615. }];
  616. distance = this.calculateDistanceAddress(addressList);
  617. }
  618. // 处理用户图片
  619. let userImageUrl = "";
  620. if (typeof nearbyTeacher.userImage === 'string') {
  621. userImageUrl = nearbyTeacher.userImage;
  622. } else if (nearbyTeacher.userImage && Array.isArray(nearbyTeacher.userImage) && nearbyTeacher.userImage.length > 0) {
  623. userImageUrl = nearbyTeacher.userImage[0].url || "";
  624. }
  625. // 构建伴宠师信息对象
  626. this.defaultCompanion = {
  627. name: nearbyTeacher.userName || '宠小二',
  628. gender: nearbyTeacher.gender || '1', // 性别,1-男,2-女
  629. star: nearbyTeacher.likeNum || 0,
  630. distance: distance.toFixed(1),
  631. shortDescription: nearbyTeacher.shortDescription || '专业伴宠师,用心照顾每一位小宠物',
  632. staffImages: [{
  633. url: userImageUrl || "https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/personal/pet/catdog.png"
  634. }],
  635. year: nearbyTeacher.serviceAge || 1, // 服务年限
  636. record: nearbyTeacher.commentNum || 0, // 评价数
  637. serviceNum: nearbyTeacher.serviceSummaryNum || 0 // 服务小结数
  638. }
  639. console.log('周边伴宠师信息:', this.defaultCompanion);
  640. } else {
  641. console.log('没有找到周边伴宠师或返回数据有误');
  642. }
  643. }).catch(err => {
  644. console.error('获取周边伴宠师失败:', err);
  645. })
  646. },
  647. getOrder(value) {
  648. if (value) {
  649. if (!this.isCheckLocation) {
  650. uni.showToast({
  651. title: '请先选择地址',
  652. duration: 1500,
  653. icon: "none"
  654. })
  655. } else {
  656. this.$store.commit('setPosition', {
  657. address: this.locationAddress,
  658. longitude: this.locationLongitude,
  659. latitude: this.locationLatitude,
  660. date: this.selectedDateShowText
  661. })
  662. uni.navigateTo({
  663. url: `/pages/companionPetList/companionPetList?info=`
  664. + encodeURIComponent(JSON
  665. .stringify(this.allInfo))
  666. });
  667. }
  668. } else {
  669. this.$store.commit('setPosition', {})
  670. this.buyInfo.teacher = null
  671. uni.navigateTo({
  672. url: '/pages/newOrder/serviceNew',
  673. });
  674. }
  675. },
  676. getCoupon() {
  677. // getCouponList().then(res => {
  678. // if (res.code == 200) {
  679. // this.couponList = res.rows
  680. // this.showMask = true
  681. // } else {
  682. // this.$modal.showToast('获取优惠券失败')
  683. // }
  684. // })
  685. },
  686. getCouponListAuth() {
  687. getCouponList().then(res => {
  688. if (res.code == 200) {
  689. this.couponData.push(res.data[0])
  690. console.log("this.couponData", this.couponData)
  691. } else {
  692. this.$modal.showToast('获取优惠券失败')
  693. }
  694. })
  695. },
  696. switchType(type) {
  697. if (type == 'PNORMAL') {
  698. return '满减券'
  699. }
  700. if (type == 'PDISCOUNT') {
  701. return '折扣券'
  702. }
  703. if (type == 'PTRAIL') {
  704. return '体验券'
  705. }
  706. return '优惠券'
  707. },
  708. receiveCoupon(id) {
  709. let data = {
  710. stockId: id
  711. }
  712. receiveCoupon(data).then(res => {
  713. console.log("this.receiveCoupon", res)
  714. if (res.code == 200) {
  715. this.$modal.showToast('优惠券领取成功')
  716. } else {
  717. this.$modal.showToast('领取优惠券失败')
  718. }
  719. })
  720. },
  721. getCouponListNoAuth() {
  722. // console.log('进入 getCouponListNoAuth:');
  723. // getCouponListNoAuth().then(res => {
  724. // if (res.code == 200) {
  725. // if (res.rows && Array.isArray(res.rows)) {
  726. // this.couponData = res.rows.filter(item => item !== null);
  727. // console.log("优惠券数据加载成功:", this.couponData);
  728. // } else if (res.data && Array.isArray(res.data)) {
  729. // this.couponData = res.data.filter(item => item !== null);
  730. // console.log("优惠券数据加载成功:", this.couponData);
  731. // } else {
  732. // console.log("获取优惠券数据格式异常:", res);
  733. // }
  734. // } else {
  735. // this.$modal.showToast('获取优惠券失败')
  736. // }
  737. // }).catch(err => {
  738. // console.error("获取优惠券列表出错:", err);
  739. // })
  740. },
  741. closeMask() {
  742. this.showMask = false
  743. },
  744. getSendCoupon(res) {
  745. let that = this
  746. console.log('res', res)
  747. if (res.detail.errcode == 'OK') {
  748. console.log(222)
  749. if (res.detail.send_coupon_result[0].code == 'SUCCESS') {
  750. that.showMask = false
  751. uni.showToast({
  752. title: '领取成功',
  753. icon: 'success',
  754. duration: 2000,
  755. })
  756. } else {
  757. uni.showModal({
  758. title: '领取失败',
  759. content: res.detail.send_coupon_result[0].message,
  760. showCancel: false,
  761. success: function(res) {
  762. that.showMask = false
  763. }
  764. })
  765. }
  766. } else {
  767. uni.showToast({
  768. title: '领取失败',
  769. icon: 'none'
  770. })
  771. that.showMask = false
  772. }
  773. },
  774. redirectuser() {},
  775. getBanner() {
  776. getBannerList().then(res => {
  777. if (res.code == 200) {
  778. this.bannerList = res.data
  779. } else {
  780. this.$modal.showToast('获取Banner失败')
  781. }
  782. })
  783. },
  784. changeSwiper(e) {
  785. this.current = e.detail.current
  786. },
  787. getPeopleList() {
  788. getStaffList().then(response => {
  789. if (response.code == 200) {
  790. this.peopleList = response.rows
  791. }
  792. console.log(response);
  793. })
  794. },
  795. getProductList() {
  796. getProductList({
  797. "publishStatus": 1,
  798. "categoryId": 76
  799. }).then(response => {
  800. if (response && response.content && response.content.length > 0) {
  801. this.skuData = response.content;
  802. }
  803. console.log(response);
  804. })
  805. },
  806. goDetails(item) {
  807. if (item) {
  808. uni.navigateTo({
  809. url: `/pages/details/detail?id=${item.id}`
  810. });
  811. } else {
  812. this.$modal.showToast('数据有误,请联系管理员')
  813. }
  814. },
  815. init() {
  816. this.$globalData.itemPrice = []
  817. this.$globalData.submitData = {
  818. "phone": "",
  819. "wechatId": "",
  820. "note": "",
  821. "totalPrice": "",
  822. "address": {
  823. "province": "",
  824. "city": "",
  825. "district": "",
  826. "detailAddress": ""
  827. },
  828. "skuList": [],
  829. "service": {
  830. "serviceFrequency": "once_a_day",
  831. "serviceDate": [],
  832. "serviceTimeFirst": "",
  833. "serviceTimeSecond": "",
  834. "pet": []
  835. }
  836. }
  837. },
  838. login() {
  839. uni.login({
  840. provider: 'weixin',
  841. success: (loginRes) => {
  842. console.log("login", loginRes)
  843. this.getOpenId(loginRes.code)
  844. },
  845. fail: function(error) {
  846. uni.showToast('授权失败,请授权后再试')
  847. }
  848. });
  849. },
  850. getOpenId(code) {
  851. getOpenId(code).then(res => {
  852. if (res.code == 200 && res.data) {
  853. let resData = JSON.parse(res.data)
  854. let token = resData.token;
  855. let openId = resData.openId;
  856. setOpenIdKey(openId)
  857. if (token) {
  858. setToken(token)
  859. }
  860. }
  861. })
  862. },
  863. showRulePopup(coupon) {
  864. if (!coupon) {
  865. console.warn('尝试显示空优惠券详情');
  866. return;
  867. }
  868. this.currentCoupon = coupon;
  869. this.$refs.rulePopup.open();
  870. },
  871. closeRulePopup() {
  872. this.$refs.rulePopup.close();
  873. },
  874. getDiscountText(coupon) {
  875. if (!coupon || !coupon.stockType) return '';
  876. if (coupon.stockType === 'PNORMAL') {
  877. return '满100可减10元';
  878. } else if (coupon.stockType === 'PDISCOUNT') {
  879. return '打8折';
  880. } else if (coupon.stockType === 'PTRAIL') {
  881. return '免费体验一次';
  882. }
  883. return '';
  884. },
  885. },
  886. onShow() {
  887. if (!getToken() || !getOpenIdKey()) {
  888. this.login()
  889. }
  890. if(this.$globalData.mainSku.length < 1 || !this.$globalData.mainSku[0].price){
  891. // 获取主产品
  892. this.getProductList()
  893. }
  894. this.currentAddress = this.$globalData.newOrderData.currentAddress
  895. if(this.currentAddress&&this.currentAddress.name){
  896. this.isAddressSelected=true
  897. }
  898. this.currentPets = this.$globalData.newOrderData.currentPets
  899. if(this.currentPets&&this.currentPets.length>0){
  900. this.isPetSelected=true
  901. }
  902. this.needPreFamiliarize = this.$globalData.newOrderData.needPreFamiliarize
  903. // 初始化伴宠师等级
  904. if(this.$globalData.newOrderData.companionLevel) {
  905. this.companionLevel = this.$globalData.newOrderData.companionLevel
  906. }
  907. // 获取周边伴宠师数据
  908. this.getCompanionList();
  909. },
  910. onLoad: function() {
  911. this.init()
  912. this.getPeopleList()
  913. this.getProductList()
  914. this.getBanner()
  915. const accountInfo = wx.getAccountInfoSync();
  916. this.envVersion = accountInfo.miniProgram.envVersion;
  917. if (!getToken() || !getOpenIdKey()) {
  918. this.login()
  919. } else {
  920. this.getCouponListAuth()
  921. }
  922. // 设置默认位置,这样即使用户不选择位置也能显示一些伴宠师
  923. this.$store.commit('setPosition', {
  924. address: "上海市浦东新区浦东南路150弄",
  925. longitude: 121.49857,
  926. latitude: 31.22514
  927. });
  928. }
  929. }
  930. </script>
  931. <style lang="scss">
  932. page {
  933. background-color: #F5F5F7 !important;
  934. }
  935. .home-content {
  936. position: relative;
  937. .swiper {
  938. height: calc(100vw * 1098/1125);
  939. }
  940. .banner {
  941. height: calc(100vw * 1098/1125 + 250px);
  942. background-image: linear-gradient(180deg, #FFBF60 0%, #FFBF60 90%, #F5F5F7 99.41%);
  943. }
  944. .uni-card {
  945. border-radius: 16rpx;
  946. }
  947. .float-button {
  948. position: fixed;
  949. bottom: 150px;
  950. right: 10px;
  951. width: 50px;
  952. height: 50px;
  953. .kf-btn {
  954. background-color: rgba(255, 255, 255, 1);
  955. height: 52px;
  956. width: 52px;
  957. border-radius: 50%;
  958. display: flex;
  959. align-items: center;
  960. }
  961. }
  962. .coupon-list {
  963. width: 100%;
  964. .coupon-title {
  965. display: flex;
  966. line-height: 33rpx;
  967. margin: 42rpx 0 30rpx;
  968. justify-content: space-between;
  969. .coupon-title-left {
  970. display: flex;
  971. align-items: center;
  972. font-weight: 900;
  973. font-size: 30rpx;
  974. color: #333333;
  975. .coupon-flag {
  976. width: 8rpx;
  977. height: 33rpx;
  978. background: #FFBF60;
  979. border-radius: 30rpx 30rpx 30rpx 30rpx;
  980. margin-right: 10rpx;
  981. }
  982. }
  983. .coupon-title-right {
  984. color: #7D8196;
  985. font-size: 24rpx;
  986. font-style: normal;
  987. font-weight: 500;
  988. line-height: 28rpx;
  989. }
  990. }
  991. .split-line {
  992. width: 100%;
  993. height: 1rpx;
  994. background: #EFEFEF;
  995. }
  996. .coupon-content {
  997. .card {
  998. display: flex;
  999. align-items: center;
  1000. width: 100%;
  1001. padding: 10px 0;
  1002. border-radius: 8px 8px 0 0;
  1003. }
  1004. .card-bottom {
  1005. display: flex;
  1006. background-color: #FFF1E0;
  1007. height: 50rpx;
  1008. align-items: center;
  1009. justify-content: space-between;
  1010. padding: 0 20rpx 0 20rpx;
  1011. border-radius: 0 0 8px 8px;
  1012. .card-bottom-text {
  1013. color: #AAAAAA;
  1014. font-size: 24rpx;
  1015. font-weight: 400;
  1016. }
  1017. }
  1018. .card-left {
  1019. width: 88px;
  1020. text-align: center;
  1021. color: #FF530A;
  1022. font-size: 28rpx;
  1023. font-weight: 900;
  1024. }
  1025. .card-center {
  1026. display: flex;
  1027. flex-direction: column;
  1028. .card-center-top {
  1029. width: 40rpx;
  1030. height: 20rpx;
  1031. border-radius: 0 0 20rpx 20rpx;
  1032. background-color: #fff;
  1033. line-height: 20rpx;
  1034. border-bottom: 1px solid #FDA714;
  1035. border-left: 1px solid #FDA714;
  1036. border-right: 1px solid #FDA714;
  1037. margin-top: -22rpx;
  1038. margin-bottom: 20rpx;
  1039. margin-left: -19rpx;
  1040. }
  1041. .card-center-bottom {
  1042. border-right: 1px dashed #AAAAAA;
  1043. width: 1px;
  1044. height: 120rpx;
  1045. }
  1046. }
  1047. .card-right {
  1048. padding: 0 16rpx 0 0;
  1049. display: flex;
  1050. flex: 1;
  1051. justify-content: space-between;
  1052. align-items: center;
  1053. height: 60px;
  1054. font-size: 24rpx;
  1055. .card-content {
  1056. width: 77%;
  1057. }
  1058. .card-icon {
  1059. position: relative;
  1060. right: -10px;
  1061. top: -10px;
  1062. }
  1063. }
  1064. }
  1065. }
  1066. .companion-list {
  1067. width: 100%;
  1068. .companion-title {
  1069. display: flex;
  1070. line-height: 33rpx;
  1071. margin: 42rpx 0 30rpx;
  1072. justify-content: space-between;
  1073. .companion-title-left {
  1074. display: flex;
  1075. align-items: center;
  1076. font-weight: 900;
  1077. font-size: 30rpx;
  1078. color: #333333;
  1079. .companion-flag {
  1080. width: 8rpx;
  1081. height: 33rpx;
  1082. background: #FFBF60;
  1083. border-radius: 30rpx 30rpx 30rpx 30rpx;
  1084. margin-right: 10rpx;
  1085. }
  1086. }
  1087. .companion-title-right {
  1088. color: #7D8196;
  1089. font-size: 24rpx;
  1090. font-style: normal;
  1091. font-weight: 500;
  1092. line-height: 28rpx;
  1093. }
  1094. }
  1095. .split-line {
  1096. width: 100%;
  1097. height: 1rpx;
  1098. background: #EFEFEF;
  1099. }
  1100. .companion-content {
  1101. .companion-item {
  1102. padding: 10px 0px 0px 0;
  1103. .companion-info {
  1104. display: flex;
  1105. align-items: center;
  1106. justify-content: flex-start;
  1107. .companion-img {
  1108. width: 168rpx;
  1109. height: 168rpx;
  1110. border: #FEA714 5rpx solid;
  1111. border-radius: 20rpx;
  1112. }
  1113. .companion-info-1 {
  1114. margin-left: 10px;
  1115. width: 80%;
  1116. .companion-info-2 {
  1117. display: flex;
  1118. flex-wrap: wrap;
  1119. .companion-info-title {
  1120. display: flex;
  1121. flex-wrap: wrap;
  1122. width: 60%;
  1123. }
  1124. .companion-name {
  1125. color: #333;
  1126. font-size: 32rpx;
  1127. margin-right: 10rpx;
  1128. font-weight: 900;
  1129. font-style: normal;
  1130. }
  1131. .companion-info-star {
  1132. color: #FFAA48;
  1133. font-size: 24rpx;
  1134. font-weight: 400;
  1135. line-height: 28rpx;
  1136. display: flex;
  1137. align-items: center;
  1138. }
  1139. }
  1140. .companion-info-3 {
  1141. display: flex;
  1142. align-items: baseline;
  1143. font-size: 28rpx;
  1144. line-height: 32rpx;
  1145. margin-top: 5px;
  1146. color: #FFAA48;
  1147. font-weight: 900;
  1148. }
  1149. .companion-info-4 {
  1150. display: flex;
  1151. align-items: baseline;
  1152. font-size: 24rpx;
  1153. margin-top: 10px;
  1154. color: #7D8196;
  1155. font-weight: 400;
  1156. line-height: 32rpx;
  1157. }
  1158. }
  1159. }
  1160. }
  1161. .companion-item-bottom {
  1162. height: 60rpx;
  1163. background-color: #FFF4E5;
  1164. margin: 20rpx 0 20rpx 0;
  1165. display: flex;
  1166. align-items: center;
  1167. justify-content: center;
  1168. border-radius: 8rpx;
  1169. .companion-item-bottom-text {
  1170. color: #A94F20;
  1171. margin: 14rpx;
  1172. font-size: 24rpx;
  1173. font-weight: 400;
  1174. }
  1175. }
  1176. }
  1177. }
  1178. .history-record {
  1179. width: 100%;
  1180. .history-record-title {
  1181. display: flex;
  1182. line-height: 33rpx;
  1183. margin: 42rpx 0 30rpx;
  1184. justify-content: space-between;
  1185. .history-record-title-left {
  1186. display: flex;
  1187. align-items: center;
  1188. font-weight: 900;
  1189. font-size: 30rpx;
  1190. color: #333333;
  1191. .history-record-flag {
  1192. width: 8rpx;
  1193. height: 33rpx;
  1194. background: #FFBF60;
  1195. border-radius: 30rpx 30rpx 30rpx 30rpx;
  1196. margin-right: 10rpx;
  1197. }
  1198. }
  1199. .history-record-title-right {
  1200. color: #7D8196;
  1201. font-size: 24rpx;
  1202. font-style: normal;
  1203. font-weight: 500;
  1204. line-height: 28rpx;
  1205. }
  1206. }
  1207. .split-line {
  1208. width: 100%;
  1209. height: 1rpx;
  1210. background: #EFEFEF;
  1211. }
  1212. .history-record-content {
  1213. padding: 20rpx 0 20rpx 0;
  1214. .history-record-content-image {
  1215. display: flex;
  1216. flex-wrap: nowrap;
  1217. margin-bottom: 10rpx;
  1218. .history-record-content-image-1 {
  1219. background-image: url("https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/petServiceOrder/catNum.png");
  1220. background-size: cover;
  1221. width: 208rpx;
  1222. height: 260rpx;
  1223. margin-right: 20rpx;
  1224. .history-record-content-image-1-text {
  1225. .history-record-content-image-1-text-1 {
  1226. width: 100%;
  1227. display: flex;
  1228. justify-content: center;
  1229. height: 156rpx;
  1230. align-items: flex-end;
  1231. color: #FF8D00;
  1232. font-size: 32rpx;
  1233. font-weight: 900;
  1234. }
  1235. .history-record-content-image-1-text-2 {
  1236. width: 100%;
  1237. display: flex;
  1238. justify-content: center;
  1239. height: 90rpx;
  1240. align-items: flex-end;
  1241. color: #AAAAAA;
  1242. font-size: 24rpx;
  1243. font-weight: 400;
  1244. }
  1245. }
  1246. }
  1247. .history-record-content-image-2 {
  1248. background-image: url("https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/petServiceOrder/dogNum.png");
  1249. background-size: cover;
  1250. width: 208rpx;
  1251. height: 260rpx;
  1252. margin-right: 20rpx;
  1253. .history-record-content-image-2-text {
  1254. .history-record-content-image-2-text-1 {
  1255. width: 100%;
  1256. display: flex;
  1257. justify-content: center;
  1258. height: 156rpx;
  1259. align-items: flex-end;
  1260. color: #FF8D00;
  1261. font-size: 32rpx;
  1262. font-weight: 900;
  1263. }
  1264. .history-record-content-image-2-text-2 {
  1265. width: 100%;
  1266. display: flex;
  1267. justify-content: center;
  1268. height: 90rpx;
  1269. align-items: flex-end;
  1270. color: #AAAAAA;
  1271. font-size: 24rpx;
  1272. font-weight: 400;
  1273. }
  1274. }
  1275. }
  1276. .history-record-content-image-3 {
  1277. background-image: url("https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/petServiceOrder/goodNum.png");
  1278. background-size: cover;
  1279. width: 208rpx;
  1280. height: 260rpx;
  1281. .history-record-content-image-3-text {
  1282. .history-record-content-image-3-text-1 {
  1283. width: 100%;
  1284. display: flex;
  1285. justify-content: center;
  1286. height: 156rpx;
  1287. align-items: flex-end;
  1288. color: #FF8D00;
  1289. font-size: 32rpx;
  1290. font-weight: 900;
  1291. }
  1292. .history-record-content-image-3-text-2 {
  1293. width: 100%;
  1294. display: flex;
  1295. justify-content: center;
  1296. height: 90rpx;
  1297. align-items: flex-end;
  1298. color: #AAAAAA;
  1299. font-size: 24rpx;
  1300. font-weight: 400;
  1301. }
  1302. }
  1303. }
  1304. }
  1305. .history-record-content-text {
  1306. font-size: 24rpx;
  1307. font-weight: 400;
  1308. color: #A94F20;
  1309. }
  1310. }
  1311. }
  1312. }
  1313. page {
  1314. display: flex;
  1315. flex-direction: column;
  1316. box-sizing: border-box;
  1317. background-color: #fff;
  1318. min-height: 100%;
  1319. height: auto;
  1320. }
  1321. .text {
  1322. text-align: center;
  1323. font-size: 26rpx;
  1324. margin-top: 10rpx;
  1325. }
  1326. .popupBottom {
  1327. height: 950rpx;
  1328. overflow: hidden;
  1329. position: fixed;
  1330. bottom: 0;
  1331. left: 0;
  1332. right: 0;
  1333. padding: 10rpx 20rpx;
  1334. border-radius: 20rpx 20rpx 0 0;
  1335. background-color: #fff;
  1336. .bottom-btn {
  1337. width: 100%;
  1338. border-radius: 120rpx;
  1339. background: #FFB13F;
  1340. font-size: 32rpx;
  1341. color: #FFFFFF;
  1342. }
  1343. }
  1344. .line {
  1345. height: 1px;
  1346. width: 100%;
  1347. margin: 16px 0;
  1348. }
  1349. .swiper-item {
  1350. display: flex;
  1351. flex-direction: column;
  1352. justify-content: center;
  1353. align-items: center;
  1354. color: #fff;
  1355. height: 500rpx;
  1356. line-height: 300rpx;
  1357. }
  1358. .card-container {
  1359. margin: 0;
  1360. padding: 0;
  1361. }
  1362. .title-img1 {
  1363. height: 30px;
  1364. width: 104px;
  1365. background-repeat: no-repeat;
  1366. background-position: left;
  1367. background-size: 104px 30px;
  1368. background-image: url('/static/images/pages/cwfw.png');
  1369. }
  1370. .service-content-img {
  1371. padding: 5px;
  1372. margin-top: 5px;
  1373. border-radius: 8px;
  1374. }
  1375. #myVideo {
  1376. width: 100%;
  1377. border-radius: 5px;
  1378. }
  1379. .service-content {
  1380. width: 100%;
  1381. padding: 0 10px;
  1382. }
  1383. .title-img4 {
  1384. height: 30px;
  1385. width: 202px;
  1386. background-repeat: no-repeat;
  1387. background-position: center;
  1388. background-size: 202px 30px;
  1389. background-image: url('/static/images/pages/jppcs.png');
  1390. margin: 10px 0;
  1391. }
  1392. .demo-uni-row {
  1393. margin: 0;
  1394. padding: 0;
  1395. }
  1396. .people-img {
  1397. width: 190px;
  1398. height: 163px;
  1399. border: #FFBF60 1px solid;
  1400. border-radius: 5px;
  1401. }
  1402. .people-year {
  1403. display: flex;
  1404. width: 68px;
  1405. padding: 1px 4px;
  1406. justify-content: space-between;
  1407. align-items: center;
  1408. border-radius: 0px 10px 10px 0px;
  1409. background: linear-gradient(90deg, #FDA714 0%, #FD8B04 99.41%);
  1410. color: #FFF;
  1411. font-family: PingFang SC;
  1412. font-size: 10px;
  1413. font-style: normal;
  1414. line-height: 14px;
  1415. position: absolute;
  1416. top: 15px;
  1417. left: 0;
  1418. }
  1419. .service-people {
  1420. display: flex;
  1421. }
  1422. .service-people-text {
  1423. display: flex;
  1424. align-items: center;
  1425. line-height: 24px;
  1426. }
  1427. .service-people-text::before {
  1428. content: "";
  1429. background-color: black;
  1430. border-radius: 50%;
  1431. display: inline-block;
  1432. height: 5px;
  1433. width: 5px;
  1434. margin-right: 5px;
  1435. }
  1436. .show-text-1 {
  1437. display: block;
  1438. color: var(--Color-, #222229);
  1439. font-family: PingFang SC;
  1440. font-size: 14px;
  1441. font-style: normal;
  1442. font-weight: 600;
  1443. line-height: 24px;
  1444. }
  1445. .show-text-2 {
  1446. display: block;
  1447. color: var(--Color-, #222229);
  1448. font-family: PingFang SC;
  1449. font-size: 12px;
  1450. font-style: normal;
  1451. line-height: 18px;
  1452. }
  1453. .image-wrapper {
  1454. position: relative;
  1455. }
  1456. .text-wrapper {
  1457. position: absolute;
  1458. bottom: 83px;
  1459. left: 10px;
  1460. color: #fff;
  1461. font-size: 10px;
  1462. font-weight: blod;
  1463. font-family: PingFang SC;
  1464. }
  1465. .coupone_wrap {
  1466. margin-top: 200px;
  1467. }
  1468. .details-subscribe {
  1469. background-color: #FFFFFF;
  1470. padding: 10px;
  1471. width: 100%;
  1472. height: 58px;
  1473. position: fixed;
  1474. bottom: 0;
  1475. z-index: 100;
  1476. .details-btn {
  1477. width: 100%;
  1478. border-radius: 6px;
  1479. background: #FFB13F;
  1480. font-size: 16px;
  1481. color: #FFFFFF;
  1482. }
  1483. }
  1484. .text-button {
  1485. height: 100rpx;
  1486. border-radius: 0px 0px 6rpx 0;
  1487. background: rgba(255, 208, 0, 1);
  1488. font-weight: 500;
  1489. font-size: 36rpx;
  1490. display: flex;
  1491. align-items: center;
  1492. justify-content: center;
  1493. }
  1494. .couponItem {
  1495. width: 100%;
  1496. padding: 0 30rpx;
  1497. margin-top: 24rpx;
  1498. -webkit-overflow-scrolling: touch;
  1499. }
  1500. .couponItem:last-child {
  1501. margin-bottom: 24rpx;
  1502. }
  1503. .mask-coupon {
  1504. background: rgba(0, 0, 0, .5);
  1505. width: 100vw;
  1506. height: 100vh;
  1507. position: fixed;
  1508. left: 0;
  1509. top: 0;
  1510. padding-bottom: 120rpx;
  1511. .wx-coupon {
  1512. background: #F2F2F2;
  1513. min-height: 300px;
  1514. position: fixed;
  1515. bottom: 0;
  1516. left: 0;
  1517. width: 100%;
  1518. }
  1519. .title {
  1520. font-size: 24px;
  1521. display: flex;
  1522. align-items: center;
  1523. justify-content: center;
  1524. padding: 20rpx 0 10rpx;
  1525. }
  1526. .content {
  1527. height: 80%;
  1528. overflow-y: auto;
  1529. }
  1530. .text-button {
  1531. height: 100rpx;
  1532. border-radius: 0px 0px 6rpx 0;
  1533. background: rgba(255, 208, 0, 1);
  1534. font-weight: 500;
  1535. font-size: 36rpx;
  1536. display: flex;
  1537. align-items: center;
  1538. justify-content: center;
  1539. }
  1540. }
  1541. @media screen and (min-width: 500px) {
  1542. .uni-swiper-dot-box {
  1543. width: 400px;
  1544. margin: 0 auto;
  1545. margin-top: 8px;
  1546. }
  1547. .image {
  1548. width: 100%;
  1549. }
  1550. }
  1551. /* 优惠券规则弹窗样式 */
  1552. .rule-popup {
  1553. width: 600rpx;
  1554. background-color: #FFFFFF;
  1555. border-radius: 16rpx;
  1556. overflow: hidden;
  1557. }
  1558. .rule-popup-title {
  1559. height: 100rpx;
  1560. line-height: 100rpx;
  1561. text-align: center;
  1562. font-size: 32rpx;
  1563. font-weight: 600;
  1564. color: #FFFFFF;
  1565. background-color: #FFAA48;
  1566. }
  1567. .rule-popup-content {
  1568. padding: 30rpx;
  1569. }
  1570. .rule-item {
  1571. display: flex;
  1572. margin-bottom: 20rpx;
  1573. }
  1574. .rule-label {
  1575. width: 140rpx;
  1576. font-size: 28rpx;
  1577. color: #666666;
  1578. flex-shrink: 0;
  1579. }
  1580. .rule-value {
  1581. flex: 1;
  1582. font-size: 28rpx;
  1583. color: #333333;
  1584. line-height: 40rpx;
  1585. }
  1586. .rule-popup-close {
  1587. height: 90rpx;
  1588. line-height: 90rpx;
  1589. text-align: center;
  1590. font-size: 30rpx;
  1591. color: #FFAA48;
  1592. border-top: 1px solid #EEEEEE;
  1593. }
  1594. </style>