mine.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <template>
  2. <view style="overflow: scroll; background-color: #232428">
  3. <img
  4. src="https://file.rongcyl.cn/festatic/bkm/mine/mine_bgt.png"
  5. style="width: 100%; height: 658rpx; position: absolute; z-index: 99"
  6. />
  7. <div style="width: 100%; height: 658rpx; z-index: 100; position: relative">
  8. <div
  9. :style="{
  10. color: '#fff',
  11. 'margin-top': menuButton.top + 'px',
  12. 'line-height': menuButton.height + 'px',
  13. textAlign: 'center',
  14. }"
  15. >
  16. 123
  17. </div>
  18. </div>
  19. <div
  20. style="
  21. margin-top: -350rpx;
  22. height: calc(100vh - 388rpx);
  23. width: 100vw;
  24. position: relative;
  25. z-index: 100;
  26. background: url(https://file.rongcyl.cn/festatic/bkm/mine/mine_bg.png) no-repeat;
  27. background-size: cover;
  28. color: #bbbcc3;
  29. padding: 0 30rpx;
  30. box-sizing: border-box;
  31. padding-top: 100rpx;
  32. "
  33. >
  34. <div class="flex justify-between items-center">
  35. <div class="fs14">我的订单</div>
  36. <div class="flex items-center">
  37. <span class="fs12">查看全部</span>
  38. <img
  39. class="ml-2 inline-block"
  40. src="https://file.rongcyl.cn/festatic/bkm/arrow.png"
  41. style="width: 28rpx; height: 28rpx"
  42. />
  43. </div>
  44. </div>
  45. <div class="flex justify-around my-5 fs12 text-center">
  46. <div>
  47. <img src="https://file.rongcyl.cn/festatic/bkm/mine/t1.png" style="width: 100rpx; height: 100rpx" />
  48. <div class="mt-1">待发货</div>
  49. </div>
  50. <div>
  51. <img src="https://file.rongcyl.cn/festatic/bkm/mine/t2.png" style="width: 100rpx; height: 100rpx" />
  52. <div class="mt-1">待收货</div>
  53. </div>
  54. <div>
  55. <img src="https://file.rongcyl.cn/festatic/bkm/mine/t3.png" style="width: 100rpx; height: 100rpx" />
  56. <div class="mt-1">已完成</div>
  57. </div>
  58. <div>
  59. <img src="https://file.rongcyl.cn/festatic/bkm/mine/t4.png" style="width: 100rpx; height: 100rpx" />
  60. <div class="mt-1">消费记录</div>
  61. </div>
  62. </div>
  63. <div class="flex justify-between fs14 items-center border-t border-zinc-600" style="height: 92rpx">
  64. <div class="flex items-center">
  65. <img
  66. src="https://file.rongcyl.cn/festatic/bkm/mine/s1.png"
  67. class="inline-block mr-2"
  68. style="width: 32rpx; height: 32rpx"
  69. />
  70. <span>常见问题</span>
  71. </div>
  72. <img
  73. src="https://file.rongcyl.cn/festatic/bkm/arrow.png"
  74. style="width: 28rpx; height: 28rpx; display: inline-block"
  75. />
  76. </div>
  77. <div class="flex justify-between fs14 items-center border-t border-zinc-600" style="height: 92rpx">
  78. <div class="flex items-center">
  79. <img
  80. src="https://file.rongcyl.cn/festatic/bkm/mine/s2.png"
  81. class="inline-block mr-2"
  82. style="width: 32rpx; height: 32rpx"
  83. />
  84. <span>意见反馈</span>
  85. </div>
  86. <img
  87. src="https://file.rongcyl.cn/festatic/bkm/arrow.png"
  88. style="width: 28rpx; height: 28rpx; display: inline-block"
  89. />
  90. </div>
  91. <div class="flex justify-between fs14 items-center border-t border-zinc-600" style="height: 92rpx">
  92. <div class="flex items-center">
  93. <img
  94. src="https://file.rongcyl.cn/festatic/bkm/mine/s3.png"
  95. class="inline-block mr-2"
  96. style="width: 32rpx; height: 32rpx"
  97. />
  98. <span>加入群组</span>
  99. </div>
  100. <img
  101. src="https://file.rongcyl.cn/festatic/bkm/arrow.png"
  102. style="width: 28rpx; height: 28rpx; display: inline-block"
  103. />
  104. </div>
  105. <div class="flex justify-between fs14 items-center border-t border-zinc-600" style="height: 92rpx">
  106. <div class="flex items-center">
  107. <img
  108. src="https://file.rongcyl.cn/festatic/bkm/mine/s4.png"
  109. class="inline-block mr-2"
  110. style="width: 32rpx; height: 32rpx"
  111. />
  112. <span>联系客服</span>
  113. </div>
  114. <img
  115. src="https://file.rongcyl.cn/festatic/bkm/arrow.png"
  116. style="width: 28rpx; height: 28rpx; display: inline-block"
  117. />
  118. </div>
  119. <div class="flex justify-between fs14 items-center border-t border-zinc-600" style="height: 92rpx">
  120. <div class="flex items-center">
  121. <img
  122. src="https://file.rongcyl.cn/festatic/bkm/mine/s5.png"
  123. class="inline-block mr-2"
  124. style="width: 32rpx; height: 32rpx"
  125. />
  126. <span>地址管理</span>
  127. </div>
  128. <img
  129. src="https://file.rongcyl.cn/festatic/bkm/arrow.png"
  130. style="width: 28rpx; height: 28rpx; display: inline-block"
  131. />
  132. </div>
  133. <div class="flex justify-between fs14 items-center border-t border-zinc-600" style="height: 92rpx">
  134. <div class="flex items-center">
  135. <img
  136. src="https://file.rongcyl.cn/festatic/bkm/mine/s6.png"
  137. class="inline-block mr-2"
  138. style="width: 32rpx; height: 32rpx"
  139. />
  140. <span>游戏规则</span>
  141. </div>
  142. <img
  143. src="https://file.rongcyl.cn/festatic/bkm/arrow.png"
  144. style="width: 28rpx; height: 28rpx; display: inline-block"
  145. />
  146. </div>
  147. <div class="flex justify-between fs14 items-center border-t border-b border-zinc-600" style="height: 92rpx">
  148. <div class="flex items-center">
  149. <img
  150. src="https://file.rongcyl.cn/festatic/bkm/mine/s7.png"
  151. class="inline-block mr-2"
  152. style="width: 32rpx; height: 32rpx"
  153. />
  154. <span>用户协议</span>
  155. </div>
  156. <img
  157. src="https://file.rongcyl.cn/festatic/bkm/arrow.png"
  158. style="width: 28rpx; height: 28rpx; display: inline-block"
  159. />
  160. </div>
  161. </div>
  162. <uni-popup class="popup" ref="popup" type="center">
  163. <image
  164. class="qrcodeImg"
  165. :show-menu-by-longpress="true"
  166. :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/QRcode.png'"
  167. mode="widthFix"
  168. />
  169. </uni-popup>
  170. </view>
  171. </template>
  172. <script>
  173. import { userInfoApi } from '@/api/user.js'
  174. import { messageListApi } from '@/api/message.js'
  175. export default {
  176. data() {
  177. return {
  178. isLogin: false,
  179. userInfo: null,
  180. userId: '-',
  181. hasLogin: false,
  182. userInfoDetail: {},
  183. massageNum: 0,
  184. safeAreaTop: 0,
  185. menuButton: {
  186. top: 0,
  187. height: 0,
  188. },
  189. }
  190. },
  191. created() {
  192. const { top, height } = wx.getMenuButtonBoundingClientRect()
  193. this.menuButton.top = top
  194. this.menuButton.height = height
  195. wx.getSystemInfo({
  196. success: res => {
  197. console.log(res.safeArea)
  198. this.safeAreaTop = res.safeArea.top + 'px'
  199. },
  200. })
  201. },
  202. onShow() {
  203. // this.userInfo = wx.getStorageSync('userInfo');
  204. this.userId = wx.getStorageSync('userId')
  205. //获取用户的登录信息
  206. if (wx.getStorageSync('token')) {
  207. this.hasLogin = true
  208. getApp().globalData.hasLogin = true
  209. // 获取用户信息详情
  210. this.getUserInfo()
  211. this.getMassage()
  212. } else {
  213. this.userInfo = null
  214. this.hasLogin = false
  215. getApp().globalData.hasLogin = false
  216. this.userInfoDetail = {}
  217. }
  218. },
  219. methods: {
  220. getMassage() {
  221. let params = {
  222. page: 1,
  223. limit: 1,
  224. status: 0,
  225. }
  226. messageListApi(params).then(res => {
  227. this.massageNum = res.data.total
  228. })
  229. },
  230. toUserInfo() {
  231. this.$navigateTo('/pages/user/user')
  232. if (this.isLogin) {
  233. this.$navigateTo('/pages/user/user')
  234. }
  235. },
  236. getUserInfo() {
  237. userInfoApi().then(res => {
  238. console.log(res, '详细用户信息')
  239. this.userInfoDetail = res.data
  240. // wx.setStorageSync('userInfo', res.data)
  241. this.userInfo = res.data
  242. })
  243. },
  244. toLogin() {
  245. wx.navigateTo({ url: '/pages/login/login' })
  246. },
  247. pageTo(url) {
  248. wx.navigateTo({ url: url })
  249. },
  250. showQRcode() {
  251. this.$refs.popup.open()
  252. },
  253. },
  254. }
  255. </script>
  256. <style scoped lang="scss">
  257. .btn {
  258. border: none;
  259. outline: none;
  260. background-color: #fff;
  261. &::after {
  262. border: none;
  263. }
  264. }
  265. .qrcodeImg {
  266. width: 70vw;
  267. border-radius: 5px;
  268. }
  269. </style>