form.vue 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084
  1. <template name="secondHandrelease">
  2. <view class="fleaMarketForm">
  3. <view class="bannerimg"><image src="https://static.caimei365.com/app/img/bg/secondbg.jpg"></image></view>
  4. <view class="my-maintenance" >
  5. <view class="newsTitle">
  6. <view class="nestext">欢迎您来到采美365网二手商品市场,您可以在这里发布二手设备/产品信息,每个商品需要收取您100元的展示费,展示期为3个月; 为了完整展示您的商品,请您认真填写以下内容,谢谢合作</view>
  7. </view>
  8. <form>
  9. <view class="row fenlei">
  10. <view class="label">分类</view>
  11. <view class="secondradio">
  12. <radio-group class="row-group" @change="secondHandRidio" >
  13. <label class="row-input" v-for="(item, index) in fenlei" :key="index">
  14. <radio class="row-radio" :value="item.value" color="#E15616"/>
  15. <view class="row-text">{{item.name}}</view>
  16. </label>
  17. </radio-group>
  18. </view>
  19. <view class="secondradio Secondary" v-if="isShow" >
  20. <checkbox-group class="row-group" @change="secondHandType">
  21. <label class="row-input" v-for="(item, index) in radioList" :key="item.value" >
  22. <checkbox class="row-check" :value="item.value" ></checkbox>
  23. <view class="row-text">{{item.name}}</view>
  24. </label>
  25. </checkbox-group>
  26. </view>
  27. <view class="linqi_text" v-show="secondParams.secondHandType==2">
  28. <view class="jiaobiao"></view>
  29. <p class="p">临期产品是指临近保质期的产品,距离到期日最好在3个月以上</p>
  30. </view>
  31. </view>
  32. <view class="row">
  33. <view class="label">商品品牌</view>
  34. <view class="select spacing" @click="hanldOperationConfim">
  35. <view class="placeholder" :style="brandname=='请选择品牌名称'?'':'color:#333333'">{{brandname}}</view>
  36. </view>
  37. <text class="iconfont icon-xiayibu"></text>
  38. <!-- 品牌弹窗 -->
  39. <tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup()">
  40. <view class="tui-popup-box clearfix">
  41. <text class="iconfont icon-iconfontguanbi" @click="hidePopup()"></text>
  42. <view class="content">
  43. <view class="freight-radio">
  44. <scroll-view scroll-y style="max-height: 605rpx;">
  45. <radio-group class="row-group" @change="radioChange" >
  46. <label class="row-input" v-for="(item, index) in BrandList" :key="item.id">
  47. <view class="row-text">{{item.name}}</view>
  48. <radio class="row-radio" :value="item.id" color="#E15616"/>
  49. </label>
  50. </radio-group>
  51. </scroll-view>
  52. </view>
  53. </view>
  54. </view>
  55. </tui-bottom-popup>
  56. </view>
  57. <view class="row" v-if="secondParams.brandId==161">
  58. <view class="label">其它品牌</view>
  59. <view class="spacing">
  60. <input type="text" maxlength="40" v-model="secondParams.brandName" placeholder="请输入商品品牌" placeholder-class="placeholder">
  61. </view>
  62. </view>
  63. <view class="row">
  64. <view class="label">商品名称</view>
  65. <view class="spacing">
  66. <input type="text" maxlength="40" v-model="secondParams.name" placeholder="请输入商品名称,不超过40个汉字" placeholder-class="placeholder">
  67. </view>
  68. </view>
  69. <view class="row">
  70. <view class="label">出厂日期</view>
  71. <view class="spacing">
  72. <input type="text" v-model="secondParams.fixedYears" maxlength="10" placeholder="请输入出厂日期 如:2020年06月" placeholder-class="placeholder">
  73. </view>
  74. </view>
  75. <!-- <view class="row" v-show="secondParams.secondHandType==2">
  76. <view class="label second">产品到期日</view>
  77. <view class="spacing second">
  78. <input type="text" v-model="secondParams.maturityYears" maxlength="10" placeholder="请输入产品到期日,如:2020年12月" placeholder-class="placeholder">
  79. </view>
  80. </view> -->
  81. <view class="row">
  82. <view class="label">公司名称</view>
  83. <view class="spacing">
  84. <input type="text" v-model="secondParams.companyName" maxlength="30" placeholder="请输入公司名称,不超过30个汉字" placeholder-class="placeholder">
  85. </view>
  86. </view>
  87. <view class="row">
  88. <view class="label">交易价</view>
  89. <view class="spacing">
  90. <input type="text" maxlength="20" v-model="secondParams.price" placeholder="请输入交易价" placeholder-class="placeholder">
  91. </view>
  92. </view>
  93. <view style="margin-top: 15rpx;">
  94. <label v-model="secondParams.detailTalkFlags" class="iconfont xiangliao"
  95. :class="vShow_detailTalkFlag ? 'icon-jiagexiangliao':'icon-juxingweigouxuan'" @click="Detailed($event)">
  96. <label class='pricecolor' >价格详聊</label>
  97. </label>
  98. <label class="showflag" v-show="vShow_detailTalkFlag">(勾选代表同意不显示交易价)</label>
  99. </view>
  100. <!-- <view class="row" v-show="secondParams.secondHandType==2">
  101. <view class="label">市场价</view>
  102. <view class="spacing">
  103. <input type="text" v-model="secondParams.normalPrice" maxlength="30" placeholder="请输入市场价" placeholder-class="placeholder">
  104. </view>
  105. </view> -->
  106. <!-- <view class="row" v-show="secondParams.secondHandType==2">
  107. <view class="label second">采购价/原价</view>
  108. <view class="spacing second">
  109. <input type="text" v-model="secondParams.originalPrice" maxlength="30" placeholder="请输入采购价/原价" placeholder-class="placeholder"/>
  110. </view>
  111. </view>
  112. <view class="row" v-show="secondParams.secondHandType==2">
  113. <view class="label">数量</view>
  114. <view class="spacing">
  115. <input type="text" v-model="secondParams.stock" maxlength="30" placeholder="请输入数量" placeholder-class="placeholder">
  116. </view>
  117. </view> -->
  118. <view class="row">
  119. <view class="label">商品成色</view>
  120. <view class="spacing">
  121. <input type="text" maxlength="10" v-model="secondParams.productQuality" placeholder="请输入商品成色,如“9成新”" placeholder-class="placeholder">
  122. </view>
  123. </view>
  124. <view class="row">
  125. <view class="label">联系人</view>
  126. <view class="spacing">
  127. <input type="text" maxlength="15" v-model="secondParams.contactName" placeholder="请输入联系人姓名" placeholder-class="placeholder">
  128. </view>
  129. </view>
  130. <view class="row">
  131. <view class="label">联系方式</view>
  132. <view class="spacing">
  133. <input type="text" v-model="secondParams.contactMobile" maxlength="11" placeholder="请输入联系人手机号" placeholder-class="placeholder">
  134. </view>
  135. </view>
  136. <view class="row none">
  137. <view class="label-im">身份验证照片</view>
  138. <view class="label-em">(个人请上传身份证正面照片;机构请上传营业执照照片)</view>
  139. <view class="release-input upload image uploadGoodsImages" >
  140. <view class="upload-file" v-if="secondParams.authenticationImage == ''">
  141. <i class="iconfont icon-shangchuantupian"></i>
  142. <text class="add-text">验证照片</text>
  143. <view ref="goodsImages" class="input-file" @click="uploadUserImageFn"></view>
  144. </view>
  145. <view class="upload-file" v-else>
  146. <image :src="secondParams.authenticationImage" alt="" class="upload-img" ></image>
  147. <i class=" del iconfont icon-shanchu1" @click="removeUserImageFn"></i>
  148. </view>
  149. </view>
  150. </view>
  151. <view class="row">
  152. <view class="label">采美对接人</view>
  153. <view class="spacing">
  154. <input type="text" v-model="secondParams.dockingPeopleName" maxlength="15" placeholder="请输入采美对接人姓名" placeholder-class="placeholder">
  155. </view>
  156. </view>
  157. <view class="row">
  158. <view class="label">对接人联系方式</view>
  159. <view class="spacing">
  160. <input type="text" v-model="secondParams.dockingPeopleMobile" maxlength="11" placeholder="请输入采美对接人手机号" placeholder-class="placeholder">
  161. </view>
  162. </view>
  163. <view class="row">
  164. <view class="label">商品类型</view>
  165. <view class="secondradio">
  166. <radio-group class="row-group" @change="getProductType" >
  167. <label class="row-input" v-for="(item, index) in beauty" :key="index">
  168. <radio class="row-radio" :value="item.value" color="#E15616"/>
  169. <view class="row-text">{{item.name}}</view>
  170. </label>
  171. </radio-group>
  172. </view>
  173. </view>
  174. <view class="row" >
  175. <view class="label">联系地址</view>
  176. <view class="spacing" @click="showMulLinkageThreePicker">
  177. <text class="row-input" :class="addressData.address === '请选择所在地区' ? 'none,placeholder' : ''" >
  178. {{addressData.address}}
  179. </text>
  180. </view>
  181. <text class="iconfont icon-xiayibu"></text>
  182. </view>
  183. <textarea type="text"
  184. class="border-grey address-details"
  185. v-model="secondParams.address"
  186. maxlength="50"
  187. placeholder="请填写详细地址,如街道/小区/门牌等"
  188. placeholder-class="placeholder"/>
  189. </textarea>
  190. <view class="release-main-container">
  191. <view class="release-from">
  192. <view class="label">商品图片</view>
  193. <view class="release-input upload image uploadGoodsImages" >
  194. <view class="upload-file" v-if="GoodsImagesList.length<5">
  195. <i class="iconfont icon-shangchuantupian"></i>
  196. <p class="add-text">商品图片</p>
  197. <view ref="goodsImages" class="input-file" @click="uploadGoodsImagesFn"></view>
  198. </view>
  199. <view class="upload-file" v-for="(item, index) in GoodsImagesList" :key="index">
  200. <image :data-original='item' :src="item" :data-image="item" alt="" class="upload-img" ></image>
  201. <i class=" del iconfont icon-shanchu1" @click="removeGoodsImagesFn(index)"></i>
  202. </view>
  203. </view>
  204. <view class="form-upload-tips">
  205. <i class="iconfont icon-wenhao" ></i>
  206. <view class="wen-tips" >最多上传5张二手商品图片,请尽量全部上传,单张图片不能超过5M</view>
  207. </view>
  208. </view>
  209. </view>
  210. <view class="row">
  211. <view class="label">二手出让承诺函文件</view>
  212. <view class="spacing file-none" v-if="secondParams.fileName == ''">
  213. <view class="file-none-button" @click="uploadCommitmentFile">上传</view>
  214. </view>
  215. <view class="spacing file-text" v-else>
  216. <text class="file-text-em">{{ secondParams.fileName }}</text>
  217. <i class=" del iconfont icon-shanchu1" @click="deleteCommitmentFile"></i>
  218. </view>
  219. </view>
  220. <view class="row none">
  221. <view class="label-im">二手出让承诺函图片</view>
  222. <view class="label-em">(若不方便上传承诺函文件,可对承诺函进行拍照或者截图,再上传图片)</view>
  223. <view class="release-input upload image uploadGoodsImages" >
  224. <view class="upload-file" v-if="secondParams.commitmentImage == ''">
  225. <i class="iconfont icon-shangchuantupian"></i>
  226. <text class="add-text">承诺函图片</text>
  227. <view ref="goodsImages" class="input-file" @click="uploadCommitmentImageFn"></view>
  228. </view>
  229. <view class="upload-file" v-else>
  230. <image :src="secondParams.commitmentImage" alt="" class="upload-img" ></image>
  231. <i class=" del iconfont icon-shanchu1" @click="removeCommitmentImageFn"></i>
  232. </view>
  233. </view>
  234. </view>
  235. <view class="productinfo">
  236. <view class="label unlogin-label" style="width: 100%;">商品详细信息</view>
  237. <div class="textarea-wrapper">
  238. <textarea class="textarea"
  239. type="text"
  240. v-model="secondParams.productDetails"
  241. placeholder="请填写商品详细信息,对商品进行更详细的描述"
  242. placeholder-class="placeholder"
  243. maxlength="200"
  244. @input="onTextareaInputInfo"
  245. />
  246. <span class="word-limit">{{secondParams.productDetails.length}}/200</span>
  247. </div>
  248. </view>
  249. <view class="productinfo">
  250. <view class="label unlogin-label" style="width: 100%;">免责声明</view>
  251. <text class="smText" >鉴于本网站提供的二手版块信息包括但不限于公司名称,商品的简介、性能、描述与说明,相关图片、视频等均由卖家自行提供,由卖家对其提供的信息承担相应法律责任。买家应自行甄别商品信息并查验商品性状。本网站对二手版块中买卖双方的交易不提供任何形式的担保与保证,特此声明!</text>
  252. </view>
  253. <view class="row Read">
  254. <span @click="changeBox($event)" class="iconfont xiangliao"
  255. :class="checkbox?'icon-jiagexiangliao':'icon-juxingweigouxuan'" ><span style="margin-left: 10rpx;">已阅读</span></span>
  256. </view>
  257. <view class="BtnAll" :style="{ paddingBottom :isIphoneX ? '68rpx' : '0rpx' }">
  258. <view @click="submitBtn" class="btn-submit">发布</view>
  259. </view>
  260. </form>
  261. <!-- 地址弹窗 -->
  262. <mpvue-city-picker :themeColor="themeColor"
  263. ref="mpvueCityPicker"
  264. :pickerValueDefault="cityPickerValueDefault"
  265. @onCancel="onCancel"
  266. @onConfirm="onConfirm">
  267. </mpvue-city-picker>
  268. </view>
  269. <view class="secondBj thebj" v-show="vShow_secondBj" :class="vShow_secondBj?'show':''">
  270. <view class="bjmain theresult">
  271. <span class="title">发布提示</span>
  272. <p>发布二手商品,采美需要收取您每个商品100元的展示费,展示期为3个月</br>
  273. 支付完成后,商品会在1-2个工作日内进行审核,审核通过后,商品会立即上线</p>
  274. <view class="paybtn">
  275. <view class="thegopay gozhofubao" @click.stop="cancel">取消发布</view>
  276. <view class="cancel closebtn" @click.stop="gopay">去支付</view>
  277. </view>
  278. </view>
  279. </view>
  280. <payment-record ref="payment" v-if="isRequest" :discernReceiptList="discernReceiptList" :receiptAmount="receiptAmount"></payment-record>
  281. </view>
  282. </template>
  283. <script>
  284. import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
  285. import paymentRecord from '@/components/cm-module/orderDetails/paymentRecord'
  286. import { uploadFileImage , uploadFilePdf } from "@/services/public.js"
  287. import authorize from '@/common/config/authorize.js'
  288. import $reg from '@/common/config/common.js'
  289. import { mapState,mapMutations } from 'vuex';
  290. export default{
  291. name:'secondHandrelease',
  292. components:{
  293. mpvueCityPicker,
  294. paymentRecord,
  295. },
  296. data(){
  297. return{
  298. userIdentity:0,
  299. popupShow:false,
  300. fenlei:[
  301. {name:'二手仪器',value:'1'},
  302. // {name:'临期产品',value:'2'},
  303. {name:'其他',value:'3'},
  304. ],
  305. radioList:[
  306. {name:'轻光电',value:'1',isChecked:false},
  307. {name:'重光电',value:'2',isChecked:false},
  308. {name:'耗材配件',value:'3',isChecked:false},
  309. ],
  310. beauty:[
  311. {name:'医美',value:'1'},
  312. {name:'非医美',value:'2'},
  313. ],
  314. BrandList:[],
  315. isShow:false,
  316. GoodsImagesList:[''],
  317. secondParams:{
  318. secondHandType:'',//一级分类
  319. instrumentType:'',//二手仪器分类
  320. name:'',
  321. brandId:'',//品牌ID
  322. brandName:'',//其他品牌
  323. fixedYears:'',//出厂
  324. companyName:'',//公司名称
  325. maturityYears:'',//产品到期
  326. price:'',//交易价
  327. detailTalkFlag:1,//是否启用详聊
  328. normalPrice:'',//市场价
  329. originalPrice:'',//采购价
  330. stock:'',//数量
  331. productQuality:'',//商品成色
  332. contactName:'',//联系人
  333. contactMobile:'',//联系方式
  334. authenticationImage:'',//身份验证图片
  335. commitmentImage:'',//承诺函图片
  336. dockingPeopleName:'',//采美对接人姓名
  337. dockingPeopleMobile:'',//采美对接人手机号
  338. secondProductType:'',//
  339. townId:'',//县区地址
  340. address:'',//详细地址
  341. image:'',//图片
  342. fileName:'',
  343. ossName:'',
  344. productDetails:'',//商品详细信息
  345. source:2//二手发布来源.1:WWW,2:小程序,3:后台,4:协销
  346. },
  347. addressData:{
  348. address:'请选择所在地区',
  349. townID:'', //区ID
  350. cityID:'', //区ID
  351. provinceID:'', //区ID
  352. addressDetail: '', //地址
  353. },
  354. brandname:'请选择品牌名称',
  355. checkbox:false,
  356. shoplogoTwo:false,
  357. vShow_secondBj:false,
  358. resultBj:false,
  359. vShow_detailTalkFlag:false,
  360. playid:'',
  361. }
  362. },
  363. methods:{
  364. onTextareaInputInfo(e){
  365. this.secondParams.productDetails = e.detail.value;
  366. },
  367. radioChange(e){//品牌
  368. this.secondParams.brandId = e.target.value;
  369. this.BrandList.forEach((item,index)=>{
  370. if(item.id==this.secondParams.brandId){
  371. this.brandname = item.name;
  372. this.popupShow = false;
  373. }
  374. })
  375. },
  376. showMulLinkageThreePicker() {//三级地址联动
  377. this.isShowInput = true
  378. this.$refs.mpvueCityPicker.show()
  379. },
  380. onConfirm(e) {//获取选择的地址信息
  381. this.addressData.address = e.name;
  382. this.addressData.townID = e.townCode;
  383. this.addressData.cityID = e.cityCode;
  384. this.addressData.provinceID = e.provinceCode;
  385. this.secondParams.townId = this.addressData.townID;
  386. },
  387. hanldOperationConfim(){
  388. this.popupShow = true;
  389. },
  390. hidePopup(){
  391. this.popupShow = false;
  392. },
  393. secondHandRidio(e) {
  394. this.secondParams.secondHandType = e.target.value;
  395. if (e.target.value == 1){
  396. this.isShow = true;
  397. }else {
  398. this.isShow = false;
  399. }
  400. },
  401. secondHandType(e){ //二手仪器
  402. this.secondParams.instrumentType = e.target.value.toString();
  403. },
  404. Detailed(){
  405. this.vShow_detailTalkFlag = !this.vShow_detailTalkFlag;
  406. if(this.vShow_detailTalkFlag){
  407. this.secondParams.detailTalkFlag = 2 ;//启用价格详聊
  408. }else {
  409. this.secondParams.detailTalkFlag = 1 ;//不启用价格详聊
  410. }
  411. },
  412. uploadGoodsImagesFn(event){//上传商品图片
  413. uploadFileImage().then(res =>{
  414. this.GoodsImagesList.push(JSON.parse(res.data).data);
  415. this.secondParams.image =this.GoodsImagesList.toString()+',';
  416. })
  417. },
  418. uploadUserImageFn(event){//上传身份图片
  419. uploadFileImage().then(res =>{
  420. this.secondParams.authenticationImage = JSON.parse(res.data).data;
  421. })
  422. },
  423. uploadCommitmentImageFn(event){//上传承诺函图片
  424. uploadFileImage().then(res =>{
  425. this.secondParams.commitmentImage = JSON.parse(res.data).data;
  426. })
  427. },
  428. uploadCommitmentFile(){//上传承诺函文件
  429. uploadFilePdf().then(res =>{
  430. console.log(res.data)
  431. let data = JSON.parse(res.data).data
  432. this.secondParams.fileName = data.fileName;
  433. this.secondParams.ossName = data.ossName;
  434. })
  435. },
  436. deleteCommitmentFile(){//删除承诺函文件
  437. this.secondParams.fileName = ''
  438. },
  439. removeGoodsImagesFn(index){//删除商品图片
  440. this.GoodsImagesList.splice(index,1);
  441. this.secondParams.image =this.GoodsImagesList.toString()+',';
  442. },
  443. removeUserImageFn(index){//删除身份图片
  444. this.secondParams.authenticationImage = ''
  445. },
  446. removeCommitmentImageFn(index){//删除承诺函图片
  447. this.secondParams.commitmentImage = ''
  448. },
  449. getProductType(e){
  450. this.secondParams.secondProductType = e.target.value ;
  451. },
  452. submitBtn () {
  453. if(this.secondParams.secondHandType == ''){
  454. this.$util.msg('请选择分类',2000);
  455. return;
  456. }
  457. if(this.secondParams.secondHandType == 1 ){
  458. if(this.secondParams.instrumentType ==''){
  459. this.$util.msg('请完善仪器分类',2000);
  460. return;
  461. }
  462. }
  463. if(this.secondParams.brandId == ''){
  464. this.$util.msg('请选择商品品牌',2000);
  465. return;
  466. }
  467. if(this.secondParams.name == ''){
  468. this.$util.msg('请输入商品名称',2000);
  469. return
  470. }
  471. // if(this.secondParams.secondHandType ==2) {
  472. // if (this.secondParams.maturityYears=='') {
  473. // this.$util.msg('请输入产品到期日',2000);
  474. // return
  475. // }
  476. // }
  477. if(!this.$api.isNumber(this.secondParams.price)){
  478. this.$util.msg('请输入交易价',2000);
  479. return
  480. }
  481. // if(this.secondParams.secondHandType ==2) {
  482. // if (!this.$api.isNumber(this.secondParams.normalPrice)) {
  483. // this.$util.msg('请输入市场价',2000);
  484. // return
  485. // }
  486. // if(!this.$api.isNumber(this.secondParams.originalPrice)){
  487. // this.$util.msg('请输入采购价/原价',2000);
  488. // return
  489. // }
  490. // if(!this.$api.isNumber(this.secondParams.stock)){
  491. // this.$util.msg('请输入数量',2000);
  492. // return
  493. // }
  494. // }
  495. if(this.secondParams.productQuality == ''){
  496. this.$util.msg('请输入商品成色',2000);
  497. return
  498. }
  499. if(this.secondParams.contactName == ''){
  500. this.$util.msg('请输入联系人姓名',2000);
  501. return
  502. }
  503. if(this.secondParams.contactMobile == ''){
  504. console.log(this.secondParams.contactMobile)
  505. this.$util.msg('请输入联系方式',2000);
  506. return
  507. }
  508. if(!$reg.isMobile(this.secondParams.contactMobile)){
  509. this.$util.msg('请填写正确的手机号',2000);
  510. return
  511. }
  512. if(this.userIdentity === 1){
  513. if(this.secondParams.dockingPeopleName == ''){
  514. this.$util.msg('请输入采美对接人姓名',2000);
  515. return
  516. }
  517. if(this.secondParams.dockingPeopleMobile == ''){
  518. this.$util.msg('请输入采美对接人手机号',2000);
  519. return
  520. }
  521. }
  522. if(this.secondParams.dockingPeopleMobile !=''){
  523. if(!$reg.isMobile(this.secondParams.dockingPeopleMobile)){
  524. this.$util.msg('请填写正确的采美对接人手机号',2000);
  525. return
  526. }
  527. }
  528. if(this.secondParams.townId == ''|| this.secondParams.townId == undefined){
  529. this.$util.msg('请完善联系地址',2000);
  530. return
  531. }
  532. if(this.secondParams.address == ''){
  533. this.$util.msg('请填写详细地址',2000);
  534. return
  535. }
  536. if(this.GoodsImagesList ==''){
  537. this.$util.msg('请上传图片',2000);
  538. return;
  539. }
  540. if(this.checkbox==false){
  541. this.$util.msg('请勾选已阅读',2000);
  542. return
  543. }
  544. console.log(this.secondParams)
  545. this.SecondService.SecondHandProduct(this.secondParams).then(res=>{ //提交发布
  546. this.vShow_secondBj = true;
  547. this.playid= res.data;
  548. }).catch(error =>{
  549. this.$util.msg(error.msg,2000)
  550. this.secondBj = false;
  551. return
  552. })
  553. },
  554. cancel(){
  555. this.vShow_secondBj = false;
  556. },
  557. gopay(){
  558. this.MiniWxPayFor()
  559. this.vShow_secondBj = false;
  560. },
  561. MiniWxPayFor(){
  562. authorize.getCode('weixin').then(wechatcode =>{
  563. let params ={
  564. code:wechatcode,
  565. productId:this.playid
  566. }
  567. this.PayService.SecondHandPay(params).then(response =>{
  568. let PayInfo = JSON.parse(response.data.data.payInfo);
  569. this.WxRequestPayment(PayInfo)
  570. }).catch(error =>{
  571. this.$util.msg(error.msg,2000)
  572. })
  573. })
  574. },
  575. WxRequestPayment(data){
  576. let self = this
  577. wx.requestPayment({
  578. 'timeStamp': data.timeStamp,
  579. 'nonceStr': data.nonceStr,
  580. 'package': data.package,
  581. 'signType': data.signType,
  582. 'paySign': data.paySign,
  583. 'success':function(res){
  584. wx.reLaunch({url: 'second/pages/product/product-list'});
  585. },
  586. 'fail':function(res){
  587. self.$util.msg('用户取消支付~')
  588. },
  589. 'complete':function(res){
  590. }
  591. })
  592. },
  593. changeBox:function () {
  594. this.checkbox = !this.checkbox;
  595. },
  596. },
  597. onShow() {
  598. this.SecondService.brandList().then(res =>{//品牌列表
  599. if(res.code == 0){
  600. this.BrandList = res.data;
  601. }
  602. })
  603. this.$api.getComStorage('userInfo').then((resolve) =>{
  604. this.userIdentity = resolve.userIdentity
  605. console.log(this.userIdentity)
  606. }).catch(error =>{
  607. console.log(error)
  608. })
  609. }
  610. }
  611. </script>
  612. <style lang="scss">
  613. view{font-size: 28rpx;}
  614. .my-maintenance{
  615. padding: 20rpx;
  616. }
  617. .bannerimg {
  618. height: 66rpx;
  619. width: 100%;
  620. }
  621. .bannerimg image{
  622. width: 100%;
  623. height: 100% ;
  624. }
  625. .newsTitle {
  626. line-height: 48rpx;
  627. text-align: left;
  628. color: #e15616;
  629. padding:20rpx;
  630. background-color: rgba(225, 86, 22, .1);
  631. }
  632. .nestext{
  633. font-size: 24rpx;
  634. }
  635. .secondradio view{
  636. display: inline-block;
  637. color: #333333;
  638. margin-right: 21rpx;
  639. }
  640. .secondradio{
  641. display: inline-block;
  642. margin-left: 40rpx;
  643. }
  644. .Secondary{
  645. margin-left: 96rpx;
  646. }
  647. .secondradio view.active {
  648. color: #e15616;
  649. }
  650. .placeholder{
  651. color: #b2b2b2;
  652. }
  653. .linqi_text {
  654. width: 607rpx;
  655. height: 68rpx;
  656. background-color: #1890f9;
  657. box-shadow: 0rpx 4rpx 6rpx 0rpx rgba(24, 144, 249, 0.17);
  658. text-align: center;
  659. line-height: 68rpx;
  660. color: #ffffff;
  661. margin: auto;
  662. font-size:24rpx;
  663. position: relative;
  664. }
  665. .jiaobiao {
  666. width: 0;
  667. height: 0;
  668. border-left: 20rpx solid transparent;
  669. border-right: 20rpx solid transparent;
  670. top: -25%;
  671. right: 40%;
  672. border-bottom: 20rpx solid #1890f9;
  673. position: absolute;
  674. }
  675. .label{
  676. color: #666666;
  677. display: inline-block;
  678. }
  679. .label-im{
  680. width: 100%;
  681. line-height: 50rpx;
  682. font-size: $font-size-28;
  683. color: #666666;
  684. text-align: left;
  685. margin-top: 20rpx;
  686. }
  687. .label-em{
  688. line-height: 28rpx;
  689. font-size: $font-size-20;
  690. color: #fea785;
  691. width: 100%;
  692. text-align: left;
  693. }
  694. .label.second{
  695. width: 155rpx;
  696. }
  697. .row .spacing.second{
  698. width: 70%;
  699. }
  700. .row{
  701. border-bottom: 2rpx solid #e1e1e1;
  702. line-height: 90rpx;
  703. height: auto;
  704. position: relative;
  705. &.none{
  706. border-bottom: none;
  707. }
  708. }
  709. .row.fenlei{
  710. height: auto;
  711. margin: 10rpx 0;
  712. border: 0;
  713. }
  714. .select {
  715. position: relative;
  716. color: #b2b2b2;
  717. text-align: left;
  718. user-select: none;
  719. }
  720. .row .spacing{
  721. display: inline-block;
  722. margin-left: 50rpx;
  723. width: 430rpx;
  724. vertical-align:middle;
  725. position: relative;
  726. &.file{
  727. width: 400rpx;
  728. }
  729. &.file-text{
  730. width: 400rpx;
  731. line-height: 44rpx;
  732. font-size: 28rpx;
  733. padding-right: 40rpx;
  734. box-sizing: border-box;
  735. .file-text-em{
  736. width: 400rpx;
  737. text-overflow: ellipsis;
  738. overflow: hidden;
  739. display: -webkit-box;
  740. -webkit-line-clamp: 1;
  741. line-clamp: 1;
  742. -webkit-box-orient: vertical;
  743. line-height: 44rpx;
  744. font-size: 28rpx;
  745. padding-right: 40rpx;
  746. box-sizing: border-box;
  747. position: relative;
  748. }
  749. .icon-shanchu1{
  750. width: 40rpx;
  751. height: 40rpx;
  752. line-height: 40rpx;
  753. display: block;
  754. position: absolute;
  755. top: 0;
  756. right:0;
  757. color: #f94b4b;
  758. font-size: 36rpx;
  759. }
  760. }
  761. &.file-none{
  762. width: 400rpx;
  763. position: relative;
  764. .file-none-button{
  765. width: 88rpx;
  766. height: 44rpx;
  767. background-color: #e15616;
  768. border-radius: 8rpx;
  769. line-height: 44rpx;
  770. text-align: center;
  771. font-size: 24rpx;
  772. color: #FFFFFF;
  773. position: absolute;
  774. right: 0;
  775. top: -15rpx;
  776. }
  777. }
  778. }
  779. .select .placeholder {
  780. position: relative;
  781. cursor: pointer;
  782. width: 100%;
  783. display: inline-block;
  784. }
  785. .icon-xiayibu{
  786. right: 0rpx;
  787. color: #b2b2b2;
  788. position: absolute;
  789. }
  790. .xiangliao{
  791. font-size: 26rpx;
  792. margin-right: 10rpx;
  793. color: #b2b2b2;
  794. }
  795. .icon-jiagexiangliao{
  796. color: #e15616 !important;
  797. }
  798. .pricecolor{
  799. margin-left: 10rpx;
  800. }
  801. .showflag{
  802. color: #b2b2b2;
  803. }
  804. .border-grey{
  805. width: 100%;
  806. resize: none;
  807. padding: 20rpx 0;
  808. height: 160rpx;
  809. border-bottom: 2rpx solid #e1e1e1;
  810. }
  811. .release-main-container {
  812. overflow: hidden;
  813. margin: 20rpx 0;
  814. }
  815. .uploadGoodsImages{
  816. display: flex;
  817. overflow-x: auto;
  818. overflow-y: hidden;
  819. }
  820. .secondradio{
  821. .row-radio{
  822. transform: scale(.8);
  823. }
  824. .row-input{margin-right: 10rpx;}
  825. }
  826. .linqi_text .p{
  827. font-size: $font-size-20;
  828. }
  829. .upload-file {
  830. float: left;
  831. margin: 20rpx 20rpx 20rpx 0px;
  832. cursor: pointer;
  833. width: 194rpx;
  834. height: 194rpx;
  835. border-radius: 6rpx;
  836. border: solid 2rpx #e1e1e1;
  837. flex-shrink: 0;
  838. position: relative;
  839. display: inline-block;
  840. }
  841. .input-file {
  842. width: 194rpx;
  843. height: 194rpx;
  844. opacity: 0;
  845. cursor: pointer;
  846. position: absolute;
  847. }
  848. .add-text {
  849. font-size: 26rpx;
  850. color: #333330;
  851. opacity: 0.5;
  852. position: absolute;
  853. top: 55%;
  854. right:24%;
  855. }
  856. .upload-img {
  857. width: 100%;
  858. height: 100%;
  859. display: block;
  860. border-radius: .53vw;
  861. }
  862. .icon-shangchuantupian{
  863. width: 46rpx;
  864. height: 46rpx;
  865. color: #b2b2b2;
  866. font-size: 18px;
  867. position: absolute;
  868. top: 30%;
  869. left: 40%;
  870. }
  871. .icon-shanchu1{
  872. width: 40rpx;
  873. height: 40rpx;
  874. line-height: 40rpx;
  875. display: block;
  876. position: absolute;
  877. top: -15rpx;
  878. right:-18rpx;
  879. color: #f94b4b;
  880. font-size: 36rpx;
  881. }
  882. .wen-tips {
  883. width: 664rpx;
  884. height: 68rpx;
  885. line-height: 68rpx;
  886. text-align: center;
  887. color: #FFF;
  888. font-size: 20rpx;
  889. background-color: #1890f9;
  890. box-shadow: 0 0.8vw 1.6vw 0 rgba(24, 144, 249, 0.17);
  891. border-radius: 2rpx;
  892. display: none;
  893. }
  894. .form-upload-tips:hover .wen-tips {
  895. display: block;
  896. }
  897. .textarea-wrapper {
  898. letter-spacing: 2rpx;
  899. line-height: 48rpx;
  900. color: #333333;
  901. position: relative;
  902. font-size: 28rpx;
  903. border: 2rpx solid #b2b2b2;
  904. height: 300rpx;
  905. padding: 16rpx;
  906. border-radius: 6rpx;
  907. margin: 20rpx 0;
  908. }
  909. .textarea-wrapper textarea{
  910. width: 100%;
  911. }
  912. .word-limit {
  913. position: absolute;
  914. right: 2.7vw;
  915. bottom: 2.7vw;
  916. font-size: 3.2vw;
  917. color: #9aa5b5;
  918. }
  919. .smText{
  920. color: #999999;
  921. text-align: left;
  922. line-height: 42rpx;
  923. font-size: 24rpx;
  924. margin-top: 10rpx;
  925. width: 100%;
  926. height: 260rpx;
  927. }
  928. .BtnAll{
  929. width: 100%;
  930. margin-bottom: 20rpx;
  931. .btn-submit{
  932. width: 600rpx;
  933. height: 90rpx;
  934. margin: auto;
  935. text-align: center;
  936. line-height: 90rpx;
  937. color: #fff;
  938. background-image: linear-gradient(315deg,
  939. #f28f31 0%,
  940. #e15616 100%);
  941. border-radius: 90rpx;
  942. font-size: 30rpx;
  943. }
  944. }
  945. .row.Read{
  946. border: 0;
  947. text-align: center;
  948. color: #999999;
  949. }
  950. .thebj {
  951. position: fixed;
  952. left: 0;
  953. top: 0;
  954. bottom: 0;
  955. width: 100%;
  956. height: 100%;
  957. background-color: rgba(0, 0, 0, .5);
  958. z-index: 999999;
  959. opacity: 0;
  960. }
  961. .thebj.show{
  962. opacity: 1;
  963. }
  964. .theresult {
  965. position: absolute;
  966. top: 50%;
  967. left: 50%;
  968. transform: translate(-50%, -50%);
  969. width:580rpx;
  970. background-color: #fff;
  971. border-radius: 32rpx;
  972. }
  973. .theresult .title{
  974. line-height: 100rpx;
  975. text-align: center;
  976. display: block;
  977. color: #333333;
  978. font-size: 30rpx;
  979. font-weight: bold;
  980. border-bottom: 2rpx solid #efefef;
  981. }
  982. .theresult p{
  983. padding: 30rpx 52rpx;
  984. line-height: 48rpx;
  985. color: #666666;
  986. font-size: 30rpx;
  987. }
  988. .paybtn view{
  989. width: 290rpx;
  990. height: 90rpx;
  991. text-align: center;
  992. line-height: 90rpx;
  993. font-size: 30rpx;
  994. display: inline-block;
  995. }
  996. .paybtn .cancel{
  997. background-image: linear-gradient(270deg, #f28f31 0%, #e15616 100%);
  998. border-radius: 0rpx 0rpx 32rpx 0rpx;
  999. color: #fff;
  1000. }
  1001. .paybtn .thegopay{
  1002. background-color: #efefef;
  1003. border-radius: 0rpx 0rpx 0rpx 32rpx;
  1004. color: #999999;
  1005. }
  1006. .icon-wenhao{
  1007. color: #1890f9;
  1008. font-size: 35rpx;
  1009. width: 50rpx;
  1010. }
  1011. .form-upload-tips:hover .wen-tips {display: block;}
  1012. .tui-popup-box {
  1013. z-index: 22;
  1014. width: 702rpx;
  1015. padding: 24rpx 24rpx 36rpx 24rpx;
  1016. height: 670rpx;
  1017. position: relative;
  1018. .icon-iconfontguanbi{
  1019. font-size: 40rpx;
  1020. color: #b2b2b2;
  1021. width: 60rpx;
  1022. float: right;
  1023. display: block;
  1024. }
  1025. .content{
  1026. .freight-radio{
  1027. height: 66rpx;
  1028. line-height: 66rpx;
  1029. padding: 0 35rpx;
  1030. .row-group{
  1031. width: 100%;
  1032. // max-height: 605rpx;
  1033. // overflow: auto;
  1034. }
  1035. .row-input{
  1036. height: 66rpx;
  1037. line-height: 66rpx;
  1038. width: 100%;
  1039. display: block;
  1040. }
  1041. .row-radio{
  1042. float: right;
  1043. transform: scale(0.9);
  1044. color: #b2b2b2;
  1045. }
  1046. .row-text{
  1047. font-size: $font-size-28;
  1048. color: #666666;
  1049. float: left;
  1050. }
  1051. }
  1052. }
  1053. }
  1054. checkbox .wx-checkbox-input{
  1055. border-radius: 50%;
  1056. }
  1057. .row-check{
  1058. transform: scale(0.8);
  1059. }
  1060. checkbox .wx-checkbox-input.wx-checkbox-input-checked{
  1061. background: #E15616;
  1062. border: 2rpx solid #e15616;
  1063. }
  1064. checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{
  1065. border-radius: 50%;
  1066. border: 2rpx solid #e15616;
  1067. width: 34rpx;
  1068. height: 34rpx;
  1069. line-height: 34rpx;
  1070. text-align: center;
  1071. font-size:34rpx;
  1072. color:#fff;
  1073. background: transparent;
  1074. transform:translate(-50%, -50%) scale(.8);
  1075. -webkit-transform:translate(-50%, -50%) scale(.8);
  1076. }
  1077. </style>