coll.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729
  1. <template>
  2. <view style="background-color: #f7f7f7;min-height: 100vh;">
  3. <tn-nav-bar fixed customBack>
  4. <view slot="back" class='tn-custom-nav-bar__back' @click="goBack">
  5. <text class='icon tn-icon-left'></text>
  6. </view>
  7. <view slot="default">
  8. <text :style="{fontSize:(wxFontSize)+'px'}">我的收藏</text>
  9. </view>
  10. </tn-nav-bar>
  11. <view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
  12. <uv-sticky :offsetTop="vuex_custom_bar_height + 'px'" bgColor="#f7f7f7">
  13. <tn-tabs-swiper :list="list" :isScroll="false" :fontSize="(wxFontSize+12)" :barWidth="wxFontSize+50" :current="current" name="tab-name" @change="change" activeColor="#005DA6" inactiveColor="#333"></tn-tabs-swiper>
  14. </uv-sticky>
  15. <view>
  16. <!-- 图文信息 -->
  17. <block v-for="(item,index) in content" :key="index">
  18. <view class="blogger__item" style="border-radius: 12px;margin: 12px 16px 12px 16px; background-color: #fff;">
  19. <view class="blogger__author tn-flex tn-flex-row-between tn-flex-col-center">
  20. <view class="justify__author__info">
  21. <view class="tn-flex tn-flex-row-center">
  22. <view class="tn-flex tn-flex-row-center tn-flex-col-center">
  23. <view class="" style="width: 5px;height: 5px;background: #E18730;border-radius: 50%;margin-right: 4px;">
  24. </view>
  25. <view class="tn-padding-right">
  26. <view class="tn-padding-right tn-text-bold tn-text-lg" style="color:#333" :style="{fontSize:(wxFontSize)+'px'}">
  27. {{ item.company||(item.contactNickName||item.contactPerson) }}
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. <view v-if="item.validDate&&current==0"
  34. class="blogger__author__btn justify-content-item tn-flex-col-center tn-flex-row-center">
  35. <text class="" style="background: #E6E8F4;font-size: 12px;word-break: keep-all;padding: 8px;color: #8383F7;border-radius: 24px;border-top-right-radius: 0;" :style="{fontSize:(wxFontSize-6)+'px'}" @click="showValid(item.validDate)">{{item.validDate}}</text>
  36. </view>
  37. </view>
  38. <view
  39. class="blogger__desc tn-margin-top-sm tn-margin-bottom-sm tn-text-justify tn-flex-col-center tn-flex-row-left"
  40. >
  41. <tn-tag margin="-4px 4px 0 0" backgroundColor="#005da61a" v-if="item.brand"
  42. fontColor="#005DA6" shape="circle" :fontSize="wxFontSize+11" @click="showBrand('品牌:'+item.brand)">{{ item.brand }}</tn-tag>
  43. <tn-tag margin="-4px 4px 0 0" backgroundColor="#005da61a" v-if="!item.company"
  44. fontColor="#005DA6" shape="circle" :fontSize="wxFontSize+11" @click="showBrand('个人发布')">个人</tn-tag>
  45. </view>
  46. <view style="border-radius: 0px 0px 0px 0px;width:calc(100% + 32px);margin-left:-16px;border-bottom: 1px solid #E6E6E6;"></view>
  47. <view v-if="item.content" style="padding: 12px 12px 5px 5px;">
  48. <text
  49. class="blogger__desc__content tn-flex-1 tn-text-justify tn-text-df" style="color:#747E87" :style="{fontSize:(wxFontSize-2)+'px'}">{{ item.content }}</text>
  50. </view>
  51. <!-- <view
  52. class="blogger__desc tn-margin-top-sm tn-margin-bottom-sm tn-text-justify tn-flex-col-center tn-flex-row-left"
  53. >
  54. <tn-tag margin="-4px 4px 0 0" backgroundColor="#3a96d733" v-if="item.brand" fontColor="#3a96d7" shape="circle" :fontSize="wxFontSize+11">{{ item.brand }}</tn-tag>
  55. <tn-tag margin="-4px 4px 0 0" backgroundColor="#3a96d733" v-if="!item.company"
  56. fontColor="#3a96d7" shape="circle" :fontSize="wxFontSize+11">个人</tn-tag>
  57. <text
  58. class="blogger__desc__content tn-flex-1 tn-text-justify tn-text-df" :style="{fontSize:(wxFontSize-2)+'px'}">{{ item.content }}</text>
  59. </view> -->
  60. <!-- 内容太多疲劳了-->
  61. <view v-if="item.shareExt&&item.shareExt.length>0" class="blogger__content"
  62. :id="`blogger__content--${index}`">
  63. <view v-for="(sitem,index) in item.shareExt" :key="sitem.id">
  64. <view style="padding: 12px 0 8px 5px;color:#005DA6;" :style="{fontSize:(wxFontSize-3)+'px'}">
  65. {{sitem.prodName}}
  66. </view>
  67. <view style="padding: 8px 8px 0 5px;color:#333;display: flex;" :style="{fontSize:(wxFontSize-3)+'px'}">
  68. <text style="color: #777;white-space: nowrap;">产品型号:</text>{{sitem.prodSpec}}
  69. </view>
  70. <view v-if="sitem.prodDesc" style="padding: 8px 8px 0 5px;color:#333;display: flex;" :style="{fontSize:(wxFontSize-3)+'px'}">
  71. <text style="color: #777;white-space: nowrap;">产品介绍:</text><text>{{sitem.prodDesc}}</text>
  72. </view>
  73. </view>
  74. </view>
  75. <block v-if="item.imgList">
  76. <view v-if="[1,2,4].indexOf(item.imgList.length) != -1" class="tn-padding-top-xs"
  77. @click="tn('')">
  78. <image v-for="(image_item,image_index) in item.imgList" :key="image_index"
  79. class="blogger__main-image" :class="{
  80. 'blogger__main-image--1 tn-margin-bottom-sm': item.imgList.length === 1,
  81. 'blogger__main-image--2 tn-margin-right-sm tn-margin-bottom-sm': item.imgList.length === 2 || item.imgList.length === 4
  82. }" :src="image_item.ftpUrl" mode="aspectFill" @click="showImg(item.imgList,image_index)"></image>
  83. </view>
  84. <view v-else class="tn-padding-top-xs" @click="tn('')">
  85. <tn-grid hoverClass="none" :col="3">
  86. <block v-for="(image_item,image_index) in item.imgList" :key="image_index">
  87. <!-- #ifndef MP-WEIXIN -->
  88. <tn-grid-item style="width: 30%;margin: 10rpx;">
  89. <image class="blogger__main-image blogger__main-image--3"
  90. :src="image_item.ftpUrl" mode="aspectFill" @click="showImg(item.imgList,image_index)"></image>
  91. </tn-grid-item>
  92. <!-- #endif-->
  93. <!-- #ifdef MP-WEIXIN -->
  94. <tn-grid-item style="width: 30%;margin: 10rpx;">
  95. <image class="blogger__main-image blogger__main-image--3"
  96. aspectFill :src="image_item.ftpUrl" mode="aspectFill" @click="showImg(item.imgList,image_index)"></image>
  97. </tn-grid-item>
  98. <!-- #endif-->
  99. </block>
  100. </tn-grid>
  101. </view>
  102. </block>
  103. <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)">
  104. <view>
  105. <image src="../../static/tu/link.png" style="width: 18px;height: 18px;vertical-align: bottom;"></image>
  106. <view style="display: inline;margin-left:8px;color:#005DA6;" :style="{fontSize:(wxFontSize-3)+'px'}">
  107. {{file.fileName}}</view>
  108. </view>
  109. </view>
  110. <view class="tn-flex tn-flex-row-between tn-flex-col-center tn-margin-top-xs">
  111. <view class="justify-content-item tn-color-gray tn-text-center">
  112. <view class="tn-padding-right tn-padding-top-xs tn-color-gray" :style="{fontSize:(wxFontSize-3)+'px',color:'#777'}">
  113. {{ item.createTime2|formatDate }}
  114. </view>
  115. </view>
  116. <view class="justify-content-item tn-flex tn-flex-col-center" style="position: relative;">
  117. <button type="warn" plain="true" style="height: 26px;line-height: 26px;color:#EF2121;border-color:#EF2121;" size="mini" @click="delColl(item)"><text style="font-size: 18px;" class="tn-icon-delete"></text></button>
  118. <image style="width: 30px;height:30px;margin-left:8px" @click="showActionSheet(item)" src="../../static/tu/more.png"></image>
  119. <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;">
  120. <view class="content" style="padding: 8px;font-size: 16px;line-height: 24px; width: 180px;border-radius: 6px;z-index: -1;"
  121. v-if="!showContact">
  122. <button @click="linkTel()" style="border: none;border-radius: 0;color: #333333;background-color: #E4F1FB;border-bottom: 1px solid rgb(0 93 166 / 0.2);">
  123. <image src="../../static/tu/call.png" style="width: 26px;height: 26px;margin-right:10px;vertical-align: middle;"> {{current==0?'联系需方':'联系供方'}}</button>
  124. <!-- <view>联系我们帮助对接</view> -->
  125. <button open-type="share"
  126. style="border: none;border-radius: 0;color: #333333;background-color: #E4F1FB;" type="default" plain="true" :data-coupon="curItem">
  127. <image src="../../static/tu/share.png" style="width: 26px;height: 26px;margin-right:10px;vertical-align: middle;">
  128. 转&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;发</button>
  129. </view>
  130. <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;"
  131. v-if="showContact">
  132. <view><text style="font-size: 19px;font-weight: bold;color: #333;" v-if="curContact.company">{{curContact.company}}</text></view>
  133. <view style="margin-top:10px;font-size: 17px;text-align: center;color:#333">
  134. <image src="../../static/tu/person.png" style="width: 24px;height: 24px;vertical-align: sub;">
  135. <text style="margin-left: 6px;">{{curContact.contactPerson}}</text> </view>
  136. <view style="margin-top:10px;font-size: 17px;text-align: center;color:#333" @click="showTel(curContact.contactMethod)">
  137. <image src="../../static/tu/tel.png" style="width: 24px;height: 24px;vertical-align: middle;">
  138. <text style="margin-left: 4px;">{{curContact.contactMethod}}</text>
  139. </view>
  140. <image src="../../static/tu/close.png" style="width: 40px;height: 40px;position: absolute; left: calc(50vw - 60px);bottom: -64px;" @click="hideSheet()"></image>
  141. </view>
  142. <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>
  143. </view>
  144. </view>
  145. </view>
  146. </view>
  147. <!-- 边距间隔 -->
  148. <!-- <view class="tn-strip-bottom" v-if="index != content.length - 1"></view> -->
  149. </block>
  150. </view>
  151. <view v-if="showEmpty" style="margin-top: 32vh;">
  152. <tn-empty mode="data"></tn-empty>
  153. </view>
  154. <view class='tn-tabbar-height' :style="{marginTop: vuex_custom_bar_height + 'px'}"></view>
  155. </view>
  156. </view>
  157. </template>
  158. <script>
  159. import request from '../../utils/request'
  160. import {
  161. uniShowModal
  162. } from '../../utils/uni_api'
  163. export default {
  164. data() {
  165. return {
  166. list: [{
  167. 'tab-name': '需求'
  168. }, {
  169. 'tab-name': '供应'
  170. }],
  171. current: 0,
  172. showEmpty: false,
  173. content: [],
  174. curItem:{},
  175. showSheet:false,
  176. showContact:false,
  177. curContact:{},
  178. columns: [{
  179. fieldName: 'prodName',
  180. fieldDesc: '产品名称',
  181. }, {
  182. fieldName: 'prodSpec',
  183. fieldDesc: '产品型号',
  184. }, {
  185. fieldName: 'prodDesc',
  186. fieldDesc: '产品介绍',
  187. }],
  188. wxFontSize:17,
  189. shareData:{}
  190. }
  191. },
  192. filters: {
  193. formatDate(value) {
  194. if (!value) return '';
  195. const date = new Date(value);
  196. const today = new Date();
  197. const yesterday = new Date(today); // 昨天的日期
  198. yesterday.setDate(yesterday.getDate() - 1); // 将昨天的日期设置为前一天
  199. if (date.getFullYear() == today.getFullYear() && date.getMonth() == today.getMonth() && date.getDate() ==
  200. today.getDate()) {
  201. return '今天 ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
  202. .getMinutes() > 9 ? '' : '0') + date.getMinutes(); // 根据需要格式化日期
  203. }
  204. if (date.getFullYear() == yesterday.getFullYear() && date.getMonth() == yesterday.getMonth() && date
  205. .getDate() == yesterday.getDate()) {
  206. return '昨天 ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
  207. .getMinutes() > 9 ? '' : '0') + date.getMinutes(); // 根据需要格式化日期
  208. }
  209. return date.toLocaleDateString() + ' ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
  210. .getMinutes() > 9 ? '' : '0') + date.getMinutes(); // 根据需要格式化日期
  211. },
  212. },
  213. onLoad(){
  214. const appBaseInfo = wx.getAppBaseInfo();
  215. this.wxFontSize = uni.getStorageSync('fontSize')||appBaseInfo.fontSizeSetting||17;
  216. if(!uni.getStorageSync('userNo')){
  217. //去登录
  218. uni.navigateTo({
  219. url: '/pages/login/login',
  220. });
  221. return false;
  222. }
  223. this.loadData();
  224. },
  225. onShow() {
  226. },
  227. methods: {
  228. addLog(shareData){
  229. const that = this;
  230. let params= {
  231. bisNo:shareData.bisNo,
  232. bisType:this.current==0?'1':'2',
  233. userNo:uni.getStorageSync('userNo')
  234. };
  235. request.post('/slbForward/add',{slbForward:JSON.stringify(params)},{
  236. headers: {
  237. 'Content-Type': 'application/json', // 默认值
  238. },
  239. }).then(res=>{
  240. })
  241. },
  242. sleep(time) {
  243. return new Promise((resolve) => setTimeout(resolve, time));
  244. },
  245. onShareAppMessage: function(option) {
  246. if(option.from=="button"){
  247. this.hideSheet();
  248. this.shareData=option.target.dataset.coupon;
  249. this.addLog(this.shareData);
  250. const promise = new Promise(async (resolve) => {
  251. await this.sleep(500);
  252. resolve({
  253. // title: `速立保`,
  254. path: `/pages/index/detail/detail?id=`+this.shareData.bisNo+'&isNeed='+(this.current==0?'1':'0'),
  255. // imageUrl: url,
  256. });
  257. });
  258. // 默认参数
  259. return {
  260. // title: `速立保`,
  261. path: `/pages/index/detail/detail?id=`+this.shareData.bisNo+'&isNeed='+(this.current==0?'1':'0'),
  262. promise,
  263. };
  264. }else{
  265. return {
  266. // title: '速立保',
  267. path: '/pages/index/index',
  268. };
  269. }
  270. },
  271. showBrand(text){
  272. uni.showToast({
  273. title: text,
  274. icon: 'none'
  275. })
  276. },
  277. showValid(text){
  278. uni.showToast({
  279. title: '有效期:'+text,
  280. icon: 'none'
  281. })
  282. },
  283. goBack() {
  284. const pages = getCurrentPages()
  285. // 有可返回的页面则直接返回,uni.navigateBack 默认返回失败之后会自动刷新页面 ,无法继续返回
  286. if (pages.length > 1) {
  287. uni.navigateBack()
  288. return;
  289. }else{
  290. uni.reLaunch({
  291. url: '/pages/index/index'
  292. })
  293. }
  294. },
  295. change(index) {
  296. this.current = index;
  297. this.loadData();
  298. },
  299. isImage(fileName) {
  300. const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'ico']
  301. const extension = fileName.split('.').pop().toLowerCase();
  302. return imageExtensions.includes(extension);
  303. },
  304. loadData() {
  305. let that = this;
  306. that.content = [];
  307. request.post('/slbCollect/show/my', {
  308. userNo: uni.getStorageSync('userNo'),
  309. bisType: that.current == 1 ? '2' : '1',
  310. }).then(res => {
  311. let newList = res.list || [];
  312. if (res&&res.success) {
  313. let cList = [];
  314. for (let i = 0; i < newList.length; i++) {
  315. if (newList[i].fkBisMap) {
  316. newList[i].fkBisMap.collId = newList[i].id;
  317. newList[i].fkBisMap.createTime2 = newList[i].createTime;
  318. newList[i].fkBisMap.imgList = [];
  319. for (let j = 0; j < newList[i].fkBisMap.fileDetailList.length; j++) {
  320. if (that.isImage(newList[i].fkBisMap.fileDetailList[j].fileName)) {
  321. newList[i].fkBisMap.imgList.push(newList[i].fkBisMap.fileDetailList[j]);
  322. }
  323. }
  324. cList.push(newList[i].fkBisMap);
  325. }
  326. }
  327. that.content = cList;
  328. }
  329. if(res._redirect){
  330. uni.navigateTo({
  331. url: '/pages/login/login',
  332. });
  333. return false;
  334. }
  335. if (newList.length == 0) {
  336. that.showEmpty = true;
  337. } else {
  338. that.showEmpty = false;
  339. }
  340. })
  341. },
  342. dialogConfirm(){
  343. let item = this.curItem;
  344. let that = this;
  345. request.post('/slbCollect/del', {
  346. id: item.collId,
  347. userNo: uni.getStorageSync('userNo'),
  348. }).then(res => {
  349. if (res.success) {
  350. uni.showToast({
  351. title: '取消成功'
  352. })
  353. that.loadData();
  354. } else {
  355. uni.showToast({
  356. title: res.msg,
  357. icon: 'none'
  358. })
  359. }
  360. })
  361. },
  362. delColl(item) {
  363. this.curItem = item;
  364. let that = this;
  365. uniShowModal('确定取消收藏吗?', '', {
  366. showCancel: true,
  367. confirmText:'确定',
  368. success: (res) => {
  369. if(res.confirm){
  370. that.dialogConfirm();
  371. }
  372. }
  373. })
  374. },
  375. showImg(items, index) {
  376. let urls = [];
  377. for (let i = 0; i < items.length; i++) {
  378. urls.push(items[i].ftpUrl);
  379. }
  380. // 预览图片
  381. uni.previewImage({
  382. urls: urls,
  383. current: index,
  384. });
  385. },
  386. clickLink(url,fileName) {
  387. // uni.navigateTo({
  388. // url:'/pages/webview/web-view?url='+encodeURIComponent('https://slb-m.lx-device.com/webview?title='+fileName+'&url='+ url),
  389. // })
  390. uni.downloadFile({
  391. url: url,
  392. filePath: wx.env.USER_DATA_PATH + "/" + fileName,
  393. success: function (res) {
  394. const filePath = res.filePath
  395. uni.openDocument({
  396. filePath: filePath,
  397. showMenu: true,
  398. success: function (res) {
  399. console.log('打开文档成功')
  400. },
  401. fail: function(){
  402. uni.navigateTo({
  403. url:'/pages/webview/web-view?url='+encodeURIComponent('https://slb-m.lx-device.com/webview?title='+fileName+'&url='+ url),
  404. })
  405. }
  406. })
  407. }
  408. })
  409. // uni.navigateTo({
  410. // url:'/pages/webview/web-view?url='+url,
  411. // })
  412. },
  413. hideSheet(){
  414. this.curItem = {};
  415. this.showSheet = false;
  416. },
  417. showActionSheet(item) {
  418. let that = this;
  419. console.warn(item);
  420. if(!this.curItem.id){
  421. this.curItem = item;
  422. }else{
  423. this.curItem = {}
  424. this.showSheet = false;
  425. return false;
  426. }
  427. this.showSheet = true;
  428. that.showContact = false;
  429. },
  430. linkTel() {
  431. if (!uni.getStorageSync('userNo')) {
  432. uni.showToast({
  433. title: '请登录'
  434. })
  435. uni.navigateTo({
  436. url: '/pages/login/login'
  437. })
  438. return false;
  439. }
  440. let that = this;
  441. let params = {};
  442. params.slbBisContact = JSON.stringify({
  443. fkBisNo: that.curItem.bisNo,
  444. bisType: that.current==0?'1':'2',
  445. type: '1',
  446. company: that.curItem.company,
  447. companyNo: that.curItem.companyNo,
  448. userNo: uni.getStorageSync('userNo'),
  449. });
  450. request.post('/slbBisContact/add', params).then(res => {
  451. if (res.success) {
  452. that.showContact = true;
  453. that.curContact.company = that.curItem.company;
  454. that.curContact.contactMethod = res.resultMap.contactMethod;
  455. that.curContact.contactPerson = res.resultMap.contactPerson;
  456. } else {
  457. that.showContact = false;
  458. uni.showToast({
  459. title: res.msg,
  460. icon: 'none'
  461. })
  462. }
  463. })
  464. },
  465. showTel(tel){
  466. uni.makePhoneCall({
  467. phoneNumber: tel,
  468. });
  469. },
  470. }
  471. }
  472. </script>
  473. <style lang="scss" scoped>
  474. /* 胶囊*/
  475. .tn-custom-nav-bar__back {
  476. width: 60%;
  477. height: 100%;
  478. position: relative;
  479. display: flex;
  480. justify-content: space-evenly;
  481. align-items: center;
  482. box-sizing: border-box;
  483. // background-color: rgba(0, 0, 0, 0.15);
  484. border-radius: 1000rpx;
  485. border: 1rpx solid rgba(255, 255, 255, 0.5);
  486. // color: #FFFFFF;
  487. font-size: 18px;
  488. .icon {
  489. display: block;
  490. flex: 1;
  491. margin: auto;
  492. text-align: center;
  493. }
  494. &:before {
  495. content: " ";
  496. width: 1rpx;
  497. height: 110%;
  498. position: absolute;
  499. top: 22.5%;
  500. left: 0;
  501. right: 0;
  502. margin: auto;
  503. transform: scale(0.5);
  504. transform-origin: 0 0;
  505. pointer-events: none;
  506. box-sizing: border-box;
  507. opacity: 0.7;
  508. background-color: #FFFFFF;
  509. }
  510. }
  511. /* 文章内容 start*/
  512. .blogger {
  513. &__item {
  514. padding: 30rpx;
  515. }
  516. &__author {
  517. &__btn {
  518. margin-right: -12rpx;
  519. opacity: 0.5;
  520. }
  521. }
  522. &__desc {
  523. line-height: 30rpx;
  524. &__label {
  525. color: #1D2541;
  526. background-color: #F3F2F7;
  527. border-radius: 10rpx;
  528. font-size: 22rpx;
  529. padding: 5rpx 15rpx;
  530. margin: 5rpx 18rpx 0 0;
  531. &--prefix {
  532. font-size: 24rpx;
  533. color: #1D2541;
  534. padding-right: 10rpx;
  535. }
  536. }
  537. &__content {
  538. line-height: 50rpx;
  539. }
  540. }
  541. &__content {
  542. margin-top: 18rpx;
  543. padding-right: 18rpx;
  544. &__data {
  545. line-height: 46rpx;
  546. text-align: justify;
  547. overflow: hidden;
  548. transition: all 0.25s ease-in-out;
  549. }
  550. &__status {
  551. margin-top: 10rpx;
  552. font-size: 26rpx;
  553. color: #82B2FF;
  554. }
  555. }
  556. &__main-image {
  557. border: 1rpx solid #F8F7F8;
  558. border-radius: 16rpx;
  559. &--1 {
  560. max-width: 80%;
  561. max-height: 300rpx;
  562. }
  563. &--2 {
  564. max-width: 260rpx;
  565. max-height: 260rpx;
  566. }
  567. &--3 {
  568. height: 212rpx;
  569. width: 100%;
  570. }
  571. }
  572. &__count-icon {
  573. font-size: 40rpx;
  574. padding-right: 5rpx;
  575. }
  576. &__ad {
  577. width: 100%;
  578. height: 500rpx;
  579. transform: translate3d(0px, 0px, 0px) !important;
  580. ::v-deep .uni-swiper-slide-frame {
  581. transform: translate3d(0px, 0px, 0px) !important;
  582. }
  583. .uni-swiper-slide-frame {
  584. transform: translate3d(0px, 0px, 0px) !important;
  585. }
  586. &__item {
  587. position: absolute;
  588. width: 100%;
  589. height: 100%;
  590. transform-origin: left center;
  591. transform: translate3d(100%, 0px, 0px) scale(1) !important;
  592. transition: transform 0.25s ease-in-out;
  593. z-index: 1;
  594. &--0 {
  595. transform: translate3d(0%, 0px, 0px) scale(1) !important;
  596. z-index: 4;
  597. }
  598. &--1 {
  599. transform: translate3d(13%, 0px, 0px) scale(0.9) !important;
  600. z-index: 3;
  601. }
  602. &--2 {
  603. transform: translate3d(26%, 0px, 0px) scale(0.8) !important;
  604. z-index: 2;
  605. }
  606. }
  607. &__content {
  608. border-radius: 40rpx;
  609. width: 640rpx;
  610. height: 500rpx;
  611. overflow: hidden;
  612. }
  613. &__image {
  614. width: 100%;
  615. height: 100%;
  616. }
  617. }
  618. }
  619. /* 文章内容 end*/
  620. /* 间隔线 start*/
  621. .tn-strip-bottom {
  622. width: 100%;
  623. border-bottom: 20rpx solid rgba(241, 241, 241, 0.8);
  624. }
  625. .bg-content{
  626. color: #fff;
  627. background-image: url(./../../static/tu/needbg.png);
  628. background-size: cover;
  629. }
  630. /* 间隔线 end*/
  631. /* 底部安全边距 start*/
  632. .tn-tabbar-height {
  633. min-height: 120rpx;
  634. height: calc(140rpx + env(safe-area-inset-bottom) / 2);
  635. height: calc(140rpx + constant(safe-area-inset-bottom));
  636. }
  637. </style>