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

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