Browse Source

no message

xiaoxin 2 years ago
parent
commit
48aa09b278
5 changed files with 19 additions and 11 deletions
  1. 2 4
      manifest.json
  2. 11 3
      pages/affirmOrder/affirmOrder.vue
  3. 2 1
      pages/home/home.vue
  4. 2 1
      pages/payStatus/payStatus.vue
  5. 2 2
      util/api.js

+ 2 - 4
manifest.json

@@ -50,7 +50,7 @@
 	"quickapp": {},
 	"quickapp": {},
 	/* 小程序特有相关 */
 	/* 小程序特有相关 */
 	"mp-weixin": {
 	"mp-weixin": {
-		"appid": "wx2fc3f45732fae5d3",
+		"appid": "wxb064310cc85cf115",
 		"setting": {
 		"setting": {
 			"urlCheck": false,
 			"urlCheck": false,
 			"es6": true,
 			"es6": true,
@@ -63,9 +63,7 @@
 				"desc": "获取用户位置已展示距离民宿的距离"
 				"desc": "获取用户位置已展示距离民宿的距离"
 			}
 			}
 		},
 		},
-		"requiredPrivateInfos": [
-			"getLocation"
-		]
+		"requiredPrivateInfos": ["getLocation"]
 	},
 	},
 	"mp-alipay": {
 	"mp-alipay": {
 		"usingComponents": true
 		"usingComponents": true

+ 11 - 3
pages/affirmOrder/affirmOrder.vue

@@ -87,7 +87,7 @@
 					<view class="box_value">
 					<view class="box_value">
 						{{ roomCount }}间{{ info.nightNum }}晚 共
 						{{ roomCount }}间{{ info.nightNum }}晚 共
 						<text>¥</text>
 						<text>¥</text>
-						<span>{{ roomCount * info.item.price * info.nightNum }}</span>
+						<span>{{ totalPrice }}</span>
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -95,7 +95,7 @@
 			<view class="all">
 			<view class="all">
 				<view class="all_title">
 				<view class="all_title">
 					<text>房费</text>
 					<text>房费</text>
-					<text class="mr_30">¥{{ roomCount * info.item.price * info.nightNum }}</text>
+					<text class="mr_30">¥{{ totalPrice }}</text>
 				</view>
 				</view>
 
 
 				<view class="all_box">
 				<view class="all_box">
@@ -111,7 +111,7 @@
 		<view class="foot">
 		<view class="foot">
 			<view class="foot_left">
 			<view class="foot_left">
 				<text>¥</text>
 				<text>¥</text>
-				{{ roomCount * info.item.price * info.nightNum }}
+				{{ totalPrice }}
 			</view>
 			</view>
 			<view class="foot_right" @click="goPagePay">提交订单</view>
 			<view class="foot_right" @click="goPagePay">提交订单</view>
 		</view>
 		</view>
@@ -139,6 +139,14 @@ export default {
 		this.info = JSON.parse(options.info)
 		this.info = JSON.parse(options.info)
 		uni.$on('change', this.change)
 		uni.$on('change', this.change)
 	},
 	},
+	computed: {
+		// 总费用
+		totalPrice() {
+			if (this.info.item) {
+				return (this.roomCount * this.info.item.price * this.info.nightNum).toFixed(2)
+			}
+		}
+	},
 	methods: {
 	methods: {
 		change(e) {
 		change(e) {
 			this.clientName = e.name
 			this.clientName = e.name

+ 2 - 1
pages/home/home.vue

@@ -182,7 +182,8 @@ export default {
 					queryValue: this.keywords,
 					queryValue: this.keywords,
 					page: this.page,
 					page: this.page,
 					rows: this.rows,
 					rows: this.rows,
-					hotel_township: this.placeList[this.placeIndex].id || ''
+					hotel_township: this.placeList[this.placeIndex].id || '',
+					userId: uni.getStorageSync('userInfo') ? uni.getStorageSync('userInfo').id : ''
 				}
 				}
 			})
 			})
 			// console.log(res)
 			// console.log(res)

+ 2 - 1
pages/payStatus/payStatus.vue

@@ -16,7 +16,8 @@ export default {
 			// 支付状态
 			// 支付状态
 			status: '',
 			status: '',
 			// 订单进度模版id
 			// 订单进度模版id
-			templateOrder: 'ERU1ZY9IqwNkDxWyFJvo5VSE7ua-wey3SqhZgjqLDtU'
+			templateOrder: 'c9whRYC3d8ebNI_RdyG2X_1BBDwy2625hHmRWlW5Z9U'
+			// templateOrder: 'ERU1ZY9IqwNkDxWyFJvo5VSE7ua-wey3SqhZgjqLDtU'
 		}
 		}
 	},
 	},
 	onLoad(options) {
 	onLoad(options) {

+ 2 - 2
util/api.js

@@ -1,6 +1,6 @@
 // const BASE_URL = "https://chtech.ncjti.edu.cn/hotelReservation"
 // const BASE_URL = "https://chtech.ncjti.edu.cn/hotelReservation"
-// const BASE_URL = "https://chtech.ncjti.edu.cn/hotelReservation/mhotel"
-const BASE_URL = "http://192.168.161.232:8080"
+const BASE_URL = "https://chtech.ncjti.edu.cn/hotelReservation/mhotel"
+// const BASE_URL = "http://192.168.161.232:8080"
 export const myRequest = (options) => {
 export const myRequest = (options) => {
 	uni.showLoading({
 	uni.showLoading({
 		title: "加载中",
 		title: "加载中",