Administrator 4 年 前
コミット
ab1dced04a
2 ファイル変更352 行追加342 行削除
  1. 347 339
      second/pages/form/form.vue
  2. 5 3
      services/second.service.js

+ 347 - 339
second/pages/form/form.vue

@@ -3,11 +3,11 @@
 	     <view class="bannerimg"><image src="https://admin-b.caimei365.com/userfiles/1/images/photo/2020/11/banner3.png"></image></view>
 	      <view class="my-maintenance" >
 	            <view class="newsTitle">
-	                <p>欢迎您来到采美365网二手商品市场,您可以在这里发布二手设备、产品信息,每个商品需要收取您100元的展示费,展示期为6个月;
-	                   为了完整展示您的商品,请您认真填写以下内容,谢谢合作</p>
+					<p>欢迎您来到采美365网二手商品市场,您可以在这里发布二手
+					设备/产品信息,每个商品需要收取您100元的展示费,展示期为6个月; 为了完整展示您的商品,请您认真填写以下内容,谢谢合作</p>
 	             </view>
 				 <form>
-					 <view class="row"> 
+					 <view class="row fenlei"> 
 						 <label class="label"><span class="red">*</span>分类</label>
 						 <view class="secondradio">
 							  <view v-for="(item,index) in fenlei" :key="index" v-model="secondParams.secondHandType"  @click="secondHandRidio(item)"
@@ -33,37 +33,37 @@
 							<!-- <ul v-show="selectBrand">
 								 <li  v-for="(item,index) in BrandList" :key="index" :value='item.id' @click="ChangeBrand(item)">{{item.name}}</li>
 							 </ul> -->
+							 	 <text class="iconfont icon-xiayibu"></text>
 						 </view>
 					 </view>
 					 <view class="row">
-						 <label class="label">公司名称</label>
+						 <label class="label"><span class="red">*</span>商品名称</label>
 						 <view class="spacing">
-							 <input type="text" maxlength="40"  id="shopname"  v-model="secondParams.name" placeholder="请输入商品名称,不超过40个汉字">
+							 <input type="text" maxlength="40"  v-model="secondParams.name" placeholder="请输入商品名称,不超过40个汉字">
 						 </view>
 					 </view>
 					 <view class="row">
 						 <label class="label">出厂日期</label>
 						 <view class="spacing">
-							<input type="text" v-model="secondParams.fixedYears" id="shopyear" maxlength="10" placeholder="请输入出厂日期 如:2020年06月">
+							<input type="text" v-model="secondParams.fixedYears"  maxlength="10" placeholder="请输入出厂日期 如:2020年06月">
 						 </view>
 					 </view>
 					 <view class="row"  v-show="secondParams.secondHandType==2">
 						 <label class="label"><span class="red">*</span>产品到期日</label>
 						 <view class="spacing">
-							<input type="text"  v-model="secondParams.maturityYears" id="expire" maxlength="10" placeholder="请输入产品到期日,如:2020年12月">
+							<input type="text"  v-model="secondParams.maturityYears" maxlength="10" placeholder="请输入产品到期日,如:2020年12月">
 						 </view>
 					 </view>
 					 <view class="row">
-						 <label class="label"><span class="red">*</span>公司名称</label>
+						 <label class="label">公司名称</label>
 						 <view class="spacing">
-							 <input type="text"  v-model="secondParams.companyName" id="mechanismname" maxlength="30" placeholder="请输入公司名称,不超过30个汉字">
+							 <input type="text"  v-model="secondParams.companyName"  maxlength="30" placeholder="请输入公司名称,不超过30个汉字">
 						 </view>
 					 </view>
 					 <view class="row">
 						 <label class="label"><span class="red">*</span>交易价</label>
 						 <view class="spacing">
-							 <input type="text" style="width: 288px;" maxlength="20" id="shopprice" oninput="value=value.replace(/[^\d]/g, '')"
-							     v-model="secondParams.price1"  placeholder="请输入交易价">
+							 <input type="text" maxlength="20" v-model="secondParams.price1"  placeholder="请输入交易价">
 						 </view>
 					 </view>
 					 <view style="margin-top: 15rpx;">
@@ -74,48 +74,48 @@
 					 <view class="row" v-show="secondParams.secondHandType==2">
 						 <label class="label"><span class="red">*</span>市场价</label>
 						 <view class="spacing">
-							  <input type="text"  v-model="secondParams.normalPrice" id="market" maxlength="30" oninput="value=value.replace(/[^\d]/g, '')"   placeholder="请输入市场价">
+							  <input type="text"  v-model="secondParams.normalPrice" maxlength="30" oninput="value=value.replace(/[^\d]/g, '')"   placeholder="请输入市场价">
 						 </view>
 					 </view>
 					 <view class="row"  v-show="secondParams.secondHandType==2">
 						 <label class="label"><span class="red">*</span>采购价/原价</label>
 						 <view class="spacing">
