zhengkaixin 4 роки тому
батько
коміт
cfd5d65bfb

+ 7 - 1
components/Carmap.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<view id="container" style="width: 100%; height: 240px;"></view>
+		<view id="container" :style="myStyle"></view>
 		
 	</view>
 </template>
@@ -9,6 +9,12 @@
 		import MapLoader from '@/utils/AMap'
 	export default {
 		name:"Carmap",
+		props:{
+			myStyle: {
+				require: false,
+				default: "width: 100%; height: 240px;",
+			},
+		},
 		data() {
 			return {
 				longitude: 112.276527,

+ 1 - 1
pages/buytickets/home.vue

@@ -9,7 +9,7 @@
 				</view>
 			</u-navbar>
 		
-			<carmap ref="amap"></carmap>
+			<carmap ref="amap" :myStyle="'width: 100%; height: 140px;'"></carmap>
 
 			<view class="map-text">
 				<h4>{{shiftInfo.startStation}} → {{shiftInfo.endStation}}</h4>

+ 3 - 8
pages/buytickets/index.js

@@ -124,14 +124,9 @@ export default {
 					this.$refs.common.confirm('存在需要补票的订单,是否前去查看?')
 				return;
 				}
-				if (response.data.id) {
-					uni.redirectTo({
-						url: '/pages/buytickets/home?id=' + this.id
-					})
-				} else {
-					this.upBusNoTicketList(true);
-					//this.getShiftInfo()
-				}
+				
+				this.upBusNoTicketList(true);
+				
 			}).catch(error => {
 		
 				if (error) {

+ 2 - 2
pages/buytickets/site.js

@@ -113,7 +113,7 @@ import {
 		
 			})
 		},
- 		clickBtn() {
+ 		clickBtn(bl) {
  			var obj = this.carhelp.get("form")
  			//obj.op = this.op;
  			//obj = this.carhelp.set("form", obj)
@@ -151,7 +151,7 @@ import {
 			}else{
 				API.createPassengerOrder(thisform).then((response) => {
 				
-					if(this.buy){
+					if(this.buy||bl==true){
 						this.submit(response.data.MergeOrderDTO.id);
 					}else{
 						obj.oplist=[];

+ 2 - 2
pages/buytickets/site.vue

@@ -57,10 +57,10 @@
 			</view>
 		</view>
 		<view class="upload-button" v-show="down.id">
-			<u-button type="primary" shape="circle" @click="clickBtn">{{buy?'支付':'保存'}}</u-button>
+			<u-button type="primary"  shape="circle" @click="clickBtn(true)">支付</u-button>
 		</view>
 		<view class="upload-button" v-show="!down.id">
-			<u-button type="default" class="gray-btn" shape="circle">{{buy?'支付':'保存'}}</u-button>
+			<u-button type="default" class="gray-btn" shape="circle">支付</u-button>
 		</view>
 	</view>
 </template>

+ 6 - 3
pages/buytickets/success.js

@@ -16,7 +16,7 @@ import * as API from '@/apis/common.js'
 								
 				API.mergeInfo(this.id).then((response) => {
 					
-					this.pay.list=response.data;
+					this.pay=response.data;
 					this.$refs.common.showLoading(false);
 				}).catch(error => {
 					this.$refs.common.showLoading(false, error);
@@ -29,14 +29,17 @@ import * as API from '@/apis/common.js'
 			},
 			backBtn(){
 				uni.redirectTo({
-					 url: '/pages/buytickets/home?id='+this.pay.id
+					 url: '/pages/buytickets/index?id='+this.pay.id
 				})
 			}
 		},
 		onLoad(op) {		
 			 this.id=op.id;	
 		},onReady(){
-			this.getPay();
+			if(!process.car.SIMPLE_RUN){
+				this.getPay();
+			}
+			
 		}
 	}