good-floorMore.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <view class="container floor clearfix">
  3. <view class='navbar-wrap'>
  4. <view class="gosearch-btn" @click="this.$api.navigateTo(clickPath)">
  5. <view class="search-icon">
  6. <text class="iconfont icon-iconfonticonfontsousuo1"></text>
  7. </view>
  8. <view class="search-text">{{hotSearchText}}</view>
  9. </view>
  10. </view>
  11. <tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading ="true" :loadingType="5"></tui-skeleton>
  12. <!-- 楼层 -->
  13. <view class="container-section tui-skeleton">
  14. <template v-if="page.type == 1">
  15. <templateA :pageData="page" :userIdentity="userIdentity"></templateA>
  16. </template>
  17. <template v-if="page.type == 2">
  18. <templateB :pageData="page" :userIdentity="userIdentity"></templateB>
  19. </template>
  20. <template v-if="page.type == 3">
  21. <templateC :pageData="page" :userIdentity="userIdentity"></templateC>
  22. </template>
  23. <template v-if="page.type == 4">
  24. <templateD :pageData="page" :userIdentity="userIdentity"></templateD>
  25. </template>
  26. <template v-if="page.type == 5 || page.type == 6">
  27. <templateE :pageData="page" :userIdentity="userIdentity"></templateE>
  28. </template>
  29. <template v-if="page.type == 7">
  30. <templateF :pageData="page" :userIdentity="userIdentity"></templateF>
  31. </template>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. import { mapState,mapMutations} from 'vuex';
  37. import templateA from '@/components/cm-module/pageFloorTemplate/templateA.vue'
  38. import templateB from '@/components/cm-module/pageFloorTemplate/templateB.vue'
  39. import templateC from '@/components/cm-module/pageFloorTemplate/templateC.vue'
  40. import templateD from '@/components/cm-module/pageFloorTemplate/templateD.vue'
  41. import templateE from '@/components/cm-module/pageFloorTemplate/templateE.vue'
  42. import templateF from '@/components/cm-module/pageFloorTemplate/templateF.vue'
  43. import { pageList } from '@/common/json/data.json.js' //本地数据
  44. export default{
  45. components:{
  46. templateA,
  47. templateB,
  48. templateC,
  49. templateD,
  50. templateE,
  51. templateF
  52. },
  53. data(){
  54. return{
  55. clickPath:'/pages/search/search',
  56. hotSearchText:'搜索商品/供应商/项目仪器',
  57. userIdentity:0,
  58. skeletonShow:true,
  59. navBarsList:[],
  60. page:pageList[5],//楼层
  61. isRequest:false
  62. }
  63. },
  64. onLoad(option) {
  65. this.$api.getComStorage('userInfo').then((resolve) =>{
  66. this.clubStatus = resolve.clubStatus
  67. this.userID = resolve.userID ? resolve.userID : 0;
  68. this.shopId = resolve.shopID ? resolve.shopID : 0;
  69. this.userIdentity = resolve.userIdentity
  70. // this.getListFromServer();
  71. }).catch(error =>{
  72. // this.getListFromServer();
  73. })
  74. setTimeout(()=>{
  75. this.skeletonShow = false
  76. },2000)
  77. },
  78. computed: {
  79. ...mapState(['hasLogin','userInfo','identity'])
  80. },
  81. methods:{
  82. GetHomeInit(){//金刚区分类
  83. this.CommonService.GetFirstClassly({typeSort:1,source:'crm'}).then(response =>{
  84. let data = response.data
  85. this.navBarsList = data
  86. this.isRequest =true
  87. }).catch(error =>{
  88. this.$util.msg(error.msg,2000)
  89. })
  90. }
  91. },
  92. onPullDownRefresh() {
  93. setTimeout(() => {
  94. uni.stopPullDownRefresh()
  95. }, 200)
  96. },
  97. onShow() {
  98. this.GetHomeInit()
  99. }
  100. }
  101. </script>
  102. <style lang="scss">
  103. page{
  104. background-color: #FFFFFF;
  105. }
  106. .container-home{
  107. width: 100%;
  108. height: auto;
  109. }
  110. .container-section{
  111. width: 100%;
  112. height: auto;
  113. background-color: #F7F7F7;
  114. box-sizing: border-box;
  115. padding: 0 24rpx;
  116. }
  117. .navbar-wrap {
  118. width: 100%;
  119. height: 116rpx;
  120. box-sizing: border-box;
  121. background: #FFFFFF;
  122. padding: 25rpx 24rpx;
  123. .gosearch-btn{
  124. width: 100%;
  125. height: 100%;
  126. border-radius: 40rpx;
  127. font-size: 28rpx;
  128. line-height: 66rpx;
  129. color: #8A8A8A;
  130. background: #f7f7f7;
  131. position: relative;
  132. box-sizing: border-box;
  133. padding-left: 66rpx;
  134. .search-icon{
  135. width: 66rpx;
  136. height: 66rpx;
  137. position:absolute ;
  138. left: 0;
  139. top: 2rpx;
  140. text-align: center;
  141. line-height: 66rpx;
  142. .icon-iconfonticonfontsousuo1{
  143. margin:0 6rpx;
  144. font-size: $font-size-34;
  145. color: #8A8A8A;
  146. z-index: 10;
  147. }
  148. }
  149. .search-text{
  150. font-size: $font-size-24;
  151. line-height: 66rpx;
  152. color: #8A8A8A;
  153. }
  154. }
  155. }
  156. </style>