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

286 lines
6.2 KiB

9 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
7 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
7 months ago
8 months ago
8 months ago
9 months ago
8 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
8 months ago
8 months ago
9 months ago
8 months ago
8 months ago
7 months ago
9 months ago
8 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
9 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
8 months ago
9 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. this.$api('recruitPageList',this.params,res=>{
  113. uni.stopPullDownRefresh()
  114. if(res.code == 200) {
  115. this.totalPage = res.result.pages;
  116. this.ecruitList = [...this.ecruitList,...res.result.records];
  117. if(this.params.pageNo >= this.totalPage) {
  118. this.status = "nomore"
  119. }else {
  120. this.status = "loadmore"
  121. }
  122. }
  123. })
  124. },
  125. getBanner() {
  126. this.$api('banner',res=>{
  127. if(res.code == 200) {
  128. this.list = res.result
  129. }
  130. })
  131. },
  132. toRenzheng() {
  133. if(!this.isLogin) {
  134. return uni.showToast({
  135. title:'请先登录!',
  136. icon:'none'
  137. })
  138. }
  139. uni.navigateTo({
  140. url:'/pages_zlx/zlx-form'
  141. })
  142. },
  143. toInfo() {
  144. if(!this.isLogin) {
  145. uni.navigateTo({
  146. url:'/pages_login/wxLogin'
  147. })
  148. }else{
  149. uni.navigateTo({
  150. url:'/pages_my/user-info'
  151. })
  152. }
  153. },
  154. copy() {
  155. uni.setClipboardData({
  156. data:this.userInfo.id,
  157. success: () => {
  158. uni.showToast({
  159. title:'复制成功',
  160. icon:'none'
  161. })
  162. }
  163. })
  164. }
  165. }
  166. }
  167. </script>
  168. <style lang="scss">
  169. page {
  170. background-color: #060504;
  171. }
  172. </style>
  173. <style lang="scss">
  174. .page {
  175. .head-box {
  176. background: url('@/static/image/nav-bg.png') no-repeat;
  177. background-size: 100% 100%;
  178. width: 100%;
  179. height: 534rpx;
  180. position: absolute;
  181. z-index: -1;
  182. }
  183. .content {
  184. margin-top: 40rpx;
  185. padding: 0 30rpx;
  186. padding-top: calc(var(--status-bar-height) + 110rpx);
  187. .search-box {
  188. display: flex;
  189. align-items: center;
  190. margin-bottom: 32rpx;
  191. &-r {
  192. flex:1;
  193. }
  194. }
  195. .user-box {
  196. display: flex;
  197. align-items: center;
  198. margin-bottom: 33rpx;
  199. .user-msg {
  200. margin-left: 20rpx;
  201. .user-msg-top {
  202. font-weight: 600;
  203. font-size: 32rpx;
  204. color: #E6E6E6;
  205. display: flex;
  206. align-items: center;
  207. .level-box {
  208. width: 108rpx;
  209. height: 31rpx;
  210. background: RGBA(40, 19, 4, 1);
  211. border-radius: 16rpx;
  212. font-weight: 400;
  213. font-size: 20rpx;
  214. color: #FF9C00;
  215. text-align: center;
  216. margin-left: 14rpx;
  217. }
  218. }
  219. .id-box {
  220. color: #999999;
  221. font-size: 22rpx;
  222. margin-top: 20rpx;
  223. .copy-text {
  224. font-weight: 400;
  225. font-size: 22rpx;
  226. color: #E6E6E6;
  227. margin-left: 18rpx;
  228. }
  229. }
  230. }
  231. }
  232. .swipe-box {
  233. margin-bottom: 31rpx;
  234. }
  235. .zlr-box {
  236. background: url('@/static/image/member/zlr-bg.png') no-repeat;
  237. background-size: 100% 100%;
  238. height: 124rpx;
  239. display: flex;
  240. align-items: center;
  241. justify-content: space-between;
  242. padding: 0 40rpx 0 46rpx;
  243. margin-bottom: 32rpx;
  244. &-l {
  245. font-weight: 600;
  246. font-size: 32rpx;
  247. color: #FF3B47;
  248. display: flex;
  249. align-items: center;
  250. image {
  251. width: 72rpx;
  252. margin-right: 24rpx;
  253. }
  254. }
  255. &-r {
  256. font-weight: 400;
  257. font-size: 25rpx;
  258. color: #FF8E00;
  259. display: flex;
  260. align-items: center;
  261. image {
  262. width: 12rpx;
  263. margin-left: 12px;
  264. }
  265. }
  266. }
  267. .list-box {
  268. }
  269. }
  270. }
  271. </style>