Ver Fonte

优化项目

zhengjinyi há 2 anos atrás
pai
commit
f6cbb2b104

+ 0 - 233
components/tui-components/tui-tabs/tui-tabs.vue

@@ -1,233 +0,0 @@
-<template>
-	<view class="tui-tabs-view" :class="[isFixed?'tui-tabs-fixed':'tui-tabs-relative',unlined?'tui-unlined':'']" :style="{height:height+'rpx',padding:`0 ${padding}rpx`,background:bgColor,marginTop:marginTop+'px',top:isFixed?top+'px':'auto'}">
-		<view v-for="(item,index) in tabs" :key="index" class="tui-tabs-item" :style="{width:itemWidth}" @tap.stop="swichTabs(index)">
-			<view class="tui-tabs-title" :class="{'tui-tabs-active':currentTab==index,'tui-tabs-disabled':item.disabled}" :style="{color:currentTab==index?selectedColor:color,fontSize:size+'rpx',lineHeight:size+'rpx',fontWeight:bold && currentTab==index?'bold':'normal'}">{{item.name}}</view>
-		</view>
-		<view class="tui-tabs-slider" :style="{transform:'translateX('+scrollLeft+'px)',width:(sliderWidth+5)+'rpx',height:
-	sliderHeight+'rpx',borderRadius:sliderRadius,bottom:bottom,background:sliderBgColor,marginBottom:bottom=='50%'?('-'+sliderHeight/2+'rpx'):0}"></view>
-	</view>
-</template>
-
-<script>
-	export default {
-		name: "tuiTabs",
-		props: {
-			//标签页
-			tabs: {
-				type: Array,
-				default () {
-					return []
-				}
-			},
-			//rpx
-			height: {
-				type: Number,
-				default: 80
-			},
-			//rpx 只对左右padding起作用,上下为0
-			padding: {
-				type: Number,
-				default: 22
-			},
-			marginTop:{
-				type:Number,
-				default:0
-			},
-			//背景色
-			bgColor: {
-				type: String,
-				default: "#FFFFFF"
-			},
-			//是否固定
-			isFixed: {
-				type: Boolean,
-				default: false
-			},
-			//px
-			top: {
-				type: Number
-					// #ifndef H5
-					,
-				default: 0
-					// #endif
-					// #ifdef H5
-					,
-				default: 44
-				// #endif
-			},
-			//是否去掉底部线条
-			unlined: {
-				type: Boolean,
-				default: false
-			},
-			//当前选项卡
-			currentTab: {
-				type: Number,
-				default: 0
-			},
-			//滑块宽度
-			sliderWidth: {
-				type: Number,
-				default: 88
-			},
-			//滑块高度
-			sliderHeight: {
-				type: Number,
-				default: 4
-			},
-			//滑块背景颜色
-			sliderBgColor: {
-				type: String,
-				default: "#5677fc"
-			},
-			sliderRadius:{
-				type: String,
-				default: "50rpx"
-			},
-			//滑块bottom
-			bottom: {
-				type: String,
-				default: "0"
-			},
-			//标签页宽度
-			itemWidth: {
-				type: String,
-				default: "25%"
-			},
-			//字体颜色
-			color: {
-				type: String,
-				default: "#666"
-			},
-			//选中后字体颜色
-			selectedColor: {
-				type: String,
-				default: "#5677fc"
-			},
-			//字体大小
-			size: {
-				type: Number,
-				default: 28
-			},
-			//选中后 是否加粗 ,未选中则无效
-			bold: {
-				type: Boolean,
-				default: false
-			}
-		},
-		watch: {
-			currentTab() {
-				this.checkCor();
-			}
-		},
-		created() {
-			setTimeout(() => {
-				// 高度自适应
-				uni.getSystemInfo({
-					success: (res) => {
-						this.winWidth = res.windowWidth;
-						this.checkCor()
-					}
-				});
-			}, 50);
-		},
-		data() {
-			return {
-				winWidth: 0,
-				scrollLeft: 0
-			};
-		},
-		methods: {
-			checkCor: function() {
-				let tabsNum = this.tabs.length
-				let padding = this.winWidth / 750 * this.padding
-				let width = this.winWidth - padding * 2
-				let left = (width / tabsNum - (this.winWidth / 750 * this.sliderWidth)) / 2 + padding
-				let scrollLeft = left
-				if (this.currentTab > 0) {
-					scrollLeft = scrollLeft + (width / tabsNum) * this.currentTab
-				}
-				this.scrollLeft = scrollLeft
-			},
-			// 点击标题切换当前页时改变样式
-			swichTabs: function(index) {
-				let item = this.tabs[index]
-				if (item && item.disabled) return;
-				if (this.currentTab == index) {
-					return false;
-				} else {
-					this.$emit("change", {
-						index: Number(index)
-					})
-				}
-			}
-		}
-	}
-</script>
-
-<style>
-	.tui-tabs-view {
-		width: 100%;
-		box-sizing: border-box;
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		z-index: 1000;
-	}
-
-	.tui-tabs-relative {
-		position: relative;
-	}
-
-	.tui-tabs-fixed {
-		position: fixed;
-		left: 0;
-	}
-
-	.tui-tabs-fixed::before,
-	.tui-tabs-relative::before {
-		content: '';
-		position: absolute;
-		border-bottom: 1upx solid #eaeef1;
-		-webkit-transform: scaleY(0.5);
-		transform: scaleY(0.5);
-		bottom: 0;
-		right: 0;
-		left: 0;
-	}
-
-	.tui-unlined::before {
-		border-bottom: 0 !important
-	}
-
-	.tui-tabs-item {
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		height: 100%;
-	}
-
-	.tui-tabs-disabled {
-		opacity: .6;
-	}
-
-	.tui-tabs-title {
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		position: relative;
-		z-index: 2;
-	}
-
-	.tui-tabs-active {
-		transition: all 0.15s ease-in-out;
-	}
-
-	.tui-tabs-slider {
-		position: absolute;
-		left: 0;
-		transition: all 0.15s ease-in-out;
-		z-index: 0;
-		transform: translateZ(0);
-	}
-</style>

