index.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  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 class="user-img" src="@/static/img/my/user-img.png" mode=""></image>
  8. <image class="set-iimg" src="@/static/img/my/pen.png" mode=""></image>
  9. </view>
  10. <view class="user-name text-overflow-ellipsis-one fs-34">
  11. {{ name }}
  12. </view>
  13. </view>
  14. <view class="function-one-box box-border-box">
  15. <view class="function-one b-rad-20 bgc-f box-border-box mb-24 align-items-center flex-justify-space">
  16. <view class="my-function-box flex-direction align-items-center" @click="goToUrl(1)">
  17. <image class="my-img" src="@/static/img/my/wdkq.png" mode=""></image>
  18. <view class="fs-26">
  19. 我的卡券
  20. </view>
  21. </view>
  22. <view class="my-function-box flex-direction align-items-center" @click="goToUrl(2)">
  23. <image class="my-img" src="@/static/img/my/wdfb.png" mode=""></image>
  24. <view class="fs-26">
  25. 我的发布
  26. </view>
  27. </view>
  28. <view class="my-function-box flex-direction align-items-center" @click="goToUrl(3)">
  29. <image class="my-img" src="@/static/img/my/wdpj.png" mode=""></image>
  30. <view class="fs-26">
  31. 我的评价
  32. </view>
  33. </view>
  34. <view class="my-function-box flex-direction align-items-center" @click="goToUrl(4)">
  35. <image class="my-img" src="@/static/img/my/dzgl.png" mode=""></image>
  36. <view class="fs-26">
  37. 地址管理
  38. </view>
  39. </view>
  40. </view>
  41. <view class="function-two b-rad-20 box-border-box flex-justify-space mb-22" @click="goToUrl(5)">
  42. <view class="function-two-left">
  43. <view class="align-items-center mb-12 p-t-10">
  44. <image class="lqzx-img" src="@/static/img/my/lqzx.png" mode=""></image>
  45. <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
  46. </view>
  47. <view class="fs-26 fc-9">
  48. 领券下单更优惠
  49. </view>
  50. </view>
  51. <image class="function-two-right" src="@/static/img/my/q.png" mode=""></image>
  52. </view>
  53. </view>
  54. <scroll-view class="" :scroll-y="true" class="scroll-view-css" @scrolltolower="scrolltolower">
  55. <view class="list-box function-one-box box-border-box">
  56. <view class="list bgc-f b-rad-20">
  57. <view class="item-box align-items-center flex-justify-space mb-64" @click="goToUrl(6)">
  58. <view class="item-left align-items-center">
  59. <image class="item-img" src="@/static/img/my/xxzx.png" mode=""></image>
  60. <view class="fs-32 fc-3">
  61. 消息中心
  62. </view>
  63. </view>
  64. <view class="item-right align-items-center">
  65. <view class="fs-24 fc-9">
  66. {{newsNum}}条未读消息
  67. </view>
  68. <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
  69. </view>
  70. </view>
  71. <view class="item-box align-items-center flex-justify-space mb-64" @click="goToUrl(12)">
  72. <view class="item-left align-items-center">
  73. <image class="item-img" src="@/static/img/my/gong-gao-icon.png" mode=""></image>
  74. <view class="fs-32 fc-3">
  75. 通知公告
  76. </view>
  77. </view>
  78. <view class="item-right align-items-center">
  79. <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
  80. </view>
  81. </view>
  82. <view class="item-box align-items-center flex-justify-space mb-64" @click="goToUrl(7)">
  83. <view class="item-left align-items-center">
  84. <image class="item-img" src="@/static/img/my/lxkf.png" mode=""></image>
  85. <view class="fs-32 fc-3">
  86. 联系客服
  87. </view>
  88. </view>
  89. <view class="item-right align-items-center">
  90. <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
  91. </view>
  92. </view>
  93. <view class="item-box align-items-center flex-justify-space mb-64" @click="goToUrl(8)">
  94. <view class="item-left align-items-center">
  95. <image class="item-img" src="@/static/img/my/swhz.png" mode=""></image>
  96. <view class="fs-32 fc-3">
  97. 商务合作
  98. </view>
  99. </view>
  100. <view class="item-right align-items-center">
  101. <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
  102. </view>
  103. </view>
  104. <view class="item-box align-items-center flex-justify-space mb-64" @click="goToUrl(9)">
  105. <view class="item-left align-items-center">
  106. <image class="item-img" src="@/static/img/my/qszp.png" mode=""></image>
  107. <view class="fs-32 fc-3">
  108. 骑手招聘
  109. </view>
  110. </view>
  111. <view class="item-right align-items-center">
  112. <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
  113. </view>
  114. </view>
  115. <view class="item-box align-items-center flex-justify-space mb-64" @click="goToUrl(10)">
  116. <view class="item-left align-items-center">
  117. <image class="item-img" src="@/static/img/my/wtfk.png" mode=""></image>
  118. <view class="fs-32 fc-3">
  119. 问题反馈
  120. </view>
  121. </view>
  122. <view class="item-right align-items-center">
  123. <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
  124. </view>
  125. </view>
  126. <view class="item-box align-items-center flex-justify-space" @click="goToUrl(11)">
  127. <view class="item-left align-items-center">
  128. <image class="item-img" src="@/static/img/my/gywm.png" mode=""></image>
  129. <view class="fs-32 fc-3">
  130. 关于我们
  131. </view>
  132. </view>
  133. <view class="item-right align-items-center">
  134. <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
  135. </view>
  136. </view>
  137. </view>
  138. </view>
  139. </scroll-view>
  140. <view class="p-b-20 b-rad-20"></view>
  141. </view>
  142. </template>
  143. <script>
  144. import {userInfo} from '@/api/member.js'
  145. export default {
  146. components: {},
  147. data() {
  148. return {
  149. name: '请先登录',
  150. newsNum: 24
  151. };
  152. },
  153. onShow() {
  154. let token = uni.getStorageSync('token');
  155. },
  156. methods: {
  157. getUserInfo(){
  158. userInfo().then((res)=>{
  159. if(res.code === 1){
  160. }
  161. })
  162. },
  163. scrolltolower() {
  164. console.log('触底');
  165. },
  166. goToUrl(type) {
  167. if (type == 0) {
  168. // 修改个人信息
  169. uni.navigateTo({
  170. url: '/pages-my/user-info'
  171. })
  172. } else if (type == 1) {
  173. // 我的卡券
  174. uni.navigateTo({
  175. url: '/pages-my/my-ticket'
  176. })
  177. } else if (type == 2) {
  178. // 我的发布
  179. uni.navigateTo({
  180. url: '/pages-my/my-publish'
  181. })
  182. } else if (type == 3) {
  183. // 我的评价
  184. uni.navigateTo({
  185. url: '/pages-my/my-appraise'
  186. })
  187. } else if (type == 4) {
  188. // 地址管理
  189. uni.navigateTo({
  190. url: '/pages-address/address'
  191. })
  192. } else if (type == 5) {
  193. // 领券中心
  194. uni.navigateTo({
  195. url: '/pages-my/ticket-centre'
  196. })
  197. } else if (type == 6) {
  198. // 消息中心
  199. uni.navigateTo({
  200. url: '/pages-my/info-centre'
  201. })
  202. } else if (type == 7) {
  203. // 联系客服
  204. } else if (type == 8) {
  205. // 商务合作
  206. uni.navigateTo({
  207. url: '/pages-my/cooperate'
  208. })
  209. } else if (type == 9) {
  210. // 骑手招聘
  211. uni.navigateTo({
  212. url: '/pages-my/rider-recruit'
  213. })
  214. } else if (type == 10) {
  215. // 问题反馈
  216. uni.navigateTo({
  217. url: '/pages-my/feedback'
  218. })
  219. } else if (type == 11) {
  220. // 关于我们
  221. uni.navigateTo({
  222. url: '/pages-my/about-us'
  223. })
  224. } else if (type == 12) {
  225. // 系统通知
  226. uni.navigateTo({
  227. url: '/pages-my/notice/list'
  228. })
  229. }
  230. }
  231. },
  232. }
  233. </script>
  234. <style lang="scss" scoped>
  235. .my-box {}
  236. .bg-box {
  237. width: 100%;
  238. height: 476rpx;
  239. position: fixed;
  240. top: 0;
  241. z-index: -1;
  242. }
  243. .user-img-box {
  244. width: 112rpx;
  245. height: 112rpx;
  246. position: relative;
  247. }
  248. .user-box {
  249. padding: 54rpx 32rpx;
  250. }
  251. .user-img {
  252. width: 100%;
  253. height: 100%;
  254. }
  255. .set-iimg {
  256. position: absolute;
  257. right: 4rpx;
  258. bottom: 0;
  259. width: 33rpx;
  260. height: 33rpx;
  261. }
  262. .user-name {
  263. max-width: 388rpx;
  264. }
  265. .function-one-box {
  266. padding: 0 24rpx;
  267. }
  268. .function-one {
  269. padding: 24rpx 34rpx;
  270. }
  271. .function-two {
  272. padding: 22rpx 40rpx 22rpx 32rpx;
  273. background: linear-gradient(90deg, #FFFFFF 47%, #FFF7E5 100%);
  274. }
  275. .my-img {
  276. width: 80rpx;
  277. height: 80rpx;
  278. margin: 0 0 8rpx 0;
  279. }
  280. .function-two-right {
  281. width: 96rpx;
  282. height: 96rpx;
  283. }
  284. .lqzx-img {
  285. width: 137rpx;
  286. height: 30rpx;
  287. margin: 0 8rpx 0 0;
  288. }
  289. .to-right {
  290. width: 32rpx;
  291. height: 32rpx;
  292. }
  293. // .list-box{
  294. // padding: 0 24rpx 20rpx;
  295. // }
  296. .list {
  297. padding: 32rpx 28rpx 32rpx 32rpx;
  298. }
  299. .item-img {
  300. width: 48rpx;
  301. height: 48rpx;
  302. margin: 0 20rpx 0 0;
  303. }
  304. </style>