Browse Source

BUG修改

Roebin 3 years ago
parent
commit
6c1143a520

+ 2 - 0
App.vue

xqd
@@ -64,5 +64,7 @@
 		text-align: center;
 		margin:0 auto;
 		margin-top: 60rpx;
+		font-size: 30rpx;
 	}
+	
 </style>

+ 4 - 4
pages/customerService.vue

xqd
@@ -12,14 +12,14 @@
 			</view>
 		</view>
 		<view class="footer">
-			<view class="number" v-for="item,index in list" :key="index" @click="toPhone(item)">
-				<view class="num">
+			<view class="number" v-for="item,index in list" :key="index" @click="toPhone(item)"  >
+				<view class="num" v-if="item.length>0">
 					<image src="../static/mobile@2x.png" ></image>
 					<text class="" style="margin-left: 20rpx;">
-						{{item}}
+						{{item.length>0?item:''}}
 					</text>
 				</view>
-				<view class="btn">
+				<view class="btn" v-if="item.length>0">
 					联系
 				</view>
 			</view>

+ 2 - 2
pages/index/index.vue

xqd
@@ -38,10 +38,10 @@
 					</view>
 					<view class="contentfooter">
 						<view class="contentfooter-title">
-							{{item.title}}
+							{{item.title?item.title:""}}
 						</view>
 						<view class="contentfooter-subtitle">
-							{{item.description}}
+							{{item.description?item.description:''}}
 						</view>
 					</view>
 				</view>

+ 1 - 10
pages/invoice/applyInvoice.vue

xqd
@@ -138,16 +138,7 @@
 				}
 			}	
 		},
-		onUnload(event){ //监听是否跳转页面
-					if(this.tjzt){
-						//tjzt为变量
-					}else{
-						uni.navigateTo({
-							url:"/pages/invoice/invoiceList"
-						})
-					}
-		
-				},
+
 		
 		onLoad(o){
 				let order=uni.getStorageSync("order")

+ 3 - 2
pages/invoice/invoiceEndit.vue

xqd xqd
@@ -14,9 +14,9 @@
 					抬头类型
 				</view>
 				<view class="btn">
-					<view :class="model1.userInfo.type==2?'btn-item-active':'btn-item'" @click="model1.userInfo.type=2">
+					<view :class="model1.userInfo.type==2?'btn-item-active':'btn-item'" @click="">
 						企业</view>
-					<view :class="model1.userInfo.type==1?'btn-item-active':'btn-item'" @click="model1.userInfo.type=1">
+					<view :class="model1.userInfo.type==1?'btn-item-active':'btn-item'" @click="">
 						个人</view>
 				</view>
 
@@ -134,6 +134,7 @@
 				let info = JSON.parse(options.info)
 				if (info.type == "个人") {
 					info.type = 1
+					this.personalname=info.name
 				} else if (info.type == "企业") {
 					info.type = 2
 				}

+ 1 - 10
pages/invoice/invoiceList.vue

xqd
@@ -53,16 +53,7 @@
 				ids:[]
 			}
 		},
-		onUnload(event){ //监听是否跳转页面
-					if(this.tjzt){
-						//tjzt为变量
-					}else{
-						uni.navigateTo({
-							url:"/pages/userCenter/invoice"
-						})
-					}
-		
-				},
+
 		onLoad() {
 			this.loadLsit()
 		},

+ 17 - 1
pages/order/order.vue

xqd xqd xqd
@@ -45,8 +45,12 @@
 		
 		<view class="list"  v-for="(item,index) in orderList" :key="index" @click="goOrderDetail(item.id)">
 			<view class="list-top">
-				<view class="">
+				<view class="flexall">
+					
 				订单号  {{item.code}}
+				<view style="padding-left: 5rpx;" @click.stop="copyCode(item.code)">
+					<u-icon name="file-text"></u-icon>
+				</view>
 				</view>
 				<view class="">
 					<!-- 待付款 -->{{item.status_text}}
@@ -371,6 +375,14 @@
 					console.log( err)
 				})
 			},
