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

268 lines
5.8 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
  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 @search="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> {{isLogin ? userInfo.nickName : '请点击登录'}}</view>
  16. <!-- <view class="level-box">普通用户</view> -->
  17. </view>
  18. <view class="id-box">
  19. <text>{{isLogin ? 'ID:' + userInfo.id : ''}}</text>
  20. <text class="copy-text" @click="copy" v-if="isLogin">复制</text>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="swipe-box">
  25. <uv-swiper :list="list" keyName="image" height="280rpx" radius="30rpx" bgColor="transparent" indicator indicatorMode="dot"></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 v-for="(item,i) in ecruitList" :key="i" :item="item"></zhaomu-item>
  39. <uv-load-more :status="status" fontSize="24rpx" dashed line />
  40. </view>
  41. </view>
  42. <tabber select="member" />
  43. </view>
  44. </template>
  45. <script>
  46. import tabber from '@/components/base/tabbar.vue'
  47. import zhaomuItem from '@/components/zhaomu/zhaomu-item.vue'
  48. import { mapState,mapGetters } from 'vuex'
  49. export default {
  50. components: {
  51. tabber,
  52. zhaomuItem
  53. },
  54. data() {
  55. return {
  56. params:{
  57. title:'',
  58. pageNo:1,
  59. pageSize:10
  60. },
  61. totalPage:0,
  62. status:'loading',
  63. bgColor:'transparent',
  64. list: [],
  65. ecruitList:[]
  66. };
  67. },
  68. computed: {
  69. ...mapGetters(["userInfo","isLogin"]),
  70. },
  71. onLoad() {
  72. this.getList()
  73. this.getBanner()
  74. },
  75. onShow() {
  76. },
  77. onPageScroll(e) {
  78. if(e.scrollTop > 50) {
  79. this.bgColor ='#49070c'
  80. }else{
  81. this.bgColor ='transparent'
  82. }
  83. },
  84. onReachBottom() {
  85. if(this.params.pageNo < this.totalPage) {
  86. this.params.pageNo ++
  87. this.getList()
  88. }
  89. },
  90. methods:{
  91. search() {
  92. this.params.pageNo = 1;
  93. this.ecruitList = []
  94. this.getList()
  95. },
  96. getList() {
  97. this.status = "loading"
  98. this.$api('recruitPageList',this.params,res=>{
  99. if(res.code == 200) {
  100. this.totalPage = res.result.pages;
  101. this.ecruitList = [...this.ecruitList,...res.result.records];
  102. if(this.params.pageNo >= this.totalPage) {
  103. this.status = "nomore"
  104. }else {
  105. this.status = "loadmore"
  106. }
  107. }
  108. })
  109. },
  110. getBanner() {
  111. this.$api('banner',res=>{
  112. if(res.code == 200) {
  113. this.list = res.result
  114. }
  115. })
  116. },
  117. toRenzheng() {
  118. if(!this.isLogin) {
  119. return uni.showToast({
  120. title:'请先登录!',
  121. icon:'none'
  122. })
  123. }
  124. uni.navigateTo({
  125. url:'/pages_zlx/zlx-form'
  126. })
  127. },
  128. toInfo() {
  129. if(!this.isLogin) {
  130. uni.navigateTo({
  131. url:'/pages_login/wxLogin'
  132. })
  133. }else{
  134. uni.navigateTo({
  135. url:'/pages_my/user-info'
  136. })
  137. }
  138. },
  139. copy() {
  140. uni.setClipboardData({
  141. data:this.userInfo.id,
  142. success: () => {
  143. uni.showToast({
  144. title:'复制成功',
  145. icon:'none'
  146. })
  147. }
  148. })
  149. }
  150. }
  151. }
  152. </script>
  153. <style lang="scss">
  154. page {
  155. background-color: #060504;
  156. }
  157. </style>
  158. <style lang="scss">
  159. .page {
  160. .head-box {
  161. background: url('@/static/image/nav-bg.png') no-repeat;
  162. background-size: 100% 100%;
  163. width: 100%;
  164. height: 534rpx;
  165. position: absolute;
  166. z-index: -1;
  167. }
  168. .content {
  169. padding: 0 30rpx;
  170. padding-top: calc(var(--status-bar-height) + 110rpx);
  171. .search-box {
  172. display: flex;
  173. align-items: center;
  174. margin-bottom: 32rpx;
  175. &-r {
  176. flex:1;
  177. }
  178. }
  179. .user-box {
  180. display: flex;
  181. align-items: center;
  182. margin-bottom: 33rpx;
  183. .user-msg {
  184. margin-left: 20rpx;
  185. .user-msg-top {
  186. font-weight: 600;
  187. font-size: 32rpx;
  188. color: #E6E6E6;
  189. display: flex;
  190. align-items: center;
  191. .level-box {
  192. width: 108rpx;
  193. height: 31rpx;
  194. background: RGBA(40, 19, 4, 1);
  195. border-radius: 16rpx;
  196. font-weight: 400;
  197. font-size: 20rpx;
  198. color: #FF9C00;
  199. text-align: center;
  200. margin-left: 14rpx;
  201. }
  202. }
  203. .id-box {
  204. color: #999999;
  205. font-size: 22rpx;
  206. margin-top: 20rpx;
  207. .copy-text {
  208. font-weight: 400;
  209. font-size: 22rpx;
  210. color: #E6E6E6;
  211. margin-left: 18rpx;
  212. }
  213. }
  214. }
  215. }
  216. .swipe-box {
  217. margin-bottom: 31rpx;
  218. }
  219. .zlr-box {
  220. background: url('@/static/image/member/zlr-bg.png') no-repeat;
  221. background-size: 100% 100%;
  222. height: 124rpx;
  223. display: flex;
  224. align-items: center;
  225. justify-content: space-between;
  226. padding: 0 40rpx 0 46rpx;
  227. margin-bottom: 32rpx;
  228. &-l {
  229. font-weight: 600;
  230. font-size: 32rpx;
  231. color: #FF3B47;
  232. display: flex;
  233. align-items: center;
  234. image {
  235. width: 72rpx;
  236. margin-right: 24rpx;
  237. }
  238. }
  239. &-r {
  240. font-weight: 400;
  241. font-size: 25rpx;
  242. color: #FF8E00;
  243. display: flex;
  244. align-items: center;
  245. image {
  246. width: 12rpx;
  247. margin-left: 12px;
  248. }
  249. }
  250. }
  251. .list-box {
  252. }
  253. }
  254. }
  255. </style>