index.vue 20 KB

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