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

319 lines
6.4 KiB

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