comm.vue 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381
  1. <template>
  2. <view class="circle tn-safe-area-inset-bottom" style="background: #f7f7f7;">
  3. <tn-nav-bar customBack>
  4. <view slot="back" class='tn-custom-nav-bar__back'>
  5. <image style="width: 28px;height: 28px;margin-left:4px" @click="reFetchData()" src="../../static/tu/reload.png"></image>
  6. <image style="width: 28px;height: 28px;margin-left:12px" @click="addButton()" src="../../static/tu/add.png"></image>
  7. </view>
  8. <view slot="default" style="display: flex;">
  9. <view style="flex:1;">
  10. <text :style="{fontSize:(wxFontSize)+'px'}">我有什么</text>
  11. </view>
  12. </view>
  13. </tn-nav-bar>
  14. <scroll-view class="custom-tabbar-page" style="height: 100vh;" :style="{marginTop: vuex_custom_bar_height + 'px'}" scroll-y :refresher-enabled="true" :refresher-triggered="triggered" lower-threshold="60" @refresherrestore="onRestore" @refresherrefresh="onRefresh" @refresherpulling="onPulling" enable-back-to-top @scrolltolower="tabbarPageScrollLower">
  15. <!-- 发现 -->
  16. <view class="" v-if="current==0" >
  17. <uv-sticky bgColor="#f7f7f7">
  18. <view style="width: 100%;" v-if="currentTab==0">
  19. <view style="display: flex; padding: 16px;">
  20. <view
  21. style="flex:1;background-color: #fff;border-radius: 18px;color: #999;line-height: 36px;"
  22. @click="showSearch">
  23. <view>
  24. <image src="../../static/tu/search.png" style="width: 26px;height: 26px;vertical-align: middle; margin-left:8px; margin-right: 12px;margin-top: -2px;"></image>
  25. <text :style="{fontSize:(wxFontSize-2)+'px'}" v-if="!searchProdValue">产品名称/品牌/产品型号</text>
  26. <text :style="{fontSize:(wxFontSize-2)+'px'}" v-if="searchProdValue">{{searchProdValue}}</text>
  27. </view>
  28. </view>
  29. <view v-if="searchProdValue" @click="clearProd" style="line-height: 36px;margin-left: 10px;color: #333;" :style="{fontSize:(wxFontSize-2)+'px'}">取消
  30. </view>
  31. </view>
  32. </view>
  33. <view style="width: 100%;" v-if="currentTab==1">
  34. <view style="display: flex; padding: 16px;">
  35. <view
  36. style="flex:1;background-color: #fff;border-radius: 18px;color: #999;line-height: 36px;"
  37. @click="showSearch2">
  38. <view>
  39. <image src="../../static/tu/search.png" style="width: 26px;height: 26px;vertical-align: middle; margin-left:8px;margin-right: 12px;margin-top: -2px;"></image>
  40. <text v-if="!searchProdValue2" :style="{fontSize:(wxFontSize-2)+'px'}">品牌/服务内容</text>
  41. <text v-if="searchProdValue2" :style="{fontSize:(wxFontSize-2)+'px'}">{{searchProdValue2}}</text>
  42. </view>
  43. </view>
  44. <view v-if="searchProdValue2" @click="clearProd2" style="line-height: 36px;margin-left: 10px;color: #333;" :style="{fontSize:(wxFontSize-2)+'px'}">取消
  45. </view>
  46. </view>
  47. </view>
  48. <tn-tabs-swiper :list="tabList" :isScroll="false" :fontSize="(wxFontSize+12)" :barWidth="wxFontSize+50" :current="currentTab" name="tab-name" activeColor="#005DA6" inactiveColor="#333"
  49. @change="changeTab">
  50. </tn-tabs-swiper>
  51. </uv-sticky>
  52. <view class="tn-flex tn-flex-direction-column tn-margin-top-sm ">
  53. <!-- 图文信息 -->
  54. <block v-for="(item,index) in content" :key="item.id">
  55. <view class="blogger__item" style="border-radius: 12px;margin: 12px 16px 12px 16px; background-color: #fff;" :key="index">
  56. <view class="blogger__author tn-flex tn-flex-row-between tn-flex-col-center">
  57. <view class="justify__author__info">
  58. <view class="tn-flex tn-flex-row-center">
  59. <view class="tn-flex tn-flex-row-center tn-flex-col-center">
  60. <view class="" style="width: 5px;height: 5px;background: #E18730;border-radius: 50%;margin-right: 4px;">
  61. </view>
  62. <view class="tn-padding-right">
  63. <view class="tn-text-lg" style="color:#333;font-weight: 600;" :style="{fontSize:(wxFontSize)+'px'}">
  64. {{ item.company||(item.contactNickName||item.contactPerson) }}
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <view
  72. class="blogger__desc tn-margin-top-sm tn-margin-bottom-sm tn-text-justify tn-flex-col-center tn-flex-row-left"
  73. >
  74. <tn-tag margin="-4px 4px 0 0" backgroundColor="#005da61a" v-if="item.brand"
  75. fontColor="#005DA6" shape="circle" :fontSize="wxFontSize+8" @click="showBrand('品牌:'+item.brand)">{{ item.brand }}</tn-tag>
  76. <tn-tag margin="-4px 4px 0 0" backgroundColor="#005da61a" v-if="!item.company"
  77. fontColor="#005DA6" shape="circle" :fontSize="wxFontSize+8" @click="showBrand('个人发布')">个人</tn-tag>
  78. </view>
  79. <view style="border-radius: 0px 0px 0px 0px;width:calc(100% + 32px);margin-left:-16px;border-bottom: 1px solid #E6E6E6;"></view>
  80. <view v-if="item.content" style="padding: 12px 12px 5px 5px;">
  81. <text
  82. class="blogger__desc__content tn-flex-1 tn-text-justify tn-text-df" style="color:#747E87" :style="{fontSize:(wxFontSize-2)+'px'}">{{ item.content }}</text>
  83. </view>
  84. <!-- 内容太多疲劳了-->
  85. <view v-if="item.shareExt&&item.shareExt.length>0" :id="`blogger__content--${index}`">
  86. <view v-for="(sitem,index) in item.shareExt" :key="sitem.id">
  87. <view style="padding: 12px 0 8px 5px;color:#005DA6;" :style="{fontSize:(wxFontSize-3)+'px'}">
  88. {{sitem.prodName}}
  89. </view>
  90. <view style="padding: 8px 8px 0 5px;color:#333;display: flex;" :style="{fontSize:(wxFontSize-3)+'px'}">
  91. <text style="color: #777;white-space: nowrap;">产品型号:</text>{{sitem.prodSpec}}
  92. </view>
  93. <view v-if="sitem.prodDesc" style="padding: 8px 8px 0 5px;color:#333;display: flex;" :style="{fontSize:(wxFontSize-3)+'px'}">
  94. <text style="color: #777;white-space: nowrap;">产品介绍:</text><text>{{sitem.prodDesc}}</text>
  95. </view>
  96. </view>
  97. </view>
  98. <block v-if="item.imgList&&item.imgList.length>0">
  99. <view v-if="[1,2,4].indexOf(item.imgList.length) != -1" class="tn-padding-top-xs">
  100. <image v-for="(image_item,image_index) in item.imgList" :key="image_index"
  101. class="blogger__main-image" :class="{
  102. 'blogger__main-image--1 tn-margin-bottom-sm': item.imgList.length === 1,
  103. 'blogger__main-image--2 tn-margin-right-sm tn-margin-bottom-sm': item.imgList.length === 2 || item.imgList.length === 4
  104. }" :src="image_item.ftpUrl" mode="aspectFill" @click="showImg(item.imgList,image_index)"></image>
  105. </view>
  106. <view v-else class="tn-padding-top-xs" @click="tn('')">
  107. <tn-grid hoverClass="none" :col="3">
  108. <block v-for="(image_item,image_index) in item.imgList" :key="image_index">
  109. <!-- #ifndef MP-WEIXIN -->
  110. <tn-grid-item style="width: 30%;margin: 10rpx;">
  111. <image class="blogger__main-image blogger__main-image--3"
  112. :src="image_item.ftpUrl" mode="aspectFill" @click="showImg(item.imgList,image_index)"></image>
  113. </tn-grid-item>
  114. <!-- #endif-->
  115. <!-- #ifdef MP-WEIXIN -->
  116. <tn-grid-item style="width: 30%;margin: 10rpx;">
  117. <image class="blogger__main-image blogger__main-image--3"
  118. :src="image_item.ftpUrl" mode="aspectFill" @click="showImg(item.imgList,image_index)"></image>
  119. </tn-grid-item>
  120. <!-- #endif-->
  121. </block>
  122. </tn-grid>
  123. </view>
  124. </block>
  125. <view v-for="(file,fIndex) in item.fileDetailList" :style="{marginTop:item.imgList&&item.imgList.length==0&&fIndex==0?'8px':'0'}" style="background-color:#005da60d ;margin-bottom: 4px;padding: 4px 8px;border-radius: 4px;" :key="file.id" v-if="!isImage(file.fileName)" @click="clickLink(file.ftpUrl,file.fileName)">
  126. <view>
  127. <image src="../../static/tu/link.png" style="width: 18px;height: 18px;vertical-align: bottom;"></image>
  128. <view style="display: inline;margin-left:8px;color:#005DA6;" :style="{fontSize:(wxFontSize-3)+'px'}">
  129. {{file.fileName}}</view>
  130. </view>
  131. </view>
  132. <view class="tn-flex tn-flex-row-between tn-flex-col-center tn-margin-top-xs">
  133. <view class="justify-content-item tn-color-gray tn-text-center">
  134. <view class="tn-padding-right tn-padding-top-xs" :style="{fontSize:(wxFontSize-3)+'px',color:'#777'}">
  135. {{ item.createTime|formatDate }}
  136. </view>
  137. </view>
  138. <view class="justify-content-item tn-flex tn-flex-col-center" style="position: relative">
  139. <image style="width: 30px;height:30px;" @click="showActionSheet(item)" src="../../static/tu/more.png"></image>
  140. <view v-if="curItem.id==item.id&&showSheet" class="pop-dia" style="position: absolute;background: #E4F1FB;display: block;right: 10px;top: 24px;border-radius: 6px;z-index: 900;">
  141. <view class="content" style="padding: 8px;font-size: 16px;line-height: 24px; width: 180px;border-radius: 6px;"
  142. v-if="!showContact">
  143. <button @click="linkTel()" style="border: none;border-radius: 0;color: #333333;background-color: #E4F1FB;border-bottom: 1px solid rgb(0 93 166 / 0.2);">
  144. <image src="../../static/tu/call.png" style="width: 26px;height: 26px;margin-right:10px;vertical-align: middle;"> 联系供方</button>
  145. <!-- <view>联系我们帮助对接</view> -->
  146. <button v-if="!collStatus" @click="addColl"
  147. style="border: none;border-radius: 0;color: #333333;background-color: #E4F1FB;border-bottom: 1px solid rgb(0 93 166 / 0.2);" type="default" plain="true">
  148. <image src="../../static/tu/coll.png" style="width: 26px;height: 26px;margin-right:10px;vertical-align: middle;">
  149. 收&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;藏</button>
  150. <button v-if="collStatus" @click="delColl"
  151. style="border: none;border-radius: 0;color: #333333;background-color: #E4F1FB;border-bottom: 1px solid rgb(0 93 166 / 0.2);" type="default" plain="true">
  152. <image src="../../static/tu/coll.png" style="width: 26px;height: 26px;margin-right:10px;vertical-align: middle;"> 取消收藏</button>
  153. <button open-type="share"
  154. style="border: none;border-radius: 0;color: #333333;background-color: #E4F1FB;" type="default" plain="true" :data-coupon="curItem">
  155. <image src="../../static/tu/share.png" style="width: 26px;height: 26px;margin-right:10px;vertical-align: middle;">
  156. 转&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;发</button>
  157. </view>
  158. <view class="content " style="position: relative;background: linear-gradient( 180deg, #DAECFA 0%, #FFFFFF 27%, #FFFFFF 100%);padding: 24px 40px;padding-bottom: 32px;font-size: 16px;width: calc(100vw - 80px);line-height: 24px;border-radius: 12px;"
  159. v-if="showContact">
  160. <view><text style="font-size: 19px;font-weight: bold;color: #333;" v-if="curContact.company">{{curContact.company}}</text></view>
  161. <view style="margin-top:10px;font-size: 17px;text-align: center;color:#333">
  162. <image src="../../static/tu/person.png" style="width: 24px;height: 24px;vertical-align: sub;">
  163. <text style="margin-left: 6px;">{{curContact.contactPerson}}</text> </view>
  164. <view style="margin-top:10px;font-size: 17px;text-align: center;color:#333" @click="showTel(curContact.contactMethod)">
  165. <image src="../../static/tu/tel.png" style="width: 24px;height: 24px;vertical-align: middle;">
  166. <text style="margin-left: 4px;">{{curContact.contactMethod}}</text>
  167. </view>
  168. <image src="../../static/tu/close.png" style="width: 40px;height: 40px;position: absolute; left: calc(50vw - 60px);bottom: -64px;" @click="hideSheet()"></image>
  169. </view>
  170. <view style="position: fixed;top: 0;left: 0;height: 100000vh;width: 100%;background: rgb(0 0 0 / 0.5);z-index: -1;" @click="hideSheet()" v-if="showContact"></view>
  171. </view>
  172. <!-- <view v-if="curItem.id==item.id&&showSheet" style="position: absolute;
  173. background: #ddd;
  174. display: block;
  175. right: 10px;
  176. top: 24px;border-radius: 16px;z-index: 900;border-top-right-radius: 0">
  177. <text class="tn-icon-close" style="float: right;padding:8px;color:#333" @click="hideSheet()"></text>
  178. <view class="content" style="padding: 24px 36px;font-size: 16px;line-height: 24px; width: calc(100vw - 52px); border-radius: 16px;
  179. border-top-right-radius: 0;"
  180. v-if="!showContact">
  181. <button @click="linkTel()" style="border-radius:30px;color:#fff;background-color: #1d60b1;"><text
  182. class="tn-icon-service" style="margin-right: 12px;"></text> 联系供方</button>
  183. <button v-if="!collStatus" @click="addColl"
  184. style="margin-top:10px;border-radius:30px;" type="default" plain="true"><text
  185. class="tn-icon-star" style="margin-right: 12px;"></text>
  186. 收&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;藏</button>
  187. <button v-if="collStatus" @click="delColl"
  188. style="margin-top:10px;border-radius:30px;" type="default" plain="true"><text
  189. class="tn-icon-star-fill" style="margin-right: 12px;"></text> 取消收藏</button>
  190. <button open-type="share"
  191. style="margin-top:10px;border-radius:30px;" type="default" plain="true" :data-coupon="curItem"><text
  192. class="tn-icon-send" style="margin-right: 12px;"></text>
  193. 转&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;发</button>
  194. </view>
  195. <view class="content bg-content" style="padding: 50px 36px;padding-bottom: 32px;font-size: 16px;width: calc(100vw - 52px);line-height: 24px; border-radius: 16px;border-top-right-radius: 0;"
  196. v-if="showContact">
  197. <view><text style="font-size: 20px;font-weight: bold;" v-if="curContact.company">{{curContact.company}}</text></view>
  198. <view style="margin-top:20px;
  199. font-weight: bold;
  200. font-size: 20px;"><text class="tn-icon-my-formal"></text><text style="margin-left: 6px;">{{curContact.contactPerson}}</text> </view>
  201. <view style="margin-top:20px;font-size: 20px;font-weight: bold;" @click="showTel(curContact.contactMethod)"><text class="tn-icon-tel"></text>
  202. <text style="margin-left: 4px;">{{curContact.contactMethod}}</text> </view>
  203. </view>
  204. </view> -->
  205. </view>
  206. </view>
  207. </view>
  208. <!-- 边距间隔 -->
  209. <!-- <view class="tn-strip-bottom" v-if="index != content.length - 1"></view> -->
  210. </block>
  211. <!-- 边距间隔 -->
  212. <!-- <view class="tn-strip-bottom"></view> -->
  213. <view v-if="showEmpty&&content.length==0" style="margin-top: 32vh;">
  214. <tn-empty mode="list"></tn-empty>
  215. </view>
  216. <!-- 广告 -->
  217. <!-- 结尾 -->
  218. <view v-if="content.length==totalSize&&totalSize!=0&&currentTab==0" style="background-color: #f7f7f7;padding: 16px 0;" :style="{paddingTop:showSheet?'166px':'16px'}">
  219. <tn-load-more status="nomore" :loadText="loadText" :fontSize="(wxFontSize+11)"></tn-load-more>
  220. </view>
  221. <view v-if="content.length==totalSize&&totalSize!=0&&currentTab==1" style="background-color: #f7f7f7;padding: 16px 0;" :style="{paddingTop:showSheet?'166px':'16px'}">
  222. <tn-load-more status="nomore" :loadText="loadText2" :fontSize="(wxFontSize+11)"></tn-load-more>
  223. </view>
  224. </view>
  225. <view class='tn-tabbar-height' :style="{marginTop: vuex_custom_bar_height + 'px'}"></view>
  226. </view>
  227. </scroll-view>
  228. </view>
  229. </template>
  230. <script>
  231. import request from '../../utils/request'
  232. export default {
  233. name: 'Circle',
  234. data() {
  235. return {
  236. loading: false,
  237. searchProdValue: '',
  238. searchProdValue2:'',
  239. tabList: [{
  240. 'tab-name': '产品'
  241. }, {
  242. 'tab-name': '服务'
  243. }],
  244. loadText: {
  245. loadmore: '下拉加载',
  246. loading: '快速加载中...',
  247. nomore: '恭喜你,已阅读完所有供应信息哦!'
  248. },
  249. loadText2: {
  250. loadmore: '下拉加载',
  251. loading: '快速加载中...',
  252. nomore: '恭喜你,已阅读完所有供应信息哦!'
  253. },
  254. currentTab: 0,
  255. showEmpty: false,
  256. columns: [{
  257. fieldName: 'prodName',
  258. fieldDesc: '产品名称',
  259. }, {
  260. fieldName: 'prodSpec',
  261. fieldDesc: '产品型号',
  262. }, {
  263. fieldName: 'prodDesc',
  264. fieldDesc: '产品介绍',
  265. fieldType:'slot'
  266. }],
  267. showSheet: false,
  268. curItem: {},
  269. collId: '',
  270. showContact: false,
  271. curContact: {},
  272. current: 0,
  273. collStatus: '',
  274. searchValue: '',
  275. content: [],
  276. totalSize: 0,
  277. curIndex: 1,
  278. wxFontSize:17,
  279. triggered: false,
  280. _freshing: false,
  281. shareData:{}
  282. }
  283. },
  284. onReady() {
  285. const appBaseInfo = wx.getAppBaseInfo();
  286. this.wxFontSize = uni.getStorageSync('fontSize')||appBaseInfo.fontSizeSetting||17;
  287. this.$nextTick(() => {
  288. this.fetchData()
  289. })
  290. },
  291. onShow() {
  292. this.fetchData()
  293. },
  294. onHide() {
  295. this.adAutoplay = false
  296. },
  297. filters: {
  298. formatDate(value) {
  299. if (!value) return '';
  300. const date = new Date(value);
  301. const today = new Date();
  302. const yesterday = new Date(today); // 昨天的日期
  303. yesterday.setDate(yesterday.getDate() - 1); // 将昨天的日期设置为前一天
  304. if (date.getFullYear() == today.getFullYear() && date.getMonth() == today.getMonth() && date.getDate() ==
  305. today.getDate()) {
  306. return '今天 ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
  307. .getMinutes() > 9 ? '' : '0') + date.getMinutes(); // 根据需要格式化日期
  308. }
  309. if (date.getFullYear() == yesterday.getFullYear() && date.getMonth() == yesterday.getMonth() && date
  310. .getDate() == yesterday.getDate()) {
  311. return '昨天 ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
  312. .getMinutes() > 9 ? '' : '0') + date.getMinutes(); // 根据需要格式化日期
  313. }
  314. return date.toLocaleDateString() + ' ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
  315. .getMinutes() > 9 ? '' : '0') + date.getMinutes(); // 根据需要格式化日期
  316. },
  317. },
  318. methods: {
  319. // 瀑布流导航页面滚动到底部
  320. tabbarPageScrollLower(e) {
  321. this.loadMore();
  322. },
  323. onPulling(e) {
  324. console.log("onpulling", e);
  325. if(e.detail.deltaY<0){
  326. return
  327. }
  328. this.triggered = true
  329. },
  330. onRefresh(){
  331. if (this._freshing) return;
  332. this._freshing = true;
  333. this.reFetchData();
  334. setTimeout(() => {
  335. this.triggered = false;
  336. this._freshing = false;
  337. }, 2000)
  338. },
  339. onRestore() {
  340. this.triggered = false; // 需要重置
  341. },
  342. addLog(shareData){
  343. const that = this;
  344. let params= {
  345. bisNo:shareData.bisNo,
  346. bisType:'2',
  347. userNo:uni.getStorageSync('userNo')
  348. };
  349. request.post('/slbForward/add',{slbForward:JSON.stringify(params)},{
  350. headers: {
  351. 'Content-Type': 'application/json', // 默认值
  352. },
  353. }).then(res=>{
  354. })
  355. },
  356. sleep(time) {
  357. return new Promise((resolve) => setTimeout(resolve, time));
  358. },
  359. onShareAppMessage: function(option) {
  360. if(option.from=="button"){
  361. this.hideSheet();
  362. this.shareData=option.target.dataset.coupon;
  363. this.addLog(this.shareData);
  364. const promise = new Promise(async (resolve) => {
  365. await this.sleep(500);
  366. resolve({
  367. // title: `速立保`,
  368. path: `/pages/index/detail/detail?id=`+this.shareData.bisNo+'&isNeed=0',
  369. // imageUrl: url,
  370. });
  371. });
  372. // 默认参数
  373. return {
  374. // title: `速立保`,
  375. path: `/pages/index/detail/detail?id=`+this.shareData.bisNo+'&isNeed=0',
  376. promise,
  377. };
  378. }else{
  379. return {
  380. // title: '速立保',
  381. path: '/pages/index/index',
  382. };
  383. }
  384. },
  385. showSearch(item) {
  386. // 或者可以直接设置body的tabindex属性为-1,然后移除焦点
  387. // 注意:这种方式可能会导致一些浏览器的兼容性问题
  388. uni.navigateTo({
  389. url: '/pages/comm/search'
  390. })
  391. },
  392. showDetail(item){
  393. uni.navigateTo({
  394. url: '/pages/index/detail/detail?id='+item.bisNo+'&isNeed=0'
  395. })
  396. },
  397. showSearch2(item) {
  398. // 或者可以直接设置body的tabindex属性为-1,然后移除焦点
  399. // 注意:这种方式可能会导致一些浏览器的兼容性问题
  400. uni.navigateTo({
  401. url: '/pages/comm/search2'
  402. })
  403. },
  404. isImage(fileName) {
  405. const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'ico']
  406. const extension = fileName.split('.').pop().toLowerCase();
  407. return imageExtensions.includes(extension);
  408. },
  409. addButton() {
  410. if (!uni.getStorageSync('userNo')) {
  411. uni.showToast({
  412. title: '请登录',
  413. icon:'none'
  414. })
  415. uni.navigateTo({
  416. url: '/pages/login/login'
  417. })
  418. return false;
  419. } else {
  420. uni.navigateTo({
  421. url: '/circlePages/addShare'
  422. })
  423. }
  424. },
  425. showImg(items, index) {
  426. let urls = [];
  427. for (let i = 0; i < items.length; i++) {
  428. urls.push(items[i].ftpUrl);
  429. }
  430. // wx.chooseMessageFile({
  431. // count: 3, //默认100
  432. // type:'file',
  433. // extension:['.pdf','.doc'],
  434. // success: function (res) {
  435. // console.error(JSON.stringify(res));
  436. // }
  437. // });
  438. // 预览图片
  439. uni.previewImage({
  440. urls: urls,
  441. current: index,
  442. });
  443. },
  444. clickLink(url,fileName) {
  445. // uni.navigateTo({
  446. // url:'/pages/webview/web-view?url='+encodeURIComponent('https://slb-m.lx-device.com/webview?title='+fileName+'&url='+ url),
  447. // })
  448. uni.downloadFile({
  449. url: url,
  450. filePath: wx.env.USER_DATA_PATH + "/" + fileName,
  451. success: function (res) {
  452. const filePath = res.filePath
  453. uni.openDocument({
  454. filePath: filePath,
  455. showMenu: true,
  456. success: function (res) {
  457. console.log('打开文档成功')
  458. },
  459. fail: function(){
  460. uni.navigateTo({
  461. url:'/pages/webview/web-view?url='+encodeURIComponent('https://slb-m.lx-device.com/webview?title='+fileName+'&url='+ url),
  462. })
  463. }
  464. })
  465. }
  466. })
  467. // uni.navigateTo({
  468. // url: '/pages/webview/web-view?url=' + url,
  469. // })
  470. },
  471. // tab选项卡切换
  472. tabChange(index) {
  473. this.current = index
  474. },
  475. // 跳转
  476. tn(e) {
  477. uni.navigateTo({
  478. url: e,
  479. });
  480. },
  481. // 震动跳转
  482. navEdit(e) {
  483. wx.vibrateLong();
  484. uni.navigateTo({
  485. url: '/circlePages/edit'
  486. })
  487. },
  488. // 震动跳转
  489. navCreate(e) {
  490. wx.vibrateLong();
  491. uni.navigateTo({
  492. url: '/circlePages/create'
  493. })
  494. },
  495. // 震动跳转
  496. navBuild(e) {
  497. wx.vibrateLong();
  498. uni.navigateTo({
  499. url: '/circlePages/build'
  500. })
  501. },
  502. reFetchData() {
  503. this.loading = true;
  504. uni.showToast({
  505. title: '正在刷新...',
  506. icon: 'none'
  507. });
  508. this.fetchData();
  509. },
  510. hideSheet(){
  511. this.curItem = {};
  512. this.showSheet = false;
  513. },
  514. loadMore() {
  515. if (this.totalSize > this.content.length) {
  516. this.fetchData(this.curIndex + 1);
  517. }
  518. console.error('正在加载更多');
  519. },
  520. changeTab(index) {
  521. this.currentTab = index;
  522. this.content = [];
  523. this.fetchData();
  524. },
  525. // 获取内容容器的信息
  526. fetchData(curIndex = 1) {
  527. let that = this;
  528. that.showEmpty = false;
  529. this.curIndex = curIndex;
  530. if (uni.getStorageSync('searchProdValue')) {
  531. that.searchProdValue = uni.getStorageSync('searchProdValue');
  532. }else{
  533. that.searchProdValue = ''
  534. }
  535. if (uni.getStorageSync('searchProdValue2')) {
  536. that.searchProdValue2 = uni.getStorageSync('searchProdValue2');
  537. }else{
  538. that.searchProdValue2 = ''
  539. }
  540. request.post('/slbResourceShare/query', {
  541. type: that.currentTab == 1 ? '2' : '1',
  542. index: curIndex,
  543. content: that.currentTab == 1 ? (that.searchProdValue2 ? that.searchProdValue2.split('/')[1]:'') : undefined,
  544. prodSpec: that.currentTab == 0 ? (that.searchProdValue ? that.searchProdValue.split('/')[2] :
  545. '') : undefined,
  546. prodName: that.currentTab == 0 ? (that.searchProdValue ? that.searchProdValue.split('/')[0] :
  547. '') : undefined,
  548. brand: that.currentTab == 0 ? (that.searchProdValue ? that.searchProdValue.split('/')[1] :
  549. '') : that.currentTab == 1 ?(that.searchProdValue2 ? that.searchProdValue2.split('/')[0]:''): undefined,
  550. }).then(res => {
  551. that.loading = false;
  552. if (res && res.success) {
  553. that.totalSize = res.total || 0;
  554. let newList = res.list || [];
  555. for (let i = 0; i < newList.length; i++) {
  556. newList[i].imgList = [];
  557. for (let j = 0; j < newList[i].fileDetailList.length; j++) {
  558. if (that.isImage(newList[i].fileDetailList[j].fileName)) {
  559. newList[i].imgList.push(newList[i].fileDetailList[j]);
  560. }
  561. }
  562. for(let k = 0;newList[i].shareExt&&k<newList[i].shareExt.length;k++){
  563. newList[i].shareExt[k].fontSize= this.wxFontSize;
  564. }
  565. }
  566. if (curIndex == 1) {
  567. that.content = newList || [];
  568. } else {
  569. that.content = that.content.concat(newList || []);
  570. }
  571. }
  572. that.showEmpty = true;
  573. console.warn(res);
  574. })
  575. },
  576. showActionSheet(item) {
  577. let that = this;
  578. if(!this.curItem.id){
  579. this.curItem = item;
  580. }else{
  581. this.curItem = {}
  582. this.showSheet = false;
  583. return false;
  584. }
  585. this.collStatus = false;
  586. this.showSheet = true;
  587. that.showContact = false;
  588. if (uni.getStorageSync('userNo')) {
  589. let params = {};
  590. params = {
  591. fkBisNo: that.curItem.bisNo,
  592. userNo: uni.getStorageSync('userNo'),
  593. };
  594. request.post('/slbCollect/query', params).then(res => {
  595. if (res.success) {
  596. if (res.list && res.list.length > 0) {
  597. that.collStatus = true;
  598. that.collId = res.list[0].id;
  599. }
  600. }
  601. })
  602. }
  603. },
  604. linkTel() {
  605. if (!uni.getStorageSync('userNo')) {
  606. uni.showToast({
  607. title: '请登录',
  608. icon:'none'
  609. })
  610. uni.navigateTo({
  611. url: '/pages/login/login'
  612. })
  613. return false;
  614. }
  615. let that = this;
  616. let params = {};
  617. params.slbBisContact = JSON.stringify({
  618. fkBisNo: that.curItem.bisNo,
  619. bisType: '2',
  620. type: '1',
  621. company: that.curItem.company,
  622. companyNo: that.curItem.companyNo,
  623. userNo: uni.getStorageSync('userNo'),
  624. });
  625. request.post('/slbBisContact/add', params).then(res => {
  626. if (res.success) {
  627. that.showContact = true;
  628. that.curContact.company = that.curItem.company;
  629. that.curContact.contactMethod = res.resultMap.contactMethod;
  630. that.curContact.contactPerson = res.resultMap.contactPerson;
  631. } else {
  632. that.showContact = false;
  633. uni.showToast({
  634. title: res.msg,
  635. icon: 'none'
  636. })
  637. }
  638. })
  639. },
  640. showBrand(text){
  641. uni.showToast({
  642. title: text,
  643. icon: 'none'
  644. })
  645. },
  646. addColl() {
  647. if (!uni.getStorageSync('userNo')) {
  648. uni.showToast({
  649. title: '请登录',
  650. icon:'none'
  651. })
  652. uni.navigateTo({
  653. url: '/pages/login/login'
  654. })
  655. return false;
  656. }
  657. let that = this;
  658. let params = {};
  659. params.slbCollect = JSON.stringify({
  660. fkBisNo: that.curItem.bisNo,
  661. bisType: '2',
  662. userNo: uni.getStorageSync('userNo'),
  663. });
  664. request.post('/slbCollect/add', params).then(res => {
  665. if (res.success) {
  666. that.showSheet = false;
  667. that.curItem = {};
  668. uni.showToast({
  669. title: '信息已收藏,请在我的收藏里查看阅读',
  670. icon: 'none',
  671. duration: 2000
  672. })
  673. } else {
  674. uni.showToast({
  675. title: res.msg,
  676. icon:'none'
  677. })
  678. }
  679. })
  680. },
  681. delColl() {
  682. let that = this;
  683. request.post('/slbCollect/del', {
  684. id: that.collId
  685. }).then(res => {
  686. if (res.success) {
  687. that.showSheet = false;
  688. that.curItem = {};
  689. uni.showToast({
  690. title: '此供应信息将不会保存在我的收藏里',
  691. icon: 'none',
  692. duration: 2000
  693. })
  694. } else {
  695. uni.showToast({
  696. title: res.msg,
  697. icon:'none'
  698. })
  699. }
  700. })
  701. },
  702. search() {
  703. this.fetchData();
  704. },
  705. searchProd() {
  706. this.searchProdValue = '';
  707. this.fetchData();
  708. },
  709. cancel() {
  710. this.searchValue = '';
  711. this.fetchData();
  712. },
  713. clear() {
  714. this.searchValue = '';
  715. this.fetchData();
  716. },
  717. clearProd() {
  718. this.searchProdValue = '';
  719. uni.removeStorageSync('searchProdValue');
  720. this.fetchData();
  721. },
  722. clearProd2() {
  723. this.searchProdValue2 = '';
  724. uni.removeStorageSync('searchProdValue2');
  725. this.fetchData();
  726. },
  727. showTel(tel){
  728. uni.makePhoneCall({
  729. phoneNumber: tel,
  730. });
  731. },
  732. }
  733. }
  734. </script>
  735. <style lang="scss" scoped>
  736. .circle {
  737. max-height: 100vh;
  738. }
  739. /* 底部安全边距 start*/
  740. .tn-tabbar-height {
  741. min-height: 120rpx;
  742. height: calc(140rpx + env(safe-area-inset-bottom) / 2);
  743. height: calc(140rpx + constant(safe-area-inset-bottom));
  744. }
  745. /* 自定义导航栏内容 start */
  746. .custom-nav {
  747. height: 100%;
  748. &__back {
  749. margin: auto 5rpx;
  750. font-size: 40rpx;
  751. margin-right: 10rpx;
  752. margin-left: 30rpx;
  753. flex-basis: 5%;
  754. }
  755. &__search {
  756. flex-basis: 60%;
  757. width: 100%;
  758. height: 100%;
  759. &__box {
  760. width: 100%;
  761. height: 70%;
  762. padding: 10rpx 0;
  763. margin: 0 30rpx;
  764. border-radius: 60rpx 60rpx 0 60rpx;
  765. font-size: 24rpx;
  766. }
  767. &__icon {
  768. padding-right: 10rpx;
  769. margin-left: 20rpx;
  770. font-size: 30rpx;
  771. }
  772. &__text {
  773. color: #AAAAAA;
  774. }
  775. }
  776. }
  777. .logo-image {
  778. width: 60rpx;
  779. height: 60rpx;
  780. position: relative;
  781. margin-top: -15rpx;
  782. }
  783. .logo-pic {
  784. background-size: cover;
  785. background-repeat: no-repeat;
  786. // background-attachment:fixed;
  787. background-position: top;
  788. border-radius: 50%;
  789. }
  790. /* 自定义导航栏内容 end */
  791. /* 博主头像 start*/
  792. .image-circle {
  793. // padding: 95rpx;
  794. width: 190rpx;
  795. height: 190rpx;
  796. font-size: 40rpx;
  797. font-weight: 300;
  798. position: relative;
  799. }
  800. .image-pic {
  801. border: 1rpx solid #F8F7F8;
  802. background-size: cover;
  803. background-repeat: no-repeat;
  804. // background-attachment:fixed;
  805. background-position: top;
  806. border-radius: 10rpx;
  807. }
  808. .tn-color-cat {
  809. color: #1D2541;
  810. }
  811. .tn-bg-cat {
  812. background-color: #1D2541;
  813. }
  814. /* 文章内容 start*/
  815. .blogger {
  816. &__item {
  817. padding: 30rpx;
  818. }
  819. &__author {
  820. &__btn {
  821. margin-right: -12rpx;
  822. opacity: 0.5;
  823. }
  824. }
  825. &__desc {
  826. line-height: 30rpx;
  827. &__label {
  828. color: #1D2541;
  829. background-color: #F3F2F7;
  830. border-radius: 10rpx;
  831. font-size: 22rpx;
  832. padding: 5rpx 15rpx;
  833. margin: 5rpx 18rpx 0 0;
  834. &--prefix {
  835. font-size: 24rpx;
  836. color: #1D2541;
  837. padding-right: 10rpx;
  838. }
  839. }
  840. &__content {
  841. line-height: 50rpx;
  842. }
  843. }
  844. &__content {
  845. margin-top: 18rpx;
  846. padding-right: 18rpx;
  847. &__data {
  848. line-height: 46rpx;
  849. text-align: justify;
  850. overflow: hidden;
  851. transition: all 0.25s ease-in-out;
  852. }
  853. &__status {
  854. margin-top: 10rpx;
  855. font-size: 26rpx;
  856. color: #82B2FF;
  857. }
  858. }
  859. &__main-image {
  860. border: 1rpx solid #F8F7F8;
  861. border-radius: 16rpx;
  862. &--1 {
  863. max-width: 80%;
  864. max-height: 300rpx;
  865. }
  866. &--2 {
  867. max-width: 260rpx;
  868. max-height: 260rpx;
  869. }
  870. &--3 {
  871. height: 212rpx;
  872. width: 100%;
  873. }
  874. }
  875. &__count-icon {
  876. font-size: 40rpx;
  877. padding-right: 5rpx;
  878. }
  879. &__ad {
  880. width: 100%;
  881. height: 500rpx;
  882. transform: translate3d(0px, 0px, 0px) !important;
  883. ::v-deep .uni-swiper-slide-frame {
  884. transform: translate3d(0px, 0px, 0px) !important;
  885. }
  886. .uni-swiper-slide-frame {
  887. transform: translate3d(0px, 0px, 0px) !important;
  888. }
  889. &__item {
  890. position: absolute;
  891. width: 100%;
  892. height: 100%;
  893. transform-origin: left center;
  894. transform: translate3d(100%, 0px, 0px) scale(1) !important;
  895. transition: transform 0.25s ease-in-out;
  896. z-index: 1;
  897. &--0 {
  898. transform: translate3d(0%, 0px, 0px) scale(1) !important;
  899. z-index: 4;
  900. }
  901. &--1 {
  902. transform: translate3d(13%, 0px, 0px) scale(0.9) !important;
  903. z-index: 3;
  904. }
  905. &--2 {
  906. transform: translate3d(26%, 0px, 0px) scale(0.8) !important;
  907. z-index: 2;
  908. }
  909. }
  910. &__content {
  911. border-radius: 40rpx;
  912. width: 640rpx;
  913. height: 500rpx;
  914. overflow: hidden;
  915. }
  916. &__image {
  917. width: 100%;
  918. height: 100%;
  919. }
  920. }
  921. }
  922. /* 文章内容 end*/
  923. /* 间隔线 start*/
  924. .tn-strip-bottom {
  925. width: 100%;
  926. border-bottom: 20rpx solid rgba(241, 241, 241, 0.8);
  927. }
  928. /* 间隔线 end*/
  929. /* 广告内容 start */
  930. .ad-image {
  931. width: 80rpx;
  932. height: 80rpx;
  933. position: relative;
  934. }
  935. .ad-pic {
  936. background-size: cover;
  937. background-repeat: no-repeat;
  938. // background-attachment:fixed;
  939. background-position: top;
  940. border-radius: 20%;
  941. }
  942. /* 自定义导航栏内容 end */
  943. /* 全屏轮播 start*/
  944. .card-swiper {
  945. height: 100vh !important;
  946. }
  947. .card-swiper swiper-item {
  948. width: 750rpx !important;
  949. left: 0rpx;
  950. box-sizing: border-box;
  951. overflow: initial;
  952. }
  953. .card-swiper swiper-item .swiper-item {
  954. width: 100%;
  955. display: block;
  956. height: 100vh;
  957. border-radius: 0rpx;
  958. transform: scale(1);
  959. transition: all 0.2s ease-in 0s;
  960. overflow: hidden;
  961. }
  962. .card-swiper swiper-item.cur .swiper-item {
  963. transform: none;
  964. transition: all 0.2s ease-in 0s;
  965. }
  966. .card-swiper swiper-item .swiper-item-png {
  967. margin-top: -50vh;
  968. width: 100%;
  969. display: block;
  970. border-radius: 0rpx;
  971. transform: translate(1040rpx, 20rpx) scale(0.5, 0.5);
  972. transition: all 0.6s ease 0s;
  973. // overflow: hidden;
  974. }
  975. .card-swiper swiper-item.cur .swiper-item-png {
  976. margin-top: -100vh;
  977. width: 900rpx;
  978. transform: translate(-80rpx, 0rpx) scale(1, 1);
  979. transition: all 0.6s ease 0s;
  980. }
  981. .image-banner {
  982. display: flex;
  983. align-items: center;
  984. justify-content: center;
  985. }
  986. .image-banner image {
  987. width: 100%;
  988. }
  989. /* 轮播指示点 start*/
  990. .indication {
  991. z-index: 9999;
  992. width: 100%;
  993. height: 36rpx;
  994. position: fixed;
  995. // display:flex;
  996. display: block;
  997. flex-direction: row;
  998. align-items: center;
  999. justify-content: center;
  1000. }
  1001. .spot {
  1002. background-color: #000;
  1003. opacity: 0.3;
  1004. width: 10rpx;
  1005. height: 10rpx;
  1006. border-radius: 20rpx;
  1007. margin: 20rpx 0 !important;
  1008. left: 95vw;
  1009. top: -60vh;
  1010. position: relative;
  1011. }
  1012. .spot.active {
  1013. opacity: 0.6;
  1014. height: 30rpx;
  1015. background-color: #000;
  1016. }
  1017. /* 资讯主图 start*/
  1018. .image-article {
  1019. border-radius: 8rpx;
  1020. border: 1rpx solid #F8F7F8;
  1021. width: 200rpx;
  1022. height: 200rpx;
  1023. position: relative;
  1024. }
  1025. .image-pic {
  1026. background-size: cover;
  1027. background-repeat: no-repeat;
  1028. // background-attachment:fixed;
  1029. background-position: top;
  1030. border-radius: 10rpx;
  1031. }
  1032. .article-shadow {
  1033. border-radius: 15rpx;
  1034. box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.07);
  1035. }
  1036. /* 文字截取*/
  1037. .clamp-text-1 {
  1038. -webkit-line-clamp: 1;
  1039. display: -webkit-box;
  1040. -webkit-box-orient: vertical;
  1041. text-overflow: ellipsis;
  1042. overflow: hidden;
  1043. }
  1044. .clamp-text-2 {
  1045. -webkit-line-clamp: 2;
  1046. display: -webkit-box;
  1047. -webkit-box-orient: vertical;
  1048. text-overflow: ellipsis;
  1049. overflow: hidden;
  1050. }
  1051. /* 标签内容 start*/
  1052. .tn-tag-content {
  1053. &__item {
  1054. display: inline-block;
  1055. line-height: 35rpx;
  1056. color: #1D2541;
  1057. background-color: #F3F2F7;
  1058. border-radius: 10rpx;
  1059. font-size: 22rpx;
  1060. padding: 5rpx 15rpx;
  1061. &--prefix {
  1062. padding-right: 10rpx;
  1063. }
  1064. }
  1065. }
  1066. /* 图标容器9 start */
  1067. .icon9 {
  1068. &__item {
  1069. width: 30%;
  1070. background-color: #FFFFFF;
  1071. border-radius: 10rpx;
  1072. padding: 30rpx;
  1073. margin: 20rpx 10rpx;
  1074. transform: scale(1);
  1075. transition: transform 0.3s linear;
  1076. transform-origin: center center;
  1077. &--icon {
  1078. width: 110rpx;
  1079. height: 110rpx;
  1080. font-size: 65rpx;
  1081. border-radius: 50%;
  1082. margin: 20rpx 40rpx;
  1083. position: relative;
  1084. z-index: 1;
  1085. &::after {
  1086. content: " ";
  1087. position: absolute;
  1088. z-index: -1;
  1089. width: 100%;
  1090. height: 100%;
  1091. left: 0;
  1092. bottom: 0;
  1093. border-radius: inherit;
  1094. opacity: 1;
  1095. transform: scale(1, 1);
  1096. background-size: 100% 100%;
  1097. background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg5.png);
  1098. }
  1099. }
  1100. }
  1101. }
  1102. /* 悬浮 */
  1103. .tnxuanfu {
  1104. animation: suspension 3s ease-in-out infinite;
  1105. }
  1106. @keyframes suspension {
  1107. 0%,
  1108. 100% {
  1109. transform: translateY(0);
  1110. }
  1111. 50% {
  1112. transform: translateY(-0.8rem);
  1113. }
  1114. }
  1115. /* 悬浮按钮 */
  1116. .button-shop {
  1117. width: 90rpx;
  1118. height: 90rpx;
  1119. display: flex;
  1120. flex-direction: row;
  1121. position: fixed;
  1122. /* bottom:200rpx;
  1123. right: 20rpx; */
  1124. left: 5rpx;
  1125. top: 5rpx;
  1126. z-index: 1001;
  1127. border-radius: 100px;
  1128. opacity: 0.9;
  1129. }
  1130. /* 按钮 */
  1131. .edit {
  1132. bottom: 300rpx;
  1133. right: 75rpx;
  1134. position: fixed;
  1135. z-index: 9999;
  1136. }
  1137. .pa,
  1138. .pa0 {
  1139. position: absolute
  1140. }
  1141. .pa0 {
  1142. left: 0;
  1143. top: 0
  1144. }
  1145. .bg0 {
  1146. width: 100rpx;
  1147. height: 100rpx;
  1148. top: 50%;
  1149. left: 50%;
  1150. transform: translate(-50%, -50%);
  1151. }
  1152. .bg1 {
  1153. width: 100%;
  1154. height: 100%;
  1155. }
  1156. .hx-box {
  1157. top: 50%;
  1158. left: 50%;
  1159. width: 100rpx;
  1160. height: 100rpx;
  1161. transform-style: preserve-3d;
  1162. transform: translate(-50%, -50%) rotateY(75deg) rotateZ(10deg);
  1163. }
  1164. .hx-box .pr {
  1165. width: 100rpx;
  1166. height: 100rpx;
  1167. transform-style: preserve-3d;
  1168. animation: hxz 20s linear infinite;
  1169. }
  1170. @keyframes hxz {
  1171. 0% {
  1172. transform: rotateX(0deg);
  1173. }
  1174. 100% {
  1175. transform: rotateX(-360deg);
  1176. }
  1177. }
  1178. .hx-box .pr .pa0 {
  1179. width: 100rpx;
  1180. height: 100rpx;
  1181. /* border: 4px solid #5ec0ff; */
  1182. border-radius: 1000px;
  1183. }
  1184. .hx-box .pr .pa0 .span {
  1185. display: block;
  1186. width: 100%;
  1187. height: 100%;
  1188. background: url(https://resource.tuniaokj.com/images/cool_bg_image/arc4.png) no-repeat center center;
  1189. background-size: 100% 100%;
  1190. animation: hx 4s linear infinite;
  1191. }
  1192. @keyframes hx {
  1193. to {
  1194. transform: rotate(360deg);
  1195. }
  1196. }
  1197. .hx-k1 {
  1198. transform: rotateX(-60deg) rotateZ(-60deg)
  1199. }
  1200. .hx-k2 {
  1201. transform: rotateX(-30deg) rotateZ(-30deg)
  1202. }
  1203. .hx-k3 {
  1204. transform: rotateX(0deg) rotateZ(0deg)
  1205. }
  1206. .hx-k4 {
  1207. transform: rotateX(30deg) rotateZ(30deg)
  1208. }
  1209. .hx-k5 {
  1210. transform: rotateX(60deg) rotateZ(60deg)
  1211. }
  1212. .hx-k6 {
  1213. transform: rotateX(90deg) rotateZ(90deg)
  1214. }
  1215. </style>