buildList2.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956
  1. <template >
  2. <view>
  3. <view :class="['custom-header', { 'is-back': isBack }, bgColor]">
  4. <view class="back-container" @click="handleBack" v-if="canBack">
  5. <view class="back-text">返回</view>
  6. </view>
  7. <view class="content-container">
  8. <view class="content-text">{{title}}</view>
  9. </view>
  10. </view>
  11. <!-- <swiper class="swiper" circular :indicator-dots="true" :autoplay="true" :interval="3000" :duration="800">
  12. <swiper-item>
  13. <image src="../../static/img/titlebg.jpg" class="swiper-item"></image>
  14. </swiper-item>
  15. <swiper-item>
  16. <image src="../../static/img/titlebg.jpg" class="swiper-item"></image>
  17. </swiper-item>
  18. </swiper> -->
  19. <swiper class="swiper" circular :indicator-dots="true" :autoplay="true" :interval="3000" :duration="800">
  20. <swiper-item v-for="(item, index) in picture2" :key="index">
  21. <image :src="item" class="swiper-item"></image>
  22. </swiper-item>
  23. </swiper>
  24. <view class="line-box">
  25. <view :style="[{top:CustomBar + 'px'}]">
  26. <view class="tabs" v-if="md=='1'">
  27. <view
  28. v-for="(tab, index) in tabs"
  29. :key="index"
  30. class="tab-item"
  31. :class="{ active: activeTab === index }"
  32. @click="switchTab(index)"
  33. >
  34. {{ tab.name }}
  35. </view>
  36. </view>
  37. <view class="tabs" v-if="md=='2'">
  38. <view
  39. v-for="(tab, index) in tabs2"
  40. :key="index"
  41. class="tab-item"
  42. :class="{ active: activeTab === index }"
  43. @click="switchTab2(index)"
  44. >
  45. {{ tab.name }}
  46. </view>
  47. </view>
  48. <image :src="picture" mode="widthFix" class="img-item" >
  49. </image>
  50. </view>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. import loginService from "@/api/auth/loginService";
  56. import uniFab from '@/components/uni-fab/uni-fab.vue';
  57. import DoublePicker from '@/components/DoublePicker/DoublePicker.vue'
  58. import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
  59. import MescrollMoreItemMixin from "@/components/mescroll-uni/mixins/mescroll-more-item.js";
  60. import {mapActions} from 'vuex'
  61. export default {
  62. mixins: [MescrollMixin, MescrollMoreItemMixin], // 使用mixin (在main.js注册全局组件)
  63. name: "apps",
  64. components: {
  65. uniFab,
  66. DoublePicker
  67. },
  68. data() {
  69. return {
  70. isBack: true, // 是否显示返回按钮
  71. backText: '返回', // 返回按钮的文本
  72. bgColor: 'bg-blue', // 背景颜色
  73. title: '',
  74. isLogin:"",
  75. pageInfo: {},
  76. loginid:"",
  77. showMoreFilters: false,
  78. picture2:["https://ydwqfw.com.cn/yd_qycpfbH5/bg1.jpg",
  79. "https://ydwqfw.com.cn/yd_qycpfbH5/bg2.jpg",
  80. "https://ydwqfw.com.cn/yd_qycpfbH5/bg3.jpg",
  81. "https://ydwqfw.com.cn/yd_qycpfbH5/bg4.jpg"],
  82. tabs: [
  83. { name: '三大新兴产业' },
  84. { name: '三大未来产业' },
  85. { name: 'N个特色产业' },
  86. { name: '集群产业链' }
  87. ],
  88. picture:"https://ydwqfw.com.cn/yd_qycpfbH5/cp1.png",
  89. tabs2: [
  90. { name: '东山系' },
  91. { name: '长盈系' },
  92. { name: '融和系' },
  93. { name: '其他链主企业' }
  94. ],
  95. activeTab: 0,
  96. stype: "", // 企业 => 3 楼宇 => 2 园区 => 1 zfadmin => 4 admin=> 5
  97. md:"1",
  98. searchForm: {
  99. des1:"",
  100. industry:"",
  101. name:"",
  102. des7:"",
  103. des8:"",
  104. },
  105. curWord: "", //当前搜索关键词
  106. dataList: [], // 数据列表
  107. modalName: null,
  108. tablePage: {
  109. total: 0,
  110. currentPage: 1,
  111. pageSize: 10,
  112. orders: []
  113. },
  114. loading: false,
  115. parkId: '',
  116. parkList: [],
  117. parkList2: [],
  118. parkList3: [],
  119. parkList4: [],
  120. ddd1:"" ,
  121. canBack:false,
  122. };
  123. },
  124. onLoad(query) {
  125. if(query!=undefined&&query!=null&&query!=''){
  126. if(query.loginid!=undefined){
  127. this.loginid=query.loginid
  128. this.autoLogin();
  129. }
  130. if (query && query.w=='1' ) {
  131. this.md = "1";
  132. this.searchForm.des7="";
  133. this.title="产业图谱";
  134. }else if(query && query.w=='2'){
  135. this.md = "2";
  136. this.searchForm.des8=1;
  137. this.title="链主企业";
  138. }
  139. }
  140. },
  141. onShow() {
  142. this.isLogin=this.$auth.checkisLogin();
  143. this.canBack = window.history.length > 1;
  144. },
  145. created() {
  146. //this.getPageInfo();
  147. this.getParkList()
  148. this.getParkList2()
  149. this.getParkList3()
  150. },
  151. methods: {
  152. ...mapActions(['refreshUserInfo']),
  153. //选择产业链环节
  154. getParkList3() {
  155. loginService.getIndustryChainList({
  156. }).then(({
  157. data
  158. }) => {
  159. // this.parkList3 = data.map((item) => {
  160. // return {
  161. // label: item.bz2,
  162. // value: item.bz2
  163. // }
  164. // });
  165. this.parkList3=[{label: '上游',value: '上游'},{label: '中游',value: '中游'},{label: '下游',value: '下游'}]
  166. this.parkList4 = data
  167. .map((item) => {
  168. const match = item.bz2.match(/\((.*?)\)/); // 匹配括号内的内容
  169. if (match) {
  170. return {
  171. label: match[1], // 括号内的内容
  172. value: match[1] // 括号内的内容
  173. };
  174. }
  175. return null; // 如果没有括号,返回 null
  176. })
  177. .filter((item) => item !== null) // 过滤掉 null 值
  178. .reduce((acc, current) => {
  179. // 使用 Set 去重
  180. const existingItem = acc.find((item) => item.value === current.value);
  181. if (!existingItem) {
  182. acc.push(current);
  183. }
  184. return acc;
  185. }, []);
  186. this.parkList3.unshift({
  187. label: "全部",
  188. value: ""
  189. });
  190. this.parkList4.unshift({
  191. label: "全部",
  192. value: ""
  193. });
  194. }).catch(e => {
  195. console.log(e)
  196. })
  197. },
  198. //选择属地
  199. getParkList2() {
  200. loginService.getAreaList({
  201. }).then(({
  202. data
  203. }) => {
  204. this.parkList2 = data.map((item) => {
  205. return {
  206. label: item.des1,
  207. value: item.des1
  208. }
  209. })
  210. this.parkList2.unshift({
  211. label: "盐都区",
  212. value: ""
  213. });
  214. }).catch(e => {
  215. console.log(e)
  216. })
  217. },
  218. //选择行业
  219. getParkList() {
  220. loginService.getHyList({
  221. }).then(({
  222. data
  223. }) => {
  224. this.parkList = data.map((item) => {
  225. return {
  226. label: item.industry,
  227. value: item.industry
  228. }
  229. })
  230. this.parkList.unshift({
  231. label: "全部",
  232. value: ""
  233. });
  234. }).catch(e => {
  235. console.log(e)
  236. })
  237. },
  238. /*获取数据列表 */
  239. upCallback(page) {
  240. this.loading = true
  241. loginService.comlist({
  242. current: page.num,
  243. size: page.size,
  244. name: this.curWord,
  245. des1: this.parkId,
  246. orders: [{ column: 'a.create_date', asc: false }],
  247. ...this.searchForm
  248. }).then(({
  249. data
  250. }) => {
  251. let curPageData = data.records
  252. this.mescroll.endBySize(curPageData.length, data.total);
  253. //如果是第一页需手动制空列表
  254. if (page.num == 1)
  255. this.dataList = [];
  256. //追加新数据
  257. this.dataList = this.dataList.concat(curPageData);
  258. }).catch(e => {
  259. //联网失败, 结束加载
  260. this.mescroll.endErr();
  261. })
  262. },
  263. gotoBuildInfo(id) {
  264. // uni.navigateTo({
  265. // url: `/pages/comEdit/comEdit?id=${id}&ischeck=1`
  266. // })
  267. window.location.href=`/yd_qycpfbH5/#/pages/comEdit/comEdit?id=${id}&ischeck=1`
  268. },
  269. updateCities(newCities) {
  270. this.cities = newCities;
  271. },
  272. // 搜索
  273. doSearch() {
  274. if(this.ddd1.column2!=''&&this.ddd1!=''){
  275. this.searchForm.bz2=this.ddd1.column1+'('+this.ddd1.column2+')';
  276. }else if(this.ddd1!=''){
  277. this.searchForm.bz2=this.ddd1.column1;
  278. }
  279. this.dataList = []; // 先清空列表,显示加载进度
  280. this.mescroll.resetUpScroll();
  281. },
  282. totongxunlu(){
  283. uni.navigateTo({
  284. url: '/pages/comList/comList'
  285. })
  286. },
  287. totongxunlu2(){
  288. uni.showModal({
  289. title: '功能暂未开放,请至后台导入!',
  290. showCancel: true,
  291. success: (res) => {
  292. }
  293. });
  294. },
  295. getPageInfo() {
  296. loginService.InfoStatistics({}).then(({ data }) => {
  297. this.pageInfo = data;
  298. });
  299. },
  300. autoLogin(){
  301. console.log("登录id"+this.loginid);
  302. loginService.loginid( this.loginid).then(({data}) => {
  303. this.$store.commit('SET_TOKEN',data.token);
  304. this.refreshUserInfo();
  305. }).catch(e => {
  306. console.error(e)
  307. })
  308. },
  309. getRole() {
  310. let userInfo = uni.getStorageSync('WMS-userinfo')
  311. var officeId = userInfo.officeDTO.id;
  312. var roleIds = userInfo.roleIds;
  313. if (roleIds.indexOf("17bac1f980264e3e8193bc965538e2c6") != -1) {
  314. //// 管理员
  315. this.stype = 5
  316. uni.setStorageSync('stype', this.stype);
  317. } else if (roleIds.indexOf("ade960e8f02544998b07397304c059c1") != -1) {
  318. // 政府管理员
  319. this.stype = 4
  320. uni.setStorageSync('stype', this.stype);
  321. } else {
  322. console.log('==================>这里走了么','================>存一个stape')
  323. loginService
  324. .getOtherIdByOffceid({
  325. officeid: officeId,
  326. })
  327. .then(({
  328. data
  329. }) => {
  330. console.log(data, "====================>getOtherIdByOffceid");
  331. this.stype = data.stype;
  332. uni.setStorageSync('stype', this.stype);
  333. });
  334. }
  335. },
  336. outloginset(){
  337. loginService.logout().then(({
  338. data
  339. }) => {
  340. this.$store.commit('logout');
  341. uni.clearStorage();
  342. })
  343. this.$store.commit('logout');
  344. uni.clearStorage();
  345. this.isLogin=this.$auth.checkisLogin();
  346. uni.hideLoading()
  347. },
  348. outlogin() {
  349. uni.showModal({
  350. title: '您确认退出么?',
  351. showCancel: true,
  352. success: (res) => {
  353. if (res.confirm) {
  354. uni.showLoading()
  355. this.outloginset();
  356. // uni.reLaunch({
  357. // url: '/pages/login/login'
  358. // })
  359. }
  360. }
  361. });
  362. },
  363. tces() {
  364. uni.navigateTo({
  365. url: '/pages/index/AudioToWord'
  366. })
  367. },
  368. // ListTouch触摸开始
  369. ListTouchStart(e) {
  370. this.listTouchStart = e.touches[0].pageX
  371. },
  372. // ListTouch计算方向
  373. ListTouchMove(e) {
  374. this.listTouchDirection = e.touches[0].pageX - this.listTouchStart > -60 ? 'right' : 'left'
  375. },
  376. // ListTouch计算滚动
  377. ListTouchEnd(e) {
  378. if (this.listTouchDirection == 'left') {
  379. this.modalName = e.currentTarget.dataset.target
  380. } else {
  381. this.modalName = null
  382. }
  383. this.listTouchDirection = null
  384. },
  385. switchTab(index) {
  386. this.activeTab = index;
  387. // if(index==0){
  388. // this.searchForm.des7="";
  389. // }else{
  390. // this.searchForm.des7=this.activeTab;
  391. // }
  392. if(index==0){
  393. this.picture="https://ydwqfw.com.cn/yd_qycpfbH5/cp1.png";
  394. }else if(index==1){
  395. this.picture="https://ydwqfw.com.cn/yd_qycpfbH5/cp2.png";
  396. }else if(index==2){
  397. this.picture="https://ydwqfw.com.cn/yd_qycpfbH5/cp3.png";
  398. }else{
  399. //this.picture="https://ydwqfw.com.cn/yd_qycpfbH5/cp3.png";
  400. this.picture="https://ydwqfw.com.cn/yd_qycpfbH5/cp5.jpg";
  401. }
  402. //this.doSearch();
  403. },
  404. switchTab2(index) {
  405. this.activeTab = index;
  406. if(index==0){
  407. this.searchForm.des8="";
  408. }else{
  409. this.searchForm.des8=this.activeTab;
  410. }
  411. //this.doSearch();
  412. },
  413. handleBack() {
  414. // 返回逻辑,比如跳转至上一页
  415. this.$router.go(-1);
  416. console.log('返回按钮被点击');
  417. }
  418. }
  419. }
  420. </script>
  421. <style>
  422. .page {
  423. height: 100vh;
  424. }
  425. .line-box {
  426. padding-left: 20rpx;
  427. padding-right: 20rpx;
  428. margin-top: 20rpx;
  429. }
  430. .mart-t {
  431. margin-top: 30rpx;
  432. }
  433. .center-box{
  434. margin-top: 20rpx;
  435. width: 100%;
  436. border-radius: 25rpx;
  437. border-radius: 25rpx;
  438. background: #fff;
  439. box-shadow: 0px 8px 16px 2px rgba(101, 101, 101, 0.2);
  440. padding-bottom: 30rpx;
  441. display: flex;
  442. flex-wrap: wrap;
  443. }
  444. .center-left-box {
  445. width: 100%;
  446. padding-bottom: 30rpx;
  447. display: flex;
  448. flex-wrap: wrap;
  449. }
  450. .btn-box-text {
  451. flex:1;
  452. height: 20rpx;
  453. text-align: center;
  454. color: #000000;
  455. font-size: 14px;
  456. font-weight: 700;
  457. }
  458. .btn-box-1 {
  459. flex:1;
  460. height: 30rpx;
  461. text-align: center;
  462. color: #36A7F3;
  463. font-size: x-large;
  464. font-weight: 700;
  465. }
  466. .btn-box-2 {
  467. flex:1;
  468. height: 30rpx;
  469. text-align: center;
  470. color:#F3365A;
  471. font-size: x-large;
  472. font-weight: 700;
  473. }
  474. .btn-box-3 {
  475. flex:1;
  476. height: 30rpx;
  477. text-align: center;
  478. color:#15D578;
  479. font-size: x-large;
  480. font-weight: 700;
  481. }
  482. .btn-box-4 {
  483. flex:1;
  484. height: 30rpx;
  485. text-align: center;
  486. color:#F1A31B;
  487. font-size: x-large;
  488. font-weight: 700;
  489. }
  490. .btn-Imbox {
  491. flex:1;
  492. height: 150rpx;
  493. padding-top: 8rpx;
  494. text-align: center;
  495. display: flex;
  496. flex-direction: column;
  497. justify-content: center; /* 子元素内部内容竖向居中 */
  498. align-items: center; /* 子元素内部内容水平居中 */
  499. text-align: center; /* 文字居中 */
  500. }
  501. .btn-Imbox p {
  502. font-size: 14px; /* 文字大小,可根据需要调整 */
  503. margin: 0; /* 去掉默认的外边距 */
  504. font-weight: 700;
  505. }
  506. .center-img{
  507. width: 90rpx;
  508. height: 90rpx;
  509. margin-bottom: 10rpx;
  510. text-align: center;
  511. }
  512. .center-img2{
  513. width: 70rpx;
  514. height: 70rpx;
  515. margin-top: 10rpx;
  516. margin-bottom: 20rpx;
  517. text-align: center;
  518. }
  519. .kuai-text{
  520. color: #000000;
  521. font-weight: 900;
  522. font-size: 34rpx;
  523. padding-top: 20rpx;
  524. padding-left: 20rpx;
  525. }
  526. .btn-box-5 {
  527. width: 337rpx;
  528. height: 200rpx;
  529. background-image: url('../../static/img/btn3.png');
  530. background-size: 100% 100%;
  531. }
  532. .btn-box-6 {
  533. width: 337rpx;
  534. height: 200rpx;
  535. background-image: url('../../static/img/btn6.png');
  536. background-size: 100% 100%;
  537. }
  538. .h-200 {
  539. height: 200rpx;
  540. }
  541. .swiper {
  542. width: 750rpx;
  543. height: 310rpx;
  544. }
  545. .swiper-item {
  546. width: 750rpx;
  547. height: 310rpx;
  548. background-color: aliceblue;
  549. }
  550. .font-size-35 {
  551. font-size: 35px !important;
  552. }
  553. .img-size {
  554. width: 80rpx;
  555. height: 80rpx;
  556. }
  557. .content-box {
  558. width: 437rpx;
  559. height: 200rpx;
  560. }
  561. .my-app .padding-sm {
  562. padding: 6px;
  563. }
  564. .grid .padding-sm .bg-white {
  565. box-shadow: 0 1px 4px #f9f9f9, 1px 1px 40px rgba(0, 0, 0, .06);
  566. }
  567. .bg-blue {
  568. background: #fff;
  569. color: #0081ff !important;
  570. }
  571. .text-white,
  572. .line-white,
  573. .lines-white {
  574. color: #0081ff !important;
  575. }
  576. .cu-bar .search-form {
  577. background-color: white;
  578. }
  579. .item-box{
  580. width: 710rpx;
  581. background: #FFFFFF;
  582. box-shadow: 0px 1px 3px 0px rgba(9,2,4,0.1);
  583. border-radius: 10px;
  584. padding-top: 20rpx;
  585. padding-left: 38rpx;
  586. padding-right: 10rpx;
  587. margin-top: 20rpx;
  588. }
  589. .item-title{
  590. position: relative;
  591. display: flex;
  592. justify-content: space-between;
  593. font-size: 30rpx;
  594. color: #010101;
  595. font-weight: bold;
  596. align-items: center;
  597. }
  598. .item-line{
  599. display: flex;
  600. height: 48rpx;
  601. margin-top: 20rpx;
  602. }
  603. .item-line2{
  604. height: 48rpx;
  605. margin-top: 20rpx;
  606. }
  607. .subtitle{
  608. color: #E5880E;
  609. }
  610. .item-name{
  611. margin-top: 5rpx;
  612. font-size: 29rpx;
  613. color: #666666;
  614. }
  615. .item-name2{
  616. font-size: 29rpx;
  617. color: #676D99;
  618. }
  619. .item-name3{
  620. display: flex;
  621. width: 100%;
  622. padding-right: 30rpx;
  623. flex: 1;
  624. justify-content: flex-end;
  625. font-size: 29rpx;
  626. color: #676D99;
  627. }
  628. .item-content{
  629. color: #1497EF;
  630. font-size: 30rpx;
  631. }
  632. .btn-box{
  633. display: flex;
  634. }
  635. .line-zs{
  636. width: 2rpx;
  637. height: 30rpx;
  638. background: #36A7F3;
  639. }
  640. .edit-botton{
  641. width: 100rpx;
  642. height: 48rpx;
  643. line-height: 48rpx;
  644. color: #fff;
  645. font-size: 28rpx;
  646. margin-right: 20rpx;
  647. border-radius: 10rpx;
  648. background: #5A9EE9;
  649. text-align: center;
  650. }
  651. .del-botton{
  652. width: 100rpx;
  653. height: 48rpx;
  654. line-height: 48rpx;
  655. color: #fff;
  656. font-size: 28rpx;
  657. margin-right: 20rpx;
  658. border-radius: 10rpx;
  659. background: #F27C85;
  660. text-align: center;
  661. }
  662. .color-white{
  663. color: #808080;
  664. font-size: 40rpx;
  665. line-height: 60rpx;
  666. }
  667. .search-box{
  668. padding-left: 20rpx;
  669. padding-right: 20rpx;
  670. padding-top: 20rpx;
  671. margin-top: 20rpx;
  672. width: 100%;
  673. border-radius: 25rpx;
  674. border-radius: 25rpx;
  675. background: #fff;
  676. box-shadow: 0px 8px 16px 2px rgba(101, 101, 101, 0.2);
  677. padding-bottom: 30rpx;
  678. display: flex;
  679. flex-wrap: wrap;
  680. }
  681. .search-box1{
  682. display: flex;
  683. }
  684. .input-box{
  685. background: #fff;
  686. height: 65rpx;
  687. width: 640rpx;
  688. display: flex;
  689. align-items: center;
  690. border-radius: 30rpx;
  691. padding-left: 30rpx;
  692. margin-right: 20rpx;
  693. }
  694. .input-boxinput{
  695. height: 75rpx;
  696. font-size: 15rpx;
  697. }
  698. .choose-box{
  699. background: #fff;
  700. width: 325rpx;
  701. border-radius: 23rpx;
  702. height: 70rpx;
  703. display: flex;
  704. align-items: center;
  705. justify-content: center;
  706. margin-right: 20rpx;
  707. border: 1rpx solid #808080;
  708. }
  709. .choose-box2{
  710. background: #fff;
  711. width: 100%;
  712. border-radius: 23rpx;
  713. height: 70rpx;
  714. display: flex;
  715. padding-left: 29rpx;
  716. align-items: center;
  717. border: 1rpx solid #808080;
  718. }
  719. .choose-box3{
  720. display: flex;
  721. }
  722. .choose-boxp{
  723. font-size: 32rpx;
  724. width: 80rpx;
  725. }
  726. .fixed-bottom-right {
  727. padding: 20rpx;
  728. position: fixed;
  729. bottom: 20px; /* 距离底部的距离 */
  730. right: 20px; /* 距离右侧的距离 */
  731. }
  732. .tabs {
  733. display: flex;
  734. justify-content: flex-start; /* 改为左对齐 */
  735. margin-bottom: 20px;
  736. overflow-x: auto; /* 启用横向滚动 */
  737. overflow-y: hidden; /* 禁止纵向滚动 */
  738. white-space: nowrap; /* 防止换行 */
  739. -webkit-overflow-scrolling: touch; /* 优化 iOS 滚动体验 */
  740. padding: 0 0px; /* 添加一些内边距,避免内容贴边 */
  741. }
  742. /* 可选:隐藏滚动条(在支持的浏览器中) */
  743. .tabs::-webkit-scrollbar {
  744. display: none; /* Chrome, Safari */
  745. }
  746. .tabs {
  747. -ms-overflow-style: none; /* IE, Edge */
  748. scrollbar-width: none; /* Firefox */
  749. }
  750. .tab-item {
  751. padding: 3px 8px;
  752. cursor: pointer;
  753. transition: all 0.3s;
  754. }
  755. .tab-item.active {
  756. color: #66b1ff;
  757. border-bottom: 2px solid #66b1ff;
  758. }
  759. .tab-content {
  760. padding: 20px;
  761. }
  762. .tab-item-content {
  763. display: none;
  764. }
  765. .tab-item-content.v-if {
  766. display: block;
  767. }
  768. /* 返回 */
  769. .item-img {
  770. width: 160rpx;
  771. height: 160rpx;
  772. }
  773. .custom-header {
  774. display: flex;
  775. align-items: center;
  776. justify-content: center;
  777. padding: 10px;
  778. width: 100%;
  779. }
  780. .is-back {
  781. position: relative;
  782. }
  783. .back-container {
  784. position: absolute;
  785. left: 10px;
  786. cursor: pointer;
  787. }
  788. .back-text {
  789. color: white; /* 返回按钮文本颜色 */
  790. }
  791. .back-text {
  792. color: white; /* 返回按钮文本颜色 */
  793. }
  794. .content-container {
  795. flex: 1;
  796. text-align: center;
  797. }
  798. .content-text {
  799. color: white; /* 标题文本颜色 */
  800. font-weight: bold;
  801. }
  802. /* 背景颜色 */
  803. .bg-blue {
  804. background-color: #4285f4; /* 假设这是一个蓝色背景 */
  805. }
  806. .img-item {
  807. width: 100%;
  808. }
  809. </style>