推广小程序前端代码
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.

331 lines
6.6 KiB

6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
  1. <template>
  2. <view class="page">
  3. <view class="head-box"></view>
  4. <uv-navbar title="个人中心" leftIcon=" " :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
  5. <view class="content">
  6. <view class="head" @click="toInfo">
  7. <view class="headImage" @click="toInfo">
  8. <image :src="userInfo.headImage" mode="aspectFill"></image>
  9. </view>
  10. <view class="info" @click="toInfo">
  11. <view class="vip">
  12. {{isLogin ? userInfo.nickName : '请点击登录'}}
  13. </view>
  14. <view class="tips">
  15. {{isLogin ? userInfo.phone : ''}}
  16. </view>
  17. </view>
  18. <view class="setting" @click="toInfo">
  19. <uv-icon name="edit-pen" size="50rpx" color="#fff"></uv-icon>
  20. </view>
  21. </view>
  22. <view class="myOrder">
  23. <view>我的活动</view>
  24. </view>
  25. <view class="order">
  26. <view class="box">
  27. <!-- @click="$utils.navigateTo('/pages_my/activeList') -->
  28. <view class="boxs"
  29. @click="orderJump(2)">
  30. <image src="@/static/image/center/order-1.png" mode="aspectFill" />
  31. <view>待参加</view>
  32. </view>
  33. <view class="boxs"
  34. @click="orderJump(3)">
  35. <image src="@/static/image/center/order-2.png" mode="aspectFill" />
  36. <view>已完成</view>
  37. </view>
  38. <view class="boxs"
  39. @click="orderJump(4)">
  40. <image src="@/static/image/center/order-3.png" mode="aspectFill" />
  41. <view>已取消</view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="myOrder">
  46. <view>我的工具</view>
  47. </view>
  48. <view class="user">
  49. <view class="cell-bottom">
  50. <view class="cell-line" v-for="(item,i) in cellList" :key="i" @click="jump(item)">
  51. <view class="line-l">
  52. <image :src="item.src" mode="widthFix"></image>
  53. <view>{{item.name}}</view>
  54. </view>
  55. <uv-icon size="35" name="arrow-right"></uv-icon>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. <!-- <customerServicePopup ref="customerServicePopup"/> -->
  61. <tabber select="center" />
  62. </view>
  63. </template>
  64. <script>
  65. import tabber from '@/components/base/tabbar.vue'
  66. import { mapState,mapGetters } from 'vuex'
  67. import customerServicePopup from '@/components/config/customerServicePopup.vue'
  68. export default {
  69. components: {
  70. tabber,
  71. customerServicePopup,
  72. },
  73. computed: {
  74. ...mapGetters(["userInfo","isLogin"]),
  75. },
  76. data() {
  77. return {
  78. bgColor:'transparent',
  79. cellList:[
  80. {
  81. src:require('@/static/image/center/line-1.png'),
  82. name:'开票记录',
  83. url:'/pages_order/invoiceRecords'
  84. },
  85. {
  86. src:require('@/static/image/center/line-2.png'),
  87. name:'我的收藏',
  88. url:'/pages_my/collection'
  89. },
  90. {
  91. src:require('@/static/image/center/line-3.png'),
  92. name:'关于我们',
  93. url:'/pages_my/guanyuwomen'
  94. },
  95. {
  96. src:require('@/static/image/center/line-4.png'),
  97. name:'用户协议',
  98. url:'/pages_login/fuwutiaokuan'
  99. },
  100. {
  101. src:require('@/static/image/center/line-5.png'),
  102. name:'隐私协议',
  103. url:'/pages_login/yinsixieyi'
  104. },
  105. {
  106. src:require('@/static/image/center/line-6.png'),
  107. name:'主理人协议',
  108. url:'/pages_my/zlx-xieyi'
  109. },
  110. {
  111. src:require('@/static/image/center/line-7.png'),
  112. name:'主理人签到',
  113. url:'/pages_my/zlx-qiandao'
  114. }
  115. ],
  116. vipType : ['普通会员', '黄金会员', '渠道商'],
  117. vipImage : ['vip_vip', 'vip_user', 'vip_shop']
  118. }
  119. },
  120. onShow() {
  121. },
  122. onLoad() {
  123. if(this.isLogin) {
  124. this.$store.commit('getUserInfo')
  125. }
  126. },
  127. onPageScroll(e) {
  128. if(e.scrollTop > 50) {
  129. this.bgColor = '#49070c'
  130. }else{
  131. this.bgColor = 'transparent'
  132. }
  133. },
  134. methods: {
  135. orderJump(type) {
  136. uni.switchTab({
  137. url:'/pages/index/cart'
  138. })
  139. uni.setStorageSync('currentState',type)
  140. },
  141. clickNo(){
  142. uni.showModal({
  143. title: '暂未开放',
  144. })
  145. },
  146. jump(item) {
  147. uni.navigateTo({
  148. url:item.url
  149. })
  150. },
  151. toInfo() {
  152. if(!this.isLogin) {
  153. uni.navigateTo({
  154. url:'/pages_login/wxLogin'
  155. })
  156. }else{
  157. uni.navigateTo({
  158. url:'/pages_my/user-info'
  159. })
  160. }
  161. }
  162. }
  163. }
  164. </script>
  165. <style lang="scss">
  166. page {
  167. background-color: #060504;
  168. }
  169. </style>
  170. <style scoped lang="scss">
  171. .page {
  172. .head-box {
  173. background: url('@/static/image/nav-bg.png') no-repeat;
  174. background-size: 100% 100%;
  175. width: 100%;
  176. height: 534rpx;
  177. position: absolute;
  178. z-index: -1;
  179. }
  180. .content {
  181. padding: 0 30rpx;
  182. padding-top: calc(var(--status-bar-height) + 110rpx);
  183. padding-bottom: 20rpx;
  184. }
  185. }
  186. .head {
  187. display: flex;
  188. align-items: center;
  189. margin-bottom: 40rpx;
  190. .headImage {
  191. width: 113rpx;
  192. height: 113rpx;
  193. background-image: url(/static/image/center/3.png);
  194. background-size: 100% 100%;
  195. overflow: hidden;
  196. border-radius: 50%;
  197. margin-right: 22rpx;
  198. image {
  199. width: 100%;
  200. height: 100%;
  201. }
  202. }
  203. .info {
  204. font-size: 28rpx;
  205. display: flex;
  206. flex-direction: column;
  207. gap: 10rpx;
  208. flex: 1;
  209. .vip {
  210. font-weight: 600;
  211. font-size: 32rpx;
  212. color: #E6E6E6;
  213. }
  214. .tips {
  215. font-weight: 400;
  216. font-size: 22rpx;
  217. color: #999999;
  218. }
  219. }
  220. }
  221. .setting {
  222. display: flex;
  223. align-items: center;
  224. justify-content: center;
  225. // position: absolute;
  226. // right: 50rpx;
  227. // top: 50rpx;
  228. width: 70rpx;
  229. height: 70rpx;
  230. background: #221D1D;
  231. border-radius: 20rpx;
  232. }
  233. .myOrder {
  234. font-weight: bold;
  235. font-size: 28rpx;
  236. color: #E6E6E6;
  237. }
  238. .order {
  239. display: flex;
  240. align-items: center;
  241. justify-content: center;
  242. height: 200rpx;
  243. background: #1B1713;
  244. border-radius: 20rpx 20rpx 20rpx 20rpx;
  245. opacity: 0.7;
  246. color: #999999;
  247. font-size: 23rpx;
  248. margin-top: 22rpx;
  249. margin-bottom: 33rpx;
  250. .box {
  251. display: flex;
  252. width: 100%;
  253. justify-content: space-around;
  254. .boxs {
  255. width: 33.33%;
  256. display: flex;
  257. flex-direction: column;
  258. align-items: center;
  259. border-right: 1px solid #2F2D2B;
  260. &:last-child {
  261. border: none;
  262. }
  263. image {
  264. width: 55rpx;
  265. height: 47rpx;
  266. margin-bottom: 24rpx;
  267. }
  268. }
  269. }
  270. }
  271. .user {
  272. margin-top: 25rpx;
  273. .grid {
  274. flex-direction: column;
  275. font-size: 26rpx;
  276. padding: 20rpx;
  277. .title {
  278. font-weight: 600;
  279. padding: 10rpx;
  280. border-left: 6rpx solid #A3D250;
  281. }
  282. }
  283. .cell-bottom {
  284. margin-top: 20rpx;
  285. margin-left: 2%;
  286. background-color: #1B1713;
  287. border-radius: 20rpx;
  288. .cell-line {
  289. height: 100rpx;
  290. display: flex;
  291. align-items: center;
  292. justify-content: space-between;
  293. padding: 0 30rpx;
  294. .line-l {
  295. display: flex;
  296. align-items: center;
  297. font-weight: 400;
  298. font-size: 29rpx;
  299. color: #E6E6E6;
  300. image {
  301. width: 45rpx;
  302. margin-right: 18rpx;
  303. }
  304. }
  305. }
  306. }
  307. }
  308. </style>