hezuo.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <template>
  2. <view>
  3. <view class="padding-top margin-lr">
  4. <swiper class="screen-swiper" style="height: 260rpx;" :circular="true" :autoplay="true" interval="2500"
  5. duration="800">
  6. <swiper-item v-for="(item,index) in swiperList" :key="index">
  7. <image :src="item.imageUrl" mode="aspectFit" class="radius"></image>
  8. </swiper-item>
  9. </swiper>
  10. </view>
  11. <view class="margin-top">
  12. <view class="listbox margin-lr" v-for="(item,index) in list" :key="index">
  13. <view class="flex align-center justify-between">
  14. <view>
  15. <view class="text-lg text-bold flex align-center" style="color: #333333;">{{item.companyName}}
  16. <u-icon @click="copy(item.companyName)" size="30" style="margin-left:10rpx;"
  17. name="https://zhaopin.xianmaxiong.com/file/uploadPath/2022/09/06/31556a48bfaec6406c0d45ada8e27970.png">
  18. </u-icon>
  19. </view>
  20. <view class=" margin-top-xs" style="color: #999999;font-size: 26upx;width: 90%;">
  21. {{item.companyScope}}</view>
  22. </view>
  23. <view style="position: relative;" @click="Changekefu">
  24. <image :src="item.companyLogo?item.companyLogo:'../../static/logo.png'"
  25. style="width: 100upx;height: 100upx;border-radius: 50%;">
  26. </image>
  27. <image src="../../static/images/index/phones.png" class="phone"></image>
  28. </view>
  29. </view>
  30. <view class="flex align-center margin-top">
  31. <image src="../../static/images/index/add.png" style="width: 26upx;height: 30upx;"></image>
  32. <view class="margin-left-sm text-bold" style="color: #121212;width: 90%;">{{item.companyAddress}}
  33. </view>
  34. </view>
  35. <view class="flex align-center margin-top">
  36. <image src="../../static/images/index/hez.png" style="width: 26upx;height: 28upx;"></image>
  37. <view class="margin-left-sm text-bold" style="color: #121212;">资质简介</view>
  38. </view>
  39. <view class="text-sm margin-top-xs margin-left-xl" style="color: #999999;">
  40. {{item.companyDetails}}
  41. </view>
  42. </view>
  43. </view>
  44. <empty v-if="list.length==0" />
  45. </view>
  46. </template>
  47. <script>
  48. import empty from '@/components/empty.vue'
  49. export default {
  50. components: {
  51. empty
  52. },
  53. data() {
  54. return {
  55. swiperList: [],
  56. page: 1,
  57. limit: 10,
  58. list: [],
  59. count: '',
  60. }
  61. },
  62. onLoad() {
  63. this.getBannerList()
  64. //合作企业列表
  65. this.getHezuoList();
  66. },
  67. onReachBottom() {
  68. if (this.list.length == this.count) {
  69. uni.showToast({
  70. title: '已经到底了',
  71. icon: 'none'
  72. })
  73. } else {
  74. this.page = this.page + 1;
  75. this.getHezuoList()
  76. }
  77. },
  78. methods: {
  79. copy(name) {
  80. uni.setClipboardData({
  81. data: name, // e是你要保存的内容
  82. success: function() {
  83. uni.showToast({
  84. title: '复制成功',
  85. icon: 'none'
  86. })
  87. }
  88. })
  89. },
  90. //联系客服
  91. Changekefu() {
  92. let that = this
  93. if(uni.getStorageSync('userType')==1){//用户端
  94. // #ifdef MP-WEIXIN
  95. wx.openCustomerServiceChat({
  96. extInfo: {
  97. url: that.$queue.getData('kefu')
  98. },
  99. corpId: that.$queue.getData('kefuAppid'),
  100. success(res) {
  101. console.log(res)
  102. },
  103. })
  104. // #endif
  105. // #ifdef H5
  106. window.location.href = that.$queue.getData('kefu');
  107. // #endif
  108. // #ifdef APP
  109. let kefu = that.$queue.getData('kefu')
  110. console.log(kefu)
  111. plus.runtime.openURL(kefu, function(res) {});
  112. // #endif
  113. }else{//企业端
  114. // #ifdef MP-WEIXIN
  115. wx.openCustomerServiceChat({
  116. extInfo: {
  117. url: that.$queue.getData('kefuq')
  118. },
  119. corpId: that.$queue.getData('kefuAppidq'),
  120. success(res) {
  121. console.log(res)
  122. },
  123. })
  124. // #endif
  125. // #ifdef H5
  126. window.location.href = that.$queue.getData('kefuq');
  127. // #endif
  128. // #ifdef APP
  129. let kefu = that.$queue.getData('kefuq')
  130. console.log(kefu)
  131. plus.runtime.openURL(kefu, function(res) {});
  132. // #endif
  133. }
  134. },
  135. //获取轮播图
  136. getBannerList() {
  137. this.$Request.get("/app/banner/selectBannerList", {
  138. classify: 1
  139. }).then(res => {
  140. if (res.code == 0) {
  141. this.swiperList = res.data
  142. }
  143. });
  144. },
  145. //合作企业列表
  146. getHezuoList() {
  147. this.$Request.get("/app/company/selectCompanyListByMember", {
  148. page: this.page,
  149. limit: this.limit
  150. }).then(res => {
  151. this.count = res.data.totalPage
  152. if (res.code == 0) {
  153. if (this.page == 1) {
  154. this.list = res.data.list
  155. } else {
  156. this.list = [...this.list, ...res.data.list]
  157. }
  158. }
  159. });
  160. },
  161. }
  162. }
  163. </script>
  164. <style>
  165. page {
  166. background: #F2F2F7;
  167. }
  168. .listbox {
  169. background: #FFFFFF;
  170. border-radius: 24upx;
  171. padding: 30upx;
  172. margin-bottom: 20rpx;
  173. }
  174. .phone {
  175. width: 40upx;
  176. height: 40upx;
  177. position: absolute;
  178. bottom: 0;
  179. right: 0;
  180. z-index: 9;
  181. }
  182. </style>