فهرست منبع

功能页面修改

Eilly 3 سال پیش
والد
کامیت
f8384cc5c6

+ 1 - 1
node_modules/uview-ui/components/u-upload/u-upload.vue

xqd
@@ -61,7 +61,7 @@
 							<u-icon
 							    name="close"
 							    color="#ffffff"
-							    size="10"
+							    size="20"
 							></u-icon>
 						</view>
 					</view>

+ 11 - 1
pages.json

xqd xqd
@@ -186,10 +186,14 @@
 			"path": "successpay",
 			"style": {
 				"navigationBarTextStyle": "black",
+				
 				// "navigationBarTitleText":"专属森林向导"
 				// #ifdef MP-WEIXIN
-				"navigationStyle": "custom"
+				"navigationStyle": "custom",
 				// #endif
+				"app-plus": {// App特定样式
+				"popGesture": "none"
+				}
 			}
 		},{
 			"path": "orderDetails",
@@ -239,6 +243,12 @@
 				"navigationBarTextStyle": "black",
 				"navigationBarTitleText":"编辑抬头"
 			}
+		},{
+			"path": "invoicedetail",
+			"style": {
+				"navigationBarTextStyle": "black",
+				"navigationBarTitleText":"开票信息"
+			}
 		},{
 			"path": "applyInvoice",
 			"style": {

+ 21 - 0
pages/customerService.vue

xqd
@@ -37,7 +37,28 @@
 		onLoad() {
 			this.init()
 		},
+		onShow() {
+			this.initvist()
+		},
 		methods:{
+			initvist(){
+				let curPage = getCurrentPages();
+				let route = curPage[curPage.length - 1].route; //获取当前页面的路由
+				let code=uni.getStorageSync("code")
+				let obj={
+					page:route,
+					code:code
+				}
+				if(code){
+					uni.$u.http.post('/api/visit/add',obj,{
+						custom: {
+							auth: true
+						}
+					}).then((res) => {
+					}).catch((err) => {
+					})
+				}
+			},
 			init(){
 				let list=uni.getStorageSync("data")
 				// console.log(list[5])

+ 154 - 115
pages/index/index.vue

xqd xqd xqd xqd xqd xqd
@@ -1,7 +1,7 @@
 <template>
 	<view class="">
 		<view class="swiper">
-			<u-swiper :list="swiper"  keyName="url" height="100%" ></u-swiper>
+			<u-swiper :list="swiper" keyName="url" height="100%"></u-swiper>
 			<view class="banner">
 				<view class="logo">
 					<image :src="msg.logo" mode="widthFix"></image>
@@ -14,40 +14,40 @@
 				</view>
 			</view>
 		</view>
-		
-		
-			<view class="contentTops">
-				<view class="contentTop">
-					<view class="iconl">
-						
-					</view>
-					<view class="contentTop-title">
-						日月峡森林康养
-					</view>
-					<view class="iconr">
-						<image src="../../static/senlinicon@2x.png" mode="widthFix"></image>
-					</view>
+
+
+		<view class="contentTops">
+			<view class="contentTop">
+				<view class="iconl">
+
+				</view>
+				<view class="contentTop-title">
+					日月峡森林康养
+				</view>
+				<view class="iconr">
+					<image src="../../static/senlinicon@2x.png" mode="widthFix"></image>
 				</view>
 			</view>
-			
-			<view class="videobox">
-				<view class="list" v-for="(item,index) in video" :key="index">
-					<view class="video">
-						<!-- 这是视频 -->
-						<video :src="item.url" object-fit="fill"></video>
+		</view>
+
+		<view class="videobox">
+			<view class="list" v-for="(item,index) in video" :key="index">
+				<view class="video">
+					<!-- 这是视频 -->
+					<video :src="item.url" object-fit="fill"></video>
+				</view>
+				<view class="contentfooter">
+					<view class="contentfooter-title">
+						{{item.title?item.title:""}}
 					</view>
-					<view class="contentfooter">
-						<view class="contentfooter-title">
-							{{item.title?item.title:""}}
-						</view>
-						<view class="contentfooter-subtitle">
-							{{item.description?item.description:''}}
-						</view>
+					<view class="contentfooter-subtitle">
+						{{item.description?item.description:''}}
 					</view>
 				</view>
 			</view>
-			
-			<!-- <view class="list">
+		</view>
+
+		<!-- <view class="list">
 				<view class="video">
 					<video src="https://zhengda.oss-cn-chengdu.aliyuncs.com/riyuexia/Worker%20on%20Tulum%20Beach.mp4" object-fit="fill"></video>
 				</view>		
@@ -60,7 +60,7 @@
 					</view>
 				</view>
 			</view> -->
-			<view class="" style="padding-top: 80rpx;width: 100%;"></view>
+		<view class="" style="padding-top: 80rpx;width: 100%;"></view>
 	</view>
 </template>
 
@@ -69,108 +69,138 @@
 		data() {
 			return {
 				swiper: [
-					
+
 				],
-				msg:null,
-				video:null
+				msg: null,
+				video: null,
+				route: ''
 			}
 		},
 		onLoad() {
+
+
+
+		},
+		onShow() {
+			let curPage = getCurrentPages();
+			this.route = curPage[curPage.length - 1].route; //获取当前页面的路由
 			this.init()
-			
 		},
-		
-		  onShareTimeline() {
-		    return {
-		     title: '日月峽',
-		     path: '/pages/index/index'
-		    }
-		  },
-		 onShareAppMessage(res) {
-		    
-		    return {
-		      title: '日月峽',
-		      path: '/pages/index/index'
-		    }
-		  },
+		onShareTimeline() {
+			return {
+				title: '日月峽',
+				path: '/pages/index/index'
+			}
+		},
+		onShareAppMessage(res) {
+
+			return {
+				title: '日月峽',
+				path: '/pages/index/index'
+			}
+		},
 		methods: {
-			init(){
+			init() {
 				// uni.showLoading()
-				uni.$u.http.post('/api/config/home',{
+				uni.$u.http.post('/api/config/home', {
 					custom: {
 						auth: true
 					}
 				}).then((res) => {
-					uni.setStorageSync("home",res)
-					let home=uni.getStorageSync("home")
-					this.msg=res.page
-					this.video=res.videos
+					uni.setStorageSync("home", res)
+					let home = uni.getStorageSync("home")
+					this.msg = res.page
+					this.video = res.videos
 					this.swiper.push(res.page.bg_picture)
 					// uni.hideLoading()
 				}).catch((err) => {
-					console.log( err)
+					console.log(err)
 				})
-				
-				let phone=uni.getStorageSync("phone")
-				let code=uni.getStorageSync("code")
-				uni.$u.http.post('/api/config/list',{phone,code},{
+
+				let phone = uni.getStorageSync("phone")
+				let code = uni.getStorageSync("code")
+				uni.$u.http.post('/api/config/list', {
+					phone,
+					code
+				}, {
 					custom: {
 						auth: true
 					}
 				}).then((res) => {
 					// console.log(res)
 					// this.swiper=res[9].value
-					uni.setStorageSync("data",res)
+					uni.setStorageSync("data", res)
 				}).catch((err) => {
-					
-					console.log( err)
+
+					console.log(err)
 				})
+				let obj = {
+					page: this.route,
+					code: code
+				}
+				if (code) {
+					uni.$u.http.post('/api/visit/add', obj, {
+						custom: {
+							auth: true
+						}
+					}).then((res) => {}).catch((err) => {})
+				}
+
 			}
 		}
 	}
 </script>
 
 <style lang="less">
-	page{
+	page {
 		font-family: PingFang-SC-Heavy, PingFang-SC;
 		background: #ffffff;
 	}
-	.swiper{
+
+	.swiper {
 		height: 100vh;
 		// width: 100%;
 		position: relative;
 	}
-	.banner{
+
+	.banner {
 		width: 100%;
 		position: absolute;
-		left: 0;top: 0;
+		left: 0;
+		top: 0;
 		// background-color: rgba(0,0,0,.5);
 		height: 100vh;
 		text-align: center;
-		.logo{
+
+		.logo {
 			// text-align: center;
-			padding-top:160rpx;
-			image{
+			padding-top: 160rpx;
+
+			image {
 				width: 114rpx;
 				height: 106rpx;
 			}
 		}
-		.bannertitle{
+
+		.bannertitle {
 			font-size: 64rpx;
 			// text-align: center;
 			margin: 138rpx 0 37rpx;
 			margin-bottom: 30rpx;
 			color: #FFFFFF;
 		}
-		.subtitle{
+
+		.subtitle {
 			font-size: 44rpx;
 			color: #FFFFFF;
 		}
 	}
-	.contentTops{
+
+	.contentTops {
 		position: relative;
 	}
-	.contentTop{
+
+	.contentTop {
 		position: absolute;
 		top: -48rpx;
 		right: 0;
@@ -183,7 +213,8 @@
 		padding: 56rpx 30rpx 38rpx;
 		border-radius: 0px 56rpx 0px 0px;
 		box-shadow: 0px 8rpx 14rpx 0px rgba(0, 21, 3, 0.05);
-		.iconl{
+
+		.iconl {
 			border-radius: 50%;
 			width: 48rpx;
 			height: 48rpx;
@@ -193,61 +224,69 @@
 			margin-right: -10rpx;
 
 		}
-		.contentTop-title{
+
+		.contentTop-title {
 			font-size: 32rpx;
-			
+
 			font-weight: 800;
 			color: #333333;
 			margin: 0 20rpx 0 -26rpx;
 		}
-		.iconr{
-			image{
+
+		.iconr {
+			image {
 				width: 32rpx;
 			}
 		}
-	 }
-	 .videobox{
-		 // &:first-child{
-		 	margin-top: 92rpx;
-		 // }
-	 }
-	.list{
+	}
+
+	.videobox {
+		// &:first-child{
+		margin-top: 92rpx;
+		// }
+	}
+
+	.list {
 		background-color: #FCFCFC;
 		// margin-top: 92rpx;
 		width: 100%;
 		margin-bottom: 40rpx;
 		// background-color: #fff;
-		border-radius:0px 0px 16rpx 100rpx;;
+		border-radius: 0px 0px 16rpx 100rpx;
+		;
 		box-shadow: 0px 8rpx 14rpx 0px rgba(0, 21, 3, 0.08);
-		.video{
-				margin: 0 30rpx;
-				height: 390rpx;
-				// background-color: skyblue;
-				video{
-					width: 100%;
-					height: 100%;
-				}
+
+		.video {
+			margin: 0 30rpx;
+			height: 390rpx;
+
+			// background-color: skyblue;
+			video {
+				width: 100%;
+				height: 100%;
 			}
-			.contentfooter{
-				.contentfooter-title{
-					font-size: 30rpx;
-					font-family: PingFang-SC-Bold, PingFang-SC;
-					font-weight: bold;
-					color: #333333;
-					text-shadow: 0px 8rpx 14rpx rgba(0, 21, 3, 0.05);
-					margin: 40rpx 0rpx 20rpx 56rpx;
-				}
-				.contentfooter-subtitle{
-					font-size: 26rpx;
-					font-weight: 500;
-					color: #333333;
-					overflow: hidden;
-					white-space: nowrap;
-					text-overflow: ellipsis;
-					padding: 0rpx 71rpx 40rpx 56rpx;
-				}
-		    }
-			
 		}
-		
+
+		.contentfooter {
+			.contentfooter-title {
+				font-size: 30rpx;
+				font-family: PingFang-SC-Bold, PingFang-SC;
+				font-weight: bold;
+				color: #333333;
+				text-shadow: 0px 8rpx 14rpx rgba(0, 21, 3, 0.05);
+				margin: 40rpx 0rpx 20rpx 56rpx;
+			}
+
+			.contentfooter-subtitle {
+				font-size: 26rpx;
+				font-weight: 500;
+				color: #333333;
+				overflow: hidden;
+				white-space: nowrap;
+				text-overflow: ellipsis;
+				padding: 0rpx 71rpx 40rpx 56rpx;
+			}
+		}
+
+	}
 </style>

+ 21 - 11
pages/invoice/applyInvoice.vue

xqd xqd xqd xqd
@@ -1,12 +1,13 @@
 <template>
 	<view class="">
 		<u-navbar
-		            title="个人中心"
+		            title="开票信息"
 		            :safeAreaInsetTop="true"
 					leftIconSize="45"
-					:titleStyle="{'font-size':'28rpx'}"
+					:titleStyle="{'font-size':'30rpx'}"
 					leftIcon="arrow-left"
 					@leftClick="backBtn()"
+					
 		        >
 		            
 		        </u-navbar>
@@ -42,12 +43,12 @@
 				</u-form-item>
 				<view class="" v-if="state==0">
 					<u-form-item  label="发票抬头" prop="userInfo.name" borderBottom  ref="item1" labelWidth="160rpx" :required="true">
-						<u-input v-model="model1.userInfo.name"  disabledColor="#ffffff" :placeholder="state==0?'请输入公司名':'请输入个人姓名'" border="none" placeholderStyle="color: #555555">
+						<u-input v-model="model1.userInfo.name"  disabledColor="#ffffff" :placeholder="state==0?'请输入公司名':'请输入个人姓名'" border="none" placeholderStyle="color: #555555">
 							<template slot="suffix"><text @click="goinvoiceList">抬头薄</text> </template>
 						</u-input>
 					</u-form-item>
 					<u-form-item  label="纳税税号" prop="userInfo.tax_no" borderBottom  ref="item1" labelWidth="160rpx" :required="true">
-						<u--input v-model="model1.userInfo.tax_no"  disabledColor="#ffffff" placeholder="请输入税号" border="none" placeholderStyle="color: #555555" ></u--input>
+						<u--input v-model="model1.userInfo.tax_no"  disabledColor="#ffffff" placeholder="请输入纳税税号" border="none" placeholderStyle="color: #555555" ></u--input>
 					</u-form-item>
 					<u-form-item  label="注册地址" prop="userInfo.address" borderBottom  ref="item1" labelWidth="160rpx">
 						<u--input v-model="model1.userInfo.address"  disabledColor="#ffffff" placeholder="请输入注册地址" border="none" placeholderStyle="color: #555555"></u--input>
@@ -168,11 +169,12 @@
 				})
 			},
 			backBtn(){
-				uni.redirectTo({
-					url:"/pages/invoice/invoiceList"
+				uni.navigateBack({
+					delta:1
 				})
 			},
 			submitApply(){
+			
 				uni.showLoading({})
 				if(this.state==0){
 					var form = this.model1.userInfo
@@ -186,11 +188,19 @@
 						orders:this.ids
 					}
 				}
-		
-				// if(!this.$util.email(form.email)){
-				// 	this.$toast("请输入正确的邮箱号码")
-				// 	return
-				// }
+				this.$delete(form,'id');
+				if(!form.email&&!form.prsonalemail){
+					this.$toast("请输入邮箱号码")
+					return
+				}
+				if(!form.presonalname&&!form.name){
+					this.$toast("请输入名称")
+					return
+				}
+				if(!form.tax_no){
+					this.$toast("请输入纳税税号")
+					return
+				}
 				uni.$u.http.post('/api/bill/add', form, {
 					custom: {
 						auth: true

+ 2 - 2
pages/invoice/invoiceAdmin.vue

xqd
@@ -23,11 +23,11 @@
 
 					</view>
 					<view class="icon">
-						<text @click="goendit(item)">
+						<text @click.stop="goendit(item)">
 							编辑
 						</text>
 						<text class="line"></text>
-						<text class="dele" @click="dele(item.id)">
+						<text class="dele" @click.stop="dele(item.id)">
 							删除
 						</text>
 					</view>

+ 4 - 2
pages/invoice/invoiceEndit.vue

xqd xqd xqd
@@ -14,9 +14,9 @@
 					抬头类型
 				</view>
 				<view class="btn">
-					<view :class="model1.userInfo.type==2?'btn-item-active':'btn-item'" @click="">
+					<view :class="model1.userInfo.type==2?'btn-item-active':'btn-item'" @click="model1.userInfo.type=2">
 						企业</view>
-					<view :class="model1.userInfo.type==1?'btn-item-active':'btn-item'" @click="">
+					<view :class="model1.userInfo.type==1?'btn-item-active':'btn-item'" @click="model1.userInfo.type=1">
 						个人</view>
 				</view>
 
@@ -135,6 +135,7 @@
 				if (info.type == "个人") {
 					info.type = 1
 					this.personalname=info.name
+					info.name=''
 				} else if (info.type == "企业") {
 					info.type = 2
 				}
@@ -181,6 +182,7 @@
 				uni.showLoading()
 				let form = this.model1.userInfo
 				if(form.type==1){
+					form=''
 					form.name=this.personalname
 				}
 				uni.$u.http.post('/api/invoice/add', form, {

+ 8 - 2
pages/invoice/invoiceHistory.vue

xqd xqd xqd
@@ -1,6 +1,6 @@
 <template>
 	<view class="curpage">
-	<view class="list" v-for="(item,index) in bill">
+	<view class="list" v-for="(item,index) in bill" @click="moveDetail(item)">
 		<view class="flex">
 			<view class="">
 				{{item.name}}
@@ -32,7 +32,7 @@
 				{{item.created_at.slice(0,10)}}
 			</view>
 		</view>
-		<view class="btn" @click="sendEmail(item.id)" v-if="item.status!==1">
+		<view class="btn" @click.stop="sendEmail(item.id)" v-if="item.status!==1">
 			发送至邮箱
 		</view>
 	</view>
@@ -53,6 +53,12 @@
 			this.loadLsit()
 		},
 		methods:{
+			moveDetail(item){
+				console.log(item)
+				uni.navigateTo({
+					url:"/pages/invoice/invoicedetail?obj="+JSON.stringify(item)
+				})
+			},
 			loadLsit(){
 				this.$showLoadding("加载中")
 				uni.$u.http.post('/api/bill/list',{

+ 7 - 1
pages/invoice/invoiceList.vue

xqd xqd xqd
@@ -1,7 +1,7 @@
 <template>
 	<view class="curpage">
 		<view class="search" style="margin-bottom: 24rpx;">
-			<u-search placeholder="请输入单号" v-model="keyword" borderColor="#A8A8A8" height="64rpx"></u-search>
+			<u-search placeholder="请输入单号" v-model="keyword" borderColor="#A8A8A8" height="64rpx" searchIconSize="44" @search="loadLsit" @custom="loadLsit()"></u-search>
 		</view>
 		<view class="list" v-for="(item,index) in bill " :key="index">
 			<view class="content">
@@ -73,6 +73,8 @@
 			loadLsit() {
 				this.$showLoadding("加载中")
 				uni.$u.http.post('/api/order/bill', {
+					keyword:this.keyword
+				},{
 					custom: {
 						auth: true
 					}
@@ -105,6 +107,10 @@
 			},
 			// 跳转抬头管理
 			choose() {
+				if(this.ids.length<=0){
+					this.$toast("请选择开票订单")
+					return
+				}
 				let order={
 					ids:this.ids,
 					total:this.total

+ 321 - 0
pages/invoice/invoicedetail.nvue

xqd
@@ -0,0 +1,321 @@
+<template>
+	<view class="">
+	<!-- 	<u-navbar
+		            title="开票信息"
+		            :safeAreaInsetTop="true"
+					leftIconSize="45"
+					:titleStyle="{'font-size':'30rpx'}"
+					leftIcon="arrow-left"
+					@leftClick="backBtn()"
+					
+		        >
+		            
+		        </u-navbar> -->
+		<!-- <view class="statues_bar"></view> -->
+		<view class="top">
+			<view class="" style="width: 40%;">
+				开票金额共
+			</view>
+			<view class="">
+				¥{{total}}
+			</view>
+		</view>
+		<view class="form" >
+			<u--form labelPosition="left" :model="model1"  ref="form1">
+			  <view class="">
+			  	抬头类型
+			  </view>
+			   	<view class="btn" style="display: flex;">
+			   		<view :class="state==0?'btn-item-active':'btn-item'" @click="">企业</view>	
+					<view :class="state==1?'btn-item-active':'btn-item'" @click="">个人</view>
+			   	</view>
+			
+			    
+				<u-form-item  label="发票抬头" prop="presonalname" borderBottom  ref="item1" labelWidth="160rpx" v-if="state==1" :required="true">
+					<u-input v-model="presonalname"  disabledColor="#ffffff" placeholder="请输入个人姓名" border="none" placeholderStyle="color: #555555" disabled="true">
+						<!-- <template slot="suffix"><text @click="goinvoiceList">抬头薄</text> </template> -->
+					</u-input>
+				</u-form-item>
+				<u-form-item  label="发送邮箱" prop="prsonalemail" borderBottom  ref="item1" labelWidth="160rpx" v-if="state==1" :required="true">
+					<u-input v-model="prsonalemail"  disabledColor="#ffffff" placeholder="请输入接收邮箱" border="none" placeholderStyle="color: #555555" disabled="true">
+						<template slot="suffix"><text @click="goinvoiceList"></text> </template>
+					</u-input>
+				</u-form-item>
+				<view class="" v-if="state==0">
+					<u-form-item  label="发票抬头" prop="userInfo.name" borderBottom  ref="item1" labelWidth="160rpx" :required="true">
+						<u-input v-model="model1.userInfo.name"  disabledColor="#ffffff" :placeholder="state==0?'请输入公司姓名':'请输入个人姓名'" border="none" placeholderStyle="color: #555555" disabled="true">
+							<!-- <template slot="suffix"><text @click="goinvoiceList">抬头薄</text> </template> -->
+						</u-input>
+					</u-form-item>
+					<u-form-item  label="纳税税号" prop="userInfo.tax_no" borderBottom  ref="item1" labelWidth="160rpx" :required="true">
+						<u--input v-model="model1.userInfo.tax_no"  disabledColor="#ffffff" placeholder="无" border="none" placeholderStyle="color: #555555" disabled="true"></u--input>
+					</u-form-item>
+					<u-form-item  label="注册地址" prop="userInfo.address" borderBottom  ref="item1" labelWidth="160rpx">
+						<u--input v-model="model1.userInfo.address"  disabledColor="#ffffff" placeholder="无" border="none" placeholderStyle="color: #555555" disabled="true"></u--input>
+					</u-form-item>
+					<u-form-item  label="电话" prop="userInfo.phone" borderBottom  ref="item1" labelWidth="160rpx">
+						<u--input v-model="model1.userInfo.phone"  disabledColor="#ffffff" placeholder="无" border="none" placeholderStyle="color: #555555" type="number" disabled="true"></u--input>
+					</u-form-item>
+					<u-form-item  label="开户银行" prop="userInfo.bank_name" borderBottom  ref="item1" labelWidth="160rpx">
+						<u--input v-model="model1.userInfo.bank_name"  disabledColor="#ffffff" placeholder="无" border="none" placeholderStyle="color: #555555" disabled="true"></u--input>
+					</u-form-item>
+					<u-form-item  label="银行账号" prop="userInfo.bank_no" borderBottom  ref="item1" labelWidth="160rpx">
+						<u--input v-model="model1.userInfo.bank_no"  disabledColor="#ffffff" placeholder="无" border="none" placeholderStyle="color: #555555" type="number" disabled="true"></u--input>
+						
+					</u-form-item>
+					<u-form-item   label="发送邮箱" prop="userInfo.mail" borderBottom  ref="item1" labelWidth="160rpx" :required="true">
+						<u--input v-model="model1.userInfo.mail"  disabledColor="#ffffff" placeholder="无" placeholderStyle="color: #555555" border="none" disabled="true"></u--input>
+					</u-form-item>
+				</view>
+
+				<view class="" style="margin: 30rpx 0;">
+					备注信息(选填)
+				</view>
+				<u--textarea v-model="model1.userInfo.memo" :customStyle="{'background':'#F4F4F4','border-radius': '0px 32rpx 8rpx 32rpx'}" placeholder="无" placeholderStyle="color: #555555"  height=120 border="none"></u--textarea>
+			</u--form>
+		</view>
+		<view class="bottomall">
+			<text>开票套餐:</text>
+			<view  v-for="(item,index) in model1.userInfo.orders" :key="index" class="boxfls">
+				
+				<view class="bomimgbox">
+						<image :src="item.cover_picture" mode="aspectFill"></image>
+					</view>
+				<view class="goodsinfo">
+					<text style="font-size: 32rpx;">{{item.good_name}}</text>
+					<text>X{{item.number}}</text>
+					<text>¥{{item.amount}}</text>
+				</view>
+			</view>
+			
+		</view>
+		<view class="" style="margin-bottom: 144rpx;"></view>
+		
+	</view>
+</template>
+
+<script>
+	export default{
+		data(){
+			return{
+				state:0,
+				showSex:false,
+				presonalname:'',
+				prsonalemail:'',
+				ids:[],
+				total:0,
+				rules:{
+					'userInfo.name': {
+						type: 'string',
+						required: true,
+						message: '请填写公司名称',
+						trigger: ['blur', 'change']
+					},
+					'personalname': {
+						type: 'string',
+						required: true,
+						message: '请填写个人姓名',
+						trigger: ['blur', 'change']
+					},
+					'prsonalemail': {
+						type: 'string',
+						required: true,
+						message: '请填写接收邮箱',
+						trigger: ['blur', 'change']
+					},
+					'userInfo.tax_no': {
+						type: 'string',
+						required: true,
+						message: '请填写税号',
+						trigger: ['blur', 'change']
+					},
+					'userInfo.email': {
+						type: 'string',
+						required: true,
+						message: '请填写接收邮箱',
+						trigger: ['blur', 'change']
+					},
+				},
+				model1: {
+					userInfo: {
+						name: '',
+						tax_no: '',
+						address: '',
+						phone: '',
+						bank_name: '',
+						bank_no: '',
+						type: '',
+						email:'',
+						memo:'',
+						orders:[]
+					},
+				}
+			}	
+		},
+
+		
+		onLoad(o){
+				
+			if(o){
+				let userInfo=JSON.parse(o.obj)
+				this.total=userInfo.amount
+				if(userInfo.type_text=="企业"){
+					this.model1.userInfo=userInfo
+					this.model1.userInfo.mail=userInfo.email
+					this.state=0
+				}else{
+					this.state=1
+					this.presonalname=userInfo.name
+					this.prsonalemail=userInfo.email
+					this.model1.userInfo.memo=userInfo.memo
+				}
+			}
+		},
+		methods:{
+			// 跳转抬头列表
+			goinvoiceList(){
+				let obj={
+					choose:true,
+					state:this.state
+				}
+				uni.navigateTo({
+					url:"/pages/invoice/invoiceAdmin?obj="+JSON.stringify(obj)
+				})
+			},
+			backBtn(){
+				uni.navigateBack({
+					delta:1
+				})
+			},
+			submitApply(){
+				uni.showLoading({})
+				if(this.state==0){
+					var form = this.model1.userInfo
+					 this.model1.userInfo.orders=this.ids
+					form.type=2
+				}else{
+					var form={
+						type:1,
+						name:this.presonalname,
+						email:this.prsonalemail,
+						orders:this.ids
+					}
+				}
+				this.$delete(form,'id');
+				// if(!this.$util.email(form.email)){
+				// 	this.$toast("请输入正确的邮箱号码")
+				// 	return
+				// }
+				uni.$u.http.post('/api/bill/add', form, {
+					custom: {
+						auth: true
+					}
+				}).then((res) => {
+					console.log(res)
+					this.$toast("申请成功")
+					setTimeout(() => {
+						uni.navigateTo({
+							url:"/pages/invoice/invoiceList"
+						})
+					}, 1500)
+				
+				}).catch((err) => {
+					uni.hideLoading()
+					this.$toast(err.message)
+				})
+			}
+	    },
+	}
+</script>
+
+<style lang="less">
+
+	// .u-textarea.data-v-81cd9d32{
+	// 	background-color:#F4F4F4 !important; 
+	// 	border-radius: 0px 32rpx 8rpx 32rpx !important;
+	// }
+	.bottomall{
+		background: #FFFFFF;
+		border-radius: 8rpx 8rpx 8rpx 32rpx;
+		margin: 30rpx;
+		padding: 40rpx;
+		margin-top: 10rpx;
+		font-size: 26rpx;
+		.boxfls{
+			display: flex;
+			flex-direction: row;
+			margin-top: 20rpx;
+		}
+		.bomimgbox{
+			width: 180rpx;
+			height: 120rpx;
+			image{
+				width: 100%;
+				height: 100%;
+			}
+		}
+		.goodsinfo{
+			padding-left: 20rpx;
+			padding-top: 10rpx;
+		}
+	}
+	.top{
+			background: #FFFFFF;
+			border-radius: 8rpx 32rpx 8rpx 8rpx;
+			margin: 30rpx;
+			padding: 40rpx;
+			display: flex;
+			// margin-top: 160rpx;
+		}
+	page{
+		background-color: #F4F4F4;
+		font-size: 30rpx;
+	}
+	.form{
+		background-color: #fff;
+		padding: 30rpx;
+		margin: 30rpx;
+		border-radius: 8rpx 32rpx 8rpx 32rpx;
+		margin-bottom: 20rpx;
+		
+	}
+	.btn{
+		display: flex;
+		flex-direction: row;
+		border-bottom: 1rpx solid #E3E3E3;
+		padding: 30rpx 0;
+		.btn-item{
+			text-align: center;
+			line-height: 60rpx;
+			width: 176rpx;
+			height: 60rpx;
+			background: #F4F4F4;
+			border-radius: 30rpx;
+			margin:0 10rpx;
+		}
+		.btn-item-active{
+			text-align: center;
+			line-height: 58rpx;
+			width: 174rpx;
+			height: 58rpx;
+			background: rgba(30, 159, 106, 0.1);
+			border-radius: 30rpx;
+			border: 1px solid #1E9F6A;
+			color: #1E9F6A;
+			margin:0 10rpx;
+		}
+	}
+	.navbar{
+		padding: 30rpx 0;
+		text-align: center;
+		background:#1E9F6A ;
+		color: #fff;
+		bottom: 0;
+		margin: 0 auto;
+		left: 0;
+		position: fixed;
+		width: 100%;
+		border-radius: 16rpx 16rpx 0px 0px;
+		
+	}
+</style>

+ 1 - 2
pages/login.vue

xqd
@@ -71,8 +71,7 @@
 				  if (res.code) { //微信登录成功 已拿到code  
 							this.wxCode = res.code //保存获取到的code  
 							console.log(res.code, "WXcode");
-							
-
+							uni.setStorageSync("code",this.wxCode)
 						} else {
 							console.log('登录失败!' + res.errMsg)
 						}

+ 27 - 24
pages/order/applyAfterSale.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -36,21 +36,21 @@
 				</u-form-item>
 				<u-form-item label="退款金额" labelWidth=200 prop="info.amount" borderBottom ref="item1" :required="true">
 					<u--input v-model="info.amount" border="none" :placeholder="'最多可退款'+msg.amount"
-						placeholderStyle="color: #555555"></u--input>
+						placeholderStyle="color: #555555" type="digit"></u--input>
 				</u-form-item>
-				<u-form-item label="备注信息" labelWidth=200 prop="info.memo" borderBottom ref="item1">
+				<!-- <u-form-item label="备注信息" labelWidth=200 prop="info.memo" borderBottom ref="item1">
 					<u--input v-model="info.memo" border="none" placeholder="请输入备注" placeholderStyle="color: #555555">
 					</u--input>
-				</u-form-item>
+				</u-form-item> -->
 				<u-form-item label="联系方式" labelWidth=200 prop="info.phone" borderBottom ref="item1" :required="true">
-					<u--input v-model="info.phone" border="none" placeholder="请输入联系方式"
-						placeholderStyle="color: #555555" type="number" ></u--input>
+					<u--input v-model="info.phone" border="none" placeholder="请输入联系方式" placeholderStyle="color: #555555"
+						type="number"></u--input>
 				</u-form-item>
 				<view class="">
 					<view class="" style="margin: 40rpx 0;">
 						备注信息
 					</view>
-					<u--textarea v-model="value" placeholder="请输入退款原因" :customStyle="{'background':'#F4F4F4'}"
+					<u--textarea v-model="info.memo" placeholder="请输入退款原因" :customStyle="{'background':'#F4F4F4'}"
 						placeholderStyle="color: #555555" height=160 border="none"></u--textarea>
 				</view>
 
@@ -72,7 +72,7 @@
 		<view style="margin-bottom: 170rpx;"></view>
 		<!-- 退款原因选择 -->
 		<u-picker :show="show" :columns="columns" confirmColor="#1E9F6A"></u-picker>
-		
+
 		<!-- <view class="" style="margin-bottom: 144rpx;"></view> -->
 		<view class="navbar" @click="applyRefund">
 			申请退款
@@ -97,13 +97,15 @@
 				},
 				show: false,
 				Array: ['个人', '产品', '其他'],
+				photolist: []
 			}
 		},
 		onLoad(o) {
-			that=this
-			let msg = JSON.parse(o.obj)
-			this.msg = msg
-			console.log(msg)
+			that = this
+			if (o.obj) {
+				let msg = JSON.parse(decodeURIComponent(o.obj))
+				this.msg = msg
+			}
 		},
 		methods: {
 			// 选择yuany
@@ -137,7 +139,7 @@
 					fileListLen++
 				}
 			},
-		
+
 			uploadFilePromise(url) {
 				let token = uni.getStorageSync("token")
 				return new Promise((resolve, reject) => {
@@ -152,7 +154,8 @@
 							user: 'test'
 						},
 						success: (res) => {
-						
+							let pic = JSON.parse(res.data)
+							this.photolist.push(pic.data.url)
 							setTimeout(() => {
 								resolve(res.data.data)
 							}, 1000)
@@ -161,28 +164,28 @@
 				})
 			},
 			applyRefund() {
-				if(!this.info.reason){
+				if (!this.info.reason) {
 					this.$toast("请选择退款原因")
 					return
 				}
-				if(!this.info.amount){
+				if (!this.info.amount) {
 					this.$toast("请输入退款金额")
 					return
 				}
-				if(!this.info.phone){
+				if (!this.info.phone) {
 					this.$toast("请输入手机号码")
 					return
 				}
-			
-				var pic=[]
-				this.fileList1.forEach(item=>{
+
+				var pic = []
+				this.fileList1.forEach(item => {
 					pic.push(item.thumb)
 				})
-				this.info.picture=pic
-				this.info.order_id=this.msg.id
-				let form=this.info
+				this.info.picture = this.photolist
+				this.info.order_id = this.msg.id
+				let form = this.info
 				uni.showLoading({})
-				uni.$u.http.post('/api/refund/add',form , {
+				uni.$u.http.post('/api/refund/add', form, {
 					custom: {
 						auth: true
 					}
@@ -244,7 +247,7 @@
 		background-color: #ffffff;
 		border-radius: 8rpx 8rpx 16rpx 56rpx;
 		padding-bottom: 40rpx;
-		
+
 	}
 
 	.navbar {

+ 100 - 89
pages/order/guide.vue

xqd xqd xqd
@@ -1,20 +1,21 @@
 <template>
 	<view class="pages">
-		<view class="" style="font-size: 36rpx;font-weight: 700;">
+		<view class="" style="font-size: 36rpx;font-weight: 700;" v-if="muster.muster">
 			专属森林向导提醒您
 		</view>
-		<view class="content">
+		<view class="content" v-if="muster.muster">
 			<u-parse :content="muster.muster"></u-parse>
 		</view>
-		<view class="" style="font-size: 36rpx;font-weight: 700;">
+		<view class="" style="font-size: 36rpx;font-weight: 700;" v-if="muster.qrcode_url">
 			您的专属森林向导
 		</view>
-		<view class="image">
+		<view class="image" v-if="muster.qrcode_url">
 			<image :src="muster.qrcode_url" mode="aspectFill"></image>
 		</view>
-		<view class="submit" @click="savePoster()">
+		<view class="submit" @click="savePoster()" v-if="muster.qrcode_url">
 			保存二维码到相册
 		</view>
+		<view v-if="!muster.muster" class="more">暂无</view>
 	</view>
 </template>
 
@@ -26,9 +27,12 @@
 			}
 		},
 		onLoad(o) {
+			console.log(o)
 			if (o.muster) {
 				let muster = decodeURIComponent(o.muster)
+				console.log(muster)
 				this.muster = JSON.parse(muster)
+				console.log(this.muster)
 			}
 		},
 		methods: {
@@ -43,94 +47,101 @@
 				});
 			},
 			savePoster() {
-				uni.downloadFile({
-					url: this.muster.qrcode_url,
-					success: (res) => {
-						console.log(res)
-						if (res.statusCode === 200) {
-							uni.saveImageToPhotosAlbum({
-								filePath: res.tempFilePath,
-								success: function() {
-									uni.showToast({
-										title: "保存成功",
-										icon: "none"
-									});
-								},
-								fail: function() {
-									uni.showToast({
-										title: "保存失败",
-										icon: "none"
-									});
-								}
-							});
-						}
-					}
-				})
+				
 
-				// uni.getSetting({ //获取用户的当前设置
-				// 	success: (res) => {
-				// 		if (res.authSetting['scope.writePhotosAlbum']) { //验证用户是否授权可以访问相册
-				// 			this.saveImageToPhotosAlbum();
-				// 		} else {
-				// 			uni.authorize({ //如果没有授权,向用户发起请求
-				// 				scope: 'scope.writePhotosAlbum',
-				// 				success: () => {
-				// 					this.saveImageToPhotosAlbum();
-				// 				},
-				// 				fail: () => {
-				// 					uni.showToast({
-				// 						title: "请打开保存相册权限,再点击保存相册分享",
-				// 						icon: "none",
-				// 						duration: 3000
-				// 					});
-				// 					setTimeout(() => {
-				// 						uni.openSetting({ //调起客户端小程序设置界面,让用户开启访问相册
-				// 							success: (res2) => {
-				// 								this.saveImageToPhotosAlbum()
-				// 								// console.log(res2.authSetting)
-				// 							}
-				// 						});
-				// 					}, 3000);
-				// 				}
-				// 			})
-				// 		}
-				// 	}
-				// })
-			},
-			saveImageToPhotosAlbum() {
-				let base64 = this.muster.qrcode_url.replace(/^data:image\/\w+;base64,/, ""); //去掉data:image/png;base64,
-				let filePath = wx.env.USER_DATA_PATH + '/ph_fit_qrcode.png';
-				uni.showLoading({
-					title: '加载中',
-					mask: true
-				})
-				uni.getFileSystemManager().writeFile({
-					filePath: filePath, //创建一个临时文件名
-					data: base64, //写入的文本或二进制数据
-					encoding: 'base64', //写入当前文件的字符编码
-					success: res => {
-						uni.saveImageToPhotosAlbum({
-							filePath: filePath,
-							success: function(res2) {
-								uni.hideLoading();
-								uni.showToast({
-									title: '保存成功',
-									icon: "none",
-									duration: 5000
+					uni.showLoading({
+						title: '正在保存图片...'
+					});
+					//获取用户的当前设置。获取相册权限
+					uni.getSetting({
+						success: (res) => {
+							//如果没有相册权限
+							if (!res.authSetting["scope.writePhotosAlbum"]) {
+								//向用户发起授权请求
+								uni.authorize({
+									scope: "scope.writePhotosAlbum",
+									success: () => {
+										//授权成功保存图片到系统相册
+										uni.downloadFile({
+											url: this.muster.qrcode_url,
+											success: (res) => {
+												console.log(res)
+												if (res.statusCode === 200) {
+													uni.saveImageToPhotosAlbum({
+														filePath: res.tempFilePath,
+														success: function() {
+															uni.showToast({
+																title: "保存成功",
+																icon: "none"
+															});
+														},
+														fail: function() {
+															uni.showToast({
+																title: "保存失败",
+																icon: "none"
+															});
+														}
+													});
+												}
+											}
+										})
+									},
+									//授权失败
+									fail: () => {
+										uni.hideLoading();
+										uni.showModal({
+											title: "您已拒绝获取相册权限",
+											content: "是否进入权限管理,调整授权?",
+											success: (res) => {
+												if (res.confirm) {
+							//调起客户端小程序设置界面,返回用户设置的操作结果。(重新让用户授权)
+													uni.openSetting({
+														success: (res) => {
+														console.log(res.authSetting);
+														},
+													});
+												} else if (res.cancel) {
+													return uni.showToast({
+														title: "已取消!",
+													});
+												}
+											},
+										});
+									},
+								});
+							} else {
+								//如果已有相册权限,直接保存图片到系统相册
+								uni.downloadFile({
+									url: this.muster.qrcode_url,
+									success: (res) => {
+										console.log(res)
+										if (res.statusCode === 200) {
+											uni.saveImageToPhotosAlbum({
+												filePath: res.tempFilePath,
+												success: function() {
+													uni.showToast({
+														title: "保存成功",
+														icon: "none"
+													});
+												},
+												fail: function() {
+													uni.showToast({
+														title: "保存失败",
+														icon: "none"
+													});
+												}
+											});
+										}
+									}
 								})
-							},
-							fail: function(err) {
-								uni.hideLoading();
-								// console.log(err.errMsg);
 							}
-						})
-					},
-					fail: err => {
-						uni.hideLoading();
-						//console.log(err)
-					}
-				})
+						},
+						fail: (res) => {},
+					});
+				
+				
 			},
+			
 		}
 	}
 </script>

+ 315 - 168
pages/order/order.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -1,9 +1,10 @@
 <template>
 	<view class="">
 		<u-sticky bgColor="#fff">
-		<view class="tab">
-		  <u-tabs :list="list1" :activeStyle="{color: '#1E9F6A'}" lineColor="#1E9F6A" lineWidth="50" :scrollable="false" @click="clickTab" ></u-tabs>
-		</view>
+			<view class="tab">
+				<u-tabs :list="list1" :activeStyle="{color: '#1E9F6A'}" lineColor="#1E9F6A" lineWidth="50"
+					:scrollable="false" @click="clickTab" :current="current"></u-tabs>
+			</view>
 		</u-sticky>
 		<!-- <view class="list" @click="goOrderDetail">
 			<view class="list-top">
@@ -42,15 +43,16 @@
 				</view>
 			</view>
 		</view> -->
-		
-		<view class="list"  v-for="(item,index) in orderList" :key="index" @click="goOrderDetail(item.id)">
+
+		<view class="list" v-for="(item,index) in orderList" :key="index" @click="goOrderDetail(item.id)"
+			v-if="state!=5">
 			<view class="list-top">
 				<view class="flexall">
-					
-				订单号  {{item.code}}
-				<view style="padding-left: 5rpx;" @click.stop="copyCode(item.code)">
-					<u-icon name="file-text"></u-icon>
-				</view>
+
+					订单号 {{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}}
@@ -70,19 +72,20 @@
 				</view>
 				<view class="r">
 					<view class="">
-						<image :src="item.cover_picture" ></image>
+						<image :src="item.cover_picture"></image>
 					</view>
 					<view class="">
 						订单金额
 					</view>
 					<view class="" style="font-size: 36rpx;font-weight: 600;color: #333333;">
-						¥{{item.price}}
+						¥{{item.amount}}
 					</view>
 				</view>
 			</view>
 
 			<view class="list-bottom">
-				<view class="list-bottom-item" v-if="item.status==4||item.status==5||item.status==3" @click.stop="buyAgin(item.good_id)">
+				<view class="list-bottom-item" v-if="item.status==4||item.status==5||item.status==3"
+					@click.stop="buyAgin(item.good_id)">
 					<image src="../../static/orderListicon/notepad@2x.png" mode="aspectFill"></image>
 					<text class="">
 						再次预订
@@ -94,12 +97,19 @@
 						去支付
 					</text>
 				</view>
-				<view class="list-bottom-item" v-if="item.status==2" @click.stop="goAfterSale(item)">
+				<view class="list-bottom-item" v-if="item.status==2&&item.refund_status==0"
+					@click.stop="goAfterSale(item)">
 					<image src="../../static/orderListicon/notepad@2x.png" mode="aspectFill"></image>
 					<text class="">
 						申请退款
 					</text>
 				</view>
+				<view class="list-bottom-item" v-if="item.status==2&&item.refund_status!==0">
+					<image src="../../static/orderListicon/notepad@2x.png" mode="aspectFill"></image>
+					<text class="">
+						已申请退款
+					</text>
+				</view>
 				<view class="line" v-if="item.status==1||item.status==2">
 				</view>
 				<view class="list-bottom-item" @click.stop="goguide(item)" v-if="item.status==1||item.status==2">
@@ -110,11 +120,60 @@
 				</view>
 			</view>
 		</view>
+
+		<view class="list" v-for="(item,index) in orderList" :key="index" @click.stop="orderSaleDetail(item.id)"
+			v-if="state==5">
+			<view class="list-top">
+				<view class="flexall">
+
+					订单号 {{item.order.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}}
+				</view>
+			</view>
+			<view class="listcenter">
+				<view class="l">
+					<view class="" style="font-size: 36rpx;font-weight: 600;color: #333333;">
+						{{item.order.good_name}}
+					</view>
+					<view class="" style="margin: 28rpx 0 20rpx;">
+						日期:{{item.order.start_at.slice(0,10)}} ~ {{item.order.end_at.slice(0,10)}}
+					</view>
+					<view class="">
+						数量 : {{item.order.number}}
+					</view>
+				</view>
+				<view class="r">
+					<view class="">
+						<image :src="item.order.cover_picture"></image>
+					</view>
+					<view class="">
+						订单金额
+					</view>
+					<view class="" style="font-size: 36rpx;font-weight: 600;color: #333333;">
+						¥{{item.order.amount}}
+					</view>
+				</view>
+			</view>
+
+			<view class="list-bottom">
+				<view class="list-bottom-item" @click.stop="orderSaleDetail(item.id)">
+					<image src="../../static/orderListicon/notepad@2x.png" mode="aspectFill"></image>
+					<text class="">
+						售后详情
+					</text>
+				</view>
+			</view>
+		</view>
 		<view style="margin-top:140rpx;" v-if="orderList.length==0">
 			<u-loadmore v-if="orderList.length==0" :status="nomore" fontSize="30" :line="true" nomoreText="暂无订单" />
 		</view>
-		
-	<!-- 	<view class="list" v-if="state==2 || state==0?true:false" @click="goOrderDetail1">
+
+		<!-- 	<view class="list" v-if="state==2 || state==0?true:false" @click="goOrderDetail1">
 			<view class="list-top">
 				<view class="">
 				订单号  RYX202213582
@@ -297,230 +356,303 @@
 
 <script>
 	export default {
-		data(){
-			return{
-				  list1: [
-					  
-					  {name: '全部'},
-					  {name: '待付款'}, 
-					  {name: '待出行'}, 
-					  {name: '已完成'},
-					  {name: '售后'},
-				  ],
-				  // 订单状态(0全部 1待付款 2待出行 3已完成 4售后)
-				  state:0,
-				  // 订单列表
-				  orderList:[],
-				  page:1,
-				  nomore:false
+		data() {
+			return {
+				list1: [
+
+					{
+						name: '全部'
+					},
+					{
+						name: '待付款'
+					},
+					{
+						name: '待出行'
+					},
+					{
+						name: '已完成'
+					},
+					{
+						name: '售后'
+					},
+				],
+				// 订单状态(0全部 1待付款 2待出行 3已完成 4售后)
+				state: 0,
+				// 订单列表
+				orderList: [],
+				page: 1,
+				nomore: false,
+				current: 0
 			}
 		},
-		onLoad() {
+		onLoad(o) {
+			if (o.state) {
+				this.state = o.state
+				if (this.state == 1) {
+					this.current = 0
+				} else if (this.state == 2) {
+					this.current = 1
+				} else if (this.state == 3) {
+					this.current = 2
+				} else if (this.state == 4) {
+					this.current = 3
+				}
+			}
 			this.init()
 		},
 		// 下拉到底部后加载新数据
-		    onReachBottom() {
-		      //判断下一页是否存在数据,不存在将显示暂无数据等提示语
-		      if (this.orderList.length >= this.page * 5) {
-		        this.page++;//页数加一
-				
-				this.init();//回调接口
-		      }else{
-				  this.nomore=true
-			  }
-		      
-		    },
+		onReachBottom() {
+			//判断下一页是否存在数据,不存在将显示暂无数据等提示语
+			if (this.orderList.length >= this.page * 10) {
+				this.page++; //页数加一
+
+				this.init(); //回调接口
+			} else {
+				this.nomore = true
+			}
+
+		},
 		onShow() {
-			let token=uni.getStorageSync("token")
+			let token = uni.getStorageSync("token")
 			if (!token) {
 				//未登录
 				uni.showToast({
 					title: "请先登录",
 					icon: 'none'
 				})
-				setTimeout(()=>{
-					uni.navigateBack({
-						delta:1
+				setTimeout(() => {
+					uni.navigateTo({
+						url: "/pages/login"
 					})
-				},1500)
-				
+				}, 1500)
+
 				return false
 			}
+			this.initvist()
 		},
-		
-		methods:{
-			init(){
+
+		methods: {
+			initvist() {
+				let curPage = getCurrentPages();
+				let route = curPage[curPage.length - 1].route; //获取当前页面的路由
+				let code = uni.getStorageSync("code")
+				let obj = {
+					page: route,
+					code: code
+				}
+				if (code) {
+					uni.$u.http.post('/api/visit/add', obj, {
+						custom: {
+							auth: true
+						}
+					}).then((res) => {}).catch((err) => {})
+				}
+			},
+			init() {
 				this.$showLoadding("加载中")
-				
-				let obj={
-					status:this.state,
-					page:this.page,
-					per_page:5
+
+				let obj = {
+					status: this.state,
+					page: this.page,
+					per_page: 10
 				}
-				uni.$u.http.post('/api/order/list',obj,{
+				uni.$u.http.post('/api/order/list', obj, {
 					custom: {
 						auth: true
 					}
 				}).then((res) => {
 					uni.hideLoading()
-					console.log(res)
-					if(res.data){
-						res.data.forEach(item=>{
+					if (res.data) {
+						res.data.forEach(item => {
+							this.orderList.push(item)
+						})
+					} else {
+						this.nomore = true
+					}
+				}).catch((err) => {
+					this.$toast(err.message)
+				})
+			},
+			initAferSale() {
+				this.$showLoadding("加载中")
+				let obj = {
+					status: 0,
+					page: this.page,
+					per_page: 10
+				}
+				uni.$u.http.post('/api/refund/list', obj, {
+					custom: {
+						auth: true
+					}
+				}).then((res) => {
+					uni.hideLoading()
+
+					if (res.data) {
+						res.data.forEach(item => {
 							this.orderList.push(item)
 						})
-					}else{
-						this.nomore=true
+					} else {
+						this.nomore = true
 					}
 				}).catch((err) => {
-					console.log( err)
+					this.$toast(err.message)
 				})
 			},
-			copyCode(code){
+			copyCode(code) {
 				uni.setClipboardData({
 					data: code,
-					success: function () {
+					success: function() {
 						// this.$toast("复制成功")
 					}
 				});
 			},
+			orderSaleDetail(id) {
+				uni.navigateTo({
+					url: "/pages/order/orderAfterSale?id=" + id
+				})
+			},
 			clickTab(item) {
-			    console.log('item', item);
-				if(item.index==0){
-					this.state=0
-					this.orderList=[]
-					this.page=1
-					this.nomore=false
-					this.init()
-				}else if(item.index==1){
-					this.state=1
-					this.orderList=[]
-					this.page=1
-					this.nomore=false
+				console.log('item', item);
+				if (item.index == 0) {
+					this.state = 0
+					this.orderList = []
+					this.page = 1
+					this.nomore = false
 					this.init()
-				}else if(item.index==2){
-					
-					this.state=2
-					this.orderList=[]
-					this.page=1
-					this.nomore=false
+				} else if (item.index == 1) {
+					this.state = 1
+					this.orderList = []
+					this.page = 1
+					this.nomore = false
 					this.init()
-				}else if(item.index==3){
-					
-					this.state=3
-					this.orderList=[]
-					this.page=1
-					this.nomore=false
+				} else if (item.index == 2) {
+
+					this.state = 2
+					this.orderList = []
+					this.page = 1
+					this.nomore = false
 					this.init()
-				}else if(item.index==4){
-					
-					this.state=5
-					this.orderList=[]
-					this.page=1
-					this.nomore=false
+				} else if (item.index == 3) {
+
+					this.state = 3
+					this.orderList = []
+					this.page = 1
+					this.nomore = false
 					this.init()
+				} else if (item.index == 4) {
+
+					this.state = 5
+					this.orderList = []
+					this.page = 1
+					this.nomore = false
+					this.initAferSale()
 				}
 			},
-			getAfterSale(){
+			getAfterSale() {
 				this.$showLoadding("加载中")
-				uni.$u.http.post('/api/refund/list',{status:0,page:1,per_page:5},{
+				uni.$u.http.post('/api/refund/list', {
+					status: 0,
+					page: 1,
+					per_page: 5
+				}, {
 					custom: {
 						auth: true
 					}
 				}).then((res) => {
 					uni.hideLoading()
 					console.log(res)
-					this.orderList=res.data
+					this.orderList = res.data
 				}).catch((err) => {
-					console.log( err)
+					console.log(err)
 				})
 			},
-			goAfterSale(item){
+			goAfterSale(item) {
 				uni.navigateTo({
-					url:"/pages/order/applyAfterSale?obj="+JSON.stringify(item)
+					url: "/pages/order/applyAfterSale?obj=" + encodeURIComponent(JSON.stringify(item))
 				})
 			},
-			goPay(id){
-				uni.$u.http.post('/api/order/config',{
-					order_id:id,
-				}).then(res=>{
+			goPay(id) {
+				uni.$u.http.post('/api/order/config', {
+					order_id: id,
+				}).then(res => {
 					// console.log(res)
-				  uni.requestPayment({
-				     provider: 'wxpay',    //支付类型-固定值
-				     timeStamp: res.timeStamp, // 时间戳(单位:秒)
-				     nonceStr: res.nonceStr, // 随机字符串
-				     package: res.package, // 固定值
-				     signType: res.signType, //固定值
-				     paySign: res.paySign, //签名
-				     success: function (res) {
-				         // console.log('success:' + JSON.stringify(res));
-				         console.log("支付成功");
-						 uni.navigateTo({
-						 	url:"/pages/order/successpay?id="+id
-						 })
-				     },
-				     fail: function (err) {
-				         console.log('fail:' + JSON.stringify(err));
-				         console.log("支付失败");
-				     }
-				 });
-				 
-				}).catch(err=>{
+					uni.requestPayment({
+						provider: 'wxpay', //支付类型-固定值
+						timeStamp: res.timeStamp, // 时间戳(单位:秒)
+						nonceStr: res.nonceStr, // 随机字符串
+						package: res.package, // 固定值
+						signType: res.signType, //固定值
+						paySign: res.paySign, //签名
+						success: function(res) {
+							// console.log('success:' + JSON.stringify(res));
+							console.log("支付成功");
+							uni.navigateTo({
+								url: "/pages/order/successpay?id=" + id
+							})
+						},
+						fail: function(err) {
+							console.log('fail:' + JSON.stringify(err));
+							console.log("支付失败");
+						}
+					});
+
+				}).catch(err => {
 					console.log(err)
 					uni.showToast({
-						icon:"error",
-						title:err.message,
+						icon: "error",
+						title: err.message,
 					})
 				})
 			},
-			buyAgin(id){
+			buyAgin(id) {
 				uni.navigateTo({
-					url:"/pages/travel/travelDetails?id="+id
+					url: "/pages/travel/travelDetails?id=" + id
 				})
 			},
 			// 跳转订单售后详情------待退框
-			goOrderAfterSale(){
+			goOrderAfterSale() {
 				uni.navigateTo({
-					url:"/pages/order/orderAfterSale?id=0"
+					url: "/pages/order/orderAfterSale?id=0"
 				})
 			},
 			// 跳转订单售后详情------已退框
-			goOrderAfterSale1(){
+			goOrderAfterSale1() {
 				uni.navigateTo({
-					url:"/pages/order/orderAfterSale?id=1"
+					url: "/pages/order/orderAfterSale?id=1"
 				})
 			},
 			// 跳转集合页面
-			goguide(item){
+			goguide(item) {
 				console.log(item)
-				if(item.status==1){
+				if (item.status == 1) {
 					uni.showModal({
-						title:"提示",
-						content:"订单支付后可进入专属森林向导"
+						title: "提示",
+						content: "订单支付后可进入专属森林向导"
 					})
 					return
-				}else{
+				} else {
 					uni.navigateTo({
-					url:"/pages/order/guide?muster="+encodeURIComponent(JSON.stringify(item.plan))
-				})
+						url: "/pages/order/guide?muster=" + encodeURIComponent(JSON.stringify(item.plan))
+					})
 				}
-				
+
 			},
 			// 跳转支付订单详情
-			goOrderDetail(id){
+			goOrderDetail(id) {
 				uni.navigateTo({
-					url:`/pages/order/orderDetails?id=${id}`
+					url: `/pages/order/orderDetails?id=${id}`
 				})
 			},
 			// 跳转待出行订单详情
-			goOrderDetail1(){
+			goOrderDetail1() {
 				uni.navigateTo({
-					url:"/pages/order/orderDetails?id=2"
+					url: "/pages/order/orderDetails?id=2"
 				})
 			},
 			// 跳转退款售后
-			goafter(){
+			goafter() {
 				uni.navigateTo({
-					url:"/pages/order/applyAfterSale"
+					url: "/pages/order/applyAfterSale"
 				})
 			}
 		}
@@ -528,82 +660,97 @@
 </script>
 
 <style lang="less">
-	page{
+	page {
 		background-color: #F4F4F4;
 		font-size: 26rpx;
 	}
-	.tab{
+
+	.tab {
 		background-color: #FFFFFF;
 	}
-	
-	.list{
+
+	.list {
 		box-shadow: 0px 2rpx 4rpx 0px rgba(0, 0, 0, 0.02);
 		border-radius: 16rpx 16rpx 16rpx 56rpx;
 		background-color: #FFFFFF;
 		// padding: 30rpx;
 		margin: 20rpx 30rpx;
-		.flexall{
+
+		.flexall {
 			display: flex;
 			align-items: center;
 		}
-		.list-top{
+
+		.list-top {
 			display: flex;
 			justify-content: space-between;
 			padding-bottom: 20rpx;
 			border-bottom: 1px solid #E3E3E3;
 			padding: 30rpx;
 		}
-		.listcenter{
+
+		.listcenter {
 			display: flex;
 			justify-content: space-between;
 			// margin: 24rpx 0 40rpx;
 			padding: 30rpx;
-			.r{
+
+			.r {
 				text-align: right;
-				.image{
+
+				.image {
 					// width: 140rpx;
 				}
-				image{
+
+				image {
 					width: 140rpx;
 					height: 84rpx;
 					border-radius: 6rpx;
 				}
 			}
-			
+
 		}
-		.list-bottom{
+
+		.list-bottom {
 			// background: #FBFBFB;
 			border-radius: 0px 0px 16rpx 56rpx;
 			background-color: #FBFBFB;
 			display: flex;
-			justify-content:space-between;
+			justify-content: space-between;
 			align-items: center;
 			padding: 30rpx 0;
-			.line{
+
+			.line {
 				width: 1px;
 				height: 24rpx;
 				background-color: #1E9F6A;
 			}
-			.list-bottom-item{
+
+			.list-bottom-item {
 				color: #1E9F6A;
 				text-align: center;
-				image{
+
+				image {
 					width: 24rpx;
 					height: 24rpx;
 					margin-right: 10rpx;
 				}
+
 				flex: 1;
 			}
 		}
-		.list-bottoms{
+
+		.list-bottoms {
 			border-radius: 0px 0px 16rpx 56rpx;
 			background-color: #FBFBFB;
 			padding: 30rpx 0;
 			color: #1E9F6A;
-			image{
+
+			image {
 				height: 24rpx;
 				margin-right: 10rpx;
 			}
+
 			text-align: center;
 		}
 	}

+ 211 - 95
pages/order/orderAfterSale.vue

xqd xqd
@@ -3,208 +3,321 @@
 		<view class="applyAfterSale-top">
 			<view class="l">
 				<view class="" style="font-size: 36rpx;font-weight: 600;color: #333333;">
-					夕阳红康养团7日游
+					{{order.good_name?order.good_name:''}}
 				</view>
 				<view class="" style="font-size: 22rpx;margin: 24rpx 0;">
-					出行日期:2022-04-25
+					出行日期:{{order.start_at?order.start_at:''}}
 				</view>
-				<view class=""  style="font-size: 22rpx;">
-					数量  1
+				<view class="" style="font-size: 22rpx;">
+					数量 {{order.number?order.number:''}}
 				</view>
 			</view>
 			<view class="r">
-				<image src="https://t38.9026.com/uploads/golf/images/2022-05-31/20220531601652.png" mode="widthFix"></image>
+				<image :src="order.cover_picture" mode="aspectFill"></image>
+
 				<view class="" style="margin-top: 20rpx;">
-					
-					<text style="font-size: 22rpx;">订单金额</text><text style="font-size: 32rpx;font-weight: 600;">¥12121</text>
+
+					<text style="font-size: 22rpx;">订单金额</text><text
+						style="font-size: 32rpx;font-weight: 600;">¥{{order.amount?order.amount:''}}</text>
 				</view>
 			</view>
 		</view>
-		
+
 		<!-- 待退款 -->
 		<view :class="state==0?'afterSale-center':'afterSale-center-success'">
 			<view class="" style="font-size: 26rpx;">
-				申请时间:2022-05-25
+				申请时间:{{orderinfo.created_at.slice(0,10)?orderinfo.created_at.slice(0,10):''}}
 			</view>
-				<view class="form-item">
-					<view class="">
-						退款原因
-					</view>
-					<view class="r">
-						个人
-					</view>
+			<view class="form-item">
+				<view class="">
+					退款原因
 				</view>
-				<view class="form-item">
-					<view class="">
-						退款金额
-					</view>
-					<view class="r">
-						¥1690
-					</view>
+				<view class="r">
+					{{orderinfo.reason?orderinfo.reason:''}}
 				</view>
-				<view class="form-item">
-					<view class="">
-						联系方式
-					</view>
-					<view class="r">
-						15286920927
-					</view>
+			</view>
+			<view class="form-item">
+				<view class="">
+					退款金额
+				</view>
+				<view class="r">
+					¥{{orderinfo.amount?orderinfo.amount:''}}
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="">
+					联系方式
+				</view>
+				<view class="r">
+					{{orderinfo.phone?orderinfo.phone:''}}
 				</view>
+			</view>
 			<view class="" style="margin: 32rpx 0;">
 				备注信息
 			</view>
 			<view class="" style="color: #101010;">
-				退款
+				{{orderinfo.memo?orderinfo.memo:"暂无"}}
 			</view>
-			<view class="image" style="margin: 40rpx 0;">
+			<view class="image" style="margin: 30rpx 0;margin-top: 40rpx;">
 				<view class="">
 					图片凭证
 				</view>
-				<image src="https:\/\/t38.9026.com\/uploads\/golf\/images\/2022-05-31\/20220531739250.png" mode=""></image>
+				<view v-if="orderinfo.picture.length==0" style="margin: 30rpx 0;">暂无</view>
+				<view class="imagebox"> 
+					<view v-for="(item,index) in orderinfo.picture" :key="index" >
+						<image :src="item" mode="aspectFill"></image>
+					</view>
+				</view>
+
+
 			</view>
 		</view>
-		
-		
+
+
 		<!-- 成功退款 -->
-		<view class="afterSale-center" v-if="state==1">
+		<view class="afterSale-center" v-if="orderinfo.status==2">
 			<view class="" style="font-size: 26rpx;">
-				申请时间:2022-05-25
+				申请时间:{{orderinfo.created_at.slice(0,10)?orderinfo.created_at.slice(0,10):''}}
 			</view>
-				<view class="form-item">
-					<view class="">
-						处理结果
-					</view>
-					<view class="r">
-						通过
-					</view>
+			<view class="form-item">
+				<view class="">
+					处理结果
 				</view>
-				<view class="form-item">
-					<view class="">
-						结果反馈
-					</view>
-					<view class="r">
-						款项已原路返回
-					</view>
+				<view class="r">
+					{{orderinfo.feedback_status_text?orderinfo.feedback_status_text:''}}
 				</view>
+			</view>
+			<view class="form-item">
+				<view class="">
+					结果反馈
+				</view>
+				<view class="r">
+					{{orderinfo.feedback_content?orderinfo.feedback_content:''}}
+				</view>
+			</view>
 			<view class="image" style="margin: 40rpx 0;">
 				<view class="">
 					反馈截图
 				</view>
-				<image src="https:\/\/t38.9026.com\/uploads\/golf\/images\/2022-05-31\/20220531739250.png" mode=""></image>
+				<view class="imagebox">
+					<view v-for="(item,index) in feedback_picture" :key="index">
+						<image :src="item" mode="aspectFill"></image>
+					</view>
+				</view>
+				<view v-if="feedback_picture.length==0" style="margin: 30rpx 0;">暂无</view>
 			</view>
 		</view>
-		<view class="call" v-if="state==1">
+		<view style="padding-bottom: 140rpx;"></view>
+		<view class="call" v-if="orderinfo.status==2" @click="open">
 			联系客服
 		</view>
-		
-		<view class="navbar" v-if="state==0">
+		<view class="navbar" v-if="orderinfo.status==1">
 			待平台处理
 		</view>
-		
-		
+
+		<u-popup :show="show" @close="close" @open="open"  mode="bottom" >
+			<view class="servierbox">
+				<view @click="tabCopymsg(1)" class="tx bor">
+					<text>电话:{{service.phone?service.phone:""}}</text>
+				</view>
+				<view @click="tabCopymsg(2)" class="tx">
+					<text>微信:{{service.weixin?service.weixin:""}}</text>
+				</view>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
 <script>
-	export default{
-		data(){
-			return{
+	export default {
+		data() {
+			return {
 				// 退款进度  0待退框   1已退框
-				state:0
+				state: 0,
+				id: 0,
+				orderinfo: '',
+				order: '',
+				feedback_picture: '',
+				service: '',
+				show: false
 			}
 		},
 		onLoad(options) {
-			if(options.id==0){
-				this.state=0
-			}else if(options.id==1){
-				this.state=1
+			let data = uni.getStorageSync("data")
+			this.service = data[5].value.service
+			if (options.id) {
+				this.id = options.id
 			}
+			this.init()
+			// if(options.id==0){
+			// 	this.state=0
+			// }else if(options.id==1){
+			// 	this.state=1
+			// }
+		},
+		methods: {
+			open(){
+				this.show=true
+			},
+			close(){
+				this.show=false
+			},
+			tabCopymsg(i){
+				if(i==1){
+					uni.makePhoneCall({
+						phoneNumber: this.service.phone,
+					});
+					
+				}else if(i==2){
+					uni.setClipboardData({
+						data: this.service.weixin,
+						success: function () {
+							
+						}
+					});
+				}
+			},
+			init() {
+				uni.$u.http.post('/api/refund/show', {
+					id: Number(this.id)
+				}, {
+					custom: {
+						auth: true
+					}
+				}).then((res) => {
+					this.orderinfo = res
+					this.order = res.order
+					this.feedback_picture = res.feedback_picture.split(",")
+					console.log(this.feedback_picture)
+				}).catch((err) => {
+					console.log(err)
+				})
+			},
 		}
 	}
 </script>
 
 <style lang="less">
-	
-	page{
+	button {
+		padding: 0;
+		margin: 0;
+	}
+
+	button::after {
+		padding: 0;
+		margin: 0;
+		border: none;
+	}
+	.servierbox{
+		padding: 20rpx 0;
+		.tx{
+			padding: 40rpx 0;
+			text-align: center;
+		}
+		.bor{
+			border-bottom: 1rpx solid #F4F4F4;
+		}
+	}
+	page {
 		background-color: #F4F4F4;
-		color: #666666 ;
+		color: #666666;
 		font-size: 30rpx;
 	}
-	.applyAfterSale-top{
-		margin: 24rpx  0 0;
-		padding:40rpx 30rpx;
+
+	.applyAfterSale-top {
+		margin: 24rpx 0 0;
+		padding: 40rpx 30rpx;
 		background: #FFFFFF;
 		box-shadow: 0px 2rpx 4px 0px rgba(0, 0, 0, 0.02);
 		border-radius: 16rpx 56rpx 8rpx 8rpx;
 		display: flex;
 		justify-content: space-between;
 		align-items: center;
-		.r{
+
+		.r {
 			text-align: right;
 		}
-		image{
+
+		image {
 			width: 140rpx;
+			height: 91rpx;
 			border-radius: 6rpx;
 		}
-		
+
 	}
-	.afterSale-center{
+
+	.afterSale-center {
 		border-radius: 8rpx 8rpx 16rpx 56rpx;
 		background-color: #FFFFFF;
-		padding:30rpx;
+		padding: 30rpx;
 		margin: 24rpx 0;
-		.form-item{
-			display:flex;
+
+		.form-item {
+			display: flex;
 			justify-content: space-between;
 			align-items: center;
 			// margin: 20rpx 0;
-			border-bottom:1rpx solid #E3E3E3;
+			border-bottom: 1rpx solid #E3E3E3;
 			padding: 40rpx 0;
-			.r{
+
+			.r {
 				width: 50%;
 				text-align: left;
 				color: #101010;
 			}
 		}
-		.image{
-			image{
+
+		.image {
+			.imagebox {
+				display: inline-block;
+				display: flex;
+				flex-direction: row;
+			}
+
+			image {
+				margin-right: 20rpx;
 				width: 217rpx;
 				height: 217rpx;
 				border-radius: 8rpx 24rpx 8rpx 24rpx;
 				margin-top: 20rpx;
 			}
-			
+
 		}
 	}
-	.afterSale-center-success{
+
+	.afterSale-center-success {
 		border-radius: 8rpx;
 		background-color: #FFFFFF;
-		padding:30rpx;
+		padding: 30rpx;
 		margin: 24rpx 0;
-		.form-item{
-			display:flex;
+
+		.form-item {
+			display: flex;
 			justify-content: space-between;
 			align-items: center;
 			// margin: 20rpx 0;
-			border-bottom:1rpx solid #E3E3E3;
+			border-bottom: 1rpx solid #E3E3E3;
 			padding: 40rpx 0;
-			.r{
+
+			.r {
 				width: 50%;
 				text-align: left;
 				color: #101010;
 			}
 		}
-		.image{
-			image{
+
+		.image {
+			image {
 				width: 217rpx;
 				height: 217rpx;
 				border-radius: 8rpx 24rpx 8rpx 24rpx;
 				margin-top: 20rpx;
 			}
-			
+
 		}
 	}
-	.navbar{
+
+	.navbar {
 		// margin-top: 104rpx;
 		width: 100%;
 		height: 104rpx;
@@ -217,13 +330,16 @@
 		text-align: center;
 		// margin: 0 auto;
 	}
-	.call{
+
+	.call {
 		width: 100%;
 		height: 104rpx;
 		line-height: 104rpx;
 		background: #FFFFFF;
 		border-radius: 16rpx 16rpx 0px 0px;
 		text-align: center;
-		margin: 40rpx 0;
+		// margin: 40rpx 0;
+		position: fixed;
+		bottom: 0;
 	}
 </style>

+ 414 - 391
pages/order/orderDetails.vue

xqd xqd
@@ -1,175 +1,194 @@
 <template>
-		<view class="orderDetails">
-			<view class="list" @click="goOrderDetail">
-				<view class="list-top">
-					<view class="" style="font-size: 36rpx;font-weight: bold;color: #1E9F6A;">
-						<!-- 待付款   --> {{orderinfo.status_text?orderinfo.status_text:''}}
+	<view class="orderDetails">
+		<view class="list" @click="goOrderDetail">
+			<view class="list-top">
+				<view class="" style="font-size: 36rpx;font-weight: bold;color: #1E9F6A;">
+					<text> {{orderinfo.status_text?orderinfo.status_text:''}}</text>
+					<text v-show="orderinfo.refund_status!==0&&orderinfo.refund_status">(订单已申请退款)</text>
+					<!-- 待付款   -->
+				</view>
+				<view class="" style="font-size: 22rpx;margin-top: 28rpx;">
+					订单号 {{orderinfo.code?orderinfo.code:''}}
+				</view>
+			</view>
+			<view class="listcenter">
+				<view class="l">
+					<view class="" style="font-size: 36rpx;font-weight: 600;color: #333333;">
+						<!-- 夕阳红康养团7日游 -->{{orderinfo.good_name?orderinfo.good_name:''}}
 					</view>
-					<view class="" style="font-size: 22rpx;margin-top: 28rpx;">
-						订单号 {{orderinfo.code?orderinfo.code:''}}
+					<view class="" style="margin: 20rpx 0 20rpx;font-size: 22rpx;color: #333333;">
+						日期:{{orderinfo.start_at?orderinfo.start_at:''}} ~ {{orderinfo.end_at?orderinfo.end_at:''}}
 					</view>
+					<view class="" style="color: #333333;">
+						<!-- 标间床位 1人 -->
+						<text>{{orderinfo.room.name?orderinfo.room.name:''}}</text>
+						<text style="margin-left:160rpx ;">
+							x {{orderinfo.number?orderinfo.number:''}} (人)
+						</text>
+					</view>
+
 				</view>
-				<view class="listcenter">
-					<view class="l">
-						<view class="" style="font-size: 36rpx;font-weight: 600;color: #333333;">
-							<!-- 夕阳红康养团7日游 -->{{orderinfo.good_name?orderinfo.good_name:''}}
-						</view>
-						<view class="" style="margin: 20rpx 0 20rpx;font-size: 22rpx;color: #333333;">
-							日期:{{orderinfo.start_at?orderinfo.start_at:''}} ~ {{orderinfo.end_at?orderinfo.end_at:''}}
-						</view>
-						<view class="" style="color: #333333;">
-							<!-- 标间床位 1人 -->
-							<text>{{orderinfo.room.name?orderinfo.room.name:''}}</text>
-							<text style="margin-left:160rpx ;">
-								x {{orderinfo.cohabits.length?orderinfo.cohabits.length:''}} (人)
-							</text>
-						</view>
 
+				<view class="r">
+					<view class="">
+						<image :src="orderinfo.cover_picture" mode="widthFix"></image>
 					</view>
-
-					<view class="r">
-						<view class="">
-							<image :src="orderinfo.cover_picture" mode="widthFix"></image>
-						</view>
-						<view class="" style="margin: 28rpx 0 16rpx;">
-							¥{{orderinfo.price?orderinfo.price:''}}
-						</view>
-						<view class="">
-							合计 <text
-								style="font-size: 36rpx;font-weight: 600;color: #333333;">¥{{orderinfo.amount?orderinfo.amount:''}}</text>
-						</view>
+					<view class="" style="margin: 28rpx 0 16rpx;">
+						¥{{orderinfo.price?orderinfo.price:''}}
+					</view>
+					<view class="">
+						合计 <text
+							style="font-size: 36rpx;font-weight: 600;color: #333333;">¥{{orderinfo.amount?orderinfo.amount:''}}</text>
 					</view>
 				</view>
+			</view>
 
-				<view class="list-bottom">
-					<view style="margin-top: 10rpx;" v-for="item,index in orderinfo.travelers" :key="index">
-						<view class="listIcon" style="margin-bottom: 20rpx;">
-							<view class="listIconbox">
-								<image src="../../static/orderListicon/user@2x.png" mode="aspectFit"></image>
-							</view>
-							
-							<text >
-								{{item.name?item.name:''}}
-							</text>
+			<view class="list-bottom">
+				<view style="margin-top: 10rpx;" v-for="item,index in orderinfo.travelers" :key="index">
+					<view class="listIcon" style="margin-bottom: 20rpx;">
+						<view class="listIconbox">
+							<image src="../../static/orderListicon/user@2x.png" mode="aspectFit"></image>
 						</view>
 
-						<view class="listIcon" @click="goaggMes">
-							<view class="listIconbox">
-								<image src="../../static/orderListicon/mobile@2x.png" mode="aspectFit"></image>
-							</view>
-							
-							<text class="">
-								{{item.phone?item.phone:''}}
-							</text>
+						<text>
+							{{item.name?item.name:''}}
+						</text>
+					</view>
+
+					<view class="listIcon" @click="goaggMes">
+						<view class="listIconbox">
+							<image src="../../static/orderListicon/mobile@2x.png" mode="aspectFit"></image>
 						</view>
+
+						<text class="">
+							{{item.phone?item.phone:''}}
+						</text>
 					</view>
 				</view>
 			</view>
+		</view>
 
-			<view class="travel">
-				<view class="travelList">
-					<view class="" style="font-size: 32rpx;font-weight: 600;color: #333333;margin-bottom: 70rpx;">
-						出行人列表
-					</view>
-					<image src="../../static/orderListicon/users02@2x.png" mode="widthFix"></image>
-				</view>
-				<view class="" v-for="item,index in orderinfo.travelers" :key="index">
-					<view class="">{{item.name?item.name:''}}</view>
-					<view class="" style="margin: 30rpx 0;">
-						证件类型:{{item.certificate_type_text?item.certificate_type_text:''}}</view>
-					<view class="">性别:{{item.gender_text?item.gender_text:''}}</view>
-					<view class="" style="margin: 30rpx 0;">证件号码:{{item.certificate_no?item.certificate_no:''}}</view>
+		<view class="travel">
+			<view class="travelList">
+				<view class="" style="font-size: 32rpx;font-weight: 600;color: #333333;margin-bottom: 70rpx;">
+					出行人列表
 				</view>
+				<image src="../../static/orderListicon/users02@2x.png" mode="widthFix"></image>
 			</view>
+			<view class="" v-for="item,index in orderinfo.travelers" :key="index">
+				<view class="">{{item.name?item.name:''}}</view>
+				<view class="" style="margin: 30rpx 0;">
+					证件类型:{{item.certificate_type_text?item.certificate_type_text:''}}</view>
+				<view class="">性别:{{item.gender_text?item.gender_text:''}}</view>
+				<view class="" style="margin: 30rpx 0;">证件号码:{{item.certificate_no?item.certificate_no:''}}</view>
+			</view>
+		</view>
 
-			<view class="room">
-				<view class=" title">
-					<view class="" style="font-size: 32rpx;font-weight: 600;color: #333333;">
-						同住人列表
-					</view>
-					<image src="../../static/orderListicon/users02@2x.png" mode="aspectFit"></image>
+		<view class="room">
+			<view class=" title">
+				<view class="" style="font-size: 32rpx;font-weight: 600;color: #333333;">
+					同住人列表
 				</view>
-				<view class="roomList" v-for="item,index in orderinfo.cohabits" :key="index">
-					<view class="">
-						同住人{{index+1}}
-					</view>
-					<view class="">
-						{{item}}
-					</view>
+				<image src="../../static/orderListicon/users02@2x.png" mode="aspectFit"></image>
+			</view>
+			<view class="roomList" v-for="item,index in orderinfo.cohabits" :key="index">
+				<view class="">
+					同住人{{index+1}}
+				</view>
+				<view class="">
+					{{item}}
 				</view>
 			</view>
+		</view>
 
-			<!-- 待出行 -->
-			<view class="navbar" v-if="state==1">
-				<view class="navbar-item" @click="goafter" >
-					<image src="../../static/orderListicon/login.png" mode="aspectFill"></image>
-					<view class="">
-						申请退款
-					</view>
+		<!-- 待出行 -->
+		<view class="navbar" v-if="state==1">
+			<view class="navbar-item" @click="goafter" v-if="orderinfo.refund_status==0">
+				<image src="../../static/orderListicon/login.png" mode="aspectFill"></image>
+				<view class="">
+					申请退款
 				</view>
-				<view class="line">
+			</view>
+			
+			<view class="line">
 
-				</view>
-				<view class="navbar-item">
-					<image src="../../static/orderListicon/bookmark.png" mode="aspectFill"></image>
-					<view class="" @click="goguide">
-						专属森林向导
-					</view>
+			</view>
+			<view class="navbar-item">
+				<image src="../../static/orderListicon/bookmark.png" mode="aspectFill"></image>
+				<view class="" @click="goguide">
+					专属森林向导
 				</view>
 			</view>
+		</view>
 
-			<!-- 待付款 -->
-			<view class="navbar" >
-				<view class="navbar-item"  @click="cancelOrder" v-if="status==1">
-					<view class="navbariconbox">
-						<image src="../../static/orderListicon/box-cancel.png" mode="aspectFill"></image>
-					</view>
-					<text class="">
-						取消订单
-					</text>
+		<!-- 待付款 -->
+		<view class="navbar">
+			<view class="navbar-item" @click="cancelOrder" v-if="status==1">
+				<view class="navbariconbox">
+					<image src="../../static/orderListicon/box-cancel.png" mode="aspectFill"></image>
 				</view>
-				<view class="line"  v-if="status==1">
+				<text class="">
+					取消订单
+				</text>
+			</view>
+			<view class="line" v-if="status==1">
 
+			</view>
+			<view class="navbar-item" @click="goPay" v-if="status==1">
+				<view class="navbariconbox">
+					<image src="../../static/orderListicon/notepad.png" mode="aspectFill"></image>
 				</view>
-				<view class="navbar-item" @click="goPay" v-if="status==1">
-					<view class="navbariconbox">
-						<image src="../../static/orderListicon/notepad.png" mode="aspectFill"></image>
-					</view>
-					<text class="">
-						去支付
-					</text>
+				<text class="">
+					去支付
+				</text>
+			</view>
+			<view class="navbar-item" @click="buyAgin" v-if="status==4||status==3">
+				<view class="navbariconbox">
+					<image src="../../static/orderListicon/notepad.png" mode="aspectFill"></image>
 				</view>
-				<view class="navbar-item" @click="buyAgin" v-if="status==4||status==3||status==5">
-					<view class="navbariconbox">
-						<image src="../../static/orderListicon/notepad.png" mode="aspectFill"></image>
-					</view>
-					<text class="">
-						再次预订
-					</text>
+				<text class="">
+					再次预订
+				</text>
+			</view>
+			<view class="navbar-item" v-if="status==2&&orderinfo.refund_status==0" @click="goAfterSale">
+				<view class="navbariconbox">
+					<image src="../../static/orderListicon/notepad.png" mode="aspectFill"></image>
 				</view>
-				<view class="navbar-item"  v-if="status==2" @click="goAfterSale">
-					<view class="navbariconbox">
-						<image src="../../static/orderListicon/notepad.png" mode="aspectFill"></image>
-					</view>
-					<text class="">
-						申请退款
-					</text>
+				<text class="">
+					申请退款
+				</text>
+			</view>
+			<view class="navbar-item"  v-if="status==2&&orderinfo.refund_status!==0">
+				<view class="navbariconbox">
+					<image src="../../static/orderListicon/notepad.png" mode="aspectFill"></image>
+				</view>
+				<view class="">
+					已申请退款
 				</view>
-				<view class="line"  v-if="status==1||status==2">
+			</view>
+			<view class="line" v-if="status==1||status==2">
 
+			</view>
+			<view class="navbar-item" @click="moveGuide" v-if="status==1||status==3||status==2">
+				<view class="navbariconbox">
+					<image src="../../static/orderListicon/bookmark.png" mode="aspectFill"></image>
 				</view>
-				<view class="navbar-item" @click="moveGuide"  v-if="status==1||status==3||status==2">
-					<view class="navbariconbox">
-						<image src="../../static/orderListicon/bookmark.png" mode="aspectFill"></image>
-					</view>
-					<text class="">
-						专属森林向导
-					</text>
+				<text class="">
+					专属森林向导
+				</text>
+			</view>
+			<view class="navbar-item" @click="moveAfterDetail" v-if="status==5">
+				<view class="navbariconbox">
+					<image src="../../static/orderListicon/bookmark.png" mode="aspectFill"></image>
 				</view>
+				<text class="">
+					售后详情
+				</text>
 			</view>
+		</view>
 
-			<!-- 已退订 已完成 -->
-			<!-- <view class="navbar"  v-if="state==2">
+		<!-- 已退订 已完成 -->
+		<!-- <view class="navbar"  v-if="state==2">
 				<view class="navbar-item">
 					<image src="../../static/orderListicon/login.png" mode="heightFix"></image>
 					<text class="">
@@ -177,309 +196,313 @@
 					</text>
 				</view>
 			</view> -->
-		</view>
-	</template>
-
-	<script>
-		let that
-		export default {
-			data() {
-				return {
-					// 0待付款 1待出行 2退框
-					state: 0,
-					orderinfo: {},
-					id:0,
-					status:'',
-					good_id:''
-				}
+	</view>
+</template>
+
+<script>
+	let that
+	export default {
+		data() {
+			return {
+				// 0待付款 1待出行 2退框
+				state: 0,
+				orderinfo: {},
+				id: 0,
+				status: '',
+				good_id: ''
+			}
+		},
+		onLoad(options) {
+			// if(options.id==1){
+			// 	this.state=0
+			// }if(options.id==2){
+			// 	this.state=1
+			// }if(options.id==3){
+			// 	this.state=2
+			// }
+			that = this
+			this.id = Number(options.id)
+			this.init(options.id)
+		},
+		methods: {
+			init(id) {
+				this.$showLoadding("加载中")
+				uni.$u.http.post('/api/order/show', {
+					order_id: id
+				}, {
+					custom: {
+						auth: true
+					}
+				}).then((res) => {
+					uni.hideLoading()
+					// console.log(res)
+					this.orderinfo = res
+					this.status = res.status
+					this.good_id = res.good_id
+					// console.log(this.status,7788)
+				}).catch((err) => {
+					console.log(err)
+				})
 			},
-			onLoad(options) {
-				// if(options.id==1){
-				// 	this.state=0
-				// }if(options.id==2){
-				// 	this.state=1
-				// }if(options.id==3){
-				// 	this.state=2
-				// }
-				that=this
-				this.id=Number(options.id)
-				this.init(options.id)
+			goAfterSale() {
+				uni.navigateTo({
+					url: "/pages/order/applyAfterSale?obj=" + encodeURIComponent(JSON.stringify(this.orderinfo))
+				})
 			},
-			methods: {
-				init(id) {
-					this.$showLoadding("加载中")
-					uni.$u.http.post('/api/order/show', {
-						order_id: id
-					}, {
-						custom: {
-							auth: true
-						}
-					}).then((res) => {
-						uni.hideLoading()
-						// console.log(res)
-						this.orderinfo = res
-						this.status=res.status
-						this.good_id=res.good_id
-						// console.log(this.status,7788)
-					}).catch((err) => {
-						console.log(err)
-					})
-				},
-				goAfterSale(){
-					uni.navigateTo({
-						url:"/pages/order/applyAfterSale?obj="+JSON.stringify(this.orderinfo)
-					})
-				},
-				goOrderDetail(){
-					uni.navigateTo({
-						url:"/pages/travel/travelDetails?id="+this.good_id
-					})
-				},
-				buyAgin(){
-					uni.navigateTo({
-						url:"/pages/travel/travelDetails?id="+this.orderinfo.good_id
-					})
-				},
-				goguide() {
-					uni.navigateTo({
-						url: "./guide"
+			goOrderDetail() {
+				uni.navigateTo({
+					url: "/pages/travel/travelDetails?id=" + this.good_id
+				})
+			},
+			moveAfterDetail() {
+				uni.navigateTo({
+					url: "/pages/order/orderAfterSale?id=" + this.orderinfo.id
+				})
+			},
+			buyAgin() {
+				uni.navigateTo({
+					url: "/pages/travel/travelDetails?id=" + this.orderinfo.good_id
+				})
+			},
+			goguide() {
+				uni.navigateTo({
+					url: "./guide"
+				})
+			},
+
+			moveGuide() {
+				if (this.status == 1) {
+					uni.showModal({
+						title: "提示",
+						content: "订单支付后可进入专属森林向导"
 					})
-				},
-				// 退款
-				goafter() {
+					return
+				} else {
 					uni.navigateTo({
-						url: "./applyAfterSale"
+						url: "/pages/order/guide?muster=" + encodeURIComponent(JSON.stringify(this.orderinfo.plan))
 					})
-				},
-				moveGuide(){
-					if (this.status == 1) {
-						uni.showModal({
-							title: "提示",
-							content: "订单支付后可进入专属森林向导"
-						})
-						return
-					} else {
-						uni.navigateTo({
-							url:"/pages/order/guide?muster="+encodeURIComponent(JSON.stringify(this.orderinfo.plan))
-						})
-					}
-				
-				},
-				goPay(){
-					uni.$u.http.post('/api/order/config',{
-						order_id:that.id,
-					}).then(res=>{
-						// console.log(res)
-					  uni.requestPayment({
-					     provider: 'wxpay',    //支付类型-固定值
-					     timeStamp: res.timeStamp, // 时间戳(单位:秒)
-					     nonceStr: res.nonceStr, // 随机字符串
-					     package: res.package, // 固定值
-					     signType: res.signType, //固定值
-					     paySign: res.paySign, //签名
-					     success: function (res) {
-							 uni.navigateTo({
-							 	url:"/pages/order/successpay?id"+that.id
-							 })
-					         // console.log('success:' + JSON.stringify(res));
-					         console.log("支付成功");
-					     },
-					     fail: function (err) {
-					         console.log('fail:' + JSON.stringify(err));
-					         console.log("支付失败");
-					     }
-					 });
-					 
-					}).catch(err=>{
-						console.log(err)
-						uni.showToast({
-							icon:"error",
-							title:err.message,
-						})
-					})
-				},
-				cancelOrder() {
-					uni.showModal({
-						title: "提示",
-						content: "是否取消订单?",
-						success:(res)=> {
-							if (res.confirm) {
-								that.$showLoadding("加载中")
-								uni.$u.http.post('/api/order/cancel', {
-									order_id: that.id
-								}, {
-									custom: {
-										auth: true
-									}
-								}).then((res) => {
-									uni.hideLoading()
-										// uni.hideLoading()
-										that.$toast("取消成功")
-										setTimeout(() => {
-											uni.navigateTo({
-												url:"/pages/order/order"
-											})
-										}, 500)
-								}).catch((err) => {
-									console.log(err)
-								})
-							} else if (res.cancel) {
-								console.log('用户点击取消');
-							}
+				}
+
+			},
+			goPay() {
+				uni.$u.http.post('/api/order/config', {
+					order_id: that.id,
+				}).then(res => {
+					// console.log(res)
+					uni.requestPayment({
+						provider: 'wxpay', //支付类型-固定值
+						timeStamp: res.timeStamp, // 时间戳(单位:秒)
+						nonceStr: res.nonceStr, // 随机字符串
+						package: res.package, // 固定值
+						signType: res.signType, //固定值
+						paySign: res.paySign, //签名
+						success: function(res) {
+							uni.navigateTo({
+								url: "/pages/order/successpay?id" + that.id
+							})
+							// console.log('success:' + JSON.stringify(res));
+							console.log("支付成功");
+						},
+						fail: function(err) {
+					 	console.log('fail:' + JSON.stringify(err));
+							console.log("支付失败");
 						}
+					});
 
+				}).catch(err => {
+					console.log(err)
+					uni.showToast({
+						icon: "error",
+						title: err.message,
 					})
+				})
+			},
+			cancelOrder() {
+				uni.showModal({
+					title: "提示",
+					content: "是否取消订单?",
+					success: (res) => {
+						if (res.confirm) {
+							that.$showLoadding("加载中")
+							uni.$u.http.post('/api/order/cancel', {
+								order_id: that.id
+							}, {
+								custom: {
+									auth: true
+								}
+							}).then((res) => {
+								uni.hideLoading()
+								// uni.hideLoading()
+								that.$toast("取消成功")
+								setTimeout(() => {
+									uni.navigateTo({
+										url: "/pages/order/order"
+									})
+								}, 500)
+							}).catch((err) => {
+								console.log(err)
+							})
+						} else if (res.cancel) {
+							console.log('用户点击取消');
+						}
+					}
+
+				})
 
-				}
 			}
 		}
-	</script>
-
-	<style lang="less">
-		page {
-			background-color: #F4F4F4;
-			font-size: 28rpx;
-			font-family: PingFang-SC-Bold, PingFang-SC;
+	}
+</script>
+
+<style lang="less">
+	page {
+		background-color: #F4F4F4;
+		font-size: 28rpx;
+		font-family: PingFang-SC-Bold, PingFang-SC;
+	}
+
+	.list {
+		box-shadow: 0px 2rpx 4rpx 0px rgba(0, 0, 0, 0.02);
+		border-radius: 16rpx 16rpx 16rpx 56rpx;
+		background-color: #FFFFFF;
+		// padding: 30rpx;
+		margin: 57rpx 30rpx;
+
+		.list-top {
+
+			padding-bottom: 20rpx;
+			border-bottom: 1px solid #efefef;
+			padding: 30rpx;
 		}
 
-		.list {
-			box-shadow: 0px 2rpx 4rpx 0px rgba(0, 0, 0, 0.02);
-			border-radius: 16rpx 16rpx 16rpx 56rpx;
-			background-color: #FFFFFF;
-			// padding: 30rpx;
-			margin: 57rpx 30rpx;
+		.listcenter {
+			display: flex;
+			justify-content: space-between;
+			// margin: 24rpx 0 40rpx;
+			padding: 30rpx;
+
+			.r {
+				text-align: right;
 
-			.list-top {
+				.image {
+					// width: 140rpx;
+				}
 
-				padding-bottom: 20rpx;
-				border-bottom: 1px solid #efefef;
-				padding: 30rpx;
+				image {
+					width: 140rpx;
+					height: 84rpx;
+					border-radius: 6rpx;
+				}
 			}
 
-			.listcenter {
-				display: flex;
-				justify-content: space-between;
-				// margin: 24rpx 0 40rpx;
-				padding: 30rpx;
+		}
 
-				.r {
-					text-align: right;
+		.list-bottom {
+			border-top: 1rpx solid #E3E3E3;
+			border-radius: 0px 0px 16rpx 56rpx;
+			background-color: #FBFBFB;
+			padding: 30rpx 0 30rpx 60rpx;
+			color: #1E9F6A;
+			font-weight: 600;
 
-					.image {
-						// width: 140rpx;
-					}
+			.listIcon {
+				display: flex;
+				align-items: center;
+				font-size: 26rpx;
+
+				.listIconbox {
+					width: 20rpx;
+					height: 24rpx;
+					margin-right: 10rpx;
 
 					image {
-						width: 140rpx;
-						height: 84rpx;
-						border-radius: 6rpx;
+						width: 100%;
+						height: 100%;
 					}
 				}
 
 			}
 
-			.list-bottom {
-				border-top: 1rpx solid #E3E3E3;
-				border-radius: 0px 0px 16rpx 56rpx;
-				background-color: #FBFBFB;
-				padding: 30rpx 0 30rpx 60rpx;
-				color: #1E9F6A;
-				font-weight: 600;
-
-				.listIcon {
-			 	display: flex;
-					align-items: center;
-					font-size: 26rpx;
-					.listIconbox{
-						width: 20rpx;
-						height: 24rpx;
-						margin-right: 10rpx;
-						image {
-							width: 100%;
-							height: 100%;
-						}
-					}
-					
-				}
 
-				
-			}
 		}
+	}
 
-		.travel {
-			margin: 0 60rpx;
+	.travel {
+		margin: 0 60rpx;
 
-			.travelList {
-				display: flex;
-				justify-content: space-between;
+		.travelList {
+			display: flex;
+			justify-content: space-between;
 
-				image {
-					width: 48rpx;
-					height: 48rpx;
-				}
+			image {
+				width: 48rpx;
+				height: 48rpx;
 			}
 		}
+	}
 
-		.room {
-			.title {
-				display: flex;
-				justify-content: space-between;
-				align-items: center;
-				border-bottom: 1px solid #E3E3E3;
-				padding: 30rpx;
-				margin: 50rpx 30rpx 30rpx;
+	.room {
+		.title {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			border-bottom: 1px solid #E3E3E3;
+			padding: 30rpx;
+			margin: 50rpx 30rpx 30rpx;
 
-				image {
-					width: 48rpx;
-					height: 48rpx;
-				}
+			image {
+				width: 48rpx;
+				height: 48rpx;
 			}
+		}
 
-			.roomList {
-				display: flex;
-				justify-content: space-between;
-				align-items: center;
-				margin: 20rpx 60rpx;
+		.roomList {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			margin: 20rpx 60rpx;
 
-			}
+		}
 
-			margin-bottom:200rpx;
+		margin-bottom:200rpx;
+	}
+
+	.navbar {
+		// margin-top: 104rpx;
+		width: 100%;
+		height: 104rpx;
+		background: #1E9F6A;
+		border-radius: 16rpx 16rpx 0px 0px;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		display: flex;
+		align-items: center;
+
+		.line {
+			width: 1px;
+			height: 24rpx;
+			background-color: #FFFFFF;
 		}
 
-		.navbar {
-			// margin-top: 104rpx;
-			width: 100%;
-			height: 104rpx;
-			background: #1E9F6A;
-			border-radius: 16rpx 16rpx 0px 0px;
-			position: fixed;
-			left: 0;
-			bottom: 0;
+		.navbar-item {
 			display: flex;
+			color: #FFFFFF;
+			flex: 1;
 			align-items: center;
+			justify-content: center;
 
-			.line {
-				width: 1px;
-				height: 24rpx;
-				background-color: #FFFFFF;
-			}
+			.navbariconbox {
+				height: 28rpx;
+				width: 28rpx;
+				margin-right: 10rpx;
 
-			.navbar-item {
-				display: flex;
-				color: #FFFFFF;
-				flex: 1;
-				align-items: center;
-				justify-content: center;
-				.navbariconbox{
-					height: 28rpx;
-					width: 28rpx;
-					margin-right: 10rpx;
-					image {
-						width: 100%;
-						height: 100%;
-					}
+				image {
+					width: 100%;
+					height: 100%;
 				}
-				
 			}
+
 		}
-	</style>
+	}
+</style>

+ 98 - 38
pages/order/successpay.vue

xqd xqd
@@ -1,23 +1,19 @@
 <template>
-	<view class="">
-		<u-navbar
-		            title="个人中心"
-		            :safeAreaInsetTop="true"
-					leftIconSize="45"
-					:titleStyle="{'font-size':'28rpx'}"
-					
-					@leftClick="backBtn()"
-		        >
-		            
-		        </u-navbar>
+	<view class="" @touchstart="touchStart" @touchmove="touchMove" @touchend="touchEnd">
+		<u-navbar title="个人中心" :safeAreaInsetTop="true" leftIconSize="45" :titleStyle="{'font-size':'28rpx'}"
+			@leftClick="backBtn()">
+
+		</u-navbar>
 		<view class="successbox flex1">
 			<view class="flex1">
-				<view class="imgbox"><image src="../../static/success.png" mode="aspectFill"></image></view>
+				<view class="imgbox">
+					<image src="../../static/success.png" mode="aspectFill"></image>
+				</view>
 				<text style="padding-top: 20rpx;">订单提交成功</text>
 			</view>
-			
+
 			<view class="chabtn">
-				<text class="backhome" @click="goHome">回到首页</text>
+				<text class="backhome" @click="gobackinHome">回到首页</text>
 				<text class="backhome pd" @click="goDetails">查看订单</text>
 			</view>
 		</view>
@@ -28,74 +24,138 @@
 	export default {
 		data() {
 			return {
-				id:''
+				id: '',
+				startX: 0, //滑动开始x轴位置
+						startY: 0, //滑动开始y轴位置
+						moveX: 0, //滑动的x轴距离
+						moveY: 0, //滑动的y轴距离
+						like_state: 0, //-1:左滑,0:没滑动,1:右滑
 			}
 		},
 		onLoad(o) {
-			if(o.id){
-				this.id=o.id
+			if (o.id) {
+				this.id = o.id
+			}
+
+		},
+		onBackPress(options) {
+			if (options.from == 'navigateBack') {
+				return false
 			}
+			uni.switchTab({
+				url: "/pages/index/index"
+			})
+			return true;
 			
 		},
-		
 		methods: {
-			backBtn(){
-				
-			},
-			goHome(){
+			backBtn() {
 				uni.redirectTo({
-					url:"/pages/index/index"
+					url: "/pages/travel"
+				})
+			},
+			gobackinHome() {
+				uni.switchTab({
+					url: "/pages/index/index"
 				})
 			},
-			goDetails(){
+			goDetails() {
 				uni.redirectTo({
-					url:"/pages/order/orderDetails?id="+this.id
+					url: "/pages/order/orderDetails?id=" + this.id
 				})
-			}
+			},
+			touchStart(event) {
+					this.startX = event.touches[0].pageX;
+					this.startY = event.touches[0].pageY;
+					console.log('开始触摸:', this.startX, this.startY);
+				},
+				touchMove(event) {
+					var currentX = event.touches[0].pageX;
+					var currentY = event.touches[0].pageY;
+					var moveX = currentX - this.startX;
+					var moveY = currentY - this.startY;
+					var text = '';
+					var state = 0; //-1:左滑,0:没滑动,1:右滑
+					// //左右方向滑动
+					if (Math.abs(moveX) > Math.abs(moveY)) {
+						if (moveX < -10) {
+							text = '左滑';
+							state = 1;
+						} else if (moveX > 10) {
+							text = '右滑';
+							state = -1;
+						}
+					} else { //上下方向滑动
+						if (moveY < 0) {
+							text = '上滑';
+						} else if (moveY > 0) text = '下滑';
+					}
+					this.like_state = state;
+					this.moveX = moveX;
+					this.moveY = moveY;
+					console.log('开始滑动:', this.moveX, this.moveY, this.like_state);
+				},
+				touchEnd(event) {
+					console.log(`移动距离:${Math.abs(this.moveX)}`)
+					if (Math.abs(this.moveX) > 60 && this.like_state != -100) {
+						var state = this.like_state
+						this.like_state = -100//设置这个数是为了避免滑动之后点击不走touchMove而产生的不正常滑动
+						uni.switchTab({
+							url: "/pages/index/index"
+						})//这里放需要进行的业务逻辑
+					}
+				},
+		
 		}
 	}
 </script>
 
 <style lang="less">
-	page{
+	page {
 		font-family: PingFang-SC-Heavy, PingFang-SC;
 		background: #ffffff;
 	}
-		
-	.flex1{
+
+	.flex1 {
 		display: flex;
 		align-items: center;
 		flex-direction: column;
 		justify-content: center;
 	}
-	.successbox{
+
+	.successbox {
+		padding:40rpx 0;
 		background-color: #FCFCFC;
 		// margin: 20rpx;
 		// border-radius: 10rpx;
 		margin-top: 240rpx;
-		
-		.imgbox{
+
+		.imgbox {
 			width: 120rpx;
 			height: 120rpx;
-			image{
+
+			image {
 				width: 100%;
 				height: 100%;
 			}
 		}
 	}
-	.chabtn{
+
+	.chabtn {
 		padding-top: 120rpx;
 		display: flex;
-		.backhome{
+
+		.backhome {
 			display: block;
 			font-size: 30rpx;
-			color:rgba(30, 159, 106, 1) ;
+			color: rgba(30, 159, 106, 1);
 			padding: 10rpx 30rpx;
 			border: 1rpx solid rgba(30, 159, 106, 1);
 			border-radius: 30rpx;
 		}
-		.pd{
-			
+
+		.pd {
+
 			margin-left: 100rpx;
 		}
 	}

+ 20 - 17
pages/otherNumlogin.vue

xqd xqd xqd xqd
@@ -5,12 +5,12 @@
 		</view>
 			
 		<view class="input">
-			<input style="width: 90%;" type="text" value="" v-model="phone" placeholder="输入手机号"/>
+			<input style="width: 90%;" type="number" value="" v-model="phone" placeholder="输入手机号"/>
 			<view class="" style="display: flex;align-items: center;">
-				<input type="text" value="" placeholder="输入验证码"/>
+				<input type="number" v-model="codetxt" placeholder="输入验证码"/>
 				<view class="">
 				  	<u-code ref="uCode" @change="codeChange" seconds="60" :changeText="'x'"></u-code>
-				  	<u--text :text="tips"  @tap="getCode" size="28" decoration="underline"></u--text>
+				  	<u--text :text="tips"  @tap="getCode" size="28" decoration="underline">s</u--text>
 				</view>
 			</view>
 		</view>
@@ -36,7 +36,7 @@
 				tips:"获取验证码",
 				value: '',
 				// 输入的验证码
-				code:'1234',
+				codetxt:'',
 				phone:"",
 				verify_key:""
 			}
@@ -62,11 +62,10 @@
 						}, 2000);
 						this.verify_key=res.verify_key
 					}).catch((err) => {
-						console.log(err)
-						// uni.showToast({
-						// 	title: '',
-						// 	icon:"none"
-						// })
+						uni.showToast({
+							title: err.message,
+							icon:"none"
+						})
 					})
 			        // 模拟向后端请求验证码
 			        
@@ -90,24 +89,28 @@
 					success: (res) => {
 						// console.log(res)
 					    if (res.code) { //微信登录成功 已拿到code  
-							uni.$u.http.post("/api/login/code",{verify_key:this.verify_key,verify_code:this.code,code:res.code}).then((res) => {
+							uni.$u.http.post("/api/login/code",{verify_key:this.verify_key,verify_code:this.codetxt,code:res.code}).then((res) => {
 								console.log(res)
 								uni.setStorageSync('token', res.token)
 								uni.setStorageSync('phone',this.phone)
+								uni.setStorageSync('code',this.code)
 								uni.showToast({
 								 	title: '登录成功',
 								 	icon:"success",
 								 	duration: 1000
 								})
-								uni.reLaunch({
-									url:"/pages/index/index"
-								})
+								setTimeout(()=>{
+									uni.reLaunch({
+										url:"/pages/index/index"
+									})
+								},500)
+								
 							}).catch((err) => {
 								console.log(err)
-								// uni.showToast({
-								// 	title: '',
-								// 	icon:"none"
-								// })
+								uni.showToast({
+									title:  err.message,
+									icon:"none"
+								})
 							})
 							console.log(res.code,"WXcode");
 						} else {

+ 3 - 3
pages/peopleList/addPeople.vue

xqd xqd xqd
@@ -74,7 +74,7 @@
 
 				<u-form-item>
 					<view class="" style="margin-bottom: 20rpx;">
-						期望改善康状况
+						期望改善康状况
 					</view>
 					<u--textarea v-model="form.userInfo.hope_improve" :customStyle="{'background':'#F4F4F4'}"
 						placeholder="填写期望改善的健康状况" placeholderStyle="color: #555555" height=160 border="none">
@@ -162,7 +162,7 @@
 						type: 'string',
 						required: true,
 						len: 11,
-						message: '请输入手机号码',
+						message: '请填写正确的手机号码',
 						trigger: ['blur', 'change']
 					},
 					"userInfo.emergency_name": {
@@ -175,7 +175,7 @@
 						type: 'number',
 						required: true,
 						len: 11,
-						message: '请填写紧急联系人电话',
+						message: '请填写正确的紧急联系人电话',
 						trigger: ['blur', 'change']
 					},
 				},

+ 79 - 34
pages/peopleList/peopleList.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -24,7 +24,7 @@
 			</view>
 			<!-- </u-checkbox-group> -->
 		</view>
-		
+
 		<view style="margin-top: 140rpx;">
 			<u-loadmore v-if="checkboxList.length==0" :status="nomore" fontSize="30" :line="true" nomoreText="暂无出行人" />
 		</view>
@@ -41,6 +41,7 @@
 </template>
 
 <script>
+	let that
 	// import peopelInfo from "../components/peopleInfo.vue"
 	export default {
 		data() {
@@ -66,26 +67,29 @@
 		},
 
 		onLoad(options) {
+			that = this
 			// console.log(options)
 			if (options.id == 0) {
 				this.peopelList = false
 			} else {
 				this.peopelList = true
 			}
-			this.init()
-			setTimeout(()=>{
+			// this.init()
+			setTimeout(() => {
 				if (options.obj) {
-					let obj=JSON.parse(options.obj)
+					let obj = JSON.parse(options.obj)
 					this.value = obj.value
-					if(obj.list.length>0){
-						this.checkboxList=obj.list
+					this.$store.commit("getvalue", obj.value)
+					if (obj.list.length > 0) {
+						this.checkboxList = obj.list
 					}
 				}
-			},500)
-			
-		
+			}, 500)
+
+
 		},
 		onShow() {
+			that = this
 			let token = uni.getStorageSync("token")
 			if (!token) {
 				//未登录
@@ -101,27 +105,64 @@
 
 				return false
 			}
-			uni.showLoading({
-				title: '加载中'
-			});
+			this.init()
+			this.initvist()
 		},
-		
+
 		methods: {
+			initvist() {
+				let curPage = getCurrentPages();
+				let route = curPage[curPage.length - 1].route; //获取当前页面的路由
+				let code = uni.getStorageSync("code")
+				let obj = {
+					page: route,
+					code: code
+				}
+				if (code) {
+					uni.$u.http.post('/api/visit/add', obj, {
+						custom: {
+							auth: true
+						}
+					}).then((res) => {}).catch((err) => {})
+				}
+			},
 			init() {
+				this.value = this.$store.state.value
+				uni.showLoading({
+					title: '加载中'
+				});
 				uni.$u.http.post('/api/traveler/list', {
 					custom: {
 						auth: true
 					}
 				}).then((res) => {
 					// console.log(res)
-					this.checkboxList = res
-					// this.$store.commit("getlist",res)
-					let nawarr = this.checkboxList
-					nawarr.forEach(item => {
-						item.checked = false
-						item.default=false
-					})
-					this.checkboxList = nawarr
+
+
+					let checkedlist = this.$store.state.peopleList
+					if (checkedlist.length > 0) {
+						let list = res
+						checkedlist.forEach(item => {
+							list.forEach(i => {
+								if (item.checked && item.id == i.id) {
+									item.checked = true
+								} else {
+									item.checked = false
+								}
+							})
+						})
+						this.checkboxList = list
+					} else {
+						this.checkboxList = res
+						// this.$store.commit("getlist",res)
+						let nawarr = this.checkboxList
+						nawarr.forEach(item => {
+							item.checked = false
+							item.default = false
+						})
+						this.checkboxList = nawarr
+					}
+					console.log(this.checkboxList, 88888888888888)
 					uni.hideLoading();
 
 				}).catch((err) => {
@@ -134,7 +175,7 @@
 			// },
 			// 选择
 			checkbox(index) {
-				
+
 				let data = this.checkboxList
 				if (data[index].checked) {
 					data[index].checked = false;
@@ -151,22 +192,21 @@
 				})
 				this.getpeopleList = arr
 				console.log(this.getpeopleList, this.value)
-				if (this.getpeopleList.length ==this.value) {
+				if (this.getpeopleList.length == this.value) {
 					// this.$toast('只能选择' + this.value + '人')
-					this.checkboxList.forEach(item=>{
-						if(!item.checked){
-							item.default=true
+					this.checkboxList.forEach(item => {
+						if (!item.checked) {
+							item.default = true
 						}
 					})
-					console.log(this.checkboxList,5555)
-				}else{
-					this.checkboxList.forEach(item=>{
-							item.default=false
+					console.log(this.checkboxList, 5555)
+				} else {
+					this.checkboxList.forEach(item => {
+						item.default = false
 					})
 				}
-				
+
 				this.$store.commit('getpeopleList', this.checkboxList)
-				console.log(this.$store.state.openpeopleList,454)
 				this.$store.commit("getopenpeopleList", 1)
 			},
 			// 确定添加联系人
@@ -197,9 +237,14 @@
 									auth: true
 								}
 							}).then((res) => {
+
 								uni.hideLoading()
-								this.$toast("删除成功")
-								this.init()
+								that.init()
+								setTimeout(() => {
+									this.$toast("删除成功")
+								}, 500)
+
+
 							}).catch((err) => {
 								console.log(err)
 							})

+ 58 - 34
pages/travel.vue

xqd xqd xqd xqd xqd xqd
@@ -1,10 +1,12 @@
 <template>
 	<view class="travelPage">
-		<u-swiper height=500 :list="swiper"  :autoplay="false" circular autoplay show-center-play-btn
-			:poster="imgUrl"></u-swiper>
+		<u-swiper height=500 :list="swiper" :autoplay="false" circular autoplay show-center-play-btn :poster="imgUrl">
+		</u-swiper>
 		<u-sticky bgColor="#fff">
 			<view class="tags">
-				<u-tabs :list="list" :activeStyle="{color: '#1E9F6A','font-weight': 'bold'}"  lineColor="#1E9F6A" :inactiveStyle="{color: 'rgba(51, 51, 51, 0.5)'}" :is-scroll="true"  lineWidth="55"  @change="chooseTitle">
+				<u-tabs :list="list" :activeStyle="{color: '#1E9F6A','font-weight': 'bold'}" lineColor="#1E9F6A"
+					:inactiveStyle="{color: 'rgba(51, 51, 51, 0.5)'}" :is-scroll="true" lineWidth="55"
+					@change="chooseTitle">
 				</u-tabs>
 			</view>
 		</u-sticky>
@@ -14,7 +16,7 @@
 				<image :src="item.cover_picture" mode="aspectFill"></image>
 				<!-- <video src="" controls></video> -->
 			</view>
-			<view class="travel" >
+			<view class="travel">
 				<view class="traveltitle">
 					{{item.name}}
 				</view>
@@ -22,7 +24,7 @@
 					¥{{item.min_price}}
 				</view>
 			</view>
-			<view class="describe">
+			<view class="describe" v-if="item.subtitle">
 				{{item.subtitle}}
 				<!-- 夏日的森林,雨水充沛了山林,鲜花盛放,溪水潺潺。漫步于自然之中,感受清新的空气,放空心灵,沉醉于山雾之中,感受不同于城市的静谧与轻松。 -->
 			</view>
@@ -41,73 +43,92 @@
 				// 标签栏
 				list: [
 					// {name:"老年康养团",id:1},{name:"上班族解乏团",id:2},{name:"少儿夏令营",id:3},{name:"自然&教育",id:4},
-					],
+				],
 				// 套餐列表
-				listArr:[
+				listArr: [
 					// {cover_picture:"https://t38.9026.com/uploads/golf/images/2022-05-31/20220531601652.png",name:"深林康养",description:" 夏日的森林,雨水充沛了山林,鲜花盛放,溪水潺潺。漫步于自然之中,感受清新的空气,放空心灵,沉醉于山雾之中,感受不同于城市的静谧与轻松。",min_price:"300"},
 					// {cover_picture:"https://t38.9026.com/uploads/golf/images/2022-05-31/20220531601652.png",name:"深林康养",description:" 夏日的森林,雨水充沛了山林,鲜花盛放,溪水潺潺。漫步于自然之中,感受清新的空气,放空心灵,沉醉于山雾之中,感受不同于城市的静谧与轻松。",min_price:"300"}
 				],
-				lineWidth:''
+				lineWidth: ''
 			}
 		},
 		onLoad() {
 			this.init()
 		},
+		onShow() {
+			this.initvist()
+		},
 		methods: {
+			initvist() {
+				let curPage = getCurrentPages();
+				let route = curPage[curPage.length - 1].route; //获取当前页面的路由
+				let code = uni.getStorageSync("code")
+				let obj = {
+					page: route,
+					code: code
+				}
+				if (code) {
+					uni.$u.http.post('/api/visit/add', obj, {
+						custom: {
+							auth: true
+						}
+					}).then((res) => {}).catch((err) => {})
+				}
+			},
 			init() {
-				let userinfo=this.$store.state.userinfo
+				let userinfo = this.$store.state.userinfo
 				// 获取轮播图
 
-				let home=uni.getStorageSync("home")
-				home.images.forEach(item=>{
+				let home = uni.getStorageSync("home")
+				home.images.forEach(item => {
 					this.swiper.push(item.url)
 				})
 
-				uni.$u.http.post('/api/category/list',userinfo,{
+				uni.$u.http.post('/api/category/list', userinfo, {
 					custom: {
 						auth: true
 					}
 				}).then((res) => {
 					// console.log(res)
-					this.list=res
+					this.list = res
 				}).catch((err) => {
-					console.log( err)
+					console.log(err)
 				})
 				// 套餐列表
-				uni.$u.http.post('/api/good/index',{
-					category_id:1,
-					per_page:15,
-					page:1
-				},{
+				uni.$u.http.post('/api/good/index', {
+					category_id: 1,
+					per_page: 15,
+					page: 1
+				}, {
 					custom: {
 						auth: true
 					}
 				}).then((res) => {
 					// console.log(res.data)
-					this.listArr=res.data
-					this.list2=res.data.picture
+					this.listArr = res.data
+					this.list2 = res.data.picture
 					// console.log(res.data[0].picture,"详情图")
 				}).catch((err) => {
-					console.log( err)
+					console.log(err)
 				})
 			},
 			// 切换标签
-			chooseTitle(e){
+			chooseTitle(e) {
 				// console.log(e)
-				this.lineWidth=e.rect.width
-				uni.$u.http.post('/api/good/index',{
-					category_id:e.id,
-					per_page:15,
-					page:1
-				},{
+				this.lineWidth = e.rect.width
+				uni.$u.http.post('/api/good/index', {
+					category_id: e.id,
+					per_page: 15,
+					page: 1
+				}, {
 					custom: {
 						auth: true
 					}
 				}).then((res) => {
 					// console.log(res.data)
-					this.listArr=res.data
+					this.listArr = res.data
 				}).catch((err) => {
-					console.log( err)
+					console.log(err)
 				})
 			},
 			// 跳转套餐详情
@@ -120,12 +141,14 @@
 	}
 </script>
 <style lang="less">
-	page{
+	page {
 		color: rgba(51, 51, 51, 1);
 	}
-	.tags{
+
+	.tags {
 		box-shadow: 0px 2rpx 8rpx 0px rgba(0, 0, 0, 0.06);
 	}
+
 	.travelPage {
 		// padding: 20rpx;
 		box-sizing: border-box;
@@ -149,9 +172,10 @@
 
 			.video {
 				margin: 0 30rpx;
+
 				// box-shadow: 0px 8px 14px 0px rgba(0, 21, 3, 0.05);
 				// border-radius: 16px 16px 16px 58px;
-				image{
+				image {
 					width: 690rpx;
 					height: 410rpx;
 				}

+ 26 - 4
pages/travel/contract.vue

xqd xqd xqd
@@ -1,6 +1,12 @@
 <template>
 	<view class="content">
-		<image :src="content" mode="widthFix"></image>
+		<view v-for="(item,index) in content" :key="index">
+			<image :src="item" mode="widthFix" lazy-load="true"></image>
+		</view>
+		<!-- <scroll-view> -->
+			
+		<!-- </scroll-view> -->
+		
 	</view>
 </template>
 
@@ -16,8 +22,23 @@
 		},
 		methods:{
 			init(){
-				let data=uni.getStorageSync("data")
-				this.content=data[7].value
+				uni.showLoading()
+				let phone=uni.getStorageSync("phone")
+				let code=uni.getStorageSync("code")
+				uni.$u.http.post('/api/config/list',{phone,code},{
+					custom: {
+						auth: true
+					}
+				}).then((res) => {
+					
+					this.content=res[7].value
+					uni.hideLoading()
+				}).catch((err) => {
+					uni.hideLoading()
+					console.log( err)
+				})
+				
+				
 			}
 		}
 	}
@@ -32,8 +53,9 @@
 		padding: 20rpx;
 		// margin:0 20rpx;
 		height: 100%;
-		width: 100%;
+		
 		image{
+			width: 750rpx;
 			width: 100%;
 			height: 100%;
 		}

+ 144 - 21
pages/travel/poster.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -26,6 +26,10 @@
 		<!-- <view class="content">
 			<image :src="" mode="aspectFill"></image>
 		</view> -->
+		<view class="imgbox">
+			<!-- {{imgurl}} -->
+			<image  :src="imgurl" mode="aspectFit"></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;">
@@ -36,7 +40,7 @@
 				</button>
 				
 			</view>
-			<view class="xiangc">
+			<view class="xiangc" @click="savePoster">
 				<image src="../../static/travelD/album.png" mode="widthFix"></image>
 				<view class="text">
 					手机相册
@@ -48,24 +52,31 @@
 </template>
 
 <script>
+	let that
 	export default {
 		data(){
 			return{
 			goodsInfo:null,
-			good_id:''
+			good_id:'',
+			imgurl:''
 			}
 		},
 		// #ifdef MP
-		onShareAppMessage(s= false){
-		    return this.$shareAppMessage({
-		        title: this.goodsInfo.name,
-		        imageUrl:"",
-		        path: "/pages/travel/travelDetails?id="+this.id,
-		       
-		    });
+		onShareAppMessage(options){
+			 var that = this;
+			  var shareObj = {
+			    title:  this.goodsInfo.name,  
+			    path: "/pages/travel/travelDetails?id="+that.goodsInfo.id,  
+			    imageUrl: '',   
+			  };
+			  if( options.from == 'button' ){
+			    shareObj.path = "/pages/travel/travelDetails?id="+that.goodsInfo.id
+			  }
+			  return shareObj;
 		},
 		// #endif
 		onLoad(o) {
+			that=this
 			if(o.goodsInfo){
 				let goodsInfo = decodeURIComponent(o.goodsInfo)
 				this.goodsInfo = JSON.parse(goodsInfo)
@@ -73,28 +84,131 @@
 			this.init()
 		},
 		computed:{
-			created_at(){
-				let created_at=''
-				if(this.goodsInfo.created_at){
-					created_at=this.goodsInfo.created_at.slice(0,10)
-				}
-				return created_at
-			}
+			// created_at(){
+			// 	let created_at=''
+			// 	if(this.goodsInfo.created_at){
+			// 		created_at=this.goodsInfo.created_at.slice(0,10)
+			// 	}
+			// 	return created_at
+			// }
 		},
 		methods:{
 			init(){
+				uni.showLoading({
+					
+				})
 				uni.$u.http.post('/api/share/good', {
-					good_id: this.goodsInfo.id.toString()
+					good_id: this.goodsInfo.id
 				}, {
 					custom: {
 						auth: true
 					}
 				}).then((res) => {
-					// this.imgurl=res.
+					console.log(res)
+					that.imgurl=res.url
+					uni.hideLoading()
 				}).catch((err) => {
+					uni.hideLoading()
 					console.log(err)
 				})
-			}
+			},
+			
+			savePoster() {
+				
+			
+					uni.showLoading({
+						title: '正在保存图片...'
+					});
+					//获取用户的当前设置。获取相册权限
+					uni.getSetting({
+						success: (res) => {
+							//如果没有相册权限
+							if (!res.authSetting["scope.writePhotosAlbum"]) {
+								//向用户发起授权请求
+								uni.authorize({
+									scope: "scope.writePhotosAlbum",
+									success: () => {
+										//授权成功保存图片到系统相册
+										uni.downloadFile({
+											url: this.imgurl,
+											success: (res) => {
+												console.log(res)
+												if (res.statusCode === 200) {
+													uni.saveImageToPhotosAlbum({
+														filePath: res.tempFilePath,
+														success: function() {
+															uni.showToast({
+																title: "保存成功",
+																icon: "none"
+															});
+														},
+														fail: function() {
+															uni.showToast({
+																title: "保存失败",
+																icon: "none"
+															});
+														}
+													});
+												}
+											}
+										})
+									},
+									//授权失败
+									fail: () => {
+										uni.hideLoading();
+										uni.showModal({
+											title: "您已拒绝获取相册权限",
+											content: "是否进入权限管理,调整授权?",
+											success: (res) => {
+												if (res.confirm) {
+							//调起客户端小程序设置界面,返回用户设置的操作结果。(重新让用户授权)
+													uni.openSetting({
+														success: (res) => {
+														console.log(res.authSetting);
+														},
+													});
+												} else if (res.cancel) {
+													return uni.showToast({
+														title: "已取消!",
+													});
+												}
+											},
+										});
+									},
+								});
+							} else {
+								//如果已有相册权限,直接保存图片到系统相册
+								uni.downloadFile({
+									url:this.imgurl,
+									success: (res) => {
+										console.log(res)
+										if (res.statusCode === 200) {
+											uni.saveImageToPhotosAlbum({
+												filePath: res.tempFilePath,
+												success: function() {
+													uni.showToast({
+														title: "保存成功",
+														icon: "none"
+													});
+												},
+												fail: function() {
+													uni.showToast({
+														title: "保存失败",
+														icon: "none"
+													});
+												}
+											});
+										}
+									}
+								})
+							}
+						},
+						fail: (res) => {},
+					});
+				
+				
+			},
+			
 		}
 	}
 </script>
@@ -103,6 +217,15 @@
 	page{
 		background-color: #F4F4F4;
 	}
+	.imgbox{
+		margin: 20rpx auto;
+		width: 624rpx;
+		height: 960rpx;
+		image{
+			width: 100%;
+			height: 100%;
+		}
+	}
 	.content{
 		box-sizing: border-box;
 		background: #ffffff;
@@ -111,7 +234,7 @@
 		padding: 24rpx 24rpx 40rpx;
 		image{
 			width: 596rpx;
-			height: 874rpx;
+			height: 800rpx;
 			width: 100%;
 			border-radius: 8rpx 20rpx 8rpx 0;
 		}
@@ -144,7 +267,7 @@
 	}
 	.flex{
 		box-sizing: border-box;
-		margin: 109rpx 144rpx 0;
+		margin: 90rpx 144rpx 0;
 		display: flex;
 		align-content: center;
 		justify-content: space-between;

+ 33 - 17
pages/travel/submitOrder.vue

xqd xqd xqd xqd xqd xqd xqd xqd
@@ -15,7 +15,7 @@
 		</view>
 		<view class="" style="padding: 0 30rpx;color: #666666;">
 			<!-- 夕阳红康养团是为中老年特别定制的康养方案这个团 非常好 -->
-			{{suborder.subtitle}}
+			{{suborder.subtitle?suborder.subtitle:''}}
 		</view>
 
 		<view class="suborder">
@@ -39,14 +39,19 @@
 					<text style="text-decoration: underline;padding: 6rpx;" @click="Policy">隐私政策</text>
 				</view>
 			</view>
-			<view class="time">
-				<view>订单支付倒计时:</view>
-				<u-count-down :time="30 * 60 * 60 * 1000" format="HH:mm:ss"></u-count-down>
-			</view>
+			
 		</view>
 
 
 		<view class="navbar">
+				<u-count-down :time="2* 60 * 60 * 1000" format="HH:mm:ss"  @change="onChange">
+					<view class="time">
+						<text>订单支付倒计时:</text>
+					            <text class="time__item">{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}&nbsp;时</text>
+					            <text class="time__item">{{ timeData.minutes }}&nbsp;分</text>
+					            <text class="time__item">{{ timeData.seconds }}&nbsp;秒</text>
+					        </view>
+				</u-count-down>
 			<view class="navbar-item">
 				总金额 ¥{{suborder.total}}
 			</view>
@@ -64,7 +69,8 @@
 			return {
 				suborder: {},
 				peoplelist: [],
-				checked:false
+				checked:false,
+				timeData:2
 			}
 		},
 		onLoad(options) {
@@ -96,6 +102,9 @@
 			// 	this.peoplelist=list
 
 			// },
+			onChange(e) {
+			                this.timeData = e
+			            },
 			checkboxChange(n) {
 				console.log('change', n);
 			},
@@ -107,6 +116,10 @@
 			// 支付
 
 			Submit(){
+				if(!this.checked){
+					this.$toast("请阅读安全告知和隐私政策")
+					return
+				}
 				uni.$u.http.post('/api/order/config',{
 					order_id:this.suborder.order_id,
 				}).then(res=>{
@@ -211,16 +224,7 @@
 			margin-top: 50rpx;
 		}
 
-		.time {
-			position: absolute;
-			left: 0;
-			bottom: 75rpx;
-			width: 100%;
-			background-color: #F4F4F4;
-			border-radius: 16rpx 16rpx 0px 0px;
-			display: flex;
-			padding: 24rpx 0rpx 24rpx 30rpx;
-		}
+		
 	}
 
 	.navbar {
@@ -236,7 +240,7 @@
 		background: #1E9F6A;
 		border-radius: 16rpx 16rpx 0px 0px;
 		color: #ffffff;
-
+		z-index: 999;
 		.navbar-item {
 			width: 50%;
 			text-align: center;
@@ -245,5 +249,17 @@
 		.want {
 			border-left: 1rpx solid #FFFFFF;
 		}
+		.time {
+			color: #333333;
+			position: absolute;
+			left: 0;
+			bottom: 105rpx;
+			width: 100%;
+			background-color: #F4F4F4;
+			border-radius: 16rpx 16rpx 0px 0px;
+			display: flex;
+			padding: 24rpx 0rpx 24rpx 30rpx;
+			box-sizing: border-box;
+		}
 	}
 </style>

+ 43 - 9
pages/travel/travelDetails.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -1,6 +1,6 @@
 <template>
 	<view class="detailsPage">
-		<u-swiper height=900 :list="list2" keyName="image" showTitle :autoplay="false" circular autoplay></u-swiper>
+		<u-swiper height=900 :list="picture" keyName="image" showTitle :autoplay="false" circular autoplay></u-swiper>
 		<view class="details">
 			<view class="title flex-item">
 				<view class="">
@@ -179,7 +179,7 @@
 		<!-- <scroll-view  scroll-y="true"  style="height: 90vh;"   scroll-with-animation="true"> -->
 		<view class="model">
 			<u-modal :show="isshow" title="报名前必看" :content='content' showCancelButton @confirm="goadd" @cancel="cancel"
-				confirmColor="#ffffff"></u-modal>
+				confirmColor="#ffffff" style="margin-left: 0;padding-left: 22rpx;"></u-modal>
 		</view>
 		<!-- </scroll-view> -->
 	</view>
@@ -238,17 +238,22 @@
 				plans: {},
 				// 
 				scrollTop: 0,
-				price: 0
+				price: 0,
+				picture:[]
 			}
 
 		},
 		onLoad(options) {
 			that = this
+			console.log(options)
 			if (options.id) {
 				this.init(options.id)
 			}
 
 		},
+		onShow() {
+			this.initvist()
+		},
 		computed: {
 			minprice() {
 				let pr = 0
@@ -273,7 +278,24 @@
 		},
 		// #endif
 		methods: {
-
+		initvist(){
+			let curPage = getCurrentPages();
+			let route = curPage[curPage.length - 1].route; //获取当前页面的路由
+			let code=uni.getStorageSync("code")
+			let obj={
+				page:route,
+				code:code
+			}
+			if(code){
+				uni.$u.http.post('/api/visit/add',obj,{
+					custom: {
+						auth: true
+					}
+				}).then((res) => {
+				}).catch((err) => {
+				})
+			}
+		},
 			init(id) {
 				this.$showLoadding("加载中")
 				uni.$u.http.post('/api/good/show', {
@@ -286,6 +308,7 @@
 					uni.hideLoading();
 					this.goodsInfo = res
 					this.tags = res.tags
+					this.picture=JSON.parse(res.picture)
 					let newmonth = []
 					for (let key in res.plans) {
 						newmonth.push({
@@ -303,10 +326,18 @@
 				if (this.dayindex >= 0) {
 					this.isshow = true
 				} else {
-					uni.showModal({
-						title: "提示",
-						content: "请选择房型"
-					})
+					if(this.days.length>0){
+						uni.showModal({
+							title: "提示",
+							content: "请选择房型"
+						})
+					}else{
+						uni.showModal({
+							title: "提示",
+							content: "暂无房型"
+						})
+					}
+					
 					return
 				}
 			},
@@ -423,7 +454,10 @@
 	page {
 		background-color: #f4f4f4;
 	}
-
+	._div{
+		margin-left: 0 !important;
+		padding-left: 22rpx !important;
+	}
 	.txtgray {
 		color: #666666;
 	}

+ 45 - 28
pages/travel/travelPeople.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -25,7 +25,7 @@
 					<view class="image">
 						<image :src="item.room_picture" @touchend="dblclick(item.room_picture)"></image>
 						<view class="surplus">
-							剩余 {{item.number}}
+							剩余 {{item.number-item.used}}
 						</view>
 					</view>
 					<view class="text">
@@ -36,11 +36,11 @@
 		</view>
 		<view class="houseNumber">
 			<view class="" style="margin-bottom: 20rpx;font-weight: bold;font-size: 34rpx;">
-				房间数量
+				套餐数量
 			</view>
 			<view class="housePrice">
 				<view class="" style="font-size: 32rpx;color: #666666;">
-					套餐标准价格
+					套餐价格
 				</view>
 				<view class="" style="font-weight: bold;">
 					<!-- ¥12399 -->
@@ -132,7 +132,7 @@
 			<u-modal :show="showMoadl" :title="title" confirmText="知道了" confirmColor="#ffffff"
 				@confirm="showMoadl=false">
 				<view class="">
-					关注日月峡公众号
+					关注
 					<text style="color: #408B68;">日月峡森林康养旅行</text>
 					及时获取出行信息
 				</view>
@@ -182,7 +182,9 @@
 				// 同住人
 				cohabits: [],
 				room_id: 0,
-				value: 1
+				value: 1,
+				ur1:'',
+				ur2:''
 			}
 		},
 		onLoad(options) {
@@ -238,21 +240,32 @@
 				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++
+				if(this.touchNum==1){
+					this.ur1=url
+				}else if(this.touchNum==2){
+					this.ur2=url
+					console.log(this.ur1,this.ur2)
+					if(this.ur1==this.ur2){
+						setTimeout(()=>{
+							if (this.touchNum >= 2) {
+								let imgUrl = []
+								imgUrl.push(this.ur2)
+								console.log(imgUrl)
+								uni.previewImage({
+									current: imgUrl[0],
+									urls: imgUrl,
+								});
+								this.touchNum = 0
+							}
+							
+						},800)
+							
+					}else{
 						this.touchNum = 0
-					},1000)
-						
+					}
+				}
+	
 				console.log(this.touchNum)
 
 			},
@@ -265,8 +278,8 @@
 				this.houselist = newdays.rooms
 				this.room_id = this.houselist[0].room_id
 				this.houseType = 0
-				this.roomPrice = Number(this.houselist[0].price)
-				this.totalromprice = Number(this.houselist[0].price)
+				this.roomPrice = Number(this.houselist[0].price).toFixed(2)
+				this.totalromprice = Number(this.houselist[0].price).toFixed(2)
 			},
 			chooseRoomMate(){
 				this.chooseroommate=1
@@ -306,11 +319,14 @@
 				this.$store.commit("getpeopleList", arr)
 				this.travelers = []
 				this.value = e.value
-				this.totalromprice = Number(this.roomPrice) * e.value
+				this.totalromprice =(this.roomPrice * e.value).toFixed(2)
 			},
 			// 添加同住人e
 			addcohabits() {
-
+				if(this.cohabits.length==6){
+					this.$toast("同住人不能超过6人")
+					return
+				}
 				for (let i in this.cohabits) {
 					console.log(i)
 					if (this.cohabits[i] == ''||this.cohabits[i] == null) {
@@ -326,10 +342,14 @@
 				this.houseType = index
 				this.roomPrice = price
 				this.room_id = id
-				this.totalromprice = Number(this.roomPrice) * this.value
+				this.totalromprice =(this.roomPrice * this.value).toFixed(2)
 			},
 			// 提交订单
 			Submit() {
+				if(this.travelers.length<this.value){
+					this.$toast("请选择"+this.value+"位出行人")
+					return
+				}
 				if (this.chooseroommate == 2) {
 					for (let i in this.cohabits) {
 						console.log(i)
@@ -385,10 +405,7 @@
 					})
 				}).catch((err) => {
 					console.log(err)
-					uni.showToast({
-						icon: "error",
-						title: err.message,
-					})
+					this.$toast(err.message)
 				})
 
 			}

+ 269 - 197
pages/userCenter.vue

xqd xqd xqd xqd xqd xqd xqd xqd
@@ -4,7 +4,7 @@
 			<view class="topbg">
 				<image src="../static/usercenter/bg.png" mode="aspectFill"></image>
 			</view>
-			
+
 			<view class="userTop-content" v-if="loginShow">
 				<view class="avatar" @click="goEndit">
 					<image :src="userMsg.avatarUrl" mode="aspectFill" v-if="userMsg.avatarUrl"></image>
@@ -23,7 +23,7 @@
 					<text>点击获取头像昵称</text>
 				</view>
 			</view>
-			
+
 			<view class="login" v-if="!loginShow">
 				<view class="">
 					日月峡森林康养旅行
@@ -33,56 +33,66 @@
 				</view>
 			</view>
 		</view>
-		
+
 		<view class="userOrder">
-			<view class="flex-item" @click="goOrder()">
-			    <image mode="aspectFit" src="../static/usercenter/Tobepaid.png" style="width: 45%;margin-bottom: -5px;"></image>
-			         <view>待付款</view>
+			<view class="flex-item" @click="goOrder(1)">
+				<image mode="aspectFit" src="../static/usercenter/Tobepaid.png" style="width: 45%;margin-bottom: -5px;">
+				</image>
+				<view>待付款</view>
+				<view class="cuicle" v-if="ordernum.unpaid"><text>{{ordernum.unpaid}}</text></view>
 			</view>
+
 			<view class="line">
-				
+
 			</view>
-			<view class="flex-item" @click="goOrder()">
-			    <image mode="aspectFit" src="../static/usercenter/Aftersales.png" style="width: 45%;margin-bottom: -5px;"></image>
-			        <view>已付款</view>
+			<view class="flex-item" @click="goOrder(2)">
+				<image mode="aspectFit" src="../static/usercenter/Aftersales.png"
+					style="width: 45%;margin-bottom: -5px;"></image>
+				<view>待出行</view>
+				<view class="cuicle" v-if="ordernum.paid"><text>{{ordernum.paid}}</text></view>
 			</view>
 			<view class="line">
-				
+
 			</view>
-			<view class="flex-item" @click="goOrder">
-			    <image mode="aspectFit" src="../static/usercenter/Tobepaid1.png" style="width: 45%;margin-bottom: -5px;"></image>
-			     <view>已完成</view>
+			<view class="flex-item" @click="goOrder(4)">
+				<image mode="aspectFit" src="../static/usercenter/Tobepaid1.png"
+					style="width: 45%;margin-bottom: -5px;"></image>
+				<view>已完成</view>
+				<view class="cuicle" v-if="ordernum.completed"><text>{{ordernum.completed}}</text></view>
 			</view>
 			<view class="line">
-				
+
+			</view>
+			<view class="flex-item " @click="goOrder(1)">
+				<image mode="aspectFit" src="../static/usercenter/all.png" style="width: 45%;margin-bottom: -5px;">
+				</image>
+				<view>全部订单</view>
+				<!-- <view class="cuicle" v-if="ordernum.total"><text>{{ordernum.total}}</text></view> -->
 			</view>
-		    <view  class="flex-item " @click="goOrder">
-		        <image mode="aspectFit" src="../static/usercenter/all.png" style="width: 45%;margin-bottom: -5px;"></image>
-		             <view>全部订单</view>
-		    </view>
-		    
-		    
-		   
+
+
+
 		</view>
 		<view class="" style="background-color: #FFFFFF; margin: 0 30rpx;border-radius: 8rpx;">
-			<u-cell-group :border="false" >
+			<u-cell-group :border="false">
 				<u-cell title="出行人" isLink size="large" :border="false" @click="goaddpeople"></u-cell>
 				<u-cell title="发票" isLink size="large" :border="false" @click="goinvoice"></u-cell>
 			</u-cell-group>
 		</view>
-		
+
 		<view class="" style="background-color: #FFFFFF; margin: 20rpx 30rpx;border-radius: 8rpx 8rpx 8rpx 56rpx;">
-		    <u-cell-group :border="false">
-	            <u-cell title="客服" size="large" isLink :border="false"  @click="gomes"></u-cell>
-			    <u-cell title="关于日月峡" size="large" isLink :border="false"  @click="goaboutus"></u-cell>
-		    </u-cell-group>
+			<u-cell-group :border="false">
+				<u-cell title="客服" size="large" isLink :border="false" @click="gomes"></u-cell>
+				<u-cell title="关于日月峡" size="large" isLink :border="false" @click="goaboutus"></u-cell>
+			</u-cell-group>
 		</view>
 		<view class="signout" @click="signout" v-if="loginShow">
 			退出登录
 		</view>
-		<view class="kefuicon" >
-			<button open-type="contact" type="default" style="background-color: transparent;border-style:none;border:0;" >
-			<image src="../static/usercenter/service.png" mode="widthFix"></image>
+		<view class="kefuicon">
+			<button open-type="contact" type="default"
+				style="background-color: transparent;border-style:none;border:0;">
+				<image src="../static/usercenter/service.png" mode="widthFix"></image>
 			</button>
 		</view>
 	</view>
@@ -90,169 +100,200 @@
 
 <script>
 	let that
-export default {
-	data(){
-		return{
-			loginShow:this.$store.state.login,
-			getuser:this.$store.state.getuser,
-			userMsg:{},
-			phone:''
-		}
-	},
-	onLoad() {
-		that=this
-		this.init()
-		
-	},
-	onShow() {
-		this.init()
-	},
-	// watch:{
-	// 	  "this.$store.state.token": {
-	// 	      handler(newValue, oldValue) {
-	// 	        console.log("单个属性监听", newValue, oldValue);
-	// 	      }
-	// 	    },
-	// },
-	methods: {
-		init(){
-			// this.loginShow=this.$store.state.login
-			let token=uni.getStorageSync("token")
-			// console.log(token)
-			if(token){
-				this.loginShow=true
-			}
-			let userMsg=uni.getStorageSync("userMsg")
-			if(userMsg){
-				this.userMsg=userMsg
+	export default {
+		data() {
+			return {
+				loginShow: this.$store.state.login,
+				getuser: this.$store.state.getuser,
+				userMsg: {},
+				phone: '',
+				ordernum: ''
 			}
-			let phone=uni.getStorageSync("phone")
-			this.phone=phone
-			// if(!token){
-				
-			// }
 		},
-		// 登录
-		gologin(){
-			uni.navigateTo({
-				url:"/pages/login"
-			})
-		},
-		// 跳转完善个人信息
-		goEndit(){
-			uni.navigateTo({
-				url:"/pages/userCenter/userEdit"
-			})
-		},
-		// 跳转订单列表
-		goOrder(){
-			uni.navigateTo({
-				url:"/pages/order/order"
-			})
-		},
-		//跳转出行人
-		goaddpeople(){
-			uni.navigateTo({
-				url:"/pages/peopleList/peopleList?id=0"
-			})
-		},
-		// 跳转发票
-		goinvoice(){
-			uni.navigateTo({
-				url:"/pages/userCenter/invoice"
-			})
+		onLoad() {
+			that = this
+			this.init()
+
 		},
-	// 客服
-	gomes(){
-		uni.navigateTo({
-			url:"/pages/customerService"
-		})
-	},
-		// 关于我们
-		goaboutus(){
-			uni.navigateTo({
-				url:"/pages/userCenter/aboutus"
-			})
+		onShow() {
+			this.init()
+			this.initvist()
 		},
-		// 获取用户头像
-		 getUserProfile() {
-		    var that = this;
-		          wx.getUserProfile({
-		            desc: "用于完善用户资料", // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
-		            success: (res) => {
+		// watch:{
+		// 	  "this.$store.state.token": {
+		// 	      handler(newValue, oldValue) {
+		// 	        console.log("单个属性监听", newValue, oldValue);
+		// 	      }
+		// 	    },
+		// },
+		methods: {
+			initvist(){
+				let curPage = getCurrentPages();
+				let route = curPage[curPage.length - 1].route; //获取当前页面的路由
+				let code=uni.getStorageSync("code")
+				let obj={
+					page:route,
+					code:code
+				}
+				if(code){
+					uni.$u.http.post('/api/visit/add',obj,{
+						custom: {
+							auth: true
+						}
+					}).then((res) => {
+					}).catch((err) => {
+					})
+				}
+			},
+			init() {
+				let token = uni.getStorageSync("token")
+				if (token) {
+					this.loginShow = true
+					uni.$u.http.post('/api/order/count', {
+						token: token
+					}, {
+						custom: {
+							auth: true
+						}
+					}).then((res) => {
+						that.ordernum = res
+					}).catch((err) => {
+
+					})
+				}
+				let userMsg = uni.getStorageSync("userMsg")
+				if (userMsg) {
+					this.userMsg = userMsg
+				}
+				let phone = uni.getStorageSync("phone")
+				this.phone = phone
+
+			},
+			// 登录
+			gologin() {
+				uni.navigateTo({
+					url: "/pages/login"
+				})
+			},
+			// 跳转完善个人信息
+			goEndit() {
+				uni.navigateTo({
+					url: "/pages/userCenter/userEdit"
+				})
+			},
+			// 跳转订单列表
+			goOrder(state) {
+				uni.navigateTo({
+					url: "/pages/order/order?state="+state
+				})
+			},
+			//跳转出行人
+			goaddpeople() {
+				uni.navigateTo({
+					url: "/pages/peopleList/peopleList?id=0"
+				})
+			},
+			// 跳转发票
+			goinvoice() {
+				uni.navigateTo({
+					url: "/pages/userCenter/invoice"
+				})
+			},
+			// 客服
+			gomes() {
+				uni.navigateTo({
+					url: "/pages/customerService"
+				})
+			},
+			// 关于我们
+			goaboutus() {
+				uni.navigateTo({
+					url: "/pages/userCenter/aboutus"
+				})
+			},
+			// 获取用户头像
+			getUserProfile() {
+				var that = this;
+				wx.getUserProfile({
+					desc: "用于完善用户资料", // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
+					success: (res) => {
 						that.$toast("获取成功")
-		              // that.userMsg = res.userInfo; //这个我有时候获取不到,所以没管它,但先写着
-		              uni.setStorageSync("userMsg", res.userInfo);
-					  that.init()
-		              let setNowTime = Date.now() + 3600 * 1000 * 24 * 30;  
-		              uni.setStorageSync("userInfoStorageTime", setNowTime);
-		            },
-		            fail: function (err) {
-		              console.log(err);
-		            },
-		          });
-		  },
-		  // setUserInfoStorageTime() {
-		  //     let nowTime = Date.now();
-		  //     let oldTime = uni.getStorageSync("userInfoStorageTime");
-		  //     let userInfo = uni.getStorageSync("userMsg");
-		  //     if ( userInfo.nickName != undefined && userInfo.nickName != null && userInfo.nickName != "" ) {
-		  //       if (oldTime && nowTime < oldTime) {
-		  //         that.userMsg=userInfo
-		  //         return;
-		  //       } else {
-		  //         that.getUserProfile();
-		  //       }
-		  //     } else {
-		  //       that.getUserProfile();
-		  //     }
-		  //   },
-		  // })
-		// 退出登录
-		signout(){
-			uni.showModal({
-				title:"提示",
-				content:"是否退出?",
-				success: (res) => {
-					if(res.confirm){
-						this.$toast("退出成功")
-						uni.removeStorageSync('token')
-						uni.removeStorageSync('code')
-						uni.removeStorageSync('phone')
-						uni.removeStorageSync('userMsg')
-						this.userMsg={}
-						this.$store.commit("setToken","")
-						this.$store.commit('getUserInfo',{})
-						this.$store.commit('loginState',null)
-						this.loginShow=this.$store.state.login
-						this.init()
+						// that.userMsg = res.userInfo; //这个我有时候获取不到,所以没管它,但先写着
+						uni.setStorageSync("userMsg", res.userInfo);
+						that.init()
+						let setNowTime = Date.now() + 3600 * 1000 * 24 * 30;
+						uni.setStorageSync("userInfoStorageTime", setNowTime);
+					},
+					fail: function(err) {
+						console.log(err);
+					},
+				});
+			},
+			// setUserInfoStorageTime() {
+			//     let nowTime = Date.now();
+			//     let oldTime = uni.getStorageSync("userInfoStorageTime");
+			//     let userInfo = uni.getStorageSync("userMsg");
+			//     if ( userInfo.nickName != undefined && userInfo.nickName != null && userInfo.nickName != "" ) {
+			//       if (oldTime && nowTime < oldTime) {
+			//         that.userMsg=userInfo
+			//         return;
+			//       } else {
+			//         that.getUserProfile();
+			//       }
+			//     } else {
+			//       that.getUserProfile();
+			//     }
+		 //   },
+			// })
+			// 退出登录
+			signout() {
+				uni.showModal({
+					title: "提示",
+					content: "是否退出?",
+					success: (res) => {
+						if (res.confirm) {
+							this.$toast("退出成功")
+							this.ordernum = ''
+							uni.removeStorageSync('token')
+							uni.removeStorageSync('code')
+							uni.removeStorageSync('phone')
+							uni.removeStorageSync('userMsg')
+							this.userMsg = {}
+							this.$store.commit("setToken", "")
+							this.$store.commit('getUserInfo', {})
+							this.$store.commit('loginState', null)
+							this.loginShow = this.$store.state.login
+							this.init()
+						}
 					}
-				}
-			})
-			
-		},
-		
+				})
+
+			},
+
+		}
 	}
-}
 </script>
 
 <style lang="less">
-	page{
+	page {
 		background-color: #F4F4F4;
 		font-size: 32rpx;
 		font-family: PingFang-SC-Bold, PingFang-SC;
 		position: relative;
 	}
-	.userPage{
+
+	.userPage {
 		height: 100vh;
 		position: relative;
-		.userTop{
+
+		.userTop {
 			position: relative;
 			width: 100%;
 			box-sizing: border-box;
 			padding: 50rpx 30rpx 65rpx;
-			.topbg{
-				image{
+
+			.topbg {
+				image {
 					width: 100%;
 					height: 288rpx;
 					position: absolute;
@@ -261,46 +302,52 @@ export default {
 					z-index: -1;
 				}
 			}
-			
-			.userTop-content{
+
+			.userTop-content {
 				display: flex;
 				align-items: center;
 			}
-			.userinfo{
-				
-			}
-			.getnewname{
+
+			.userinfo {}
+
+			.getnewname {
 				display: flex;
 				align-items: center;
 			}
-			.getnew{
+
+			.getnew {
 				font-size: 22rpx;
 				display: block;
 				margin-left: 40rpx;
-				padding:5rpx 10rpx ;
+				padding: 5rpx 10rpx;
 				border: 1rpx solid #555555;
 				border-radius: 8rpx;
 			}
-			.phonenumber{
+
+			.phonenumber {
 				padding-top: 10rpx;
 			}
-			.avatar{
+
+			.avatar {
 				width: 172rpx;
 				height: 172rpx;
 				border-radius: 50%;
 				// background-color: pink;
 				margin-right: 30rpx;
 				border: 5rpx solid rgba(216, 227, 224, 0.5);
-				image{
+
+				image {
 					width: 100%;
 					height: 100%;
 					border-radius: 50%;
 				}
 			}
-			.login{
+
+			.login {
 				text-align: center;
 			}
-			.btn{
+
+			.btn {
 				width: 324rpx;
 				height: 62rpx;
 				line-height: 62rpx;
@@ -310,6 +357,7 @@ export default {
 				margin: 40rpx auto;
 			}
 		}
+
 		.userOrder {
 			margin: 20rpx 30rpx;
 			padding: 40rpx 0;
@@ -320,14 +368,35 @@ export default {
 			font-weight: bold;
 			color: #141328;
 			text-align: center;
-			.flex-item{
+
+			.flex-item {
+				position: relative;
+
+				.cuicle {
+					top: 20rpx;
+					right: 40rpx;
+					position: absolute;
+					width: 35rpx;
+					height: 35rpx;
+					line-height: 35rpx;
+					border-radius: 50%;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					font-size: 18rpx;
+					color: #fff;
+					background-color: #1E9F6A;
+				}
+
 				flex: 1;
-				image{
+
+				image {
 					width: 120rpx;
 					height: 120rpx;
 				}
 			}
-			.line{
+
+			.line {
 				width: 1px;
 				height: 48rpx;
 				line-height: 48rpx;
@@ -336,24 +405,27 @@ export default {
 				margin: auto 0;
 			}
 		}
-		.signout{
+
+		.signout {
 			margin: 46rpx auto 0;
-		   padding: 24rpx 0;
+			padding: 24rpx 0;
 			width: 438rpx;
 			text-align: center;
 			background: #E6E5E5;
 			border-radius: 8rpx 56rpx 8rpx 56rpx;
-			
+
 		}
-		
-		.kefuicon{
+
+		.kefuicon {
 			button::after {
-					border: none;
-				}
+				border: none;
+			}
+
 			position: absolute;
 			right: 30rpx;
 			bottom: 0;
-			image{
+
+			image {
 				width: 136rpx;
 				height: 136rpx;
 			}

+ 22 - 0
pages/userCenter/aboutus.vue

xqd
@@ -14,7 +14,29 @@
 		onLoad() {
 			this.init()
 		},
+		onShow() {
+			this.initvist()
+		},
 		methods:{
+			initvist(){
+				let curPage = getCurrentPages();
+				let route = curPage[curPage.length - 1].route; //获取当前页面的路由
+				let code=uni.getStorageSync("code")
+				let obj={
+					page:route,
+					code:code
+				}
+				if(code){
+					uni.$u.http.post('/api/visit/add',obj,{
+						custom: {
+							auth: true
+						}
+					}).then((res) => {
+					}).catch((err) => {
+					})
+				}
+				
+			},
 			init(){
 				let data=uni.getStorageSync("data")
 				this.content=data[4].value

+ 21 - 0
pages/userCenter/invoice.vue

xqd
@@ -23,8 +23,29 @@
 				
 			}
 		},
+		onShow() {
+			this.initvist()
+		},
 		methods:{
 			// 跳转发票
+			initvist(){
+				let curPage = getCurrentPages();
+				let route = curPage[curPage.length - 1].route; //获取当前页面的路由
+				let code=uni.getStorageSync("code")
+				let obj={
+					page:route,
+					code:code
+				}
+				if(code){
+					uni.$u.http.post('/api/visit/add',obj,{
+						custom: {
+							auth: true
+						}
+					}).then((res) => {
+					}).catch((err) => {
+					})
+				}
+			},
 			goList(){
 				uni.navigateTo({
 					url:"/pages/invoice/invoiceList"

+ 4 - 2
store/index.js

xqd xqd
@@ -20,6 +20,7 @@ const store = new Vuex.Store({
 	openpeopleList:0,
 	getuser:false,
 	userMsg:{},
+	value:''
   },
   mutations:{
 	setToken(state, token) {
@@ -51,11 +52,12 @@ const store = new Vuex.Store({
    // 选择出行人列表
    getpeopleList(state,arr){
 	   state.peopleList=arr
-	    console.log(state.peopleList,"<==============选择人")
+   },
+   getvalue(state,data){
+   	   state.value=data
    },
    getopenpeopleList(state,data){
    	   state.openpeopleList=data
-   	    console.log(state.peopleList,"<==============选择人")
    },
    getuser(state, data) {
        state.getuser = data;