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

329 lines
6.6 KiB

5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 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. },
  94. {
  95. src:require('@/static/image/center/line-4.png'),
  96. name:'用户协议',
  97. url:'/pages_login/fuwutiaokuan'
  98. },
  99. {
  100. src:require('@/static/image/center/line-5.png'),
  101. name:'隐私协议',
  102. url:'/pages_login/yinsixieyi'
  103. },
  104. {
  105. src:require('@/static/image/center/line-6.png'),
  106. name:'主理人协议'
  107. },
  108. {
  109. src:require('@/static/image/center/line-7.png'),
  110. name:'主理人签到',
  111. url:'/pages_my/zlx-qiandao'
  112. }
  113. ],
  114. vipType : ['普通会员', '黄金会员', '渠道商'],
  115. vipImage : ['vip_vip', 'vip_user', 'vip_shop']
  116. }
  117. },
  118. onShow() {
  119. },
  120. onLoad() {
  121. if(this.isLogin) {
  122. this.$store.commit('getUserInfo')
  123. }
  124. },
  125. onPageScroll(e) {
  126. if(e.scrollTop > 50) {
  127. this.bgColor = '#49070c'
  128. }else{
  129. this.bgColor = 'transparent'
  130. }
  131. },
  132. methods: {
  133. orderJump(type) {
  134. uni.switchTab({
  135. url:'/pages/index/cart'
  136. })
  137. uni.setStorageSync('currentState',type)
  138. },
  139. clickNo(){
  140. uni.showModal({
  141. title: '暂未开放',
  142. })
  143. },
  144. jump(item) {
  145. uni.navigateTo({
  146. url:item.url
  147. })
  148. },
  149. toInfo() {
  150. if(!this.isLogin) {
  151. uni.navigateTo({
  152. url:'/pages_login/wxLogin'
  153. })
  154. }else{
  155. uni.navigateTo({
  156. url:'/pages_my/user-info'
  157. })
  158. }
  159. }
  160. }
  161. }
  162. </script>
  163. <style lang="scss">
  164. page {
  165. background-color: #060504;
  166. }
  167. </style>
  168. <style scoped lang="scss">
  169. .page {
  170. .head-box {
  171. background: url('@/static/image/nav-bg.png') no-repeat;
  172. background-size: 100% 100%;
  173. width: 100%;
  174. height: 534rpx;
  175. position: absolute;
  176. z-index: -1;
  177. }
  178. .content {
  179. padding: 0 30rpx;
  180. padding-top: calc(var(--status-bar-height) + 110rpx);
  181. padding-bottom: 20rpx;
  182. }
  183. }
  184. .head {
  185. display: flex;
  186. align-items: center;
  187. margin-bottom: 40rpx;
  188. .headImage {
  189. width: 113rpx;
  190. height: 113rpx;
  191. background-image: url(/static/image/center/3.png);
  192. background-size: 100% 100%;
  193. overflow: hidden;
  194. border-radius: 50%;
  195. margin-right: 22rpx;
  196. image {
  197. width: 100%;
  198. height: 100%;
  199. }
  200. }
  201. .info {
  202. font-size: 28rpx;
  203. display: flex;
  204. flex-direction: column;
  205. gap: 10rpx;
  206. flex: 1;
  207. .vip {
  208. font-weight: 600;
  209. font-size: 32rpx;
  210. color: #E6E6E6;
  211. }
  212. .tips {
  213. font-weight: 400;
  214. font-size: 22rpx;
  215. color: #999999;
  216. }
  217. }
  218. }
  219. .setting {
  220. display: flex;
  221. align-items: center;
  222. justify-content: center;
  223. // position: absolute;
  224. // right: 50rpx;
  225. // top: 50rpx;
  226. width: 70rpx;
  227. height: 70rpx;
  228. background: #221D1D;
  229. border-radius: 20rpx;
  230. }
  231. .myOrder {
  232. font-weight: bold;
  233. font-size: 28rpx;
  234. color: #E6E6E6;
  235. }
  236. .order {
  237. display: flex;
  238. align-items: center;
  239. justify-content: center;
  240. height: 200rpx;
  241. background: #1B1713;
  242. border-radius: 20rpx 20rpx 20rpx 20rpx;
  243. opacity: 0.7;
  244. color: #999999;
  245. font-size: 23rpx;
  246. margin-top: 22rpx;
  247. margin-bottom: 33rpx;
  248. .box {
  249. display: flex;
  250. width: 100%;
  251. justify-content: space-around;
  252. .boxs {
  253. width: 33.33%;
  254. display: flex;
  255. flex-direction: column;
  256. align-items: center;
  257. border-right: 1px solid #2F2D2B;
  258. &:last-child {
  259. border: none;
  260. }
  261. image {
  262. width: 55rpx;
  263. height: 47rpx;
  264. margin-bottom: 24rpx;
  265. }
  266. }
  267. }
  268. }
  269. .user {
  270. margin-top: 25rpx;
  271. .grid {
  272. flex-direction: column;
  273. font-size: 26rpx;
  274. padding: 20rpx;
  275. .title {
  276. font-weight: 600;
  277. padding: 10rpx;
  278. border-left: 6rpx solid #A3D250;
  279. }
  280. }
  281. .cell-bottom {
  282. margin-top: 20rpx;
  283. margin-left: 2%;
  284. background-color: #1B1713;
  285. border-radius: 20rpx;
  286. .cell-line {
  287. height: 100rpx;
  288. display: flex;
  289. align-items: center;
  290. justify-content: space-between;
  291. padding: 0 30rpx;
  292. .line-l {
  293. display: flex;
  294. align-items: center;
  295. font-weight: 400;
  296. font-size: 29rpx;
  297. color: #E6E6E6;
  298. image {
  299. width: 45rpx;
  300. margin-right: 18rpx;
  301. }
  302. }
  303. }
  304. }
  305. }
  306. </style>