建材商城系统20241014
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

390 lines
8.6 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
  1. <template>
  2. <view class="page">
  3. <!-- <navbar title="个人中心" /> -->
  4. <view class="head">
  5. <view class="headImage">
  6. <image :src="userInfo.headImage || '/static/image/center/headImage.png'" mode="aspectFill"></image>
  7. </view>
  8. <view class="info">
  9. <view v-if="isLogin">
  10. <view style="display: flex;gap: 20rpx;">
  11. <view class="name">
  12. {{userInfo.nickName || '未登录'}}
  13. </view>
  14. <view class="headBtn" @click="$utils.navigateTo('/pages_order/auth/wxUserInfo')">
  15. 修改资料
  16. <uv-icon name="edit-pen-fill" size="26rpx" color="#fff"></uv-icon>
  17. </view>
  18. </view>
  19. <view class="tips">
  20. 手机号<text>{{userInfo.phone || '未绑定'}}</text>
  21. </view>
  22. </view>
  23. <view v-else>
  24. <view class="login-btn" @tap.stop="$utils.toLogin()">
  25. <text>立即登录</text>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. <!-- 酒店 -->
  31. <view class="user">
  32. <view class="line" @click="$utils.navigateTo('/pages_order/mine/purse')">
  33. <view class="item">
  34. <view class="image">
  35. <image src="/static/image/center/1.png" mode=""></image>
  36. </view>
  37. <view class="">
  38. 我的积分
  39. <p style="color:#DC2828; font-weight: 700;">{{ userInfo.money || 0 }}</p>
  40. </view>
  41. </view>
  42. <view class="item" @click="$utils.navigateTo('/pages_order/mine/purse')">
  43. <view class="image">
  44. <image src="/static/image/center/4.png" mode=""></image>
  45. </view>
  46. <view class="">
  47. 我的金额
  48. <p style="color:#DC2828;font-weight: 700">{{ userInfo.price || 0 }}</p>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="line">
  53. <view class="image-home"
  54. @click="$utils.navigateTo('/pages_order/order/fastCreateOrder')">
  55. <uv-swiper
  56. class="uv-swaip"
  57. height="240rpx"
  58. :list="bannerList"
  59. circular
  60. keyName="image"
  61. indicator="true"
  62. bgColor="#ffffff">
  63. </uv-swiper>
  64. </view>
  65. </view>
  66. <view class="line grid">
  67. <view class="title">
  68. 我的服务
  69. </view>
  70. <uv-grid :col="4" :border="false">
  71. <uv-grid-item @click="$utils.navigateTo('/index/order')">
  72. <image class="image" src="/static/image/center/12.png" mode=""></image>
  73. <text class="grid-text">我的订单</text>
  74. </uv-grid-item>
  75. <uv-grid-item @click="$utils.navigateTo('/pages_order/mine/address')">
  76. <image class="image" src="/static/image/center/12.png" mode=""></image>
  77. <text class="grid-text">我的地址</text>
  78. </uv-grid-item>
  79. <uv-grid-item @click="$utils.navigateTo('/pages_order/mine/individualTeam')">
  80. <image class="image" src="/static/image/center/8.png" mode=""></image>
  81. <text class="grid-text">我的分享</text>
  82. </uv-grid-item>
  83. <uv-grid-item @click="$utils.navigateTo('/pages_order/order/fastCreateOrder')">
  84. <image class="image" src="/static/image/center/7.png" mode=""></image>
  85. <text class="grid-text">快捷订单</text>
  86. </uv-grid-item>
  87. <uv-grid-item @click="$utils.navigateTo('/pages_order/mine/promotion')">
  88. <image class="image" src="/static/image/center/9.png" mode=""></image>
  89. <text class="grid-text">邀请好友</text>
  90. </uv-grid-item>
  91. <!-- <uv-grid-item @click="$utils.navigateTo('/pages_order/center/systemSet')">
  92. <image class="image" src="/static/image/center/6.png" mode=""></image>
  93. <text class="grid-text">系统设置</text>
  94. </uv-grid-item> -->
  95. <uv-grid-item @click="$utils.navigateTo('/pages_order/mine/help')">
  96. <image class="image" src="/static/image/center/7.png" mode=""></image>
  97. <text class="grid-text">帮助与反馈</text>
  98. </uv-grid-item>
  99. <uv-grid-item
  100. @click="$utils.navigateTo('/pages_order/mine/about')">
  101. <image class="image" src="/static/image/center/7.png" mode=""></image>
  102. <text class="grid-text">关于本程序</text>
  103. </uv-grid-item>
  104. <uv-grid-item @click="$store.commit('logout')">
  105. <image class="image" src="/static/image/center/logout.png" mode=""></image>
  106. <text class="grid-text">退出登录</text>
  107. </uv-grid-item>
  108. <!-- <uv-grid-item>
  109. <button open-type="contact" class="share">
  110. <image class="image" src="/static/image/center/5.png" mode=""></image>
  111. <text class="grid-text">联系客服</text>
  112. </button>
  113. </uv-grid-item> -->
  114. </uv-grid>
  115. </view>
  116. </view>
  117. <!-- <quick-order-entry
  118. ref="quickOrderEntry"
  119. bottom="50vh"
  120. /> -->
  121. <kefu/>
  122. <tabber select="center" />
  123. </view>
  124. </template>
  125. <script>
  126. import tabber from '@/components/base/tabbar.vue'
  127. import QuickOrderEntry from '@/components/QuickOrderEntry.vue'
  128. export default {
  129. components: {
  130. tabber,
  131. QuickOrderEntry,
  132. },
  133. computed: {
  134. isLogin(){
  135. return this.userInfo && this.userInfo.id
  136. }
  137. },
  138. data() {
  139. return {
  140. list: [],
  141. bannerList : [],
  142. }
  143. },
  144. onShow() {
  145. if(uni.getStorageSync('token')){
  146. // 刷新快捷下单信息
  147. this.$store.commit('getUserInfo')
  148. }
  149. this.getBanner()
  150. },
  151. methods: {
  152. // 获取轮播图
  153. getBanner() {
  154. this.$api('getBanner', res => {
  155. if (res.code == 200) {
  156. this.bannerList = res.result
  157. }
  158. })
  159. },
  160. }
  161. }
  162. </script>
  163. <style scoped lang="scss">
  164. .page {
  165. .warp {
  166. display: flex;
  167. align-items: center;
  168. justify-content: center;
  169. height: 100%;
  170. }
  171. .rect {
  172. width: 600rpx;
  173. height: 300rpx;
  174. background-color: #fff;
  175. border-radius: 20rpx;
  176. overflow: hidden;
  177. .title {
  178. padding: 10rpx 0 0 15rpx;
  179. background-color: #fd5100;
  180. color: #FFF;
  181. text-align: left;
  182. width: 100%;
  183. height: 18%;
  184. font-size: 36rpx;
  185. }
  186. .center {
  187. height: 40%;
  188. display: flex;
  189. justify-content: center;
  190. align-items: center;
  191. font-size: 36rpx;
  192. }
  193. .bottom {
  194. display: flex;
  195. justify-content: center;
  196. gap: 50rpx;
  197. }
  198. }
  199. }
  200. image {
  201. width: 100%;
  202. height: 100%;
  203. }
  204. .head {
  205. display: flex;
  206. background-color: #DC2828;
  207. padding: 0rpx 20rpx;
  208. align-items: center;
  209. position: relative;
  210. height: 300rpx;
  211. padding-top: 60rpx;
  212. .headImage {
  213. width: 120rpx;
  214. height: 120rpx;
  215. background-image: url(/static/image/center/3.png);
  216. background-size: 100% 100%;
  217. overflow: hidden;
  218. border-radius: 50%;
  219. margin-right: 40rpx;
  220. }
  221. .info {
  222. font-size: 28rpx;
  223. .vip {
  224. background-color: #FCCC92;
  225. color: #FA6239;
  226. width: 100rpx;
  227. display: flex;
  228. justify-content: center;
  229. align-items: center;
  230. height: 40rpx;
  231. border-radius: 20rpx;
  232. margin-top: 20rpx;
  233. }
  234. .name {
  235. font-size: 36rpx;
  236. color: #fff;
  237. margin-right: 20rpx;
  238. width: 240rpx;
  239. white-space: nowrap;
  240. overflow: hidden;
  241. text-overflow: ellipsis;
  242. }
  243. .tips {
  244. font-size: 26rpx;
  245. color: #fff;
  246. margin-top: 10rpx;
  247. }
  248. .login-btn {
  249. margin-top: 20rpx;
  250. background-color: #fff;
  251. color: #DC2828;
  252. padding: 10rpx 30rpx;
  253. border-radius: 30rpx;
  254. font-size: 28rpx;
  255. display: inline-block;
  256. width: 160rpx;
  257. text-align: center;
  258. }
  259. }
  260. .headBtn {
  261. color: #FFF;
  262. font-size: 26rpx;
  263. display: flex;
  264. align-items: center;
  265. }
  266. }
  267. .user {
  268. position: relative;
  269. z-index: 9;
  270. margin: 0 30rpx;
  271. margin-top: -60rpx;
  272. .line {
  273. display: flex;
  274. background-color: #fff;
  275. padding: 20rpx 0;
  276. align-content: center;
  277. margin-top: 20rpx;
  278. border-radius: 15rpx;
  279. .item {
  280. flex: 1;
  281. display: flex;
  282. justify-content: center;
  283. align-items: center;
  284. padding: 20rpx 0;
  285. &:nth-child(1) {
  286. border-right: 1px dotted #00000013;
  287. }
  288. .image {
  289. width: 150rpx;
  290. height: 135rpx;
  291. margin-right: 20rpx;
  292. }
  293. }
  294. .image-home{
  295. z-index: 1;
  296. width: 100%;
  297. }
  298. }
  299. .grid {
  300. flex-direction: column;
  301. font-size: 26rpx;
  302. padding: 20rpx;
  303. .title {
  304. margin-bottom: 30rpx;
  305. font-size: 28rpx;
  306. font-weight: 600;
  307. }
  308. .image {
  309. width: 50rpx;
  310. height: 50rpx;
  311. margin: 20rpx 0;
  312. }
  313. text {
  314. text-align: center;
  315. width: 120rpx;
  316. font-size: 24rpx;
  317. }
  318. .share {
  319. background: none;
  320. padding: 0;
  321. margin: 0;
  322. line-height: normal;
  323. border: none;
  324. display: flex;
  325. flex-direction: column;
  326. align-items: center;
  327. justify-content: center;
  328. &::after {
  329. border: none;
  330. }
  331. .image {
  332. width: 50rpx;
  333. height: 50rpx;
  334. margin: 20rpx 0;
  335. }
  336. .grid-text {
  337. text-align: center;
  338. width: 120rpx;
  339. font-size: 24rpx;
  340. }
  341. }
  342. }
  343. }
  344. </style>