租房小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

676 lines
21 KiB

  1. <template>
  2. <view class="container">
  3. <view class="header">
  4. <view class="title">闲置农房信息录入</view>
  5. </view>
  6. <view class="form-container">
  7. <uv-form labelPosition="left" :model="form" :rules="rules" ref="form" labelWidth="80" labelStyle="font-size:28rpx;">
  8. <!-- 必填项 -->
  9. <view class="section-title">基本信息必填</view>
  10. <!-- 1. 出租/流转 -->
  11. <uv-form-item label="类型" prop="type" required>
  12. <uv-radio-group v-model="form.type" placement="row">
  13. <uv-radio name="rent" label="出租"></uv-radio>
  14. <uv-radio name="transfer" customStyle="margin-left:30rpx;" label="流转"></uv-radio>
  15. </uv-radio-group>
  16. </uv-form-item>
  17. <!-- 2. 地址 -->
  18. <uv-form-item label="地址" prop="address" required @click="handleAddressSelect()">
  19. <uv-input v-model="form.address" @click="handleAddressSelect()" disabled disabledColor="#ffffff" placeholder="请选择房屋位置" border="none">
  20. </uv-input>
  21. <template v-slot:right>
  22. <uv-icon name="arrow-right"></uv-icon>
  23. </template>
  24. </uv-form-item>
  25. <!-- 3. 联系人和电话 -->
  26. <uv-form-item label="联系人" prop="contactName" required>
  27. <uv-input v-model="form.contactName" type="text" placeholder="请输入联系人姓名" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
  28. </uv-form-item>
  29. <uv-form-item label="联系电话" prop="contactPhone" required>
  30. <uv-input v-model="form.contactPhone" type="number" placeholder="请输入联系电话" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
  31. </uv-form-item>
  32. <!-- 4. 房屋状况 -->
  33. <uv-form-item label="房屋状况" prop="houseCondition" required @click="handleHouseConditionSelect()">
  34. <uv-input v-model="form.houseConditionName" @click="handleHouseConditionSelect()" disabled disabledColor="#ffffff" placeholder="请选择房屋状况" border="none">
  35. </uv-input>
  36. <template v-slot:right>
  37. <uv-icon name="arrow-right"></uv-icon>
  38. </template>
  39. </uv-form-item>
  40. <!-- 5. 产权证照片 -->
  41. <uv-form-item label="产权证照片" labelWidth="250" prop="propertyImages" labelPosition="top" required>
  42. <view class="upload-tip">请上传房产证土地证或不动产权证照片</view>
  43. <uv-upload customStyle="margin-top:20rpx;" :fileList="form.propertyImages" @afterRead="afterPropertyRead" @delete="deletePropertyPic" name="1"
  44. multiple :maxCount="5"></uv-upload>
  45. </uv-form-item>
  46. <!-- 6. 产权面积 -->
  47. <uv-form-item label="房屋面积" prop="houseArea" required>
  48. <view class="input-with-unit">
  49. <uv-input v-model="form.houseArea" type="digit" placeholder="请输入房屋面积" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
  50. <text class="unit">平米</text>
  51. </view>
  52. <view class="input-tip">请录入房屋证或不动产权证登记面积</view>
  53. </uv-form-item>
  54. <uv-form-item label="土地面积" prop="landArea" required>
  55. <view class="input-with-unit">
  56. <uv-input v-model="form.landArea" type="digit" placeholder="请输入土地面积" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
  57. <text class="unit">平米</text>
  58. </view>
  59. <view class="input-tip">请录入土地使用证或不动产权证面积</view>
  60. </uv-form-item>
  61. <!-- 7. 房屋正面照片 -->
  62. <uv-form-item label="房屋正面照片" labelWidth="250" prop="frontImages" labelPosition="top" required>
  63. <view class="upload-tip">作为封面展示建议拍摄房屋正面全貌</view>
  64. <uv-upload customStyle="margin-top:20rpx;" :fileList="form.frontImages" @afterRead="afterFrontRead" @delete="deleteFrontPic" name="1"
  65. multiple :maxCount="3"></uv-upload>
  66. </uv-form-item>
  67. <!-- 8. 房屋视频 -->
  68. <uv-form-item label="房屋视频" labelWidth="250" prop="videos" labelPosition="top" required>
  69. <view class="upload-tip">请上传房屋内部和外部视频时长不超过1分钟最多上传2个视频</view>
  70. <uv-upload customStyle="margin-top:20rpx;" accept="video" :fileList="form.videos" @afterRead="afterVideoRead" @delete="deleteVideoPic" name="1"
  71. multiple :maxCount="2"></uv-upload>
  72. </uv-form-item>
  73. <!-- 9. 价格 -->
  74. <uv-form-item label="价格" prop="price" required>
  75. <view class="price-container">
  76. <uv-input v-model="form.price" type="digit" placeholder="请输入价格" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;flex:1;"></uv-input>
  77. <text class="price-unit" v-if="form.type === 'rent'">/</text>
  78. <text class="price-unit" v-else-if="form.type === 'transfer'">万元</text>
  79. <text class="price-unit" v-else></text>
  80. </view>
  81. <view class="input-tip">请输入数字支持小数点后两位</view>
  82. </uv-form-item>
  83. <!-- 分类标识 -->
  84. <uv-form-item label="分类标识" prop="classId" @click="handleClass()">
  85. <uv-input v-model="form.className" @click="handleClass()" disabled disabledColor="#ffffff" placeholder="选择分类标识" border="none">
  86. </uv-input>
  87. <template v-slot:right>
  88. <uv-icon name="arrow-right"></uv-icon>
  89. </template>
  90. </uv-form-item>
  91. <!-- 选填项 -->
  92. <view class="section-title">详细信息选填</view>
  93. <!-- 10. 可用菜地 -->
  94. <uv-form-item label="可用菜地" prop="vegetableGarden">
  95. <view class="input-with-unit">
  96. <uv-input v-model="form.vegetableGarden" type="digit" placeholder="请输入菜地面积" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;"></uv-input>
  97. <text class="unit">平米</text>
  98. </view>
  99. </uv-form-item>
  100. <!-- 11. 房屋亮点 -->
  101. <uv-form-item label="房屋亮点" prop="highlights" labelPosition="top">
  102. <view class="tags-container">
  103. <view
  104. class="tag-item"
  105. :class="{ 'tag-selected': form.highlights.includes(item) }"
  106. v-for="item in highlightOptions"
  107. :key="item"
  108. @click="toggleHighlight(item)"
  109. >
  110. {{item}}
  111. </view>
  112. </view>
  113. </uv-form-item>
  114. <!-- 12. 不利因素 -->
  115. <uv-form-item label="不利因素" prop="disadvantages" labelPosition="top">
  116. <view class="tags-container">
  117. <view
  118. class="tag-item disadvantage-tag"
  119. :class="{ 'tag-selected': form.disadvantages.includes(item) }"
  120. v-for="item in disadvantageOptions"
  121. :key="item"
  122. @click="toggleDisadvantage(item)"
  123. >
  124. {{item}}
  125. </view>
  126. </view>
  127. </uv-form-item>
  128. <!-- 13. 房屋介绍 -->
  129. <uv-form-item label="房屋介绍" prop="description" labelPosition="top">
  130. <uv-input
  131. v-model="form.description"
  132. type="textarea"
  133. placeholder="请详细介绍房屋情况、周边环境等"
  134. customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:10px;"
  135. :autoHeight="true"
  136. :maxlength="500"
  137. ></uv-input>
  138. </uv-form-item>
  139. <uv-form-item>
  140. <uv-button type="primary" text="提交信息" customStyle="margin-top: 30px;background-color: #1EC77A;border-radius: 30px;" @click="submit"></uv-button>
  141. </uv-form-item>
  142. </uv-form>
  143. </view>
  144. <!-- 房屋状况选择器 -->
  145. <uv-picker ref="houseConditionPicker" :columns="houseConditionColumns" @confirm="confirmHouseCondition"></uv-picker>
  146. <!-- 分类选择器 -->
  147. <uv-picker ref="picker" :columns="columns" @confirm="confirm"></uv-picker>
  148. </view>
  149. </template>
  150. <script>
  151. import { saveOrUpdateHouse, houseType } from "@/common/api.js"
  152. export default {
  153. data() {
  154. return {
  155. commonClass: '', // 所属分类ID
  156. form: {
  157. type: '', // 出租/流转
  158. address: '', // 地址
  159. contactName: '', // 联系人
  160. contactPhone: '', // 联系电话
  161. houseCondition: '', // 房屋状况ID
  162. houseConditionName: '', // 房屋状况名称
  163. propertyImages: [], // 产权证照片
  164. houseArea: '', // 房屋面积
  165. landArea: '', // 土地面积
  166. frontImages: [], // 房屋正面照片
  167. videos: [], // 房屋视频
  168. price: '', // 价格
  169. longitude: '', // 经度
  170. latitude: '', // 纬度
  171. vegetableGarden: '', // 可用菜地
  172. highlights: [], // 房屋亮点
  173. disadvantages: [], // 不利因素
  174. description: '', // 房屋介绍
  175. classId: '', // 分类标识
  176. className: '' // 分类名称
  177. },
  178. houseConditionColumns: [
  179. ['老旧房屋', '装修较好可拎包入住', '新房']
  180. ],
  181. highlightOptions: [
  182. '靠河', '靠山', '通自来水', '通天然气', '近场镇或城市',
  183. '双车道到家', '精装修', '四合院', '周边无坟墓', '周边无电线塔'
  184. ],
  185. disadvantageOptions: [
  186. '可见坟墓', '周边有电塔', '非正常死亡'
  187. ],
  188. columns: [], // 分类选择器数据
  189. houseTypeList: [], // 分类列表
  190. rules: {
  191. type: [
  192. { required: true, message: '请选择出租或流转', trigger: ['blur', 'change'] }
  193. ],
  194. address: [
  195. { required: true, message: '请选择房屋地址', trigger: ['blur', 'change'] }
  196. ],
  197. contactName: [
  198. { required: true, message: '请输入联系人姓名', trigger: ['blur', 'change'] }
  199. ],
  200. contactPhone: [
  201. { required: true, message: '请输入联系电话', trigger: ['blur', 'change'] },
  202. { pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: ['blur', 'change'] }
  203. ],
  204. houseCondition: [
  205. { required: true, message: '请选择房屋状况', trigger: ['blur', 'change'] }
  206. ],
  207. houseArea: [
  208. { required: true, message: '请输入房屋面积', trigger: ['blur', 'change'] },
  209. { pattern: /^\d+(\.\d{1,2})?$/, message: '请输入正确的数字格式', trigger: ['blur', 'change'] }
  210. ],
  211. landArea: [
  212. { required: true, message: '请输入土地面积', trigger: ['blur', 'change'] },
  213. { pattern: /^\d+(\.\d{1,2})?$/, message: '请输入正确的数字格式', trigger: ['blur', 'change'] }
  214. ],
  215. price: [
  216. { required: true, message: '请输入价格', trigger: ['blur', 'change'] },
  217. { pattern: /^\d+(\.\d{1,2})?$/, message: '请输入正确的价格格式', trigger: ['blur', 'change'] }
  218. ],
  219. classId: [
  220. { required: true, message: '请选择分类标识', trigger: ['blur', 'change'] }
  221. ]
  222. }
  223. }
  224. },
  225. onReady() {
  226. this.$refs.form.setRules(this.rules)
  227. },
  228. onLoad(options) {
  229. // 设置页面标题
  230. uni.setNavigationBarTitle({
  231. title: '闲置农房录入'
  232. })
  233. // 接收传递的commonClass参数
  234. if(options.commonClass) {
  235. this.commonClass = options.commonClass
  236. }
  237. // 如果是编辑模式,设置classId用于回显
  238. if(options.classId) {
  239. this.form.classId = options.classId
  240. }
  241. // 初始化分类数据
  242. this.onHouseType()
  243. },
  244. methods: {
  245. // 获取分类数据
  246. onHouseType(){
  247. let that = this
  248. houseType({}).then(response=>{
  249. let arr=[]
  250. that.houseTypeList = response.result
  251. response.result.forEach(items=>{
  252. arr.push(items.title)
  253. // 数据回显:如果当前classId匹配,设置className
  254. if(items.id == that.form.classId){
  255. that.form.className = items.title
  256. }
  257. })
  258. that.columns[0]=arr
  259. }).catch(error=>{
  260. })
  261. },
  262. // 地址选择
  263. handleAddressSelect() {
  264. const that = this;
  265. wx.chooseLocation({
  266. success: function (res) {
  267. console.log('选择的位置:', res);
  268. that.form.longitude = res.longitude
  269. that.form.latitude = res.latitude
  270. that.form.address = res.address
  271. }
  272. })
  273. },
  274. // 房屋状况选择
  275. handleHouseConditionSelect() {
  276. this.$refs.houseConditionPicker.open();
  277. },
  278. confirmHouseCondition(e) {
  279. const { indexs, value } = e;
  280. this.form.houseCondition = value[0]; // 修改:直接使用选择的值而不是索引
  281. this.form.houseConditionName = value[0];
  282. },
  283. // 分类标识选择
  284. handleClass() {
  285. this.$refs.picker.open();
  286. },
  287. confirm(e) {
  288. let that = this
  289. let {indexs,value,values} = e
  290. that.form.classId = that.houseTypeList[indexs[0]].id;
  291. that.form.className = that.houseTypeList[indexs[0]].title;
  292. },
  293. // 产权证照片上传
  294. async afterPropertyRead(e) {
  295. let self = this
  296. e.file.forEach(file => {
  297. self.$Oss.ossUpload(file.url).then(url => {
  298. self.form.propertyImages.push({
  299. url
  300. })
  301. })
  302. })
  303. },
  304. deletePropertyPic(event) {
  305. this.form.propertyImages.splice(event.index, 1)
  306. },
  307. // 房屋正面照片上传
  308. async afterFrontRead(e) {
  309. let self = this
  310. e.file.forEach(file => {
  311. self.$Oss.ossUpload(file.url).then(url => {
  312. self.form.frontImages.push({
  313. url
  314. })
  315. })
  316. })
  317. },
  318. deleteFrontPic(event) {
  319. this.form.frontImages.splice(event.index, 1)
  320. },
  321. // 视频上传
  322. async afterVideoRead(e) {
  323. let self = this
  324. for (let file of e.file) {
  325. try {
  326. // 检查视频时长
  327. const duration = await this.getVideoDuration(file.url)
  328. if (duration > 60) {
  329. uni.showToast({
  330. title: '视频时长不能超过1分钟',
  331. icon: 'none'
  332. })
  333. continue // 跳过这个视频
  334. }
  335. self.$Oss.ossUpload(file.url).then(url => {
  336. self.form.videos.push({
  337. url
  338. })
  339. })
  340. } catch (error) {
  341. console.error('视频处理失败:', error)
  342. // 如果获取时长失败,仍然允许上传
  343. self.$Oss.ossUpload(file.url).then(url => {
  344. self.form.videos.push({
  345. url
  346. })
  347. })
  348. }
  349. }
  350. },
  351. // 获取视频时长的辅助方法
  352. getVideoDuration(videoUrl) {
  353. return new Promise((resolve, reject) => {
  354. // #ifdef MP-WEIXIN
  355. uni.getVideoInfo({
  356. src: videoUrl,
  357. success: (res) => {
  358. resolve(res.duration)
  359. },
  360. fail: (err) => {
  361. reject(err)
  362. }
  363. })
  364. // #endif
  365. // #ifdef APP-PLUS
  366. plus.io.getVideoInfo({
  367. filePath: videoUrl,
  368. success: (res) => {
  369. resolve(res.duration)
  370. },
  371. fail: (err) => {
  372. reject(err)
  373. }
  374. })
  375. // #endif
  376. // #ifdef H5
  377. // H5环境暂不支持视频时长检测,直接通过
  378. resolve(0)
  379. // #endif
  380. })
  381. },
  382. deleteVideoPic(event) {
  383. this.form.videos.splice(event.index, 1)
  384. },
  385. // 切换房屋亮点
  386. toggleHighlight(item) {
  387. const index = this.form.highlights.indexOf(item);
  388. if (index > -1) {
  389. this.form.highlights.splice(index, 1);
  390. } else {
  391. this.form.highlights.push(item);
  392. }
  393. },
  394. // 切换不利因素
  395. toggleDisadvantage(item) {
  396. const index = this.form.disadvantages.indexOf(item);
  397. if (index > -1) {
  398. this.form.disadvantages.splice(index, 1);
  399. } else {
  400. this.form.disadvantages.push(item);
  401. }
  402. },
  403. // 提交表单
  404. submit() {
  405. this.$refs.form.validate().then(res => {
  406. // 验证必填的图片和视频
  407. if (this.form.propertyImages.length === 0) {
  408. uni.showToast({
  409. title: '请上传产权证照片',
  410. icon: 'none'
  411. });
  412. return;
  413. }
  414. if (this.form.frontImages.length === 0) {
  415. uni.showToast({
  416. title: '请上传房屋正面照片',
  417. icon: 'none'
  418. });
  419. return;
  420. }
  421. if (this.form.videos.length === 0) {
  422. uni.showToast({
  423. title: '请上传房屋视频',
  424. icon: 'none'
  425. });
  426. return;
  427. }
  428. // 构建与index.vue兼容的提交参数
  429. const params = {
  430. userId: uni.getStorageSync('userInfo')?.id || "",
  431. id: "", // 新增数据,无ID
  432. classId: this.form.classId, // 使用分类标识
  433. commonClass: this.commonClass, // 所属分类
  434. address: this.form.address, // 地址
  435. homeAge: "", // 户主年龄 - 农房录入无此字段
  436. homeAz: "", // 是否经过安置 - 默认否
  437. homeBian: this.form.highlights.join(','), // 房屋周边 - 使用亮点代替
  438. homeBjsx: "", // 报建手续 - 农房录入无此字段
  439. homeCai: this.form.vegetableGarden || "", // 菜地面积
  440. homeCat: "", // 停车 - 农房录入无此字段
  441. homeGz: "", // 房屋主体是否改造 - 农房录入无此字段
  442. homeHb: "", // 房屋朝向及海拔 - 农房录入无此字段
  443. homeBz: this.form.description, // 备注 - 使用房屋介绍
  444. homeJg: this.form.houseCondition, // 房屋结构 - 使用房屋状况
  445. homeJl: "", // 距离场镇距离 - 农房录入无此字段
  446. homeJt: "", // 交通 - 农房录入无此字段
  447. homeJtzy: "", // 户主家庭职业 - 农房录入无此字段
  448. homeMi: "", // 面积 - 使用房屋面积
  449. homeMj: this.form.houseArea, // 房屋面积
  450. homeMoney: "", // 佣金 - 农房录入无此字段
  451. homeNo: "", // 房屋编号 - 农房录入无此字段
  452. homeNum: "1", // 房间数量 - 农房录入无此字段
  453. homePay: "", // 付款方式及押金 - 农房录入无此字段
  454. homePj: "", // 邻居对房东评价 - 农房录入无此字段
  455. homeSd: "", // 水电气网 - 农房录入无此字段
  456. homeShjl: "", // 距离成都西三环 - 农房录入无此字段
  457. homeSw: this.form.disadvantages.join(','), // 非正常死亡 - 显示不利因素信息
  458. homeTf: "", // 府市民云房屋信息档案查询 - 农房录入无此字段
  459. homeTime: "", // 租期 - 农房录入无此字段
  460. homeType: this.form.type === 'rent' ? '出租' : '流转', // 户型 - 使用类型
  461. homeYs: "", // 钥匙 - 默认无
  462. homeYzmj: this.form.landArea, // 院子总面积 - 使用土地面积
  463. homeZy: this.form.disadvantages.join(','), // 坟包及电塔 工厂噪音 - 使用不利因素
  464. iconName: "闲置农房", // 热点名称
  465. iconTitle: this.form.highlights.join(','), // 标签 - 使用亮点
  466. num: "0", // 浏览量 - 默认0
  467. price: this.form.price, // 价格
  468. timeGo: "", // 年限 - 农房录入无此字段
  469. title: `${this.form.type === 'rent' ? '出租' : '流转'}-${this.form.address.split('市')[1] || this.form.address}`, // 标题 - 自动生成
  470. unit: this.form.type === 'rent' ? '元/年' : '万元', // 单位
  471. image: this.form.frontImages.map(item => item.url).join(','), // 图片 - 使用正面照片
  472. iconImage: "", // 左上角图标
  473. homeImage: this.form.propertyImages.map(item => item.url).join(','), // 产权证照片
  474. homeMp4: this.form.videos.map(item => item.url).join(','), // 视频
  475. latitude: this.form.latitude,
  476. longitude: this.form.longitude,
  477. // 新增字段用于标识农房
  478. category: 'farmhouse',
  479. contactName: this.form.contactName,
  480. contactPhone: this.form.contactPhone
  481. };
  482. console.log('农房提交参数:', params);
  483. uni.showLoading({
  484. title: '提交中...'
  485. });
  486. // 调用统一API
  487. saveOrUpdateHouse(params).then(response => {
  488. uni.hideLoading();
  489. uni.showToast({
  490. title: response.message || '提交成功',
  491. icon: 'success'
  492. });
  493. setTimeout(() => {
  494. uni.redirectTo({
  495. url: "/pages_subpack/successful-apply/index"
  496. });
  497. }, 2000);
  498. }).catch(error => {
  499. uni.hideLoading();
  500. uni.showToast({
  501. title: error.message || '提交失败',
  502. icon: 'none'
  503. });
  504. console.error('农房提交失败:', error);
  505. });
  506. }).catch(errors => {
  507. console.log('表单验证失败:', errors);
  508. uni.showToast({
  509. title: '请补全必填项',
  510. icon: 'none'
  511. });
  512. });
  513. }
  514. }
  515. }
  516. </script>
  517. <style scoped>
  518. .container {
  519. min-height: 100vh;
  520. background-color: #f5f5f5;
  521. }
  522. .header {
  523. background: linear-gradient(135deg, #1EC77A 0%, #4CAF50 100%);
  524. padding: 40rpx 40rpx 60rpx;
  525. color: white;
  526. }
  527. .title {
  528. font-size: 36rpx;
  529. font-weight: bold;
  530. text-align: center;
  531. }
  532. .form-container {
  533. background: white;
  534. margin: -30rpx 20rpx 20rpx;
  535. border-radius: 20rpx;
  536. padding: 40rpx;
  537. box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.1);
  538. }
  539. .section-title {
  540. font-size: 32rpx;
  541. font-weight: bold;
  542. color: #333;
  543. margin: 40rpx 0 30rpx;
  544. padding-left: 20rpx;
  545. border-left: 6rpx solid #1EC77A;
  546. }
  547. .section-title:first-child {
  548. margin-top: 0;
  549. }
  550. .input-with-unit {
  551. display: flex;
  552. align-items: center;
  553. gap: 10rpx;
  554. }
  555. .unit {
  556. font-size: 26rpx;
  557. color: #666;
  558. margin-left: 10rpx;
  559. }
  560. .input-tip {
  561. font-size: 22rpx;
  562. color: #999;
  563. margin-top: 10rpx;
  564. line-height: 1.4;
  565. }
  566. .upload-tip {
  567. font-size: 24rpx;
  568. color: #666;
  569. margin-bottom: 10rpx;
  570. line-height: 1.5;
  571. }
  572. .price-container {
  573. display: flex;
  574. align-items: center;
  575. gap: 10rpx;
  576. }
  577. .price-unit {
  578. font-size: 26rpx;
  579. color: #1EC77A;
  580. font-weight: bold;
  581. margin-left: 10rpx;
  582. }
  583. .tags-container {
  584. display: flex;
  585. flex-wrap: wrap;
  586. gap: 15rpx;
  587. margin-top: 20rpx;
  588. }
  589. .tag-item {
  590. padding: 15rpx 25rpx;
  591. border: 2rpx solid #e0e0e0;
  592. border-radius: 25rpx;
  593. font-size: 24rpx;
  594. color: #666;
  595. background: #f9f9f9;
  596. transition: all 0.3s ease;
  597. }
  598. .tag-item.tag-selected {
  599. border-color: #1EC77A;
  600. background: #1EC77A;
  601. color: white;
  602. }
  603. .disadvantage-tag.tag-selected {
  604. border-color: #ff4757;
  605. background: #ff4757;
  606. color: white;
  607. }
  608. </style>