Просмотр исходного кода

回滚商品创建和详情页代码

lishanshan 8 месяцев назад
Родитель
Сommit
12120045fb
4 измененных файлов с 3643 добавлено и 1946 удалено
  1. 1978 0
      pages/product/creatProduct update.vue
  2. 744 1449
      pages/product/creatProduct.vue
  3. 656 0
      pages/product/details update.vue
  4. 265 497
      pages/product/details.vue

+ 1978 - 0
pages/product/creatProduct update.vue

@@ -0,0 +1,1978 @@
+<template>
+	<view class="creat">
+		<view class="top"></view>
+		<view class="head">
+			<span class="cuIcon-back" @click="back"></span>
+			<view class="case">
+				{{ productId ? '编辑商品' : '创建商品' }}
+			</view>
+		</view>
+		<view class="content">
+			<!-- 第一步 -->
+			<view class="form" v-show="schedule == 1">
+				<view class="item">
+					<view class="titl">
+						商品信息
+					</view>
+				</view>
+				<!-- <view class="titl">
+					商品信息
+				</view> -->
+				<view class="item">
+					<view class="label">
+						商品名称<span v-if="tabIndex == '0'">*</span>
+					</view>
+					<view class="picker">
+						<u-input :disabled="tabIndex == 1" v-model="form.productName" placeholder="请输入" />
+					</view>
+				</view>
+				<view class="item">
+					<view class="label">
+						商品分类<span v-if="tabIndex == '0'">*</span>
+					</view>
+					<view class="picker" @click="selectProductType">
+						<span v-if="showText == ''">请选择</span>
+						<span v-else style="color: #333333;">{{ showText }}</span>
+						<u-icon name="arrow-right"></u-icon>
+					</view>
+				</view>
+				<!-- <u-form-item label="车辆类型" prop="categoryName" borderBottom required
+						@click="showcategory = true">
+						<u--input v-model="userInfo.categoryName" disabled disabledColor="#ffffff" placeholder="请选择车辆类型"
+							border="none"></u--input>
+						<u-icon slot="right" name="arrow-right"></u-icon>
+					</u-form-item> -->
+				<view class="item">
+					<view class="label">
+						商品分组
+						<!-- <span v-if="tabIndex == '0'">*</span> -->
+					</view>
+					<view class="picker" @click="selectGrouping">
+						<span v-if="form.groupingName == ''">请选择</span>
+						<span v-else style="color: #333333;">{{ form.groupingName }}</span>
+						<u-icon name="arrow-right"></u-icon>
+					</view>
+				</view>
+				<view class="item upload">
+					<view class="label">
+						商品封面图<span v-if="tabIndex == '0'">*</span>
+					</view>
+					<!-- <view class="tips">
+						支持jpg、png格式
+					</view> -->
+					<view class="tips">
+						建议尺寸750*750或750*1000,大小在2M以内,最多上传5张
+					</view>
+					<view v-if="tabIndex == 1">
+						<image v-for="(val, index) in fmImageList" :key="index" :src="val.url" mode=""
+							style="width: 140rpx;height:140rpx;border-radius: 4px; border: 1px solid #ebecee;margin-right:20rpx;margin-bottom:10rpx">
+						</image>
+					</view>
+					<u-upload v-else ref="uUpload" :action="action" :file-list="fmImageList" @on-success="handleSuccess"
+						@on-remove="handleRemove" max-count="5" width="140rpx" height="140rpx"></u-upload>
+				</view>
+				<view class="item upload">
+					<view class="label">
+						主图视频
+					</view>
+					<view class="tips">
+						上传视频时封面图片尺寸建议与商品图片一致
+					</view>
+					<view class="customize">
+						<view class="business-img">
+							<view class="uni-uploader__file" v-if="video">
+								<view class="uploader_video">
+									<uni-icons class="icon iconfont icon-cuo" type="trash-filled" size="20"
+										@tap="delectVideo"></uni-icons>
+									<video :src="video" class="video-container"></video>
+								</view>
+							</view>
+							<image v-if="tabIndex != '1' && !video" src="/static/store/upload2.png" mode="" @tap="chooseVideo()">
+							</image>
+						</view>
+						<!-- <view class="business-prompt">
+							最多上传1个视频,大小不超过50M,建议宽高比9:16
+						</view> -->
+					</view>
+				</view>
+				<view class="item upload">
+					<view class="label">
+						商品详情页<span v-if="tabIndex == '0'">*</span>
+					</view>
+					<!-- 引用富文本编辑器组件 -->
+					<Editor :readOnly="tabIndex == 1" :toolbarConfig="toolbarConfig" @init="onEditorInit" @input="onEditorInput"
+						@upinImage="handleEditorImageUpload" />
+				</view>
+				<view class="item upload" style="border: none;">
+					<view class="label">
+						搜索关键字<span v-if="tabIndex == '0'">*</span>
+					</view>
+					<view class="textareas">
+						<u-input :disabled="tabIndex == 1" v-model="form.searchKeywords" type="textarea" placeholder="请输入"
+							maxlength="500" />
+					</view>
+				</view>
+				<!-- <view class="item" v-if="form.categoryId != '1945013773786701826'">
+					<view class="label">
+						原价<span>*</span>
+					</view>
+					<view class="picker">
+						<u-input :disabled="tabIndex == 1" v-model="form.price" placeholder="输入商品原价" />
+					</view>
+					<view class="unit">
+						元
+					</view>
+				</view>
+				<view class="item" v-if="form.categoryId != '1945013773786701826'">
+					<view class="label">
+						实际售价<span>*</span>
+					</view>
+					<view class="picker">
+						<u-input type="num" :disabled="form.isUpdatePrice == 0" v-model="form.soldPrice" placeholder="输入客户实际支付价" />
+					</view>
+					<view class="unit">
+						元
+					</view>
+				</view>
+				<view class="item" v-if="form.categoryId != '1945013773786701826'">
+					<view class="label">
+						组合套餐
+					</view>
+					<view class="picker set" @click="goGroup">
+						去设置
+						<u-icon name="arrow-right" style="margin-left: 17rpx;"></u-icon>
+					</view>
+				</view> -->
+				<!-- 钣金喷漆 -->
+				<view class="spray" v-if="form.categoryId == '1945013773786701826'">
+					<view class="label" style="width: 100%;display: flex;justify-content: space-between;align-items: center;">
+						商品规格
+						<view class="change">
+							<span @click="allSelect">
+								<image src="/static/product/select.png" mode="" v-if="all"></image>
+								<image src="/static/product/round.png" mode="" v-else></image>
+								全选
+							</span>
+							<span @click="reverseSelsct">
+								<image src="/static/product/select.png" mode="" v-if="reverse"></image>
+								<image src="/static/product/round.png" mode="" v-else></image>
+								反选
+							</span>
+						</view>
+					</view>
+					<view class="spray_items">
+						<view class="spra" v-for="(item, index) in form.specItems" :key="item.craftId">
+							<view class="square" @click="select(item)">
+								<image src="/static/product/square_select.png" mode="" v-if="item.replaced == true"></image>
+								<image src="/static/product/square.png" mode="" v-else></image>
+							</view>
+							<view class="right">
+								<view class="name">
+									<!-- {{item.craftId}} -->
+									{{ item.partName }} {{ item.positionName }} {{ item.craftName }}
+								</view>
+								<view class="price">
+									<view class="option">原价<input v-model="item.price" placeholder="输入商品原价" style="height: 49rpx;" />
+									</view>
+									<view class="option">参考售价<input v-model="item.soldPrice" placeholder="输入商品参考售价" /></view>
+								</view>
+							</view>
+
+						</view>
+					</view>
+				</view>
+			</view>
+			<!-- 第二步 -->
+			<view class="form" v-show="schedule == 2">
+				<view class="item">
+					<view class="titl">
+						销售信息
+					</view>
+				</view>
+				<view class="item" v-if="form.categoryId != '1945013773786701826'">
+					<view class="label">
+						商品售价<span>*</span>
+					</view>
+					<view class="picker">
+						<u-input type="number" v-model.number="form.soldPrice" placeholder="请输入"
+							@blur="checkPriceAndSoldPrice('soldPrice')" />
+					</view>
+					<view class="unit">
+						元
+					</view>
+				</view>
+				<view class="item" v-if="form.categoryId != '1945013773786701826'">
+					<view class="label">
+						商品市场价<span>*</span>
+					</view>
+					<view class="picker">
+						<u-input type="number" v-model.number="form.price" placeholder="请输入"
+							@blur="checkPriceAndSoldPrice('price')" />
+					</view>
+					<view class="unit">
+						元
+					</view>
+				</view>
+				<view class="item_tips">
+					划线价格
+				</view>
+				<view class="item">
+					<view class="label">
+						虚拟销量
+					</view>
+					<view class="picker">
+						<u-input type="num" :disabled="tabIndex == 1" v-model="form.virtualSales" placeholder="请输入" />
+					</view>
+				</view>
+				<view class="item_tips">
+					实际销量大于虚拟销量时,系统自动切换为真实销量展示
+				</view>
+				<view class="item upload">
+					<view class="label">
+						售卖时间<span v-if="tabIndex == '1'">*</span>
+					</view>
+					<view>
+						<u-radio-group v-model="form.sellingTimeType"
+							style="width: 100%;background-color: #ffffff;padding: 16rpx 0;border-radius: 16rpx;">
+							<u-radio name="1" style="width: 100%;">
+								<view>
+									不限制
+								</view>
+							</u-radio>
+							<u-radio name="2" style="width: 100%;margin-top: 16rpx;">
+								<span>
+									每天
+								</span>
+								<span v-if="form.sellingTimeType == '2'" style="margin-left: 26rpx;">
+									<u-button type="primary" size="mini" @click="selectSaleDate">添加时间</u-button>
+								</span>
+							</u-radio>
+							<!-- 每天售卖时间选择 -->
+							<uni-card v-show="form.sellingTimeType == '2' && form.sellingDay && form.sellingDay.length > 0"
+								:is-shadow="false" is-full style="border:1rpx solid #E5E5E5;margin-top: 16rpx;">
+								<view v-for="item, index in form.sellingDay" :key="index"
+									style="display: flex; justify-content: space-between;">
+									<span>{{ item[0] }}</span>
+									<span style="color: #dd524d;" @click="deleteTime(index)"><u-icon name="minus-circle-fill"
+											style="margin-left: 17rpx;"></u-icon></span>
+								</view>
+							</uni-card>
+							<u-radio name="3" style="width: 100%;margin-top: 16rpx;">
+								<span>
+									每周
+								</span>
+							</u-radio>
+						</u-radio-group>
+						<view class="item_tips saletime" v-show="form.sellingTimeType == '2' && form.sellingDay.length == 0">
+							请添加起止时间段
+						</view>
+						<!-- 每周售卖时间选择 -->
+						<uni-table v-show="form.sellingTimeType == '3'">
+							<!-- 表头 -->
+							<uni-tr class="table-header">
+								<uni-th width="200rpx" align="left"><u-checkbox v-model:checked="allChecked"
+										@change="handleAllCheckChange"></u-checkbox>工作日</uni-th>
+								<uni-th align="center">时间</uni-th>
+								<uni-th width="100rpx" align="center">操作</uni-th>
+							</uni-tr>
+							<!-- 数据行 -->
+							<uni-tr v-for="(item, index) in form.localProductSellingWeeks" :key="index" class="table-row">
+								<uni-td width="200rpx" align="left">
+									<u-checkbox v-model="item.checked"
+										@change="handleItemCheckChange($event, item, index)"></u-checkbox>{{
+											item.weekDay }}
+								</uni-td>
+								<uni-td align="left">
+									<view v-for="(date, timeIndex) in item.sellingStartTimeList" :key="timeIndex" class="item_weekTime">
+										<span>{{ date[0] }}</span>
+										<!-- <span>{{ date[0] ? date[0] + '-' + date[1] : '' }}</span> -->
+										<span v-show="date[0]" style="color: #dd524d;" @click="deleteWeekTime(item, timeIndex)">
+											<u-icon name="minus-circle-fill" style="margin-left: 17rpx;"></u-icon>
+										</span>
+									</view>
+								</uni-td>
+								<uni-td width="100rpx" align="center">
+									<view class="uni-group">
+										<span style="color: #007aff;" @click="addWeekTime(item)"><u-icon
+												name="plus-circle-fill"></u-icon></span>
+									</view>
+								</uni-td>
+							</uni-tr>
+						</uni-table>
+						<view>
+						</view>
+					</view>
+				</view>
+				<view class="item">
+					<view class="label">
+						可用时间<span>*</span>
+					</view>
+					<view class="picker set">
+						<view class="picker set inp" @click="setUsable" v-if="showSellDate == ''">
+							<u-input placeholder="去设置" />
+							<u-icon name="arrow-right" style="margin-left: 17rpx;"></u-icon>
+						</view>
+						<view class="picker set inp" @click="setUsable" v-else>
+							<span style="color: #333333;">{{ showSellDate }}</span>
+							<u-icon name="arrow-right" style="margin-left: 17rpx;"></u-icon>
+						</view>
+					</view>
+				</view>
+				<view class="item">
+					<view class="label">
+						预约规则<span>*</span>
+					</view>
+					<view class="picker set">
+						<u-checkbox v-model="makeChecked" style="margin-left:8rpx;" size="24"><span
+								style="font-size: 26rpx;line-height: 28px;">用户需要提前预约</span></u-checkbox>
+					</view>
+				</view>
+				<view class="item upload" style="border: none;">
+					<view class="label" style="margin-bottom: 8rpx;">
+						服务说明<span>*</span>
+					</view>
+					<uni-data-checkbox multiple v-model="form.serviceDescription"
+						:localdata="optionsDescription"></uni-data-checkbox>
+				</view>
+				<!-- <view class="form" style="margin-bottom: 24rpx;">
+					<view class="titl ">
+						下单奖励
+					</view>
+					<view class="prompt">提示:金豆或积分余额不足时,将自动关闭奖励,不影响商品状态</view>
+					<view class="item" style="border:none;margin-bottom:0">
+						<view class="label">
+							金豆奖励
+						</view>
+						<view class="picker set">
+							<u-switch v-model="jindouChecked" :disabled="tabIndex == 1" style="margin-left:8rpx;" size="28"
+								@change="e => e == false ? form.goldAward = '' : ''"></u-switch>
+						</view>
+					</view>
+					<view style="border:none;" v-if="jindouChecked">
+						<view class="exchange-input">
+							<input type="digit" v-model.number="form.goldAward"
+								@input="e => form.goldAward = e.detail.value ? e.detail.value.replace(/[^\d]/g, '') : ''"
+								placeholder="请输入金豆奖励数量" placeholder-class="input-placeholder" />
+							<text class="exchange-all">个金豆</text>
+						</view>
+					</view>
+					<view class="item" style="border:none;">
+						<view class="label">
+							积分奖励
+						</view>
+						<view class="picker set">
+							<u-switch v-model="jifenChecked" :disabled="tabIndex == 1" style="margin-left:8rpx;" size="28"
+								@change="e => e == false ? form.integralAward = '' : ''"></u-switch>
+						</view>
+					</view>
+					<view style="border:none;" v-if="jifenChecked">
+						<view class="exchange-input">
+							<input type="digit" v-model.number="form.integralAward"
+								@input="e => form.integralAward = e.detail.value ? e.detail.value.replace(/[^\d]/g, '') : ''"
+								placeholder="请输入积分奖励数量" placeholder-class="input-placeholder" />
+							<text class="exchange-all">个积分</text>
+						</view>
+					</view>
+				</view> -->
+				<!-- <view class="form">
+					<view class="titl ">
+						售卖/使用信息
+					</view>
+					<view class="item">
+						<view class="label">
+							售卖时间<span>*</span>
+						</view>
+						<view class="picker set inp" @click="selectDate">
+							<u-input :disabled="tabIndex == 1" placeholder="去设置" v-model="showDate" @click="selectDate" />
+							<u-icon name="arrow-right" style="margin-left: 17rpx;"></u-icon>
+						</view>
+					</view>
+					<view class="item">
+						<view class="label">
+							库存<span>*</span>
+						</view>
+						<view class="picker set">
+							<u-input type="number" v-model="form.stockQuantity" placeholder="输入库存数量" />
+						</view>
+					</view>
+				
+				
+					<view class="item">
+						<view class="label">
+							退款规则<span>*</span>
+						</view>
+						<view class="picker set" @click="tabIndex == 0 ? isRefund = true : ''">
+							<view class="" v-if="showRule" style="color: #333333;">
+								{{ showRule }}
+							</view>
+							<view class="" v-else>
+								请选择
+								<u-icon name="arrow-right" style="margin-left: 17rpx;"></u-icon>
+							</view>
+						</view>
+					</view>
+<view class="item upload">
+						<view class="label">
+							使用说明
+						</view>
+						<view class="textarea">
+							<u-input v-model="form.instructions" :disabled="tabIndex == 1" type="textarea" placeholder="请输入"
+								maxlength="500" />
+						</view>
+						<view class="num">
+							<span v-if="form.instructions">{{ form.instructions.length > 0 ? form.instructions.length : '0'
+							}}</span>/500
+						</view>
+					</view>
+				</view> -->
+			</view>
+		</view>
+		<view class="btn">
+			<view class="next" @click="next" v-if="schedule == 1">
+				下一步
+			</view>
+			<view class="handle" v-else>
+				<view class="back" @click="schedule -= 1">
+					上一步
+				</view>
+				<view class="submit" @click="submit">
+					提交审核
+				</view>
+			</view>
+		</view>
+		<rangTime ref="rangTime" :mode="mode" @onSubmit="onEndTimeChange" :title="timeTitle" />
+		<rangTime ref="rangSaleTime" :mode="mode" @onSubmit="onSaleTimeChange" :title="timeTitle" />
+		<rangTime ref="rangWeekTime" :mode="mode" @onSubmit="onWeekTimeChange" :title="timeTitle" />
+		<!-- <refund v-show="isRefund" :Confirm="form.refundConfirm" :Label="form.refundLabel" @confirm="saveFound"
+			@close="cutRule" /> -->
+		<view class="popup" v-if="isSelectType">
+			<view class="model">
+				<view class="title">
+					商品品类
+					<image src="/static/index/cut.png" mode="" @click="closePopup"></image>
+				</view>
+				<view class="tree">
+					<view class="left">
+						<view class="item" :class="currentLeft == index ? 'active' : ''" v-for="(item, index) in treeLeft"
+							:key="item.id" @click="selectLeft(item, index)">
+							{{ item.name }}
+						</view>
+					</view>
+					<view class="left border">
+						<view class="item" :class="currentCenter == index ? 'active' : ''" v-for="(item, index) in treeCenter"
+							:key="item.id" @click="selectRight(item, index)">
+							{{ item.name }}
+						</view>
+					</view>
+					<view class="left">
+						<view class="item" :class="currentRight == index ? 'active' : ''" v-for="(item, index) in treeRight"
+							:key="item.id" @click="selectLast(item, index)">
+							{{ item.name }}
+						</view>
+					</view>
+				</view>
+				<view class="sub">
+					<view class="submit" @click="selectType">
+						确定
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 商品分组 -->
+		<u-select v-model="showGroupPicker" mode="single-column" label-name="name" value-name="id" :list="groupOptions"
+			@confirm="groupConfirm($event)" @cancel="showGroupPicker = false"></u-select>
+	</view>
+</template>
+
+<script>
+import rangTime from '../../components/dengrq-datetime-picker/dateSelector/index.vue'
+import refund from '@/components/product/refund.vue'
+import configService from '../../common/service/config.service'
+import Editor from '@/uni_modules/sp-editor/components/sp-editor/sp-editor.vue';
+import {
+	nextTick
+} from "vue"
+export default {
+	components: {
+		rangTime,
+		refund,
+		Editor
+	},
+	data() {
+		return {
+			toolbarConfig: {
+				excludeKeys: ['header', 'lineHeight', 'letterSpacing', 'marginTop', 'export', 'marginBottom', 'fontFamily', 'indentDec', 'indentInc', 'scriptSub', 'scriptSuper', 'direction', 'video', 'listCheck', 'divider', 'removeFormat'],
+			},
+			editorInitialized: false, // 标记编辑器是否已初始化
+			pendingRichText: '', // 存储待设置的富文本内容
+			editorCtx: null, // 编辑器上下文
+			video: '',
+			tabIndex: '0',
+			mode: 5,
+			allChecked: false,
+			form: {
+				instructions: '',
+				preBook: 0,
+				merchantId: null,
+				groupingId: '',
+				groupingName: '',
+				searchKeywords: '',
+				saleTime: '',
+				virtualSales: '',
+				sellingTimeType: '',
+				serviceDescription: ["期限", "范围‌"],
+				richText: '',
+				// 为"每天"选项添加单独的时间段数组
+				sellingDay: [],
+				localProductSellingWeeks: []
+				// categoryId:'',
+				// productName: '',
+				// productImage: '',
+				// checked: null,
+				// num: 0,
+				// refundLabel:null,
+				// refundConfirm:null
+			},
+			optionsSaleTime: [
+				{
+					text: '不限制',
+					value: '1'
+				},
+				{
+					text: '每天',
+					value: '2'
+				}
+			],
+			optionsDescription: [
+				{
+					text: '期限',
+					value: '期限'
+				},
+				{
+					text: '范围‌',
+					value: '范围‌'
+				}
+			],
+			fmImageList: [], //封面图回显
+			xqImage: [], //详情图回显
+			showRule: '', //显示退款规则文字
+			action: configService.apiUrl + '/sys/common/upload', //图片上传地址
+			// action: 'http://192.168.0.36:8080/jeecg-boot/sys/common/upload', //图片上传地址
+			schedule: 1, //进度
+			fileList: [],
+			selectedTime: null,
+			isSelectDate: false,
+			isRefund: false,
+			isSelectType: false,
+			treeLeft: [], //一级列表
+			treeCenter: [], //二级列表
+			treeRight: [], //三级列表
+			currentLeft: 0, //一级选中
+			currentCenter: 0, //二级选中
+			currentRight: 0, //三级选中
+			productType: [], //选中的商品分类id
+			selectTypeList: [], //选中的商品分类名称
+			showText: '',
+			showDate: '',
+			showSellDate: '',
+			makeChecked: false,
+			// imageHttp: 'http://192.168.0.36:8080/jeecg-boot/', //上传图片前缀+
+			imageHttp: configService.apiUrl + '/', //上传图片前缀+
+			productId: '',
+			jindouChecked: false,
+			jifenChecked: false,
+			selectVaule: 0, //钣金喷漆选择
+			all: false, //是否全选
+			reverse: false, //是否反选
+			selectProductSunItem: [],
+			timeTitle: '选择售卖时间',
+			// 商品分组列表
+			showGroupPicker: false,
+			groupOptions: [],
+			// 为"每周"选项添加单独的时间段数组
+			localProductSellingWeeks: [
+				{
+					weekDay: '周一',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周二',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周三',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周四',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周五',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周六',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周日',
+					sellingStartTimeList: [],
+					checked: false
+				}
+			]
+		}
+	},
+	methods: {
+		//全选
+		allSelect() {
+			this.all = true
+			this.reverse = false
+			this.form.specItems.forEach(item => {
+				item.replaced = true
+			})
+		},
+		//反选
+		reverseSelsct() {
+			this.reverse = true
+			this.all = false
+			this.form.specItems.forEach(item => {
+				item.replaced = !item.replaced
+			})
+		},
+		//选中
+		select(item) {
+			item.replaced = !item.replaced
+			// const index = this.form.specItems.findIndex(i => i.id === item.id);
+			// if (index !== -1) {
+			// 	this.form.specItems.splice(index, 1, {
+			// 		...item,
+			// 		replaced: !item.replaced
+			// 	});
+			// }
+		},
+
+		// 上传封面图成功回调
+		handleSuccess(res, index, lists) {
+			try {
+				// 更新fmImageList为最新的列表(由u-upload组件维护)
+				this.fmImageList = lists;
+
+				// 处理图片列表,生成URL字符串
+				let temp = [];
+				lists.forEach(item => {
+					if (item.response && item.response.message) {
+						temp.push(this.imageHttp + item.response.message);
+					} else if (item.url) {
+						// 处理已存在的图片
+						temp.push(item.url);
+					}
+				});
+				// 将多张图片URL以逗号分隔拼接
+				this.form.productImage = temp.join(',');
+			} catch (error) {
+				uni.showToast({
+					title: '封面图更新失败',
+					icon: 'none'
+				});
+			}
+		},
+		// 移除封面图文件回调
+		handleRemove(index, lists) {
+			try {
+				// 更新fmImageList为最新的列表(由u-upload组件维护)
+				this.fmImageList = lists;
+
+				// 处理图片列表,生成URL字符串
+				let temp = [];
+				lists.forEach(item => {
+					if (item.response && item.response.message) {
+						temp.push(this.imageHttp + item.response.message);
+					} else if (item.url) {
+						// 处理已存在的图片
+						temp.push(item.url);
+					}
+				});
+				// 将多张图片URL以逗号分隔拼接
+				this.form.productImage = temp.join(',');
+			} catch (error) {
+				uni.showToast({
+					title: '封面图移除失败',
+					icon: 'none'
+				});
+			}
+		},
+
+		//上传详情图
+		detailsSuccess(res, index, lists) {
+			console.log(lists)
+			this.processImageList(lists);
+			this.xqImage = lists
+		},
+		detailsRemove(index, lists) {
+			this.xqImage = lists
+			this.processImageList(lists);
+		},
+		// 处理图片列表,生成URL字符串
+		processImageList(lists) {
+			let temp = [];
+			lists.forEach(item => {
+				if (item.response && item.response.message) {
+					temp.push(this.imageHttp + item.response.message);
+				} else if (item.url) {
+					// 处理已存在的图片
+					temp.push(item.url);
+				}
+			});
+			this.form.detailImages = temp.join(',');
+			console.log('当前图片URL字符串:', this.form.detailImages);
+		},
+		//下一步
+		next() {
+			let temp = []
+			if (this.form.specItems) {
+				this.form.specItems.forEach(item => {
+					// item.replaced = true
+					if (item.replaced) {
+						this.selectProductSunItem.push(item)
+					}
+				})
+				// this.form.specItems = temp
+			}
+
+			//基础信息必填提示
+			if (!this.form.productName) {
+				uni.showToast({
+					title: '请输入商品名称',
+					icon: 'none'
+				});
+				return
+			}
+			if (!this.form.categoryId) {
+				uni.showToast({
+					title: '请选择商品分类',
+					icon: 'none'
+				});
+				return
+			}
+			// if (this.tabIndex == '0' && !this.form.groupingId) {
+			// 	uni.showToast({
+			// 		title: '请选择商品分组',
+			// 		icon: 'none'
+			// 	});
+			// 	return
+			// }
+			if (!this.form.productImage) {
+				uni.showToast({
+					title: '请上传商品封面图',
+					icon: 'none'
+				});
+				return
+			}
+			if (this.tabIndex == '0' && !this.form.richText) {
+				uni.showToast({
+					title: '请完善商品详情页',
+					icon: 'none'
+				});
+				return
+			}
+			if (this.tabIndex == '0' && !this.form.searchKeywords) {
+				uni.showToast({
+					title: '请输入搜索关键字',
+					icon: 'none'
+				});
+				return
+			}
+			// if (!this.form.price && !this.form.categoryId == '1945013773786701826') {
+			// 	uni.showToast({
+			// 		title: '请输入商品原价',
+			// 		icon: 'none'
+			// 	});
+			// 	return
+			// }
+			// if (!this.form.soldPrice && !this.form.categoryId == '1945013773786701826') {
+			// 	uni.showToast({
+			// 		title: '请输入商品售价',
+			// 		icon: 'none'
+			// 	});
+			// 	return
+			// } else if (this.form.categoryId == '1945013773786701826' && this.selectProductSunItem.length == 0) {
+			// 	uni.showToast({
+			// 		title: '请选择最少一个配置',
+			// 		icon: 'none'
+			// 	});
+			// } else {
+			// 	this.schedule += 1
+			// }
+			this.schedule += 1
+		},
+		// 跳转至组合商品页
+		goGroup() {
+			// if(this.tabIndex==0){
+			uni.navigateTo({
+				url: '/pages/product/group'
+			})
+			// }
+
+		},
+		//返回
+		back() {
+			uni.navigateTo({
+				url: '/pages/product/index'
+			})
+		},
+		// 处理 confirm 事件,接收子组件传递的时间段数据
+		handleConfirm(time) {
+			this.selectedTime = time; // 保存时间段数据
+			this.isSelectDate = false
+		},
+		//隐藏弹窗
+		closeSelectDate() {
+			this.isSelectDate = false
+		},
+		//跳转至可用时间
+		setUsable() {
+			uni.navigateTo({
+				url: '/pages/product/usable'
+			})
+		},
+		// 更新时间
+		updateRangeTime() {
+			uni.getStorage({
+				key: 'smdate',
+				success: (res) => {
+					if (res.data.useType == 2) {
+						this.showSellDate = res.data.availableStartDate + '-' + res.data.availableEndDate
+						this.form.availableStartDate = res.data.availableStartDate
+						this.form.availableEndDate = res.data.availableEndDate
+						this.form.expirationDays = null
+						this.form.useType = 2
+					} else if (res.data.useType == 1) {
+						this.form.expirationDays = res.data.expirationDays
+						this.form.availableEndDate = null
+						this.form.availableStartDate = null
+						this.form.useType = 1
+						this.$nextTick(() => {
+							this.showSellDate = res.data.expirationDays + '天后失效'
+						});
+					} else if (res.data.useType == 3) {
+						this.form.useType = 3
+						this.showSellDate = '长期有效'
+					}
+
+				}
+			})
+		},
+		// 校验商品市场价必须大于商品售价
+		checkPriceAndSoldPrice(field) {
+			if ((field == 'price' && this.form.soldPrice) || (field == 'soldPrice' && this.form.price)) {
+				if (this.form.price <= this.form.soldPrice) {
+					uni.showToast({
+						title: '商品市场价必须大于商品售价',
+						icon: 'none',
+						duration: 2000
+					});
+					this.$nextTick(() => {
+						this.form[field] = '';
+					});
+				}
+			}
+		},
+		// 保存退款规则
+		saveFound(rules) {
+			this.form.refundConfirm = rules.refundConfirm.refundConfirm
+			this.form.refundLabel = rules.refundLabel.refundLabel
+			let value1 = []
+			value1.push(rules.refundConfirm.name, rules.refundLabel.name)
+			this.showRule = value1.join("·")
+			// this.selectedRules = rules; 
+			this.isRefund = false
+		},
+		cutRule() {
+			this.isRefund = false
+		},
+		//获取商品分类一级列表
+		getLeftTree() {
+			this.$http.get("/sys/category/childList?pid=" + '1889836358116098050', {}).then(res => {
+				if (res.data.code == 0) {
+					this.treeLeft = res.data.result
+					if (this.treeLeft[0]) {
+						this.getCenterTree(this.treeLeft[0].id)
+					}
+				}
+			})
+		},
+		//获取商品分类二级列表
+		getCenterTree(id) {
+			this.$http.get("/sys/category/childList?pid=" + id, {}).then(res => {
+				if (res.data.code == 0) {
+					this.treeCenter = res.data.result
+					if (this.treeCenter[0]) {
+						// this.getRightTree(this.treeCenter[0].id)
+					}
+				}
+			})
+		},
+		//获取商品分类三级列表
+		getRightTree(id) {
+			this.$http.get("/sys/category/childList?pid=" + id, {}).then(res => {
+				if (res.data.code == 0) {
+					this.treeRight = res.data.result
+				}
+			})
+		},
+		selectProductType() {
+			if (this.tabIndex == '0') {
+				this.isSelectType = true
+				this.showText = ''
+				this.productType = []
+				this.selectTypeList = []
+				this.currentLeft = null
+				this.currentCenter = null
+				this.currentRight = null
+			}
+
+		},
+		selectGrouping() {
+			if (this.tabIndex == '0') {
+				this.showGroupPicker = true
+			}
+		},
+		//选中一级
+		selectLeft(item, index) {
+			this.currentLeft = index
+			this.currentCenter = null
+			this.currentRight = null
+			this.treeCenter = []
+			this.treeRight = []
+			this.productType = []
+			this.selectTypeList = []
+			this.productType.push(item.id)
+			this.selectTypeList.push(item.name)
+			this.getCenterTree(item.id)
+		},
+		//选中二级
+		selectRight(item, index) {
+			this.getRightTree(this.treeCenter[0].id)
+			this.currentCenter = index
+			this.currentRight = null
+			if (this.selectTypeList.length >= 2) {
+				this.productType.splice(1, 2)
+				this.selectTypeList.splice(1, 2)
+			}
+			this.productType.push(item.id)
+			this.selectTypeList.push(item.name)
+			this.getRightTree(item.id)
+		},
+		//选中三级
+		selectLast(item, index) {
+			if (this.selectTypeList.length >= 3) {
+				this.productType.splice(2, 1)
+				this.selectTypeList.splice(2, 1)
+			}
+			this.productType.push(item.id)
+			this.selectTypeList.push(item.name)
+			this.currentRight = index
+		},
+		//确定分类
+		selectType() {
+			this.isSelectType = false
+			this.form.categoryId = this.productType.join(',')
+			this.showText = this.selectTypeList.join('·')
+		},
+		//关闭选择分类弹窗
+		closePopup() {
+			this.isSelectType = false
+		},
+		//获取商品分组列表
+		getProductGroup() {
+			this.$http.get("/localProductGrouping/localProductGrouping/getAppList?sourceType=1").then(res => {
+				if (res.data.success) {
+					this.groupOptions = res.data.result || []
+				}
+			})
+		},
+		// 确定分组
+		groupConfirm(e) {
+			this.form.groupingId = e[0].value
+			this.form.groupingName = e[0].label
+			this.showGroupPicker = false;
+		},
+		selectDate() {
+			// this.isSelectDate = true
+			this.$refs.rangTime.open()
+		},
+		onEndTimeChange(val) {
+			this.form.saleStartDate = val.startDate
+			this.form.saleEndDate = val.endDate
+			this.showDate = val.startDate + '-' + val.endDate
+			this.$forceUpdate(); // 强制刷新视图
+		},
+		// 选择售卖时间
+		selectSaleDate() {
+			this.$refs.rangSaleTime.open()
+		},
+		onSaleTimeChange(val) {
+			if (val && val.startDate && val.endDate) {
+				const timeRange = `${val.startDate}-${val.endDate}`;
+
+				// 检查是否已存在相同的时间范围
+				const isDuplicate = this.form.sellingDay.some(dayItem =>
+					dayItem[0] === timeRange
+				);
+
+				if (isDuplicate) {
+					// 已存在相同时间范围,提示用户
+					uni.showToast({
+						title: '该时间段已存在,请勿重复添加',
+						icon: 'none'
+					});
+				} else {
+					// 不存在重复,添加新的时间范围
+					this.form.sellingDay.push([timeRange]);
+					this.$forceUpdate(); // 强制刷新视图
+				}
+			}
+		},
+		deleteTime(index) {
+			this.form.sellingDay.splice(index, 1);
+			this.$forceUpdate(); // 强制刷新视图
+		},
+		// 选择每周售卖时间
+		// 全选/全不选处理
+		handleAllCheckChange(e) {
+			const checked = e.value;
+			if (!checked) {
+				// 显示确认提示框
+				uni.showModal({
+					title: '提示',
+					content: '取消全选将清空每周已添加的时间段,是否继续',
+					success: (res) => {
+						if (res.confirm) {
+							// 用户确认取消全选,清空时间段数据
+							this.allChecked = checked;
+							this.form.localProductSellingWeeks.forEach(item => {
+								item.checked = checked;
+								// 当取消全选时,清空所有时间段
+								if (!checked) {
+									item.sellingStartTimeList = [];
+								}
+							});
+						} else {
+							this.allChecked = true;
+						}
+					}
+				});
+			} else {
+				this.allChecked = checked;
+				this.form.localProductSellingWeeks.forEach(item => {
+					item.checked = checked;
+					// 当取消全选时,清空所有时间段
+					if (!checked) {
+						item.sellingStartTimeList = [];
+					}
+				});
+			}
+		},
+		// 单个复选框变化处理
+		handleItemCheckChange(e, row) {
+			// 获取最新的复选框状态
+			const isChecked = e.value;
+			// 判断如果checked状态是false,清空该行的sellingStartTimeList日期
+			if (!isChecked) {
+				// 确保sellingStartTimeList是响应式的
+				if (!row.sellingStartTimeList) {
+					this.$set(row, 'sellingStartTimeList', []);
+				} else {
+					// 清空数组,保持引用
+					row.sellingStartTimeList.splice(0, row.sellingStartTimeList.length);
+				}
+			}
+		},
+		// 每周添加时间
+		addWeekTime(item) {
+			// 判断如果当前行的checked状态是false,提示用户先勾选
+			if (!item.checked) {
+				uni.showToast({
+					title: '请先勾选当前行',
+					icon: 'none'
+				});
+				return; // 终止后续操作
+			}
+			this.addWeekDay = item.weekDay
+			this.$refs.rangWeekTime.open()
+		},
+		// 每周删除时间
+		deleteWeekTime(item, timeIndex) {
+			// 使用splice删除指定索引的时间段
+			item.sellingStartTimeList.splice(timeIndex, 1);
+			this.$forceUpdate(); // 强制刷新视图
+		},
+		onWeekTimeChange(val) {
+			if (val && val.startDate && val.endDate) {
+				const timeRange = `${val.startDate}-${val.endDate}`;
+
+				this.form.localProductSellingWeeks.forEach(item => {
+					if (item.weekDay == this.addWeekDay) {
+						// 检查是否已存在相同的时间范围
+						const isDuplicate = item.sellingStartTimeList.some(timeItem =>
+							timeItem[0] === timeRange
+						);
+
+						if (isDuplicate) {
+							// 已存在相同时间范围,提示用户
+							uni.showToast({
+								title: '该时间段已存在,请勿重复添加',
+								icon: 'none'
+							});
+						} else {
+							// 不存在重复,添加新的时间范围
+							item.sellingStartTimeList.push([timeRange]);
+						}
+					}
+				});
+			}
+			this.$forceUpdate(); // 强制刷新视图
+		},
+		//提交审核
+		submit() {
+			console.log(this.form)
+			this.form.specItems = this.selectProductSunItem
+			this.form.isApp = '1'
+			this.makeChecked ? this.form.preBook = 1 : this.form.preBook = 0
+			// if (!this.form.saleStartDate) {
+			// 	uni.showToast({
+			// 		title: '请设置售卖时间',
+			// 		icon: 'none'
+			// 	});
+			// 	return
+			// } else if (!this.form.stockQuantity) {
+			// 	uni.showToast({
+			// 		title: '请输入商品库存',
+			// 		icon: 'none'
+			// 	});
+			// 	return
+			// } else if (this.tabIndex != 1 && (this.form.refundConfirm == null || this.form.refundLabel == null)) {
+			// 	uni.showToast({
+			// 		title: '请选择退款标签',
+			// 		icon: 'none'
+			// 	});
+			// 	return
+			// }
+			if (!this.form.soldPrice) {
+				uni.showToast({
+					title: '请输入商品售价',
+					icon: 'none'
+				});
+				return
+			}
+			if (!this.form.price) {
+				uni.showToast({
+					title: '请输入商品市场价',
+					icon: 'none'
+				});
+				return
+			}
+			if (this.form.price <= this.form.soldPrice) {
+				uni.showToast({
+					title: '商品市场价必须大于商品售价',
+					icon: 'none'
+				});
+				return
+			}
+			if (this.tabIndex == '1' && !this.form.sellingTimeType) {
+				uni.showToast({
+					title: '请选择售卖时间',
+					icon: 'none'
+				});
+				return
+			}
+			if (this.tabIndex == '1' && this.form.sellingTimeType == '2' && !this.form.sellingDay.length) {
+				uni.showToast({
+					title: '请添加售卖时间段',
+					icon: 'none'
+				});
+				return
+			}
+			if (!this.form.useType) {
+				uni.showToast({
+					title: '请选择可用时间',
+					icon: 'none'
+				});
+				return
+			}
+			if (this.form.serviceDescription.length == 0) {
+				uni.showToast({
+					title: '请选择服务说明',
+					icon: 'none'
+				});
+				return
+			} else {
+				if (this.form.sellingTimeType == '3') {
+					this.form.sellingDay = []
+				} else if (this.form.sellingTimeType == '2') {
+					this.form.localProductSellingWeeks = []
+				}
+				if (this.productId == '') {
+					this.$http.post("/app/product/add", this.form).then(res => {
+						if (res.data.code == 200) {
+							uni.showToast({
+								title: '添加成功',
+								icon: 'none'
+							});
+							this.back()
+							uni.removeStorage({
+								key: 'smdate',
+							});
+							uni.removeStorage({
+								key: 'group',
+							});
+						} else {
+							uni.showToast({
+								title: res.data.message,
+								icon: 'none'
+							});
+						}
+
+
+					})
+				} else {
+					this.form.productId = this.productId
+					console.log(this.formState);
+					this.$http.post("/app/product/edit", this.form).then(res => {
+						if (res.data.code == 200) {
+							uni.showToast({
+								title: '编辑成功',
+								icon: 'none'
+							});
+							this.back()
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: res.data.message
+							})
+						}
+						uni.removeStorage({
+							key: 'smdate',
+						});
+						uni.removeStorage({
+							key: 'group',
+						});
+
+					})
+				}
+
+			}
+		},
+		//回显数据
+		getForm() {
+			this.$http.post("/app/product/queryByIdNew", {
+				id: this.productId,
+				isApp: '1'
+			}).then(res => {
+				if (res.data.code == 200) {
+					this.form = res.data.result
+
+					this.jifenChecked = res.data.result.integralAward ? true : false
+					this.jindouChecked = res.data.result.goldAward ? true : false
+					this.showText = res.data.result.productCategory
+					// 处理封面图,支持多张图片
+					if (res.data.result.productImage) {
+						let productImages = res.data.result.productImage.split(',');
+						productImages.forEach(imageUrl => {
+							if (imageUrl.trim()) { // 过滤空字符串
+								this.fmImageList.push({
+									url: imageUrl
+								});
+							}
+						});
+					}
+					if (res.data.result.detailImages) {
+						let xqtemp = []
+						xqtemp = res.data.result.detailImages.split(',')
+						xqtemp.map(item => {
+							this.xqImage.push({
+								url: item
+							})
+						})
+						console.log(this.xqImage)
+					}
+
+					// this.showDate = res.data.result.saleStartDate.slice(0, 10) + '-' + res.data.result.saleEndDate.slice(0,
+					// 	10)
+					if (res.data.result.useType == 2) {
+						this.showSellDate = res.data.result.availableStartDate.slice(0, 10) + '-' + res.data.result
+							.availableEndDate.slice(0, 10)
+					} else if (res.data.result.useType == 1) {
+						this.showSellDate = res.data.result.expirationDays + '天后失效'
+					} else if (res.data.result.useType == 3) {
+						this.showSellDate = '长期有效'
+					}
+					res.data.result.preBook == 0 ? this.makeChecked = false : this.makeChecked = true
+					if (res.data.result.refundLabelName && res.data.result.refundConfirmName) {
+						this.showRule = res.data.result.refundLabelName + '·' + res.data.result.refundConfirmName
+					}
+					// 兼容旧数据
+					this.video = res.data.result.video || ''
+					if (!res.data.result.sellingDay) {
+						this.form.sellingDay = []
+					}
+					if (!res.data.result.localProductSellingWeeks) {
+						this.form.localProductSellingWeeks = this.localProductSellingWeeks
+					}
+					if (!res.data.result.serviceDescription) {
+						this.form.serviceDescription = ["期限", "范围‌"]
+					}
+					// 初始化编辑器内容
+					if (res.data.result.richText) {
+						this.form.richText = res.data.result.richText || ''
+						this.setEditorContent(this.form.richText)
+					}
+					uni.setStorage({
+						key: 'group',
+						data: res.data.result.productGroups
+					})
+				}
+			})
+		},
+		delectVideo() {
+			uni.showModal({
+				title: "提示",
+				content: "是否要删除此视频",
+				success: (res) => {
+					if (res.confirm) {
+						this.video = ''
+					}
+				}
+			})
+		},
+		chooseVideo() {
+			// 上传视频
+			console.log('上传视频')
+			uni.chooseVideo({
+				sourceType: ['camera', 'album'],
+				success: (res) => {
+					this.video = res.tempFilePath;
+					this.form.video = res.tempFilePath;
+				}
+			})
+		},
+		// 编辑器初始化完成时触发
+		onEditorInit(editorCtx, editorId) {
+			this.editorCtx = editorCtx // 保存编辑器上下文
+			this.editorId = editorId   // 保存编辑器ID
+			this.editorInitialized = true // 标记编辑器已初始化
+			console.log('编辑器初始化完成')
+
+			// 如果有待设置的内容,现在设置它
+			if (this.pendingRichText) {
+				this.setEditorContent(this.pendingRichText)
+				this.pendingRichText = '' // 清空待设置内容
+			}
+		},
+		// 设置编辑器内容
+		setEditorContent(content) {
+			if (!this.editorInitialized || !this.editorCtx) {
+				// 如果编辑器未初始化,存储内容等待初始化完成
+				this.pendingRichText = content
+				return
+			}
+
+			this.$nextTick(() => {
+				this.editorCtx.setContents({
+					html: content
+				})
+			})
+		},
+		// 实时获取富文本内容
+		onEditorInput(e) {
+			this.form.richText = e.html
+		},
+		// 处理编辑器图片上传
+		handleEditorImageUpload(tempFiles, editorCtx, editorId) {
+			const file = tempFiles[0]
+			const uploadTask = uni.uploadFile({
+				url: configService.apiUrl + '/sys/common/upload', // 上传接口地址
+				filePath: file.path,
+				name: 'file', // 服务器接收的字段名
+				success: (res) => {
+					try {
+						const data = JSON.parse(res.data)
+						if (data.message) {
+							// 假设服务器返回的图片URL在data.url字段
+							const imageUrl = this.imageHttp + data.message
+							// 插入图片到编辑器
+							editorCtx.insertImage({
+								src: imageUrl,
+								alt: '图片',
+								success: function () {
+									console.log('图片插入成功')
+								}
+							})
+						} else {
+							uni.showToast({
+								title: '图片上传失败',
+								icon: 'none'
+							})
+						}
+					} catch (e) {
+						uni.showToast({
+							title: '图片上传失败',
+							icon: 'none'
+						})
+					}
+				},
+				fail: (err) => {
+					console.error('图片上传失败', err)
+					uni.showToast({
+						title: '图片上传失败',
+						icon: 'none'
+					})
+				}
+			})
+		}
+	},
+	mounted() {
+		this.form.localProductSellingWeeks = this.localProductSellingWeeks
+		this.getProductGroup()
+		this.getLeftTree()
+		this.getForm()
+		this.updateRangeTime()
+	},
+	onLoad(options) {
+		if (options.productId) {
+			this.productId = options.productId
+		}
+		if (options.tabIndex) {
+			this.tabIndex = options.tabIndex
+		}
+	},
+	onShow() {
+		let that = this
+		uni.getStorage({
+			key: 'login_user_info',
+			success: function (res) {
+				that.form.merchantId = res.data.merchantId
+			}
+		})
+		that.updateRangeTime()
+		uni.getStorage({
+			key: 'group',
+			success: function (res) {
+				that.form.productGroups = res.data
+			}
+		})
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+.creat {
+	width: 100vw;
+	height: 100vh;
+	background: #F7F8FC;
+	display: flex;
+	flex-direction: column;
+	justify-content: space-between;
+
+	/*#ifdef APP-PLUS*/
+	.top {
+		width: 100%;
+		height: var(--status-bar-height);
+		background-color: #fff;
+	}
+
+	/*#endif*/
+	.head {
+		width: 100%;
+		height: 112rpx;
+		padding: 32rpx 24rpx;
+		display: flex;
+		align-items: center;
+		background-color: #fff;
+		position: relative;
+
+		.cuIcon-back {
+			font-size: 40rpx;
+			margin-right: 40rpx;
+		}
+
+		.case {
+			font-size: 36rpx;
+			font-weight: 600;
+			position: absolute;
+			top: 50%;
+			left: 50%;
+			transform: translate(-50%, -50%);
+		}
+
+		.step {
+			position: absolute;
+			right: 20rpx;
+		}
+	}
+
+	.content {
+		width: 100%;
+		flex: 1;
+		padding: 24rpx;
+		overflow-y: auto;
+
+		.prompt {
+			font-weight: 400;
+			font-size: 28rpx;
+			color: #999999;
+			// padding: 10rpx 0;
+			margin-bottom: 18rpx;
+		}
+
+		.titl {
+			width: 100%;
+			// height: 60rpx;
+			font-weight: 600;
+			font-size: 32rpx;
+			color: #333333;
+			margin-bottom: 16rpx;
+		}
+
+		.form {
+			background-color: #fff;
+			padding: 16rpx;
+			border-radius: 16rpx;
+
+			.item {
+				width: 100%;
+				height: 58rpx;
+				border-bottom: 1px solid #EEEEEE;
+				display: flex;
+				// align-items: center;
+				padding-bottom: 16rpx;
+				margin-bottom: 16rpx;
+
+				.label {
+					margin-right: 20rpx;
+					font-weight: 600;
+					font-size: 28rpx;
+					min-width: 126rpx;
+
+					span {
+						color: red;
+					}
+				}
+
+				.picker {
+					flex: 1;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					font-size: 28rpx;
+					color: #999999;
+				}
+
+				.set {
+					display: flex;
+					justify-content: flex-end;
+
+					::v-deep.u-input {
+						text-align: right !important;
+					}
+				}
+			}
+
+			.spray {
+				.label {
+					height: 57rpx;
+					margin-right: 20rpx;
+					font-weight: 600;
+					font-size: 28rpx;
+					min-width: 126rpx;
+					margin-bottom: 16rpx;
+
+					.change {
+						display: flex;
+						align-items: center;
+						font-weight: 400;
+
+						span {
+							display: flex;
+							align-items: center;
+							margin-left: 30rpx;
+
+						}
+
+						image {
+							width: 36rpx;
+							height: 36rpx;
+							font-size: 28rpx;
+							margin-right: 4rpx;
+						}
+					}
+				}
+
+				.spray_items {
+					.spra {
+						height: 106rpx;
+						margin-bottom: 32rpx;
+						display: flex;
+						align-items: start;
+
+						.square {
+							margin-right: 12rpx;
+
+							image {
+								width: 30rpx;
+								height: 40rpx;
+							}
+						}
+
+						.name {
+							display: flex;
+							font-size: 28rpx;
+							margin-bottom: 16rpx;
+						}
+
+						.price {
+							height: 49rpx;
+							display: flex;
+							justify-content: space-between;
+
+							.option {
+								display: flex;
+								align-items: center;
+								font-size: 26rpx;
+								color: #666666;
+
+								input {
+									height: 49rpx;
+									width: 160rpx;
+									background: #F7F8FC;
+									border-radius: 4rpx;
+									margin-left: 10rpx;
+									text-align: center;
+									font-size: 26rpx;
+									color: #666666;
+								}
+							}
+
+						}
+					}
+
+
+				}
+			}
+
+			.upload {
+				display: block;
+				height: auto;
+
+				.tips {
+					font-size: 20rpx;
+					color: #999999;
+					margin-bottom: 16rpx;
+					margin-top: 10rpx;
+				}
+			}
+
+			.textarea {
+				width: 100%;
+				height: 196rpx;
+				background: #F7F8FC;
+				border-radius: 4rpx;
+				padding: 12rpx 16rpx;
+				font-size: 26rpx;
+				margin-top: 12rpx;
+			}
+
+			.num {
+				width: 100%;
+				text-align: right;
+				font-size: 24rpx;
+				color: #999999;
+				margin-top: 6rpx;
+			}
+		}
+	}
+
+	.btn {
+		width: 100%;
+		height: 112rpx;
+		background-color: #fff;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+
+		.next {
+			width: 672rpx;
+			height: 76rpx;
+			border-radius: 54rpx;
+			border: 1px solid #449AFF;
+			margin: 0 auto;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			font-size: 28rpx;
+			color: #449AFF;
+		}
+
+		.handle {
+			width: 100%;
+			display: flex;
+			justify-content: space-around;
+
+			.back {
+				width: 205rpx;
+				height: 76rpx;
+				border-radius: 54rpx;
+				border: 1px solid #449AFF;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				font-size: 28rpx;
+				color: #449AFF;
+			}
+
+			.submit {
+				width: 443rpx;
+				height: 76rpx;
+				background: linear-gradient(90deg, #77B6FF 0%, #449AFF 100%);
+				border-radius: 53rpx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				font-size: 28rpx;
+				color: #FFFFFF;
+			}
+		}
+	}
+
+	.popup {
+		width: 100vw;
+		height: 100vh;
+		position: fixed;
+		top: 0;
+		left: 0;
+		background: rgba(0, 0, 0, 0.4);
+		display: flex;
+		align-items: flex-end;
+
+		z-index: 99;
+
+		.model {
+			width: 100%;
+			background-color: #fff;
+			border-radius: 20rpx 20rpx 0rpx 0rpx;
+			padding: 0rpx 24rpx;
+			padding-bottom: 20rpx;
+
+			.title {
+				width: 100%;
+				height: 86rpx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				border-bottom: 1px solid #EEEEEE;
+				position: relative;
+
+				image {
+					width: 40rpx;
+					height: 40rpx;
+					position: absolute;
+					right: 0px;
+				}
+			}
+
+			.tree {
+				display: flex;
+				height: 546rpx;
+
+				.left {
+					overflow-y: auto;
+
+					.item {
+						width: 224rpx;
+						height: 78rpx;
+						padding: 20rpx;
+						font-size: 26rpx;
+					}
+
+					.active {
+						background: rgba(68, 154, 255, 0.1);
+						color: #2983EC;
+					}
+				}
+
+				.border {
+					border-left: 1px solid #eeeeee;
+					border-right: 1px solid #eeeeee;
+				}
+			}
+
+			.sub {
+				display: flex;
+				justify-content: space-between;
+				margin-top: 16rpx;
+				border-top: 1px solid #eeeeee;
+				padding-top: 16rpx;
+
+				.submit {
+					width: 672rpx;
+					height: 76rpx;
+					background: linear-gradient(90deg, #77B6FF 0%, #449AFF 100%);
+					border-radius: 53rpx;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					font-size: 28rpx;
+					color: #FFFFFF;
+				}
+			}
+		}
+	}
+}
+
+::v-deep.u-upload__button {
+	width: 250rpx !important;
+	height: 250rpx !important;
+}
+
+.exchange-input {
+	display: flex;
+	justify-content: space-between;
+	height: 65rpx;
+	background: #F7F8FC;
+	border-radius: 12rpx;
+	margin-bottom: 20rpx;
+	padding: 20rpx;
+	font-size: 28rpx;
+	width: 100%;
+
+	.exchange-all {
+		color: #333333;
+		font-size: 28rpx;
+	}
+
+	input {
+		font-size: 28rpx;
+	}
+}
+
+.customize {
+	margin-bottom: 16rpx;
+	background-color: #ffffff;
+	border-radius: 16rpx;
+
+	.title {
+		padding: 18upx 0;
+		font-size: 28upx;
+		// padding: 10px;
+	}
+
+
+	.business-img {
+		height: 210upx;
+		width: 310upx;
+		background-size: cover;
+
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.uploader_video {
+		width: 310upx;
+		height: 210upx;
+	}
+
+	.video-container {
+		max-width: 100%;
+		/* 最大宽度为父容器宽度 */
+		max-height: 100%;
+
+		::v-deep.uni-video-bar {
+			height: 62upx;
+			padding: 0
+		}
+	}
+}
+
+.uni-uploader__file,
+.uploader_video {
+	position: relative;
+	z-index: 1;
+	width: 200upx;
+	height: 200upx;
+}
+
+.icon-cuo {
+	position: absolute;
+	right: 0;
+	top: 5upx;
+
+	color: #FFFFFF !important;
+	z-index: 999;
+	border-top-right-radius: 20upx;
+	border-bottom-left-radius: 20upx;
+}
+
+.business-prompt {
+	padding-top: 16upx;
+	font-size: 20upx;
+	color: #999999;
+}
+
+.item_tips {
+	font-size: 20rpx;
+	color: #999999;
+	margin-bottom: 16rpx;
+	margin-top: -15rpx;
+}
+
+.saletime {
+	padding-top: 10rpx;
+}
+
+/* 添加radio样式 */
+.radio-group {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+}
+
+::v-deep .uni-data-checklist .checklist-group {
+	display: flex;
+	flex-direction: column;
+	flex-wrap: wrap;
+}
+
+::v-deep .editor-container {
+	height: 260rpx;
+}
+
+::v-deep .uni-table-tr .checkbox {
+	padding: 0;
+	width: 30rpx;
+	// width: 24px; /* 可以根据需要调整宽度 */
+	// height: 24px; /* 保持宽高一致 */
+}
+
+::v-deep .uni-table-th[data-v-511e81f9] {
+	padding: 15rpx;
+}
+
+.item_weekTime {
+	display: flex;
+	justify-content: space-around;
+}
+
+.sellingTimeCard {
+	border: 1rpx solid #E5E5E5;
+	margin-top: 16rpx;
+}
+</style>

Разница между файлами не показана из-за своего большого размера
+ 744 - 1449
pages/product/creatProduct.vue


+ 656 - 0
pages/product/details update.vue

@@ -0,0 +1,656 @@
+<template>
+	<view class="details">
+		<view class="top"></view>
+		<view class="head">
+			<view class="head_left">
+				<span class="cuIcon-back" @click="back"></span>
+			</view>
+			<view class="case">
+				商品详情
+			</view>
+		</view>
+		<view class="center">
+			<view class="box">
+				<view class="title">
+					商品信息
+				</view>
+				<view class="data">
+					<span class="span">商品名称</span>{{ form.productName }}
+				</view>
+				<view class="data">
+					<span class="span">商品分类</span>{{ form.productCategory }}
+				</view>
+				<view class="data">
+					<span class="span">商品分组</span>{{ form.groupingName }}
+				</view>
+				<view class="img_box">
+					<span class="line">商品封面图</span>
+					<view class="img_list">
+						<view v-for="(val, index) in fmImageList" :key="index">
+							<view class="img">
+								<image :src="val.url" mode=""
+									style="width: 140rpx;height:140rpx;border-radius: 4px; border: 1px solid #ebecee;margin-right:20rpx;margin-bottom:10rpx">
+								</image>
+							</view>
+							<!-- <image v-for="(val, index) in fmImageList" :key="index" :src="form.productImage" mode=""></image> -->
+						</view>
+					</view>
+				</view>
+				<view class="img_box">
+					<span class="line">主图视频</span>
+					<view class="item upload">
+						<view class="customize">
+							<view class="business-img">
+								<view class="uni-uploader__file">
+									<view class="uploader_video" v-if="form.video">
+										<video :src="form.video" class="video-container"></video>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="img_box">
+					<span class="line">商品详情页</span>
+					<view class="img_list" v-if="!form.richText && detailImages">
+						<view class="img" v-for="(item, index) in detailImages" :key="index">
+							<image :src="item" mode=""></image>
+						</view>
+					</view>
+					<view class="item" v-if="form.richText">
+						<!-- 使用Editor组件代替rich-text -->
+						<Editor :readOnly="true" :toolbarConfig="toolbarConfig" @init="onEditorInit" />
+					</view>
+					<!-- <view class="item" v-if="form.richText">
+						<rich-text :nodes="form.richText"></rich-text>
+					</view> -->
+				</view>
+				<view class="data">
+					<span class="span">搜索关键字</span>{{ form.searchKeywords }}
+				</view>
+				<!-- <view class="data" v-if="form.categoryId != '1945013773786701826'">
+					<span class="span">原价</span>{{ form.price }}
+				</view>
+				<view class="data" v-if="form.categoryId != '1945013773786701826'">
+					<span class="span">实际售价</span>{{ form.soldPrice }}
+				</view> -->
+				<!-- 
+				<view class="particulars" v-if="form.categoryId != '1945013773786701826'">
+					组合套餐
+					<view class="content">
+						<view class="item" v-for="(item, index) in form.productGroups" :key="item.groupId">
+							<view class="item_title">
+								{{ item.groupName }}
+							</view>
+							<view class="item_row" v-for="(row, index) in item.singleProduct" :key="index">
+								<view class="name">{{ row.productName }} </view>
+								<view class="price">
+									{{ row.quantity }}{{ row.unit }}/{{ row.price }}元
+								</view>
+							</view>
+						</view>
+					</view>
+				</view> -->
+			</view>
+
+			<!-- <view class="box" v-if="form.categoryId == '1945013773786701826'">
+				<view class="span">
+					商品规格
+				</view>
+				<view class="spec">
+					<view class="spec_item" v-for="(item, index) in specItems" :key="item.id">
+						<view class="name">
+							{{ item.partName }} {{ item.positionName }} {{ item.craftName }}
+						</view>
+						<view class="price">
+							原价<span>{{ item.price }}</span>参考售价 <span>{{ item.soldPrice }}</span>
+						</view>
+
+					</view>
+				</view>
+
+			</view> -->
+			<view class="box rule">
+				<view class="title">
+					销售信息
+				</view>
+				<view class="data">
+					<span class="span">商品售价</span>{{ form.soldPrice }}元
+				</view>
+				<view class="data">
+					<span class="span">商品市场价</span>{{ form.price }}元
+				</view>
+				<view class="data">
+					<span class="span">虚拟销量</span>{{ form.virtualSales }}
+				</view>
+				<view>
+					<view class="data">
+						<span class="span">售卖时间</span>
+						<span v-if="form.sellingTimeType == '1'">不限制</span>
+						<span v-if="form.sellingTimeType == '2'">每天</span>
+						<span v-if="form.sellingTimeType == '3'">每周</span>
+					</view>
+					<!-- 每天售卖时间 -->
+					<view class="card_data" v-show="form.sellingTimeType == '2' && form.sellingDay && form.sellingDay.length > 0">
+						<uni-card :is-shadow="false" is-full style="border:1rpx solid #E5E5E5;">
+							<view v-for="item, index in form.sellingDay" :key="index" style="display: flex; justify-content: center;">
+								<view>{{ item[0] }}</view>
+							</view>
+						</uni-card>
+					</view>
+					<view class="card_data" v-show="form.sellingTimeType == '3'">
+						<!-- 每周售卖时间 -->
+						<uni-table v-show="form.sellingTimeType == '3'">
+							<!-- 表头 -->
+							<uni-tr class="table-header">
+								<uni-th width="200rpx" align="left"><u-checkbox disabled></u-checkbox>工作日</uni-th>
+								<uni-th align="center">时间</uni-th>
+							</uni-tr>
+							<!-- 数据行 -->
+							<uni-tr v-for="(item, index) in form.localProductSellingWeeks" :key="index" class="table-row">
+								<uni-td width="200rpx" align="left">
+									<u-checkbox v-model="item.checked" @change="handleItemCheckChange($event, item, index)"
+										disabled></u-checkbox>{{
+											item.weekDay }}
+								</uni-td>
+								<uni-td align="center">
+									<view v-for="(date, timeIndex) in item.sellingStartTimeList" :key="timeIndex" class="item_weekTime">
+										<span>{{ date[0] }}</span>
+										<!-- <span>{{ date[0] ? date[0] + '-' + date[1] : '' }}</span> -->
+									</view>
+								</uni-td>
+							</uni-tr>
+						</uni-table>
+					</view>
+				</view>
+				<!-- <view class="data">
+					<span class="span">库存</span>{{ form.stockQuantity }}
+				</view> -->
+				<view class="data">
+					<span class="span">可用时间</span>
+					<view v-if="form.useType == '3'">
+						长期有效
+					</view>
+					<view class="" v-if="form.useType == '1' && form.expirationDays">
+						购买后{{ form.expirationDays }}天失效
+					</view>
+					<view class="" v-if="form.useType == '2' && form.availableStartDate">
+						{{ form.availableStartDate.slice(0, 10) }} — {{ form.availableEndDate.slice(0, 10) }}
+					</view>
+				</view>
+				<view class="data">
+					<span class="span">预约规则</span>{{ form.preBook == 0 ? '不需要预约' : '用户需要提前预约' }}
+				</view>
+				<view class="data">
+					<span class="span">服务说明</span>
+					<view v-for="(item, index) in form.serviceDescription" :key="index">
+						<span class="span">{{ index + 1 + '.' + item }}</span>
+					</view>
+				</view>
+				<!-- <view class="data">
+					<span class="span">退款规则 </span>
+					<view class="ruler">
+						<view class="item">
+							{{ form.refundLabelName }}
+						</view>
+						<view class="item">
+							{{ form.refundConfirmName }}
+						</view>
+					</view>
+				</view> -->
+				<!-- <view class="img_box">
+					<span class="line">使用说明</span>
+					<view class="text_area">
+						{{ form.instructions }}
+					</view>
+				</view> -->
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+import Editor from '@/uni_modules/sp-editor/components/sp-editor/sp-editor.vue';
+
+export default {
+	components: {
+		Editor
+	},
+	data() {
+		return {
+			form: {},
+			detailImages: [],
+			oldPrice: 300,
+			price: 280,
+			ruleList: [],
+			productId: '',
+			imageHttp: 'http://192.168.0.36:8080/jeecg-boot/',
+			specItems: [],
+			fmImageList: [],
+			// 编辑器配置
+			toolbarConfig: {
+				keys: [], // 只读模式下不显示工具栏
+				excludeKeys: []
+			},
+			editorCtx: null, // 编辑器上下文
+			editorId: null,   // 编辑器ID
+			// 为"每周"选项添加单独的时间段数组
+			localProductSellingWeeks: [
+				{
+					weekDay: '周一',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周二',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周三',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周四',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周五',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周六',
+					sellingStartTimeList: [],
+					checked: false
+				},
+				{
+					weekDay: '周日',
+					sellingStartTimeList: [],
+					checked: false
+				}
+			]
+		}
+	},
+	methods: {
+		//返回
+		back() {
+			uni.navigateBack({
+				delta: 1
+			});
+		},
+		// 编辑器初始化完成时触发
+		onEditorInit(editorCtx, editorId) {
+			this.editorCtx = editorCtx // 保存编辑器上下文
+			this.editorId = editorId   // 保存编辑器ID
+			console.log('编辑器初始化完成')
+
+			// 初始化编辑器内容
+			if (this.form.richText) {
+				this.editorCtx.setContents({
+					html: this.form.richText
+				})
+			}
+		}
+	},
+	onLoad(options) {
+		this.productId = options.productId
+		this.$http.post("/app/product/queryByIdNew", {
+			id: this.productId,
+			isApp: '1'
+		}).then(res => {
+			if (res.data.code == 200) {
+				this.form = res.data.result
+				console.log(this.form)
+				if (res.data.result.detailImages) {
+					this.detailImages = res.data.result.detailImages.split(',')
+				}
+				this.form.groupingName = res.data.result.groupingName || ''
+				this.form.serviceDescription = res.data.result.serviceDescription || ["期限", "范围‌"]
+				if (!res.data.result.sellingDay) {
+					this.form.sellingDay = []
+				}
+				if (!res.data.result.localProductSellingWeeks) {
+					this.form.localProductSellingWeeks = this.localProductSellingWeeks
+				}
+				// 处理封面图,支持多张图片
+				if (res.data.result.productImage) {
+					let productImages = res.data.result.productImage.split(',');
+					productImages.forEach(imageUrl => {
+						if (imageUrl.trim()) { // 过滤空字符串
+							this.fmImageList.push({
+								url: imageUrl
+							});
+						}
+					});
+				}
+				if (this.form.specItems) {
+					this.form.specItems.forEach(item => {
+						if (item.replaced) {
+							this.specItems.push(item)
+						}
+					})
+				}
+
+				console.log(this.specItems)
+			}
+		})
+	},
+	onUnload() {
+		// 页面销毁前清空Storage中的'smdate'
+		uni.removeStorage({
+			key: 'smdate'
+		});
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+.details {
+	width: 100vw;
+	height: 100vh;
+	display: flex;
+	flex-direction: column;
+	overflow: hidden;
+	background: #F7F8FC;
+
+	/*#ifdef APP-PLUS*/
+	.top {
+		width: 100%;
+		height: var(--status-bar-height);
+		background-color: #fff;
+	}
+
+	/*#endif*/
+
+	.head {
+		width: 100%;
+		padding: 20rpx;
+		background-color: #fff;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		position: relative;
+
+		.head_left {
+			font-size: 40rpx;
+		}
+
+		.case {
+			position: absolute;
+			left: 50%;
+			top: 50%;
+			transform: translate(-50%, -50%);
+			font-size: 36rpx;
+			font-weight: 600;
+		}
+	}
+
+	.center {
+		flex: 1;
+		overflow-y: auto;
+		padding: 21rpx 24rpx;
+
+		.box {
+			width: 100%;
+			padding: 16rpx;
+			background-color: #fff;
+			border-radius: 16rpx;
+
+			.spec {
+				background: #FBFCFF;
+				border-radius: 8rpx;
+				padding: 16rpx;
+				margin-top: 16rpx;
+
+				.spec_item {
+					margin-bottom: 32rpx;
+
+					.name {
+						font-size: 28rpx;
+						margin-bottom: 16rpx;
+					}
+
+					.price {
+						font-size: 26rpx;
+						color: #666666;
+
+						span {
+							color: #333333;
+							margin-left: 20rpx;
+							margin-right: 30rpx;
+						}
+					}
+				}
+			}
+		}
+	}
+
+	.title {
+		width: 100%;
+		font-weight: 600;
+		margin-bottom: 32rpx;
+	}
+
+	.card_data {
+		border-bottom: 1px solid #EEEEEE;
+		padding-bottom: 16rpx;
+	}
+
+	.data {
+		min-height: 58rpx;
+		display: flex;
+		align-items: center;
+		border-bottom: 1px solid #EEEEEE;
+		padding-bottom: 16rpx;
+		margin-top: 16rpx;
+		font-size: 28rpx;
+
+		.span {
+			display: inline-block;
+			margin-right: 20rpx;
+			min-width: 112rpx;
+			font-size: 28rpx;
+			color: #666666;
+		}
+
+		.ruler {
+			display: flex;
+			align-items: center;
+
+			.item {
+				width: auto;
+				height: 44rpx;
+				padding: 0rpx 16rpx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				line-height: 28rpx;
+				color: #2983EC;
+				background: rgba(68, 154, 255, 0.1);
+				border-radius: 4rpx;
+				border: 1px solid #449AFF;
+				margin-right: 20rpx;
+			}
+		}
+	}
+
+	.img_box {
+		border-bottom: 1px solid #EEEEEE;
+		padding-bottom: 16rpx;
+
+		.line {
+			display: block;
+			font-size: 28rpx;
+			color: #666666;
+			margin: 16rpx 0px;
+		}
+
+		.img_list {
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: start;
+			// gap: 27rpx;
+
+			.img {
+				flex: 0 0 calc(25% - 27rpx);
+				height: 140rpx;
+				border-radius: 12rpx;
+				overflow: hidden;
+				margin-bottom: 25rpx;
+
+				image {
+					width: 140rpx;
+					height: 140rpx;
+				}
+			}
+		}
+	}
+
+	.particulars {
+		width: 100%;
+		margin-top: 20rpx;
+
+		.content {
+			width: 100%;
+			padding: 20rpx;
+			background: #F7F8FC;
+			border-radius: 8rpx;
+			margin-top: 16rpx;
+			padding-top: 0px;
+			overflow: hidden;
+
+			.item {
+				margin-top: 16rpx;
+
+				.item_title {
+					font-weight: 600;
+					font-size: 26rpx;
+				}
+
+				.item_row {
+					width: 100%;
+
+					.name {
+						font-size: 26rpx;
+						margin-top: 16rpx;
+						margin-bottom: 4rpx;
+						color: #333333;
+						line-height: 30rpx;
+					}
+
+					.price {
+						font-size: 24rpx;
+						color: #888888;
+						line-height: 28rpx;
+					}
+				}
+			}
+
+			.hint {
+				border-bottom: 1px solid #ccc;
+			}
+		}
+	}
+
+	.rule {
+		width: 100%;
+		background-color: #fff;
+		padding: 20rpx;
+		margin-top: 20rpx;
+
+		.headline {
+			font-weight: 600;
+		}
+
+		.rule_item {
+			display: flex;
+			margin-top: 20rpx;
+
+			.item {
+				padding: 10rpx 20rpx;
+				border: 1px solid #ccc;
+				margin-right: 20rpx;
+			}
+		}
+	}
+
+	.banner {
+		width: 95%;
+		margin: 20rpx auto;
+
+		image {
+			width: 100%;
+
+		}
+	}
+
+	.edit {
+		width: 100%;
+		height: 80rpx;
+		background-color: #fff;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+
+		span {
+			display: block;
+			width: 200rpx;
+			height: 60rpx;
+			border: 1px solid #ccc;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+		}
+	}
+}
+
+// video_style
+.customize {
+	margin-bottom: 16rpx;
+	background-color: #ffffff;
+	border-radius: 16rpx;
+
+	.business-img {
+		height: 210upx;
+		width: 310upx;
+		background-size: cover;
+
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.uploader_video {
+		width: 310upx;
+		height: 210upx;
+	}
+
+	.video-container {
+		max-width: 100%;
+		/* 最大宽度为父容器宽度 */
+		max-height: 100%;
+
+		::v-deep.uni-video-bar {
+			height: 62upx;
+			padding: 0
+		}
+	}
+}
+
+.uni-uploader__file,
+.uploader_video {
+	position: relative;
+	z-index: 1;
+	width: 200upx;
+	height: 200upx;
+}
+
+::v-deep .editor-container {
+	height: 260rpx;
+}
+</style>

+ 265 - 497
pages/product/details.vue

@@ -12,198 +12,116 @@
 		<view class="center">
 			<view class="box">
 				<view class="title">
-					商品信息
+					基本信息
 				</view>
 				<view class="data">
-					<span class="span">商品名称</span>{{ form.productName }}
+					<span class="span">商品分类</span>{{form.productCategory}}
 				</view>
 				<view class="data">
-					<span class="span">商品分类</span>{{ form.productCategory }}
+					<span class="span">商品名称</span>{{form.productName}}
 				</view>
 				<view class="data">
-					<span class="span">商品分组</span>{{ form.groupingName }}
+					<span class="span">商品分组</span>{{form.groupingName}}
 				</view>
 				<view class="img_box">
 					<span class="line">商品封面图</span>
 					<view class="img_list">
-						<view v-for="(val, index) in fmImageList" :key="index">
-							<view class="img">
-								<image :src="val.url" mode=""
-									style="width: 140rpx;height:140rpx;border-radius: 4px; border: 1px solid #ebecee;margin-right:20rpx;margin-bottom:10rpx">
-								</image>
-							</view>
-							<!-- <image v-for="(val, index) in fmImageList" :key="index" :src="form.productImage" mode=""></image> -->
-						</view>
-					</view>
-				</view>
-				<view class="img_box">
-					<span class="line">主图视频</span>
-					<view class="item upload">
-						<view class="customize">
-							<view class="business-img">
-								<view class="uni-uploader__file">
-									<view class="uploader_video" v-if="form.video">
-										<video :src="form.video" class="video-container"></video>
-									</view>
-								</view>
-							</view>
+						<view class="img">
+							<image :src="form.productImage" mode=""></image>
 						</view>
 					</view>
 				</view>
-				<view class="img_box">
-					<span class="line">商品详情页</span>
-					<view class="img_list" v-if="!form.richText && detailImages">
-						<view class="img" v-for="(item, index) in detailImages" :key="index">
+				<view class="img_box" v-if="detailImages">
+					<span class="line">商品详情图</span>
+					<view class="img_list">
+						<view class="img" v-for="(item,index) in detailImages" :key="index">
 							<image :src="item" mode=""></image>
 						</view>
 					</view>
-					<view class="item" v-if="form.richText">
-						<!-- 使用Editor组件代替rich-text -->
-						<Editor :readOnly="true" :toolbarConfig="toolbarConfig" @init="onEditorInit" />
-					</view>
-					<!-- <view class="item" v-if="form.richText">
-						<rich-text :nodes="form.richText"></rich-text>
-					</view> -->
 				</view>
-				<view class="data">
-					<span class="span">搜索关键字</span>{{ form.searchKeywords }}
-				</view>
-				<!-- <view class="data" v-if="form.categoryId != '1945013773786701826'">
-					<span class="span">原价</span>{{ form.price }}
+				<rich-text :nodes="form.richText" v-if="form.richText"></rich-text>
+
+				<view class="data"  v-if="form.categoryId != '1945013773786701826'">
+					<span class="span">原价</span>{{form.price}}
 				</view>
 				<view class="data" v-if="form.categoryId != '1945013773786701826'">
-					<span class="span">实际售价</span>{{ form.soldPrice }}
-				</view> -->
-				<!-- 
+					<span class="span">实际售价</span>{{form.soldPrice}}
+				</view>
+
 				<view class="particulars" v-if="form.categoryId != '1945013773786701826'">
 					组合套餐
 					<view class="content">
-						<view class="item" v-for="(item, index) in form.productGroups" :key="item.groupId">
+						<view class="item" v-for="(item,index) in form.productGroups" :key="item.groupId">
 							<view class="item_title">
-								{{ item.groupName }}
+								{{item.groupName}}
 							</view>
-							<view class="item_row" v-for="(row, index) in item.singleProduct" :key="index">
-								<view class="name">{{ row.productName }} </view>
+							<view class="item_row" v-for="(row,index) in item.singleProduct" :key="index">
+								<view class="name">{{row.productName}} </view>
 								<view class="price">
-									{{ row.quantity }}{{ row.unit }}/{{ row.price }}元
+									{{row.quantity}}{{row.unit}}/{{row.price}}元
 								</view>
 							</view>
 						</view>
 					</view>
-				</view> -->
+				</view>
 			</view>
-
-			<!-- <view class="box" v-if="form.categoryId == '1945013773786701826'">
+			
+			<view class="box" v-if="form.categoryId == '1945013773786701826'">
 				<view class="span">
 					商品规格
 				</view>
 				<view class="spec">
-					<view class="spec_item" v-for="(item, index) in specItems" :key="item.id">
+					<view class="spec_item" v-for="(item,index) in specItems" :key="item.id">
 						<view class="name">
-							{{ item.partName }} {{ item.positionName }} {{ item.craftName }}
-						</view>
+							{{item.partName}} {{item.positionName}} {{item.craftName}}
+						</view>	
 						<view class="price">
-							原价<span>{{ item.price }}</span>参考售价 <span>{{ item.soldPrice }}</span>
+							原价<span>{{item.price}}</span>参考售价 <span>{{item.soldPrice}}</span> 
 						</view>
-
+							
 					</view>
 				</view>
-
-			</view> -->
+				
+			</view>
 			<view class="box rule">
 				<view class="title">
-					销售信息
-				</view>
-				<view class="data">
-					<span class="span">商品售价</span>{{ form.soldPrice }}元
+					售卖/使用信息
 				</view>
 				<view class="data">
-					<span class="span">商品市场价</span>{{ form.price }}元
+					<span class="span">售卖时间</span>{{form.saleStartDate.slice(0,10)}}-{{form.saleEndDate.slice(0,10)}}
 				</view>
 				<view class="data">
-					<span class="span">虚拟销量</span>{{ form.virtualSales }}
-				</view>
-				<view>
-					<view class="data">
-						<span class="span">售卖时间</span>
-						<span v-if="form.sellingTimeType == '1'">不限制</span>
-						<span v-if="form.sellingTimeType == '2'">每天</span>
-						<span v-if="form.sellingTimeType == '3'">每周</span>
-					</view>
-					<!-- 每天售卖时间 -->
-					<view class="card_data" v-show="form.sellingTimeType == '2' && form.sellingDay && form.sellingDay.length > 0">
-						<uni-card :is-shadow="false" is-full style="border:1rpx solid #E5E5E5;">
-							<view v-for="item, index in form.sellingDay" :key="index" style="display: flex; justify-content: center;">
-								<view>{{ item[0] }}</view>
-							</view>
-						</uni-card>
-					</view>
-					<view class="card_data" v-show="form.sellingTimeType == '3'">
-						<!-- 每周售卖时间 -->
-						<uni-table v-show="form.sellingTimeType == '3'">
-							<!-- 表头 -->
-							<uni-tr class="table-header">
-								<uni-th width="200rpx" align="left"><u-checkbox disabled></u-checkbox>工作日</uni-th>
-								<uni-th align="center">时间</uni-th>
-							</uni-tr>
-							<!-- 数据行 -->
-							<uni-tr v-for="(item, index) in form.localProductSellingWeeks" :key="index" class="table-row">
-								<uni-td width="200rpx" align="left">
-									<u-checkbox v-model="item.checked" @change="handleItemCheckChange($event, item, index)"
-										disabled></u-checkbox>{{
-											item.weekDay }}
-								</uni-td>
-								<uni-td align="center">
-									<view v-for="(date, timeIndex) in item.sellingStartTimeList" :key="timeIndex" class="item_weekTime">
-										<span>{{ date[0] }}</span>
-										<!-- <span>{{ date[0] ? date[0] + '-' + date[1] : '' }}</span> -->
-									</view>
-								</uni-td>
-							</uni-tr>
-						</uni-table>
-					</view>
+					<span class="span">库存</span>{{form.stockQuantity}}
 				</view>
-				<!-- <view class="data">
-					<span class="span">库存</span>{{ form.stockQuantity }}
-				</view> -->
 				<view class="data">
 					<span class="span">可用时间</span>
-					<view v-if="form.useType == '3'">
-						长期有效
+					<view class="" v-if="form.availableStartDate">
+						{{form.availableStartDate.slice(0,10)}}-{{form.availableEndDate.slice(0,10)}}
 					</view>
-					<view class="" v-if="form.useType == '1' && form.expirationDays">
-						购买后{{ form.expirationDays }}天失效
-					</view>
-					<view class="" v-if="form.useType == '2' && form.availableStartDate">
-						{{ form.availableStartDate.slice(0, 10) }} — {{ form.availableEndDate.slice(0, 10) }}
+					<view class="" v-else>
+						购买后{{form.expirationDays}}天失效
 					</view>
 				</view>
 				<view class="data">
-					<span class="span">预约规则</span>{{ form.preBook == 0 ? '不需要预约' : '用户需要提前预约' }}
+					<span class="span">需要预约</span>{{form.preBook==0?'不需要预约':'需要预约'}}
 				</view>
 				<view class="data">
-					<span class="span">服务说明</span>
-					<view v-for="(item, index) in form.serviceDescription" :key="index">
-						<span class="span">{{ index + 1 + '.' + item }}</span>
-					</view>
-				</view>
-				<!-- <view class="data">
 					<span class="span">退款规则 </span>
 					<view class="ruler">
 						<view class="item">
-							{{ form.refundLabelName }}
+							{{form.refundLabelName}}
 						</view>
 						<view class="item">
-							{{ form.refundConfirmName }}
+							{{form.refundConfirmName}}
 						</view>
 					</view>
-				</view> -->
-				<!-- <view class="img_box">
+				</view>
+				<view class="img_box">
 					<span class="line">使用说明</span>
 					<view class="text_area">
-						{{ form.instructions }}
+						{{form.instructions}}
 					</view>
-				</view> -->
+				</view>
 			</view>
 		</view>
 
@@ -211,446 +129,296 @@
 </template>
 
 <script>
-import Editor from '@/uni_modules/sp-editor/components/sp-editor/sp-editor.vue';
-
-export default {
-	components: {
-		Editor
-	},
-	data() {
-		return {
-			form: {},
-			detailImages: [],
-			oldPrice: 300,
-			price: 280,
-			ruleList: [],
-			productId: '',
-			imageHttp: 'http://192.168.0.36:8080/jeecg-boot/',
-			specItems: [],
-			fmImageList: [],
-			// 编辑器配置
-			toolbarConfig: {
-				keys: [], // 只读模式下不显示工具栏
-				excludeKeys: []
+	export default {
+		data() {
+			return {
+				form: {},
+				detailImages: [],
+				oldPrice: 300,
+				price: 280,
+				ruleList: [],
+				productId: '',
+				imageHttp: 'http://192.168.0.36:8080/jeecg-boot/',
+				specItems:[]
+			}
+		},
+		methods: {
+			//返回
+			back() {
+				uni.navigateBack({
+					delta: 1
+				});
 			},
-			editorCtx: null, // 编辑器上下文
-			editorId: null,   // 编辑器ID
-			// 为"每周"选项添加单独的时间段数组
-			localProductSellingWeeks: [
-				{
-					weekDay: '周一',
-					sellingStartTimeList: [],
-					checked: false
-				},
-				{
-					weekDay: '周二',
-					sellingStartTimeList: [],
-					checked: false
-				},
-				{
-					weekDay: '周三',
-					sellingStartTimeList: [],
-					checked: false
-				},
-				{
-					weekDay: '周四',
-					sellingStartTimeList: [],
-					checked: false
-				},
-				{
-					weekDay: '周五',
-					sellingStartTimeList: [],
-					checked: false
-				},
-				{
-					weekDay: '周六',
-					sellingStartTimeList: [],
-					checked: false
-				},
-				{
-					weekDay: '周日',
-					sellingStartTimeList: [],
-					checked: false
-				}
-			]
-		}
-	},
-	methods: {
-		//返回
-		back() {
-			uni.navigateBack({
-				delta: 1
-			});
 		},
-		// 编辑器初始化完成时触发
-		onEditorInit(editorCtx, editorId) {
-			this.editorCtx = editorCtx // 保存编辑器上下文
-			this.editorId = editorId   // 保存编辑器ID
-			console.log('编辑器初始化完成')
-
-			// 初始化编辑器内容
-			if (this.form.richText) {
-				this.editorCtx.setContents({
-					html: this.form.richText
-				})
-			}
-		}
-	},
-	onLoad(options) {
-		this.productId = options.productId
-		this.$http.post("/app/product/queryByIdNew", {
-			id: this.productId,
-			isApp: '1'
-		}).then(res => {
-			if (res.data.code == 200) {
-				this.form = res.data.result
-				console.log(this.form)
-				if (res.data.result.detailImages) {
+		onLoad(options) {
+			this.productId = options.productId
+			this.$http.get("/app/product/queryById?id=" + this.productId, {}).then(res => {
+				
+				if (res.data.code == 200) {
+					this.form = res.data.result
+					console.log(this.form)
 					this.detailImages = res.data.result.detailImages.split(',')
+					if(this.form.specItems){
+						 this.form.specItems.forEach(item => {
+							if(item.replaced){
+								this.specItems.push(item)
+							}
+						})
+					}
+					
+					console.log(this.specItems)
 				}
-				this.form.groupingName = res.data.result.groupingName || ''
-				this.form.serviceDescription = res.data.result.serviceDescription || ["期限", "范围‌"]
-				if (!res.data.result.sellingDay) {
-					this.form.sellingDay = []
-				}
-				if (!res.data.result.localProductSellingWeeks) {
-					this.form.localProductSellingWeeks = this.localProductSellingWeeks
-				}
-				// 处理封面图,支持多张图片
-				if (res.data.result.productImage) {
-					let productImages = res.data.result.productImage.split(',');
-					productImages.forEach(imageUrl => {
-						if (imageUrl.trim()) { // 过滤空字符串
-							this.fmImageList.push({
-								url: imageUrl
-							});
-						}
-					});
-				}
-				if (this.form.specItems) {
-					this.form.specItems.forEach(item => {
-						if (item.replaced) {
-							this.specItems.push(item)
-						}
-					})
-				}
-
-				console.log(this.specItems)
-			}
-		})
-	},
-	onUnload() {
-		// 页面销毁前清空Storage中的'smdate'
-		uni.removeStorage({
-			key: 'smdate'
-		});
+			})
+		}
 	}
-}
 </script>
 
 <style lang="scss" scoped>
-.details {
-	width: 100vw;
-	height: 100vh;
-	display: flex;
-	flex-direction: column;
-	overflow: hidden;
-	background: #F7F8FC;
-
-	/*#ifdef APP-PLUS*/
-	.top {
-		width: 100%;
-		height: var(--status-bar-height);
-		background-color: #fff;
-	}
-
-	/*#endif*/
-
-	.head {
-		width: 100%;
-		padding: 20rpx;
-		background-color: #fff;
+	.details {
+		width: 100vw;
+		height: 100vh;
 		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		position: relative;
+		flex-direction: column;
+		overflow: hidden;
+		background: #F7F8FC;
 
-		.head_left {
-			font-size: 40rpx;
-		}
-
-		.case {
-			position: absolute;
-			left: 50%;
-			top: 50%;
-			transform: translate(-50%, -50%);
-			font-size: 36rpx;
-			font-weight: 600;
+		/*#ifdef APP-PLUS*/
+		.top {
+			width: 100%;
+			height: var(--status-bar-height);
+			background-color: #fff;
 		}
-	}
 
-	.center {
-		flex: 1;
-		overflow-y: auto;
-		padding: 21rpx 24rpx;
+		/*#endif*/
 
-		.box {
+		.head {
 			width: 100%;
-			padding: 16rpx;
+			padding: 20rpx;
 			background-color: #fff;
-			border-radius: 16rpx;
-
-			.spec {
-				background: #FBFCFF;
-				border-radius: 8rpx;
-				padding: 16rpx;
-				margin-top: 16rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			position: relative;
 
-				.spec_item {
-					margin-bottom: 32rpx;
+			.head_left {
+				font-size: 40rpx;
+			}
 
-					.name {
-						font-size: 28rpx;
-						margin-bottom: 16rpx;
-					}
+			.case {
+				position: absolute;
+				left: 50%;
+				top: 50%;
+				transform: translate(-50%, -50%);
+				font-size: 36rpx;
+				font-weight: 600;
+			}
+		}
 
-					.price {
-						font-size: 26rpx;
-						color: #666666;
+		.center {
+			flex: 1;
+			overflow-y: auto;
+			padding: 21rpx 24rpx;
 
-						span {
-							color: #333333;
-							margin-left: 20rpx;
-							margin-right: 30rpx;
+			.box {
+				width: 100%;
+				padding: 16rpx;
+				background-color: #fff;
+				border-radius: 16rpx;
+				.spec{
+					background: #FBFCFF;
+					border-radius: 8rpx;
+					padding: 16rpx;
+					margin-top: 16rpx;
+					.spec_item{
+						margin-bottom: 32rpx;
+						.name{
+							font-size: 28rpx;
+							margin-bottom: 16rpx;
+						}
+						.price{
+							font-size: 26rpx;
+							color: #666666;
+							span{
+								color: #333333;
+								margin-left: 20rpx;
+								margin-right: 30rpx;
+							}
 						}
 					}
 				}
 			}
 		}
-	}
-
-	.title {
-		width: 100%;
-		font-weight: 600;
-		margin-bottom: 32rpx;
-	}
 
-	.card_data {
-		border-bottom: 1px solid #EEEEEE;
-		padding-bottom: 16rpx;
-	}
-
-	.data {
-		min-height: 58rpx;
-		display: flex;
-		align-items: center;
-		border-bottom: 1px solid #EEEEEE;
-		padding-bottom: 16rpx;
-		margin-top: 16rpx;
-		font-size: 28rpx;
-
-		.span {
-			display: inline-block;
-			margin-right: 20rpx;
-			min-width: 112rpx;
-			font-size: 28rpx;
-			color: #666666;
+		.title {
+			width: 100%;
+			font-weight: 600;
+			margin-bottom: 32rpx;
 		}
 
-		.ruler {
+		.data {
+			min-height: 58rpx;
 			display: flex;
 			align-items: center;
+			border-bottom: 1px solid #EEEEEE;
+			padding-bottom: 16rpx;
+			margin-top: 16rpx;
+			font-size: 28rpx;
+
+			.span {
+				display: inline-block;
+				margin-right: 20rpx;
+				min-width: 112rpx;
+				font-size: 28rpx;
+				color: #666666;
+			}
 
-			.item {
-				width: auto;
-				height: 44rpx;
-				padding: 0rpx 16rpx;
+			.ruler {
 				display: flex;
 				align-items: center;
-				justify-content: center;
-				line-height: 28rpx;
-				color: #2983EC;
-				background: rgba(68, 154, 255, 0.1);
-				border-radius: 4rpx;
-				border: 1px solid #449AFF;
-				margin-right: 20rpx;
+
+				.item {
+					width: auto;
+					height: 44rpx;
+					padding: 0rpx 16rpx;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					line-height: 28rpx;
+					color: #2983EC;
+					background: rgba(68, 154, 255, 0.1);
+					border-radius: 4rpx;
+					border: 1px solid #449AFF;
+					margin-right: 20rpx;
+				}
 			}
 		}
-	}
 
-	.img_box {
-		border-bottom: 1px solid #EEEEEE;
-		padding-bottom: 16rpx;
+		.img_box {
+			border-bottom: 1px solid #EEEEEE;
+			padding-bottom: 16rpx;
 
-		.line {
-			display: block;
-			font-size: 28rpx;
-			color: #666666;
-			margin: 16rpx 0px;
-		}
+			.line {
+				display: block;
+				font-size: 28rpx;
+				color: #666666;
+				margin: 16rpx 0px;
+			}
 
-		.img_list {
-			display: flex;
-			flex-wrap: wrap;
-			justify-content: start;
-			// gap: 27rpx;
-
-			.img {
-				flex: 0 0 calc(25% - 27rpx);
-				height: 140rpx;
-				border-radius: 12rpx;
-				overflow: hidden;
-				margin-bottom: 25rpx;
+			.img_list {
+				display: flex;
+				flex-wrap: wrap;
+				// justify-content: space-between;
+				gap: 27rpx;
 
-				image {
-					width: 140rpx;
+				.img {
+					flex: 0 0 calc(25% - 27rpx);
 					height: 140rpx;
+					border-radius: 12rpx;
+					overflow: hidden;
+
+					image {
+						width: 140rpx;
+						height: 140rpx;
+					}
 				}
 			}
 		}
-	}
 
-	.particulars {
-		width: 100%;
-		margin-top: 20rpx;
-
-		.content {
+		.particulars {
 			width: 100%;
-			padding: 20rpx;
-			background: #F7F8FC;
-			border-radius: 8rpx;
-			margin-top: 16rpx;
-			padding-top: 0px;
-			overflow: hidden;
+			margin-top: 20rpx;
 
-			.item {
+			.content {
+				width: 100%;
+				padding: 20rpx;
+				background: #F7F8FC;
+				border-radius: 8rpx;
 				margin-top: 16rpx;
+				padding-top: 0px;
+				overflow: hidden;
 
-				.item_title {
-					font-weight: 600;
-					font-size: 26rpx;
-				}
-
-				.item_row {
-					width: 100%;
+				.item {
+					margin-top: 16rpx;
 
-					.name {
+					.item_title {
+						font-weight: 600;
 						font-size: 26rpx;
-						margin-top: 16rpx;
-						margin-bottom: 4rpx;
-						color: #333333;
-						line-height: 30rpx;
 					}
 
-					.price {
-						font-size: 24rpx;
-						color: #888888;
-						line-height: 28rpx;
+					.item_row {
+						width: 100%;
+
+						.name {
+							font-size: 26rpx;
+							margin-top: 16rpx;
+							margin-bottom: 4rpx;
+							color: #333333;
+							line-height: 30rpx;
+						}
+
+						.price {
+							font-size: 24rpx;
+							color: #888888;
+							line-height: 28rpx;
+						}
 					}
 				}
-			}
 
-			.hint {
-				border-bottom: 1px solid #ccc;
+				.hint {
+					border-bottom: 1px solid #ccc;
+				}
 			}
 		}
-	}
 
-	.rule {
-		width: 100%;
-		background-color: #fff;
-		padding: 20rpx;
-		margin-top: 20rpx;
+		.rule {
+			width: 100%;
+			background-color: #fff;
+			padding: 20rpx;
+			margin-top: 20rpx;
 
-		.headline {
-			font-weight: 600;
-		}
+			.headline {
+				font-weight: 600;
+			}
 
-		.rule_item {
-			display: flex;
-			margin-top: 20rpx;
+			.rule_item {
+				display: flex;
+				margin-top: 20rpx;
 
-			.item {
-				padding: 10rpx 20rpx;
-				border: 1px solid #ccc;
-				margin-right: 20rpx;
+				.item {
+					padding: 10rpx 20rpx;
+					border: 1px solid #ccc;
+					margin-right: 20rpx;
+				}
 			}
 		}
-	}
 
-	.banner {
-		width: 95%;
-		margin: 20rpx auto;
+		.banner {
+			width: 95%;
+			margin: 20rpx auto;
 
-		image {
-			width: 100%;
+			image {
+				width: 100%;
 
+			}
 		}
-	}
 
-	.edit {
-		width: 100%;
-		height: 80rpx;
-		background-color: #fff;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-
-		span {
-			display: block;
-			width: 200rpx;
-			height: 60rpx;
-			border: 1px solid #ccc;
+		.edit {
+			width: 100%;
+			height: 80rpx;
+			background-color: #fff;
 			display: flex;
 			justify-content: center;
 			align-items: center;
-		}
-	}
-}
 
-// video_style
-.customize {
-	margin-bottom: 16rpx;
-	background-color: #ffffff;
-	border-radius: 16rpx;
-
-	.business-img {
-		height: 210upx;
-		width: 310upx;
-		background-size: cover;
-
-		image {
-			width: 100%;
-			height: 100%;
-		}
-	}
-
-	.uploader_video {
-		width: 310upx;
-		height: 210upx;
-	}
-
-	.video-container {
-		max-width: 100%;
-		/* 最大宽度为父容器宽度 */
-		max-height: 100%;
-
-		::v-deep.uni-video-bar {
-			height: 62upx;
-			padding: 0
+			span {
+				display: block;
+				width: 200rpx;
+				height: 60rpx;
+				border: 1px solid #ccc;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+			}
 		}
 	}
-}
-
-.uni-uploader__file,
-.uploader_video {
-	position: relative;
-	z-index: 1;
-	width: 200upx;
-	height: 200upx;
-}
-
-::v-deep .editor-container {
-	height: 260rpx;
-}
 </style>

Некоторые файлы не были показаны из-за большого количества измененных файлов