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

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