my_grain_pulse.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. <template>
  2. <view style='margin-bottom:70px;'>
  3. <scroll-view scroll-x="true" scroll-with-animation="true" class='list-type'>
  4. <view v-for='item in searchTypes' @click='changetype(item)' :class='mainBusinessType==item.name?"Semibold active":"Regular"' class="typeitem">{{item.name}}</view>
  5. </scroll-view>
  6. <view v-for='item in datalist' class="listitem">
  7. <view class="flex" v-if='mainBusinessType=="我的企业"'>
  8. <image class='listitem-left' :src="item.attachmentAddress" mode=""></image>
  9. <view class="listitem-right">
  10. <view class="flex justify-between">
  11. <view class="companyname Medium">{{item.compName}}</view>
  12. <view v-if='item.status=="待审核"' class='listitemStatus audit Regular'>审核中</view>
  13. </view>
  14. <view class='companylocation flex align-item-center Regular'>
  15. <image class='location' src="../../static/img/liangmai/icon_ditu.png" mode=""></image>
  16. 辽宁省营口市鲅鱼圈区xx路108号
  17. </view>
  18. <view>
  19. <view class="button Regular">隐藏</view>
  20. <view class="button Regular">编辑</view>
  21. <view class="button Regular">删除</view>
  22. </view>
  23. </view>
  24. </view>
  25. <view v-else>
  26. <view class="flex">
  27. <image class='listitem-left' src="../../static/img/authentication/bankup(2).png" mode=""></image>
  28. <view class="listitem-right">
  29. <view class="flex justify-between">
  30. <view class="companyname Medium">中天昊元粮库中天昊元粮库</view>
  31. <image style='width:12px;height:12px;' :src="status1?'../../static/img/liangmai/my_shoucang1.png':'../../static/img/liangmai/my_shoucang.png'" mode=""></image>
  32. </view>
  33. <view class='Regular introduce'>我是企业介绍我是企业介绍我是企业介绍我是</view>
  34. </view>
  35. </view>
  36. <view class="flex align-item-center justify-between">
  37. <view class='companylocation flex align-item-center Regular'>
  38. <image class='location' src="../../static/img/liangmai/icon_ditu.png" mode=""></image>
  39. 辽宁省营口市鲅鱼圈区xx路108号
  40. </view>
  41. <view class='distance Regular'>50m</view>
  42. </view>
  43. </view>
  44. <view v-if='mainBusinessType=="我的企业"' class='exitloginwrap'>
  45. <button @click='enter()' class='exitlogin'>新增</button>
  46. </view>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. import {
  52. mapState
  53. } from 'vuex';
  54. export default {
  55. components: {
  56. },
  57. data() {
  58. return {
  59. status:0,
  60. mainBusinessType:'我的企业',
  61. pageSize: 10,
  62. currentPage: 1,
  63. datalist:[],
  64. status1:true,
  65. searchTypes:[
  66. {name:'我的企业',value:'1'},{name:'我的收藏',value:'1'}
  67. ],
  68. }
  69. },
  70. onShow(){
  71. this.getList()
  72. },
  73. onLoad(){
  74. },
  75. computed: {
  76. ...mapState(['hasLogin', 'userInfo'])
  77. },
  78. methods: {
  79. getList(){
  80. if(this.mainBusinessType=='我的企业'){
  81. this.$api.doRequest('get','/settledCompanyInfo/selectSettledCompanyInfo',{mainBusinessType:'',pageSize: this.pageSize,
  82. currentPage: this.currentPage,pcFlag:2}).then(res => {
  83. if(res.data.code==200){
  84. this.datalist=res.data.data.records
  85. }
  86. })
  87. }else{
  88. this.$api.doRequest('get','/settledCompanyInfo/myCollection',{commonId:this.userInfo.id,phone:this.userInfo.phone,pageSize:this.pageSize,
  89. currentPage: this.currentPage,pcFlag:2}).then(res => {
  90. if(res.data.code==200){
  91. this.datalist=res.data.data.records
  92. }
  93. })
  94. }
  95. },
  96. friendcircle(){
  97. uni.navigateTo({
  98. url:'/pages/grain_pulse/friendcircle'
  99. })
  100. },
  101. todetails(){
  102. uni.navigateTo({
  103. url:'/pages/grain_pulse/details'
  104. })
  105. },
  106. naviageToPage(item){
  107. uni.navigateTo({
  108. url:item
  109. })
  110. },
  111. enter(){
  112. //入驻
  113. uni.navigateTo({
  114. url:'/pages/grain_pulse/enter'
  115. })
  116. },
  117. changetype(item){
  118. this.mainBusinessType=item.name
  119. this.getList()
  120. }
  121. }
  122. }
  123. </script>
  124. <style scoped>
  125. /* 《--头部 */
  126. .header{
  127. padding:0 12.5px;
  128. background:#fff;
  129. border-radius:0 0 10px 10px;
  130. }
  131. /* 头部--》 */
  132. /* 《--定位 */
  133. .location{
  134. width:15.5px;height:17.5px;margin-right:2.5px;
  135. }
  136. .locationwrap{
  137. font-size:16px;
  138. }
  139. /* 定位 --》 */
  140. /* 《--分布 */
  141. .map{
  142. padding:8.5px 0;
  143. }
  144. .cangku{
  145. width:16.5px;height:16.5px;margin-right:5px;
  146. }
  147. .distribution{
  148. background:#F5F6FA;
  149. width: 71.5px;
  150. height:32px;
  151. border-radius:15px;
  152. font-size:12px;
  153. }
  154. /* 分布--》 */
  155. /* 《--搜索 */
  156. .cu-bar .search-form{
  157. background:#F5F6F9;
  158. margin:0;
  159. margin-bottom:18px;
  160. padding:10px 18px;
  161. }
  162. .icon-scarch{
  163. width:15px;
  164. height:15px;
  165. margin-right:5px;
  166. }
  167. /* 搜索--》 */
  168. /* 《--内容 */
  169. .content{
  170. margin-top:13px;
  171. }
  172. /* 内容--》 */
  173. /* 《--类型 */
  174. .list-type{
  175. background: #fff;
  176. width:100vw;
  177. padding-top:5px;
  178. height:49px;
  179. overflow-x: scroll;
  180. white-space: nowrap;
  181. }
  182. .typeitem{
  183. margin:10px;
  184. position:relative;
  185. display:inline-block;
  186. padding-bottom:10px;
  187. font-size:17px;
  188. }
  189. .typeitem.active:after{
  190. content:'';
  191. display:block;
  192. position:absolute;
  193. height:3px;
  194. bottom:0;
  195. background:#22C572;
  196. width:18px;
  197. left:50%;
  198. transform: translateX(-50%);
  199. }
  200. /* 类型--》 */
  201. /* 《--数据 */
  202. .listitem{
  203. background:#fff;
  204. margin:10px;
  205. padding:15px 19px;
  206. border-radius:10px;
  207. }
  208. .listitem-left{
  209. width:98.5px;
  210. height:96.5px;
  211. margin-right:8px;
  212. border-radius:5px;
  213. }
  214. .companyname{
  215. font-size:14px;
  216. color:#333;
  217. }
  218. .introduce{
  219. font-size:12px;
  220. color:#676E80;
  221. }
  222. .companylocation{
  223. color:#676E80;
  224. font-size:12px;
  225. margin-top:8px;
  226. padding:4px 9px;
  227. }
  228. .distance{
  229. color:#AFB3BF;
  230. padding:4px;
  231. margin-top:8px;
  232. }
  233. /* 数据--》 */
  234. .button{
  235. display:inline-block;
  236. border:1px solid #CDCDCD;
  237. padding:6px 15px;
  238. border-radius:15px;
  239. margin:5px 5px;
  240. }
  241. .listitemStatus{
  242. margin-left:2px;
  243. }
  244. .listitemStatus.audit{
  245. color:#FE6430;
  246. }
  247. .listitemStatus.notPass{
  248. color:#FB1E1E;
  249. }
  250. .listitemStatus.pass{
  251. color:#22C572;
  252. }
  253. .exitloginwrap{
  254. position:fixed;
  255. bottom:0;
  256. left:0;
  257. width:100%;
  258. padding-bottom:20px;
  259. }
  260. .exitlogin{
  261. width:90%;
  262. background:#22C572;
  263. border-radius:30px;
  264. color:#fff;
  265. font-size:17px;
  266. }
  267. .exitlogin:after{
  268. border:none;
  269. }
  270. </style>