comm.vue 37 KB

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