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.

1631 lines
42 KiB

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