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

275 lines
6.0 KiB

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