index.vue 8.3 KB

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