+			copyCode(code){
+				uni.setClipboardData({
+					data: code,
+					success: function () {
+						// this.$toast("复制成功")
+					}
+				});
+			},
 			clickTab(item) {
 			    console.log('item', item);
 				if(item.index==0){
@@ -530,6 +542,10 @@
 		background-color: #FFFFFF;
 		// padding: 30rpx;
 		margin: 20rpx 30rpx;
+		.flexall{
+			display: flex;
+			align-items: center;
+		}
 		.list-top{
 			display: flex;
 			justify-content: space-between;

+ 2 - 2
pages/travel.vue

xqd xqd
@@ -11,7 +11,7 @@
 		<view class="travelContent" v-for="item,index in listArr" @click="gotravelDetails(item.id)">
 			<!-- <image src="http://cdn.uviewui.com/uview/empty/list.png" mode=""></image> -->
 			<view class="video">
-				<image :src="item.cover_picture" ></image>
+				<image :src="item.cover_picture" mode="aspectFill"></image>
 				<!-- <video src="" controls></video> -->
 			</view>
 			<view class="travel" >
@@ -152,7 +152,7 @@
 				// box-shadow: 0px 8px 14px 0px rgba(0, 21, 3, 0.05);
 				// border-radius: 16px 16px 16px 58px;
 				image{
-					width: 100%;
+					width: 690rpx;
 					height: 410rpx;
 				}
 			}

+ 22 - 5
pages/travel/poster.vue

xqd xqd xqd xqd xqd
@@ -1,6 +1,6 @@
 <template>
 	<view class="">
-		<view class="content">
+		<!-- <view class="content">
 			<view class="poster">
 				<image src="https:\/\/t38.9026.com\/uploads\/golf\/images\/2022-05-31\/20220531739250.png"  mode="aspectFill"></image>
 				<view class="code">
@@ -20,9 +20,12 @@
 				</view>
 			</view>
 			<view class="" style="font-size: 22rpx;color: #666666;">
-				{{created_at}}
+				{{created_at?created_at:''}}
 			</view>
-		</view>
+		</view> -->
+		<!-- <view class="content">
+			<image :src="" mode="aspectFill"></image>
+		</view> -->
 		<view class="flex">
 			<view class="weix">
 				<button type="default" open-type="share" style="background-color: transparent;border-style:none;border:0;padding: 0;line-height: 30rpx;">
@@ -48,7 +51,8 @@
 	export default {
 		data(){
 			return{
-			goodsInfo:null
+			goodsInfo:null,
+			good_id:''
 			}
 		},
 		// #ifdef MP
@@ -66,6 +70,7 @@
 				let goodsInfo = decodeURIComponent(o.goodsInfo)
 				this.goodsInfo = JSON.parse(goodsInfo)
 			}
+			this.init()
 		},
 		computed:{
 			created_at(){
@@ -77,7 +82,19 @@
 			}
 		},
 		methods:{
-			
+			init(){
+				uni.$u.http.post('/api/share/good', {
+					good_id: this.goodsInfo.id.toString()
+				}, {
+					custom: {
+						auth: true
+					}
+				}).then((res) => {
+					// this.imgurl=res.
+				}).catch((err) => {
+					console.log(err)
+				})
+			}
 		}
 	}
 </script>

+ 56 - 35
pages/travel/travelDetails.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -73,13 +73,14 @@
 		<view class="navbar footer">
 			<view class="kefu flex">
 				<view class="">
-					<button open-type="contact" style="background-color: transparent;border-style:none;border:0;padding: 0;line-height: 30rpx;">
+					<button open-type="contact"
+						style="background-color: transparent;border-style:none;border:0;padding: 0;line-height: 30rpx;">
 						<image src="../../static/travelD/service.png" mode="aspectFit"></image>
 						<view class="" style="font-size: 20rpx;color: rgba(255, 255, 255, 0.8);">
 							客服
 						</view>
 					</button>
-					
+
 				</view>
 				<view style="height: 50rpx;width: 1px;background-color:rgba(255, 255, 255, 0.5);margin:0 40rpx;"></view>
 			</view>
@@ -95,11 +96,12 @@
 			</view>
 			<view class="kefu wxin flex">
 				<view class="">
