index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768
  1. <template>
  2. <view
  3. class="container"
  4. :style="{ background: containerBg }"
  5. :class="bookList.length ? 'book-list' : 'no-list'"
  6. >
  7. <u-navbar
  8. :is-back="false"
  9. :border-bottom="false"
  10. :background="{ background: navbarBackground }"
  11. >
  12. <text class="nav-title">卖书给书嗨</text>
  13. </u-navbar>
  14. <not-scanned v-if="!bookList.length"></not-scanned>
  15. <scan-book-list
  16. v-else
  17. @updateBooks="updateBooksList"
  18. @deleted="handleDeleteBook"
  19. :bookList="bookList"
  20. ref="scanBookList"
  21. @upsell="handleUpsell"
  22. @refresh="getLastOrder"
  23. ></scan-book-list>
  24. <!-- 底部固定按钮 -->
  25. <view class="bottom-fixed">
  26. <view class="btn-wrap mb-20">
  27. <button class="scan-btn flex-1" @click="handleScan">
  28. <u-icon name="scan" color="#FFFFFF" size="40"></u-icon>
  29. <text>扫码卖书</text>
  30. </button>
  31. <button class="isbn-btn flex-1" @click="goToInputISBN">
  32. <u-icon name="edit-pen" color="#4CD964" size="40"></u-icon>
  33. <text>输入ISBN</text>
  34. </button>
  35. </view>
  36. <view
  37. class="flex-a flex-j-b pad-20"
  38. style="padding-top: 0"
  39. v-if="bookList.length"
  40. >
  41. <view class="left-info" style="min-width: 194px">
  42. <view class="flex-a common-text">
  43. 共<text class="color-red">{{ orderInfo.totalNum }}</text
  44. >件 预估回收价
  45. <text class="color-red"
  46. >¥{{ orderInfo.totalRecycleMoney || 0 }}</text
  47. >
  48. </view>
  49. <text class="common-text tip"
  50. >*旧书预估价格满 {{ orderInfo.minOrderMoney }} 元起收</text
  51. >
  52. </view>
  53. <button
  54. class="scan-btn next-btn"
  55. @click="handleValidate"
  56. :disabled="isDisabled"
  57. >
  58. 下一步
  59. </button>
  60. </view>
  61. <service-info
  62. v-if="bookList.length"
  63. :serviceList="serviceList"
  64. :firstOrder="orderInfo.firstOrder"
  65. ></service-info>
  66. </view>
  67. <InputIsbn ref="isbnPopup" @submit="checkBookISBN" />
  68. <!-- 套装书说明弹窗 -->
  69. <CommonDialog
  70. ref="setBookDialog"
  71. title="套装书说明"
  72. :showCancel="false"
  73. @confirm="handleSetBookConfirm"
  74. >
  75. <text
  76. >套装书(ISBN码相同的系列书箱)只需扫描其中一册,扫码价即套装价。打包时请把所有单册统在一起或放在一个袋子里寄出。</text
  77. >
  78. </CommonDialog>
  79. <!-- 暂不回收弹窗 -->
  80. <CommonDialog ref="notAcceptDialog" title="暂不回收" :showCancel="false">
  81. <text>这本书暂时不回收,请您过段时间再来试试~</text>
  82. </CommonDialog>
  83. <!-- 暂无信息弹窗 -->
  84. <CommonDialog ref="noInfoDialog" title="暂无信息" :showCancel="false">
  85. <text
  86. >抱歉,没有该书的信息,书嗨会定期补充图书信息,请您过段时间再来试试~</text
  87. >
  88. </CommonDialog>
  89. <!-- 扫累了弹窗 -->
  90. <CommonDialog ref="tiredDialog" title="温馨提示" :showCancel="false">
  91. <text>扫累了,休息休息吧~</text>
  92. </CommonDialog>
  93. <!-- 该书超出最大回收本数 maxAcceptDialog-->
  94. <CommonDialog ref="maxAcceptDialog" title="温馨提示" :showCancel="false">
  95. <text>该书超出最大回收本数</text>
  96. </CommonDialog>
  97. <!-- 单个订单最多40本书 orderMaxNumDialog-->
  98. <CommonDialog ref="orderMaxNumDialog" title="温馨提示" :showCancel="false">
  99. <text>单个订单最多40本书</text>
  100. </CommonDialog>
  101. <!-- 删除活动书籍弹窗 -->
  102. <common-dialog ref="deleteDialog" title="温馨提示" @confirm="confirmDelete">
  103. <text>{{
  104. deleteBook.upsellMoney
  105. ? "此书为限时加价收图书,删除后再次添加将失去加价收资格,确定删除吗?"
  106. : "确定删除这本图书吗?"
  107. }}</text>
  108. </common-dialog>
  109. <!-- 此订单还有未加价的图书,提交订单后将失去加价资格,确定提交吗? -->
  110. <common-dialog ref="noUpsellDialog" title="温馨提示" @confirm="onNext">
  111. <text>此订单还有未加价的图书,提交订单后将失去加价资格,确定提交吗?</text>
  112. </common-dialog>
  113. <!-- 温馨提示弹窗 -->
  114. <KindReminder
  115. ref="kindReminder"
  116. @start="handleStartSelling"
  117. @viewRules="handleViewRules"
  118. />
  119. <view
  120. class="customer-service"
  121. :style="{
  122. left: servicePosition.left + 'px',
  123. right: servicePosition.right + 'px',
  124. bottom: servicePosition.bottom + 'px',
  125. }"
  126. @touchstart="touchStart"
  127. @touchmove="touchMove"
  128. @touchend="touchEnd"
  129. >
  130. <button class="service-btn" open-type="contact">
  131. <image
  132. src="/static/img/kf.png"
  133. mode="widthFix"
  134. style="width: 126rpx; height: 140rpx"
  135. ></image>
  136. </button>
  137. </view>
  138. <ConfirmBooks ref="confirmBooks" @incomplete="handleIncomplete" />
  139. <!-- 首单免费弹窗 -->
  140. <FirstOrderFreePopup ref="firstOrderFreePopup" />
  141. <!-- 图书加价弹窗 -->
  142. <UpsellBook ref="upsellRef" @scan="handleScanCode" />
  143. <!-- 加价分享弹窗 -->
  144. <UpsellShare ref="shareRef" @viewRules="handleViewSellRules" />
  145. <!-- 加价二维码弹窗 -->
  146. <UpsellQrcode ref="upsellQrcodeRef" />
  147. <!-- 加价规则弹窗 -->
  148. <UpsellRules ref="upsellRulesRef" />
  149. </view>
  150. </template>
  151. <script>
  152. import notScanned from "./components/notScanned.vue";
  153. import InputIsbn from "./components/InputIsbn.vue";
  154. import ScanBookList from "./components/ScanBookList.vue";
  155. import CommonDialog from "@/components/common-dialog.vue";
  156. import KindReminder from "./components/KindReminder.vue";
  157. import ServiceInfo from "./components/ServiceInfo.vue";
  158. import ConfirmBooks from "./components/ConfirmBooks.vue";
  159. import FirstOrderFreePopup from "./components/FirstOrderFreePopup.vue";
  160. import UpsellBook from "./components/upsell-book.vue";
  161. import UpsellRules from "./components/upsell-rules.vue";
  162. import UpsellShare from "./components/upsell-share.vue";
  163. import UpsellQrcode from "./components/upsell-qrcode.vue";
  164. const app = getApp();
  165. export default {
  166. components: {
  167. notScanned,
  168. InputIsbn,
  169. ScanBookList,
  170. CommonDialog,
  171. KindReminder,
  172. ServiceInfo,
  173. ConfirmBooks,
  174. FirstOrderFreePopup,
  175. UpsellBook,
  176. UpsellRules,
  177. UpsellShare,
  178. UpsellQrcode,
  179. },
  180. data() {
  181. return {
  182. orderInfo: {},
  183. collapseState: {
  184. step1: false,
  185. step3: false,
  186. },
  187. scrollTop: 0,
  188. bookList: [],
  189. serviceList: [],
  190. currentBook: {},
  191. // 客服按钮位置
  192. servicePosition: {
  193. left: "auto",
  194. right: 0,
  195. bottom: "20%",
  196. },
  197. // 触摸开始位置
  198. startX: 0,
  199. startY: 0,
  200. // 屏幕宽度和高度
  201. screenWidth: 0,
  202. screenHeight: 0,
  203. // 初始位置记录,用于计算拖动
  204. initialLeft: 0,
  205. initialBottom: 0,
  206. // 是否正在更新位置,用于防止频繁更新
  207. isUpdatingPosition: false,
  208. shareData: {},
  209. deleteBook: {},
  210. };
  211. },
  212. computed: {
  213. navbarBackground() {
  214. if (this.scrollTop > 0) {
  215. return "linear-gradient(180deg, #4CD964 0%, #5ff178 100%)";
  216. }
  217. return "transparent";
  218. },
  219. containerBg() {
  220. return this.bookList.length > 0
  221. ? "linear-gradient(180deg, #4CD964 0%, #F8F8F8 25%)"
  222. : "linear-gradient(180deg, #4CD964 0%, #ffffff 25%)";
  223. },
  224. containerPb() {
  225. return this.bookList.length > 0 ? "300rpx" : "110rpx";
  226. },
  227. totalBooks() {
  228. return this.bookList.reduce((sum, book) => sum + (book.num || 1), 0);
  229. },
  230. totalPrice() {
  231. return this.bookList
  232. .reduce(
  233. (sum, book) =>
  234. sum + book.recyclePrice * (book.num || 1) + book.currUpsellMoney ||
  235. 0,
  236. 0
  237. )
  238. .toFixed(2);
  239. },
  240. isDisabled() {
  241. return this.totalPrice < this.orderInfo.minOrderMoney;
  242. },
  243. },
  244. onPageScroll(e) {
  245. this.$nextTick(() => {
  246. this.scrollTop = e.scrollTop;
  247. });
  248. },
  249. // 分享配置
  250. onShareAppMessage() {
  251. let upsellCode = uni.getStorageSync("upsellCodeShare");
  252. console.log(upsellCode, "分享");
  253. // 调用分享接口
  254. uni.$u.http.get("/token/order/goToShare?upsellCode=" + upsellCode);
  255. return {
  256. title: "书嗨",
  257. path: "/pages/home/index?upsellCode=" + upsellCode,
  258. imageUrl: "https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/share.jpg",
  259. };
  260. },
  261. // 分享到朋友圈
  262. onShareTimeline() {
  263. let upsellCode = uni.getStorageSync("upsellCodeShare");
  264. // 调用分享接口
  265. uni.$u.http.get("/token/order/goToShare?upsellCode=" + upsellCode);
  266. return {
  267. title: "书嗨",
  268. path: "/pages/home/index?upsellCode=" + upsellCode,
  269. imageUrl: "https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/share.jpg",
  270. };
  271. },
  272. onReady() {
  273. // 获取屏幕宽度和高度
  274. uni.getSystemInfo({
  275. success: (res) => {
  276. this.screenWidth = res.windowWidth;
  277. this.screenHeight = res.windowHeight;
  278. },
  279. });
  280. if (app.globalData.upsellCode) {
  281. this.$refs.shareRef?.open(app.globalData.upsellCode);
  282. }
  283. },
  284. onLoad(options) {
  285. console.log(options, "获取参数");
  286. if (options.upsellCode) {
  287. this.$refs.shareRef?.open(options.upsellCode);
  288. }
  289. },
  290. methods: {
  291. //删除书籍
  292. handleDeleteBook(book) {
  293. this.deleteBook = book;
  294. this.$refs.deleteDialog.openPopup(book);
  295. },
  296. confirmDelete() {
  297. uni.$u.http
  298. .post("/token/order/removeBook", {
  299. orderId: this.deleteBook.orderId,
  300. isbn: this.deleteBook.isbn,
  301. })
  302. .then((res) => {
  303. if (res.code == 200) {
  304. this.$u.toast("删除成功");
  305. this.getLastOrder();
  306. }
  307. });
  308. },
  309. //扫码助力
  310. handleScanCode(data = {}) {
  311. this.$refs.upsellQrcodeRef.open(data);
  312. },
  313. slientLogin() {
  314. let inviteCode = uni.getStorageSync("inviteCode") || "";
  315. let token = uni.getStorageSync("token");
  316. if (token) return;
  317. uni.login({
  318. success(res) {
  319. uni.$u.http
  320. .post("/user/wxLogin", {
  321. code: res.code,
  322. inviteCode,
  323. })
  324. .then((response) => {
  325. if (response.code == 200) {
  326. uni.setStorageSync("token", response.data.token);
  327. }
  328. });
  329. },
  330. fail: (err) => {
  331. console.log(err, "wx.login登录失败");
  332. },
  333. });
  334. },
  335. //查看活动规则
  336. handleViewSellRules() {
  337. this.$refs.upsellRulesRef.open();
  338. },
  339. // 触摸开始
  340. touchStart(e) {
  341. const touch = e.touches[0];
  342. this.startX = touch.clientX;
  343. this.startY = touch.clientY;
  344. // 记录初始位置,用于计算移动距离
  345. if (this.servicePosition.right !== "auto") {
  346. // 如果是靠右定位,记录当前位置但不立即改变显示位置
  347. // 只在内部计算中使用,避免视觉上的位置跳动
  348. this.initialLeft = this.screenWidth - 126;
  349. } else {
  350. this.initialLeft = parseFloat(this.servicePosition.left);
  351. }
  352. // 如果bottom是百分比,转换为具体像素值,但不改变显示位置
  353. if (
  354. typeof this.servicePosition.bottom === "string" &&
  355. this.servicePosition.bottom.includes("%")
  356. ) {
  357. const percentage = parseFloat(this.servicePosition.bottom) / 100;
  358. this.initialBottom = this.screenHeight * percentage;
  359. } else {
  360. this.initialBottom = parseFloat(this.servicePosition.bottom);
  361. }
  362. },
  363. // 触摸移动
  364. touchMove(e) {
  365. // 阻止默认行为,防止页面滚动
  366. e.preventDefault && e.preventDefault();
  367. e.stopPropagation && e.stopPropagation();
  368. const touch = e.touches[0];
  369. // 计算移动距离
  370. const deltaX = touch.clientX - this.startX;
  371. const deltaY = touch.clientY - this.startY;
  372. // 使用初始位置计算新位置,避免累积误差
  373. let newLeft = this.initialLeft + deltaX;
  374. let newBottom = this.initialBottom - deltaY; // 注意:y轴方向是相反的
  375. // 确保按钮不超出屏幕边界
  376. if (newLeft < 0) {
  377. newLeft = 0;
  378. } else if (newLeft > this.screenWidth - 126) {
  379. newLeft = this.screenWidth - 126;
  380. }
  381. // 确保按钮不超出屏幕垂直边界
  382. if (newBottom < 20) {
  383. newBottom = 20;
  384. } else if (newBottom > this.screenHeight - 160) {
  385. newBottom = this.screenHeight - 160;
  386. }
  387. // 使用节流方式更新位置,避免过于频繁的更新
  388. if (!this.isUpdatingPosition) {
  389. this.isUpdatingPosition = true;
  390. // 更新位置 - 第一次移动时才真正改变right为auto
  391. this.servicePosition = {
  392. left: newLeft,
  393. right: "auto",
  394. bottom: newBottom,
  395. };
  396. // 使用setTimeout代替requestAnimationFrame,在微信小程序中更兼容
  397. setTimeout(() => {
  398. this.isUpdatingPosition = false;
  399. }, 16); // 约等于60fps的刷新率
  400. }
  401. // 不更新起始点,保持相对于初始触摸点的位移计算
  402. // 这样可以避免累积误差,使拖动更精确
  403. },
  404. // 触摸结束,实现吸附效果
  405. touchEnd() {
  406. // 确保不再有待处理的更新
  407. this.isUpdatingPosition = false;
  408. const buttonCenter = this.servicePosition.left + 63; // 按钮中心位置
  409. const halfScreen = this.screenWidth / 2;
  410. // 判断是吸附到左边还是右边
  411. if (buttonCenter < halfScreen) {
  412. // 吸附到左边
  413. this.servicePosition = {
  414. left: 0,
  415. right: "auto",
  416. bottom: this.servicePosition.bottom,
  417. };
  418. } else {
  419. // 吸附到右边
  420. this.servicePosition = {
  421. left: "auto",
  422. right: 0,
  423. bottom: this.servicePosition.bottom,
  424. };
  425. }
  426. },
  427. handleStart() {
  428. this.showPopup = true;
  429. },
  430. //套装书确认
  431. handleSetBookConfirm() {
  432. this.$refs.confirmBooks.openPopup(this.currentBook);
  433. },
  434. //书册补全
  435. handleIncomplete() {
  436. this.$refs.scanBookList.handleDeleteBook(this.currentBook);
  437. },
  438. handleValidate() {
  439. if (this.bookList.some((v) => v.canInvite == 1)) {
  440. this.$refs.noUpsellDialog.openPopup();
  441. } else {
  442. this.onNext();
  443. }
  444. },
  445. //提交
  446. onNext() {
  447. let orderId = this.orderInfo.orderId;
  448. //预提交
  449. uni.$u.http
  450. .get("/token/order/preSubmit?orderId=" + orderId)
  451. .then((res) => {
  452. if (res.code == 200) {
  453. if (res.data.code == 1 || res.data.code == 2) {
  454. uni.navigateTo({
  455. url: "/pages-home/pages/book-order",
  456. });
  457. uni.setStorageSync("orderId", orderId);
  458. } else {
  459. uni.showToast({
  460. icon: "none",
  461. title: res.msg,
  462. });
  463. }
  464. } else {
  465. uni.showToast({
  466. icon: "none",
  467. title: res.msg,
  468. });
  469. }
  470. });
  471. },
  472. // 加价
  473. handleUpsell(book) {
  474. this.$refs.upsellRef.open(book);
  475. },
  476. updateBooksList(data, book) {
  477. this.bookList = data;
  478. // book.upsellMoney && this.getLastOrder();
  479. this.getLastOrder();
  480. },
  481. toggleCollapse(step) {
  482. this.$set(this.collapseState, step, !this.collapseState[step]);
  483. },
  484. handleScan() {
  485. uni.scanCode({
  486. scanType: ["barCode"],
  487. success: (res) => {
  488. this.checkBookISBN(res.result);
  489. },
  490. fail: () => {
  491. uni.showToast({
  492. title: "扫码失败",
  493. icon: "none",
  494. });
  495. },
  496. });
  497. },
  498. checkBookISBN(isbn) {
  499. uni.$u.http.get("/token/order/scanIsbn?isbn=" + isbn).then((res) => {
  500. if (res.code == 200) {
  501. let code = res.data.code;
  502. if (code == 1) {
  503. res.data.num = 1;
  504. res.data.status = 1;
  505. res.data.recyclePrice = res.data.recycleMoney;
  506. this.currentBook = res.data;
  507. this.bookList.unshift(res.data);
  508. if (res.data.suit == 1) {
  509. this.$refs.setBookDialog.openPopup();
  510. }
  511. if (res.data.canInvite == 1) {
  512. this.$refs.upsellRef.open(res.data);
  513. }
  514. } else if (code == 2) {
  515. let item = this.bookList.find((v) => v.isbn === isbn);
  516. item.num = item.num + 1;
  517. if (res.data.canInvite == 1) {
  518. this.$refs.upsellRef.open(res.data);
  519. }
  520. } else {
  521. this.handleBookCode(res.data.code);
  522. }
  523. } else {
  524. uni.showToast({
  525. title: res.msg,
  526. icon: "none",
  527. });
  528. }
  529. });
  530. },
  531. //处理扫码之后不同的状态 0-扫码频繁 1-成功 2-本单已有该书,数量+1 3-没有该书 4-本书暂不回收 5-超过每单最大可卖数量 6-单个订单最多40本书
  532. handleBookCode(code) {
  533. if (code == 1) {
  534. this.bookList.push();
  535. }
  536. let tempKeys = [
  537. "tiredDialog",
  538. "",
  539. "",
  540. "noInfoDialog",
  541. "notAcceptDialog",
  542. "maxAcceptDialog",
  543. "orderMaxNumDialog",
  544. ];
  545. let key = tempKeys[code];
  546. if (key) {
  547. this.$refs[key].openPopup();
  548. }
  549. },
  550. //获取当前用户未提交订单 /api/token/order/lastOrder
  551. getLastOrder() {
  552. uni.$u.http.get("/token/order/lastOrder").then((res) => {
  553. if (res.code == 200) {
  554. this.orderInfo = res.data;
  555. if (res.data.showDialog == 1) {
  556. this.$refs.firstOrderFreePopup.openPopup();
  557. } else if (res.data.showDialog == 2) {
  558. this.$refs.kindReminder.openPopup();
  559. }
  560. this.bookList = res.data?.orderDetailList
  561. ? res.data.orderDetailList.map((v) => {
  562. v.orderId = res.data.orderId;
  563. return v;
  564. })
  565. : [];
  566. this.serviceList = res.data.serviceList || [];
  567. }
  568. });
  569. },
  570. goToScannedBooks() {
  571. uni.navigateTo({
  572. url: "/pages-home/pages/scaned-book",
  573. });
  574. },
  575. goToInputISBN() {
  576. this.$refs.isbnPopup.openPopup();
  577. },
  578. handleStartSelling() {
  579. // 标记已显示过温馨提示
  580. uni.setStorageSync("kindReminderShown", true);
  581. },
  582. },
  583. onShow() {
  584. // 获取上一个订单
  585. setTimeout(() => {
  586. this.getLastOrder();
  587. setTimeout(() => {
  588. this.slientLogin();
  589. }, 10);
  590. }, 300);
  591. },
  592. };
  593. </script>
  594. <style lang="scss" scoped>
  595. .customer-service {
  596. position: fixed;
  597. width: 126rpx;
  598. height: 140rpx;
  599. bottom: 20%;
  600. z-index: 999;
  601. transition: all 0.3s ease;
  602. /* 添加过渡效果使吸附更平滑 */
  603. button {
  604. height: max-content;
  605. background-color: transparent;
  606. padding: 0;
  607. }
  608. }
  609. .container {
  610. height: 100%;
  611. position: relative;
  612. overflow: auto;
  613. z-index: 1;
  614. /* #ifdef MP-WEIXIN */
  615. min-height: 100vh;
  616. /* #endif */
  617. /* #ifndef MP-WEIXIN */
  618. min-height: calc(100vh - 120rpx);
  619. /* #endif */
  620. &.book-list {
  621. padding-bottom: 300rpx;
  622. }
  623. padding-bottom: 130rpx;
  624. .nav-title {
  625. font-family: PingFang SC;
  626. font-weight: bold;
  627. font-size: 34rpx;
  628. color: #ffffff;
  629. padding-left: 40rpx;
  630. }
  631. }
  632. .common-text {
  633. font-family: PingFang SC;
  634. font-weight: 500;
  635. font-size: 28rpx;
  636. color: #999999;
  637. &.tip {
  638. color: #ff8a4b;
  639. }
  640. }
  641. .color-red {
  642. color: #ff0000;
  643. margin: 0 10rpx;
  644. }
  645. .color-green {
  646. color: #276f1e;
  647. }
  648. .bottom-fixed {
  649. position: fixed;
  650. left: 0;
  651. right: 0;
  652. bottom: 0;
  653. z-index: 9;
  654. background-color: #ffffff;
  655. /* #ifdef H5 */
  656. padding-bottom: 120rpx;
  657. /* #endif */
  658. .btn-wrap {
  659. display: flex;
  660. gap: 20rpx;
  661. padding: 20rpx;
  662. padding-bottom: 0;
  663. button {
  664. flex: 1;
  665. height: 88rpx;
  666. border-radius: 10rpx;
  667. display: flex;
  668. align-items: center;
  669. justify-content: center;
  670. gap: 10rpx;
  671. border: none;
  672. text {
  673. font-size: 32rpx;
  674. }
  675. &::after {
  676. border: none;
  677. }
  678. }
  679. .isbn-btn {
  680. background-color: #ffffff;
  681. color: #4cd964;
  682. border: 3rpx solid #4cd964;
  683. }
  684. }
  685. .scan-btn {
  686. background-color: #4cd964;
  687. color: #ffffff;
  688. }
  689. .next-btn {
  690. margin: 0;
  691. margin-left: 20rpx;
  692. &[aria-disabled="true"] {
  693. background-color: #cccccc;
  694. color: #ffffff;
  695. opacity: 0.7;
  696. cursor: not-allowed;
  697. }
  698. }
  699. }
  700. </style>