my_grain_pulse.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <template>
  2. <view>
  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>
  45. </view>
  46. </template>
  47. <script>
  48. import {
  49. mapState
  50. } from 'vuex';
  51. export default {
  52. components: {
  53. },
  54. data() {
  55. return {
  56. status:0,
  57. mainBusinessType:'我的企业',
  58. pageSize: 10,
  59. currentPage: 1,
  60. datalist:[],
  61. status1:true,
  62. searchTypes:[
  63. {name:'我的企业',value:'1'},{name:'我的收藏',value:'1'}
  64. ],
  65. }
  66. },
  67. onShow(){
  68. this.getList()
  69. },
  70. onLoad(){
  71. },
  72. computed: {
  73. ...mapState(['hasLogin', 'userInfo'])
  74. },
  75. methods: {
  76. getList(){
  77. if(this.mainBusinessType=='我的企业'){
  78. this.$api.doRequest('get','/settledCompanyInfo/selectSettledCompanyInfo',{mainBusinessType:'',pageSize: this.pageSize,
  79. currentPage: this.currentPage,pcFlag:2}).then(res => {
  80. if(res.data.code==200){
  81. this.datalist=res.data.data.records
  82. }
  83. })
  84. }else{
  85. this.$api.doRequest('get','/settledCompanyInfo/myCollection',{commonId:this.userInfo.id,phone:this.userInfo.phone,pageSize:this.pageSize,
  86. currentPage: this.currentPage,pcFlag:2}).then(res => {
  87. if(res.data.code==200){
  88. this.datalist=res.data.data.records
  89. }
  90. })
  91. }
  92. },
  93. friendcircle(){
  94. uni.navigateTo({
  95. url:'/pages/grain_pulse/friendcircle'
  96. })
  97. },
  98. todetails(){
  99. uni.navigateTo({
  100. url:'/pages/grain_pulse/details'
  101. })
  102. },
  103. naviageToPage(item){
  104. uni.navigateTo({
  105. url:item
  106. })
  107. },
  108. changetype(item){
  109. this.mainBusinessType=item.name
  110. this.getList()
  111. }
  112. }
  113. }
  114. </script>
  115. <style scoped>
  116. /* 《--头部 */
  117. .header{
  118. padding:0 12.5px;
  119. background:#fff;
  120. border-radius:0 0 10px 10px;
  121. }
  122. /* 头部--》 */
  123. /* 《--定位 */
  124. .location{
  125. width:15.5px;height:17.5px;margin-right:2.5px;
  126. }
  127. .locationwrap{
  128. font-size:16px;
  129. }
  130. /* 定位 --》 */
  131. /* 《--分布 */
  132. .map{
  133. padding:8.5px 0;
  134. }
  135. .cangku{
  136. width:16.5px;height:16.5px;margin-right:5px;
  137. }
  138. .distribution{
  139. background:#F5F6FA;
  140. width: 71.5px;
  141. height:32px;
  142. border-radius:15px;
  143. font-size:12px;
  144. }
  145. /* 分布--》 */
  146. /* 《--搜索 */
  147. .cu-bar .search-form{
  148. background:#F5F6F9;
  149. margin:0;
  150. margin-bottom:18px;
  151. padding:10px 18px;
  152. }
  153. .icon-scarch{
  154. width:15px;
  155. height:15px;
  156. margin-right:5px;
  157. }
  158. /* 搜索--》 */
  159. /* 《--内容 */
  160. .content{
  161. margin-top:13px;
  162. }
  163. /* 内容--》 */
  164. /* 《--类型 */
  165. .list-type{
  166. background: #fff;
  167. width:100vw;
  168. padding-top:5px;
  169. height:49px;
  170. overflow-x: scroll;
  171. white-space: nowrap;
  172. }
  173. .typeitem{
  174. margin:10px;
  175. position:relative;
  176. display:inline-block;
  177. padding-bottom:10px;
  178. font-size:17px;
  179. }
  180. .typeitem.active:after{
  181. content:'';
  182. display:block;
  183. position:absolute;
  184. height:3px;
  185. bottom:0;
  186. background:#22C572;
  187. width:18px;
  188. left:50%;
  189. transform: translateX(-50%);
  190. }
  191. /* 类型--》 */
  192. /* 《--数据 */
  193. .listitem{
  194. background:#fff;
  195. margin:10px;
  196. padding:15px 19px;
  197. border-radius:10px;
  198. }
  199. .listitem-left{
  200. width:98.5px;
  201. height:96.5px;
  202. margin-right:8px;
  203. border-radius:5px;
  204. }
  205. .companyname{
  206. font-size:14px;
  207. color:#333;
  208. }
  209. .introduce{
  210. font-size:12px;
  211. color:#676E80;
  212. }
  213. .companylocation{
  214. color:#676E80;
  215. font-size:12px;
  216. margin-top:8px;
  217. padding:4px 9px;
  218. }
  219. .distance{
  220. color:#AFB3BF;
  221. padding:4px;
  222. margin-top:8px;
  223. }
  224. /* 数据--》 */
  225. .button{
  226. display:inline-block;
  227. border:1px solid #CDCDCD;
  228. padding:6px 15px;
  229. border-radius:15px;
  230. margin:5px 5px;
  231. }
  232. .listitemStatus{
  233. margin-left:2px;
  234. }
  235. .listitemStatus.audit{
  236. color:#FE6430;
  237. }
  238. .listitemStatus.notPass{
  239. color:#FB1E1E;
  240. }
  241. .listitemStatus.pass{
  242. color:#22C572;
  243. }
  244. </style>