-					<button open-type="share" style="background-color: transparent;border-style:none;border:0;padding: 0;line-height: 30rpx;">
-					<image src="../../static/travelD/share2.png" mode="aspectFit" class="icon"></image>
-					<view class="" style="margin-top: 0rpx;font-size: 20rpx;color: rgba(255, 255, 255, 0.8);">
-						分享
-					</view>
+					<button open-type="share"
+						style="background-color: transparent;border-style:none;border:0;padding: 0;line-height: 30rpx;">
+						<image src="../../static/travelD/share2.png" mode="aspectFit" class="icon"></image>
+						<view class="" style="margin-top: 0rpx;font-size: 20rpx;color: rgba(255, 255, 255, 0.8);">
+							分享
+						</view>
 					</button>
 				</view>
 				<view style="height: 50rpx;width: 1px;background-color:rgba(255, 255, 255, 0.5);margin:0 40rpx;"></view>
@@ -110,7 +112,8 @@
 		</view>
 
 		<u-popup :show="show" mode="bottom" @close="close" @open="open" closeIconPos
-			:customStyle="{padding:'30rpx',borderRadius:'0px 56rpx 0px 0px'}" :zIndex="zindex" :safeAreaInsetBottom="true">
+			:customStyle="{padding:'30rpx',borderRadius:'0px 56rpx 0px 0px'}" :zIndex="zindex"
+			:safeAreaInsetBottom="true">
 			<view class="flex popupTop">
 				<view class="image">
 					<image :src="goodsInfo.cover_picture"></image>
@@ -122,7 +125,7 @@
 					<view class="" style="font-size: 28rpx;color: #333333;">
 						{{choosedays?'已选':'请选择出发日期'}}:{{choosedays}}
 					</view>
-					
+
 				</view>
 			</view>
 			<view class="day">
@@ -131,10 +134,13 @@
 				</view>
 				<view class="" style="">
 					<u-tabs :list="month" @change="chooseDay" :activeStyle="{color: '#1E9F6A','font-weight': 'bold'}"
-						:inactiveStyle="{color: 'rgba(51, 51, 51, 0.5)'}" lineColor="#1E9F6A" :scrollable="true" :key="index" lineWidth="48" lineHeight="4">
+						:inactiveStyle="{color: 'rgba(51, 51, 51, 0.5)'}" lineColor="#1E9F6A" :scrollable="true"
+						:key="index" lineWidth="48" lineHeight="4">
 					</u-tabs>
 				</view>
+				
 				<view class="item">
+					<view class="more" v-if="days.length==0">暂无房型</view>
 					<view :class="dayindex==index?'day-item-active':'day-item'" v-for="item,index in days"
 						@click="dayItem(index,item)">
 						<view>
@@ -145,7 +151,7 @@
 								{{item.week?item.week:''}}
 							</view>
 						</view>
-						
+
 						<view class="" style="font-size: 26rpx;font-weight: 600;">
 							¥{{item.min_price}}
 						</view>
@@ -153,7 +159,7 @@
 				</view>
 
 			</view>
-			<view class="navbars" @click="isshow = true;zindex=10070">
+			<view class="navbars" @click="openShow()">
 				<view class="price">
 					¥{{price}}
 				</view>
