home.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. <template>
  2. <view>
  3. <view class="header">
  4. <view class="flex justify-between map">
  5. <view class='Medium flex align-item-center locationwrap'>
  6. <image class='location' src="../../static/img/liangmai/icon_ditu.png" mode=""></image>
  7. 黑龙江中天昊元…
  8. </view>
  9. <view 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 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(){
  91. },
  92. methods: {
  93. mainBusinessTypecahnge(item){
  94. if(item.name!='全部'){
  95. this.mainBusinessType=item.name
  96. }else{
  97. this.mainBusinessType=''
  98. }
  99. this.mainBusinessTypeKey=item.value
  100. },
  101. enter(){
  102. //入驻
  103. uni.navigateTo({
  104. url:'/pages/grain_pulse/enter'
  105. })
  106. },
  107. friendcircle(){
  108. uni.navigateTo({
  109. url:'/pages/grain_pulse/friendcircle'
  110. })
  111. },
  112. todetails(item){
  113. uni.navigateTo({
  114. url:'/pages/grain_pulse/details?id='+item.id
  115. })
  116. },
  117. naviageToPage(item){
  118. uni.navigateTo({
  119. url:item
  120. })
  121. }
  122. }
  123. }
  124. </script>
  125. <style scoped>
  126. /* 《--头部 */
  127. .header{
  128. padding:0 12.5px;
  129. background:#fff;
  130. border-radius:0 0 10px 10px;
  131. }
  132. /* 头部--》 */
  133. /* 《--定位 */
  134. .location{
  135. width:15.5px;height:17.5px;margin-right:2.5px;
  136. }
  137. .locationwrap{
  138. font-size:16px;
  139. }
  140. /* 定位 --》 */
  141. /* 《--分布 */
  142. .map{
  143. padding:8.5px 0;
  144. }
  145. .cangku{
  146. width:16.5px;height:16.5px;margin-right:5px;
  147. }
  148. .distribution{
  149. background:#F5F6FA;
  150. width: 71.5px;
  151. height:32px;
  152. border-radius:15px;
  153. font-size:12px;
  154. }
  155. /* 分布--》 */
  156. /* 《--搜索 */
  157. .cu-bar .search-form{
  158. background:#F5F6F9;
  159. margin:0;
  160. margin-bottom:18px;
  161. padding:10px 18px;
  162. }
  163. .icon-scarch{
  164. width:15px;
  165. height:15px;
  166. margin-right:5px;
  167. }
  168. /* 搜索--》 */
  169. /* 《--内容 */
  170. .content{
  171. margin-top:13px;
  172. }
  173. /* 内容--》 */
  174. /* 《--圈友说 */
  175. .friendcircle{
  176. background:#fff;
  177. margin:0 9px;
  178. border-radius:4px;
  179. }
  180. .friendcircle .title{
  181. font-size:16px;
  182. padding:11.5px 14.5px;
  183. }
  184. .icon-friendcircle{
  185. width:17px;height: 17px;margin-right:5.5px;
  186. }
  187. .bg{
  188. width:110px;height:124px;
  189. }
  190. .friendcircle-content{
  191. padding:0 17px 18px;
  192. }
  193. .friendcircle-content-right{
  194. margin-left:15.5px;
  195. }
  196. .friendcircle-content-right-item{
  197. background: linear-gradient(90deg, #F5F6FA 0%, #FFFFFF 100%);
  198. border-radius:12.5px;
  199. margin-bottom:10px;
  200. width:205.5px;
  201. font-size:12px;
  202. padding:3px 0;
  203. }
  204. .headportrait{
  205. width:22.5px;height:22.5px;
  206. margin-right:8.5px;
  207. }
  208. /* 圈友说--》 */
  209. /* 《--类型 */
  210. .list-type{
  211. background: linear-gradient(180deg, #F5F6FA 0%, #FFFFFF 100%);
  212. width:100vw;
  213. padding-top:5px;
  214. height:49px;
  215. overflow-x: scroll;
  216. white-space: nowrap;
  217. }
  218. .typeitem{
  219. margin:10px;
  220. position:relative;
  221. display:inline-block;
  222. padding-top:8px;
  223. padding-bottom:5px;
  224. }
  225. .typeitem.active{
  226. font-size:16px;
  227. }
  228. .typeitem.active:after{
  229. content:'';
  230. display:block;
  231. position:absolute;
  232. height:3px;
  233. bottom:0;
  234. background:#22C572;
  235. width:50%;
  236. left:50%;
  237. transform: translateX(-50%);
  238. }
  239. /* 类型--》 */
  240. /* 《--数据 */
  241. .listitem{
  242. background:#fff;
  243. margin:10px;
  244. padding:15px 19px;
  245. }
  246. .listitem-left{
  247. width:98.5px;
  248. height:96.5px;
  249. margin-right:8px;
  250. border-radius:5px;
  251. }
  252. .companyname{
  253. font-size:14px;
  254. color:#333;
  255. }
  256. .introduce{
  257. font-size:12px;
  258. color:#676E80;
  259. }
  260. .companylocation{
  261. color:#676E80;
  262. background:#F5F6FA;
  263. margin-top:8px;
  264. padding:4px 10px;
  265. border-radius:15px;
  266. }
  267. .distance{
  268. color:#AFB3BF;
  269. padding:4px;
  270. margin-top:8px;
  271. }
  272. /* 数据--》 */
  273. .enter{
  274. position:fixed;
  275. right:0;
  276. top:80%;
  277. width:56.5px;height:28px;
  278. }
  279. .enter-content{
  280. position:absolute;
  281. right:5px;
  282. top:50%;
  283. transform: translateY(-50%);
  284. color:#fff;
  285. }
  286. </style>