Quellcode durchsuchen

横竖屏黑边问题

Signed-off-by: 李妹妹 <1639016684@qq.com>
李妹妹 vor 2 Wochen
Ursprung
Commit
652c6c2c82

+ 2 - 1
api/storeOrder.js

@@ -3,7 +3,8 @@ let request = new Request().http
 
  
  export function getMyStoreOrderList(data) {
- 	 return request('/app/storeOrder/getMyStoreOrderList',data,'GET');
+ 	 //return request('/app/storeOrder/getMyStoreOrderList',data,'GET');//旧版
+	 return request('/app/order/getMyMergedOrderList',data,'GET')
  } 
  export function getCompanyStoreOrderList(data) {
  	 return request('/app/storeOrder/getCompanyStoreOrderList',data,'GET');

+ 3 - 1
common/request.js

@@ -25,7 +25,9 @@ export default class Request {
 		if (router.indexOf("/live/liveData/like") != -1) {
 			path = 'https://im.fhhx.runtzh.com';
 		}
-
+if (router.indexOf("/app/order/getMyMergedOrderList") != -1) {
+			path = 'https://userapp.klbycp.com';
+		}
 		if (router.indexOf("/live") !== -1 || router.indexOf("/liveAPP") !== -1) {
 			// path = 'https://userapp.klbycp.com';
 			path = path2

+ 5 - 2
pages/shopping/productDetails.vue

@@ -489,8 +489,11 @@
 			// 加入购物车
 			addCart(type) {
 				if (type == 'buy') {
-					const userInfoStr = uni.getStorageSync('userInfo');
-					if (!userInfoStr || !!JSON.parse(userInfoStr).maOpenId) {
+					let userInfoStr = uni.getStorageSync('userInfo');
+					if(Object.prototype.toString.call(userInfoStr) == '[object String]'){
+						userInfoStr = JSON.parse(userInfoStr)
+					}
+					if (!userInfoStr || userInfoStr && !userInfoStr.maOpenId) {
 						uni.navigateTo({
 							url: '/pages/auth/login'
 						});

+ 16 - 12
pages_course/living.vue

@@ -106,7 +106,7 @@
 
 				<view class="videolist" v-if="liveItem.status == 2" :class="isFullscreen ? 'screen' : ''">
 					<view class="video-container"
-						:style="{ paddingBottom: liveItem.showType==2||isFullscreen?'':videoRatio + '%',height:liveItem.showType==2?'100vh':'auto',width:isFullscreen?'0':'100%'}"
+						:style="{ paddingBottom: liveItem.showType==2||isFullscreen?'':videoRatio + '%',height:liveItem.showType==2?'100vh':isFullscreen?'auto':'400rpx',width:isFullscreen?'0':'100%'}"
 						:class="{'horizontal-layout': liveItem.showType == 1,'fullscreen-mode': isFullscreen}">
 						<!-- <video v-if="liveItem.videoUrl && liveItem.liveType == 2 && !generating"
 							:id="`myVideo_${liveId}`" :autoplay="true" class="video-player" :src="liveItem.videoUrl"
@@ -227,12 +227,12 @@
 					</view>
 
 					<view class="chat-content-wrapper" :class="{ 'chat-content-focused': isFocus }">
-						<view class="notice-message" v-if="!isFocus&&isShowNotice"
-							:class="liveItem.showType == 1 ? 'horizontal-notice' : ''">
+						<view class="notice-message" v-if="isShowNotice"
+							:class="liveItem.showType == 1 ? 'horizontal-notice' : 'horizontal-notice2'">
 							公告消息: {{notice.msg}}
 						</view>
 						<scroll-view id="msgScroll" v-if="Array.isArray(talklist)" enable-flex scroll-y="true"
-						:style="{ height: `calc(100% - ${commonViewHeight}px)`,marginTop:commonViewHeight+'px' }"
+						:style="{ height: liveItem.showType === 1?`calc(100% - ${commonViewHeight}px)`:'',marginTop:liveItem.showType === 1?commonViewHeight+'px':'' }"
 							:enhanced="true" :bounces="false" :show-scrollbar="false" :fast-deceleration="false"
 							:enable-back-to-top="false" class="message-scroll-view"
 							:class="liveItem.status == 1 ? 'message-scroll2' : ''" :scroll-top="scrollTop"
@@ -3074,13 +3074,14 @@
 				const wW = (winW / winH) * 100;
 				//竖屏
 				const wH = (winH / winW) * 100;
-				if (this.liveItem.showType == 2) {
-					const videoRatio = (height / width) * 100;
-					this.scale = wH / videoRatio;
-					console.log("比例", this.videoRatio, width, height)
-				} else if (this.isFullscreen) {
-					this.scale = wW / this.videoRatio;
-				}
+				// this.scale = wW / this.videoRatio;
+				// if (this.liveItem.showType == 2) {
+				// 	const videoRatio = (height / width) * 100;
+				// 	this.scale = wH / videoRatio;
+				// 	console.log("比例", this.videoRatio, width, height)
+				// } else if (this.isFullscreen) {
+					
+				// }
 				this.videoProgressKey = `videoProgress_${this.liveId}`;
 				this.setVideoProgress();
 			},
@@ -5329,7 +5330,7 @@
 
 				.chat-content-wrapper {
 					flex: 1;
-					height: 300rpx;
+					height: 400rpx;
 					padding: 20rpx 0;
 					transform: translateZ(0);
 					will-change: height;
@@ -5357,6 +5358,9 @@
 							height: fit-content;
 							z-index: 2;
 						}
+						&.horizontal-notice2 {
+							color:#fff !important
+						}
 					}
 
 					.message-scroll-view {

+ 5 - 2
pages_shopping/live/goods.vue

@@ -227,8 +227,11 @@
 			// 加入购物车
 			addCart(type) {
 				if (type == 'buy') {
-					const userInfoStr = uni.getStorageSync('userInfo');
-					if (!userInfoStr || !JSON.parse(userInfoStr).maOpenId) {
+					let userInfoStr = uni.getStorageSync('userInfo');
+					if(Object.prototype.toString.call(userInfoStr) == '[object String]'){
+						userInfoStr = JSON.parse(userInfoStr)
+					}
+					if (!userInfoStr || userInfoStr && !userInfoStr.maOpenId) {
 						uni.navigateTo({
 							url: '/pages/auth/login'
 						});

+ 1 - 1
pages_user/user/refundOrderDetail.vue

@@ -270,7 +270,7 @@
 <style lang="scss">
 	.fixed-top-box{
 		width: 100%;
-		background: linear-gradient(135deg, #66b2ef 0%, #2BC7B9 100%);
+		//background: linear-gradient(135deg, #66b2ef 0%, #2BC7B9 100%);
 		position: fixed;
 		top: 0;
 		left: 0;

+ 104 - 15
pages_user/user/storeOrder.vue

@@ -42,7 +42,8 @@
 						</view>
 					</view>
 					<!-- 产品列表 -->
-					<view  class="drug-list"  >
+					<!-- 商城 -->
+					<view  class="drug-list"  v-if="item.orderType==1">
 						<view @click="showDetail(item)"  v-if="item.isPackage!=1" v-for="(subItem,subIndex) in item.items" :key="subIndex" class="drug-item" >
 							<view class="img-box">
 								<image :src="JSON.parse(subItem.jsonInfo).image" mode="aspectFill"></image>
@@ -57,7 +58,7 @@
 								<view class="num-box">
 									<view class="price">
 										<text class="unit">¥</text>
-										<text class="num">{{JSON.parse(subItem.jsonInfo).price.toFixed(2)}}</text>
+									<text class="num">{{JSON.parse(subItem.jsonInfo).price.toFixed(2)}}</text>
 									</view>
 									<view class="amount">x{{JSON.parse(subItem.jsonInfo).num}}</view>
 								</view>
@@ -101,6 +102,66 @@
 							</view>
 						</view>
 					</view>
+					<!-- 直播 -->
+					<view  class="drug-list"  v-if="item.orderType==2">
+						<view @click="showDetail(item)"  v-if="item.isPackage!=1" class="drug-item" >
+							<view class="img-box">
+								<image :src="JSON.parse(item.itemJson).image" mode="aspectFill"></image>
+							</view>
+							<view class="drug-info"  >
+								<view>
+									<view class="name-box ellipsis2">
+										<view v-if="item.isPrescribe==1" class="tag">处方药</view>{{JSON.parse(item.itemJson).productName}}
+									</view>
+									<view class="spec ellipsis2">{{JSON.parse(item.itemJson).sku}}</view>
+								</view>
+								<view class="num-box">
+									<view class="price">
+										<text class="unit">¥</text>
+									<text class="num">{{JSON.parse(item.itemJson).price.toFixed(2)}}</text>
+									</view>
+									<view class="amount">x{{item.totalNum}}</view>
+								</view>
+							</view>
+						</view>
+						<view v-if="item.isPackage==1&&item.packageJson!=null" class="drug-item" @click="showDetail(item)">
+							<view class="img-box">
+								<image :src="JSON.parse(item.packageJson).imgUrl" mode="aspectFill"></image>
+							</view>
+							<view class="drug-info"  >
+								<view>
+									<view class="name-box ellipsis2">
+										<view class="tag">套餐</view>{{JSON.parse(item.packageJson).title}}
+									</view>
+									<view class="spec ellipsis2">{{JSON.parse(item.packageJson).descs}}</view>
+								</view>
+								<!-- <view class="num-box">
+									<view class="price">
+										<text class="unit">¥</text>
+										<text class="num">{{JSON.parse(item.packageJson).payMoney.toFixed(2)}}</text>
+									</view>
+									<view class="amount"></view>
+								</view> -->
+							</view>
+						</view>
+						<!-- 实付金额、按钮 -->
+						<view class="bottom-box">
+							<view class="amount-paid">
+								<text class="label">订单金额:</text>
+								<view class="price-box">
+									<view class="unit">¥</view>
+									<view class="num" >{{item.payPrice.toFixed(2)}}</view>
+								</view>
+							</view>
+							<view class="btn-box">
+								<view v-if="item.status == 0" class="btn cancel" @click="cancel(item)">取消订单</view>
+								<view v-if="item.status == 0" class="btn pay" @click="pay(item)">支付</view>
+								<view v-if="item.isAfterSales==1" class="btn cancel" @click="refund(item)">申请售后</view>
+								<view v-if="item.status >=2 &&item.deliveryId!=null" class="btn pay" @click.stop="showDelivery(item)">查看物流</view>
+								<!-- <view v-if="item.status==4" class="btn pay">再次购买</view> -->
+							</view>
+						</view>
+					</view>
 				</view>
 			</view>
 		</mescroll-body>
@@ -155,9 +216,15 @@
 				this.mescroll.resetUpScroll()
 			},
 			refund(item) {
-				uni.navigateTo({
-					url: './refundOrderProduct?orderId='+item.id
-				})	
+				if(item.orderType==2){
+					uni.navigateTo({
+						url: '/pages_shopping/live/refundOrderProduct?orderId=' + item.orderId
+					})
+				}else{
+					uni.navigateTo({
+						url: './refundOrderProduct?orderId='+item.id
+					})	
+				}
 			},
 			// tab切换
 			orderStatusChange(item) {
@@ -201,13 +268,21 @@
 						that.mescroll.endErr();
 					}
 				});
+
 			},
 			// 查看订单详情
 			showDetail(item) {
 				console.log(item)
-				uni.navigateTo({
-					url: './storeOrderDetail?id=' + item.id
-				})
+				if(item.orderType==2){
+					uni.navigateTo({
+						url: '/pages_shopping/live/storeOrderDetail?orderId=' + item.orderId
+					})
+				}else{
+					uni.navigateTo({
+						url: './storeOrderDetail?id=' + item.id
+					})
+				}
+				
 			},
 			cancel(item){
 				var that=this;
@@ -217,7 +292,7 @@
 				    success: function (res) {
 				        if (res.confirm) {
 							var data = {
-								orderId:item.id
+								orderId:item.orderType==2?item.orderId:item.id
 							};
 							cancelOrder(data).then(res => {
 								if(res.code==200){
@@ -247,16 +322,30 @@
 					});
 				}
 				else{
-					uni.navigateTo({
-						url: '/pages/shopping/paymentOrder?orderId='+item.id
-					})
+					if(item.orderType==2){
+						// 支付
+						console.log("去支付", item)
+						uni.navigateTo({
+							url: `/pages_shopping/live/paymentOrder?orderList=${encodeURIComponent(JSON.stringify(item))}`
+						})
+					}else{
+						uni.navigateTo({
+							url: '/pages/shopping/paymentOrder?orderId='+item.id
+						})
+					}
 				}
 			},
 			// 查看物流
 			showDelivery(item) {
-				uni.navigateTo({
-					url: './storeOrderDelivery?orderId='+item.id
-				})
+				if(item.orderType==2){
+					uni.navigateTo({
+						url: `/pages_shopping/live/storeOrderDelivery?orderId=${item.orderId}`
+					})
+				}else{
+					uni.navigateTo({
+						url: './storeOrderDelivery?orderId='+item.id
+					})
+				}
 			}
 			
 		}