@@ -237,17 +243,17 @@
 
 		},
 		onLoad(options) {
-			that=this
-			if(options.id){
+			that = this
+			if (options.id) {
 				this.init(options.id)
 			}
-			
+
 		},
-		computed:{
-			minprice(){
-				let pr=0
-				if(this.goodsInfo.min_price){
-					pr=this.goodsInfo.min_price
+		computed: {
+			minprice() {
+				let pr = 0
+				if (this.goodsInfo.min_price) {
+					pr = this.goodsInfo.min_price
 				}
 				return pr
 			}
@@ -257,17 +263,17 @@
 			this.scrollTop = e.scrollTop
 		},
 		// #ifdef MP
-		onShareAppMessage(s= false){
-		    return this.$shareAppMessage({
-		        title: that.goodsInfo.name,
-		        imageUrl:"",
-		        path: "/pages/travel/travelDetails?id="+this.id,
-		       
-		    });
+		onShareAppMessage(s = false) {
+			return this.$shareAppMessage({
+				title: that.goodsInfo.name,
+				imageUrl: "",
+				path: "/pages/travel/travelDetails?id=" + this.id,
+
+			});
 		},
 		// #endif
 		methods: {
-			
+
 			init(id) {
 				this.$showLoadding("加载中")
 				uni.$u.http.post('/api/good/show', {
@@ -293,6 +299,17 @@
 					console.log(err)
 				})
 			},
+			openShow() {
+				if (this.dayindex >= 0) {
+					this.isshow = true
+				} else {
+					uni.showModal({
+						title: "提示",
+						content: "请选择房型"
+					})
+					return
+				}
+			},
 			load() {
 				this.$refs.uReadMore.init();
 			},
@@ -343,8 +360,7 @@
 
 			},
 			// 选择日期
-			chooseDay(item,index) {
-				console.log(item,7787)
+			chooseDay(item, index) {
 				this.days = item.days
 			},
 			// 切换标签
@@ -390,7 +406,7 @@
 			// 生成海报
 			goposter() {
 				uni.navigateTo({
-					url: "/pages/travel/poster?goodsInfo="+encodeURIComponent(JSON.stringify(this.goodsInfo))
+					url: "/pages/travel/poster?goodsInfo=" + encodeURIComponent(JSON.stringify(this.goodsInfo))
 				})
 			},
 			// 客服
@@ -407,9 +423,11 @@
 	page {
 		background-color: #f4f4f4;
 	}
-	.txtgray{
+
+	.txtgray {
 		color: #666666;
 	}
+
 	.model {
 		// height: 500rpx !important;
 	}
@@ -489,10 +507,12 @@
 			z-index: 10000;
 
 			.kefu {
+
 				// width: 44rpx;
 				button::after {
-						border: none;
-					}
+					border: none;
+				}
+
 				image {
 					width: 44rpx;
 					height: 44rpx;
@@ -532,6 +552,7 @@
 		.popupTop {
 			padding-bottom: 24rpx;
 			color: #333333;
+
 			.image {
 				margin: 20rpx 20rpx 0 0;
 			}
@@ -555,7 +576,7 @@
 			overflow: auto;
 			// flex-wrap: nowrap;
 		}
-		
+
 		.day-item-active {
 			display: flex;
 			flex-direction: column;

+ 53 - 28
pages/travel/travelPeople.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -66,7 +66,7 @@
 					同住人
 				</view>
 				<view class="flex">
-					<view :class="chooseroommate==1?'flex-item-active':'flex-item'" @click="chooseroommate=1">
+					<view :class="chooseroommate==1?'flex-item-active':'flex-item'" @click="chooseRoomMate">
 						随机安排
 					</view>
 					<view :class="chooseroommate==2?'flex-item-active':'flex-item'" @click="chooseroommate=2">
@@ -75,9 +75,9 @@
 				</view>
 			</view>
 			<view class="travelList" v-if="chooseroommate==2">
-				<view class="" style="margin: 20rpx 0;" v-for="(item,index) in cohabits" :key="index">
+				<view class="clearmore" style="margin: 20rpx 0;" v-for="(item,index) in cohabits" :key="index">
+					<view class="clearbox"  @click="clearCohabits(index)"><u-icon name="close" ></u-icon></view>
 					<u--input placeholder="输入同住人姓名" border="bottom" clearable v-model="cohabits[index]"></u--input>
-
 				</view>
 				<view class="addpeople" @click="addcohabits">
 					增加同住人
@@ -133,7 +133,7 @@
 				@confirm="showMoadl=false">
 				<view class="">
 					关注日月峡公众号
-					<text style="color: #408B68;">日月峡</text>
+					<text style="color: #408B68;">日月峡森林康养旅行</text>
 					及时获取出行信息
 				</view>
 
@@ -194,7 +194,6 @@
 
 			// let goodsInfo=JSON.parse(options.goodsinfo)
 			this.goodsInfo = datainfo.goodsinfo
-			console.log(datainfo.days, 748789)
 			// this.days=days
 			// 
 			// console.log(this.days,this.goodsInfo)
@@ -202,7 +201,6 @@
 		},
 		onShow() {
 			let open = this.$store.state.openpeopleList
-			console.log(open, 890890890)
 			if (open == 0) {
 				this.$store.commit('getpeopleList', [])
 			} else {
@@ -236,21 +234,26 @@
 					url: `/pages/peopleList/addPeople?state=0&info=${JSON.stringify(addPel)}`
 				})
 			},
-			dblclick(url, e) {
-				this.touchNum++
-				setTimeout(() => {
-					if (this.touchNum == 1) {}
-					if (this.touchNum >= 2) {
-						let imgUrl = []
-						imgUrl.push(url)
-						console.log(imgUrl)
-						uni.previewImage({
-							current: imgUrl[0],
-							urls: imgUrl,
-						});
-					}
-					this.touchNum = 0
-				}, 250)
+			clearCohabits(index){
+				this.cohabits.splice(index, 1); 
+			},
+			dblclick(url) {
+				
+					this.touchNum++
+					setTimeout(()=>{
+						if (this.touchNum >= 2) {
+							let imgUrl = []
+							imgUrl.push(url)
+							console.log(imgUrl)
+							uni.previewImage({
+								current: imgUrl[0],
+								urls: imgUrl,
+							});
+						}
+						this.touchNum = 0
+					},1000)
+						
+				console.log(this.touchNum)
 
 			},
 			init() {
@@ -264,8 +267,10 @@
 				this.houseType = 0
 				this.roomPrice = Number(this.houselist[0].price)
 				this.totalromprice = Number(this.houselist[0].price)
-
-				console.log(this.day, this.houselist)
+			},
+			chooseRoomMate(){
+				this.chooseroommate=1
+				this.cohabits=[]
 			},
 			// 选择出行人
 			choosePeople() {
@@ -274,7 +279,6 @@
 					value: this.value,
 					list: list
 				}
-				console.log(obj, 9999999)
 				uni.navigateTo({
 					url: "/pages/peopleList/peopleList?obj=" + JSON.stringify(obj),
 				})
@@ -301,7 +305,6 @@
 				let arr = []
 				this.$store.commit("getpeopleList", arr)
 				this.travelers = []
-				console.log(this.travelers, 77788)
 				this.value = e.value
 				this.totalromprice = Number(this.roomPrice) * e.value
 			},
@@ -310,7 +313,7 @@
 
 				for (let i in this.cohabits) {
 					console.log(i)
-					if (this.cohabits[i] == '') {
+					if (this.cohabits[i] == ''||this.cohabits[i] == null) {
 						console.log(i)
 						this.$toast("请输入正确的同住人姓名")
 						return
@@ -324,7 +327,6 @@
 				this.roomPrice = price
 				this.room_id = id
 				this.totalromprice = Number(this.roomPrice) * this.value
-				console.log(index, price, id, "<=============")
 			},
 			// 提交订单
 			Submit() {
@@ -338,7 +340,12 @@
 						}
 					}
 				}
-
+				if(this.chooseroommate==2){
+					if(this.cohabits.length==0){
+						this.$toast("请输入同住人姓名")
+						return
+					}
+				}
 				if (this.travelers.length == 0) {
 					this.$toast("请选择出行人")
 					return
@@ -526,6 +533,24 @@
 
 			.travelList {
 				padding: 0 20rpx;
+				.clearmore{
+					position: relative;
+				}
+				.clearbox{
+					z-index: 999;
+					position: absolute;
+					width: 45rpx;
+					height: 45rpx;
+					border-radius: 50%;
+					background-color: #F4F4F4;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					right:10rpx;
+					top: 0;
+					bottom: 0;
+					margin: auto 0;
+				}
 			}
 
 			padding:50rpx 0rpx;

+ 1 - 11
pages/userCenter/invoice.vue

xqd xqd
@@ -10,7 +10,7 @@
 	<view class="tips">
 		<u-icon name="error-circle" color="##999999 " size="28"></u-icon>
 		<view class="" style="margin-left:18rpx;">
-			旅行结束后可开具旅行发票,请您在15天内索取,收到您提交的信息后我们会在7个工作日内开具增值税电子普通发票,并发送到您邮箱
+			旅行结束后可开具旅行发票,请您在15天内索取,收到您提交的信息后我们会在7个工作日内开具增值税普通发票,并邮递给您
 		</view>
 	</view>
 </view>
@@ -23,16 +23,6 @@
 				
 			}
 		},
-		onUnload(event){ //监听是否跳转页面
-					if(this.tjzt){
-						//tjzt为变量
-					}else{
-						uni.navigateTo({
-							url:"/pages/userCenter"
-						})
-					}
-		
-				},
 		methods:{
 			// 跳转发票
 			goList(){