-							  <input type="text"  v-model="secondParams.originalPrice" id="original_price" maxlength="30" oninput="value=value.replace(/[^\d]/g, '')" placeholder="请输入采购价/原价"/>
+							  <input type="text"  v-model="secondParams.originalPrice" maxlength="30" oninput="value=value.replace(/[^\d]/g, '')" placeholder="请输入采购价/原价"/>
 						 </view>
 					 </view>
 					 <view class="row" v-show="secondParams.secondHandType==2">
 						 <label class="label"><span class="red">*</span>数量</label>
 						 <view class="spacing">
-							  <input type="text"  id="number" v-model="secondParams.stock" maxlength="30" oninput="value=value.replace(/[^\d]/g,'')" placeholder="请输入数量">
+							  <input type="text"   v-model="secondParams.stock" maxlength="30"  placeholder="请输入数量">
 						 </view>
 					 </view>
 					 <view class="row">
 						 <label class="label"><span class="red">*</span>商品成色</label>
 						 <view class="spacing">
-						     <input type="text" maxlength="10" id="shopcolor"v-model="secondParams.productQuality"  placeholder="请输入商品成色,如“9成新”">
+						     <input type="text" maxlength="10"  v-model="secondParams.productQuality"  placeholder="请输入商品成色,如“9成新”">
 					    </view> 
 					 </view>
 					 <view class="row">
 						 <label class="label"><span class="red">*</span>联系人</label>
 						 <view class="spacing">
-							  <input type="text" maxlength="6" v-model="secondParams.contactName" id="linkman"  placeholder="请输入联系人姓名">
+							  <input type="text" maxlength="6" v-model="secondParams.contactName"   placeholder="请输入联系人姓名">
 					    </view> 
 					 </view>
 					 <view class="row">
 						 <label class="label"><span class="red">*</span>联系方式</label>
 						 <view class="spacing">
-							 <input type="text"  v-model="secondParams.contactMobile"  oninput="value=value.replace(/[^\d]/g,'')"  id="phoneNum" maxlength="11" placeholder="请输入联系人手机号 / 固话">
+							 <input type="text"  v-model="secondParams.contactMobile"    maxlength="11" placeholder="请输入联系人手机号 / 固话">
 					    </view> 
 					 </view>
 					 <view class="row">
 						 <label class="label">商品类型</label>
 						 <view class="secondradio">
-							 <view class="buy icon mIcon" v-for="(item ,index) in beauty" :key='index' value="item.value" @click="getProductType(item.value)" :class="secondType==item.value?' active':''">
+							 <view class="buy " v-for="(item ,index) in beauty" :key='index' value="item.value" @click="getProductType(item.value)" :class="secondType==item.value?' active':''">
 								 <label class="iconfont" :class="secondType==item.value?'icon-yixuanze':'icon-weixuanze'"></label>{{item.name}}
 							 </view>
 						 </view>
 					 </view>
-					<view class="row">
+					<view class="row" >
 						 <label class="label"><span class="red">*</span>联系地址</label>
 						 <view class="spacing"  @click="showMulLinkageThreePicker">
 							 <text class="row-input" :class="addressData.address === '请选择所在地区' ? 'none' : ''">
@@ -124,33 +124,84 @@
 							 <text class="iconfont icon-xiayibu"></text>
 					    </view> 
 					 </view>
-					 <textarea type="text" id="addressDetails" class="border-grey address-details" v-model="secondParams.address" maxlength="50"
+					 <textarea type="text"  class="border-grey address-details" v-model="secondParams.address" maxlength="50"
 						placeholder="请填写详细地址,如街道/小区/门牌等" /></textarea>
-					 
+					<view class="release-main-container">
+						<view class="release-from">
+							<label class="label"><span class="red">*</span>商品图片</label>
+								<view class="release-input upload image uploadGoodsImages" >
+									<view class="upload-file" v-show="GoodsImagesList.length<5">
+										<i class="iconfont icon-shangchuantupian"></i>
+										<p class="add-text">营业执照</p>
+										<input ref="goodsImages" type="file" name="file" value="" class="input-file" accept="image/png,image/jpeg,image/gif,image/jpg"  @change="uploadGoodsImagesFn">
+									</view>
+									<view class="upload-file"  v-for="(item, index) in GoodsImagesList" :key="index">
+										<img :data-original='item' :src="item" :data-image="item" alt="" class="upload-img" >
+										<i class=" del iconfont icon-shanchu1" @click="removeGoodsImagesFn(index)"></i>
+									</view>
+								</view>
+								<view class="form-upload-tips">
+									<i class="iconfont icon-wenhao"></i>
+									<view class="wen-tips">最多上传5张二手商品图片,请尽量全部上传,单张图片不能超过5M</view>
+								</view>
+							</view>
+						</view>
+						<view class="productinfo">
+							 <label class="label unlogin-label" style="width: 100%;">商品详细信息</label>
+							 <div class="textarea-wrapper">
+								 <textarea class="" maxlength="200" v-model="secondParams.productDetails"  cols="70" class="description" rows="6"  placeholder="请填写商品详细信息,对商品进行更详细的描述"></textarea>
+								 <span class="word-limit">{{secondParams.productDetails.length}}/200</span>
+							 </div>
+						</view>
+						<view class="productinfo">
+							 <label class="label unlogin-label" style="width: 100%;"><span class="red">*</span>免责声明</label>
+							 <textarea class="smText">
+								 鉴于本网站提供的二手版块信息包括但不限于公司名称,商品的简介、性能、描述与说明,相关图片、视频等均由卖家自行提供,
+								 由卖家对其提供的信息承担相应法律责任。买家应自行甄别商品信息并查验商品性状。本网站对二手版块中买卖双方的交易不提供任何形式的担保与保证,特此声明!
+							 </textarea>
+						</view>
+						<view class="row Read">
+							<span  @click="changeBox($event)" class="iconfont xiangliao"
+							:class="checkbox?'icon-jiagexiangliao':'icon-juxingweigouxuan'" ><span style="margin-left: 10rpx;">已阅读</span></span>
+						</view>
+						<div class="BtnAll" >
+							<button type="button"  @click="submitBtn" class="btn-submit">发布</button>
+					</div>
 				 </form>
