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.
 
 
 
 

1 lines
26 KiB

{"version":3,"sources":["uni-app:///main.js","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/pages/user/editNeeds/index.vue?c9ae","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/pages/user/editNeeds/index.vue?781a","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/pages/user/editNeeds/index.vue?35ef","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/pages/user/editNeeds/index.vue?bc94","uni-app:///pages/user/editNeeds/index.vue","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/pages/user/editNeeds/index.vue?d168","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/pages/user/editNeeds/index.vue?e913"],"names":["createPage","Page"],"mappings":";;;;;;;;;;kDAAA;AACA;AACA,sG;AACAA,UAAU,CAACC,cAAD,CAAV,C;;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkH;AAClH;AACyD;AACL;AACa;;;AAGjE;AAC+M;AAC/M,gBAAgB,uNAAU;AAC1B,EAAE,2EAAM;AACR,EAAE,gFAAM;AACR,EAAE,yFAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,oFAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAAizB,CAAgB,i0BAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACsFr0B,uG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAHA;AACA,iEACA,mB,eAGA,EACA,IADA,kBACA,CACA,SACA,QACA,eADA,EAEA,SAFA,EAGA,uBAHA,EAIA,gBAJA,EAKA,WALA,EAMA,qBANA,EAOA,mBAPA,EADA,EAUA,MAVA,EAWA,SAXA,EAYA,iBAZA,EAaA,kBAbA,GAeA,CAjBA,EAkBA,cAlBA,EAmBA,SAnBA,EAqBA;;uVAGA,kCACA,iBACA,eACA,cADA,IAGA,2BACA,CACA,mBACA;AAAA,SADA,CAGA;AACA,oDACA,CACA,oBAbA,CAaA;AAEA,gCACA,CAxCA,EAyCA,WACA,QADA,oBACA,CADA,EACA,CACA,kCAEA,aACA;AAAA,WADA,CAGA;AACA,mCACA,CAEA,eACA,iCADA,IAGA,CAdA,EAgBA,aAhBA,yBAgBA,CAhBA,EAgBA,CACA;AAAA,SADA,CAGA;AACA,yCACA,CArBA,EAuBA,eAvBA,2BAuBA,CAvBA,EAuBA,CACA,4BACA,wCACA,kCACA;AACA;AADA,SAJA,CAOA;AACA,6EARA,CASA;AACA,mDACA,CAlCA,EAoCA,aApCA,yBAoCA,CApCA,EAoCA,CACA;AAAA,SADA,CAGA;AACA,iDACA,CAzCA,EA2CA,gBA3CA,4BA2CA,CA3CA,EA2CA,CACA;AAAA,SADA,CAGA;AACA,4DACA,CAhDA,EAkDA;AACA,wBAnDA,kCAmDA,kBACA,gFACA;AACA,+BACA,gBACA,4BADA,IAGA,CACA,CAPA;AAQA,KA5DA;;AA8DA,mBA9DA,2BA8DA,CA9DA,EA8DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAvEA;;AAyEA;AACA,aA1EA,qBA0EA,EA1EA,EA0EA;AACA;AACA,cADA;AAEA,UAFA,CAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AANA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBADA;;AAGA;AACA;AACA,OAlCA;AAmCA,KA9GA;;AAgHA,gBAhHA,0BAgHA;AACA;AACA;AACA,wBADA,EADA;;AAIA;AACA,wBADA,EAJA;;AAOA;AACA,wBADA,EAPA;;AAUA;AACA,wBADA,EAVA;;AAaA;AACA,wBADA,EAbA;;;AAiBA;AACA;AACA,2BADA,EADA;;AAIA;AACA,6BADA,EAJA;;AAOA;AACA,2BADA,EAPA;;AAUA;AACA,+BADA,EAVA;;AAaA;AACA,6BADA,EAbA;;;AAiBA;AACA,KApJA;;AAsJA,UAtJA,oBAsJA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA,OAPA;AAQA,KA/JA;;AAiKA,UAjKA,kBAiKA,CAjKA,EAiKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBADA;AAEA,8BAFA;;AAIA,iBAJA,mBAIA,GAJA,EAIA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aARA,MAQA;AACA;AACA;AACA,WAhBA;;;AAmBA,OArBA,MAqBA;AACA;AACA,sBADA;AAEA,4BAFA;;AAIA,iBAJA,mBAIA,GAJA,EAIA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAVA,MAUA;AACA;AACA;AACA,WAlBA;;;AAqBA;AACA,KAzNA;;AA2NA,cA3NA,sBA2NA,MA3NA,EA2NA;AACA;AACA;AACA;AACA,yBADA;AAEA,0BAFA;;AAIA;AACA;AACA,sBADA;;AAGA,WAJA,EAIA,IAJA;AAKA,SAVA,MAUA;AACA;AACA,yBADA;AAEA,0BAFA;AAGA,wBAHA;;AAKA;AACA,OAlBA;AAmBA,KA/OA;;AAiPA,aAjPA,qBAiPA,KAjPA,EAiPA;AACA;AACA,0BADA;AAEA,yBAFA;;AAIA,KAtPA,EAzCA,E;;;;;;;;;;;;;ACxFA;AAAA;AAAA;AAAA;AAAupC,CAAgB,0oCAAG,EAAC,C;;;;;;;;;;;ACA3qC;AACA,OAAO,KAAU,EAAE,kBAKd","file":"pages/user/editNeeds/index.js","sourcesContent":["import 'uni-pages';\nimport Vue from 'vue'\nimport Page from './pages/user/editNeeds/index.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./index.vue?vue&type=template&id=72faab2b&\"\nvar renderjs\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.vue?vue&type=script&lang=js&\"\nimport style0 from \"./index.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\runtime\\\\componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pages/user/editNeeds/index.vue\"\nexport default component.exports","export * from \"-!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--16-0!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./index.vue?vue&type=template&id=72faab2b&\"","var components\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./index.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./index.vue?vue&type=script&lang=js&\"","<template>\r\n<!--pages/user/editNeeds/index.wxml-->\r\n<view class=\"edit-needs-box\">\r\n <view class=\"form-box\">\r\n <form @submit=\"submit\">\r\n <view class=\"form-item chose-box acea-row row-between\">\r\n <view class=\"label\">我是供应/需求</view>\r\n <view> {{form.resourceType == 1 ? '供应' : '需求'}} </view>\r\n </view>\r\n <view class=\"form-item\">\r\n <view class=\"label\">{{form.resourceType == 1 ? '供应' : '需求'}}标题<text class=\"red\">*</text></view>\r\n <view class=\"inp-box\">\r\n <input type=\"text\" :placeholder=\"'我' + (form.resourceType == 1 ? '供应' : '需求') + '...'\" :value=\"form.title\" name=\"title\">\r\n </view>\r\n </view>\r\n <view class=\"form-item\">\r\n <view class=\"label\">{{form.resourceType == 1 ? '供应' : '需求'}}类型<text class=\"red\">*</text></view>\r\n <!-- <view class=\"inp-box\"><input type=\"text\" placeholder=\"我供应/需求...\" value=\"{{form.resourceCagetoryId}}\" name=\"resourceCagetoryId\" /></view> -->\r\n <view class=\"inp-box acea-row-nowrap row-between row-middle\">\r\n <picker class=\"pick-box\" @change=\"resourcesChange\" :value=\"idx\" :range=\"resourcesList\" :range-key=\"'cagetoryName'\" mode=\"selector\">\r\n <view class=\"picker\">{{resourcesList[resourcesIdx].cagetoryName || '请选择'}}</view>\r\n </picker>\r\n <image src=\"/static/images/home/arrow-r.png\" class=\"arrow-d\"></image>\r\n </view>\r\n </view>\r\n <view class=\"form-item\">\r\n <view class=\"label acea-row row-between\">\r\n <view>{{form.resourceType == 1 ? '供应' : '需求'}}内容<text class=\"red\">*</text></view> \r\n <!-- <view class=\"colO\">看看别人怎么写></view> -->\r\n </view>\r\n <view class=\"area-box\">\r\n <textarea :placeholder=\"'请详细描述您的' + (form.resourceType == 1 ? '供应' : '需求')\" :value=\"form.detailedDescription\" name=\"detailedDescription\"></textarea>\r\n </view>\r\n </view>\r\n <view class=\"form-item\">\r\n <view class=\"label\">补充内容/添加图片</view>\r\n <view class=\"upload-box acea-row\">\r\n <image v-for=\"(item, index) in form.resourceImgs\" :key=\"index\" :src=\"item\" mode=\"aspectFill\"></image>\r\n <image src=\"/static/images/upload.png\" @tap=\"upImgs\"></image>\r\n </view>\r\n </view>\r\n <view class=\"form-item\">\r\n <view class=\"label acea-row row-between\">\r\n <view>{{form.resourceType == 1 ? '供应' : '需求'}}预算<text class=\"red\">*</text></view> \r\n <view class=\"tab-box acea-row \">\r\n <view :class=\"'tab-item ' + (active == 1 ? 'tab-a' : '')\" data-i=\"1\" @tap=\"tabClick\">明确预算</view>\r\n <view :class=\"'tab-item ' + (active == 2 ? 'tab-a' : '')\" data-i=\"2\" @tap=\"tabClick\">价格可议</view>\r\n </view>\r\n </view>\r\n <view class=\"inp-box acea-row-nowrap\" v-if=\"active == 1\">\r\n <input type=\"text\" placeholder=\"请输入预算\" :value=\"form.capital\" @input=\"capitalChange\" name=\"capital\">\r\n <text>元</text>\r\n </view>\r\n </view>\r\n <view class=\"form-item\">\r\n <view class=\"label acea-row row-between\">\r\n <view>展示时间</view> \r\n </view>\r\n <view class=\"time-box acea-row row-middle\">\r\n <view class=\"timepick-box\">\r\n <picker @change=\"startTimeChange\" :value=\"form.resourceStartTime\" name=\"resourceStartTime\" mode=\"date\">\r\n <view class=\"picker\">{{form.resourceStartTime || '请选择'}}</view>\r\n </picker>\r\n <image src=\"/static/images/home/arrow-r.png\" class=\"arrow-d\"></image>\r\n </view>\r\n <text class=\"m14\">至</text>\r\n <view class=\"timepick-box\">\r\n <picker @change=\"endTimeChange\" :value=\"form.resourceEndTime\" name=\"resourceEndTime\" mode=\"date\">\r\n <view class=\"picker\">{{form.resourceEndTime || '请选择'}}</view>\r\n </picker>\r\n <image src=\"/static/images/home/arrow-r.png\" class=\"arrow-d\"></image>\r\n </view>\r\n </view>\r\n </view>\r\n <button class=\"submit-btn\" form-type=\"submit\" data-type=\"1\">保存并提交</button>\r\n <button class=\"submit-btn\" form-type=\"submit\" data-type=\"0\">保存到草稿箱</button>\r\n </form>\r\n </view>\r\n \r\n</view>\r\n</template>\r\n\r\n<script>\r\n// pages/user/editNeeds/index.js\r\nconst util = require(\"../../../utils/util.js\");\r\nconst app = getApp();\r\nimport WxValidate from '../../../utils/WxValidate.js';\r\n\r\nexport default {\r\n data() {\r\n return {\r\n form: {\r\n resourceType: 0,\r\n title: '',\r\n detailedDescription: '',\r\n resourceImgs: [],\r\n capital: '',\r\n resourceStartTime: '',\r\n resourceEndTime: ''\r\n },\r\n id: '',\r\n active: 1,\r\n resourcesList: [],\r\n resourcesIdx: null\r\n };\r\n },\r\n components: {},\r\n props: {},\r\n\r\n /**\r\n * 生命周期函数--监听页面加载\r\n */\r\n onLoad: function (options) {\r\n if (options.id) {\r\n this.setData({\r\n id: options.id\r\n });\r\n this.getDetail(options.id);\r\n }\r\n if (options.type) {\r\n this.setData({//['form.resourceType']: Number(options.type)\r\n });\r\n //try fix\r\n this.form.resourceType = Number(options.type);\r\n }\r\n this.initValidate(); //验证规则函数\r\n\r\n this.getResourcesCagetory();\r\n },\r\n methods: {\r\n tabClick(e) {\r\n let i = e.currentTarget.dataset.i;\r\n\r\n if (i == 2) {\r\n this.setData({//['form.capital']: '价格可议'\r\n });\r\n //try fix\r\n this.form.capital = '价格可议';\r\n }\r\n\r\n this.setData({\r\n active: e.currentTarget.dataset.i\r\n });\r\n },\r\n\r\n capitalChange(e) {\r\n this.setData({//['form.capital']: e.detail.value\r\n });\r\n //try fix\r\n this.form.capital = e.detail.value;\r\n },\r\n\r\n startTimeChange(e) {\r\n console.log(e.detail.value);\r\n let timeArr = e.detail.value.split('-');\r\n let year = Number(timeArr[0]) + 1;\r\n this.setData({//['form.resourceStartTime']: e.detail.value\r\n //['form.resourceEndTime']: year + '-' + timeArr[1] + '-' + timeArr[2]\r\n });\r\n //try fix\r\n this.form.resourceEndTime = year + '-' + timeArr[1] + '-' + timeArr[2];\r\n //try fix\r\n this.form.resourceStartTime = e.detail.value;\r\n },\r\n\r\n endTimeChange(e) {\r\n this.setData({//['form.resourceEndTime']: e.detail.value\r\n });\r\n //try fix\r\n this.form.resourceEndTime = e.detail.value;\r\n },\r\n\r\n bindPickerChange(e) {\r\n this.setData({//['form.resourceType']: this.data.typeArr[e.detail.value]\r\n });\r\n //try fix\r\n this.form.resourceType = this.typeArr[e.detail.value];\r\n },\r\n\r\n //获取供应、需求类型\r\n getResourcesCagetory() {\r\n app.http('GET', 'ResourcesCagetory/listResourcesCagetory').then(res => {\r\n // console.log(res)\r\n if (res.data.success) {\r\n this.setData({\r\n resourcesList: res.data.data\r\n });\r\n }\r\n });\r\n },\r\n\r\n resourcesChange(e) {\r\n // console.log(e)\r\n let idx = Number(e.detail.value);\r\n // this.setData({//['form.resourceCagetoryId']: this.data.resourcesList[idx].id\r\n // resourcesIdx: idx,\r\n // });\r\n\t\t\tthis.resourcesIdx = idx;\r\n //try fix\r\n this.form.resourceCagetoryId = this.resourcesList[idx].id;\r\n },\r\n\r\n // 重新发布,获取提交数据\r\n getDetail(id) {\r\n app.http('GET', 'Resources/resourceInfo', {\r\n id: id\r\n }).then(res => {\r\n if (res.data.success) {\r\n let data = res.data.data;\r\n this.setData({//['form.resourceType']: data.resourceType\r\n //['form.title']: data.title\r\n //['form.detailedDescription']: data.detailedDescription\r\n //['form.resourceImgs']: data.resourceImgs\r\n //['form.capital']: data.capital\r\n //['form.resourceStartTime']: data.resourceStartTime\r\n //['form.resourceEndTime']: data.resourceEndTime\r\n });\r\n //try fix\r\n this.form.resourceEndTime = data.resourceEndTime;\r\n //try fix\r\n this.form.resourceStartTime = data.resourceStartTime;\r\n //try fix\r\n this.form.capital = data.capital;\r\n //try fix\r\n this.form.resourceImgs = data.resourceImgs;\r\n //try fix\r\n this.form.detailedDescription = data.detailedDescription;\r\n //try fix\r\n this.form.title = data.title;\r\n //try fix\r\n this.form.resourceType = data.resourceType;\r\n\r\n if (isNaN(Number(data.capital))) {\r\n this.setData({\r\n active: 2\r\n });\r\n }\r\n }\r\n });\r\n },\r\n\r\n initValidate() {\r\n const rules = {\r\n title: {\r\n required: true\r\n },\r\n resourceCagetoryId: {\r\n required: true\r\n },\r\n detailedDescription: {\r\n required: true\r\n },\r\n resourceStartTime: {\r\n required: true\r\n },\r\n resourceEndTime: {\r\n required: true\r\n }\r\n };\r\n const messages = {\r\n title: {\r\n required: '请填写标题'\r\n },\r\n resourceCagetoryId: {\r\n required: '请选择需求类型'\r\n },\r\n detailedDescription: {\r\n required: '请填写内容'\r\n },\r\n resourceEndTime: {\r\n required: '请设置展示开始时间'\r\n },\r\n resourceEndTime: {\r\n required: '请设置展示结束时间'\r\n }\r\n };\r\n this.WxValidate = new WxValidate(rules, messages);\r\n },\r\n\r\n upImgs() {\r\n util.chooseImages2(img => {\r\n let imgs = this.form.resourceImgs;\r\n imgs.push(img);\r\n this.setData({//['form.resourceImgs']: imgs\r\n });\r\n //try fix\r\n this.form.resourceImgs = imgs;\r\n });\r\n },\r\n\r\n submit(e) {\r\n let that = this;\r\n let type = e.detail.target.dataset.type;\r\n let params = e.detail.value;\r\n if (this.id != '') {\r\n params.id = this.id;\r\n }\r\n params.resourceType = that.form.resourceType;\r\n params.resourceCagetoryId = that.form.resourceCagetoryId;\r\n params.resourceImgs = that.form.resourceImgs;\r\n params.capital = that.form.capital;\r\n\r\n if (type == 0) {\r\n params.isDraft = true;\r\n uni.showModal({\r\n title: '提示!',\r\n content: '是否保存到草稿箱?',\r\n\r\n success(res) {\r\n if (res.confirm) {\r\n if (!that.WxValidate.checkForm(params)) {\r\n const error = that.WxValidate.errorList[0];\r\n that.showModal(error);\r\n return false;\r\n }\r\n\r\n that.submitHttp(params);\r\n } else {\r\n console.log('已取消');\r\n }\r\n }\r\n\r\n });\r\n } else {\r\n uni.showModal({\r\n title: '提示!',\r\n content: '是否确认提交?',\r\n\r\n success(res) {\r\n if (res.confirm) {\r\n params.isDraft = false;\r\n\r\n if (!that.WxValidate.checkForm(params)) {\r\n const error = that.WxValidate.errorList[0];\r\n that.showModal(error);\r\n return false;\r\n }\r\n\r\n that.submitHttp(params);\r\n } else {\r\n console.log('已取消');\r\n }\r\n }\r\n\r\n });\r\n }\r\n },\r\n\r\n submitHttp(params) {\r\n app.http('post', 'Resources/create', params).then(res => {\r\n if (res.data.success) {\r\n uni.showToast({\r\n title: '提交成功',\r\n duration: 2000\r\n });\r\n setTimeout(() => {\r\n uni.navigateBack({\r\n delta: 1\r\n });\r\n }, 2000);\r\n } else {\r\n uni.showToast({\r\n title: '请求失败',\r\n duration: 2000,\r\n icon: 'none'\r\n });\r\n }\r\n });\r\n },\r\n\r\n showModal(error) {\r\n uni.showModal({\r\n content: error.msg,\r\n showCancel: false\r\n });\r\n }\r\n\r\n }\r\n};\r\n</script>\r\n<style>\r\n/* pages/user/editNeeds/index.wxss */\r\n.form-box{\r\n width: 100%;\r\n padding: 32rpx 38rpx;\r\n font-size: 28rpx;\r\n color:#666666;\r\n}\r\n.form-item{\r\n margin-bottom: 60rpx;\r\n}\r\n\r\n.red{\r\n color: #FF0000;\r\n}\r\n.colO{\r\n color: #FF6D31;\r\n font-size: 24rpx;\r\n}\r\n.inp-box{\r\n width: 100%;\r\n padding: 10rpx 22rpx;\r\n background: #eee;\r\n color: #666;\r\n margin-top: 36rpx;\r\n}\r\n.pick-box{\r\n width: 92%;\r\n background: #eee;\r\n box-sizing: border-box;\r\n /* padding: 10rpx 22rpx; */\r\n}\r\n.pick-box .picker{\r\n width: 100%;\r\n color: #666666;\r\n}\r\n.inp-box input{\r\n width: 90%;\r\n height: 100%;\r\n}\r\n.area-box{\r\n width: 100%;\r\n height: 290rpx;\r\n padding: 24rpx 22rpx;\r\n background: #eee;\r\n color: #666;\r\n margin-top: 36rpx;\r\n}\r\n.area-box textarea{\r\n width: 100%;\r\n height: 100%;\r\n}\r\n.upload-box{\r\n width: 100%;\r\n height: 140rpx;\r\n margin-top: 26rpx;\r\n}\r\n.upload-box image{\r\n width: 140rpx;\r\n height: 140rpx;\r\n margin-right: 12rpx;\r\n}\r\n\r\n.tab-item{\r\n width: 122rpx;\r\n height: 40rpx;\r\n text-align: center;\r\n line-height: 40rpx;\r\n border: 1px solid #707070;\r\n border-radius: 8rpx;\r\n color: #666;\r\n font-size: 22rpx;\r\n margin-left: 20rpx;\r\n}\r\n.tab-a{\r\n background: linear-gradient(341deg, #FF5100 0%, #FFA782 100%);\r\n color: #fff;\r\n border: none;\r\n}\r\n.time-box{\r\n margin-top: 24rpx;\r\n}\r\n.timepick-box{\r\n width: 308rpx;\r\n height: 60rpx;\r\n background: #eee;\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n padding: 0 20rpx;\r\n}\r\n.timepick-box picker{\r\n width: 100%;\r\n}\r\n.arrow-d{\r\n width: 14rpx;\r\n height: 24rpx;\r\n transform: rotate(90deg);\r\n}\r\n.m14{\r\n margin: 0 14rpx;\r\n}\r\n.submit-btn{\r\n width: 670rpx !important;\r\n height: 76rpx !important;\r\n background: linear-gradient(144deg, #FFA782 0%, #FF5100 100%);\r\n border-radius: 38rpx;\r\n color: #fff;\r\n font-size: 28rpx !important;\r\n line-height: 76rpx !important;\r\n text-align: center;\r\n margin:40rpx auto 20rpx !important;\r\n padding: 0 !important;\r\n}\r\n</style>","import mod from \"-!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--6-oneOf-1-0!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--6-oneOf-1-1!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--6-oneOf-1-2!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--6-oneOf-1-3!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./index.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--6-oneOf-1-0!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--6-oneOf-1-1!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--6-oneOf-1-2!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--6-oneOf-1-3!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./index.vue?vue&type=style&index=0&lang=css&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1634960520893\n var cssReload = require(\"D:/Program Files/HBuilderX.3.1.13.20210514/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"../../\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""}