环卫车小程序前端代码
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.

673 lines
20 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
  1. <template>
  2. <view class="se-m-20 se-p-20 se-br-10">
  3. <u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" labelWidth="80">
  4. <u-form-item labelWidth="0">
  5. <view class="se-fs-26 se-c-black se-pb-10">
  6. 请选择您要发布的车辆类型
  7. </view>
  8. <view class="se-flex se-flex-ai-c se-flex-ff-rw">
  9. <view class="se-py-10 se-px-30 se-fs-22 se-br-10 se-mr-15 se-mt-10" :class="item.id==form.typeId ? 'se-bgc-green se-c-white se-b-green' : 'se-b se-c-text'" @click="handleCartype(item)" v-for="(item,index) in actions" :key="index">
  10. {{item.name}}
  11. </view>
  12. </view>
  13. </u-form-item>
  14. <!-- <u-form-item label="一级分类" prop="cartypeId" @click="handleCategoryOneChange()">
  15. <u--input readonly v-model="form.cartypeName" placeholder="请选择一级分类" border="bottom"></u--input>
  16. <u-icon slot="right" name="arrow-right"></u-icon>
  17. </u-form-item> -->
  18. <u-form-item label="二级分类" prop="categorytwoId" @click="handleCategoryTwoChange()">
  19. <u--input readonly v-model="form.categorytwoName" placeholder="请选择二级分类" border="bottom"></u--input>
  20. <u-icon slot="right" name="arrow-right"></u-icon>
  21. </u-form-item>
  22. <u-form-item label="标题" prop="goodsName">
  23. <view class="se-flex se-flex-h-c">
  24. <u--input v-model="form.goodsName" type="text" class="se-w-200" placeholder="请填写标题"></u--input>
  25. </view>
  26. </u-form-item>
  27. <u-form-item label="品牌" prop="brand">
  28. <view class="se-flex se-flex-h-c">
  29. <u--input v-model="form.brand" type="text" class="se-w-200" placeholder="请填写品牌"></u--input>
  30. </view>
  31. </u-form-item>
  32. <u-form-item label="型号" prop="model">
  33. <view class="se-flex se-flex-h-c">
  34. <u--input v-model="form.model" type="text" class="se-w-200" placeholder="请填写型号"></u--input>
  35. </view>
  36. </u-form-item>
  37. <u-form-item label="区域" prop="area" @click="handleAreaChange()">
  38. <u--input readonly v-model="form.area" placeholder="请选择地址" border="bottom"></u--input>
  39. <u-icon slot="right" name="arrow-right"></u-icon>
  40. </u-form-item>
  41. <u-form-item label="年限" prop="date" @click="showDate=true">
  42. <u--input border="bottom" v-model="form.date" readonly placeholder="请填写年限"></u--input>
  43. <u-icon slot="right" name="arrow-right"></u-icon>
  44. </u-form-item>
  45. <u-form-item label="公里数" prop="mileage">
  46. <u--input v-model="form.mileage" type="number" placeholder="请填写公里数"></u--input>
  47. </u-form-item>
  48. <u-form-item label="价格" prop="price">
  49. <u--input v-model="form.price" placeholder="请填写价格"></u--input>
  50. <div slot="right" class="se-c-green"></div>
  51. </u-form-item>
  52. <u-form-item label="库存" prop="inventory">
  53. <u--input v-model="form.inventory" type="number" placeholder="请填写库存"></u--input>
  54. </u-form-item>
  55. <u-form-item label="联系人" prop="contacts">
  56. <u--input v-model="form.contacts" placeholder="请填写联系人"></u--input>
  57. </u-form-item>
  58. <u-form-item label="联系人电话" prop="phone">
  59. <u--input v-model="form.phone" type="number" placeholder="请填写电话"></u--input>
  60. </u-form-item>
  61. <u-form-item label="浏览量" prop="views">
  62. <u--input v-model="form.views" placeholder="请填写浏览量"></u--input>
  63. </u-form-item>
  64. <u-form-item prop="fileCarList" labelWidth="0">
  65. <view class="se-flex se-flex-v-sa">
  66. <view class="se-py-20 se-w-p-100 se-flex">
  67. 车辆照片
  68. </view>
  69. <view class="se-py-20 se-w-p-100">
  70. <u-upload :fileList="form.fileCarList" @afterRead="afterCarFront" @delete="delCarFront" multiple :maxCount="5"></u-upload>
  71. </view>
  72. </view>
  73. </u-form-item>
  74. <u-form-item prop="fileFrontList" labelWidth="0">
  75. <view class="se-flex se-flex-v-sa">
  76. <view class="se-py-20 se-w-p-100 se-flex">
  77. 车辆照片()
  78. </view>
  79. <view class="se-py-20 se-w-p-100">
  80. <u-upload :fileList="form.fileFrontList" @afterRead="afterFront" @delete="delFront" multiple :maxCount="5"></u-upload>
  81. </view>
  82. </view>
  83. </u-form-item>
  84. <u-form-item prop="fileBackList" labelWidth="0">
  85. <view class="se-flex se-flex-v-sa">
  86. <view class="se-py-20 se-w-p-100 se-flex">
  87. 车辆照片()
  88. </view>
  89. <view class="se-py-20 se-w-p-100">
  90. <u-upload :fileList="form.fileBackList" @afterRead="afterBack" @delete="delBack" multiple :maxCount="5"></u-upload>
  91. </view>
  92. </view>
  93. </u-form-item>
  94. <u-form-item prop="fileLeftList" labelWidth="0">
  95. <view class="se-flex se-flex-v-sa">
  96. <view class="se-py-20 se-w-p-100 se-flex">
  97. 车辆照片()
  98. </view>
  99. <view class="se-py-20 se-w-p-100">
  100. <u-upload :fileList="form.fileLeftList" @afterRead="afterLeft" @delete="delLeft" multiple :maxCount="5"></u-upload>
  101. </view>
  102. </view>
  103. </u-form-item>
  104. <u-form-item prop="fileRightList" labelWidth="0">
  105. <view class="se-flex se-flex-v-sa">
  106. <view class="se-py-20 se-w-p-100 se-flex">
  107. 车辆照片()
  108. </view>
  109. <view class="se-py-20 se-w-p-100">
  110. <u-upload :fileList="form.fileRightList" @afterRead="afterRight" @delete="delRight" multiple :maxCount="5"></u-upload>
  111. </view>
  112. </view>
  113. </u-form-item>
  114. <u-form-item prop="fileCabList" labelWidth="0">
  115. <view class="se-flex se-flex-v-sa">
  116. <view class="se-py-20 se-w-p-100 se-flex">
  117. 车辆照片(驾驶室)
  118. </view>
  119. <view class="se-py-20 se-w-p-100">
  120. <u-upload :fileList="form.fileCabList" @afterRead="afterCab" @delete="delCab" multiple :maxCount="5"></u-upload>
  121. </view>
  122. </view>
  123. </u-form-item>
  124. <u-form-item label="车辆介绍" labelPosition="top" prop="introduce">
  125. <u--textarea v-model="form.introduce" class="se-mt-20" count
  126. placeholder="请填写车辆介绍"></u--textarea>
  127. </u-form-item>
  128. <u-form-item>
  129. <view class="se-px-20 se-pt-20">
  130. <view class="se-px-20 se-pb-80 se-fs-20 se-flex">
  131. <view @click="onSubmit"
  132. class="se-mx-10 se-flex-1 se-br-40 se-flex-h-c se-h-80 se-lh-80 se-ta-c se-fs-28 se-c-white se-bgc-green">
  133. <text>发布订单</text>
  134. </view>
  135. </view>
  136. </view>
  137. </u-form-item>
  138. </u--form>
  139. <u-datetime-picker
  140. :show="showDate"
  141. v-model="date"
  142. mode="date"
  143. @confirm="onConfirm"
  144. @cancel="onCancel"
  145. ></u-datetime-picker>
  146. <u-action-sheet :actions="categoryOneList" @select="selectCategoryOneClick" title="分类" :show="categoryOneShow" @close="categoryOneShow=false"></u-action-sheet>
  147. <u-action-sheet :actions="categoryTwoList" @select="selectCategoryTwoClick" title="分类" :show="categoryTwoShow" @close="categoryTwoShow=false"></u-action-sheet>
  148. </view>
  149. </template>
  150. <script>
  151. import { queryTypeList,addGoods,queryCategoryOneList,queryCategoryTwoList } from "@/common/api.js"
  152. import QQMapWX from "@/util/qqmap-wx-jssdk.min.js"
  153. export default {
  154. components:{
  155. },
  156. data() {
  157. return {
  158. actions:[],
  159. showType:false,
  160. showDate:false,
  161. date:Number(new Date()),
  162. categoryOneShow:false,
  163. categoryOneList:[],
  164. categoryTwoShow:false,
  165. categoryTwoList:[],
  166. form: {
  167. typeId:"",//类型
  168. cartypeId:"",//一级分类
  169. cartypeName:"",//一级分类名称
  170. categorytwoId:"",//二级分类
  171. categorytwoName:"",//二级分类名称
  172. goodsName:"驾驶式扫地机",//标题
  173. brand:"大众",//品牌
  174. model:"朗逸",//型号
  175. area:"湖南省长沙市岳麓区含光路658号",//区域
  176. latitude:"28.23586",
  177. longitude:"112.931496",
  178. address:'',
  179. date:"2024-12-15",//时间
  180. mileage:"2000",//距离
  181. price:"210000",//价格
  182. inventory:"5",//库存
  183. contacts:"柳川",//联系人
  184. phone:"13189698115",//联系人电话
  185. views:"5",//浏览量
  186. fileCarList:[
  187. {
  188. url:"https://tennis-oss.xzaiyp.top/2024-12-14/7e98056b-e0b9-496f-89f8-88026ce9426e.png"
  189. },
  190. {
  191. url:"https://tennis-oss.xzaiyp.top/2024-12-14/499fcd8a-3d4b-42f3-b023-61bac6b1c020.png"
  192. }
  193. ],//车辆照片
  194. fileFrontList:[
  195. {
  196. url:"https://tennis-oss.xzaiyp.top/2024-12-14/7e98056b-e0b9-496f-89f8-88026ce9426e.png"
  197. },
  198. {
  199. url:"https://tennis-oss.xzaiyp.top/2024-12-14/499fcd8a-3d4b-42f3-b023-61bac6b1c020.png"
  200. }
  201. ],//车辆照片前
  202. fileBackList:[
  203. {
  204. url:"https://tennis-oss.xzaiyp.top/2024-12-14/7e98056b-e0b9-496f-89f8-88026ce9426e.png"
  205. },
  206. {
  207. url:"https://tennis-oss.xzaiyp.top/2024-12-14/499fcd8a-3d4b-42f3-b023-61bac6b1c020.png"
  208. }
  209. ],//车辆照片后
  210. fileLeftList:[
  211. {
  212. url:"https://tennis-oss.xzaiyp.top/2024-12-14/7e98056b-e0b9-496f-89f8-88026ce9426e.png"
  213. },
  214. {
  215. url:"https://tennis-oss.xzaiyp.top/2024-12-14/499fcd8a-3d4b-42f3-b023-61bac6b1c020.png"
  216. }
  217. ],//车辆照片左
  218. fileRightList:[
  219. {
  220. url:"https://tennis-oss.xzaiyp.top/2024-12-14/7e98056b-e0b9-496f-89f8-88026ce9426e.png"
  221. },
  222. {
  223. url:"https://tennis-oss.xzaiyp.top/2024-12-14/499fcd8a-3d4b-42f3-b023-61bac6b1c020.png"
  224. }
  225. ],//车辆照片右
  226. fileCabList:[
  227. {
  228. url:"https://tennis-oss.xzaiyp.top/2024-12-14/7e98056b-e0b9-496f-89f8-88026ce9426e.png"
  229. },
  230. {
  231. url:"https://tennis-oss.xzaiyp.top/2024-12-14/499fcd8a-3d4b-42f3-b023-61bac6b1c020.png"
  232. }
  233. ],//车辆照片 驾驶室
  234. introduce:`车型名称:车辆的品牌和型号,例如 "Toyota Corolla 2024"。
  235. 车辆类型轿车SUVMPV皮卡跑车等
  236. 价格区间可选项适用于市场推广`,//车辆介绍
  237. },
  238. rules: {
  239. typeId:[
  240. {
  241. type: 'string',
  242. required: true,
  243. message: '请选择类型',
  244. trigger: ['blur', 'change']
  245. }
  246. ],
  247. goodsName:[
  248. {
  249. type: 'string',
  250. required: true,
  251. message: '请填写标题',
  252. trigger: ['blur', 'change']
  253. }
  254. ],
  255. brand:[
  256. {
  257. type: 'string',
  258. required: true,
  259. message: '请填写品牌',
  260. trigger: ['blur', 'change']
  261. }
  262. ],
  263. model:[
  264. {
  265. type: 'string',
  266. required: true,
  267. message: '请填写型号',
  268. trigger: ['blur', 'change']
  269. }
  270. ],
  271. area:[
  272. {
  273. type: 'string',
  274. required: true,
  275. message: '请选择所在地区',
  276. trigger: ['blur', 'change']
  277. }
  278. ],
  279. date:[
  280. {
  281. type: 'string',
  282. required: true,
  283. message: '请填写时间',
  284. trigger: ['blur', 'change']
  285. }
  286. ],
  287. mileage:[
  288. {
  289. type: 'string',
  290. required: true,
  291. message: '请填写公里数',
  292. trigger: ['blur', 'change']
  293. }
  294. ],
  295. price:[
  296. {
  297. type: 'string',
  298. required: true,
  299. message: '请填写价格',
  300. trigger: ['blur', 'change']
  301. }
  302. ],
  303. inventory:[
  304. {
  305. type: 'string',
  306. required: true,
  307. message: '请填写库存',
  308. trigger: ['blur', 'change']
  309. }
  310. ],
  311. contacts:[
  312. {
  313. type: 'string',
  314. required: true,
  315. message: '请填写联系人',
  316. trigger: ['blur', 'change']
  317. }
  318. ],
  319. phone:[
  320. {
  321. type: 'string',
  322. required: true,
  323. message: '请填写联系电话',
  324. trigger: ['blur', 'change']
  325. }
  326. ],
  327. views:[
  328. {
  329. type: 'string',
  330. required: true,
  331. message: '请填写浏览量',
  332. trigger: ['blur', 'change']
  333. }
  334. ],
  335. fileCarList:[
  336. {
  337. validator: (rule, value, callback) => {
  338. if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) {
  339. callback(new Error('照片不能为空'));
  340. } else {
  341. callback();
  342. }
  343. },
  344. trigger: 'blur'
  345. }
  346. ],
  347. fileFrontList:[
  348. {
  349. validator: (rule, value, callback) => {
  350. if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) {
  351. callback(new Error('照片不能为空'));
  352. } else {
  353. callback();
  354. }
  355. },
  356. trigger: 'blur'
  357. }
  358. ],
  359. fileBackList:[
  360. {
  361. validator: (rule, value, callback) => {
  362. if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) {
  363. callback(new Error('照片不能为空'));
  364. } else {
  365. callback();
  366. }
  367. },
  368. trigger: 'blur'
  369. }
  370. ],
  371. fileLeftList:[
  372. {
  373. validator: (rule, value, callback) => {
  374. if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) {
  375. callback(new Error('照片不能为空'));
  376. } else {
  377. callback();
  378. }
  379. },
  380. trigger: 'blur'
  381. }
  382. ],
  383. fileRightList:[
  384. {
  385. validator: (rule, value, callback) => {
  386. if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) {
  387. callback(new Error('照片不能为空'));
  388. } else {
  389. callback();
  390. }
  391. },
  392. trigger: 'blur'
  393. }
  394. ],
  395. fileCabList:[
  396. {
  397. validator: (rule, value, callback) => {
  398. if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) {
  399. callback(new Error('照片不能为空'));
  400. } else {
  401. callback();
  402. }
  403. },
  404. trigger: 'blur'
  405. }
  406. ],
  407. }
  408. }
  409. },
  410. onLoad(options) {
  411. this.onQueryTypeList()
  412. this.onQueryCategoryOneList()
  413. this.onQueryCategoryTwoList()
  414. },
  415. watch: {
  416. },
  417. methods: {
  418. handleCategoryOneChange(){
  419. console.info('handleCategoryOneChange')
  420. this.categoryOneShow = true
  421. },
  422. selectCategoryOneClick(event){
  423. console.info(event)
  424. this.form.cartypeId = event.id
  425. this.form.cartypeName = event.name
  426. this.categoryOneShow = false
  427. },
  428. onQueryCategoryOneList(){
  429. let that = this
  430. let params = {}
  431. queryCategoryOneList(params).then(response=>{
  432. console.info("queryCategoryOneList",response)
  433. that.categoryOneList = response.result.records
  434. }).catch(error=>{
  435. })
  436. },
  437. handleCategoryTwoChange(){
  438. console.info('handleCategoryTwoChange')
  439. this.categoryTwoShow = true
  440. },
  441. selectCategoryTwoClick(event){
  442. console.info("selectCategoryTwoClick",event)
  443. this.form.categorytwoId = event.id
  444. this.form.categorytwoName = event.name
  445. this.categoryTwoShow = false
  446. },
  447. onQueryCategoryTwoList(){
  448. let that = this
  449. let params = {
  450. categoryoneId:"1867039853005877250"
  451. }
  452. queryCategoryTwoList(params).then(response=>{
  453. console.info("queryCategoryTwoList",response)
  454. that.categoryTwoList = response.result.records
  455. }).catch(error=>{
  456. })
  457. },
  458. onQueryTypeList(){
  459. queryTypeList({}).then(response=>{
  460. console.info("queryTypeList",response)
  461. this.actions = response.result.records
  462. this.form.typeId = response.result.records[0].id
  463. }).catch(error=>{
  464. })
  465. },
  466. onCancel(){
  467. this.showDate = false
  468. },
  469. onConfirm(e){
  470. console.info('e',e)
  471. const date = new Date(e.value);
  472. const year = date.getFullYear();
  473. const month = String(date.getMonth() + 1).padStart(2, '0');
  474. const day = String(date.getDate()).padStart(2, '0');
  475. this.form.date = `${year}-${month}-${day}`;
  476. this.showDate = false
  477. },
  478. handleAreaChange(){
  479. const that = this;
  480. wx.chooseLocation({
  481. // type: 'wgs84',
  482. success: function (res) {
  483. const qqmapsdk = new QQMapWX({
  484. key: 'TT7BZ-Z3LW4-KOAUB-KWHOA-SBJJ6-Y5B6R' // 必填
  485. });
  486. uni.showLoading({
  487. title:"获取中...."
  488. })
  489. qqmapsdk.reverseGeocoder({
  490. location: {
  491. latitude: res.latitude,
  492. longitude: res.longitude
  493. },
  494. success: function(response) {
  495. console.log('逆地理编码结果:', response);
  496. uni.hideLoading()
  497. that.form.longitude = response.result.location.lng
  498. that.form.latitude = response.result.location.lat
  499. that.form.area = response.result.address
  500. },
  501. fail: function(error) {
  502. uni.hideLoading()
  503. console.error('逆地理编码失败:', error);
  504. }
  505. });
  506. }
  507. })
  508. // this.$refs.citySelectRef.open()
  509. },
  510. handleCartype(event){
  511. this.form.typeId = event.id
  512. },
  513. // 照片
  514. delCarFront(event) {
  515. this.form.fileCarList.splice(event.index, 1)
  516. },
  517. async afterCarFront(e) {
  518. console.info("e",e)
  519. let self = this
  520. e.file.forEach(file => {
  521. self.$Oss.ossUpload(file.url).then(url => {
  522. self.form.fileCarList.push({
  523. url
  524. })
  525. })
  526. })
  527. },
  528. // 前
  529. delFront(event) {
  530. this.form.fileFrontList.splice(event.index, 1)
  531. },
  532. async afterFront(e) {
  533. let self = this
  534. e.file.forEach(file => {
  535. self.$Oss.ossUpload(file.url).then(url => {
  536. self.form.fileFrontList.push({
  537. url
  538. })
  539. })
  540. })
  541. },
  542. // 后
  543. delBack(event) {
  544. this.form.fileBackList.splice(event.index, 1)
  545. },
  546. async afterBack(e) {
  547. let self = this
  548. e.file.forEach(file => {
  549. self.$Oss.ossUpload(file.url).then(url => {
  550. self.form.fileBackList.push({
  551. url
  552. })
  553. })
  554. })
  555. },
  556. // 左
  557. delLeft(event) {
  558. this.form.fileLeftList.splice(event.index, 1)
  559. },
  560. async afterLeft(e) {
  561. let self = this
  562. e.file.forEach(file => {
  563. self.$Oss.ossUpload(file.url).then(url => {
  564. self.form.fileLeftList.push({
  565. url
  566. })
  567. })
  568. })
  569. },
  570. // 左
  571. delRight(event) {
  572. this.form.fileRightList.splice(event.index, 1)
  573. },
  574. async afterRight(e) {
  575. let self = this
  576. e.file.forEach(file => {
  577. self.$Oss.ossUpload(file.url).then(url => {
  578. self.form.fileRightList.push({
  579. url
  580. })
  581. })
  582. })
  583. },
  584. // 车辆照片(驾驶室)
  585. delCab(event) {
  586. this.form.fileCabList.splice(event.index, 1)
  587. },
  588. async afterCab(e) {
  589. let self = this
  590. e.file.forEach(file => {
  591. self.$Oss.ossUpload(file.url).then(url => {
  592. self.form.fileCabList.push({
  593. url
  594. })
  595. })
  596. })
  597. },
  598. onSubmit() {
  599. // console.info(this.form)
  600. // uni.navigateTo({
  601. // url:"/pages_subpack/success/index"
  602. // })
  603. this.$refs.uForm.validate().then(res => {
  604. // uni.$u.toast('校验通过')
  605. this.onAddGoods()
  606. }).catch(errors => {
  607. console.info(errors)
  608. // uni.$u.toast('校验失败')
  609. })
  610. },
  611. onAddGoods(){
  612. let that = this
  613. let params={
  614. // cartypeId:that.form.cartypeId,
  615. // categorytwoId:"1867040891523936258",
  616. cartypeId:that.form.typeId,
  617. categorytwoId:that.form.categorytwoId,
  618. goodsName:that.form.goodsName,//商品名称
  619. brand:that.form.brand,//品牌
  620. model:that.form.model,//型号
  621. area:that.form.area,//所在区域
  622. latitude:that.form.latitude,
  623. longitude:that.form.longitude,
  624. goodsTime:that.form.date,//时间
  625. inventory:that.form.inventory,//库存
  626. mileage:that.form.mileage,//公里数
  627. userName:that.form.contacts,//联系人
  628. phone:that.form.phone,//联系人电话
  629. price:that.form.price,//商品价格
  630. views:that.form.views,//浏览量
  631. image:that.form.fileCarList.map(item => item.url).join(','),//商品图片
  632. imageBack:that.form.fileBackList.map(item => item.url).join(','),//车辆照片(后)
  633. imageCab:that.form.fileCabList.map(item => item.url).join(','),//车辆照片(驾驶室)
  634. imageFront:that.form.fileFrontList.map(item => item.url).join(','),//车辆照片(前)
  635. imageLeft:that.form.fileLeftList.map(item => item.url).join(','),//车辆照片(左)
  636. imageRight:that.form.fileRightList.map(item => item.url).join(','),//车辆照片(右)
  637. detail:that.form.introduce,//车辆介绍
  638. }
  639. addGoods(params).then(response=>{
  640. console.info('response',response)
  641. uni.showToast({
  642. title: response.message,
  643. mask: false,
  644. icon: 'none',
  645. duration: 2000
  646. })
  647. }).catch(error=>{
  648. })
  649. }
  650. },
  651. onReady() {
  652. this.$refs.uForm.setRules(this.rules)
  653. }
  654. }
  655. </script>
  656. <style>
  657. page {
  658. background-color: transparent;
  659. forced-color-adjust: none;
  660. }
  661. </style>