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.

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