home.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. <template>
  2. <view>
  3. <view class="header">
  4. <view class="flex justify-between map">
  5. <view class='Medium flex align-item-center locationwrap' @click='naviageToPage("/pages/grain_pulse/position/position")'>
  6. <image class='location' src="../../static/img/liangmai/icon_ditu.png" mode=""></image>
  7. 黑龙江中天昊元…
  8. </view>
  9. <view @click='naviageToPage("/pages/grain_pulse/distribution/distribution")' class='Regular flex align-item-center distribution justify-center'>
  10. <image class='cangku' src="../../static/img/liangmai/cangku.png" mode=""></image>
  11. 分布
  12. </view>
  13. </view>
  14. <view class="cu-bar search">
  15. <view class="search-form round" @click="naviageToPage('/pages/grain_pulse/search')">
  16. <image class='icon-scarch' src="../../static/img/liangmai/sousuo.png" mode=""></image>
  17. <view class='Regular'> 请输入货名或标题</view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="content" >
  22. <view @click='friendcircle' class="friendcircle">
  23. <view class='title flex align-item-center Medium'>
  24. <image class='icon-friendcircle' src="../../static/img/liangmai/icon.png" mode=""></image>
  25. 圈友说
  26. </view>
  27. <view class='friendcircle-content flex justify-between'>
  28. <image class='bg' src="../../static/img/liangmai/bg.png" mode=""></image>
  29. <view class='friendcircle-content-right'>
  30. <view class='friendcircle-content-right-item Regular flex align-item-center'><image class='headportrait' src="../../static/img/add@3x.png" mode=""></image>中天昊元粮库中天昊元…</view>
  31. <view class='friendcircle-content-right-item Regular flex align-item-center'><image class='headportrait' src="../../static/img/add@3x.png" mode=""></image>中天昊元粮库中天昊元…</view>
  32. <view class='friendcircle-content-right-item Regular flex align-item-center'><image class='headportrait' src="../../static/img/add@3x.png" mode=""></image>中天昊元粮库中天昊元…</view>
  33. <view class='friendcircle-content-right-item Regular flex align-item-center'><image class='headportrait' src="../../static/img/add@3x.png" mode=""></image>中天昊元粮库中天昊元…</view>
  34. </view>
  35. </view>
  36. </view>
  37. <scroll-view scroll-x="true" scroll-with-animation="true" class='list-type'>
  38. <view v-for='item in searchTypes' @click='mainBusinessTypecahnge(item)' :class='mainBusinessTypeKey==item.value?"Semibold active":"Regular"' class="typeitem">{{item.name}}</view>
  39. </scroll-view>
  40. <view v-for='item in datalist' @click='todetails(item)' class="listitem">
  41. <view class="flex">
  42. <image class='listitem-left' :src="item.attachmentAddress" mode=""></image>
  43. <view class="listitem-right">
  44. <view class="companyname Medium">{{item.compName}}</view>
  45. <view class='Regular introduce'>{{item.companyProfile}}</view>
  46. </view>
  47. </view>
  48. <view class="flex align-item-center justify-between">
  49. <view @click.stop='naviageToPage("/pages/grain_pulse/localtion/localtion")' class='companylocation flex align-item-center Regular'>
  50. <image class='location' src="../../static/img/liangmai/icon_ditu.png" mode=""></image>
  51. 辽宁省营口市鲅鱼圈区xx路108号
  52. </view>
  53. <view class='distance Regular'>50m</view>
  54. </view>
  55. </view>
  56. </view>
  57. <view v-if='datalist.length==0' class="enter" @click="enter">
  58. <image style='width:56.5px;height:28px;' src="../../static/img/liangmai/ruzhu.png" mode=""></image>
  59. <view class='enter-content'>入驻</view>
  60. </view>
  61. </view>
  62. </template>
  63. <script>
  64. export default {
  65. components: {
  66. },
  67. data() {
  68. return {
  69. status:0,
  70. mainBusinessType:'',
  71. mainBusinessTypeKey:'0',
  72. pageSize: 10,
  73. currentPage: 1,
  74. searchTypes:[
  75. {name:'全部',value:'0'},{name:'粮库',value:'1'},{name:'加工厂',value:'2'},
  76. {name:'烘干塔',value:'3'},{name:'饲料厂',value:'4'},{name:'养殖场',value:'5'},
  77. {name:'粮贸',value:'6'},{name:'期货',value:'7'}
  78. ],
  79. datalist:[]
  80. }
  81. },
  82. onShow(){
  83. this.$api.doRequest('get','/settledCompanyInfo/selectSettledCompanyInfo',{mainBusinessType:this.mainBusinessType,pageSize: this.pageSize,
  84. currentPage: this.currentPage,pcFlag:2}).then(res => {
  85. if(res.data.code==200){
  86. this.datalist=res.data.data.records
  87. }
  88. })
  89. },
  90. onLoad(val){
  91. this.position = val.position
  92. },
  93. methods: {
  94. mainBusinessTypecahnge(item){
  95. if(item.name!='全部'){
  96. this.mainBusinessType=item.name
  97. }else{
  98. this.mainBusinessType=''
  99. }
  100. this.mainBusinessTypeKey=item.value
  101. },
  102. enter(){
  103. //入驻
  104. uni.navigateTo({
  105. url:'/pages/grain_pulse/enter'
  106. })
  107. },
  108. friendcircle(){
  109. uni.navigateTo({
  110. url:'/pages/grain_pulse/friendcircle'
  111. })
  112. },
  113. todetails(item){
  114. uni.navigateTo({
  115. url:'/pages/grain_pulse/details?id='+item.id
  116. })
  117. },
  118. naviageToPage(item){
  119. console.log(item)
  120. uni.navigateTo({
  121. url:item
  122. })
  123. }
  124. }
  125. }
  126. </script>
  127. <style scoped>
  128. /* 《--头部 */
  129. .header{
  130. padding:0 12.5px;
  131. background:#fff;
  132. border-radius:0 0 10px 10px;
  133. }
  134. /* 头部--》 */
  135. /* 《--定位 */
  136. .location{
  137. width:15.5px;height:17.5px;margin-right:2.5px;
  138. }
  139. .locationwrap{
  140. font-size:16px;
  141. }
  142. /* 定位 --》 */
  143. /* 《--分布 */
  144. .map{
  145. padding:8.5px 0;
  146. }
  147. .cangku{
  148. width:16.5px;height:16.5px;margin-right:5px;
  149. }
  150. .distribution{
  151. background:#F5F6FA;
  152. width: 71.5px;
  153. height:32px;
  154. border-radius:15px;
  155. font-size:12px;
  156. }
  157. /* 分布--》 */
  158. /* 《--搜索 */
  159. .cu-bar .search-form{
  160. background:#F5F6F9;
  161. margin:0;
  162. margin-bottom:18px;
  163. padding:10px 18px;
  164. }
  165. .icon-scarch{
  166. width:15px;
  167. height:15px;
  168. margin-right:5px;
  169. }
  170. /* 搜索--》 */
  171. /* 《--内容 */
  172. .content{
  173. margin-top:13px;
  174. }
  175. /* 内容--》 */
  176. /* 《--圈友说 */
  177. .friendcircle{
  178. background:#fff;
  179. margin:0 9px;
  180. border-radius:4px;
  181. }
  182. .friendcircle .title{
  183. font-size:16px;
  184. padding:11.5px 14.5px;
  185. }
  186. .icon-friendcircle{
  187. width:17px;height: 17px;margin-right:5.5px;
  188. }
  189. .bg{
  190. width:110px;height:124px;
  191. }
  192. .friendcircle-content{
  193. padding:0 17px 18px;
  194. }
  195. .friendcircle-content-right{
  196. margin-left:15.5px;
  197. }
  198. .friendcircle-content-right-item{
  199. background: linear-gradient(90deg, #F5F6FA 0%, #FFFFFF 100%);
  200. border-radius:12.5px;
  201. margin-bottom:10px;
  202. width:205.5px;
  203. font-size:12px;
  204. padding:3px 0;
  205. }
  206. .headportrait{
  207. width:22.5px;height:22.5px;
  208. margin-right:8.5px;
  209. }
  210. /* 圈友说--》 */
  211. /* 《--类型 */
  212. .list-type{
  213. background: linear-gradient(180deg, #F5F6FA 0%, #FFFFFF 100%);
  214. width:100vw;
  215. padding-top:5px;
  216. height:49px;
  217. overflow-x: scroll;
  218. white-space: nowrap;
  219. }
  220. .typeitem{
  221. margin:10px;
  222. position:relative;
  223. display:inline-block;
  224. padding-top:8px;
  225. padding-bottom:5px;
  226. }
  227. .typeitem.active{
  228. font-size:16px;
  229. }
  230. .typeitem.active:after{
  231. content:'';
  232. display:block;
  233. position:absolute;
  234. height:3px;
  235. bottom:0;
  236. background:#22C572;
  237. width:50%;
  238. left:50%;
  239. transform: translateX(-50%);
  240. }
  241. /* 类型--》 */
  242. /* 《--数据 */
  243. .listitem{
  244. background:#fff;
  245. margin:10px;
  246. padding:15px 19px;
  247. }
  248. .listitem-left{
  249. width:98.5px;
  250. height:96.5px;
  251. margin-right:8px;
  252. border-radius:5px;
  253. }
  254. .companyname{
  255. font-size:14px;
  256. color:#333;
  257. }
  258. .introduce{
  259. font-size:12px;
  260. color:#676E80;
  261. }
  262. .companylocation{
  263. color:#676E80;
  264. background:#F5F6FA;
  265. margin-top:8px;
  266. padding:4px 10px;
  267. border-radius:15px;
  268. }
  269. .distance{
  270. color:#AFB3BF;
  271. padding:4px;
  272. margin-top:8px;
  273. }
  274. /* 数据--》 */
  275. .enter{
  276. position:fixed;
  277. right:0;
  278. top:80%;
  279. width:56.5px;height:28px;
  280. }
  281. .enter-content{
  282. position:absolute;
  283. right:5px;
  284. top:50%;
  285. transform: translateY(-50%);
  286. color:#fff;
  287. }
  288. </style>