index.vue 8.0 KB

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