index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. <template>
  2. <view class="my-box flex-common-css">
  3. <!-- <Nav title=" " :leftShow='false' titleColor="#333" bgckgroundBox='transparent'></Nav> -->
  4. <image class="bg-box" src="@/static/img/my/bg.png" mode=""></image>
  5. <view class="user-box align-items-center" @click="goToUrl(0)">
  6. <view class="user-img-box mr-24">
  7. <image v-if="userInfoData.head_img" class="user-img b-rad-50" :src="userInfoData.head_img"
  8. mode="aspectFill">
  9. </image>
  10. <image v-else class="user-img b-rad-50" src="@/static/img/my/user-img.png" mode=""></image>
  11. <image class="set-iimg" src="@/static/img/my/pen.png" mode=""></image>
  12. </view>
  13. <view class="user-name text-overflow-ellipsis-one fs-34">
  14. {{ userInfoData.nickname }}
  15. </view>
  16. </view>
  17. <view class="function-one-box box-border-box">
  18. <view class="function-one b-rad-20 bgc-f box-border-box mb-24 align-items-center flex-justify-space">
  19. <view class="my-function-box flex-direction align-items-center" @click="goToUrl(1)">
  20. <image class="my-img" src="@/static/img/my/wdkq.png" mode=""></image>
  21. <view class="fs-26">
  22. 我的卡券
  23. </view>
  24. </view>
  25. <view class="my-function-box flex-direction align-items-center" @click="goToUrl(2)">
  26. <image class="my-img" src="@/static/img/my/wdfb.png" mode=""></image>
  27. <view class="fs-26">
  28. 我的发布
  29. </view>
  30. </view>
  31. <view class="my-function-box flex-direction align-items-center" @click="goToUrl(3)">
  32. <image class="my-img" src="@/static/img/my/wdpj.png" mode=""></image>
  33. <view class="fs-26">
  34. 我的评价
  35. </view>
  36. </view>
  37. <view class="my-function-box flex-direction align-items-center" @click="goToUrl(4)">
  38. <image class="my-img" src="@/static/img/my/dzgl.png" mode=""></image>
  39. <view class="fs-26">
  40. 地址管理
  41. </view>
  42. </view>
  43. </view>
  44. <view class="align-items-center mb-24">
  45. <view class="b-rad-20 bgc-f flex-1 mr-18 tdgl-box p-32 box-border-box" @click="goToUrl(13)">
  46. <view class="align-items-center mb-8">
  47. <view class="fs-32 fw-600 fc-3 mr-10">
  48. 团队管理
  49. </view>
  50. <image class="icons" src="@/static/img/toRight.png" mode=""></image>
  51. </view>
  52. <view class="fs-26 fc-6">
  53. 共{{userInfoData.clan_count || 0}}人
  54. </view>
  55. <image class="rdgl" src="@/static/img/my/tdgl.png" mode=""></image>
  56. </view>
  57. <view class="b-rad-20 bgc-f flex-1 tdgl-box p-32 box-border-box" @click="goToUrl(14)">
  58. <view class="align-items-center mb-8">
  59. <view class="fs-32 fw-600 fc-3 mr-10">
  60. 我的余额
  61. </view>
  62. <image class="icons" src="@/static/img/toRight.png" mode=""></image>
  63. </view>
  64. <view class="fs-26 fc-6">
  65. 余额:¥{{userInfoData.money || 0.00}}
  66. </view>
  67. <image class="rdgl" src="@/static/img/my/wdsy.png" mode=""></image>
  68. </view>
  69. </view>
  70. <view class="function-two b-rad-20 box-border-box flex-justify-space mb-22" @click="goToUrl(5)">
  71. <view class="function-two-left">
  72. <view class="align-items-center mb-12 p-t-10">
  73. <image class="lqzx-img" src="@/static/img/my/lqzx.png" mode=""></image>
  74. <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
  75. </view>
  76. <view class="fs-26 fc-ED301D">
  77. {{couponHome_num?'有可领取的优惠券':'领券下单更优惠'}}
  78. </view>
  79. </view>
  80. <image class="function-two-right" src="@/static/img/my/q.png" mode=""></image>
  81. </view>
  82. </view>
  83. <scroll-view class="" :scroll-y="false" class="" @scrolltolower="scrolltolower">
  84. <view class="list-box function-one-box box-border-box">
  85. <view class="list bgc-f b-rad-20">
  86. <view class="item-box align-items-center flex-justify-space mb-64" @click="goToUrl(6)">
  87. <view class="item-left align-items-center">
  88. <image class="item-img" src="@/static/img/my/xxzx.png" mode=""></image>
  89. <view class="fs-32 fc-3">
  90. 消息中心
  91. </view>
  92. </view>
  93. <view class="item-right align-items-center">
  94. <view class="fs-24 fc-ED301D" v-if="userInfoData.msg_count > 0">
  95. {{userInfoData.msg_count}}条未读消息
  96. </view>
  97. <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
  98. <!-- <view class="red-point"></view> -->
  99. </view>
  100. </view>
  101. <view class="item-box align-items-center flex-justify-space mb-64" @click="goToUrl(12)">
  102. <view class="item-left align-items-center">
  103. <image class="item-img" src="@/static/img/my/gong-gao-icon.png" mode=""></image>
  104. <view class="fs-32 fc-3">
  105. 通知公告
  106. </view>
  107. </view>
  108. <view class="item-right align-items-center">
  109. <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
  110. </view>
  111. </view>
  112. <view class="item-box align-items-center flex-justify-space mb-64">
  113. <button class="item-box-button" open-type="contact" :bindcontact="handleContact"></button>
  114. <view class="item-left align-items-center">
  115. <image class="item-img" src="@/static/img/my/lxkf.png" mode=""></image>
  116. <view class="fs-32 fc-3">
  117. 联系客服
  118. </view>
  119. </view>
  120. <view class="item-right align-items-center">
  121. <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
  122. </view>
  123. </view>
  124. <view class="item-box align-items-center flex-justify-space mb-64" @click="goToUrl(8)">
  125. <view class="item-left align-items-center">
  126. <image class="item-img" src="@/static/img/my/swhz.png" mode=""></image>
  127. <view class="fs-32 fc-3">
  128. 商务合作
  129. </view>
  130. </view>
  131. <view class="item-right align-items-center">
  132. <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
  133. </view>
  134. </view>
  135. <view class="item-box align-items-center flex-justify-space mb-64" @click="goToUrl(9)">
  136. <view class="item-left align-items-center">
  137. <image class="item-img" src="@/static/img/my/qszp.png" mode=""></image>
  138. <view class="fs-32 fc-3">
  139. 骑手招聘
  140. </view>
  141. </view>
  142. <view class="item-right align-items-center">
  143. <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
  144. </view>
  145. </view>
  146. <view class="item-box align-items-center flex-justify-space mb-64" @click="goToUrl(10)">
  147. <view class="item-left align-items-center">
  148. <image class="item-img" src="@/static/img/my/wtfk.png" mode=""></image>
  149. <view class="fs-32 fc-3">
  150. 问题反馈
  151. </view>
  152. </view>
  153. <view class="item-right align-items-center">
  154. <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
  155. </view>
  156. </view>
  157. <view class="item-box align-items-center flex-justify-space" @click="goToUrl(11)">
  158. <view class="item-left align-items-center">
  159. <image class="item-img" src="@/static/img/my/gywm.png" mode=""></image>
  160. <view class="fs-32 fc-3">
  161. 关于我们
  162. </view>
  163. </view>
  164. <view class="item-right align-items-center">
  165. <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
  166. </view>
  167. </view>
  168. </view>
  169. </view>
  170. </scroll-view>
  171. <view class="p-b-20 b-rad-20"></view>
  172. </view>
  173. </template>
  174. <script>
  175. import {
  176. userInfo
  177. } from '@/api/member.js'
  178. import {
  179. couponHome
  180. } from '@/api/coupon.js'
  181. import {
  182. membeRmessage
  183. } from "@/api/member.js"
  184. export default {
  185. components: {},
  186. data() {
  187. return {
  188. userInfoData: {
  189. nickname: '',
  190. head_img: '',
  191. phone: '',
  192. sex: '',
  193. msg_count: '',
  194. },
  195. couponHome_num: false
  196. };
  197. },
  198. onShow() {
  199. let token = uni.getStorageSync('token');
  200. if (!token) {
  201. this.userInfoData.nickname = '请先登录'
  202. } else {
  203. this.getUserInfo();
  204. this.couponHome()
  205. this.membeRmessage()
  206. }
  207. },
  208. methods: {
  209. membeRmessage() {
  210. membeRmessage().then((res) => {
  211. if (res.code === 1) {
  212. if (res.data.msg_count > 0) {
  213. uni.showTabBarRedDot({
  214. index: 2
  215. })
  216. } else {
  217. uni.hideTabBarRedDot({
  218. index: 2
  219. })
  220. }
  221. }
  222. })
  223. },
  224. couponHome() {
  225. let operate_id = uni.getStorageSync('operate_id');
  226. couponHome({
  227. operate_id: operate_id
  228. }).then((res) => {
  229. if (res.code == 1) {
  230. if (res.data.length > 0) {
  231. this.couponHome_num = true
  232. } else {
  233. this.couponHome_num = false
  234. }
  235. }
  236. })
  237. },
  238. handleContact(e) {
  239. console.log(e);
  240. },
  241. getUserInfo() {
  242. userInfo().then((res) => {
  243. if (res.code === 1) {
  244. this.userInfoData = res.data;
  245. }
  246. })
  247. },
  248. scrolltolower() {
  249. console.log('触底');
  250. },
  251. goToUrl(type) {
  252. if (type == 0) {
  253. // 修改个人信息
  254. uni.navigateTo({
  255. url: '/pages-my/user-info'
  256. })
  257. } else if (type == 1) {
  258. // 我的卡券
  259. uni.navigateTo({
  260. url: '/pages-my/my-ticket'
  261. })
  262. } else if (type == 2) {
  263. // 我的发布
  264. uni.navigateTo({
  265. url: '/pages-my/my-publish'
  266. })
  267. } else if (type == 3) {
  268. // 我的评价
  269. uni.navigateTo({
  270. url: '/pages-my/my-appraise'
  271. })
  272. } else if (type == 4) {
  273. // 地址管理
  274. uni.navigateTo({
  275. url: '/pages-address/address'
  276. })
  277. } else if (type == 5) {
  278. // 领券中心
  279. uni.navigateTo({
  280. url: '/pages-my/ticket-centre'
  281. })
  282. } else if (type == 6) {
  283. // 消息中心
  284. uni.navigateTo({
  285. url: '/pages-my/info-centre'
  286. })
  287. } else if (type == 8) {
  288. // 商务合作
  289. uni.navigateTo({
  290. url: '/pages-my/cooperate'
  291. })
  292. } else if (type == 9) {
  293. // 骑手招聘
  294. uni.navigateTo({
  295. url: '/pages-my/rider-recruit'
  296. })
  297. } else if (type == 10) {
  298. // 问题反馈
  299. uni.navigateTo({
  300. url: '/pages-my/feedback'
  301. })
  302. } else if (type == 11) {
  303. // 关于我们
  304. uni.navigateTo({
  305. url: '/pages-my/about-us'
  306. })
  307. } else if (type == 12) {
  308. // 系统通知
  309. uni.navigateTo({
  310. url: '/pages-my/notice/list'
  311. })
  312. } else if (type == 13) {
  313. // 团队
  314. uni.navigateTo({
  315. url: `/pages-my/my-team?img=${this.userInfoData.head_img}&name=${this.userInfoData.nickname}`
  316. })
  317. } else if (type == 14) {
  318. // 余额
  319. uni.navigateTo({
  320. url: `/pages-my/my-balance?money=${this.userInfoData.money}`
  321. })
  322. }
  323. }
  324. },
  325. }
  326. </script>
  327. <style lang="scss" scoped>
  328. .icons {
  329. width: 32rpx;
  330. height: 32rpx;
  331. }
  332. .z-2 {
  333. position: relative;
  334. z-index: 2;
  335. }
  336. .tdgl-box {
  337. position: relative;
  338. }
  339. .rdgl {
  340. width: 92rpx;
  341. height: 92rpx;
  342. position: absolute;
  343. right: 0;
  344. bottom: 0;
  345. }
  346. .item-right {
  347. position: relative;
  348. }
  349. .red-point {
  350. position: absolute;
  351. right: 32rpx;
  352. top: 0;
  353. width: 14rpx;
  354. height: 14rpx;
  355. border-radius: 50%;
  356. background: red;
  357. opacity: 0.5;
  358. }
  359. .item-box {
  360. position: relative;
  361. .item-box-button {
  362. position: absolute;
  363. width: 100%;
  364. height: 54rpx;
  365. top: 0;
  366. left: 0;
  367. z-index: 100;
  368. background-color: transparent;
  369. border: none !important;
  370. }
  371. button::after {
  372. border: none !important;
  373. }
  374. }
  375. .my-box {
  376. padding: 110rpx 0 0 0;
  377. }
  378. .bg-box {
  379. width: 100%;
  380. height: 476rpx;
  381. position: fixed;
  382. top: 0;
  383. z-index: -1;
  384. }
  385. .user-img-box {
  386. width: 112rpx;
  387. height: 112rpx;
  388. position: relative;
  389. }
  390. .user-box {
  391. padding: 54rpx 32rpx;
  392. }
  393. .user-img {
  394. width: 100%;
  395. height: 100%;
  396. }
  397. .set-iimg {
  398. position: absolute;
  399. right: 4rpx;
  400. bottom: 0;
  401. width: 33rpx;
  402. height: 33rpx;
  403. }
  404. .user-name {
  405. max-width: 388rpx;
  406. }
  407. .function-one-box {
  408. padding: 0 24rpx;
  409. }
  410. .function-one {
  411. padding: 24rpx 34rpx;
  412. }
  413. .function-two {
  414. padding: 22rpx 40rpx 22rpx 32rpx;
  415. background: linear-gradient(90deg, #FFFFFF 47%, #FFF7E5 100%);
  416. }
  417. .my-img {
  418. width: 80rpx;
  419. height: 80rpx;
  420. margin: 0 0 8rpx 0;
  421. }
  422. .function-two-right {
  423. width: 96rpx;
  424. height: 96rpx;
  425. }
  426. .lqzx-img {
  427. width: 137rpx;
  428. height: 30rpx;
  429. margin: 0 8rpx 0 0;
  430. }
  431. .to-right {
  432. width: 32rpx;
  433. height: 32rpx;
  434. }
  435. // .list-box{
  436. // padding: 0 24rpx 20rpx;
  437. // }
  438. .list {
  439. padding: 32rpx 28rpx 32rpx 32rpx;
  440. }
  441. .item-img {
  442. width: 48rpx;
  443. height: 48rpx;
  444. margin: 0 20rpx 0 0;
  445. }
  446. </style>