-				 <tui-drawer  @mode="bottom" :class="{'tui-drawer-mask_show':visible}" >
-				 </tui-drawer>
 				 <mpvue-city-picker :themeColor="themeColor"
 				 					ref="mpvueCityPicker" 
 				 				    :pickerValueDefault="cityPickerValueDefault"
 				 					@onCancel="onCancel" 
 				 					@onConfirm="onConfirm">
 				 </mpvue-city-picker>
+				 <list-cedll ref="listCell" :bgcolor="bgcolor"
+							 @onCancel="onCancel" 
+							 @onConfirm="onConfirmbrand">
+				 </list-cedll>
 	          </view>
-	
-	             
-	
+			<div class="secondBj thebj"   v-show="vShow_secondBj" :class="vShow_secondBj?'show':''">
+					<div class="bjmain theresult">
+						<span class="title">发布提示</span>
+						<p>发布二手商品,采美需要收取您每个商品100元的展示费,展示期为6个月</br>
+							支付完成后,商品会在1-2个工作日内进行审核,审核通过后,商品会立即上线</p>
+						<div class="paybtn">
+							<span class="thegopay gozhofubao" @click.stop="quxiao">取消发布</span>
+							<span class="cancel closebtn" @click.stop="gopay">去支付</span>
+						</div>
+					</div>
+				</div>
 	</view>
 </template>
 
 <script>
-	import tuiDrawer from "@/components/thorui/tui-drawer/tui-drawer.vue"
+	import listCell from "@/components/tui-components/list-cell/list-cell.vue"
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
+	import { uploadFileImage } from "@/api/utils.js"
 	import { mapState,mapMutations } from 'vuex';
 	export default{
 		name:'secondHandrelease',
 		components:{
-			tuiDrawer,
+			listCell,
 			mpvueCityPicker
 		},
 		data(){
@@ -173,13 +224,11 @@
 				        ],
 				        BrandList:[],
 				        isShow:false,
-				        includedTax:'',
 				        GoodsImagesList:[],
 				        oldNum:0,
 				        secondType:0,
 				        vShow_GoodsImages:false,
 				        fromMessage:'',//提示文字
-				        // formData:new FormData(),
 				        secondParams:{
 				            secondHandType:'',//一级分类
 				            instrumentType:'',//二手仪器分类
@@ -211,43 +260,18 @@
 						 	provinceID:'',		//区ID
 						 	addressDetail: '',	//地址
 						 },
-				        brandname:'请选择',
+				        brandname:'请选择品牌名称',
 				        checkbox:false,
 				        shoplogoTwo:false,
 				        provinceIndex:'',
 				        provinceArray:[],
 				        cityArray: [],//市
 				        townArray: [],//区
-				        from: {
-				            name:'',
-				            province: '',//省id
-				            city: '',
-				            town: ''
-				        },
-				        TypeList:'',
 				        playid:'',
 				        checkVal:[],
 				        vShow_secondBj:false,
 				        resultBj:false,
 				        vShow_detailTalkFlag:false,
-				        vShow_secondHandType:false,
-				        vShow_instrumentType:false,
-				        vShow_BrandID:false,
-				        vShow_Name:false,
-				        vShow_Price:false,
-				        vShow_shopColor:false,
-				        vShow_contactName:false,
-				        vShow_contactMobile:false,
-				        vShow_Address:false,
-				        vShow_TownId:false,
-				        vShow_Market:false,
-				        vShow_original:false,
-				        vShow_Number:false,
-				        vShow_expire:false,
-				        vShow_detailInfoEditor:true,
-				        vShow_GoodsImages:false,
-				        vShow_checkBox:false,
-				        selectBrand:false,
 						isShowInput:true,
 			}
 		},
@@ -262,324 +286,171 @@
 				this.addressData.townID = e.townCode;
 				this.addressData.cityID = e.cityCode;
 				this.addressData.provinceID = e.provinceCode;
