productDetail.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896
  1. <template>
  2. <Theme>
  3. <view class="wrap">
  4. <Navbar
  5. :bgColor="
  6. scrollTop >= tabInitTop || activeNum == 1
  7. ? 'var(--light)'
  8. : 'transparent'
  9. "
  10. fixed
  11. >
  12. <template #left>
  13. <view class="nav_left">
  14. <up-icon name="arrow-left" size="16" color="var(--light)"></up-icon>
  15. </view>
  16. </template>
  17. <template #right>
  18. <view class="nav_right">
  19. <!-- #ifdef H5 -->
  20. <view class="nav_item" @click.stop="copyPageUrl">
  21. <i class="icon-font icon-link"></i>
  22. </view>
  23. <!-- #endif -->
  24. <view class="nav_item" @click.stop="collectClick">
  25. <up-icon
  26. name="star-fill"
  27. size="16"
  28. :color="isCollect ? 'var(--primary)' : 'var(--light)'"
  29. ></up-icon>
  30. </view>
  31. <!-- #ifdef APP-PLUS -->
  32. <view class="nav_item" @click.stop="copyPageUrl">
  33. <image src="../../static/share.png" class="img"></image>
  34. </view>
  35. <!-- #endif -->
  36. </view>
  37. </template>
  38. </Navbar>
  39. <view class="content" id="conts" ref="contRef">
  40. <scroll-view
  41. scroll-with-animation
  42. :scroll-into-view="scrollId"
  43. :scroll-y="true"
  44. class="scroll-view"
  45. >
  46. <view id="scroll_item_0" class="scroll_item0">
  47. <view id="tabInit" v-if="activeNum == 0">
  48. <view class="swiper">
  49. <Swiper
  50. :listArr="swiperImgs"
  51. autoplay
  52. height="100%"
  53. circular
  54. indicator-dots
  55. indicator-active-color="var(--black)"
  56. indicator-color="var(--light)"
  57. urlName="url"
  58. borderRadius="0"
  59. />
  60. <!-- <view class="collect" @click.stop="collectClick">
  61. <i class="icon-font" :class="isCollect ? 'icon-collected' : 'icon-not-collected'"></i>
  62. </view>
  63. <view class="swiper_text" @click.stop="search">
  64. <i class="icon-font icon-search"></i>
  65. <trans _t="搜索类似产品" />
  66. </view> -->
  67. </view>
  68. </view>
  69. <view class="info_wrapper">
  70. <view class="price_wrapper">
  71. <rich-text
  72. class="texts"
  73. :nodes="MoneyAbouthtml(detail.price, true)"
  74. ></rich-text>
  75. <view class="sale_right" v-if="detail.saleCount">
  76. <trans _t="总销量" /> {{ detail.saleCount }}
  77. </view>
  78. </view>
  79. <view class="info_name">{{ detail.title }}</view>
  80. <!-- <view class="active_wrapper">
  81. <view class="active_item" v-for="item, index in activeList" :key="index" @click="activeClick(index)">
  82. <i class="icon-font" :class="item.icon"></i>
  83. <trans :_t="item.text" />
  84. </view>
  85. </view> -->
  86. </view>
  87. <view
  88. class="tab"
  89. id="tab"
  90. :style="{ top: top + 44 + 'px' }"
  91. :class="{ active_tab: scrollTop >= tabInitTop || activeNum == 1 }"
  92. >
  93. <Tab :active="activeNum" :tabList="tabList" @confirm="tabClick" />
  94. </view>
  95. <view class="service_wrapper" v-if="activeNum == 0">
  96. <view class="spec_title">
  97. <trans _t="购买记录" />
  98. </view>
  99. <view class="spec_info">
  100. <view class="spec_item">
  101. <trans _t="销售量" class="spec_label" />
  102. <text class="spec_value">--</text>
  103. </view>
  104. <view class="spec_item">
  105. <trans _t="平均送达时间" class="spec_label" />
  106. <text class="spec_value">--</text>
  107. </view>
  108. <view class="spec_item">
  109. <trans _t="重量(克)" class="spec_label" />
  110. <text class="spec_value">--</text>
  111. </view>
  112. <view class="spec_item">
  113. <trans _t="尺寸" class="spec_label" />
  114. <text class="spec_value">--</text>
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. <view id="scroll_item_1" class="scroll_item1" v-if="activeNum == 0">
  120. <!-- <view class="shpp_wrapper" @click="endShop">
  121. <view class="shop_info">
  122. <view class="info_left">
  123. <image
  124. :src="`../../static/shop/icon_${channels}.png`"
  125. class="info_icon"
  126. ></image>
  127. {{ detail.nick || "" }}
  128. </view>
  129. <view class="btn">
  130. <trans _t="进入商店" />
  131. </view>
  132. </view>
  133. </view> -->
  134. <view class="detail_wrapper" v-if="detail.desc">
  135. <view class="module_title">
  136. <trans _t="产品详情" />
  137. </view>
  138. <view class="desc_imgs">
  139. <rich-text class="desc_cont" :nodes="detail.desc"></rich-text>
  140. <!-- <image :src="item" mode="widthFix" class="_img" v-for="item, index in detail.desc_img" :key="index">
  141. </image> -->
  142. </view>
  143. </view>
  144. <view
  145. class="detail_wrapper"
  146. v-if="detail.propArr && detail.propArr.length"
  147. >
  148. <view class="module_title">
  149. <trans _t="规格参数" />
  150. </view>
  151. <Norm :item="detail.propArr" />
  152. </view>
  153. </view>
  154. <view id="scroll_item_2" class="scroll_item2" v-if="activeNum == 1">
  155. <view class="title">
  156. <trans _t="用户评论" />
  157. </view>
  158. <template v-if="detail.commentLists && detail.commentLists.length">
  159. <view
  160. v-for="(item, index) in detail.commentLists"
  161. :key="index"
  162. class="comment_item"
  163. >
  164. <view class="comment_text">{{ item.content }}</view>
  165. <ImageGrid
  166. :images="urlStrToArr(item.images)"
  167. isSeeLarge
  168. v-if="item.images && item.images.length"
  169. />
  170. </view>
  171. </template>
  172. <trans _t="无数据" class="tips" v-else />
  173. </view>
  174. <!-- <view id="scroll_item_2" class="scroll_item2">
  175. <view class="title">
  176. <trans _t="你可能会喜欢" />
  177. </view>
  178. </view> -->
  179. </scroll-view>
  180. <view class="footer_btns">
  181. <!-- <view class="icon_wrapper">
  182. <view class="icon_item">
  183. <i class="icon-font icon-discord"></i>
  184. </view>
  185. <trans _t="加入" />
  186. </view> -->
  187. <view class="btn_wrapper">
  188. <view class="btn btn_add" @click="add('add')">
  189. <trans _t="加入购物车" />
  190. </view>
  191. <view class="btn btn_buy" @click="add('buy')" v-if="isFrees == 0">
  192. <trans _t="立即购买" />
  193. </view>
  194. </view>
  195. </view>
  196. </view>
  197. </view>
  198. <selectSpec
  199. :sku="detail.sku"
  200. :channel="channels"
  201. :goods_id="goods_ids"
  202. :props_spec="detail.props_spec"
  203. :pic_url="detail.pic_url"
  204. :price="detail.price"
  205. :isFree="isFrees"
  206. ref="selectRef"
  207. />
  208. <floatButton bottom="120px" right="0" @onConfirm="goShop" />
  209. <ShareDialog ref="shareDialogRef"></ShareDialog>
  210. <RightCartDrawer ref="cartDrawerRef" />
  211. </Theme>
  212. </template>
  213. <script setup>
  214. import { ref, onMounted, nextTick, computed } from "vue";
  215. import Navbar from "@/components/navbar";
  216. import { SHOP_DETAIL, SHOP_SEARCH_SIMILAR, SHOP_USER_COLLECT } from "@/api";
  217. import { onLoad, onPageScroll } from "@dcloudio/uni-app";
  218. import { t } from "@/locale";
  219. import {
  220. useShopStore,
  221. useSystemStore,
  222. useTabbarStore,
  223. useCacheStore,
  224. } from "@/store";
  225. import Swiper from "@/components/swiper";
  226. import {
  227. systemInfo,
  228. openUrl,
  229. refresh,
  230. query,
  231. MoneyAbouthtml,
  232. Toast,
  233. TimeOut,
  234. urlStrToArr,
  235. } from "@/utils";
  236. import Norm from "./components/norm";
  237. import floatButton from "@/components/floatButton";
  238. import Tab from "@/components/tabs";
  239. import selectSpec from "./components/select_spec";
  240. import ShareDialog from "@/components/ShareDialog.vue";
  241. import RightCartDrawer from "./components/RightCartDrawer.vue";
  242. import ImageGrid from "@/components/ImageGrid.vue";
  243. const cartDrawerRef = ref(null);
  244. const useShop = useShopStore();
  245. const useSystem = useSystemStore();
  246. const useTabbar = useTabbarStore();
  247. const useCache = useCacheStore();
  248. const channels = ref(0);
  249. const goods_ids = ref(0);
  250. const searchText = ref("");
  251. const optionsList = ref(["拍照", "相册"]);
  252. const popoverRef = ref(null);
  253. const selectRef = ref(null);
  254. const shareDialogRef = ref(null);
  255. const detail = ref({});
  256. const searchValue = ref("");
  257. const activeNum = ref(0);
  258. const cartNum = computed(() => useShop.getCartNum);
  259. const isFrees = ref(0);
  260. const tabInitTop = ref(0);
  261. const initTab = ref(0);
  262. const scrollTop = ref(0);
  263. const tabList = ["详情", "评论"];
  264. const contRef = ref(null);
  265. const scrollId = ref("scroll_item_0");
  266. const height0 = ref(0);
  267. const height1 = ref(0);
  268. const height2 = ref(0);
  269. const similarArr = ref([]);
  270. const activeList = [
  271. {
  272. icon: "icon-link",
  273. text: "产品链接",
  274. },
  275. {
  276. icon: "icon-refresh",
  277. text: "刷新",
  278. },
  279. {
  280. icon: "icon-share",
  281. text: "分享",
  282. },
  283. ];
  284. const swiperImgs = computed(() => (detail.value.item_imgs || []).slice(0, 6));
  285. const isCollect = ref(false);
  286. const currency = computed(() => useSystem.getCurrency);
  287. const symbol = computed(() => useSystem.getSymbol);
  288. const top = systemInfo().statusBarHeight || 0;
  289. const tabClick = (item, index) => {
  290. activeNum.value = index;
  291. getHeight("scroll_item_" + index);
  292. let newTop =
  293. index == 0
  294. ? 0
  295. : index == 1
  296. ? height0.value - 44 - top - initTab.value
  297. : height0.value + height1.value - 44 - top - initTab.value;
  298. uni.pageScrollTo({
  299. scrollTop: newTop,
  300. duration: 300,
  301. });
  302. };
  303. // const leftClick = () => {
  304. // uni.navigateTo({ url: '/pages/setting/language_currency' })
  305. // }
  306. const activeClick = (index) => {
  307. if (index == 0) return openUrl(detail.value.detail_url);
  308. if (index == 1)
  309. return refresh(
  310. `/pages/shop/productDetail?channel=${channels}&goods_id=${goods_ids}`
  311. );
  312. };
  313. const add = (value) => {
  314. selectRef.value && selectRef.value.open(value);
  315. };
  316. const endShop = () => {
  317. uni.navigateTo({
  318. url: `/pages/shop/merchants?channel=${channels.value}&shop_id=${detail.value.shop_id}&seller_id=${detail.value.seller_id}&title=${detail.value.nick}`,
  319. });
  320. };
  321. const collectClick = () => {
  322. setCollect();
  323. };
  324. const copyPageUrl = () => {
  325. let url = "";
  326. // #ifdef H5
  327. url = window.location.href;
  328. // #endif
  329. // #ifdef APP-PLUS
  330. url = `https://vavabuy.net/#/pages/shop/productDetail?channel=${channels.value}&goods_id=${goods_ids.value}&search=${searchText.value}`;
  331. console.log("url", url);
  332. // #endif
  333. uni.setClipboardData({
  334. data: url,
  335. success: () => {
  336. Toast(t("链接已复制"));
  337. },
  338. });
  339. };
  340. // App 端分享
  341. const handleAppShare = () => {
  342. shareDialogRef.value && shareDialogRef.value.open();
  343. };
  344. const search = () => {};
  345. const goShop = () => {
  346. cartDrawerRef.value && cartDrawerRef.value.open();
  347. };
  348. const getHeight = async (id) => {
  349. let ids = "#" + id;
  350. try {
  351. const res = await query(ids);
  352. if (id == "scroll_item_0" && !height0.value) {
  353. height0.value = res.height;
  354. }
  355. if (id == "scroll_item_1" && !height1.value) {
  356. height1.value = res.height;
  357. }
  358. } catch (error) {}
  359. };
  360. const searchConfirm = (value) => {
  361. uni.navigateTo({ url: `/pages/index/products?searchText=${value}` });
  362. };
  363. const getDetail = async () => {
  364. const params = {
  365. channel: channels.value,
  366. goods_id: goods_ids.value,
  367. };
  368. const shopDetail = useCache.getShopDetail({
  369. ...params,
  370. search: searchText.value,
  371. });
  372. if (shopDetail) {
  373. detail.value = shopDetail;
  374. isCollect.value = shopDetail.isCollect ? true : false;
  375. return;
  376. }
  377. try {
  378. const res = await SHOP_DETAIL(params);
  379. detail.value = res.data;
  380. isCollect.value = res.data.isCollect ? true : false;
  381. useCache.setDetail({
  382. ...params,
  383. detail: res.data,
  384. search: searchText.value,
  385. });
  386. // nextTick(() => {
  387. // getSimilar(res.data.sample_id);
  388. // })
  389. } catch (error) {
  390. if (error.ret == 0) {
  391. Toast(t("商品已下架")).then(() => {
  392. TimeOut(() => {
  393. uni.navigateBack();
  394. // uni.navigateTo({ url: "/pages/index/products?channel=1" });
  395. });
  396. });
  397. }
  398. }
  399. };
  400. const setCollect = async () => {
  401. try {
  402. const res = await SHOP_USER_COLLECT({
  403. channel: channels.value,
  404. type: "good",
  405. goods_id: goods_ids.value,
  406. seller_id: detail.value.seller_id,
  407. title: detail.value.title,
  408. pic_url: detail.value.pic_url,
  409. price: detail.value.price,
  410. });
  411. nextTick(() => {
  412. isCollect.value = res.data.collect ? true : false;
  413. useCache.changeShopCollect({
  414. channel: channels.value,
  415. goods_id: goods_ids.value,
  416. isCollect: res.data.collect,
  417. });
  418. });
  419. } catch (error) {
  420. Toast(error.msg);
  421. }
  422. };
  423. const getSimilar = async (sample_id) => {
  424. try {
  425. const res = await SHOP_SEARCH_SIMILAR({
  426. sample_id,
  427. goods_id: goods_ids.value,
  428. });
  429. } catch (error) {}
  430. };
  431. onPageScroll((e) => {
  432. scrollTop.value = e.scrollTop;
  433. // if (!height0.value) {
  434. // getHeight("scroll_item_0");
  435. // }
  436. // if (!height1.value) {
  437. // getHeight("scroll_item_1");
  438. // }
  439. // const contTop = (e.scrollTop + 44 + top + initTab.value).toFixed(2) - 0;
  440. // const height0Top = height0.value.toFixed(2) - 0;
  441. // const height1Top = height1.value.toFixed(2) - 0;
  442. // if ((e.scrollTop == 0 || e.scrollTop > 0) && contTop < height0Top) {
  443. // activeNum.value = 0;
  444. // } else if (
  445. // (contTop == height0Top || contTop > height0Top) &&
  446. // contTop < height1Top
  447. // ) {
  448. // activeNum.value = 1;
  449. // } else {
  450. // activeNum.value = 2;
  451. // }
  452. });
  453. onLoad((options) => {
  454. const { channel = 0, goods_id = 0, search = "", isFree = 0 } = options;
  455. channels.value = channel;
  456. goods_ids.value = goods_id;
  457. searchText.value = search;
  458. isFrees.value = isFree;
  459. });
  460. onMounted(() => {
  461. nextTick(async () => {
  462. getDetail();
  463. const scrollItem0 = await query("#tabInit");
  464. tabInitTop.value = scrollItem0.height;
  465. const scrollTab = await query("#tab");
  466. initTab.value = scrollTab.height;
  467. });
  468. });
  469. </script>
  470. <style lang="less" scoped>
  471. @import url("@/style.less");
  472. .wrap {
  473. background-color: var(--bg);
  474. min-height: 100vh;
  475. // /deep/ .u-navbar__content {
  476. // .u-navbar__content__left,
  477. // .u-navbar__content__right {
  478. // position: unset;
  479. // padding: 0;
  480. // }
  481. // }
  482. .nav_left {
  483. background: rgba(0, 0, 0, 0.6);
  484. border-radius: 10rpx;
  485. width: 50rpx;
  486. height: 50rpx;
  487. .flex_center();
  488. }
  489. .nav_center {
  490. flex: 1;
  491. .icon-camera {
  492. color: #adb8cc;
  493. font-size: 56rpx;
  494. }
  495. }
  496. .nav_right {
  497. .flex_center();
  498. gap: 12rpx;
  499. .nav_item {
  500. width: 50rpx;
  501. height: 50rpx;
  502. .flex_center();
  503. background: rgba(0, 0, 0, 0.6);
  504. color: var(--light);
  505. border-radius: 10rpx;
  506. .icon-font {
  507. .size();
  508. }
  509. .img {
  510. width: 26rpx;
  511. height: 26rpx;
  512. display: block;
  513. }
  514. }
  515. }
  516. .tab {
  517. z-index: 11;
  518. background-color: var(--light);
  519. &.active_tab {
  520. position: fixed;
  521. top: 44px;
  522. left: 0;
  523. right: 0;
  524. }
  525. }
  526. .content {
  527. padding-bottom: 148rpx;
  528. margin-top: -44px;
  529. .scroll_item0 {
  530. /deep/ .swiper_list {
  531. object-fit: cover;
  532. aspect-ratio: 1 / 1;
  533. }
  534. .swiper {
  535. position: relative;
  536. .collect {
  537. position: absolute;
  538. right: 12px;
  539. top: 12px;
  540. width: 32px;
  541. height: 32px;
  542. background-color: #dfe3eb;
  543. border-radius: 4px;
  544. box-shadow: 0 0.8px 8px #0000001a;
  545. z-index: 10;
  546. opacity: 0.8;
  547. .flex_center();
  548. .icon-font {
  549. .size(20px);
  550. color: var(--primary);
  551. }
  552. }
  553. /deep/ .uni-swiper-dots-horizontal {
  554. bottom: 40px;
  555. }
  556. .swiper_text {
  557. position: absolute;
  558. right: 12px;
  559. bottom: 12px;
  560. z-index: 10;
  561. background-color: #dfe3eb;
  562. border-radius: 64rpx;
  563. box-shadow: 0 0.8px 8px #0000001a;
  564. z-index: 10;
  565. opacity: 0.8;
  566. padding: 0 16rpx;
  567. color: var(--primary);
  568. height: 64rpx;
  569. .flex_center();
  570. min-width: 240rpx;
  571. .size(24rpx);
  572. font-weight: 700;
  573. .icon-search {
  574. .size();
  575. }
  576. }
  577. }
  578. .info_wrapper {
  579. background-color: var(--light);
  580. padding: 24rpx;
  581. border-radius: 60rpx 60rpx 0 0;
  582. margin-top: -30px;
  583. position: relative;
  584. .price_wrapper {
  585. .hor(space-between);
  586. align-items: center;
  587. height: 60rpx;
  588. font-weight: bold;
  589. color: var(--red);
  590. .size(40rpx);
  591. margin-bottom: 24rpx;
  592. .texts {
  593. margin-left: 8rpx;
  594. .icon {
  595. margin-right: 6rpx;
  596. }
  597. .icon2 {
  598. margin: 0 8rpx;
  599. }
  600. /deep/ div {
  601. .ver(baseline);
  602. .decimal {
  603. .size(24rpx);
  604. }
  605. }
  606. }
  607. .sale_right {
  608. .size(22rpx);
  609. color: var(--text);
  610. }
  611. }
  612. .info_name {
  613. .size(28rpx);
  614. line-height: 48rpx;
  615. font-weight: 700;
  616. color: var(--text);
  617. }
  618. .active_wrapper {
  619. height: 40rpx;
  620. margin-top: 24rpx;
  621. .ver();
  622. column-gap: 16rpx;
  623. .active_item {
  624. color: var(--primary);
  625. .size(24rpx);
  626. .ver();
  627. .icon-font {
  628. margin-right: 8rpx;
  629. .size();
  630. }
  631. }
  632. }
  633. }
  634. .service_wrapper {
  635. padding: 24rpx;
  636. background-color: var(--inputBg);
  637. .spec_title {
  638. .size(28rpx);
  639. font-weight: 700;
  640. color: var(--text);
  641. line-height: 60rpx;
  642. }
  643. .spec_info {
  644. border-radius: 16rpx;
  645. display: grid;
  646. gap: 10rpx;
  647. grid-template-columns: repeat(2, 1fr);
  648. margin-top: 16rpx;
  649. padding: 16rpx 0;
  650. color: var(--text-02);
  651. .size(24rpx);
  652. .spec_item {
  653. .ver();
  654. .spec_value {
  655. align-items: center;
  656. color: var(--text);
  657. display: inline-flex;
  658. font-weight: 500;
  659. margin-left: 12px;
  660. }
  661. }
  662. }
  663. }
  664. }
  665. .scroll_item1 {
  666. .shpp_wrapper,
  667. .detail_wrapper {
  668. background-color: var(--light);
  669. padding: 24rpx;
  670. margin-top: 24rpx;
  671. }
  672. .shpp_wrapper {
  673. .shop_info {
  674. .flex_position(space-between);
  675. .info_left {
  676. max-width: 520rpx;
  677. .ver();
  678. .size(28rpx);
  679. color: var(--text);
  680. font-weight: 700;
  681. line-height: 40rpx;
  682. .info_icon {
  683. width: 48rpx;
  684. height: 48rpx;
  685. display: block;
  686. margin-right: 8rpx;
  687. }
  688. }
  689. .btn {
  690. border-radius: 48rpx;
  691. padding: 12rpx 30rpx;
  692. color: var(--black);
  693. border: 1px solid var(--black);
  694. .size(24rpx);
  695. }
  696. }
  697. }
  698. .detail_wrapper {
  699. .module_title {
  700. .size(28rpx);
  701. font-weight: 700;
  702. line-height: 60rpx;
  703. color: var(--text);
  704. }
  705. .desc_imgs {
  706. .desc_cont {
  707. /deep/ div {
  708. div {
  709. width: 100% !important;
  710. div {
  711. width: 100% !important;
  712. }
  713. }
  714. img {
  715. max-width: 100% !important;
  716. width: 100%;
  717. height: auto;
  718. display: block;
  719. }
  720. }
  721. }
  722. /deep/ img {
  723. max-width: 100%;
  724. }
  725. }
  726. }
  727. }
  728. .scroll_item2 {
  729. padding: 24rpx 16rpx;
  730. .title {
  731. font-weight: 700;
  732. line-height: 60rpx;
  733. .size(28rpx);
  734. }
  735. .comment_item {
  736. width: 100%;
  737. margin-top: 16rpx;
  738. padding: 12rpx;
  739. border: 1px solid var(--border);
  740. border-radius: 10rpx;
  741. .comment_text {
  742. margin-top: 6rpx;
  743. color: var(--text);
  744. }
  745. }
  746. .tips {
  747. text-align: center;
  748. font-size: 28rpx;
  749. color: #333;
  750. }
  751. }
  752. .footer_btns {
  753. position: fixed;
  754. bottom: 0;
  755. left: 0;
  756. right: 0;
  757. z-index: 10;
  758. // height: 124rpx;
  759. // .flex_position(space-between);
  760. padding: 12rpx 24rpx;
  761. // column-gap: 64rpx;
  762. background-color: var(--light);
  763. .flex_center();
  764. padding-bottom: calc(12rpx + env(safe-area-inset-bottom));
  765. padding-bottom: calc(12rpx + constant(safe-area-inset-bottom));
  766. box-sizing: border-box;
  767. .icon_wrapper {
  768. .flex_center();
  769. flex-direction: column;
  770. color: var(--text);
  771. .size(24rpx);
  772. line-height: 40rpx;
  773. .icon_item {
  774. background: #425bf8;
  775. border-radius: 16rpx;
  776. width: 48rpx;
  777. height: 48rpx;
  778. .flex_center();
  779. .icon-discord {
  780. color: var(--light);
  781. .size(40rpx);
  782. }
  783. }
  784. }
  785. .btn_wrapper {
  786. flex: 1;
  787. .ver();
  788. column-gap: 64rpx;
  789. .btn {
  790. flex: 1;
  791. .size(28rpx);
  792. height: 96rpx;
  793. line-height: 28rpx;
  794. padding: 8rpx 16rpx;
  795. .flex_center();
  796. border: 2px solid var(--black);
  797. color: var(--black);
  798. border-radius: 20rpx;
  799. font-weight: bold;
  800. }
  801. .btn_buy {
  802. background-color: var(--light);
  803. }
  804. .btn_add {
  805. background-color: var(--black);
  806. color: var(--light);
  807. }
  808. }
  809. }
  810. }
  811. }
  812. </style>