| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021 |
- <template>
- <view class="page-container">
- <view class="card_wrap">
- <view class="address-section">
- <view class="address-header">
- <u-icon name="map" size="36rpx" color="#108cff" class="location-icon"></u-icon>
- <text class="address-title">上门地址</text>
- </view>
- <view class="address-content">
- <text class="address-text">北京市朝阳区建国路88号SOHO现代城A座2301室</text>
- </view>
- </view>
- </view>
- <view class="card_wrap checklist-card">
- <view class="checklist-section">
- <u-checkbox-group v-model="selectedCheckbox" placement="column">
- <view class="checklist-item">
- <view class="checkbox-text-container">
- <u-checkbox name="contact师傅" size="40rpx" color="#108cff" />
- <text class="checklist-text">联系师傅</text>
- </view>
- <u-input v-if="selectedCheckbox.includes('contact师傅')" v-model="formData.contactPhone"
- placeholder="请输入师傅手机号" size="default" class="checklist-input" />
- </view>
- <view class="checklist-item">
- <view class="checkbox-text-container">
- <u-checkbox name="photo技巧" size="40rpx" color="#108cff" />
- <text class="checklist-text">师傅拍图技巧</text>
- </view>
- <u-input v-if="selectedCheckbox.includes('photo技巧')" v-model="formData.photoTips"
- type="textarea" placeholder="请输入拍图技巧" rows="3" class="checklist-textarea" />
- <!-- 上传图片按钮 -->
- <view v-if="selectedCheckbox.includes('photo技巧')" class="upload-btn-container">
- <div class="upload-btn" @click="handleUpload('photoTips')">
- <u-icon name="camera" size="32rpx" color="#108cff"></u-icon>
- <text class="upload-btn-text">上传图片</text>
- </div>
- </view>
- <!-- 图片显示区域 -->
- <view v-if="selectedCheckbox.includes('photo技巧') && photoTipsImages.length > 0"
- class="image-list">
- <view v-for="(image, index) in photoTipsImages" :key="index" class="image-item">
- <image :src="image" mode="aspectFill" class="image-thumb"></image>
- </view>
- </view>
- </view>
- <view class="checklist-item">
- <view class="checkbox-text-container">
- <u-checkbox name="face2face" size="40rpx" color="#108cff" />
- <text class="checklist-text">到达客户面对面</text>
- </view>
- <u-input v-if="selectedCheckbox.includes('face2face')" v-model="formData.face2faceNotes"
- type="textarea" placeholder="请输入备注信息" rows="3" class="checklist-textarea" />
- <!-- 上传图片按钮 -->
- <view v-if="selectedCheckbox.includes('face2face')" class="upload-btn-container">
- <div class="upload-btn" @click="handleUpload('face2faceNotes')">
- <u-icon name="camera" size="32rpx" color="#108cff"></u-icon>
- <text class="upload-btn-text">上传图片</text>
- </div>
- </view>
- <!-- 图片显示区域 -->
- <view v-if="selectedCheckbox.includes('face2face') && face2faceImages.length > 0"
- class="image-list">
- <view v-for="(image, index) in face2faceImages" :key="index" class="image-item">
- <image :src="image" mode="aspectFill" class="image-thumb"></image>
- </view>
- </view>
- </view>
- </u-checkbox-group>
- </view>
- </view>
- <!-- 新添加的数字选择器卡片 -->
- <view class="card_wrap price-card">
- <view class="price-section">
- <view class="price-picker-container">
- <!-- 上方快速操作按钮 -->
- <view class="quick-actions top-actions">
- <div class="quick-btn increase" @click="quickChangePrice(100)">+100</div>
- <div class="quick-btn increase" @click="quickChangePrice(1000)">+1000</div>
- </view>
- <!-- 数字选择器 -->
- <view class="number-box-container">
- <view class="price-input-box">
- <text class="price-label">核准价¥</text>
- <input type="number" v-model="approvedPrice" class="price-input" placeholder="0" min="0"
- @input="onPriceInput" />
- </view>
- </view>
- <!-- 下方快速操作按钮 -->
- <view class="quick-actions bottom-actions">
- <div class="quick-btn decrease" @click="quickChangePrice(-100)">-100</div>
- <div class="quick-btn decrease" @click="quickChangePrice(-1000)">-1000</div>
- </view>
- </view>
- </view>
- </view>
- <!-- 新添加的高清细节图上传卡片 -->
- <view class="card_wrap detail-image-card">
- <view class="detail-image-section">
- <div class="detail-image-header">
- <div class="detail-image-title">上传高清细节图(支持多选)</div>
- <div class="copy-btn" @click="copyAllDetailImages">
- <text>一键复制</text>
- </div>
- </div>
- <div class="detail-image-upload-container">
- <view class="detail-image-list">
- <view class="detail-image-item" v-for="(item, index) in detailImages" :key="'detail-' + index">
- <pic-comp :src="item.fileUrl"></pic-comp>
- <view class="detail-delete-btn" @click="deleteImage(item)">×</view>
- </view>
- <view class="detail-upload-btn" @click="uploadImage('detailImages', currentReceipt.id)">
- <u-icon name="plus" size="40rpx" color="#999"></u-icon>
- </view>
- </view>
- </div>
- </view>
- </view>
- <u-button @click="handleNextClick" type="primary" size="middle" style="border-radius: 20rpx;">下一步</u-button>
- </view>
- </template>
- <script>
- import picComp from './picComp.vue'
- import imgUploadAndDownLoad from '../mixin/imgUploadAndDownLoad'
- export default {
- mixins: [imgUploadAndDownLoad],
- props: {
- orderDetail: {
- type: Object,
- default: () => { },
- },
- orderId: {
- type: String,
- default: '',
- },
- followUpList: {
- type: Array,
- default: () => [],
- },
- currentReceipt: {
- type: Object,
- default: () => { },
- },
- },
- watch: {
- orderDetail: {
- handler(newVal) {
- if (newVal) {
- }
- },
- deep: true,
- },
- followUpList: {
- handler(newVal) {
- if (newVal) {
- this.followUpListInner = newVal.map(item => (item.content || ''));
- //判断内容是否含有上面的三个选择
- this.checkFollowUpContent();
- }
- },
- deep: true,
- },
- currentReceipt: {
- handler(newVal) {
- if (newVal) {
- this.approvedPrice = Number(newVal.sellingPrice) || 0;
- setTimeout(() => {
- this.getList('2', '3', newVal.id, this.orderDetail.itemBrand);
- }, 100)
- }
- },
- deep: true,
- },
- },
- components: {
- picComp
- },
- data() {
- return {
- selectedCheckbox: [],
- formData: {
- contactPhone: '',
- photoTips: '',
- face2faceNotes: ''
- },
- // 图片相关数据
- photoTipsImages: [], // 师傅技巧图片数组
- face2faceImages: [], // 到达客户面对面图片数组
- // 全屏预览相关
- previewImage: '', // 当前预览的图片
- showPreview: false, // 是否显示全屏预览
- // 核准价格相关
- approvedPrice: 0, // 核准价格初始值
- // 高清细节图相关
- detailImages: [],// 高清细节图数组
- // 绑定订单相关
- bindList: [],// 待绑定的图片列表,
- followUpListInner: [],// 跟进记录数组
- };
- },
- methods: {
- // 价格输入回调
- onPriceInput(e) {
- // 确保价格是数字且不小于0
- let value = Number(e.detail.value);
- if (isNaN(value)) value = 0;
- value = Math.max(0, value);
- this.approvedPrice = value;
- },
- // 快速调整价格
- quickChangePrice(amount) {
- let newPrice = this.approvedPrice + amount;
- // 确保价格不小于0
- newPrice = Math.max(0, newPrice);
- this.approvedPrice = newPrice;
- },
- // 复制所有高清细节图链接
- copyAllDetailImages() {
- // 合并所有图片
- const allImages = [...this.detailImages];
- //取出所有图的url
- const allUrls = allImages.map(item => item.fileUrl);
- if (allUrls.length > 0) {
- // 显示保存图片确认弹窗
- uni.showModal({
- title: '保存图片',
- content: `是否将 ${allUrls.length} 张图片保存到本地相册?`,
- confirmText: '保存',
- success: (res) => {
- if (res.confirm) {
- // 用户选择保存图片
- this.saveImagesToLocal(allUrls);
- }
- }
- })
- } else {
- uni.showToast({
- title: '没有图片可复制',
- icon: 'none'
- })
- }
- },
- // 保存图片到本地相册
- async saveImagesToLocal(imageUrls) {
- try {
- uni.showLoading({
- title: '正在保存图片...',
- mask: true
- });
- const savedImages = [];
- const failedImages = [];
- // 逐个保存图片
- for (let i = 0; i < imageUrls.length; i++) {
- const url = imageUrls[i];
- try {
- await this.saveSingleImage(url);
- savedImages.push(url);
- } catch (error) {
- console.error(`保存图片失败: ${url}`, error);
- failedImages.push(url);
- }
-
- // 更新进度
- uni.showLoading({
- title: `正在保存图片... (${i + 1}/${imageUrls.length})`,
- mask: true
- });
- }
- uni.hideLoading();
- // 显示结果
- let message = `成功保存 ${savedImages.length} 张图片`;
- if (failedImages.length > 0) {
- message += `,${failedImages.length} 张保存失败`;
- }
- uni.showToast({
- title: message,
- icon: 'none',
- duration: 3000
- });
- // 如果有失败的图片,也复制链接作为备选
- if (failedImages.length > 0) {
- const allUrls = [...savedImages, ...failedImages];
- this.copyImageUrls(allUrls);
- }
- } catch (error) {
- uni.hideLoading();
- console.error('保存图片过程中发生错误:', error);
- uni.showToast({
- title: '保存图片失败',
- icon: 'error'
- });
- }
- },
- // 保存单张图片
- saveSingleImage(url) {
- return new Promise((resolve, reject) => {
- // 先下载图片
- uni.downloadFile({
- url: url,
- success: (res) => {
- if (res.statusCode === 200) {
- // 保存到相册
- uni.saveImageToPhotosAlbum({
- filePath: res.tempFilePath,
- success: () => {
- console.log('图片保存成功:', url);
- resolve();
- },
- fail: (err) => {
- console.error('保存到相册失败:', err);
- // 如果是权限问题,尝试请求权限
- if (err.errMsg.includes('auth denied')) {
- uni.showModal({
- title: '权限不足',
- content: '需要访问相册权限来保存图片,是否去设置?',
- success: (modalRes) => {
- if (modalRes.confirm) {
- // 打开设置页面
- uni.openSetting({
- success: (settingRes) => {
- console.log('设置页面结果:', settingRes);
- }
- });
- }
- }
- });
- }
- reject(err);
- }
- });
- } else {
- reject(new Error('下载失败'));
- }
- },
- fail: (err) => {
- console.error('下载图片失败:', err);
- reject(err);
- }
- });
- });
- },
- // 下一步按钮点击事件
- async handleNextClick() {
- //调接口保存当前的核准价
- await uni.$u.api.updateReceiptForm({
- id: this.currentReceipt.id,
- sellingPrice: this.approvedPrice,
- });
- // 创建一个只包含被勾选checkbox对应数据的对象
- const result = {};
- // 检查联系师傅
- if (this.selectedCheckbox.includes('contact师傅')) {
- result.contactPhone = this.formData.contactPhone;
- }
- // 检查师傅拍图技巧
- if (this.selectedCheckbox.includes('photo技巧')) {
- result.photoTips = this.formData.photoTips;
- result.photoTipsImages = this.photoTipsImages;
- }
- // 检查到达客户面对面
- if (this.selectedCheckbox.includes('face2face')) {
- result.face2faceNotes = this.formData.face2faceNotes;
- result.face2faceImages = this.face2faceImages;
- }
- // 添加其他非checkbox控制的字段
- result.approvedPrice = this.approvedPrice;
- result.detailImages = this.detailImages;
- // result.selectedCheckbox = this.selectedCheckbox;
- // 打印结果对象
- // console.log('当前界面的选中值:', result);
- this.$emit('handleNextClick', {
- nowPage: 'formTwo',
- form: result,
- })
- // 下一步的时候要通过判断是否有联系师傅,师傅拍图技巧,到达客户面对面,如果有的话调uni.$u.api.addOrderFollow(orderFormData);接口按照 联系师傅;内容;url1,url2,url3,的格式上传
- //先判断有没有联系师傅
- if (this.selectedCheckbox.includes('contact师傅')) {
- console.log('触发联系师傅')
- // 联系师傅的手机号,已:为分割,取后面的内容
- const phone = this.formData.contactPhone || '';
- const data = `联系师傅;${phone}`;
- // 调用接口上传
- await uni.$u.api.addOrderFollow({
- orderId: this.orderId,
- content: data,
- })
- }
- if (this.selectedCheckbox.includes('photo技巧')) {
- console.log('触发师傅拍图技巧')
- // 师傅拍图技巧的内容,已:为分割,取后面的内容
- const photoTips = this.formData.photoTips || '';
- const urls = this.photoTipsImages.join(',');
- const data = `师傅拍图技巧;${photoTips};${urls}`;
- console.log('urls9999999', data)
- await uni.$u.api.addOrderFollow({
- orderId: this.orderId,
- content: data,
- })
- }
- if (this.selectedCheckbox.includes('face2face')) {
- // 到达客户面对面的内容,已:为分割,取后面的内容
- const face2faceNotes = this.formData.face2faceNotes || '';
- const urls = this.face2faceImages.join(',');
- const data = `到达客户面对面;${face2faceNotes};${urls}`;
- await uni.$u.api.addOrderFollow({
- orderId: this.orderId,
- content: data,
- })
- }
- },
- checkFollowUpContent() {
- // 检查跟进记录是否包含上面的三个选择
- //每个检查到一个就不继续检查了
- let hasContactMaster = false;
- let hasPhotoTips = false;
- let hasFace2face = false;
- this.followUpListInner.forEach(item => {
- console.log('这里是跟进记录', item)
- // 判断内容是否含有联系师傅,师傅拍图技巧,到达客户面对面,如果包含的话就上面对应的box就打上对勾
- if (item.includes('联系师傅') && !hasContactMaster) {
- this.selectedCheckbox.push('contact师傅');
- // 联系师傅的手机号,已:为分割,取后面的内容
- const phone = item.split(';')[1] || '';
- console.log('联系师傅的手机号111111', phone)
- this.formData.contactPhone = phone;
- hasContactMaster = true;
- }
- if (item.includes('师傅拍图技巧') && !hasPhotoTips) {
- this.selectedCheckbox.push('photo技巧');
- // 师傅拍图技巧的内容,已:为分割,取后面的内容
- const photoTips = item.split(';')[1] || '';
- this.formData.photoTips = photoTips;
- const urls = item.split(';')[2] || ''
- //把url转为数组
- const urlArray = urls.split(',').map(url => url.trim());
- this.photoTipsImages = [...this.photoTipsImages, ...urlArray];
- hasPhotoTips = true;
- }
- if (item.includes('到达客户面对面') && !hasFace2face) {
- this.selectedCheckbox.push('face2face');
- // 到达客户面对面的内容,已:为分割,取后面的内容
- const face2faceNotes = item.split(';')[1] || '';
- this.formData.face2faceNotes = face2faceNotes;
- const urls = item.split(';')[2] || ''
- //把url转为数组
- const urlArray = urls.split(',').map(url => url.trim());
- this.face2faceImages = [...this.face2faceImages, ...urlArray];
- hasFace2face = true;
- }
- })
- },
- // 处理上传图片,上传图片的话就赋值给对应的数组
- async handleUpload(field) {
- uni.chooseImage({
- count: 9, // 最多选择1张
- sizeType: ['compressed'], // 压缩图片
- sourceType: ['album', 'camera'], // 从相册选择或拍照
- success: async (res) => {
- const tempFilePath = res.tempFilePaths
- console.log('上传的图片路径:', tempFilePath)
- // 把blob数组上传到服务器,然后返回路径
- try {
- const res = await Promise.all(tempFilePath.map(filePath => uni.$u.api.uploadFile(filePath)));
- console.log('上传的图片路径数组是:', res.forEach(item => console.log(item.data.url)))
- // 把返回的路径赋值给对应的数组
- if (field == 'photoTips') {
- this.photoTipsImages = [...this.photoTipsImages, ...res.map(item => item.data.url)];
- } else if (field == 'face2faceNotes') {
- console.log('1111')
- this.face2faceImages = [...this.face2faceImages, ...res.map(item => item.data.url)];
- }
- } catch (error) {
- console.error('上传失败:', error);
- uni.$u.toast('上传失败');
- }
- },
- fail: (err) => {
- console.error('选择图片失败:', err)
- }
- })
- },
- }
- };
- </script>
- <style scoped lang="scss">
- // 导入公共样式
- @import './common.scss';
- // 主样式
- .page-container {
- box-sizing: border-box;
- padding: 0;
- background-color: map-get($colors, bg);
- font-family: map-get($font, family);
- -webkit-font-smoothing: map-get($font, smoothing);
- font-smoothing: map-get($font, smoothing);
- }
- .card_wrap {
- @include card;
- margin-bottom: 20rpx;
- &:hover {
- @include shadow(2);
- }
- &.checklist-card,
- &.price-card,
- &.detail-image-card {
- margin-top: 20rpx;
- }
- }
- .address-section {
- padding: map-get($sizes, padding-sm) map-get($sizes, padding);
- }
- .address-header {
- @include flex-center;
- margin-bottom: map-get($sizes, margin-sm);
- padding-bottom: map-get($sizes, margin-sm);
- border-bottom: 1rpx solid map-get($colors, border);
- .location-icon {
- margin-right: map-get($sizes, margin-xs);
- background-color: map-get($colors, primary-light);
- padding: map-get($sizes, icon-padding);
- border-radius: 50%;
- flex-shrink: 0;
- }
- .address-title {
- margin-left: 16rpx;
- }
- }
- .address-content {
- .address-text {
- @include font-styles;
- }
- }
- // 复选框卡片样式
- .checklist-card {
- margin-top: 20rpx;
- }
- .checklist-section {
- padding: map-get($sizes, padding-sm) map-get($sizes, padding);
- display: block;
- /* 明确设置为块级元素,避免任何flex影响 */
- }
- .checklist-item {
- display: block;
- /* 明确设置为块级元素,确保垂直排列 */
- width: 100%;
- /* 确保占满整个宽度 */
- padding: 16rpx 0;
- border-bottom: 1rpx solid map-get($colors, border);
- margin-bottom: 0;
- /* 移除任何可能的margin影响 */
- &:first-child {
- padding-top: 0;
- }
- &:last-child {
- padding-bottom: 0;
- border-bottom: none;
- }
- // 复选框和文本的容器
- .checkbox-text-container {
- @include flex-center;
- display: flex;
- align-items: center;
- }
- }
- // u-checkbox样式调整
- u-checkbox {
- margin-right: 16rpx;
- flex-shrink: 0;
- vertical-align: middle;
- }
- // 隐藏原生checkbox样式
- .checkbox {
- display: none;
- }
- .checklist-text {
- @include font-styles;
- vertical-align: middle;
- }
- // 输入框样式
- .checklist-input,
- .checklist-textarea {
- margin-top: 12rpx;
- margin-left: 56rpx; // 与复选框对齐
- width: calc(100% - 72rpx); // 减去左边距和额外的16rpx边距,确保不超出边界
- max-width: calc(100% - 72rpx); // 确保最大宽度也不超出
- box-sizing: border-box; // 确保padding和border不影响总宽度
- border-radius: 8rpx;
- border: 1rpx solid #e5e7eb;
- padding: 12rpx 16rpx;
- font-size: 28rpx;
- background-color: #f9fafb;
- transition: all 0.2s ease;
- &:focus {
- border-color: map-get($colors, primary);
- background-color: #ffffff;
- box-shadow: 0 0 0 2rpx rgba(16, 140, 255, 0.1);
- }
- }
- .checklist-textarea {
- min-height: 160rpx;
- resize: vertical;
- vertical-align: top;
- padding-top: 16rpx;
- padding-bottom: 16rpx;
- }
- // 解决textarea文本和placeholder居中问题
- // 直接穿透u-input组件的所有层级
- :deep(.checklist-textarea) {
- & .u-input__textarea {
- display: block !important;
- height: auto !important;
- min-height: 160rpx !important;
- padding: 16rpx !important;
- text-align: left !important;
- }
- & .u-input__textarea textarea {
- display: block !important;
- width: 100% !important;
- height: auto !important;
- min-height: 128rpx !important;
- padding: 0 !important;
- margin: 0 !important;
- text-align: left !important;
- vertical-align: top !important;
- line-height: 1.5 !important;
- resize: vertical !important;
- }
- // 确保输入的文本顶部对齐
- & .u-input__textarea textarea:focus {
- text-align: left !important;
- vertical-align: top !important;
- }
- // 针对不同浏览器的placeholder样式
- & .u-input__textarea textarea::-webkit-input-placeholder {
- text-align: left !important;
- vertical-align: top !important;
- line-height: 1.5 !important;
- }
- & .u-input__textarea textarea::-moz-placeholder {
- text-align: left !important;
- vertical-align: top !important;
- line-height: 1.5 !important;
- }
- & .u-input__textarea textarea:-ms-input-placeholder {
- text-align: left !important;
- vertical-align: top !important;
- line-height: 1.5 !important;
- }
- & .u-input__textarea textarea::placeholder {
- text-align: left !important;
- vertical-align: top !important;
- line-height: 1.5 !important;
- }
- }
- // 上传按钮容器样式
- .upload-btn-container {
- margin-top: 16rpx;
- margin-left: 56rpx;
- display: inline-block;
- }
- // 上传按钮样式
- .upload-btn {
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 12rpx;
- font-size: 30rpx;
- padding: 20rpx 40rpx;
- border-radius: 8rpx;
- background-color: map-get($colors, bg);
- border: 2rpx dashed map-get($colors, primary);
- color: map-get($colors, primary);
- transition: all 0.3s ease;
- cursor: pointer;
- min-width: 200rpx;
- box-sizing: border-box;
- &:hover {
- background-color: map-get($colors, primary-light);
- border-color: darken(map-get($colors, primary), 10%);
- transform: translateY(-2rpx);
- box-shadow: 0 4rpx 16rpx rgba(16, 140, 255, 0.15);
- }
- &:active {
- transform: translateY(0);
- }
- }
- .upload-btn-text {
- color: map-get($colors, primary);
- @include font-styles($size: small, $weight: medium);
- }
- // 图片列表样式
- .image-list {
- margin-top: 16rpx;
- margin-left: 56rpx;
- display: flex;
- flex-wrap: wrap;
- gap: 16rpx;
- padding-bottom: 8rpx;
- }
- // 图片项样式
- .image-item {
- width: 120rpx;
- height: 120rpx;
- border-radius: 8rpx;
- overflow: hidden;
- background-color: map-get($colors, bg);
- @include shadow(1);
- transition: all 0.3s ease;
- cursor: pointer;
- position: relative;
- &:hover {
- @include shadow(2);
- transform: translateY(-2rpx);
- }
- }
- // 图片缩略图样式
- .image-thumb {
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
- // 价格卡片样式
- .price-card {
- margin-top: 20rpx;
- }
- .price-section {
- padding: map-get($sizes, padding-sm) map-get($sizes, padding);
- }
- .detail-image-card {
- margin-top: 20rpx;
- }
- .detail-image-section {
- padding: map-get($sizes, padding-sm) map-get($sizes, padding);
- }
- .detail-image-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: map-get($sizes, margin-sm);
- padding-bottom: map-get($sizes, margin-sm);
- border-bottom: 1rpx solid map-get($colors, border);
- }
- .detail-image-title {
- @include font-styles($size: content, $weight: bold, $color: primary);
- }
- .copy-btn {
- border-radius: 20rpx;
- border: 1rpx solid #007AFF;
- background-color: transparent;
- color: #007AFF;
- @include font-styles($size: small, $weight: regular);
- padding: 0 24rpx;
- height: 64rpx;
- line-height: 64rpx;
- display: flex;
- align-items: center;
- gap: 8rpx;
- cursor: pointer;
- user-select: none;
- transition: all 0.3s ease;
- &:hover {
- background-color: rgba(0, 122, 255, 0.05);
- }
- &:active {
- transform: scale(0.98);
- }
- }
- .detail-image-upload-container {
- margin-top: 20rpx;
- }
- .detail-image-list {
- display: flex;
- flex-wrap: wrap;
- gap: 20rpx;
- }
- .detail-image-item {
- position: relative;
- width: 200rpx;
- height: 200rpx;
- box-sizing: border-box;
- }
- .detail-delete-btn {
- position: absolute;
- top: -10rpx;
- right: -10rpx;
- width: 40rpx;
- height: 40rpx;
- background-color: #ff4d4f;
- color: #fff;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- @include font-styles($size: small, $weight: bold);
- z-index: 10;
- }
- .detail-upload-btn {
- width: 200rpx;
- height: 200rpx;
- border: 8rpx dashed #ddd;
- border-radius: 30rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- background-color: #f9f9f9;
- box-sizing: border-box;
- }
- .price-picker-container {
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 20rpx 0;
- }
- // 快速操作按钮样式
- .quick-actions {
- display: flex;
- justify-content: center;
- gap: 16rpx;
- margin: 16rpx 0;
- width: 100%;
- max-width: 800rpx;
- }
- .quick-btn {
- flex: 1;
- border-radius: 12rpx;
- font-size: 36rpx;
- padding: 20rpx 0;
- min-width: 0;
- text-align: center;
- color: #ffffff;
- font-weight: 600;
- transition: all 0.3s ease;
- box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
- cursor: pointer;
- }
- .quick-btn.increase {
- background-color: #e6f7ed;
- color: #00b42a;
- }
- .quick-btn.decrease {
- background-color: #fff1f0;
- color: #f53f3f;
- }
- .quick-btn:hover {
- opacity: 0.9;
- transform: translateY(-2rpx);
- box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.15);
- }
- // 数字选择器容器
- .number-box-container {
- display: flex;
- align-items: center;
- gap: 16rpx;
- margin: 20rpx 0;
- width: 100%;
- justify-content: center;
- white-space: nowrap;
- }
- // 价格输入框盒子
- .price-input-box {
- flex: 1;
- max-width: 800rpx;
- background-color: #f5f7fa;
- border: 2rpx solid #e5e7eb;
- border-radius: 12rpx;
- padding: 20rpx 24rpx;
- box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
- display: flex;
- align-items: center;
- justify-content: space-between;
- white-space: nowrap;
- min-width: 300rpx;
- }
- // 价格标签样式
- .price-label {
- font-size: 36rpx;
- color: map-get($colors, text-primary);
- font-weight: 700;
- min-width: 120rpx;
- flex-shrink: 0;
- margin-right: 16rpx;
- letter-spacing: 1rpx;
- font-family: map-get($font, family);
- }
- // 价格输入框样式
- .price-input {
- width: 100%;
- height: auto;
- border: none;
- outline: none;
- background-color: transparent;
- text-align: right;
- font-size: 48rpx;
- font-weight: 600;
- color: map-get($colors, text-primary);
- padding: 0 10rpx;
- box-sizing: border-box;
- -webkit-appearance: none;
- -moz-appearance: textfield;
- /* 使用等宽字体显示带斜线的0 */
- font-family: Consolas, 'Courier New', monospace, -apple-system, BlinkMacSystemFont;
- }
- // 移除数字输入框的上下箭头
- .price-input::-webkit-inner-spin-button,
- .price-input::-webkit-outer-spin-button {
- -webkit-appearance: none;
- margin: 0;
- }
- .price-input:focus {
- background-color: transparent;
- }
- </style>
|