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

313 lines
6.3 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 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. {{token ? userInfo.nickName : '请点击登录'}}
  13. </view>
  14. <view class="tips">
  15. {{token ? userInfo.phone : ''}}
  16. </view>
  17. </view>
  18. <view class="setting" @click="jump({url:'/pages_my/user-msg'})">
  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(["token","userInfo"]),
  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. console.log('this.userInfo: ',this.userInfo);
  118. },
  119. onPageScroll(e) {
  120. if(e.scrollTop > 50) {
  121. this.bgColor = '#49070c'
  122. }else{
  123. this.bgColor = 'transparent'
  124. }
  125. },
  126. methods: {
  127. clickNo(){
  128. uni.showModal({
  129. title: '暂未开放',
  130. })
  131. },
  132. jump(item) {
  133. uni.navigateTo({
  134. url:item.url
  135. })
  136. },
  137. toInfo() {
  138. if(!this.token) {
  139. uni.navigateTo({
  140. url:'/pages_login/wxLogin'
  141. })
  142. }else{
  143. uni.navigateTo({
  144. url:'/pages_my/user-info'
  145. })
  146. }
  147. }
  148. }
  149. }
  150. </script>
  151. <style lang="scss">
  152. page {
  153. background-color: #060504;
  154. }
  155. </style>
  156. <style scoped lang="scss">
  157. .page {
  158. .head-box {
  159. background: url('@/static/image/nav-bg.png') no-repeat;
  160. background-size: 100% 100%;
  161. width: 100%;
  162. height: 534rpx;
  163. position: absolute;
  164. z-index: -1;
  165. }
  166. .content {
  167. padding: 0 30rpx;
  168. padding-top: calc(var(--status-bar-height) + 110rpx);
  169. padding-bottom: 20rpx;
  170. }
  171. }
  172. .head {
  173. display: flex;
  174. align-items: center;
  175. margin-bottom: 40rpx;
  176. .headImage {
  177. width: 113rpx;
  178. height: 113rpx;
  179. background-image: url(/static/image/center/3.png);
  180. background-size: 100% 100%;
  181. overflow: hidden;
  182. border-radius: 50%;
  183. margin-right: 22rpx;
  184. }
  185. .info {
  186. font-size: 28rpx;
  187. display: flex;
  188. flex-direction: column;
  189. gap: 10rpx;
  190. flex: 1;
  191. .vip {
  192. font-weight: 600;
  193. font-size: 32rpx;
  194. color: #E6E6E6;
  195. }
  196. .tips {
  197. font-weight: 400;
  198. font-size: 22rpx;
  199. color: #999999;
  200. }
  201. }
  202. }
  203. .setting {
  204. display: flex;
  205. align-items: center;
  206. justify-content: center;
  207. // position: absolute;
  208. // right: 50rpx;
  209. // top: 50rpx;
  210. width: 70rpx;
  211. height: 70rpx;
  212. background: #221D1D;
  213. border-radius: 20rpx;
  214. }
  215. .myOrder {
  216. font-weight: bold;
  217. font-size: 28rpx;
  218. color: #E6E6E6;
  219. }
  220. .order {
  221. display: flex;
  222. align-items: center;
  223. justify-content: center;
  224. height: 200rpx;
  225. background: #1B1713;
  226. border-radius: 20rpx 20rpx 20rpx 20rpx;
  227. opacity: 0.7;
  228. color: #999999;
  229. font-size: 23rpx;
  230. margin-top: 22rpx;
  231. margin-bottom: 33rpx;
  232. .box {
  233. display: flex;
  234. width: 100%;
  235. justify-content: space-around;
  236. .boxs {
  237. width: 33.33%;
  238. display: flex;
  239. flex-direction: column;
  240. align-items: center;
  241. border-right: 1px solid #2F2D2B;
  242. &:last-child {
  243. border: none;
  244. }
  245. image {
  246. width: 55rpx;
  247. height: 47rpx;
  248. margin-bottom: 24rpx;
  249. }
  250. }
  251. }
  252. }
  253. .user {
  254. margin-top: 25rpx;
  255. .grid {
  256. flex-direction: column;
  257. font-size: 26rpx;
  258. padding: 20rpx;
  259. .title {
  260. font-weight: 600;
  261. padding: 10rpx;
  262. border-left: 6rpx solid #A3D250;
  263. }
  264. }
  265. .cell-bottom {
  266. margin-top: 20rpx;
  267. margin-left: 2%;
  268. background-color: #1B1713;
  269. border-radius: 20rpx;
  270. .cell-line {
  271. height: 100rpx;
  272. display: flex;
  273. align-items: center;
  274. justify-content: space-between;
  275. padding: 0 30rpx;
  276. .line-l {
  277. display: flex;
  278. align-items: center;
  279. font-weight: 400;
  280. font-size: 29rpx;
  281. color: #E6E6E6;
  282. image {
  283. width: 45rpx;
  284. margin-right: 18rpx;
  285. }
  286. }
  287. }
  288. }
  289. }
  290. </style>