index.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110
  1. <template>
  2. <view class="content-wrap bg-color">
  3. <view class="head-wrap">
  4. <view class="content-info ">
  5. <view class="h-bg">
  6. <!-- 轮播图 -->
  7. <u-swiper :circular="true" :list="bannerList" :height="340"></u-swiper>
  8. </view>
  9. <view class="content">
  10. <!-- 通知栏 -->
  11. <view v-if="noticeList.length > 0" class="h-notice-bar">
  12. <scroll-notice :dataList="noticeList" :type="2" :interval="3000" :height="46" :fontSize="12"
  13. color="#666666" @click="handleNoticeClick"></scroll-notice>
  14. </view>
  15. <!-- 个人信息、钱包、商店 -->
  16. <view class="h-content-wrap">
  17. <!-- 欢迎语 -->
  18. <view class="welcome-wrap">
  19. <view class="logo">
  20. <image :src="userInfo.selfPhotoUrl || '/static/me/ud4.png'" mode=""></image>
  21. </view>
  22. <view class="text">
  23. <view class="phone">{{ userInfo.ncikName || '' }}</view>
  24. <!-- <view class="welcome">尊敬的{{ userInfo.ncikName || ''}},下午好~</view>-->
  25. </view>
  26. <view @click="goQrCode" class="arrow-right">
  27. <!-- <image v-if="userInfo.wxQrCode" class="qrcode" :src="userInfo.qrcode" mode=""></image> -->
  28. <!-- <image class="qrcode" src="../../static/index/qrcode.png" mode=""></image>
  29. <view class="h-text">会员码</view> -->
  30. <view class="coupon-wrap">
  31. <u-icon name="/static/me/u5.png" color="#ffb83d" size="22"></u-icon>
  32. <text>会员码</text>
  33. </view>
  34. </view>
  35. </view>
  36. <!-- 余额信息 -->
  37. <!-- <view class="balance-info">-->
  38. <!-- <view @click="gotoRechargeService()" class="balance-amount">-->
  39. <!-- <text class="number" v-if="userInfo.balance">¥{{ userInfo.balance }}</text>-->
  40. <!-- <text class="number" v-else>¥0.00</text>-->
  41. <!-- <view class="">余额</view>-->
  42. <!-- </view>-->
  43. <!-- <view class="score-info">-->
  44. <!-- <text class="number" v-if="userInfo.integral">{{ userInfo.integral }}</text>-->
  45. <!-- <text class="number" v-else>0</text>-->
  46. <!-- <view class="">积分</view>-->
  47. <!-- </view>-->
  48. <!-- <view @click="gotoCoupon()" class="coupon-info">-->
  49. <!-- <text class="number" v-if="userInfo.coupon">{{ userInfo.coupon }}</text>-->
  50. <!-- <text class="number" v-else>0</text>-->
  51. <!-- <view class="">优惠券</view>-->
  52. <!-- </view>-->
  53. <!-- <view class="e-currency-info">-->
  54. <!-- <text class="number" v-if="userInfo.electronicCurrency">{{ userInfo.electronicCurrency }}</text>-->
  55. <!-- <text class="number" v-else>0</text>-->
  56. <!-- <view class="">电子币</view>-->
  57. <!-- </view>-->
  58. <!-- </view>-->
  59. <view class="custom-line"></view>
  60. <view class="store-wrap">
  61. <view class="store-info">
  62. <view class="logo">
  63. <image src="../../static/index/u55.png" mode=""></image>
  64. </view>
  65. <view @click="gotoStoreChoose()" class="store-content">
  66. <view class="h-row">
  67. <view class="store-desc">
  68. <view class="store-name">
  69. <view class="">{{ storeInfo.storeName }}</view>
  70. </view>
  71. </view>
  72. <view class="arrow-right">
  73. <view class="change-store">更换门店</view>
  74. <u-icon name="arrow-right" color="#333" size="16"></u-icon>
  75. </view>
  76. </view>
  77. <view class="h-row">
  78. <text class="address">地址:{{ storeInfo.address }}</text>
  79. <text class="address1">{{ storeInfo.distanceDesc }}</text>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. </view>
  85. <!-- 上次订单 -->
  86. <view class="nav-wrap ">
  87. <view class="upper-order-wrap">
  88. <!-- 左边内容 -->
  89. <view @click="gotoServiceOrder()" class="left-content">
  90. <view class="title">
  91. 当日排队
  92. </view>
  93. <view class="desc">
  94. <!-- 多种服务模式任您选择-->
  95. </view>
  96. <view class="bg-img">
  97. <image src="../../static/index/2.png" mode=""></image>
  98. </view>
  99. </view>
  100. <!-- 右边内容 -->
  101. <view class="right-content" @click="goBookService()">
  102. <view class="title">
  103. 明日预约
  104. </view>
  105. <view class="desc">
  106. <!-- 拼命研发中敬请期待...-->
  107. </view>
  108. <view class="bg-img">
  109. <image src="../../static/index/1.png" mode=""></image>
  110. </view>
  111. </view>
  112. </view>
  113. <!-- 导航菜单 -->
  114. <view class="horizontal-dashed-line"></view>
  115. <view class="menu-tab">
  116. <!-- <view class="button-wrap">-->
  117. <!-- <view @click="gotoComeOrder()" class="btn">-->
  118. <!-- <view class="icon">-->
  119. <!-- <u-icon name="/static/index/u213.png" color="red" size="30"></u-icon>-->
  120. <!-- </view>-->
  121. <!-- <view class="name">-->
  122. <!-- 再来一单-->
  123. <!-- </view>-->
  124. <!-- </view>-->
  125. <!-- </view>-->
  126. <view class="button-wrap">
  127. <view @click="gotoRechargeService()" class="btn">
  128. <view class="icon">
  129. <u-icon name="/static/index/u215.png" color="red" size="30"></u-icon>
  130. </view>
  131. <view class="name">
  132. 储值服务
  133. </view>
  134. </view>
  135. </view>
  136. <!-- <view class="button-wrap">-->
  137. <!-- <view @click="gotoOrder()" class="btn">-->
  138. <!-- <view class="icon">-->
  139. <!-- <u-icon name="/static/index/u217.png" color="red" size="30"></u-icon>-->
  140. <!-- </view>-->
  141. <!-- <view class="name">-->
  142. <!-- 当前订单-->
  143. <!-- </view>-->
  144. <!-- </view>-->
  145. <!-- </view>-->
  146. <view class="button-wrap">
  147. <view @click="gotoReceiveCoupons()" class="btn">
  148. <view class="icon">
  149. <u-icon name="/static/index/u247.png" color="red" size="30"></u-icon>
  150. </view>
  151. <view class="name">
  152. 领券中心
  153. </view>
  154. </view>
  155. </view>
  156. <view class="button-wrap">
  157. <view @click="goRights()" class="btn">
  158. <view class="icon">
  159. <u-icon name="/static/index/equity_card.png" color="red" size="30"></u-icon>
  160. </view>
  161. <view class="name">
  162. 权益卡
  163. </view>
  164. </view>
  165. </view>
  166. <view class="button-wrap">
  167. <view @click="goActivity()" class="btn">
  168. <view class="icon">
  169. <u-icon name="/static/index/huodong.png" color="red" size="30"></u-icon>
  170. </view>
  171. <view class="name">
  172. 活动中心
  173. </view>
  174. </view>
  175. </view>
  176. </view>
  177. </view>
  178. <!-- 为你推荐 -->
  179. <!-- <view class="recommend-wrap">-->
  180. <!-- <view class="recommend-nav">-->
  181. <!-- <view class="icon">-->
  182. <!-- <image src="/static/index/u87.png" mode=""></image>-->
  183. <!-- </view>-->
  184. <!-- <view class="title">-->
  185. <!-- 为你推荐-->
  186. <!-- </view>-->
  187. <!-- </view>-->
  188. <!-- &lt;!&ndash; 分割线 &ndash;&gt;-->
  189. <!-- <view class="custom-line"></view>-->
  190. <!-- &lt;!&ndash; 门店列表 &ndash;&gt;-->
  191. <!-- <view class="store-wrap ">-->
  192. <!-- <view class="store-list">-->
  193. <!-- <view class="store-content">-->
  194. <!-- <view class="store-img">-->
  195. <!-- <image src="../../static/logo.png" mode=""></image>-->
  196. <!-- </view>-->
  197. <!-- <view class="h-store-content">-->
  198. <!-- <view class="title">-->
  199. <!-- <text>{{ storeInfo.storeName }}</text>-->
  200. <!-- </view>-->
  201. <!-- <view class="adress">-->
  202. <!-- 地址:{{ storeInfo.address }}-->
  203. <!-- </view>-->
  204. <!-- <view class="desc">-->
  205. <!-- <view class="price">-->
  206. <!-- </view>-->
  207. <!-- <view @click="gotoGoods()" class="order-btn">-->
  208. <!-- <view class="btn">去下单</view>-->
  209. <!-- </view>-->
  210. <!-- </view>-->
  211. <!-- </view>-->
  212. <!-- </view>-->
  213. <!-- </view>-->
  214. <!-- </view>-->
  215. <!-- </view>-->
  216. <!-- <view class="footer ">-->
  217. <!-- <view class="">-&#45;&#45;到底了-&#45;&#45;</view>-->
  218. <!-- </view>-->
  219. </view>
  220. </view>
  221. </view>
  222. <!-- <view class="tabBarView">-->
  223. <!-- <tab-bar :tabIndex="tabIndex"></tab-bar>-->
  224. <!-- </view>-->
  225. </view>
  226. </template>
  227. <script>
  228. import tabBar from "../../components/tabBar/tabBar";
  229. import ScrollNotice from '../../components/scroll-notice/ScrollNotice.vue';
  230. export default {
  231. components: {
  232. ScrollNotice,
  233. tabBar
  234. },
  235. data() {
  236. return {
  237. isGetAddress: true, //是否获取到了经纬度
  238. noticeList: [],
  239. notice: '',
  240. userInfo: {},
  241. bannerList: [],
  242. reqParm: {
  243. auth: true,
  244. appid: 46,
  245. telphone: '',
  246. latitude: 26.5737,
  247. longitude: 106.7135,
  248. },
  249. storeList: [],
  250. storeInfo: {},
  251. };
  252. },
  253. onShow() {
  254. this.updateApp()
  255. this.userInfo = uni.getStorageSync('userInfo');
  256. if (this.userInfo.selfPhoto) {
  257. this.getImgUrlByOssId(this.userInfo.selfPhoto);
  258. }
  259. // 查询门店信息
  260. const data = uni.getStorageSync('storeInfo');
  261. if (!data) {
  262. setTimeout(e => {
  263. console.log('定时器要执行了 isGetAddress =>', this.isGetAddress)
  264. if (this.isGetAddress) {
  265. console.log('定时器执行了isGetAddress =>', this.isGetAddress)
  266. this.isGetAddress = !this.isGetAddress
  267. this.getStoreListData(this.reqParm)
  268. }
  269. }, 3000)
  270. // 获取位置信息查询门店列表数据
  271. this.getLocation();
  272. } else {
  273. this.storeInfo = data;
  274. }
  275. },
  276. onLoad(e) {
  277. console.log(e)
  278. if (e.shareUserId) {
  279. //用户点击分享到好友或者朋友圈传递过来的参数
  280. uni.setStorageSync('shareUserId', e.shareUserId)
  281. }
  282. if (e.q) {
  283. //用户扫技师端或者拓客端二维码传递过来的参数
  284. const q = decodeURIComponent(e.q)
  285. let a = q.split('?')
  286. let b = a[1].split('&')
  287. let param = {} //技师端分享过来的参数
  288. for (let i = 0; i < b.length; i++) {
  289. param[b[i].split('=')[0]] = b[i].split('=')[1]
  290. }
  291. if (param.expandUserId) { //从拓客端进来的用户
  292. console.log('扫拓客端二维码进入小程序')
  293. uni.setStorageSync('expandParam', param)
  294. } else if (param.scene) {
  295. console.log('扫用户的会员码进入小程序')
  296. uni.setStorageSync('shareUserId', param.scene)
  297. } else if (param.techNo) { //从技师端进来的用户
  298. console.log('扫技师二维码进入小程序')
  299. uni.setStorageSync('promotionParam', param)
  300. uni.removeStorageSync('storeParam');
  301. this.operLog()
  302. } else {
  303. //用户扫门店的二维码进入小程序
  304. uni.setStorageSync('storeParam', param)
  305. uni.removeStorageSync('promotionParam');
  306. }
  307. console.log("用户扫技师端或者拓客端二维码传递过来的参数", param)
  308. }
  309. //公告信息
  310. this.getNoticeListData();
  311. // 获取banner图列表
  312. this.getSlideshowList();
  313. // 用户信息
  314. setTimeout(() => {
  315. this.userInfo = uni.getStorageSync('userInfo');
  316. if (this.userInfo.selfPhoto) {
  317. this.getImgUrlByOssId(this.userInfo.selfPhoto);
  318. }
  319. }, 2000)
  320. },
  321. //分享到朋友圈
  322. onShareTimeline(option) {
  323. return {
  324. title: '娇骄儿造型',
  325. imageUrl: '/static/logo.png',
  326. query: `shareUserId='${this.userInfo.id}`,
  327. success(res) {
  328. uni.showToast({
  329. title: '分享成功'
  330. })
  331. },
  332. fail(res) {
  333. uni.showToast({
  334. title: '分享失败',
  335. icon: 'none'
  336. })
  337. }
  338. };
  339. },
  340. //分享到好友
  341. onShareAppMessage: function (res) {
  342. return {
  343. title: '娇骄儿造型',
  344. imageUrl: '/static/logo.png',
  345. path: `/pages/index/index?shareUserId=${this.userInfo.id}`,
  346. success(res) {
  347. uni.showToast({
  348. title: '分享成功'
  349. })
  350. },
  351. fail(res) {
  352. uni.showToast({
  353. title: '分享失败',
  354. icon: 'none'
  355. })
  356. }
  357. };
  358. },
  359. methods: {
  360. operLog() {
  361. let param = uni.getStorageSync('promotionParam')
  362. let userInfo = uni.getStorageSync('userInfo')
  363. // #ifdef MP-WEIXIN
  364. const accountInfo = wx.getAccountInfoSync();
  365. console.log(accountInfo.miniProgram.version, '小程序版本号')
  366. // #endif
  367. const data = {
  368. title: "小程序扫码记录",
  369. operParam: param.techNo,
  370. operName: userInfo.no,
  371. deptName: param.storeId,
  372. errorMsg: accountInfo.miniProgram.version
  373. }
  374. console.log(data)
  375. this.$api.scanLogs(data).then(res => {
  376. console.log('------日志发送成功---------')
  377. }).catch(errors => {
  378. console.log(errors, '------日志发送失败---------')
  379. })
  380. },
  381. goQrCode() {
  382. uni.navigateTo({
  383. url: '/pages/qrCode/index'
  384. })
  385. },
  386. goActivity() {
  387. uni.navigateTo({
  388. url: '/orderPages/activityList/activityList'
  389. })
  390. },
  391. goRights() {
  392. uni.navigateTo({
  393. url: '/storePages/rights/index'
  394. })
  395. },
  396. // 去服务点单页面
  397. gotoServiceOrder() {
  398. uni.navigateTo({
  399. url: '/orderPages/storeService/index'
  400. })
  401. },
  402. goBookService() {
  403. uni.navigateTo({
  404. url: '/orderPages/bookService/index'
  405. })
  406. },
  407. //点击通知
  408. handleNoticeClick(e) {
  409. console.log(e)
  410. uni.navigateTo({
  411. url: '/storePages/notice/index?noticeId=' + e.noticeId,
  412. })
  413. },
  414. // 去优惠劵大厅
  415. gotoReceiveCoupons() {
  416. uni.navigateTo({
  417. url: '/orderPages/receiveCoupons/index'
  418. })
  419. },
  420. // 去我的优惠劵页面
  421. gotoCoupon() {
  422. uni.navigateTo({
  423. url: '/orderPages/myCoupon/index'
  424. })
  425. },
  426. // 储值服务
  427. gotoRechargeService() {
  428. uni.navigateTo({
  429. url: '/myPages/recharge/index?name=lisa',
  430. })
  431. },
  432. // 获取banner图片
  433. getSlideshowList() {
  434. let that = this;
  435. this.$api.getSlideshowList({
  436. data: this.reqParm
  437. }).then((res) => {
  438. this.getImgUrlByBannerOssId(res.data.data);
  439. })
  440. },
  441. async getImgUrlByBannerOssId(items) {
  442. for (let i = 0; i < items.length; i++) {
  443. if (items[i].slideshowId) {
  444. this.$api.getImage(items[i].slideshowId).then(res => {
  445. this.bannerList.push(res.data.data[0].url.replace(/^http:/, "https:"))
  446. })
  447. }
  448. }
  449. },
  450. // 获取门店列表数据
  451. getStoreListData(data) {
  452. let that = this;
  453. // 用户绑定门店
  454. this.$api.storeList(data).then((res) => {
  455. console.log(res.data.data[0])
  456. that.storeInfo = res.data.data[0]
  457. // 更新用户选择的门店信息
  458. uni.setStorageSync('storeInfo', res.data.data[0])
  459. })
  460. },
  461. getNoticeListData() {
  462. let req = {
  463. auth: true,
  464. noticeType: 2,
  465. status: 0
  466. }
  467. this.$api.noticeList(req).then((res) => {
  468. if (res.data.rows.length === 1) {
  469. this.noticeList.push(res.data.rows[0])
  470. this.noticeList.push(res.data.rows[0])
  471. } else {
  472. this.noticeList = res.data.rows;
  473. }
  474. })
  475. },
  476. getImgUrlByOssId(ossId) {
  477. if (ossId) {
  478. this.$api.getImage(ossId).then(res => {
  479. this.userInfo.selfPhotoUrl = res.data.data[0].url.replace(/^http:/, "https:")
  480. this.$set(this.userInfo)
  481. })
  482. }
  483. },
  484. // 获取经纬度信息f
  485. getLocation() {
  486. let that = this
  487. console.log('+++++++++++++开始获取位置信息++++++++++++++++')
  488. uni.getLocation({
  489. type: 'gcj02',
  490. success: function (res) {
  491. console.log(res)
  492. let latitude = res.latitude; // 纬度
  493. let longitude = res.longitude; // 经度
  494. let speed = res.speed; // 速度
  495. let accuracy = res.accuracy; // 精确度
  496. // 在这里可以对位置信息进行处理
  497. console.log("纬度:" + latitude + ";经度" + longitude)
  498. that.reqParm.latitude = latitude
  499. that.reqParm.longitude = longitude
  500. uni.setStorageSync('location', that.reqParm)
  501. },
  502. fail: function (fail) {
  503. console.log('获取用户地址失败==》', fail)
  504. },
  505. complete: function (complete) {
  506. console.log('获取用户地址失败or成功==》', complete)
  507. if (that.isGetAddress) {
  508. console.log("根据位置获取门店执行了 isGetAddress =>", that.isGetAddress)
  509. that.isGetAddress = !that.isGetAddress
  510. that.getStoreListData(that.reqParm)
  511. }
  512. }
  513. });
  514. },
  515. // 去选择门店
  516. gotoStoreChoose() {
  517. uni.navigateTo({
  518. url: '/storePages/store/store-choose?type=1',
  519. })
  520. },
  521. // 去再来一单
  522. gotoComeOrder() {
  523. uni.$u.route({
  524. url: '/pages/index/tabbar',
  525. params: {
  526. PageCur: 'orderList',
  527. status: '4'
  528. }
  529. })
  530. },
  531. // 去订单页面
  532. gotoOrder() {
  533. uni.setStorageSync('orderListIndex', 1)
  534. uni.switchTab({
  535. url: '/pages/order/index',
  536. })
  537. },
  538. // 去商品下单页面
  539. gotoGoods() {
  540. uni.navigateTo({
  541. url: '/orderPages/bookService/index',
  542. })
  543. },
  544. // 用户绑定门店
  545. userBindStore() {
  546. let that = this;
  547. // 用户绑定门店
  548. this.$api.userBindStore(this.reqParm).then((res) => {
  549. console.log(this.reqParm)
  550. })
  551. },
  552. updateApp() {
  553. const updateManager = uni.getUpdateManager();
  554. updateManager.onCheckForUpdate(function (res) {
  555. // 请求完新版本信息的回调
  556. console.log('++++++++++onCheckForUpdate++++++++++', res.hasUpdate);
  557. if (res.hasUpdate) {
  558. updateManager.onUpdateReady(function (res) {
  559. console.log('+++++++++onUpdateReady+++++++++++++', res)
  560. uni.showModal({
  561. title: '更新提示',
  562. content: '新版本已经准备好,是否重启应用?',
  563. showCancel: false,
  564. success(res) {
  565. if (res.confirm) {
  566. // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
  567. updateManager.applyUpdate();
  568. }
  569. }
  570. });
  571. });
  572. updateManager.onUpdateFailed(function (res) {
  573. // 新的版本下载失败
  574. console.log('+++++++++onUpdateFailed+++++++++++++', res)
  575. uni.showModal({
  576. title: '更新提示',
  577. content: '检测到小程序更新,但是下载失败,请检查网络',
  578. showCancel: false
  579. });
  580. });
  581. }
  582. });
  583. },
  584. }
  585. };
  586. </script>
  587. <style scoped lang="scss">
  588. /* 头部内容 */
  589. .head-wrap {
  590. height: 100vh;
  591. background: #FFE05C;
  592. overflow: auto;
  593. .content-info {
  594. position: relative;
  595. .h-bg {
  596. height: 680rpx;
  597. }
  598. .content {
  599. position: absolute;
  600. top: 460rpx;
  601. left: 24rpx;
  602. right: 24rpx;
  603. border-radius: 12rpx;
  604. padding-bottom: 40rpx;
  605. .h-notice-bar {
  606. padding-left: 20rpx;
  607. background: #FFFFFF;
  608. box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(237, 86, 159, 0.05);
  609. border-radius: 20rpx;
  610. }
  611. .noticeCard {
  612. margin-top: 10rpx;
  613. padding: 10rpx;
  614. background: #FFFFFF;
  615. box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(237, 86, 159, 0.05);
  616. border-radius: 10px;
  617. }
  618. .h-content-wrap {
  619. background: #fff;
  620. border-radius: 10px;
  621. /* 欢迎语 */
  622. .welcome-wrap {
  623. padding-top: 12px;
  624. display: flex;
  625. margin-left: 12px;
  626. margin-right: 12px;
  627. margin-top: 16px;
  628. align-items: center;
  629. .logo {
  630. width: 13%;
  631. image {
  632. border-radius: 18px;
  633. width: 36px;
  634. height: 36px;
  635. }
  636. }
  637. .text {
  638. width: 60%;
  639. font-size: 14px;
  640. .welcome-wrap {
  641. font-size: 12px;
  642. color: #999999;
  643. }
  644. .welcome {
  645. font-size: 12px;
  646. color: #999999;
  647. }
  648. }
  649. .arrow-right {
  650. width: 30%;
  651. text-align: center;
  652. cursor: pointer;
  653. display: flex;
  654. justify-content: center;
  655. background: #fff8db;
  656. // background: red;
  657. height: 32px;
  658. align-items: center;
  659. border-radius: 16px;
  660. .qrcode {
  661. height: 20px;
  662. width: 20px;
  663. }
  664. .h-text {
  665. font-size: 12px;
  666. color: #999999;
  667. }
  668. .coupon-wrap {
  669. display: flex;
  670. font-size: 14px;
  671. align-items: center;
  672. }
  673. }
  674. }
  675. /* 钱包信息 */
  676. .balance-info {
  677. font-size: 12px;
  678. padding-left: 12px;
  679. margin-bottom: 16px;
  680. margin-top: 12px;
  681. color: #666;
  682. display: flex;
  683. justify-content: space-around;
  684. text-align: center;
  685. .balance-amount {
  686. padding-right: 4px;
  687. }
  688. .score-info {
  689. padding-right: 4px;
  690. }
  691. .coupon-info {
  692. padding-right: 4px;
  693. }
  694. .e-currency-info {
  695. padding-right: 4px;
  696. }
  697. .number {
  698. color: #333333;
  699. font-size: 14px;
  700. }
  701. }
  702. /* 商店信息 */
  703. .store-wrap {
  704. margin: 10px;
  705. .store-info {
  706. display: flex;
  707. .logo {
  708. width: 10%;
  709. text-align: center;
  710. display: flex;
  711. justify-content: center;
  712. align-items: center;
  713. image {
  714. width: 30px;
  715. height: 30px;
  716. }
  717. }
  718. .store-content {
  719. width: 90%;
  720. padding-bottom: 13px;
  721. .h-row {
  722. display: flex;
  723. align-items: center;
  724. justify-content: space-between;
  725. .store-desc {
  726. width: 90%;
  727. display: flex;
  728. line-height: 30px;
  729. font-size: 14px;
  730. .store-name {
  731. }
  732. }
  733. .arrow-right {
  734. text-align: right;
  735. margin: 0 auto;
  736. cursor: pointer;
  737. padding-top: 3px;
  738. width: 100px;
  739. display: flex;
  740. font-size: 14px;
  741. .change-store {
  742. text-align: right;
  743. color: #666;
  744. }
  745. image {
  746. width: 18px;
  747. height: 18px;
  748. }
  749. }
  750. .address {
  751. width: 400rpx;
  752. color: #999999;
  753. font-size: 12px;
  754. padding-right: 12px;
  755. }
  756. .address1 {
  757. color: #999999;
  758. font-size: 12px;
  759. padding-right: 12px;
  760. }
  761. }
  762. }
  763. }
  764. .adress {
  765. font-size: 22rpx;
  766. white-space: nowrap;
  767. overflow: hidden;
  768. text-overflow: ellipsis;
  769. padding-left: 80rpx;
  770. color: #666;
  771. }
  772. }
  773. }
  774. }
  775. }
  776. }
  777. /* 上次订单 */
  778. .nav-wrap {
  779. background: #fff;
  780. border-radius: 8px;
  781. margin-top: 16px;
  782. .upper-order-wrap {
  783. display: flex;
  784. border-radius: 6px;
  785. justify-content: center;
  786. .left-content {
  787. margin-top: 20px;
  788. width: 50%;
  789. font-size: 12px;
  790. text-align: center;
  791. border-radius: 10px;
  792. .title {
  793. font-size: 18px;
  794. text-align: center;
  795. }
  796. .desc {
  797. padding-top: 6px;
  798. color: #999999;
  799. }
  800. .bg-img {
  801. text-align: center;
  802. height: 100px;
  803. display: flex;
  804. justify-content: center;
  805. align-items: center;
  806. image {
  807. width: 78px;
  808. height: 78px;
  809. }
  810. }
  811. }
  812. .right-content {
  813. margin-top: 20px;
  814. width: 50%;
  815. font-size: 12px;
  816. text-align: center;
  817. .title {
  818. font-size: 18px;
  819. text-align: center;
  820. }
  821. .desc {
  822. padding-top: 6px;
  823. color: #999999;
  824. }
  825. .bg-img {
  826. height: 100px;
  827. text-align: center;
  828. display: flex;
  829. justify-content: center;
  830. align-items: center;
  831. image {
  832. width: 78px;
  833. height: 78px;
  834. }
  835. }
  836. }
  837. }
  838. .menu-tab {
  839. display: flex;
  840. justify-content: space-around; // 平均分布
  841. justify-content: center;
  842. padding-bottom: 8px;
  843. .button-wrap {
  844. flex: 1;
  845. display: flex;
  846. align-items: center;
  847. justify-content: center;
  848. margin-top: 16px;
  849. margin-bottom: 18px;
  850. .name {
  851. padding-top: 3px;
  852. font-size: 12px;
  853. color: #666666;
  854. }
  855. .btn {
  856. padding-left: 12px;
  857. padding-right: 12px;
  858. height: 36px;
  859. border-radius: 18px;
  860. .icon {
  861. display: flex;
  862. padding-right: 6px;
  863. align-items: center;
  864. justify-content: center;
  865. image {
  866. height: 14px;
  867. width: 14px;
  868. }
  869. }
  870. }
  871. }
  872. }
  873. }
  874. /* 为你推荐 */
  875. .recommend-wrap {
  876. margin-top: 16px;
  877. background: #fff;
  878. border-radius: 8px;
  879. .recommend-nav {
  880. display: flex;
  881. margin-left: 12px;
  882. padding-top: 8px;
  883. padding-bottom: 4px;
  884. align-items: center;
  885. .icon {
  886. padding-right: 4px;
  887. image {
  888. height: 26px;
  889. width: 26px;
  890. }
  891. }
  892. .title {
  893. font-size: 16px;
  894. }
  895. }
  896. /* 门店列表 */
  897. .store-wrap {
  898. margin: 12px;
  899. height: 100px;
  900. .store-list {
  901. margin-top: 16px;
  902. .store-content {
  903. display: flex;
  904. .store-img {
  905. width: 30%;
  906. image {
  907. width: 100%;
  908. height: 78px;
  909. border-radius: 6px;
  910. }
  911. }
  912. .h-store-content {
  913. width: 70%;
  914. padding-left: 8px;
  915. padding-top: 4px;
  916. .title {
  917. font-size: 18px;
  918. font-family: "黑体", sans-serif;
  919. }
  920. .adress {
  921. font-size: 28rpx;
  922. line-height: 36rpx;
  923. -webkit-box-orient: vertical;
  924. -webkit-line-clamp: 1;
  925. white-space: nowrap;
  926. overflow: hidden;
  927. text-overflow: ellipsis;
  928. color: #666;
  929. }
  930. .price {
  931. color: #666;
  932. width: 60%;
  933. font-size: 14px;
  934. line-height: 22px;
  935. .red {
  936. color: red;
  937. font-size: 16px;
  938. }
  939. }
  940. .desc {
  941. display: flex;
  942. padding-top: 3px;
  943. .price {
  944. width: 60%;
  945. font-size: 14px;
  946. line-height: 22px;
  947. }
  948. .order-btn {
  949. width: 100%;
  950. .btn {
  951. background: #FFE05C;
  952. text-align: center;
  953. border-radius: 14px;
  954. height: 26px;
  955. line-height: 26px;
  956. color: #333;
  957. font-size: 12px;
  958. }
  959. }
  960. }
  961. }
  962. }
  963. }
  964. }
  965. }
  966. /* 底部 */
  967. .footer {
  968. margin-top: 30px;
  969. height: 60px;
  970. font-size: 12px;
  971. text-align: center;
  972. color: #666;
  973. margin-bottom: 40px;
  974. background-color: #FFE05C;
  975. }
  976. .tabBarView {
  977. position: fixed;
  978. bottom: 0;
  979. }
  980. </style>