index.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. <!-- 我的 -->
  2. <template>
  3. <view class="my" :style="{ background: 'url(' + bgImg + ') #F4F5F9' }">
  4. <view class="title">
  5. <image :src="logoImg" mode="heightFix"></image>
  6. </view>
  7. <view class="news">
  8. <image :src="avatar"></image>
  9. <view v-if="userInfo" class="phone">{{ userInfo.realName }}</view>
  10. <view v-else class="phone" @click="toLogin()">点击登录</view>
  11. </view>
  12. <view class="content">
  13. <view class="order-wrap">
  14. <!-- <view class="unpay">
  15. <view class="left">
  16. <image :src="tongzhi"></image>
  17. <view class="tip">您有1笔订单待付款<text>09:34</text>后取消</view>
  18. </view>
  19. <view class="right">去付款</view>
  20. </view> -->
  21. <view class="order">
  22. <view class="order_top">
  23. <text class="mytt">我的订单</text>
  24. <view class="myall" @click="toOrder">
  25. <text class="all">全部</text>
  26. <image class="more" :src="moreImg"></image>
  27. </view>
  28. </view>
  29. <view class="order-box">
  30. <view class="order-box-item" v-for="(item, index) in orderList" :key="index" @click="toOrder(item)">
  31. <image :src="item.icon"></image>
  32. <text class="name">{{ item.label }}</text>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="cantact">
  38. <view class="canl">
  39. <image :src="cantact"></image>
  40. <text>联系客服</text>
  41. </view>
  42. <image class="more" :src="moreImg"></image>
  43. </view>
  44. <view class="outline" @click="outLogin()">退出登录</view>
  45. </view>
  46. </view>
  47. </template>
  48. <script>
  49. import {logout} from '@/apis/user.js'
  50. export default {
  51. components: {},
  52. data() {
  53. return {
  54. userInfo: uni.getStorageSync('userInfo'),
  55. token: uni.getStorageSync('token'),
  56. bgImg: "https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/bg_top%403x.png",
  57. logoImg: "https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/img_logo%403x.png",
  58. tongzhi: "https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_tongzhi%403x.png",
  59. moreImg: "https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_more%403x.png",
  60. cantact: "https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_kefurexian%403x.png",
  61. avatar: '',
  62. orderList: [
  63. {
  64. value: 1,
  65. label: '全部',
  66. icon: "https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_daifukuan%403x.png"
  67. },
  68. {
  69. value: 2,
  70. label: '待付款',
  71. icon: "https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_daifukuan%403x.png"
  72. },
  73. {
  74. value: 3,
  75. label: '拍摄中',
  76. icon: "https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_daifukuan%403x.png"
  77. },
  78. {
  79. value: 4,
  80. label: '已完成',
  81. icon: "https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_diankaguanli%403x.png"
  82. }
  83. ]
  84. };
  85. },
  86. computed: {},
  87. watch: {},
  88. onLoad() {
  89. this.changeTabbar()
  90. },
  91. onShow() {
  92. },
  93. methods: {
  94. toLogin(){
  95. },
  96. changeTabbar() {
  97. uni.setTabBarStyle({
  98. color: '#9EA3B1',
  99. selectedColor: '#0D121A',
  100. backgroundColor: '#FFF'
  101. })
  102. },
  103. toOrder(item) {
  104. this.$router.push({
  105. path: '/pages/order/index?status=' + item.value
  106. })
  107. },
  108. outLogin() {
  109. logout().then(res => {
  110. uni.removeStorageSync('token')
  111. uni.removeStorageSync('userInfo')
  112. this.name = ''
  113. this.token = ''
  114. })
  115. }
  116. },
  117. created() {
  118. },
  119. mounted() {
  120. },
  121. }
  122. </script>
  123. <style lang='scss' scoped>
  124. .my {
  125. width: 100%;
  126. // height: 100%;
  127. display: flex;
  128. flex-direction: column;
  129. position: absolute;
  130. top: 0;
  131. bottom: 0;
  132. background-size: contain !important;
  133. background-repeat: no-repeat !important;
  134. background-position: top;
  135. .title {
  136. padding: 16 rpx 32 rpx;
  137. image {
  138. height: 56 rpx;
  139. }
  140. }
  141. .news {
  142. padding: 64 rpx 48 rpx 0;
  143. display: flex;
  144. align-items: center;
  145. image {
  146. width: 104 rpx;
  147. height: 104 rpx;
  148. background-color: aqua;
  149. border-radius: 50%;
  150. }
  151. .phone {
  152. font-weight: bold;
  153. font-size: 44 rpx;
  154. color: #0D121A;
  155. margin-left: 32 rpx;
  156. }
  157. }
  158. .content {
  159. padding: 0 24 rpx;
  160. margin-top: 40 rpx;
  161. box-sizing: content-box;
  162. }
  163. .more {
  164. width: 32 rpx;
  165. height: 32 rpx;
  166. }
  167. .order-wrap {
  168. width: 100%;
  169. display: flex;
  170. flex-direction: column;
  171. align-items: center;
  172. .unpay {
  173. // box-sizing: border-box;
  174. width: 638 rpx;
  175. background: #FFEEE2;
  176. border-radius: 24 rpx 24 rpx 0 rpx 0 rpx;
  177. border: 2 rpx solid #FFFEFD;
  178. padding: 16 rpx 18 rpx 16 rpx 16 rpx;
  179. display: flex;
  180. justify-content: space-between;
  181. align-items: center;
  182. .left {
  183. display: flex;
  184. align-items: center;
  185. image {
  186. width: 48 rpx;
  187. height: 48 rpx;
  188. }
  189. .tip {
  190. font-size: 24 rpx;
  191. color: #FF7441;
  192. margin-left: 14 rpx;
  193. text {
  194. font-weight: bold;
  195. }
  196. }
  197. }
  198. .right {
  199. width: 120 rpx;
  200. height: 44 rpx;
  201. font-weight: 500;
  202. background: #FF7441;
  203. border-radius: 24 rpx;
  204. font-size: 24 rpx;
  205. color: #FFFFFF;
  206. text-align: center;
  207. line-height: 44 rpx;
  208. }
  209. }
  210. .order {
  211. padding: 32 rpx 32 rpx 40 rpx;
  212. width: 100%;
  213. box-sizing: border-box;
  214. height: 260 rpx;
  215. background: linear-gradient(180deg, #DEF5FD 0%, #FFFFFF 100%);
  216. border-radius: 32 rpx;
  217. border: 2 rpx solid #FFFFFF;
  218. .order_top {
  219. display: flex;
  220. justify-content: space-between;
  221. align-items: center;
  222. .mytt {
  223. font-weight: 500;
  224. font-size: 32 rpx;
  225. color: #0D121A;
  226. }
  227. .myall {
  228. font-weight: 400;
  229. font-size: 26 rpx;
  230. color: #0D121A;
  231. display: flex;
  232. align-items: center;
  233. .all {
  234. margin-right: 8 rpx;
  235. }
  236. }
  237. }
  238. .order-box {
  239. display: flex;
  240. justify-content: space-between;
  241. align-items: center;
  242. margin-top: 48 rpx;
  243. .order-box-item {
  244. display: flex;
  245. flex-direction: column;
  246. align-items: center;
  247. width: 128 rpx;
  248. image {
  249. width: 64 rpx;
  250. height: 64 rpx;
  251. }
  252. .name {
  253. font-size: 24 rpx;
  254. color: #0D121A;
  255. margin-top: 16 rpx;
  256. }
  257. }
  258. }
  259. }
  260. }
  261. .cantact {
  262. width: 100%;
  263. height: 112 rpx;
  264. background: #FFFFFF;
  265. border-radius: 24 rpx;
  266. display: flex;
  267. justify-content: space-between;
  268. align-items: center;
  269. padding: 24 rpx 32 rpx;
  270. margin-top: 24 rpx;
  271. .canl {
  272. display: flex;
  273. align-items: center;
  274. image {
  275. margin-right: 24 rpx;
  276. width: 64 rpx;
  277. height: 64 rpx;
  278. }
  279. }
  280. }
  281. .outline {
  282. width: 622 rpx;
  283. height: 96 rpx;
  284. border-radius: 36 rpx;
  285. border: 4 rpx solid #E2E4EB;
  286. font-size: 28 rpx;
  287. color: #0D121A;
  288. text-align: center;
  289. line-height: 96 rpx;
  290. margin: 48 rpx auto;
  291. }
  292. }
  293. </style>