index.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104
  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. if (e.shareUserId) {
  278. //用户点击分享到好友或者朋友圈传递过来的参数
  279. uni.setStorageSync('shareUserId', e.shareUserId)
  280. }
  281. if (e.q) {
  282. //用户扫技师端或者拓客端二维码传递过来的参数
  283. const q = decodeURIComponent(e.q)
  284. let a = q.split('?')
  285. let b = a[1].split('&')
  286. let param = {} //技师端分享过来的参数
  287. for (let i = 0; i < b.length; i++) {
  288. param[b[i].split('=')[0]] = b[i].split('=')[1]
  289. }
  290. if (param.expandUserId) { //从拓客端进来的用户
  291. console.log('扫拓客端二维码进入小程序')
  292. uni.setStorageSync('expandParam', param)
  293. } else if (param.scene) {
  294. console.log('扫用户的会员码进入小程序')
  295. uni.setStorageSync('shareUserId', param.scene)
  296. } else if (param.techNo) { //从技师端进来的用户
  297. console.log('扫技师二维码进入小程序')
  298. uni.setStorageSync('promotionParam', param)
  299. uni.removeStorageSync('storeParam');
  300. this.operLog()
  301. } else {
  302. //用户扫门店的二维码进入小程序
  303. uni.setStorageSync('storeParam', param)
  304. uni.removeStorageSync('promotionParam');
  305. }
  306. console.log("用户扫技师端或者拓客端二维码传递过来的参数", param)
  307. }
  308. //公告信息
  309. this.getNoticeListData();
  310. // 获取banner图列表
  311. this.getSlideshowList();
  312. // 用户信息
  313. setTimeout(() => {
  314. this.userInfo = uni.getStorageSync('userInfo');
  315. if (this.userInfo.selfPhoto) {
  316. this.getImgUrlByOssId(this.userInfo.selfPhoto);
  317. }
  318. }, 2000)
  319. },
  320. //分享到朋友圈
  321. onShareTimeline(option) {
  322. return {
  323. title: '娇骄儿造型',
  324. imageUrl: '/static/logo.png',
  325. query: `shareUserId='${this.userInfo.id}`,
  326. success(res) {
  327. uni.showToast({
  328. title: '分享成功'
  329. })
  330. },
  331. fail(res) {
  332. uni.showToast({
  333. title: '分享失败',
  334. icon: 'none'
  335. })
  336. }
  337. };
  338. },
  339. //分享到好友
  340. onShareAppMessage: function (res) {
  341. return {
  342. title: '娇骄儿造型',
  343. imageUrl: '/static/logo.png',
  344. path: `/pages/index/index?shareUserId=${this.userInfo.id}`,
  345. success(res) {
  346. uni.showToast({
  347. title: '分享成功'
  348. })
  349. },
  350. fail(res) {
  351. uni.showToast({
  352. title: '分享失败',
  353. icon: 'none'
  354. })
  355. }
  356. };
  357. },
  358. methods: {
  359. operLog() {
  360. let param = uni.getStorageSync('promotionParam')
  361. let userInfo = uni.getStorageSync('userInfo')
  362. const data = {
  363. title: "小程序扫码记录",
  364. operParam: param.techNo,
  365. operName: userInfo.no,
  366. deptName: param.storeId
  367. }
  368. console.log(data)
  369. this.$api.scanLogs(data).then(res =>{
  370. console.log('------日志发送成功---------')
  371. }).catch(errors => {
  372. console.log(errors,'------日志发送失败---------')
  373. })
  374. },
  375. goQrCode() {
  376. uni.navigateTo({
  377. url: '/pages/qrCode/index'
  378. })
  379. },
  380. goActivity() {
  381. uni.navigateTo({
  382. url: '/orderPages/activityList/activityList'
  383. })
  384. },
  385. goRights() {
  386. uni.navigateTo({
  387. url: '/storePages/rights/index'
  388. })
  389. },
  390. // 去服务点单页面
  391. gotoServiceOrder() {
  392. uni.navigateTo({
  393. url: '/orderPages/storeService/index'
  394. })
  395. },
  396. goBookService() {
  397. uni.navigateTo({
  398. url: '/orderPages/bookService/index'
  399. })
  400. },
  401. //点击通知
  402. handleNoticeClick(e) {
  403. console.log(e)
  404. uni.navigateTo({
  405. url: '/storePages/notice/index?noticeId=' + e.noticeId,
  406. })
  407. },
  408. // 去优惠劵大厅
  409. gotoReceiveCoupons() {
  410. uni.navigateTo({
  411. url: '/orderPages/receiveCoupons/index'
  412. })
  413. },
  414. // 去我的优惠劵页面
  415. gotoCoupon() {
  416. uni.navigateTo({
  417. url: '/orderPages/myCoupon/index'
  418. })
  419. },
  420. // 储值服务
  421. gotoRechargeService() {
  422. uni.navigateTo({
  423. url: '/myPages/recharge/index?name=lisa',
  424. })
  425. },
  426. // 获取banner图片
  427. getSlideshowList() {
  428. let that = this;
  429. this.$api.getSlideshowList({
  430. data: this.reqParm
  431. }).then((res) => {
  432. this.getImgUrlByBannerOssId(res.data.data);
  433. })
  434. },
  435. async getImgUrlByBannerOssId(items) {
  436. for (let i = 0; i < items.length; i++) {
  437. if (items[i].slideshowId) {
  438. this.$api.getImage(items[i].slideshowId).then(res => {
  439. this.bannerList.push(res.data.data[0].url.replace(/^http:/, "https:"))
  440. })
  441. }
  442. }
  443. },
  444. // 获取门店列表数据
  445. getStoreListData(data) {
  446. let that = this;
  447. // 用户绑定门店
  448. this.$api.storeList(data).then((res) => {
  449. console.log(res.data.data[0])
  450. that.storeInfo = res.data.data[0]
  451. // 更新用户选择的门店信息
  452. uni.setStorageSync('storeInfo', res.data.data[0])
  453. })
  454. },
  455. getNoticeListData() {
  456. let req = {
  457. auth: true,
  458. noticeType: 2,
  459. status: 0
  460. }
  461. this.$api.noticeList(req).then((res) => {
  462. if (res.data.rows.length === 1) {
  463. this.noticeList.push(res.data.rows[0])
  464. this.noticeList.push(res.data.rows[0])
  465. } else {
  466. this.noticeList = res.data.rows;
  467. }
  468. })
  469. },
  470. getImgUrlByOssId(ossId) {
  471. if (ossId) {
  472. this.$api.getImage(ossId).then(res => {
  473. this.userInfo.selfPhotoUrl = res.data.data[0].url.replace(/^http:/, "https:")
  474. this.$set(this.userInfo)
  475. })
  476. }
  477. },
  478. // 获取经纬度信息f
  479. getLocation() {
  480. let that = this
  481. console.log('+++++++++++++开始获取位置信息++++++++++++++++')
  482. uni.getLocation({
  483. type: 'gcj02',
  484. success: function (res) {
  485. console.log(res)
  486. let latitude = res.latitude; // 纬度
  487. let longitude = res.longitude; // 经度
  488. let speed = res.speed; // 速度
  489. let accuracy = res.accuracy; // 精确度
  490. // 在这里可以对位置信息进行处理
  491. console.log("纬度:" + latitude + ";经度" + longitude)
  492. that.reqParm.latitude = latitude
  493. that.reqParm.longitude = longitude
  494. uni.setStorageSync('location', that.reqParm)
  495. },
  496. fail: function (fail) {
  497. console.log('获取用户地址失败==》', fail)
  498. },
  499. complete: function (complete) {
  500. console.log('获取用户地址失败or成功==》', complete)
  501. if (that.isGetAddress) {
  502. console.log("根据位置获取门店执行了 isGetAddress =>", that.isGetAddress)
  503. that.isGetAddress = !that.isGetAddress
  504. that.getStoreListData(that.reqParm)
  505. }
  506. }
  507. });
  508. },
  509. // 去选择门店
  510. gotoStoreChoose() {
  511. uni.navigateTo({
  512. url: '/storePages/store/store-choose?type=1',
  513. })
  514. },
  515. // 去再来一单
  516. gotoComeOrder() {
  517. uni.$u.route({
  518. url: '/pages/index/tabbar',
  519. params: {
  520. PageCur: 'orderList',
  521. status: '4'
  522. }
  523. })
  524. },
  525. // 去订单页面
  526. gotoOrder() {
  527. uni.setStorageSync('orderListIndex', 1)
  528. uni.switchTab({
  529. url: '/pages/order/index',
  530. })
  531. },
  532. // 去商品下单页面
  533. gotoGoods() {
  534. uni.navigateTo({
  535. url: '/orderPages/bookService/index',
  536. })
  537. },
  538. // 用户绑定门店
  539. userBindStore() {
  540. let that = this;
  541. // 用户绑定门店
  542. this.$api.userBindStore(this.reqParm).then((res) => {
  543. console.log(this.reqParm)
  544. })
  545. },
  546. updateApp() {
  547. const updateManager = uni.getUpdateManager();
  548. updateManager.onCheckForUpdate(function (res) {
  549. // 请求完新版本信息的回调
  550. console.log('++++++++++onCheckForUpdate++++++++++', res.hasUpdate);
  551. if (res.hasUpdate) {
  552. updateManager.onUpdateReady(function (res) {
  553. console.log('+++++++++onUpdateReady+++++++++++++', res)
  554. uni.showModal({
  555. title: '更新提示',
  556. content: '新版本已经准备好,是否重启应用?',
  557. showCancel: false,
  558. success(res) {
  559. if (res.confirm) {
  560. // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
  561. updateManager.applyUpdate();
  562. }
  563. }
  564. });
  565. });
  566. updateManager.onUpdateFailed(function (res) {
  567. // 新的版本下载失败
  568. console.log('+++++++++onUpdateFailed+++++++++++++', res)
  569. uni.showModal({
  570. title: '更新提示',
  571. content: '检测到小程序更新,但是下载失败,请检查网络',
  572. showCancel: false
  573. });
  574. });
  575. }
  576. });
  577. },
  578. }
  579. };
  580. </script>
  581. <style scoped lang="scss">
  582. /* 头部内容 */
  583. .head-wrap {
  584. height: 100vh;
  585. background: #FFE05C;
  586. overflow: auto;
  587. .content-info {
  588. position: relative;
  589. .h-bg {
  590. height: 680rpx;
  591. }
  592. .content {
  593. position: absolute;
  594. top: 460rpx;
  595. left: 24rpx;
  596. right: 24rpx;
  597. border-radius: 12rpx;
  598. padding-bottom: 40rpx;
  599. .h-notice-bar {
  600. padding-left: 20rpx;
  601. background: #FFFFFF;
  602. box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(237, 86, 159, 0.05);
  603. border-radius: 20rpx;
  604. }
  605. .noticeCard {
  606. margin-top: 10rpx;
  607. padding: 10rpx;
  608. background: #FFFFFF;
  609. box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(237, 86, 159, 0.05);
  610. border-radius: 10px;
  611. }
  612. .h-content-wrap {
  613. background: #fff;
  614. border-radius: 10px;
  615. /* 欢迎语 */
  616. .welcome-wrap {
  617. padding-top: 12px;
  618. display: flex;
  619. margin-left: 12px;
  620. margin-right: 12px;
  621. margin-top: 16px;
  622. align-items: center;
  623. .logo {
  624. width: 13%;
  625. image {
  626. border-radius: 18px;
  627. width: 36px;
  628. height: 36px;
  629. }
  630. }
  631. .text {
  632. width: 60%;
  633. font-size: 14px;
  634. .welcome-wrap {
  635. font-size: 12px;
  636. color: #999999;
  637. }
  638. .welcome {
  639. font-size: 12px;
  640. color: #999999;
  641. }
  642. }
  643. .arrow-right {
  644. width: 30%;
  645. text-align: center;
  646. cursor: pointer;
  647. display: flex;
  648. justify-content: center;
  649. background: #fff8db;
  650. // background: red;
  651. height: 32px;
  652. align-items: center;
  653. border-radius: 16px;
  654. .qrcode {
  655. height: 20px;
  656. width: 20px;
  657. }
  658. .h-text {
  659. font-size: 12px;
  660. color: #999999;
  661. }
  662. .coupon-wrap {
  663. display: flex;
  664. font-size: 14px;
  665. align-items: center;
  666. }
  667. }
  668. }
  669. /* 钱包信息 */
  670. .balance-info {
  671. font-size: 12px;
  672. padding-left: 12px;
  673. margin-bottom: 16px;
  674. margin-top: 12px;
  675. color: #666;
  676. display: flex;
  677. justify-content: space-around;
  678. text-align: center;
  679. .balance-amount {
  680. padding-right: 4px;
  681. }
  682. .score-info {
  683. padding-right: 4px;
  684. }
  685. .coupon-info {
  686. padding-right: 4px;
  687. }
  688. .e-currency-info {
  689. padding-right: 4px;
  690. }
  691. .number {
  692. color: #333333;
  693. font-size: 14px;
  694. }
  695. }
  696. /* 商店信息 */
  697. .store-wrap {
  698. margin: 10px;
  699. .store-info {
  700. display: flex;
  701. .logo {
  702. width: 10%;
  703. text-align: center;
  704. display: flex;
  705. justify-content: center;
  706. align-items: center;
  707. image {
  708. width: 30px;
  709. height: 30px;
  710. }
  711. }
  712. .store-content {
  713. width: 90%;
  714. padding-bottom: 13px;
  715. .h-row {
  716. display: flex;
  717. align-items: center;
  718. justify-content: space-between;
  719. .store-desc {
  720. width: 90%;
  721. display: flex;
  722. line-height: 30px;
  723. font-size: 14px;
  724. .store-name {
  725. }
  726. }
  727. .arrow-right {
  728. text-align: right;
  729. margin: 0 auto;
  730. cursor: pointer;
  731. padding-top: 3px;
  732. width: 100px;
  733. display: flex;
  734. font-size: 14px;
  735. .change-store {
  736. text-align: right;
  737. color: #666;
  738. }
  739. image {
  740. width: 18px;
  741. height: 18px;
  742. }
  743. }
  744. .address {
  745. width: 400rpx;
  746. color: #999999;
  747. font-size: 12px;
  748. padding-right: 12px;
  749. }
  750. .address1 {
  751. color: #999999;
  752. font-size: 12px;
  753. padding-right: 12px;
  754. }
  755. }
  756. }
  757. }
  758. .adress {
  759. font-size: 22rpx;
  760. white-space: nowrap;
  761. overflow: hidden;
  762. text-overflow: ellipsis;
  763. padding-left: 80rpx;
  764. color: #666;
  765. }
  766. }
  767. }
  768. }
  769. }
  770. }
  771. /* 上次订单 */
  772. .nav-wrap {
  773. background: #fff;
  774. border-radius: 8px;
  775. margin-top: 16px;
  776. .upper-order-wrap {
  777. display: flex;
  778. border-radius: 6px;
  779. justify-content: center;
  780. .left-content {
  781. margin-top: 20px;
  782. width: 50%;
  783. font-size: 12px;
  784. text-align: center;
  785. border-radius: 10px;
  786. .title {
  787. font-size: 18px;
  788. text-align: center;
  789. }
  790. .desc {
  791. padding-top: 6px;
  792. color: #999999;
  793. }
  794. .bg-img {
  795. text-align: center;
  796. height: 100px;
  797. display: flex;
  798. justify-content: center;
  799. align-items: center;
  800. image {
  801. width: 78px;
  802. height: 78px;
  803. }
  804. }
  805. }
  806. .right-content {
  807. margin-top: 20px;
  808. width: 50%;
  809. font-size: 12px;
  810. text-align: center;
  811. .title {
  812. font-size: 18px;
  813. text-align: center;
  814. }
  815. .desc {
  816. padding-top: 6px;
  817. color: #999999;
  818. }
  819. .bg-img {
  820. height: 100px;
  821. text-align: center;
  822. display: flex;
  823. justify-content: center;
  824. align-items: center;
  825. image {
  826. width: 78px;
  827. height: 78px;
  828. }
  829. }
  830. }
  831. }
  832. .menu-tab {
  833. display: flex;
  834. justify-content: space-around; // 平均分布
  835. justify-content: center;
  836. padding-bottom: 8px;
  837. .button-wrap {
  838. flex: 1;
  839. display: flex;
  840. align-items: center;
  841. justify-content: center;
  842. margin-top: 16px;
  843. margin-bottom: 18px;
  844. .name {
  845. padding-top: 3px;
  846. font-size: 12px;
  847. color: #666666;
  848. }
  849. .btn {
  850. padding-left: 12px;
  851. padding-right: 12px;
  852. height: 36px;
  853. border-radius: 18px;
  854. .icon {
  855. display: flex;
  856. padding-right: 6px;
  857. align-items: center;
  858. justify-content: center;
  859. image {
  860. height: 14px;
  861. width: 14px;
  862. }
  863. }
  864. }
  865. }
  866. }
  867. }
  868. /* 为你推荐 */
  869. .recommend-wrap {
  870. margin-top: 16px;
  871. background: #fff;
  872. border-radius: 8px;
  873. .recommend-nav {
  874. display: flex;
  875. margin-left: 12px;
  876. padding-top: 8px;
  877. padding-bottom: 4px;
  878. align-items: center;
  879. .icon {
  880. padding-right: 4px;
  881. image {
  882. height: 26px;
  883. width: 26px;
  884. }
  885. }
  886. .title {
  887. font-size: 16px;
  888. }
  889. }
  890. /* 门店列表 */
  891. .store-wrap {
  892. margin: 12px;
  893. height: 100px;
  894. .store-list {
  895. margin-top: 16px;
  896. .store-content {
  897. display: flex;
  898. .store-img {
  899. width: 30%;
  900. image {
  901. width: 100%;
  902. height: 78px;
  903. border-radius: 6px;
  904. }
  905. }
  906. .h-store-content {
  907. width: 70%;
  908. padding-left: 8px;
  909. padding-top: 4px;
  910. .title {
  911. font-size: 18px;
  912. font-family: "黑体", sans-serif;
  913. }
  914. .adress {
  915. font-size: 28rpx;
  916. line-height: 36rpx;
  917. -webkit-box-orient: vertical;
  918. -webkit-line-clamp: 1;
  919. white-space: nowrap;
  920. overflow: hidden;
  921. text-overflow: ellipsis;
  922. color: #666;
  923. }
  924. .price {
  925. color: #666;
  926. width: 60%;
  927. font-size: 14px;
  928. line-height: 22px;
  929. .red {
  930. color: red;
  931. font-size: 16px;
  932. }
  933. }
  934. .desc {
  935. display: flex;
  936. padding-top: 3px;
  937. .price {
  938. width: 60%;
  939. font-size: 14px;
  940. line-height: 22px;
  941. }
  942. .order-btn {
  943. width: 100%;
  944. .btn {
  945. background: #FFE05C;
  946. text-align: center;
  947. border-radius: 14px;
  948. height: 26px;
  949. line-height: 26px;
  950. color: #333;
  951. font-size: 12px;
  952. }
  953. }
  954. }
  955. }
  956. }
  957. }
  958. }
  959. }
  960. /* 底部 */
  961. .footer {
  962. margin-top: 30px;
  963. height: 60px;
  964. font-size: 12px;
  965. text-align: center;
  966. color: #666;
  967. margin-bottom: 40px;
  968. background-color: #FFE05C;
  969. }
  970. .tabBarView {
  971. position: fixed;
  972. bottom: 0;
  973. }
  974. </style>