-			},	
+				this.secondParams.townId = this.addressData.townID;
+				this.secondParams.address = this.addressData.address;
+			},
+		 onConfirmbrand(e){
+			 this.brandname = e.name;
+		 },
 			showBrand:function(){
-			            var _this = this;
-			            _this.selectBrand = !_this.selectBrand;
+						this.isShowInput = true
+						this.$refs.listCell.show()
 			        },
 			        secondHandRidio: function(item) {
-			        var _this = this;
-			            _this.currentId = item.value;
-			            _this.secondParams.secondHandType = item.value;
+			            this.currentId = item.value;
+			            this.secondParams.secondHandType = item.value;
 			            if (item.value==1){
-			            _this.isShow = true;
+			            this.isShow = true;
 			            }else {
-			             _this.isShow = false;
+			             this.isShow = false;
 			            }
 			        },
 			        secondHandType:function(item){ //二手仪器
 			        item.isChecked = ! item.isChecked;
-			        var _this = this;
 			          if(item.isChecked){
-			           _this.checkVal.push(item.value);
-			           _this.secondParams.instrumentType =  _this.checkVal.toString();
+			           this.checkVal.push(item.value);
+			           this.secondParams.instrumentType =  this.checkVal.toString();
 			          } else {
-			            _this.checkVal.splice(_this.checkVal.indexOf(item.value), 1);
-			            _this.secondParams.instrumentType = _this.checkVal.toString();
+			            this.checkVal.splice(this.checkVal.indexOf(item.value), 1);
+			            this.secondParams.instrumentType = this.checkVal.toString();
 			          }
 			        },
 			        ChangeBrand:function(item){ //品牌列表
-			         var _this = this;
-			            _this.brandname = item.name;
-			            _this.secondParams.brandID = item.id;
-			            if(_this.secondParams.brandID==161){
-			              _this.shoplogoTwo = true;
+			            this.brandname = item.name;
+			            this.secondParams.brandID = item.id;
+			            if(this.secondParams.brandID==161){
+			              this.shoplogoTwo = true;
 			            }else {
-			              _this.shoplogoTwo = false;
+			              this.shoplogoTwo = false;
 			            }
 			        },
 			        Detailed:function(){
-			        var _this = this;
-					_this.vShow_detailTalkFlag = !_this.vShow_detailTalkFlag;
-			         if(_this.vShow_detailTalkFlag){
-			             _this.secondParams.detailTalkFlag = 2 ;//启用价格详聊
+					this.vShow_detailTalkFlag = !this.vShow_detailTalkFlag;
+			         if(this.vShow_detailTalkFlag){
+			             this.secondParams.detailTalkFlag = 2 ;//启用价格详聊
 			          }else {
-			            _this.secondParams.detailTalkFlag = 1 ;//不启用价格详聊
+			            this.secondParams.detailTalkFlag = 1 ;//不启用价格详聊
 			          }
 			        },
 			        dragstart: function(value) {  // 记录初始信息
 			            this.oldNum = value;
 			        },
 			         uploadGoodsImagesFn: function(event){//上传商品图片
-			            var _this = this;
-			            var inputDOM = _this.$refs.goodsImages;
-			            var file = inputDOM.files;
-			            _this.formData.append('file', file[0]);
-			            SecondApi.uploadimg(_this.formData,function(response){
-			               _this.GoodsImagesList.push(response.data);
-			               _this.secondParams.image1 =_this.GoodsImagesList.toString()+',';
-			                event.target.value = '';
-			            });
+							uploadFileImage().then(res =>{
+								 this.GoodsImagesList.push(JSON.parse(res.data).data);
+								 this.secondParams.image1 =this.GoodsImagesList.toString()+',';
+							})
 			        },
 			         removeGoodsImagesFn: function(index){//删除商品图片
-			            var _this = this;
-			            _this.GoodsImagesList.splice(index,1);
-			            _this.secondParams.image1 =_this.GoodsImagesList.toString()+',';
+			            this.GoodsImagesList.splice(index,1);
+			            this.secondParams.image1 =this.GoodsImagesList.toString()+',';
 			         },
 			        getProductType:function(item){
-			        var _this = this;
-			         _this.secondType=item;
-			          _this.secondParams.secondProductType = item ;
+			         this.secondType=item;
+			          this.secondParams.secondProductType = item ;
 			        },
 			        submitBtn:function () {
-			         var _this = this;
-			          if(_this.secondParams.secondHandType == ''){
-			                _this.vShow_secondHandType = true;
-			                _this.fromMessage = '请选择分类';
-			                _this.scrollIntoView();
-			                setTimeout(function(){
-			                    _this.vShow_secondHandType= false;
-			                },2000);
+			          if(this.secondParams.secondHandType == ''){
+							this.$util.msg('请选择分类',2000);
 			                return;
 			            }
-			            if(_this.secondParams.secondHandType == 1 ){
-			               if(_this.secondParams.instrumentType ==''){
-			                _this.vShow_instrumentType = true;
-			                _this.fromMessage = '请完善仪器分类';
-			                _this.scrollIntoView();
-			                setTimeout(function(){
-			                    _this.vShow_instrumentType= false;
-			                },2000);
+			            if(this.secondParams.secondHandType == 1 ){
+			               if(this.secondParams.instrumentType ==''){
+							this.$util.msg('请完善仪器分类',2000);
 			                return;
 			                }
 			            }
-			         if(_this.secondParams.brandID == ''){
-			                _this.vShow_BrandID = true;
-			                _this.fromMessage = '请选择商品品牌';
-			                _this.scrollIntoView();
-			                setTimeout(function(){
-			                    _this.vShow_BrandID = false;
-			                },2000);
-			                return;
-			            }
-			         if(_this.secondParams.name == ''){
-			              _this.vShow_Name = true;
-			              _this.fromMessage = '请输入商品名称';
-			              _this.scrollIntoView();
-			                setTimeout(function(){
-			                    _this.vShow_Name = false;
-			                },2000);
+			    //      if(this.secondParams.brandID == ''){
+			    //             this.vShow_BrandID = true;
+							// this.$util.msg('请选择商品品牌',2000);
+			    //             return;
+			    //         }
+			         if(this.secondParams.name == ''){
+						  this.$util.msg('请输入商品名称',2000);
 			                return
 			         }
-			         if(_this.secondParams.secondHandType ==2) {
-			         if (_this.secondParams.normalPrice == '') {
-			                 _this.vShow_Market = true;
-			                 _this.fromMessage = '请输入市场价';
-			                 _this.scrollIntoView();
-			                 setTimeout(function () {
-			                     _this.vShow_Market = false;
-			                 }, 2000);
+			         if(this.secondParams.secondHandType ==2) {
+			         if (this.secondParams.normalPrice == '') {
+							 this.$util.msg('请输入市场价',2000);
 			                 return
 			             }
-			             if (_this.secondParams.maturityYears == '') {
-			                 _this.vShow_expire = true;
-			                 _this.fromMessage = '请输入产品到期日';
-			                 _this.scrollIntoView();
-			                 setTimeout(function () {
-			                     _this.vShow_expire = false;
-			                 }, 2000);
+			             if (this.secondParams.maturityYears == '') {
+							 this.$util.msg('请输入产品到期日',2000);
 			                 return
 			             }
 			         }
-			         if(_this.secondParams.price1 == ''){
-			                  _this.vShow_Price = true;
-			                  _this.fromMessage = '请输入交易价';
-			                  _this.scrollIntoView();
-			                    setTimeout(function(){
-			                        _this.vShow_Price = false;
-			                    },2000);
+			         if(this.secondParams.price1 == ''){
+							  this.$util.msg('请输入交易价',2000);
 			                    return
 			             }
-			         if(_this.secondParams.secondHandType ==2){
-			             if(_this.secondParams.originalPrice == ''){
-			              _this.vShow_original = true;
-			              _this.fromMessage = '请输入采购价/原价';
-			              _this.scrollIntoView();
-			                setTimeout(function(){
-			                    _this.vShow_original = false;
-			                },2000);
+			         if(this.secondParams.secondHandType ==2){
+			             if(this.secondParams.originalPrice == ''){
+						  this.$util.msg('请输入采购价/原价',2000);
 			                return
 			           }
-			         if(_this.secondParams.stock == ''){
-			              _this.vShow_Number = true;
-			              _this.fromMessage = '请输入数量';
-			              _this.scrollIntoView();
-			                setTimeout(function(){
-			                    _this.vShow_Number = false;
-			                },2000);
+			         if(this.secondParams.stock == ''){
+						  this.$util.msg('请输入数量',2000);
 			                return
 			            }
 			         }
-			
-			
-			         if(_this.secondParams.productQuality == ''){
-			              _this.vShow_shopColor = true;
-			              _this.fromMessage = '请输入商品成色';
-			              _this.scrollIntoView();
-			                setTimeout(function(){
-			                    _this.vShow_shopColor = false;
-			                },2000);
+			         if(this.secondParams.productQuality == ''){
+						  this.$util.msg('请输入商品成色',2000);
 			                return
 			         }
-			          if(_this.secondParams.contactName == ''){
-			              _this.vShow_contactName = true;
-			              _this.fromMessage = '请输入联系人姓名';
-			              _this.scrollIntoView();
-			                setTimeout(function(){
-			                    _this.vShow_contactName = false;
-			                },2000);
+			          if(this.secondParams.contactName == ''){
+						  this.$util.msg('请输入联系人姓名',2000);
 			                return
 			         }
-			          if(_this.secondParams.contactMobile == ''){
-			              _this.vShow_contactMobile = true;
-			              _this.fromMessage = '请输入联系方式';
-			              _this.scrollIntoView();
-			                setTimeout(function(){
-			                    _this.vShow_contactMobile = false;
-			                },2000);
+			          if(this.secondParams.contactMobile == ''){
+						  console.log(this.secondParams.contactMobile)
+						  this.$util.msg('请输入联系方式',2000);
 			                return
 			         }
-			         if(_this.secondParams.contactMobile.length !=11){
-			              _this.vShow_contactMobile = true;
-			              _this.fromMessage = '联系方式格式不正确';
-			              _this.scrollIntoView();
-			                setTimeout(function(){
-			                    _this.vShow_contactMobile = false;
-			                },2000);
+			         if(this.secondParams.contactMobile.length !=11){
+						  this.$util.msg('联系方式格式不正确',2000);
 			                 return
 			          }
-			          if(_this.secondParams.townId == ''|| _this.secondParams.townId == undefined){
-			              _this.vShow_TownId = true;
-			              _this.fromMessage = '请完善联系地址';
-			              _this.scrollIntoView();
-			                setTimeout(function(){
-			                    _this.vShow_TownId = false;
-			                },2000);
+			          if(this.secondParams.townId == ''|| this.secondParams.townId == undefined){
+						  this.$util.msg('请完善联系地址',2000);
 			                return
 			         }
-			           if(_this.secondParams.address == ''){
-			              _this.vShow_Address = true;
-			              _this.fromMessage = '请填写详细地址';
-			               document.getElementById('Address').scrollIntoView({block: 'start', behavior: 'smooth'});
-			                setTimeout(function(){
-			                    _this.vShow_Address = false;
-			                },2000);
+			           if(this.secondParams.address == ''){
+						  this.$util.msg('请填写详细地址',2000);
 			                return
 			         }
-			            if(_this.GoodsImagesList ==''){
-			               _this.vShow_GoodsImages = true;
-			              _this.fromMessage = '请上传图片';
-			                document.documentElement.scrollTop=900;
-			              setTimeout(function(){
-			                   _this.vShow_GoodsImages = false;
-			                },2000);
+			            if(this.GoodsImagesList ==''){
+						    this.$util.msg('请上传图片',2000);
 			                return;
 			            }
-			         if(_this.checkbox==false){
-			               _this.vShow_checkBox = true;
-			               _this.fromMessage='请勾选已阅读';
-			                setTimeout(function(){
-			                   _this.vShow_checkBox = false;
-			                },2000);
+			         if(this.checkbox==false){
+						   this.$util.msg('请勾选已阅读',2000);
 			                return
 			         }
-			         console.log(_this.secondParams)
-			          SecondApi.SecondHandProduct(_this.secondParams,function (res) { //提交发布
+			         console.log(this.secondParams)
+					 this.SecondService.SecondHandProduct(this.secondParams).then(res=>{ //提交发布
 			             if (res.code==0){
-			                 console.log(res)
-			               _this.vShow_secondBj = true;
-			               _this.playid= res.data;
+			               this.vShow_secondBj = true;
+			               this.playid= res.data;
 			             }else{
 			                  this.$util.msg(res.msg,2000)
-			                 _this.secondBj = false;
+			                 this.secondBj = false;
 			                 return
 			             }
 			         })
 			        },
 			        quxiao:function(){
-			        var _this = this;
-			         _this.vShow_secondBj = false;
+			         this.vShow_secondBj = false;
 			        },
 			        gopay:function(){
-			            var _this = this;
-			            window.location.href = '/pay/caimei-paycash.html?pageType=1&&type=confirm&productID='+_this.playid;
-			            _this.vShow_secondBj = false;
-			        },
-			         scrollIntoView: function(){
-			            document.getElementById('secondHandrelease').scrollIntoView({block: 'start', behavior: 'smooth'});
-			        },
-			        province:function () {
-			           var _this = this;
-			           _this.from.province = event.target.value;
-			            if(_this.from.province==''){//省为请选择时市区初始化
-			                _this.cityArray=[];
-			                _this.townArray=[];
-			                _this.secondParams.townId=''
-			            }else {
-			              _this.getcity();
-			            }
-			        },
-			        getcity:function(event){//加载市
-			           var _this = this;
-			            PublicApi.GetCity({ provinceId: _this.from.province },function(response){
-			                 if(response.code == 0 ){
-			                    _this.cityArray = response.data;
-			                     _this.from.city = event.target.value;
-			                     if(_this.from.city==''){
-			                           _this.townArray=[];
-			                     }else {
-			                         _this.getcTown();
-			                     }
-			
-			                }
-			            })
-			
-			
-			        },
-			        getcTown:function(event){
-			            var _this = this;
-			            PublicApi.GetTown({cityId:_this.from.city},function(response){
-			                if(response.code == 0 ){
-			                    _this.townArray = response.data;
-			                    _this.secondParams.townId = event.target.value;
-			                }else{
-			                    this.$util.msg(response.msg,2000)
-			                }
-			            })
+			            window.location.href = '/pay/caimei-paycash.html?pageType=1&&type=confirm&productID='+this.playid;
+			            this.vShow_secondBj = false;
 			        },
 			        changeBox:function () {
-			            if(event.target.checked ==true){
-			             this.checkbox = true
-			            }else {
-			             this.checkbox = false
-			            }
+						this.checkbox = !this.checkbox;
 			        },
 					
 		},
 		 created(){
-				this.SecondService.brandList().then(res =>{//品牌列表
-		            if(res.code == 0){
-		               this.BrandList = res.data;
-					   console.log( this.BrandList)
-		            }
-		        })
-		     this.SecondService.GetProvince().then(response=>{//省份
-		            if(response.code == 0){
-		                this.provinceArray = response.data
-		            }else{
-		               this.$util.msg(response.msg,2000)
-		            }
-		        })
 		    },
 	}
 </script>
@@ -599,64 +470,201 @@
 		.secondradio{display: inline-block;margin-left: 40rpx;}	
 		.Secondary{width: 100%;text-align: center;margin: 0;}
 		.secondradio view.active {color: #e15616;}
-		.row .label .red{
+		.label .red{color: #f94b4b;}
+		input[type="text"]::placeholder, textarea::placeholder {color: #b2b2b2;}
+		input[type="text"]{
+			line-height: 90rpx;
+			overflow: unset;
+		}
+		.row label.iconfont{margin-right: 10rpx;}
+		.icon-weixuanze{color: #b2b2b2;}
+		.linqi_text { width: 100%; height: 68rpx;background-color: #1890f9;box-shadow: 0rpx 4rpx 6rpx 0rpx rgba(24, 144, 249, 0.17);text-align: center;
+		    line-height: 68rpx;color: #ffffff;margin: auto;font-size:24rpx;position: relative;}
+		.jiaobiao {width: 0;height: 0;border-left: 20rpx solid transparent;border-right: 20rpx solid transparent;top: -30%;
+		    right: 38%;border-bottom: 20rpx solid #1890f9;position: absolute;}
+		.label{color: #666666;display: inline-block;}
+		.row{border-bottom: 2rpx solid #e1e1e1;line-height: 90rpx;height: 90rpx;}
+		.row.fenlei{height: auto;}
+		.select {position: relative;color: #9aa5b5;text-align: left;user-select: none;}
+		.row .spacing{display: inline-block;margin-left: 60rpx;width: 68%;vertical-align:middle;position: relative}
+		.select .placeholder {position: relative;cursor: pointer;width: 100%;display: inline-block;}
+		.icon-xiayibu{right: 0rpx;;color: #b2b2b2;position: absolute}
+		.xiangliao{font-size: 26rpx;margin-right: 10rpx;}
+		.icon-jiagexiangliao{color: #e15616;}
+		.showflag{color: #b2b2b2;}
+		.border-grey{width: 100%;resize: none;padding: 20rpx 0;height: 160rpx;border-bottom: 2rpx solid #e1e1e1;}
+		.release-main-container {overflow: hidden;margin-top: 20rpx}
+		.uploadGoodsImages{display: flex;overflow-x: auto;overflow-y: hidden;}
+		.upload-file {
+		    position: relative;
+		    float: left;
+		    margin: 20rpx 20rpx 20rpx 0px;
+		    cursor: pointer;
+		    width: 194rpx;
+		    height: 194rpx;
+		    border-radius: 6rpx;
+		    border: solid 2rpx #e1e1e1;
+			flex-shrink: 0;
+			position: relative;
+			display: inline-block;
+		}
+		.input-file {
+		    width: 194rpx;
+		    height: 194rpx;
+		    opacity: 0;
+		    cursor: pointer;
+		    position: absolute;
+		}
+		.add-text {
+		    font-size: 26rpx;
+		    color: #333330;
+		    opacity: 0.5;
+		    position: absolute;
+		    top: 55%;
+		    right:24%;
+		}
+		.upload-img {
+		    width: 100%;
+		    height: 100%;
+		    display: block;
+		    border-radius: .53vw;
+		}
+		.icon-shangchuantupian{
+			width: 46rpx;
+			height: 46rpx;
+			color: #b2b2b2;
+			font-size: 18px;
+			position: absolute;
+			top: 30%;
+			left: 40%;
+		}
+		.icon-shanchu1{
+			position: absolute;
+			top: -25rpx;
+			right:-10rpx;
 			color: #f94b4b;
+			font-size: 36rpx;
 		}
-		input[type="text"]::placeholder, textarea::placeholder {color: #b2b2b2;;}
-		.row label.iconfont{margin-right: 10rpx;color: #e15616;}
-		.linqi_text {
+		.wen-tips {
 		    width: 100%;
-		    height: 68rpx;
-		    background-color: #1890f9;
-		    box-shadow: 0rpx 4rpx 6rpx 0rpx rgba(24, 144, 249, 0.17);
+		    height: 12.5vw;
+		    line-height: 6.4vw;
 		    text-align: center;
-		    line-height: 68rpx;
-		    color: #ffffff;
-		    margin: auto;
-		    font-size:24rpx;
+		    color: #FFF;
+		    font-size: 2.7vw;
+		    background-color: #1890f9;
+		    box-shadow: 0 0.8vw 1.6vw 0 rgba(24, 144, 249, 0.17);
+		    position: absolute;
+		    right: 0;
+		    border-radius: .8vw;
+		    display: none;
 		}
-		.jiaobiao {
-		    width: 0;
-		    height: 0;
-		    border-left: 20rpx solid transparent;
-		    border-right: 20rpx solid transparent;
-		    top: 376rpx;
-		    right: 45%;
-		    border-bottom: 20rpx solid #1890f9;
+		.textarea-wrapper {
+		    letter-spacing: 2rpx;
+		    line-height: 48rpx;
+		    color: #b2b2b2;
+		    position: relative;
+		    font-size: 28rpx;
+		    border: 2rpx solid #b2b2b2;
+		    height: 300rpx;
+			padding: 16rpx;
+			border-radius: 6rpx;
+			margin: 20rpx 0;
+		}
+		.textarea-wrapper textarea{
+			width: 100%;
+		}
+		.word-limit {
 		    position: absolute;
-			}
-		.row .label{color: #666666;width: 126rpx;display: inline-block;}
-		.row{border-bottom: 2rpx solid #e1e1e1;line-height: 90rpx;height: 90rpx;}
-		.select {
-			position: relative;
-			color: #9aa5b5;
-			text-align: left;
-			user-select: none;
+		    right: 2.7vw;
+		    bottom: 2.7vw;
+		    font-size: 3.2vw;
+		    color: #9aa5b5;
 		}
-		.row .spacing{
-			display: inline-block;
-			margin-left: 60rpx;
-			width: 73%;
-			vertical-align:middle
+		.smText{
+			color: #999999;
+			text-align: left;
+			line-height: 42rpx;
+			font-size: 24rpx;
+			margin-top: 10rpx;
+			width: 100%;
+			height: 260rpx;
 		}
-	  .select .placeholder {
-			position: relative;
-			cursor: pointer;
+		.BtnAll{
 			width: 100%;
+			margin-bottom: 20rpx;
+		}
+		.BtnAll button{
+			width: 600rpx;
+			height: 90rpx;
+			margin: auto;
+			text-align: center;
+			line-height: 90rpx;
+			color: #fff;
+			background-image: linear-gradient(315deg, 
+					#f28f31 0%, 
+					#e15616 100%);
+			border-radius: 90rpx;
+			font-size: 30rpx;
+		}
+		.row.Read{
+			border: 0;
+			text-align: center;
+			color: #999999;
+		}
+		.thebj {
+		    position: fixed;
+		    left: 0;
+		    top: 0;
+		    bottom: 0;
+		    width: 100%;
+		    height: 100%;
+		    background-color: rgba(0, 0, 0, .5);
+		    z-index: 999999;
+		    opacity: 1;
+		}
+		.theresult {
+		    position: absolute;
+		    top: 50%;
+		    left: 50%;
+		    transform: translate(-50%, -50%);
+		    width:580rpx;
+		    background-color: #fff;
+		    border-radius: 32rpx;
+		}
+		.theresult .title{
+			line-height: 100rpx;
+			text-align: center;
+			display: block;
+			color: #333333;
+			font-size: 30rpx;
+			font-weight: bold;
+			border-bottom: 2rpx solid #efefef;
+		}
+		.theresult p{
+			padding: 30rpx 52rpx;
+			line-height: 48rpx;
+			color: #666666;
+			font-size: 30rpx;
+		}
+		.paybtn span{
+			width: 290rpx;
+			height: 90rpx;
+			text-align: center;
+			line-height: 90rpx;
+			font-size: 30rpx;
 			display: inline-block;
 		}
-		.icon-xiayibu{margin-left: 280rpx;color: #b2b2b2;}
-		.xiangliao{font-size: 26rpx;margin-right: 10rpx;}
-		.icon-jiagexiangliao{color: #e15616;}
-		.showflag{color: #b2b2b2;}
-		.border-grey{
-			width: 100%;
-			resize: none;
-			padding: 20rpx;
-			height: 160rpx;
-			border-bottom: 2rpx solid #e1e1e1;
+		.paybtn .cancel{
+			background-image: linear-gradient(270deg, #f28f31 0%, #e15616 100%);
+			border-radius: 0rpx 0rpx 32rpx 0rpx;
+			color: #fff;
+			
 		}
-		.release-main-container {
-		    overflow: hidden;
+		.paybtn .thegopay{
+			background-color: #efefef;
+			border-radius: 0rpx 0rpx 0rpx 32rpx;
+			color: #999999;
 		}
+			
 </style>

+ 5 - 3
services/second.service.js

@@ -17,8 +17,10 @@ export default class SecondApi {
 	brandList (data = {}) {
 		return this.AjaxService.get({ url:'/product/brandList', data, isLoading: true })
 	}
-	/*二手发布/获取省份信息 */
-	GetProvince (data = {}) {
-		return this.AjaxService.get({ url:'/club/province', data, isLoading: true })
+	/*二手发布/提交发布 */
+	SecondHandProduct (data = {}) {
+		return this.AjaxService.post({ url:'/product/releaseSecondHandProduct', data, isLoading: true })
 	}
+	
+
 }