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

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