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.

1606 lines
41 KiB

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