Quellcode durchsuchen

Merge branch 'developerB' of git.caimei365.com:caimei-repository/caimei-applets-caimei into developerB

zhengjinyi vor 4 Jahren
Ursprung
Commit
a420188dae

+ 15 - 0
api/other.js

@@ -65,4 +65,19 @@ export function querySaveInvoice(params) {
 			}
 		})
 	})
+}
+/**
+ *@售后条款内容
+ *@param
+ */
+export function querySaveClause(params) {
+	return new Promise(function(resolve,reject) {
+		request.post('/seller/clause',params, true,res => {
+			if(res.code == 0){
+				resolve(res)
+			}else{
+				reject(res)
+			}
+		})
+	})
 }

+ 18 - 14
components/cm-module/creatOrder/sellerRegulations.vue

@@ -21,8 +21,8 @@
 								<view class="row-text noTk">无条款</view>
 								<radio class="row-radio" value="无条款" color="#E15616"/>
 							</label>
-							<label class="row-input" v-for="(item, index) in freightList" :key="item.value">
-								<view class="row-text">{{item.name}}</view>
+							<label class="row-input" v-for="(item, index) in regulaDatas" :key="index">
+								<view class="row-text" @click.stop="gotoConten(item.id)">{{item.name.length>15?item.name.substr(0,15)+'...':item.name}}</view>
 								<radio class="row-radio" :value="item.name" :checked="index === current" color="#E15616"/>
 							</label>
 						</radio-group>
@@ -35,33 +35,37 @@
 		</view>
 	</view>
 </template>
