index.vue 18 KB

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