index.vue 8.2 KB

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