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

56 lines
1.2 KiB

6 months ago
3 months ago
3 months ago
3 months ago
6 months ago
3 months ago
6 months ago
3 months ago
6 months ago
6 months ago
3 months ago
6 months ago
  1. <template>
  2. <view class="u-page se-w-vw-100">
  3. <u-subsection bg-color="#ff7a31" button-color="#f0b744" active-color="#ff7a31" inactive-color="#ffffff" :list="list" :current="current" @change="sectionChange"></u-subsection>
  4. <!-- 招聘订单 -->
  5. <enterpriseBox ref="enterpriseBoxRef" v-if="current==0" />
  6. <!--求职订单 -->
  7. <masterBox ref="masterBoxRef" v-if="current==1" />
  8. </view>
  9. </template>
  10. <script>
  11. import masterBox from "./component/master.vue"
  12. import enterpriseBox from "./component/enterprise.vue"
  13. export default{
  14. components:{
  15. enterpriseBox,
  16. masterBox
  17. },
  18. data(){
  19. return{
  20. list: [
  21. {
  22. name: '招聘订单'
  23. },
  24. {
  25. name: '求职订单'
  26. }
  27. ],
  28. current: 0,
  29. }
  30. },
  31. onReachBottom() {
  32. if(this.current==0){
  33. this.$refs.enterpriseBoxRef.onReach();
  34. }else if(this.current==1){
  35. this.$refs.masterBoxRef.onReach();
  36. }
  37. },
  38. onPullDownRefresh() {
  39. if(this.current==0){
  40. this.$refs.enterpriseBoxRef.onRefresh();
  41. }else if(this.current==1){
  42. this.$refs.masterBoxRef.onRefresh();
  43. }
  44. },
  45. methods:{
  46. sectionChange(index){
  47. this.current=index
  48. }
  49. }
  50. }
  51. </script>
  52. <style>
  53. </style>