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

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