-
 <script>
 	export default{
 		name:'regulations',
 		props:{
 			regulaDatas:{
-				type:Object
+				type:Array
 			}
 		},
 		data(){
 			return{
 				regulaText:'无条款',
-				freightList:[
-					{value:1,name:'第一款—售后条款(无仪器产权'},
-					{value:0,name:'第一款—售后条款(无仪器产权'},
-					{value:-1,name:'第一款—售后条款(无仪器产权'},
-					{value:-1,name:'第一款—售后条款(无仪器产权'},
-					{value:-1,name:'第一款—售后条款(无仪器产权'},
-					{value:-1,name:'第一款—售后条款(无仪器产权'},
-					{value:-1,name:'第一款—售后条款(无仪器产权'},
-					{value:-1,name:'第一款—售后条款(无仪器产权'},
-				],
+				
 				freightMoney:0,
 				specClass: '',//规格弹窗css类,控制开关动画
 			}
 		},
+		watch: {
+			regulaDatas: {
+				handler: function (el) {//监听对象的变换使用 function,箭头函数容易出现this指向不正确
+					this.regulaDatas = el
+				},
+				deep: true
+			}
+		},
+		created() {
+		},
 		methods:{
+			gotoConten(id){
+				console.log(id)
+				this.$api.navigateTo(`/pages/service/sellconten?id=${id}`)
+			},
 			radioChange(e){
 				this.regulaText = e.target.value;
 			},

+ 41 - 0
pages/service/sellConten.vue

@@ -0,0 +1,41 @@
+<template name="sellConten">
+	<view class="container clearfix rich-text-temp">
+		<rich-text-template ref="childTemplate"></rich-text-template>
+	</view>
+</template>
+
+<script>
+	import richTextTemplate from '@/components/cm-module/listTemplate/richTextTemplate'
+	import { querySaveClause } from "@/api/other.js"
+	
+	export default{
+		components: {
+		   richTextTemplate
+		},
+		data() {
+			return{
+				type: '',
+				id:''
+			}
+		},
+		onLoad(option){
+			this.type = 'afterSale';
+			this.id= option.clauseId
+			this.initData();
+		},
+		methods:{
+			initData(){
+				let self = this;
+				querySaveClause({clauseId:this.id}).then(response =>{
+					let data =response.data.content
+					self.$refs.childTemplate.html = self.$api.adaptRichTextImg(data);
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+</style>

+ 7 - 5
second/pages/form/form.vue

@@ -72,8 +72,8 @@
 						 </view>
 					 </view>
 					 <view class="row"  v-show="secondParams.secondHandType==2">
-						 <view class="label">产品到期日</view>
-						 <view class="spacing">
+						 <view class="label second">产品到期日</view>
+						 <view class="spacing second">
 							<input type="text"  v-model="secondParams.maturityYears" maxlength="10" placeholder="请输入产品到期日,如:2020年12月">
 						 </view>
 					 </view>
@@ -103,8 +103,8 @@
 						 </view>
 					 </view>
 					 <view class="row"  v-show="secondParams.secondHandType==2">
-						 <view class="label">采购价/原价</view>
-						 <view class="spacing">
+						 <view class="label second">采购价/原价</view>
+						 <view class="spacing second">
 							  <input type="text"  v-model="secondParams.originalPrice" maxlength="30" oninput="value=value.replace(/[^\d]/g, '')" placeholder="请输入采购价/原价"/>
 						 </view>
 					 </view>
@@ -195,7 +195,7 @@
 							<span  @click="changeBox($event)" class="iconfont xiangliao"
 							:class="checkbox?'icon-jiagexiangliao':'icon-juxingweigouxuan'" ><span style="margin-left: 10rpx;">已阅读</span></span>
 						</view>
-						<div class="BtnAll" >
+						<div class="BtnAll" :style="{ paddingBottom :isIphoneX ? '68rpx' : '0rpx' }">
 							<view   @click="submitBtn" class="btn-submit">发布</view>
 					</div>
 				 </form>
@@ -488,6 +488,8 @@
 		.jiaobiao {width: 0;height: 0;border-left: 20rpx solid transparent;border-right: 20rpx solid transparent;top: -30%;
 		    right: 40%;border-bottom: 20rpx solid #1890f9;position: absolute;}
 		.label{color: #666666;display: inline-block;width: 120rpx;}
+		.label.second{width: 155rpx;}
+		.row .spacing.second{width: 70%;}
 		.row{border-bottom: 2rpx solid #e1e1e1;line-height: 90rpx;height: 90rpx;}
 		.row.fenlei{height: auto;margin: 10rpx 0;border: 0}
 		.select {position: relative;color: #9aa5b5;text-align: left;user-select: none;}

+ 1 - 1
second/pages/product/product-details.vue

@@ -97,7 +97,7 @@
 					<view class="title-tab">相关推荐</view>
 				</view>
 				<view class="content hot">
-					<recommend :query-productid="product.productID" v-if="isRequest"></recommend>
+					<recommend :query-productid="product.productID" ></recommend>
 				</view>
 			</view>	
 				</view> 

+ 3 - 3
second/pages/product/product-list.vue

@@ -83,9 +83,9 @@
 		                </view>
 		            </view>
 		        </view>
-				<view class="fabu">
-					 <span  class="intro"  @click.stop="gotointro">市场介绍</span>
-					 <span  class="release" @click.stop="gotoform">我要发布</span>
+				<view class="fabu" :style="{ paddingBottom :isIphoneX ? '68rpx' : '0rpx' }">
+					 <span  class="intro"  @click.stop="gotointro" >市场介绍</span>
+					 <span  class="release" @click.stop="gotoform" >我要发布</span>
 				</view>
 				<!-- 透明模态层 -->
 				<modal-layer v-if='isModallayer'></modal-layer>

+ 2 - 1
seller/pages/order/create-order.vue

@@ -127,7 +127,7 @@
 				isDepositFlg:true,
 				depositIds : [6060,6061,6062,6063,6064,6065,6066,6067,6068,6069],//定金&充值余额商品ID
 				isIphoneX:this.$store.state.isIphoneX,
-				regulationsData:{},
+				regulationsData:[],
 			}
 		},
 		onLoad(option){//商品数据
@@ -182,6 +182,7 @@
 						this.totalOriginalPrice = data.reducedPrice + data.totalAmount
 						this.rechargeGoods = data.rechargeGoods
 						this.allPrice = this.payAllPrice = data.totalAmount
+						this.regulationsData = data.clauseList
 						this.goodsData.forEach(item =>{
 							item.productsList.forEach(pros =>{
 								if(this.depositIds.indexOf(pros.productID)>=0){