index.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  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="realName" class="phone">{{ 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. realName: uni.getStorageSync('realName'),
  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. },
  90. onShow() {
  91. this.changeTabbar()
  92. },
  93. methods: {
  94. changeTabbar() {
  95. uni.setTabBarStyle({
  96. color: '#9EA3B1',
  97. selectedColor: '#0D121A',
  98. backgroundColor: '#FFF'
  99. })
  100. },
  101. toOrder(item) {
  102. this.$router.push({
  103. path: '/pages/order/index'
  104. })
  105. },
  106. outLogin() {
  107. logout().then(res => {
  108. uni.removeStorageSync('token')
  109. this.$router.push({
  110. path: '/pages/index/index'
  111. })
  112. })
  113. }
  114. },
  115. created() {
  116. },
  117. mounted() {
  118. },
  119. }
  120. </script>
  121. <style lang='scss' scoped>
  122. .my {
  123. width: 100%;
  124. // height: 100%;
  125. display: flex;
  126. flex-direction: column;
  127. position: absolute;
  128. top: 0;
  129. bottom: 0;
  130. background-size: contain !important;
  131. background-repeat: no-repeat !important;
  132. background-position: top;
  133. .title {
  134. padding: 16rpx 32rpx;
  135. image {
  136. height: 56rpx;
  137. }
  138. }
  139. .news {
  140. padding: 64rpx 48rpx 0;
  141. display: flex;
  142. align-items: center;
  143. image {
  144. width: 104rpx;
  145. height: 104rpx;
  146. background-color: aqua;
  147. border-radius: 50%;
  148. }
  149. .phone {
  150. font-weight: bold;
  151. font-size: 44rpx;
  152. color: #0D121A;
  153. margin-left: 32rpx;
  154. }
  155. }
  156. .content {
  157. padding: 0 24rpx;
  158. margin-top: 40rpx;
  159. box-sizing: content-box;
  160. }
  161. .more {
  162. width: 32rpx;
  163. height: 32rpx;
  164. }
  165. .order-wrap {
  166. width: 100%;
  167. display: flex;
  168. flex-direction: column;
  169. align-items: center;
  170. .unpay {
  171. // box-sizing: border-box;
  172. width: 638rpx;
  173. background: #FFEEE2;
  174. border-radius: 24rpx 24rpx 0rpx 0rpx;
  175. border: 2rpx solid #FFFEFD;
  176. padding: 16rpx 18rpx 16rpx 16rpx;
  177. display: flex;
  178. justify-content: space-between;
  179. align-items: center;
  180. .left {
  181. display: flex;
  182. align-items: center;
  183. image {
  184. width: 48rpx;
  185. height: 48rpx;
  186. }
  187. .tip {
  188. font-size: 24rpx;
  189. color: #FF7441;
  190. margin-left: 14rpx;
  191. text {
  192. font-weight: bold;
  193. }
  194. }
  195. }
  196. .right {
  197. width: 120rpx;
  198. height: 44rpx;
  199. font-weight: 500;
  200. background: #FF7441;
  201. border-radius: 24rpx;
  202. font-size: 24rpx;
  203. color: #FFFFFF;
  204. text-align: center;
  205. line-height: 44rpx;
  206. }
  207. }
  208. .order {
  209. padding: 32rpx 32rpx 40rpx;
  210. width: 100%;
  211. box-sizing: border-box;
  212. height: 260rpx;
  213. background: linear-gradient(180deg, #DEF5FD 0%, #FFFFFF 100%);
  214. border-radius: 32rpx;
  215. border: 2rpx solid #FFFFFF;
  216. .order_top {
  217. display: flex;
  218. justify-content: space-between;
  219. align-items: center;
  220. .mytt {
  221. font-weight: 500;
  222. font-size: 32rpx;
  223. color: #0D121A;
  224. }
  225. .myall {
  226. font-weight: 400;
  227. font-size: 26rpx;
  228. color: #0D121A;
  229. display: flex;
  230. align-items: center;
  231. .all {
  232. margin-right: 8rpx;
  233. }
  234. }
  235. }
  236. .order-box {
  237. display: flex;
  238. justify-content: space-between;
  239. align-items: center;
  240. margin-top: 48rpx;
  241. .order-box-item {
  242. display: flex;
  243. flex-direction: column;
  244. align-items: center;
  245. width: 128rpx;
  246. image {
  247. width: 64rpx;
  248. height: 64rpx;
  249. }
  250. .name {
  251. font-size: 24rpx;
  252. color: #0D121A;
  253. margin-top: 16rpx;
  254. }
  255. }
  256. }
  257. }
  258. }
  259. .cantact {
  260. width: 100%;
  261. height: 112rpx;
  262. background: #FFFFFF;
  263. border-radius: 24rpx;
  264. display: flex;
  265. justify-content: space-between;
  266. align-items: center;
  267. padding: 24rpx 32rpx;
  268. margin-top: 24rpx;
  269. .canl {
  270. display: flex;
  271. align-items: center;
  272. image {
  273. margin-right: 24rpx;
  274. width: 64rpx;
  275. height: 64rpx;
  276. }
  277. }
  278. }
  279. .outline {
  280. width: 622rpx;
  281. height: 96rpx;
  282. border-radius: 36rpx;
  283. border: 4rpx solid #E2E4EB;
  284. font-size: 28rpx;
  285. color: #0D121A;
  286. text-align: center;
  287. line-height: 96rpx;
  288. margin: 48rpx auto;
  289. }
  290. }
  291. </style>