+ 11 - 11
pages/seller/order/order-details.vue

@@ -10,7 +10,9 @@
 		<view class="container-details" :style="{ paddingTop: navbarHeight + 'px' }">
 			<view class="status-text">
 				<view class="view-type">{{ information.status | TextFormat }}</view>
-				<view class="status-visible"> {{ information.orderSeen == 2 ? '订单对机构不可见' : '订单对机构可见' }} </view>
+				<view class="status-visible">
+					{{ information.orderSeen == 2 ? '订单对机构不可见' : '订单对机构可见' }}
+				</view>
 				<view class="Rebate " v-if="information.rebateFlag == 1">返佣</view>
 				<text class="bage-buss btn" v-if="information.orderSubmitType == 3 || information.orderSubmitType == 4"
 					>协销</text
@@ -90,10 +92,7 @@
 			@paymentConfirm="hanldPaymentConfirm"
 		/>
 		<!-- 分享弹窗 -->
-		<share-alert :orderId="orderId" 
-					 :shareType="isShareType"
-					 v-if="isShareModal" 
-					 @shareConfirm="onShareAppMessage"> 
+		<share-alert :orderId="orderId" :shareType="isShareType" v-if="isShareModal" @shareConfirm="onShareAppMessage">
 		</share-alert>
 		<!-- 促销活动弹窗 -->
 		<activi-popup :Promotion="handlerPros" :popupShow="popupShow"></activi-popup>
@@ -163,7 +162,7 @@ export default {
 			isRequest: false, //是否加载完成渲染子组件
 			isOrderShare: false,
 			isShareModal: false,
-			isShareType:2,
+			isShareType: 2,
 			isPayModel: false,
 			modelType: 0,
 			ableUserMoney: '', //机构余额
@@ -386,15 +385,16 @@ export default {
 			//监听根据付款状态做操作
 			this.OrderService.OrderPaymentValidation({ orderId: data.orderId })
 				.then(response => {
-					let data = this.payModelData = response.data
-					if(data.balanceFlag == 0){// 0可以走余额抵扣,1不能走余额抵扣
+					let data = (this.payModelData = response.data)
+					if (data.balanceFlag == 0) {
+						// 0可以走余额抵扣,1不能走余额抵扣
 						if (data.code == -1) {
 							this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
 						} else {
 							this.isPayModel = true
 							this.modelType = 3
 						}
-					}else{
+					} else {
 						this.$util.modal('', '该订单已走线上支付流程,不能进行余额抵扣。', '确定', '', false, () => {})
 					}
 				})
@@ -599,7 +599,7 @@ page {
 		float: left;
 		color: #ff2a2a;
 	}
-	.status-visible{
+	.status-visible {
 		float: left;
 		color: #999999;
 		margin-left: 20rpx;
@@ -628,7 +628,7 @@ page {
 		float: right;
 		font-size: $font-size-24;
 	}
-	.bage-name{
+	.bage-name {
 		line-height: 32rpx;
 		display: inline-block;
 		color: #999999;