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

235 lines
4.9 KiB

6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 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="search-box">
  7. <view class="search-box-r">
  8. <uv-search placeholder="搜索感兴趣的活动" v-model="params.title" shape="square" :showAction="false" color="#fff" placeholderColor="#BDABAC" :clearabled="false" searchIconColor="#fff" searchIconSize="50rpx" bgColor="#4A2A2B" height="63rpx"></uv-search>
  9. </view>
  10. </view>
  11. <view class="user-box" @click="toInfo">
  12. <uv-avatar :src="userInfo.headImage" size="98rpx" shape="circle"></uv-avatar>
  13. <view class="user-msg">
  14. <view class="user-msg-top">
  15. <view> {{token ? userInfo.nickName : '请点击登录'}}</view>
  16. <!-- <view class="level-box">普通用户</view> -->
  17. </view>
  18. <view class="id-box">
  19. <text>{{token ? userInfo.id : ''}}</text>
  20. <text class="copy-text" @click="copy" v-if="token">复制</text>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="swipe-box">
  25. <uv-swiper :list="list" height="280rpx" bgColor="transparent" radius="30rpx"></uv-swiper>
  26. </view>
  27. <view class="zlr-box" @click="toRenzheng">
  28. <view class="zlr-box-l">
  29. <image src="@/static/image/member/zlr-icon.png" mode="widthFix"></image>
  30. <view>主理人认证</view>
  31. </view>
  32. <view class="zlr-box-r">
  33. <view>获取更多身份特权</view>
  34. <image src="@/static/image/member/zlr-arrow.png" mode="widthFix"></image>
  35. </view>
  36. </view>
  37. <view class="list-box">
  38. <zhaomu-item></zhaomu-item>
  39. </view>
  40. </view>
  41. <tabber select="member" />
  42. </view>
  43. </template>
  44. <script>
  45. import tabber from '@/components/base/tabbar.vue'
  46. import zhaomuItem from '@/components/zhaomu/zhaomu-item.vue'
  47. import { mapState,mapGetters } from 'vuex'
  48. export default {
  49. components: {
  50. tabber,
  51. zhaomuItem
  52. },
  53. data() {
  54. return {
  55. params:{
  56. title:'',
  57. pageNo:1,
  58. pageSize:10
  59. },
  60. bgColor:'transparent',
  61. list: [
  62. 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
  63. ]
  64. };
  65. },
  66. computed: {
  67. ...mapState(['token']),
  68. ...mapGetters(["userInfo"]),
  69. },
  70. onLoad() {
  71. this.getList()
  72. },
  73. onShow() {
  74. },
  75. onPageScroll(e) {
  76. if(e.scrollTop > 50) {
  77. this.bgColor ='#49070c'
  78. }else{
  79. this.bgColor ='transparent'
  80. }
  81. },
  82. methods:{
  83. getList() {
  84. this.$api('recruitPageList',this.params,res=>{
  85. if(res.code == 200) {
  86. }
  87. })
  88. },
  89. toRenzheng() {
  90. uni.navigateTo({
  91. url:'/pages_zlx/zlx-form'
  92. })
  93. },
  94. toInfo() {
  95. if(!this.token) {
  96. uni.navigateTo({
  97. url:'/pages_login/wxLogin'
  98. })
  99. }else{
  100. uni.navigateTo({
  101. url:'/pages_my/user-info'
  102. })
  103. }
  104. },
  105. copy() {
  106. uni.setClipboardData({
  107. data:this.userInfo.id,
  108. success: () => {
  109. uni.showToast({
  110. title:'复制成功',
  111. icon:'none'
  112. })
  113. }
  114. })
  115. }
  116. }
  117. }
  118. </script>
  119. <style lang="scss">
  120. page {
  121. background-color: #060504;
  122. }
  123. </style>
  124. <style lang="scss">
  125. .page {
  126. .head-box {
  127. background: url('@/static/image/nav-bg.png') no-repeat;
  128. background-size: 100% 100%;
  129. width: 100%;
  130. height: 534rpx;
  131. position: absolute;
  132. z-index: -1;
  133. }
  134. .content {
  135. padding: 0 30rpx;
  136. padding-top: calc(var(--status-bar-height) + 110rpx);
  137. .search-box {
  138. display: flex;
  139. align-items: center;
  140. margin-bottom: 32rpx;
  141. &-r {
  142. flex:1;
  143. }
  144. }
  145. .user-box {
  146. display: flex;
  147. align-items: center;
  148. margin-bottom: 33rpx;
  149. .user-msg {
  150. margin-left: 20rpx;
  151. .user-msg-top {
  152. font-weight: 600;
  153. font-size: 32rpx;
  154. color: #E6E6E6;
  155. display: flex;
  156. align-items: center;
  157. .level-box {
  158. width: 108rpx;
  159. height: 31rpx;
  160. background: RGBA(40, 19, 4, 1);
  161. border-radius: 16rpx;
  162. font-weight: 400;
  163. font-size: 20rpx;
  164. color: #FF9C00;
  165. text-align: center;
  166. margin-left: 14rpx;
  167. }
  168. }
  169. .id-box {
  170. color: #999999;
  171. font-size: 22rpx;
  172. margin-top: 20rpx;
  173. .copy-text {
  174. font-weight: 400;
  175. font-size: 22rpx;
  176. color: #E6E6E6;
  177. margin-left: 18rpx;
  178. }
  179. }
  180. }
  181. }
  182. .swipe-box {
  183. margin-bottom: 31rpx;
  184. }
  185. .zlr-box {
  186. background: url('@/static/image/member/zlr-bg.png') no-repeat;
  187. background-size: 100% 100%;
  188. height: 124rpx;
  189. display: flex;
  190. align-items: center;
  191. justify-content: space-between;
  192. padding: 0 40rpx 0 46rpx;
  193. margin-bottom: 32rpx;
  194. &-l {
  195. font-weight: 600;
  196. font-size: 32rpx;
  197. color: #FF3B47;
  198. display: flex;
  199. align-items: center;
  200. image {
  201. width: 72rpx;
  202. margin-right: 24rpx;
  203. }
  204. }
  205. &-r {
  206. font-weight: 400;
  207. font-size: 25rpx;
  208. color: #FF8E00;
  209. display: flex;
  210. align-items: center;
  211. image {
  212. width: 12rpx;
  213. margin-left: 12px;
  214. }
  215. }
  216. }
  217. .list-box {
  218. }
  219. }
  220. }
  221. </style>