pageTwo.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  1. <template>
  2. <view class="page-container">
  3. <view class="card_wrap">
  4. <view class="address-section">
  5. <view class="address-header">
  6. <u-icon name="map" size="36rpx" color="#108cff" class="location-icon"></u-icon>
  7. <text class="address-title">上门地址</text>
  8. </view>
  9. <view class="address-content">
  10. <text class="address-text">北京市朝阳区建国路88号SOHO现代城A座2301室</text>
  11. </view>
  12. </view>
  13. </view>
  14. <view class="card_wrap checklist-card">
  15. <view class="checklist-section">
  16. <u-checkbox-group v-model="selectedCheckbox" placement="column">
  17. <view class="checklist-item">
  18. <view class="checkbox-text-container">
  19. <u-checkbox name="contact师傅" size="40rpx" color="#108cff" />
  20. <text class="checklist-text">联系师傅</text>
  21. </view>
  22. <u-input v-if="selectedCheckbox.includes('contact师傅')" v-model="formData.contactPhone"
  23. placeholder="请输入师傅手机号" size="default" class="checklist-input" />
  24. </view>
  25. <view class="checklist-item">
  26. <view class="checkbox-text-container">
  27. <u-checkbox name="photo技巧" size="40rpx" color="#108cff" />
  28. <text class="checklist-text">师傅拍图技巧</text>
  29. </view>
  30. <u-input v-if="selectedCheckbox.includes('photo技巧')" v-model="formData.photoTips"
  31. type="textarea" placeholder="请输入拍图技巧" rows="3" class="checklist-textarea" />
  32. <!-- 上传图片按钮 -->
  33. <view v-if="selectedCheckbox.includes('photo技巧')" class="upload-btn-container">
  34. <div class="upload-btn" @click="chooseImage('photoTips')">
  35. <u-icon name="camera" size="32rpx" color="#108cff"></u-icon>
  36. <text class="upload-btn-text">上传图片</text>
  37. </div>
  38. </view>
  39. <!-- 图片显示区域 -->
  40. <view v-if="selectedCheckbox.includes('photo技巧') && photoTipsImages.length > 0"
  41. class="image-list">
  42. <view v-for="(image, index) in photoTipsImages" :key="index" class="image-item"
  43. @click="previewImageHandler(image, 'photoTips')">
  44. <image :src="image" mode="aspectFill" class="image-thumb"></image>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="checklist-item">
  49. <view class="checkbox-text-container">
  50. <u-checkbox name="face2face" size="40rpx" color="#108cff" />
  51. <text class="checklist-text">到达客户面对面</text>
  52. </view>
  53. <u-input v-if="selectedCheckbox.includes('face2face')" v-model="formData.face2faceNotes"
  54. type="textarea" placeholder="请输入备注信息" rows="3" class="checklist-textarea" />
  55. <!-- 上传图片按钮 -->
  56. <view v-if="selectedCheckbox.includes('face2face')" class="upload-btn-container">
  57. <div class="upload-btn" @click="chooseImage('face2face')">
  58. <u-icon name="camera" size="32rpx" color="#108cff"></u-icon>
  59. <text class="upload-btn-text">上传图片</text>
  60. </div>
  61. </view>
  62. <!-- 图片显示区域 -->
  63. <view v-if="selectedCheckbox.includes('face2face') && face2faceImages.length > 0"
  64. class="image-list">
  65. <view v-for="(image, index) in face2faceImages" :key="index" class="image-item"
  66. @click="previewImageHandler(image, 'face2face')">
  67. <image :src="image" mode="aspectFill" class="image-thumb"></image>
  68. </view>
  69. </view>
  70. </view>
  71. </u-checkbox-group>
  72. </view>
  73. </view>
  74. <!-- 新添加的数字选择器卡片 -->
  75. <view class="card_wrap price-card">
  76. <view class="price-section">
  77. <view class="price-picker-container">
  78. <!-- 上方快速操作按钮 -->
  79. <view class="quick-actions top-actions">
  80. <div class="quick-btn increase" @click="quickChangePrice(100)">+100</div>
  81. <div class="quick-btn increase" @click="quickChangePrice(1000)">+1000</div>
  82. </view>
  83. <!-- 数字选择器 -->
  84. <view class="number-box-container">
  85. <view class="price-input-box">
  86. <text class="price-label">核准价¥</text>
  87. <input type="number" v-model="approvedPrice" class="price-input" placeholder="0" min="0"
  88. @input="onPriceInput" />
  89. </view>
  90. </view>
  91. <!-- 下方快速操作按钮 -->
  92. <view class="quick-actions bottom-actions">
  93. <div class="quick-btn decrease" @click="quickChangePrice(-100)">-100</div>
  94. <div class="quick-btn decrease" @click="quickChangePrice(-1000)">-1000</div>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. <!-- 新添加的高清细节图上传卡片 -->
  100. <view class="card_wrap detail-image-card">
  101. <view class="detail-image-section">
  102. <div class="detail-image-header">
  103. <div class="detail-image-title">上传高清细节图(支持多选)</div>
  104. <div class="copy-btn" @click="copyAllDetailImages">
  105. <text>一键复制</text>
  106. </div>
  107. </div>
  108. <div class="detail-image-upload-container">
  109. <view class="detail-image-list">
  110. <view class="detail-image-item" v-for="(item, index) in detailImages" :key="'detail-' + index">
  111. <pic-comp :src="item"></pic-comp>
  112. <view class="detail-delete-btn" @click="deleteDetailImage(index)">×</view>
  113. </view>
  114. <view class="detail-upload-btn" @click="uploadDetailImage">
  115. <u-icon name="plus" size="40rpx" color="#999"></u-icon>
  116. </view>
  117. </view>
  118. </div>
  119. </view>
  120. </view>
  121. <u-button @click="handleNextClick" type="primary" size="middle" style="border-radius: 20rpx;">下一步</u-button>
  122. </view>
  123. </template>
  124. <script>
  125. import picComp from './picComp.vue'
  126. export default {
  127. components: {
  128. picComp
  129. },
  130. data() {
  131. return {
  132. selectedCheckbox: [],
  133. formData: {
  134. contactPhone: '',
  135. photoTips: '',
  136. face2faceNotes: ''
  137. },
  138. // 图片相关数据
  139. photoTipsImages: [], // 师傅技巧图片数组
  140. face2faceImages: [], // 到达客户面对面图片数组
  141. // 全屏预览相关
  142. previewImage: '', // 当前预览的图片
  143. showPreview: false, // 是否显示全屏预览
  144. // 核准价格相关
  145. approvedPrice: 0, // 核准价格初始值
  146. // 高清细节图相关
  147. detailImages: [] // 高清细节图数组
  148. };
  149. },
  150. methods: {
  151. // 选择图片方法
  152. chooseImage(type) {
  153. uni.chooseImage({
  154. count: 9, // 最多选择9张图片
  155. sizeType: ['original', 'compressed'], // 原图或压缩图
  156. sourceType: ['album', 'camera'], // 从相册或相机选择
  157. success: (res) => {
  158. const tempFilePaths = res.tempFilePaths;
  159. // 根据类型将图片添加到对应的数组
  160. if (type === 'photoTips') {
  161. this.photoTipsImages = [...this.photoTipsImages, ...tempFilePaths];
  162. } else if (type === 'face2face') {
  163. this.face2faceImages = [...this.face2faceImages, ...tempFilePaths];
  164. }
  165. },
  166. fail: (err) => {
  167. console.error('选择图片失败:', err);
  168. uni.showToast({
  169. title: '选择图片失败',
  170. icon: 'none'
  171. });
  172. }
  173. });
  174. },
  175. // 图片预览方法
  176. previewImageHandler(image, type) {
  177. let currentIndex = 0;
  178. let imageList = [];
  179. // 根据类型获取对应的图片数组
  180. if (type === 'photoTips') {
  181. imageList = this.photoTipsImages;
  182. currentIndex = imageList.indexOf(image);
  183. } else if (type === 'face2face') {
  184. imageList = this.face2faceImages;
  185. currentIndex = imageList.indexOf(image);
  186. }
  187. // 使用uni-app的图片预览API
  188. uni.previewImage({
  189. current: currentIndex, // 当前预览图片的索引
  190. urls: imageList, // 需要预览的图片链接列表
  191. loop: true, // 是否可循环预览
  192. longPressActions: {
  193. itemList: ['保存图片'],
  194. success: function (data) {
  195. // 保存图片到相册
  196. uni.saveImageToPhotosAlbum({
  197. filePath: imageList[data.tapIndex],
  198. success: function () {
  199. uni.showToast({
  200. title: '保存成功',
  201. icon: 'success'
  202. });
  203. },
  204. fail: function (err) {
  205. console.error('保存图片失败:', err);
  206. uni.showToast({
  207. title: '保存失败',
  208. icon: 'none'
  209. });
  210. }
  211. });
  212. }
  213. }
  214. });
  215. },
  216. // 价格输入回调
  217. onPriceInput(e) {
  218. // 确保价格是数字且不小于0
  219. let value = Number(e.detail.value);
  220. if (isNaN(value)) value = 0;
  221. value = Math.max(0, value);
  222. this.approvedPrice = value;
  223. },
  224. // 快速调整价格
  225. quickChangePrice(amount) {
  226. let newPrice = this.approvedPrice + amount;
  227. // 确保价格不小于0
  228. newPrice = Math.max(0, newPrice);
  229. this.approvedPrice = newPrice;
  230. },
  231. // 上传高清细节图
  232. uploadDetailImage() {
  233. uni.chooseImage({
  234. count: 9 - this.detailImages.length, // 最多选择9张
  235. sizeType: ['compressed'], // 压缩图片
  236. sourceType: ['album', 'camera'], // 从相册选择或拍照
  237. success: (res) => {
  238. const tempFilePaths = res.tempFilePaths;
  239. // 将图片路径添加到数组中
  240. this.detailImages = [...this.detailImages, ...tempFilePaths];
  241. },
  242. fail: (err) => {
  243. console.error('选择图片失败:', err);
  244. uni.showToast({
  245. title: '选择图片失败',
  246. icon: 'none'
  247. });
  248. }
  249. });
  250. },
  251. // 删除高清细节图
  252. deleteDetailImage(index) {
  253. uni.showModal({
  254. title: '提示',
  255. content: '确定要删除这张图片吗?',
  256. success: (res) => {
  257. if (res.confirm) {
  258. this.detailImages.splice(index, 1);
  259. }
  260. }
  261. });
  262. },
  263. // 复制所有高清细节图链接
  264. copyAllDetailImages() {
  265. if (this.detailImages.length === 0) {
  266. uni.showToast({
  267. title: '暂无图片可复制',
  268. icon: 'none'
  269. });
  270. return;
  271. }
  272. const imageUrls = this.detailImages.join('\n');
  273. uni.setClipboardData({
  274. data: imageUrls,
  275. success: () => {
  276. uni.showToast({
  277. title: '复制成功',
  278. icon: 'success'
  279. });
  280. },
  281. fail: () => {
  282. uni.showToast({
  283. title: '复制失败',
  284. icon: 'none'
  285. });
  286. }
  287. });
  288. },
  289. // 下一步按钮点击事件
  290. handleNextClick() {
  291. // 创建一个只包含被勾选checkbox对应数据的对象
  292. const result = {};
  293. // 检查联系师傅
  294. if (this.selectedCheckbox.includes('contact师傅')) {
  295. result.contactPhone = this.formData.contactPhone;
  296. }
  297. // 检查师傅拍图技巧
  298. if (this.selectedCheckbox.includes('photo技巧')) {
  299. result.photoTips = this.formData.photoTips;
  300. result.photoTipsImages = this.photoTipsImages;
  301. }
  302. // 检查到达客户面对面
  303. if (this.selectedCheckbox.includes('face2face')) {
  304. result.face2faceNotes = this.formData.face2faceNotes;
  305. result.face2faceImages = this.face2faceImages;
  306. }
  307. // 添加其他非checkbox控制的字段
  308. result.approvedPrice = this.approvedPrice;
  309. result.detailImages = this.detailImages;
  310. // result.selectedCheckbox = this.selectedCheckbox;
  311. // 打印结果对象
  312. // console.log('当前界面的选中值:', result);
  313. this.$emit('handleNextClick', {
  314. nowPage: 'formTwo',
  315. form: result,
  316. })
  317. }
  318. }
  319. };
  320. </script>
  321. <style scoped lang="scss">
  322. // 导入公共样式
  323. @import './common.scss';
  324. // 主样式
  325. .page-container {
  326. box-sizing: border-box;
  327. padding: 0;
  328. background-color: map-get($colors, bg);
  329. font-family: map-get($font, family);
  330. -webkit-font-smoothing: map-get($font, smoothing);
  331. font-smoothing: map-get($font, smoothing);
  332. }
  333. .card_wrap {
  334. @include card;
  335. margin-bottom: 20rpx;
  336. &:hover {
  337. @include shadow(2);
  338. }
  339. &.checklist-card,
  340. &.price-card,
  341. &.detail-image-card {
  342. margin-top: 20rpx;
  343. }
  344. }
  345. .address-section {
  346. padding: map-get($sizes, padding-sm) map-get($sizes, padding);
  347. }
  348. .address-header {
  349. @include flex-center;
  350. margin-bottom: map-get($sizes, margin-sm);
  351. padding-bottom: map-get($sizes, margin-sm);
  352. border-bottom: 1rpx solid map-get($colors, border);
  353. .location-icon {
  354. margin-right: map-get($sizes, margin-xs);
  355. background-color: map-get($colors, primary-light);
  356. padding: map-get($sizes, icon-padding);
  357. border-radius: 50%;
  358. flex-shrink: 0;
  359. }
  360. .address-title {
  361. margin-left: 16rpx;
  362. }
  363. }
  364. .address-content {
  365. .address-text {
  366. @include font-styles;
  367. }
  368. }
  369. // 复选框卡片样式
  370. .checklist-card {
  371. margin-top: 20rpx;
  372. }
  373. .checklist-section {
  374. padding: map-get($sizes, padding-sm) map-get($sizes, padding);
  375. display: block;
  376. /* 明确设置为块级元素,避免任何flex影响 */
  377. }
  378. .checklist-item {
  379. display: block;
  380. /* 明确设置为块级元素,确保垂直排列 */
  381. width: 100%;
  382. /* 确保占满整个宽度 */
  383. padding: 16rpx 0;
  384. border-bottom: 1rpx solid map-get($colors, border);
  385. margin-bottom: 0;
  386. /* 移除任何可能的margin影响 */
  387. &:first-child {
  388. padding-top: 0;
  389. }
  390. &:last-child {
  391. padding-bottom: 0;
  392. border-bottom: none;
  393. }
  394. // 复选框和文本的容器
  395. .checkbox-text-container {
  396. @include flex-center;
  397. display: flex;
  398. align-items: center;
  399. }
  400. }
  401. // u-checkbox样式调整
  402. u-checkbox {
  403. margin-right: 16rpx;
  404. flex-shrink: 0;
  405. vertical-align: middle;
  406. }
  407. // 隐藏原生checkbox样式
  408. .checkbox {
  409. display: none;
  410. }
  411. .checklist-text {
  412. @include font-styles;
  413. vertical-align: middle;
  414. }
  415. // 输入框样式
  416. .checklist-input,
  417. .checklist-textarea {
  418. margin-top: 12rpx;
  419. margin-left: 56rpx; // 与复选框对齐
  420. width: calc(100% - 72rpx); // 减去左边距和额外的16rpx边距,确保不超出边界
  421. max-width: calc(100% - 72rpx); // 确保最大宽度也不超出
  422. box-sizing: border-box; // 确保padding和border不影响总宽度
  423. border-radius: 8rpx;
  424. border: 1rpx solid #e5e7eb;
  425. padding: 12rpx 16rpx;
  426. font-size: 28rpx;
  427. background-color: #f9fafb;
  428. transition: all 0.2s ease;
  429. &:focus {
  430. border-color: map-get($colors, primary);
  431. background-color: #ffffff;
  432. box-shadow: 0 0 0 2rpx rgba(16, 140, 255, 0.1);
  433. }
  434. }
  435. .checklist-textarea {
  436. min-height: 160rpx;
  437. resize: vertical;
  438. vertical-align: top;
  439. padding-top: 16rpx;
  440. padding-bottom: 16rpx;
  441. }
  442. // 解决textarea文本和placeholder居中问题
  443. // 直接穿透u-input组件的所有层级
  444. :deep(.checklist-textarea) {
  445. & .u-input__textarea {
  446. display: block !important;
  447. height: auto !important;
  448. min-height: 160rpx !important;
  449. padding: 16rpx !important;
  450. text-align: left !important;
  451. }
  452. & .u-input__textarea textarea {
  453. display: block !important;
  454. width: 100% !important;
  455. height: auto !important;
  456. min-height: 128rpx !important;
  457. padding: 0 !important;
  458. margin: 0 !important;
  459. text-align: left !important;
  460. vertical-align: top !important;
  461. line-height: 1.5 !important;
  462. resize: vertical !important;
  463. }
  464. // 确保输入的文本顶部对齐
  465. & .u-input__textarea textarea:focus {
  466. text-align: left !important;
  467. vertical-align: top !important;
  468. }
  469. // 针对不同浏览器的placeholder样式
  470. & .u-input__textarea textarea::-webkit-input-placeholder {
  471. text-align: left !important;
  472. vertical-align: top !important;
  473. line-height: 1.5 !important;
  474. }
  475. & .u-input__textarea textarea::-moz-placeholder {
  476. text-align: left !important;
  477. vertical-align: top !important;
  478. line-height: 1.5 !important;
  479. }
  480. & .u-input__textarea textarea:-ms-input-placeholder {
  481. text-align: left !important;
  482. vertical-align: top !important;
  483. line-height: 1.5 !important;
  484. }
  485. & .u-input__textarea textarea::placeholder {
  486. text-align: left !important;
  487. vertical-align: top !important;
  488. line-height: 1.5 !important;
  489. }
  490. }
  491. // 上传按钮容器样式
  492. .upload-btn-container {
  493. margin-top: 16rpx;
  494. margin-left: 56rpx;
  495. display: inline-block;
  496. }
  497. // 上传按钮样式
  498. .upload-btn {
  499. display: flex;
  500. align-items: center;
  501. justify-content: center;
  502. gap: 12rpx;
  503. font-size: 30rpx;
  504. padding: 20rpx 40rpx;
  505. border-radius: 8rpx;
  506. background-color: map-get($colors, bg);
  507. border: 2rpx dashed map-get($colors, primary);
  508. color: map-get($colors, primary);
  509. transition: all 0.3s ease;
  510. cursor: pointer;
  511. min-width: 200rpx;
  512. box-sizing: border-box;
  513. &:hover {
  514. background-color: map-get($colors, primary-light);
  515. border-color: darken(map-get($colors, primary), 10%);
  516. transform: translateY(-2rpx);
  517. box-shadow: 0 4rpx 16rpx rgba(16, 140, 255, 0.15);
  518. }
  519. &:active {
  520. transform: translateY(0);
  521. }
  522. }
  523. .upload-btn-text {
  524. color: map-get($colors, primary);
  525. @include font-styles($size: small, $weight: medium);
  526. }
  527. // 图片列表样式
  528. .image-list {
  529. margin-top: 16rpx;
  530. margin-left: 56rpx;
  531. display: flex;
  532. flex-wrap: wrap;
  533. gap: 16rpx;
  534. padding-bottom: 8rpx;
  535. }
  536. // 图片项样式
  537. .image-item {
  538. width: 120rpx;
  539. height: 120rpx;
  540. border-radius: 8rpx;
  541. overflow: hidden;
  542. background-color: map-get($colors, bg);
  543. @include shadow(1);
  544. transition: all 0.3s ease;
  545. cursor: pointer;
  546. position: relative;
  547. &:hover {
  548. @include shadow(2);
  549. transform: translateY(-2rpx);
  550. }
  551. }
  552. // 图片缩略图样式
  553. .image-thumb {
  554. width: 100%;
  555. height: 100%;
  556. object-fit: cover;
  557. }
  558. // 价格卡片样式
  559. .price-card {
  560. margin-top: 20rpx;
  561. }
  562. .price-section {
  563. padding: map-get($sizes, padding-sm) map-get($sizes, padding);
  564. }
  565. .detail-image-card {
  566. margin-top: 20rpx;
  567. }
  568. .detail-image-section {
  569. padding: map-get($sizes, padding-sm) map-get($sizes, padding);
  570. }
  571. .detail-image-header {
  572. display: flex;
  573. justify-content: space-between;
  574. align-items: center;
  575. margin-bottom: map-get($sizes, margin-sm);
  576. padding-bottom: map-get($sizes, margin-sm);
  577. border-bottom: 1rpx solid map-get($colors, border);
  578. }
  579. .detail-image-title {
  580. @include font-styles($size: content, $weight: bold, $color: primary);
  581. }
  582. .copy-btn {
  583. border-radius: 20rpx;
  584. border: 1rpx solid #007AFF;
  585. background-color: transparent;
  586. color: #007AFF;
  587. @include font-styles($size: small, $weight: regular);
  588. padding: 0 24rpx;
  589. height: 64rpx;
  590. line-height: 64rpx;
  591. display: flex;
  592. align-items: center;
  593. gap: 8rpx;
  594. cursor: pointer;
  595. user-select: none;
  596. transition: all 0.3s ease;
  597. &:hover {
  598. background-color: rgba(0, 122, 255, 0.05);
  599. }
  600. &:active {
  601. transform: scale(0.98);
  602. }
  603. }
  604. .detail-image-upload-container {
  605. margin-top: 20rpx;
  606. }
  607. .detail-image-list {
  608. display: flex;
  609. flex-wrap: wrap;
  610. gap: 20rpx;
  611. }
  612. .detail-image-item {
  613. position: relative;
  614. width: 200rpx;
  615. height: 200rpx;
  616. box-sizing: border-box;
  617. }
  618. .detail-delete-btn {
  619. position: absolute;
  620. top: -10rpx;
  621. right: -10rpx;
  622. width: 40rpx;
  623. height: 40rpx;
  624. background-color: #ff4d4f;
  625. color: #fff;
  626. border-radius: 50%;
  627. display: flex;
  628. align-items: center;
  629. justify-content: center;
  630. @include font-styles($size: small, $weight: bold);
  631. z-index: 10;
  632. }
  633. .detail-upload-btn {
  634. width: 200rpx;
  635. height: 200rpx;
  636. border: 8rpx dashed #ddd;
  637. border-radius: 30rpx;
  638. display: flex;
  639. align-items: center;
  640. justify-content: center;
  641. background-color: #f9f9f9;
  642. box-sizing: border-box;
  643. }
  644. .price-picker-container {
  645. display: flex;
  646. flex-direction: column;
  647. align-items: center;
  648. padding: 20rpx 0;
  649. }
  650. // 快速操作按钮样式
  651. .quick-actions {
  652. display: flex;
  653. justify-content: center;
  654. gap: 16rpx;
  655. margin: 16rpx 0;
  656. width: 100%;
  657. max-width: 800rpx;
  658. }
  659. .quick-btn {
  660. flex: 1;
  661. border-radius: 12rpx;
  662. font-size: 36rpx;
  663. padding: 32rpx 0;
  664. min-width: 0;
  665. text-align: center;
  666. color: #ffffff;
  667. font-weight: 600;
  668. transition: all 0.3s ease;
  669. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
  670. cursor: pointer;
  671. }
  672. .quick-btn.increase {
  673. background-color: #e6f7ed;
  674. color: #00b42a;
  675. }
  676. .quick-btn.decrease {
  677. background-color: #fff1f0;
  678. color: #f53f3f;
  679. }
  680. .quick-btn:hover {
  681. opacity: 0.9;
  682. transform: translateY(-2rpx);
  683. box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.15);
  684. }
  685. // 数字选择器容器
  686. .number-box-container {
  687. display: flex;
  688. align-items: center;
  689. gap: 16rpx;
  690. margin: 20rpx 0;
  691. width: 100%;
  692. justify-content: center;
  693. white-space: nowrap;
  694. }
  695. // 价格输入框盒子
  696. .price-input-box {
  697. flex: 1;
  698. max-width: 800rpx;
  699. background-color: #f5f7fa;
  700. border: 2rpx solid #e5e7eb;
  701. border-radius: 12rpx;
  702. padding: 20rpx 24rpx;
  703. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
  704. display: flex;
  705. align-items: center;
  706. justify-content: space-between;
  707. white-space: nowrap;
  708. min-width: 300rpx;
  709. }
  710. // 价格标签样式
  711. .price-label {
  712. font-size: 36rpx;
  713. color: map-get($colors, text-primary);
  714. font-weight: 700;
  715. min-width: 120rpx;
  716. flex-shrink: 0;
  717. margin-right: 16rpx;
  718. letter-spacing: 1rpx;
  719. font-family: map-get($font, family);
  720. }
  721. // 价格输入框样式
  722. .price-input {
  723. width: 100%;
  724. height: auto;
  725. border: none;
  726. outline: none;
  727. background-color: transparent;
  728. text-align: right;
  729. font-size: 48rpx;
  730. font-weight: 600;
  731. color: map-get($colors, text-primary);
  732. padding: 0 10rpx;
  733. box-sizing: border-box;
  734. -webkit-appearance: none;
  735. -moz-appearance: textfield;
  736. /* 使用等宽字体显示带斜线的0 */
  737. font-family: Consolas, 'Courier New', monospace, -apple-system, BlinkMacSystemFont;
  738. }
  739. // 移除数字输入框的上下箭头
  740. .price-input::-webkit-inner-spin-button,
  741. .price-input::-webkit-outer-spin-button {
  742. -webkit-appearance: none;
  743. margin: 0;
  744. }
  745. .price-input:focus {
  746. background-color: transparent;
  747. }
  748. </style>