form-seller.vue 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072
  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.file">
  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">奥术大师大所大所大所大所大所大多</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="quxiao">取消发布</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. vShow_GoodsImages:false,
  318. secondParams:{
  319. secondHandType:'',//一级分类
  320. instrumentType:'',//二手仪器分类
  321. name:'',
  322. brandId:'',//品牌ID
  323. brandName:'',//其他品牌
  324. fixedYears:'',//出厂
  325. companyName:'',//公司名称
  326. maturityYears:'',//产品到期
  327. price:'',//交易价
  328. detailTalkFlag:1,//是否启用详聊
  329. normalPrice:'',//市场价
  330. originalPrice:'',//采购价
  331. stock:'',//数量
  332. productQuality:'',//商品成色
  333. contactName:'',//联系人
  334. contactMobile:'',//联系方式
  335. authenticationImage:'',//身份验证照片
  336. dockingPeopleName:'',//采美对接人姓名
  337. dockingPeopleMobile:'',//采美对接人手机号
  338. secondProductType:'',//
  339. townId:'',//县区地址
  340. address:'',//详细地址
  341. image:'',//图片
  342. file:'',
  343. productDetails:'',//商品详细信息
  344. source:4//二手发布来源.1:WWW,2:小程序,3:后台,4:协销
  345. },
  346. addressData:{
  347. address:'请选择所在地区',
  348. townID:'', //区ID
  349. cityID:'', //区ID
  350. provinceID:'', //区ID
  351. addressDetail: '', //地址
  352. },
  353. brandname:'请选择品牌名称',
  354. checkbox:false,
  355. shoplogoTwo:false,
  356. vShow_secondBj:false,
  357. resultBj:false,
  358. vShow_detailTalkFlag:false,
  359. playid:'',
  360. }
  361. },
  362. methods:{
  363. onTextareaInputInfo(e){
  364. this.secondParams.productDetails = e.detail.value;
  365. },
  366. radioChange(e){//品牌
  367. this.secondParams.brandId = e.target.value;
  368. this.BrandList.forEach((item,index)=>{
  369. if(item.id==this.secondParams.brandId){
  370. this.brandname = item.name;
  371. this.popupShow = false;
  372. }
  373. })
  374. },
  375. showMulLinkageThreePicker() {//三级地址联动
  376. this.isShowInput = true
  377. this.$refs.mpvueCityPicker.show()
  378. },
  379. onConfirm(e) {//获取选择的地址信息
  380. this.addressData.address = e.name;
  381. this.addressData.townID = e.townCode;
  382. this.addressData.cityID = e.cityCode;
  383. this.addressData.provinceID = e.provinceCode;
  384. this.secondParams.townId = this.addressData.townID;
  385. },
  386. hanldOperationConfim(){
  387. this.popupShow = true;
  388. },
  389. hidePopup(){
  390. this.popupShow = false;
  391. },
  392. secondHandRidio(e) {
  393. this.secondParams.secondHandType = e.target.value;
  394. if (e.target.value == 1){
  395. this.isShow = true;
  396. }else {
  397. this.isShow = false;
  398. }
  399. },
  400. secondHandType(e){ //二手仪器
  401. this.secondParams.instrumentType = e.target.value.toString();
  402. },
  403. Detailed(){
  404. this.vShow_detailTalkFlag = !this.vShow_detailTalkFlag;
  405. if(this.vShow_detailTalkFlag){
  406. this.secondParams.detailTalkFlag = 2 ;//启用价格详聊
  407. }else {
  408. this.secondParams.detailTalkFlag = 1 ;//不启用价格详聊
  409. }
  410. },
  411. uploadGoodsImagesFn(event){//上传商品图片
  412. uploadFileImage().then(res =>{
  413. this.GoodsImagesList.push(JSON.parse(res.data).data);
  414. this.secondParams.image =this.GoodsImagesList.toString()+',';
  415. })
  416. },
  417. uploadUserImageFn(event){//上传身份验证图片
  418. uploadFileImage().then(res =>{
  419. this.secondParams.authenticationImage= JSON.parse(res.data).data;
  420. })
  421. },
  422. uploadCommitmentFile(){//上传承诺函文件
  423. uploadFilePdf().then(res =>{
  424. console.log(res.data)
  425. this.secondParams.file = JSON.parse(res.data).data;
  426. })
  427. },
  428. deleteCommitmentFile(){//删除承诺函文件
  429. this.secondParams.file = ''
  430. },
  431. removeGoodsImagesFn(index){//删除商品图片
  432. this.GoodsImagesList.splice(index,1);
  433. this.secondParams.image =this.GoodsImagesList.toString()+',';
  434. },
  435. removeUserImageFn(index){//删除身份图片
  436. this.secondParams.authenticationImage = ''
  437. },
  438. getProductType(e){
  439. this.secondParams.secondProductType = e.target.value ;
  440. },
  441. submitBtn () {
  442. if(this.secondParams.secondHandType == ''){
  443. this.$util.msg('请选择分类',2000);
  444. return;
  445. }
  446. if(this.secondParams.secondHandType == 1 ){
  447. if(this.secondParams.instrumentType ==''){
  448. this.$util.msg('请完善仪器分类',2000);
  449. return;
  450. }
  451. }
  452. if(this.secondParams.brandId == ''){
  453. this.$util.msg('请选择商品品牌',2000);
  454. return;
  455. }
  456. if(this.secondParams.name == ''){
  457. this.$util.msg('请输入商品名称',2000);
  458. return
  459. }
  460. // if(this.secondParams.secondHandType ==2) {
  461. // if (this.secondParams.maturityYears=='') {
  462. // this.$util.msg('请输入产品到期日',2000);
  463. // return
  464. // }
  465. // }
  466. if(!this.$api.isNumber(this.secondParams.price)){
  467. this.$util.msg('请输入交易价',2000);
  468. return
  469. }
  470. // if(this.secondParams.secondHandType ==2) {
  471. // if (!this.$api.isNumber(this.secondParams.normalPrice)) {
  472. // this.$util.msg('请输入市场价',2000);
  473. // return
  474. // }
  475. // if(!this.$api.isNumber(this.secondParams.originalPrice)){
  476. // this.$util.msg('请输入采购价/原价',2000);
  477. // return
  478. // }
  479. // if(!this.$api.isNumber(this.secondParams.stock)){
  480. // this.$util.msg('请输入数量',2000);
  481. // return
  482. // }
  483. // }
  484. if(this.secondParams.productQuality == ''){
  485. this.$util.msg('请输入商品成色',2000);
  486. return
  487. }
  488. if(this.secondParams.contactName == ''){
  489. this.$util.msg('请输入联系人姓名',2000);
  490. return
  491. }
  492. if(this.secondParams.contactMobile == ''){
  493. console.log(this.secondParams.contactMobile)
  494. this.$util.msg('请输入联系方式',2000);
  495. return
  496. }
  497. if(!$reg.isMobile(this.secondParams.contactMobile)){
  498. this.$util.msg('请填写正确的手机号',2000);
  499. return
  500. }
  501. if(this.userIdentity === 1){
  502. if(this.secondParams.dockingPeopleName == ''){
  503. this.$util.msg('请输入采美对接人姓名',2000);
  504. return
  505. }
  506. if(this.secondParams.dockingPeopleMobile == ''){
  507. this.$util.msg('请输入采美对接人手机号',2000);
  508. return
  509. }
  510. }
  511. if(this.secondParams.dockingPeopleMobile !=''){
  512. if(!$reg.isMobile(this.secondParams.dockingPeopleMobile)){
  513. this.$util.msg('请填写正确的采美对接人手机号',2000);
  514. return
  515. }
  516. }
  517. if(this.secondParams.townId == ''|| this.secondParams.townId == undefined){
  518. this.$util.msg('请完善联系地址',2000);
  519. return
  520. }
  521. if(this.secondParams.address == ''){
  522. this.$util.msg('请填写详细地址',2000);
  523. return
  524. }
  525. if(this.GoodsImagesList ==''){
  526. this.$util.msg('请上传图片',2000);
  527. return;
  528. }
  529. if(this.checkbox==false){
  530. this.$util.msg('请勾选已阅读',2000);
  531. return
  532. }
  533. console.log(this.secondParams)
  534. this.SecondService.SecondHandProduct(this.secondParams).then(res=>{ //提交发布
  535. this.vShow_secondBj = true;
  536. this.playid= res.data;
  537. }).catch(error =>{
  538. this.$util.msg(error.msg,2000)
  539. this.secondBj = false;
  540. return
  541. })
  542. },
  543. quxiao:function(){
  544. this.vShow_secondBj = false;
  545. },
  546. gopay(){
  547. this.MiniWxPayFor()
  548. this.vShow_secondBj = false;
  549. },
  550. MiniWxPayFor(){
  551. authorize.getCode('weixin').then(wechatcode =>{
  552. let params ={
  553. code:wechatcode,
  554. productId:this.playid
  555. }
  556. this.PayService.SecondHandPay(params).then(response =>{
  557. let PayInfo = JSON.parse(response.data.data.payInfo);
  558. this.WxRequestPayment(PayInfo)
  559. }).catch(error =>{
  560. this.$util.msg(error.msg,2000)
  561. })
  562. })
  563. },
  564. WxRequestPayment(data){
  565. let self = this
  566. wx.requestPayment({
  567. 'timeStamp': data.timeStamp,
  568. 'nonceStr': data.nonceStr,
  569. 'package': data.package,
  570. 'signType': data.signType,
  571. 'paySign': data.paySign,
  572. 'success':function(res){
  573. wx.reLaunch({url: 'second/pages/product/product-list'});
  574. },
  575. 'fail':function(res){
  576. self.$util.msg('用户取消支付~')
  577. },
  578. 'complete':function(res){
  579. }
  580. })
  581. },
  582. changeBox:function () {
  583. this.checkbox = !this.checkbox;
  584. },
  585. },
  586. onShow() {
  587. this.SecondService.brandList().then(res =>{//品牌列表
  588. if(res.code == 0){
  589. this.BrandList = res.data;
  590. }
  591. })
  592. this.$api.getComStorage('userInfo').then((resolve) =>{
  593. this.userIdentity = resolve.userIdentity
  594. console.log(this.userIdentity)
  595. }).catch(error =>{
  596. console.log(error)
  597. })
  598. }
  599. }
  600. </script>
  601. <style lang="scss">
  602. view{font-size: 28rpx;}
  603. .my-maintenance{
  604. padding: 20rpx;
  605. }
  606. .bannerimg {
  607. height: 66rpx;
  608. width: 100%;
  609. }
  610. .bannerimg image{
  611. width: 100%;
  612. height: 100% ;
  613. }
  614. .newsTitle {
  615. line-height: 48rpx;
  616. text-align: left;
  617. color: #e15616;
  618. padding:20rpx;
  619. background-color: rgba(225, 86, 22, .1);
  620. }
  621. .nestext{
  622. font-size: 24rpx;
  623. }
  624. .secondradio view{
  625. display: inline-block;
  626. color: #333333;
  627. margin-right: 21rpx;
  628. }
  629. .secondradio{
  630. display: inline-block;
  631. margin-left: 40rpx;
  632. }
  633. .Secondary{
  634. margin-left: 96rpx;
  635. }
  636. .secondradio view.active {
  637. color: #e15616;
  638. }
  639. .placeholder{
  640. color: #b2b2b2;
  641. }
  642. .linqi_text {
  643. width: 607rpx;
  644. height: 68rpx;
  645. background-color: #1890f9;
  646. box-shadow: 0rpx 4rpx 6rpx 0rpx rgba(24, 144, 249, 0.17);
  647. text-align: center;
  648. line-height: 68rpx;
  649. color: #ffffff;
  650. margin: auto;
  651. font-size:24rpx;
  652. position: relative;
  653. }
  654. .jiaobiao {
  655. width: 0;
  656. height: 0;
  657. border-left: 20rpx solid transparent;
  658. border-right: 20rpx solid transparent;
  659. top: -25%;
  660. right: 40%;
  661. border-bottom: 20rpx solid #1890f9;
  662. position: absolute;
  663. }
  664. .label{
  665. color: #666666;
  666. display: inline-block;
  667. }
  668. .label-im{
  669. width: 100%;
  670. line-height: 50rpx;
  671. font-size: $font-size-28;
  672. color: #666666;
  673. text-align: left;
  674. margin-top: 20rpx;
  675. }
  676. .label-em{
  677. line-height: 28rpx;
  678. font-size: $font-size-20;
  679. color: #fea785;
  680. width: 100%;
  681. text-align: left;
  682. }
  683. .label.second{
  684. width: 155rpx;
  685. }
  686. .row .spacing.second{
  687. width: 70%;
  688. }
  689. .row{
  690. border-bottom: 2rpx solid #e1e1e1;
  691. line-height: 90rpx;
  692. height: auto;
  693. position: relative;
  694. &.none{
  695. border-bottom: none;
  696. }
  697. }
  698. .row.fenlei{
  699. height: auto;
  700. margin: 10rpx 0;
  701. border: 0;
  702. }
  703. .select {
  704. position: relative;
  705. color: #b2b2b2;
  706. text-align: left;
  707. user-select: none;
  708. }
  709. .row .spacing{
  710. display: inline-block;
  711. margin-left: 50rpx;
  712. width: 430rpx;
  713. vertical-align:middle;
  714. position: relative;
  715. &.file{
  716. width: 400rpx;
  717. }
  718. &.file-text{
  719. width: 400rpx;
  720. line-height: 44rpx;
  721. font-size: 28rpx;
  722. padding-right: 40rpx;
  723. box-sizing: border-box;
  724. .file-text-em{
  725. width: 400rpx;
  726. text-overflow: ellipsis;
  727. overflow: hidden;
  728. display: -webkit-box;
  729. -webkit-line-clamp: 1;
  730. line-clamp: 1;
  731. -webkit-box-orient: vertical;
  732. line-height: 44rpx;
  733. font-size: 28rpx;
  734. padding-right: 40rpx;
  735. box-sizing: border-box;
  736. position: relative;
  737. }
  738. .icon-shanchu1{
  739. width: 40rpx;
  740. height: 40rpx;
  741. line-height: 40rpx;
  742. display: block;
  743. position: absolute;
  744. top: 0;
  745. right:0;
  746. color: #f94b4b;
  747. font-size: 36rpx;
  748. }
  749. }
  750. &.file-none{
  751. width: 400rpx;
  752. position: relative;
  753. .file-none-button{
  754. width: 88rpx;
  755. height: 44rpx;
  756. background-color: #e15616;
  757. border-radius: 8rpx;
  758. line-height: 44rpx;
  759. text-align: center;
  760. font-size: 24rpx;
  761. color: #FFFFFF;
  762. position: absolute;
  763. right: 0;
  764. top: -15rpx;
  765. }
  766. }
  767. }
  768. .select .placeholder {
  769. position: relative;
  770. cursor: pointer;
  771. width: 100%;
  772. display: inline-block;
  773. }
  774. .icon-xiayibu{
  775. right: 0rpx;
  776. color: #b2b2b2;
  777. position: absolute;
  778. }
  779. .xiangliao{
  780. font-size: 26rpx;
  781. margin-right: 10rpx;
  782. color: #b2b2b2;
  783. }
  784. .icon-jiagexiangliao{
  785. color: #e15616 !important;
  786. }
  787. .pricecolor{
  788. margin-left: 10rpx;
  789. }
  790. .showflag{
  791. color: #b2b2b2;
  792. }
  793. .border-grey{
  794. width: 100%;
  795. resize: none;
  796. padding: 20rpx 0;
  797. height: 160rpx;
  798. border-bottom: 2rpx solid #e1e1e1;
  799. }
  800. .release-main-container {
  801. overflow: hidden;
  802. margin: 20rpx 0;
  803. }
  804. .uploadGoodsImages{
  805. display: flex;
  806. overflow-x: auto;
  807. overflow-y: hidden;
  808. }
  809. .secondradio{
  810. .row-radio{
  811. transform: scale(.8);
  812. }
  813. .row-input{margin-right: 10rpx;}
  814. }
  815. .linqi_text .p{
  816. font-size: $font-size-20;
  817. }
  818. .upload-file {
  819. float: left;
  820. margin: 20rpx 20rpx 20rpx 0px;
  821. cursor: pointer;
  822. width: 194rpx;
  823. height: 194rpx;
  824. border-radius: 6rpx;
  825. border: solid 2rpx #e1e1e1;
  826. flex-shrink: 0;
  827. position: relative;
  828. display: inline-block;
  829. }
  830. .input-file {
  831. width: 194rpx;
  832. height: 194rpx;
  833. opacity: 0;
  834. cursor: pointer;
  835. position: absolute;
  836. }
  837. .add-text {
  838. font-size: 26rpx;
  839. color: #333330;
  840. opacity: 0.5;
  841. position: absolute;
  842. top: 55%;
  843. right:24%;
  844. }
  845. .upload-img {
  846. width: 100%;
  847. height: 100%;
  848. display: block;
  849. border-radius: .53vw;
  850. }
  851. .icon-shangchuantupian{
  852. width: 46rpx;
  853. height: 46rpx;
  854. color: #b2b2b2;
  855. font-size: 18px;
  856. position: absolute;
  857. top: 30%;
  858. left: 40%;
  859. }
  860. .icon-shanchu1{
  861. width: 40rpx;
  862. height: 40rpx;
  863. line-height: 40rpx;
  864. display: block;
  865. position: absolute;
  866. top: -15rpx;
  867. right:-18rpx;
  868. color: #f94b4b;
  869. font-size: 36rpx;
  870. }
  871. .wen-tips {
  872. width: 664rpx;
  873. height: 68rpx;
  874. line-height: 68rpx;
  875. text-align: center;
  876. color: #FFF;
  877. font-size: 20rpx;
  878. background-color: #1890f9;
  879. box-shadow: 0 0.8vw 1.6vw 0 rgba(24, 144, 249, 0.17);
  880. border-radius: 2rpx;
  881. display: none;
  882. }
  883. .form-upload-tips:hover .wen-tips {
  884. display: block;
  885. }
  886. .textarea-wrapper {
  887. letter-spacing: 2rpx;
  888. line-height: 48rpx;
  889. color: #333333;
  890. position: relative;
  891. font-size: 28rpx;
  892. border: 2rpx solid #b2b2b2;
  893. height: 300rpx;
  894. padding: 16rpx;
  895. border-radius: 6rpx;
  896. margin: 20rpx 0;
  897. }
  898. .textarea-wrapper textarea{
  899. width: 100%;
  900. }
  901. .word-limit {
  902. position: absolute;
  903. right: 2.7vw;
  904. bottom: 2.7vw;
  905. font-size: 3.2vw;
  906. color: #9aa5b5;
  907. }
  908. .smText{
  909. color: #999999;
  910. text-align: left;
  911. line-height: 42rpx;
  912. font-size: 24rpx;
  913. margin-top: 10rpx;
  914. width: 100%;
  915. height: 260rpx;
  916. }
  917. .BtnAll{
  918. width: 100%;
  919. margin-bottom: 20rpx;
  920. .btn-submit{
  921. width: 600rpx;
  922. height: 90rpx;
  923. margin: auto;
  924. text-align: center;
  925. line-height: 90rpx;
  926. color: #fff;
  927. background-image: linear-gradient(315deg,
  928. #f28f31 0%,
  929. #e15616 100%);
  930. border-radius: 90rpx;
  931. font-size: 30rpx;
  932. }
  933. }
  934. .row.Read{
  935. border: 0;
  936. text-align: center;
  937. color: #999999;
  938. }
  939. .thebj {
  940. position: fixed;
  941. left: 0;
  942. top: 0;
  943. bottom: 0;
  944. width: 100%;
  945. height: 100%;
  946. background-color: rgba(0, 0, 0, .5);
  947. z-index: 999999;
  948. opacity: 0;
  949. }
  950. .thebj.show{
  951. opacity: 1;
  952. }
  953. .theresult {
  954. position: absolute;
  955. top: 50%;
  956. left: 50%;
  957. transform: translate(-50%, -50%);
  958. width:580rpx;
  959. background-color: #fff;
  960. border-radius: 32rpx;
  961. }
  962. .theresult .title{
  963. line-height: 100rpx;
  964. text-align: center;
  965. display: block;
  966. color: #333333;
  967. font-size: 30rpx;
  968. font-weight: bold;
  969. border-bottom: 2rpx solid #efefef;
  970. }
  971. .theresult p{
  972. padding: 30rpx 52rpx;
  973. line-height: 48rpx;
  974. color: #666666;
  975. font-size: 30rpx;
  976. }
  977. .paybtn view{
  978. width: 290rpx;
  979. height: 90rpx;
  980. text-align: center;
  981. line-height: 90rpx;
  982. font-size: 30rpx;
  983. display: inline-block;
  984. }
  985. .paybtn .cancel{
  986. background-image: linear-gradient(270deg, #f28f31 0%, #e15616 100%);
  987. border-radius: 0rpx 0rpx 32rpx 0rpx;
  988. color: #fff;
  989. }
  990. .paybtn .thegopay{
  991. background-color: #efefef;
  992. border-radius: 0rpx 0rpx 0rpx 32rpx;
  993. color: #999999;
  994. }
  995. .icon-wenhao{
  996. color: #1890f9;
  997. font-size: 35rpx;
  998. width: 50rpx;
  999. }
  1000. .form-upload-tips:hover .wen-tips {display: block;}
  1001. .tui-popup-box {
  1002. z-index: 22;
  1003. width: 702rpx;
  1004. padding: 24rpx 24rpx 36rpx 24rpx;
  1005. height: 670rpx;
  1006. position: relative;
  1007. .icon-iconfontguanbi{
  1008. font-size: 40rpx;
  1009. color: #b2b2b2;
  1010. width: 60rpx;
  1011. float: right;
  1012. display: block;
  1013. }
  1014. .content{
  1015. .freight-radio{
  1016. height: 66rpx;
  1017. line-height: 66rpx;
  1018. padding: 0 35rpx;
  1019. .row-group{
  1020. width: 100%;
  1021. // max-height: 605rpx;
  1022. // overflow: auto;
  1023. }
  1024. .row-input{
  1025. height: 66rpx;
  1026. line-height: 66rpx;
  1027. width: 100%;
  1028. display: block;
  1029. }
  1030. .row-radio{
  1031. float: right;
  1032. transform: scale(0.9);
  1033. color: #b2b2b2;
  1034. }
  1035. .row-text{
  1036. font-size: $font-size-28;
  1037. color: #666666;
  1038. float: left;
  1039. }
  1040. }
  1041. }
  1042. }
  1043. checkbox .wx-checkbox-input{
  1044. border-radius: 50%;
  1045. }
  1046. .row-check{
  1047. transform: scale(0.8);
  1048. }
  1049. checkbox .wx-checkbox-input.wx-checkbox-input-checked{
  1050. background: #E15616;
  1051. border: 2rpx solid #e15616;
  1052. }
  1053. checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{
  1054. border-radius: 50%;
  1055. border: 2rpx solid #e15616;
  1056. width: 34rpx;
  1057. height: 34rpx;
  1058. line-height: 34rpx;
  1059. text-align: center;
  1060. font-size:34rpx;
  1061. color:#fff;
  1062. background: transparent;
  1063. transform:translate(-50%, -50%) scale(.8);
  1064. -webkit-transform:translate(-50%, -50%) scale(.8);
  1065. }
  1066. </style>