myHome.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. <!-- 参考模板 -->
  2. <template>
  3. <s-layout class="homepage-wrap ss-w-100 box-sizing" title="我的" navbar="haha"
  4. tabbar="/pages/XDHome/myHome/myHome">
  5. <view class="body" :style="'padding-top:' + bottomHeight">
  6. <view class="bg-box">
  7. <view class="top-title-box">
  8. 我的
  9. </view>
  10. <text style="color: #fff;" class="textIcon icon-shezhi icon-navigation dw-box" @click="jumpCollection"></text>
  11. <!-- 用户头像 -->
  12. <view class="ss-flex-2 ss-col-center user-info-box">
  13. <view style="width: 80rpx; height: 80rpx;" @tap="sheep.$router.go('/pages/user/info')">
  14. <image class="wh" style="border-radius:40rpx;" referrerpolicy="no-referrer"
  15. src="/static/lanhu_shouye/pserz4p1s8x8wkob1c0bat390gscqet6q2w9869d84a-bcd7-4f8a-a669-dda68333c1f2.png" />
  16. </view>
  17. <view style="margin-left:10rpx;font-size: 24rpx;">
  18. 用户:202409115263541
  19. </view>
  20. <view class="ss-flex-1"></view>
  21. <view style="font-size: 24rpx;margin-right: 10rpx;" @click="jumpGroup">邀请码绑定</view>
  22. <text style="color: #fff;margin-right: 15rpx;"
  23. class="textIcon icon-saomajihuo icon-navigation"></text>
  24. </view>
  25. </view>
  26. <view class="user-box">
  27. <view class="ss-flex-2 ss-col-center">
  28. <view style="font-size:30rpx;color:#474E55;font-weight: 650;" @click="jumpWallet">
  29. 账户余额
  30. </view>
  31. <view style="font-size:20rpx;color:#4D535C;margin-left: 30rpx;">温馨提示:点击可查看嘀咚余额明细</view>
  32. <view class="ss-flex-1"></view>
  33. <text style="color: red;font-size: 40rpx;"
  34. class="textIcon icon-wodeyouhuiquan icon-navigation"></text>
  35. <view style="font-size:25rpx;color:#4D535C;margin-left: 10rpx;" @click="jumpYouh">优惠券</view>
  36. </view>
  37. <view class="ss-flex-2 ss-col-center">
  38. <view style="font-size: 60rpx;color: #3D444E;font-weight: 650;" @click="jumpWallet">0.00</view>
  39. <view class="ss-flex-1"></view>
  40. <view style="font-size: 60rpx;color: #3D444E;font-weight: 650;" @click="jumpYouh">8</view>
  41. </view>
  42. <!-- 进行绝对定位 -->
  43. <view class='bottom-box'>
  44. <view class="ss-flex-2 ss-col-center">
  45. <text style="color: #333;font-size: 35rpx;" class="textIcon icon-qianbao icon-navigation"
  46. @click="jumpWallet"></text>
  47. <view style="font-size: 24rpx;" @click="jumpWallet">钱包</view>
  48. <view class="ss-flex-1"></view>
  49. <view style="font-size: 23rpx;" @click="jumpGroup">劵码兑换</view>
  50. <text style="color: #333;font-size: 30rpx;font-weight: 650;"
  51. class="textIcon icon-gengduo icon-navigation"></text>
  52. <view style="font-size: 23rpx;margin-left: 30rpx;" @click="jumpManey">去充值</view>
  53. <text style="color: #333;font-size: 30rpx;font-weight: 650;"
  54. class="textIcon icon-gengduo icon-navigation"></text>
  55. </view>
  56. </view>
  57. </view>
  58. <view style="width: 100%;height:20rpx;"></view>
  59. <!-- 进行滚动 -->
  60. <view class="list-wrap">
  61. <scroll-view scroll-y="true" class="list">
  62. <view class="ss-flex-2 ss-col-center ss-row-between public-box" style="margin-top: 20rpx;">
  63. <view class="ss-flex-2 ss-col-center ss-row-center" style="flex-wrap: wrap;"
  64. @click="jumpCollect">
  65. <text style="color: #5FC3D1;font-size: 36rpx;font-weight: 650;"
  66. class="textIcon icon-shoucang2 icon-navigation"></text>
  67. <view style="width: 100%;text-align: center;font-size: 22rpx;margin-top: 5rpx;">我的收藏</view>
  68. </view>
  69. <view class="ss-flex-2 ss-col-center ss-row-center" style="flex-wrap: wrap;" @click="jumpYouh">
  70. <text style="color: #5FC3D1;font-size: 36rpx;font-weight: 650;"
  71. class="textIcon icon-jigouyouhuibao icon-navigation"></text>
  72. <view style="width: 100%;text-align: center;font-size: 22rpx;margin-top: 5rpx;">优惠包</view>
  73. </view>
  74. <view class="ss-flex-2 ss-col-center ss-row-center" style="flex-wrap: wrap;">
  75. <text style="color: #5FC3D1;font-size: 36rpx;font-weight: 650;"
  76. class="textIcon icon-yingxiaotuiguang icon-navigation"></text>
  77. <view style="width: 100%;text-align: center;font-size: 22rpx;margin-top: 5rpx;">营销推广</view>
  78. </view>
  79. <view class="ss-flex-2 ss-col-center ss-row-center" style="flex-wrap: wrap;">
  80. <text style="color: #5FC3D1;font-size: 36rpx;font-weight: 650;"
  81. class="textIcon icon-kefu icon-navigation"></text>
  82. <view style="width: 100%;text-align: center;font-size: 22rpx;margin-top: 5rpx;">嘀咚客服</view>
  83. </view>
  84. </view>
  85. <!-- 会员 -->
  86. <view class="member-box ss-flex-2 ss-col-center">
  87. <text style="color: #fff;font-size: 38rpx;font-weight: 650;"
  88. class="textIcon icon-huiyuan icon-navigation"></text>
  89. <view style="font-size: 30rpx;color:#fff;margin-left: 5rpx;font-weight: 650;">嘀咚会员</view>
  90. <view class="meassage-box">点亮会员仅享尊贵特权</view>
  91. <view class="ss-flex-1"></view>
  92. <view class="obstacles-box" @click="jumpObstacles">立即开通</view>
  93. </view>
  94. <!-- 我的订单 -->
  95. <view class="my-order-box">
  96. <view class="ss-flex-2 ss-col-center">
  97. <view style="font-size: 28rpx;color: #283240;">我的订单</view>
  98. <view class="ss-flex-1"></view>
  99. <view style="font-size: 24rpx;color: #283240;" @click="jumpOrderInfo">全部订单</view>
  100. <text style="color: #333;font-size: 32rpx;font-weight: 650;"
  101. class="textIcon icon-gengduo icon-navigation"></text>
  102. </view>
  103. <view class="ss-flex-2 ss-col-center ss-row-between public-box" style="margin-top: 20rpx;">
  104. <view class="ss-flex-2 ss-col-center ss-row-center" style="flex-wrap: wrap;"
  105. @click="jumpOrderInfo">
  106. <text style="color: #5FC3D1;font-size: 50rpx;font-weight: 650;"
  107. class="textIcon icon-dingdandaifukuan icon-navigation"></text>
  108. <view style="width: 100%;text-align: center;font-size: 22rpx;margin-top: 5rpx;">待付款
  109. </view>
  110. </view>
  111. <view class="ss-flex-2 ss-col-center ss-row-center" style="flex-wrap: wrap;"
  112. @click="jumpOrderInfo">
  113. <text style="color: #5FC3D1;font-size: 50rpx;font-weight: 650;"
  114. class="textIcon icon-jinhangzhong1 icon-navigation"></text>
  115. <view style="width: 100%;text-align: center;font-size: 22rpx;margin-top: 5rpx;">进行中
  116. </view>
  117. </view>
  118. <view class="ss-flex-2 ss-col-center ss-row-center" style="flex-wrap: wrap;"
  119. @click="jumpOrderInfo">
  120. <text style="color: #5FC3D1;font-size: 50rpx;font-weight: 650;"
  121. class="textIcon icon-daipingjiadingdan icon-navigation"></text>
  122. <view style="width: 100%;text-align: center;font-size: 22rpx;margin-top: 5rpx;">待评价
  123. </view>
  124. </view>
  125. <view class="ss-flex-2 ss-col-center ss-row-center" style="flex-wrap: wrap;"
  126. @click="jumpOrderInfo">
  127. <text style="color: #5FC3D1;font-size: 50rpx;font-weight: 650;"
  128. class="textIcon icon-shouhoutuikuan icon-navigation"></text>
  129. <view style="width: 100%;text-align: center;font-size: 22rpx;margin-top: 5rpx;">退款/取消
  130. </view>
  131. </view>
  132. </view>
  133. </view>
  134. <!-- 众多功能 -->
  135. <view class="numerous-box ss-flex-2 ss-col-center ss-row-left" style="flex-wrap: wrap;">
  136. <view class="ss-flex-2 ss-col-center ss-row-center"
  137. style="flex-wrap: wrap;margin-top: 20rpx;margin-left: 10rpx;" v-for="item in numerousData"
  138. :key="item.text" @click="jumpAllFeat(item)">
  139. <text style="color: #555;font-size: 40rpx;" class="textIcon icon-navigation"
  140. :class="item.icon"></text>
  141. <view style="width: 100%;text-align: center;font-size: 22rpx;margin-top: 5rpx;">
  142. {{item.text}}</view>
  143. </view>
  144. </view>
  145. <view class="ss-flex-2 ss-col-center" style="margin-top: 20rpx;margin-bottom: 20rpx;">
  146. <view class="ss-flex-1"></view>
  147. <text class="textIcon icon-shoucang" style="font-size: 22rpx;color: #666666;"></text>
  148. <text class="textIcon icon-shoucang" style="font-size: 25rpx;color: #666666;"></text>
  149. <text class="textIcon icon-shoucang" style="font-size: 28rpx;color: #666666;"></text>
  150. <view style="margin-left: 10rpx; color: #444; font-size: 30rpx;margin-right: 10rpx;">热门推荐</view>
  151. <text class="textIcon icon-shoucang" style="font-size: 28rpx;color: #666666;"></text>
  152. <text class="textIcon icon-shoucang" style="font-size: 25rpx;color: #666666;"></text>
  153. <text class="textIcon icon-shoucang" style="font-size: 22rpx;color: #666666;"></text>
  154. <view class="ss-flex-1"></view>
  155. </view>
  156. <!-- 使用瀑布流布局 -->
  157. <view class="content-test">
  158. <view @click="gopreview(item.id)" style="padding-bottom: 30rpx">
  159. <view class="list-test" v-for="(item, index) in swiperList" :key="item.id">
  160. <view style="height: 310rpx" class="box-sizing">
  161. <image @click="jumpTechnicianDetails" class="wh" referrerpolicy="no-referrer"
  162. src="/static/lanhu_shouye/psq752p4oxrur1kwz38o9hz2uugu327v8c905774083-1ff9-40d7-8687-01c969b1461d.png" />
  163. </view>
  164. <view class="ss-flex ss-flex-nowrap box-sizing" style="height: 40rpx; margin-top: 15rpx">
  165. <view style="font-size: 24rpx"> 王琳sf谁 </view>
  166. <view class="ss-flex-1"></view>
  167. <view class="ss-flex-2 ss-col-center">
  168. <text class="textIcon icon-shoucang" style="font-size: 22rpx;color: #009FE8;"></text>
  169. <view style="margin-left: 5rpx; color: #444; font-size: 24rpx">4.9</view>
  170. </view>
  171. <view class="ss-flex-2 ss-col-center" style="margin-left: 20rpx;">
  172. <text class="textIcon icon-ditu" style="font-size: 22rpx;color: #009FE8;"></text>
  173. <view style="margin-left: 5rpx; color: #444; font-size: 24rpx">1.25km</view>
  174. </view>
  175. </view>
  176. </view>
  177. </view>
  178. </view>
  179. </scroll-view>
  180. </view>
  181. </view>
  182. </s-layout>
  183. </template>
  184. <script setup>
  185. import {
  186. reactive,
  187. ref
  188. } from 'vue';
  189. import {
  190. computed
  191. } from 'vue';
  192. import {
  193. onLoad,
  194. onPageScroll,
  195. onPullDownRefresh,
  196. onReady,
  197. onReachBottom,
  198. onShow,
  199. } from '@dcloudio/uni-app';
  200. import sheep from '@/sheep';
  201. import $share from '@/sheep/platform/share';
  202. // 隐藏原生tabBar
  203. uni.hideTabBar();
  204. const swiperList = ref(['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']);
  205. const jumpAllFeat=async(item)=>{
  206. if(item.text=='签到中心'){
  207. jumpSign()
  208. }else if(item.text=='渠道合作'){
  209. jumpCooperation()
  210. }
  211. else{
  212. jumpSetting()
  213. }
  214. }
  215. //跳转到招聘合作
  216. const jumpCooperation=async()=>{
  217. uni.navigateTo({
  218. url:'/pages/XDHome/myFeat/Cooperation/Cooperation'
  219. })
  220. }
  221. // 跳转到签到
  222. const jumpSign=async()=>{
  223. uni.navigateTo({
  224. url:'/pages/XDHome/myFeat/signPage/signPage'
  225. })
  226. }
  227. // 去充值
  228. const jumpManey = async () => {
  229. uni.navigateTo({
  230. url: '/pages/XDHome/myFeat/memberRecharge/memberRecharge',
  231. });
  232. }
  233. const jumpTechnicianDetails = async () => {
  234. uni.navigateTo({
  235. url: '/pages/XDHome/technician/technicianDetails/technicianDetails',
  236. });
  237. }
  238. //跳转到设置页面
  239. const jumpCollection=async()=>{
  240. uni.navigateTo({
  241. url: '/pages/XDHome/technician/collectionSettings/collectionSettings',
  242. });
  243. }
  244. // 开通嘀咚会员
  245. const jumpObstacles = async () => {
  246. uni.navigateTo({
  247. url: '/pages/XDHome/technician/memberPage/memberPage',
  248. });
  249. }
  250. // 跳转到钱包
  251. const jumpWallet = async () => {
  252. uni.navigateTo({
  253. url: '/pages/XDHome/myFeat/wallet/wallet',
  254. });
  255. }
  256. // 跳转到优惠劵
  257. const jumpYouh = async () => {
  258. uni.navigateTo({
  259. url: '/pages/XDHome/myFeat/discountCoupons/discountCoupons',
  260. });
  261. }
  262. //跳转到设置
  263. const jumpSetting = async () => {
  264. uni.navigateTo({
  265. url: '/pages/public/setting',
  266. });
  267. }
  268. // 跳转到劵码核销
  269. const jumpGroup = async () => {
  270. uni.navigateTo({
  271. url: '/pages/XDHome/myFeat/groupBuyingCoupons/groupBuyingCoupons',
  272. });
  273. }
  274. //我的收藏
  275. const jumpCollect = async () => {
  276. uni.navigateTo({
  277. url: '/pages/XDHome/myFeat/collect/collect',
  278. });
  279. }
  280. // 返回首页
  281. const backPage = async () => {
  282. uni.reLaunch({
  283. url: '/pages/XDHome/homePage/homePage',
  284. });
  285. };
  286. const numerousData = ref([{
  287. icon: 'icon-qiandaozhongxin-copy-copy',
  288. text: '签到中心'
  289. },
  290. {
  291. icon: 'icon-icon_fuwu_huiyuanquanyi',
  292. text: '会员权益'
  293. },
  294. {
  295. icon: 'icon-tuiguangtuandui',
  296. text: '我的团队'
  297. },
  298. {
  299. icon: 'icon-channel',
  300. text: '渠道合作'
  301. },
  302. {
  303. icon: 'icon-saomajihuo',
  304. text: '扫码激活'
  305. },
  306. {
  307. icon: 'icon-bangzhuzhongxin',
  308. text: '帮助中心'
  309. },
  310. {
  311. icon: 'icon-youhuifuli',
  312. text: '优惠福利'
  313. },
  314. {
  315. icon: 'icon-fenxiangzhuanqian-copy',
  316. text: '分享赚钱'
  317. },
  318. {
  319. icon: 'icon-jianyifankui-',
  320. text: '建议反馈'
  321. },
  322. {
  323. icon: 'icon-yongjinxiangqing-X',
  324. text: '佣金详情'
  325. },
  326. {
  327. icon: 'icon-guanyuwomen',
  328. text: '关于我们'
  329. }
  330. ])
  331. const jumpOrderInfo = async () => {
  332. uni.reLaunch({
  333. url: '/pages/XDHome/orderInfoList/orderInfoList',
  334. });
  335. }
  336. const bottomHeight = ref('0rpx');
  337. // #ifdef APP-PlUS
  338. //获取顶部安全距离
  339. const app = uni.getSystemInfoSync();
  340. const bottomHeightOne = app.statusBarHeight + 'rpx';
  341. bottomHeight.value = bottomHeightOne
  342. // #endif
  343. </script>
  344. <style scoped lang="scss">
  345. .list-wrap-two {
  346. flex-grow: 1;
  347. position: relative;
  348. }
  349. .list-two {
  350. position: absolute;
  351. top: 0;
  352. left: 0;
  353. right: 0;
  354. bottom: 0;
  355. }
  356. .list-test {
  357. break-inside: avoid;
  358. width: 100%;
  359. border-radius: 20rpx;
  360. box-sizing: border-box;
  361. margin-bottom: 20rpx;
  362. }
  363. .con-test {
  364. color: #8b8d8c;
  365. overflow: hidden;
  366. /*超出部分隐藏*/
  367. white-space: nowrap;
  368. /*禁止换行*/
  369. text-overflow: ellipsis;
  370. margin-left: 15rpx;
  371. margin-right: 15rpx;
  372. font-size: 26rpx;
  373. }
  374. .title-test {
  375. margin-left: 15rpx;
  376. margin-right: 15rpx;
  377. font-size: 26rpx;
  378. color: #8b8d8c;
  379. overflow: hidden;
  380. /*超出部分隐藏*/
  381. white-space: nowrap;
  382. /*禁止换行*/
  383. text-overflow: ellipsis;
  384. }
  385. /* 内容区 */
  386. .content-test {
  387. width: 100%;
  388. padding: 10rpx;
  389. box-sizing: border-box;
  390. column-count: 2;
  391. }
  392. // 滚动========
  393. .numerous-box {
  394. width: 100%;
  395. box-sizing: border-box;
  396. padding: 10rpx;
  397. }
  398. .my-order-box {
  399. width: 95%;
  400. margin-left: 2.5%;
  401. box-sizing: border-box;
  402. padding: 10rpx 20rpx;
  403. border-radius: 10rpx;
  404. background-color: #fff;
  405. margin-top: 20rpx;
  406. box-shadow: 5rpx 5rpx 5rpx rgba(0, 0, 0, 0.2);
  407. }
  408. .obstacles-box {
  409. padding: 5rpx 30rpx;
  410. background-color: #fff;
  411. color: #4BB7CE;
  412. border-radius: 20rpx;
  413. }
  414. .meassage-box {
  415. font-size: 20rpx;
  416. color: #EAF8FC;
  417. margin-left: 15rpx;
  418. font-weight: 650;
  419. padding-top: 10rpx;
  420. box-sizing: border-box;
  421. }
  422. .member-box {
  423. width: 95%;
  424. margin-left: 2.5%;
  425. box-sizing: border-box;
  426. padding: 25rpx 35rpx;
  427. background: linear-gradient(to right, #009FE8, #5FC3D1);
  428. border-radius: 15rpx;
  429. margin-top: 20rpx;
  430. }
  431. .bottom-box {
  432. position: absolute;
  433. bottom: 0;
  434. left: 20rpx;
  435. right: 10rpx;
  436. padding: 10rpx 0rpx;
  437. }
  438. .user-box {
  439. position: relative;
  440. width: 95%;
  441. min-height: 220rpx;
  442. margin-left: 2.5%;
  443. background-color: #fff;
  444. border-radius: 10rpx;
  445. box-shadow: 5rpx 5rpx 5rpx rgba(0, 0, 0, 0.2);
  446. box-sizing: border-box;
  447. margin-top: -140rpx;
  448. padding: 10rpx 20rpx;
  449. }
  450. .user-info-box {
  451. color: #fff;
  452. width: 95%;
  453. margin-left: 2.5%;
  454. box-sizing: border-box;
  455. padding: 10rpx 10rpx 10rpx 20rpx;
  456. margin-top: 20rpx;
  457. }
  458. .dw-box {
  459. position: absolute;
  460. top: 23rpx;
  461. right: 30rpx;
  462. }
  463. .top-title-box {
  464. width: 100%;
  465. text-align: center;
  466. font-size: 30rpx;
  467. color: #fff;
  468. padding: 20rpx;
  469. }
  470. .bg-box {
  471. position: relative;
  472. height: 350rpx;
  473. background: url('@/static/top-bg.png') no-repeat;
  474. background-size: 100% 100%;
  475. box-sizing: border-box;
  476. }
  477. .icon-navigation {
  478. font-size: 32rpx;
  479. color: #3D444E;
  480. font-weight: 700;
  481. }
  482. // 上中下布局样式
  483. .body {
  484. display: flex;
  485. flex-direction: column;
  486. background-color: #EEEEF0;
  487. height: calc(100vh - 50px);
  488. box-sizing: border-box;
  489. }
  490. .head {
  491. text-align: center;
  492. }
  493. // 中部滚动
  494. .list-wrap {
  495. flex-grow: 1;
  496. position: relative;
  497. width: 100%;
  498. box-sizing: border-box;
  499. }
  500. .list {
  501. position: absolute;
  502. top: 0;
  503. left: 0;
  504. right: 0;
  505. bottom: 10rpx;
  506. border-radius: 15rpx;
  507. box-sizing: border-box;
  508. }
  509. .list-scroll-view {
  510. width: 100%;
  511. margin-bottom: 20rpx;
  512. box-sizing: border-box;
  513. }
  514. .course-card {
  515. width: 47vw;
  516. margin-top: 10px;
  517. margin-bottom: 10px;
  518. }
  519. // 底部
  520. .tools {
  521. display: flex;
  522. flex-direction: row;
  523. justify-content: space-between;
  524. }
  525. .tools-item {
  526. width: 45px;
  527. text-align: center;
  528. font-size: 14px;
  529. padding: 20px;
  530. }
  531. </style>