form.vue 31 KB

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