音频视频接口对接

lu_quan_dev
han 11 months ago
parent 8274fffe65
commit 068fcf53bb
  1. 24
      subPageB/Homestay/homestaydetail/homestaydetail.vue
  2. 92
      subPageC/bookHomestay/bookHomestay.vue
  3. 45
      subPageC/orderHomestay/orderCancel.vue
  4. 66
      subPageC/orderHomestay/orderDetail.vue
  5. 26
      subPageC/orderHomestay/orderList.vue

@ -164,12 +164,10 @@
this.newdate()
uni.setStorageSync('满房日期显示', 0)
},
onLoad: function(options) {
onLoad: function(options) {
this.guid = options.guid;
this.detailInfo(options.guid);
},
onShow() {
//
//
let sys = uni.getSystemInfoSync();
if (sys.statusBarHeight >= 44) {
// this.height = sys.windowHeight - 34;
@ -177,17 +175,19 @@
} else {
// this.height = sys.windowHeight;
}
// console.log(sys);
var dicday = uni.getStorageSync('入离日期');
if (dicday) {
this.startDate = dicday.startDate;
this.endDate = dicday.endDate;
} else {
this.newdate();
}
this.infoData = dicday
this.newdate();
this.type = 1;
// this.dicdes = JSON.parse(e.dic);
uni.setStorageSync('满房日期显示', 1)
@ -204,7 +204,6 @@
});
},
daohang() {
console.log("this.info.lat", this.info.lat)
uni.openLocation({
latitude: Number(this.info.lat),
longitude: Number(this.info.lng),
@ -286,6 +285,13 @@
showCalendar() {
console.log("==============")
this.isCalendarShow = true
var dicday = uni.getStorageSync('入离日期');
if (dicday) {
this.startDate = dicday.startDate;
this.endDate = dicday.endDate;
} else {
this.newdate();
}
},
//
cancel() {

@ -66,14 +66,28 @@
</view>
<view class="btn" @click="orderSubmit">提交订单</view>
</view>
<u-popup :show="isPayPopup" mode="bottom" @close="closePay" round="10">
<f-pay :show-title="false" :show="isPayPopup" :order="orderPay"
:payMoney="orderPay.orderAmount" :tradeNo="orderPay.orderNumber"
@payResult="payResult"></f-pay>
</u-popup>
</view>
</template>
<script>
import fPay from "../components/f-pay/f-pay";
import uPopup from "../components/uview-ui/components/u-popup/u-popup.vue";
export default {
components: {
fPay,
uPopup
},
data() {
return {
//
isPayPopup: false,
orderInfo: {},
formData: {
name: undefined,
@ -85,6 +99,7 @@
// idtype: undefined,
// idCardNumber: undefined,
},
orderPay: undefined,
totalPrice: undefined,
rules: {
name: {
@ -161,28 +176,85 @@
"tenantId": "1",
"checkInPersonInfoDTOList": [this.formData]
};
console.log(data)
this.$Request.post(this.$config.createHotelOrder, data, 'json', null, false, null).then((
res) => {
if (res.code == 0) {
uni.navigateTo({
url: "/subPageC/orderHomestay/orderDetail?id=" + res.data.id
});
} else if (res.code == 500) {
this.orderPay = res.data
this.payOrder()
} else if (res.code == 600) {
uni.showToast({
title: res.data,
title: res.msg,
icon: 'none',
duration: 2000
})
} else {}
} else {
uni.showToast({
title: "网络拥挤,请稍后重试",
icon: 'none',
duration: 2000
})
}
});
}).catch(err => {
console.log('表单错误信息:', err);
})
}
},
payOrder(val) {
console.log("订单==========", val)
this.isPayPopup = true
},
//
payResult(data) {
if (data.payStatus == 1) {
uni.showToast({
title: '支付成功',
icon: 'none'
});
this.isPayPopup = false
setTimeout(() => {
uni.navigateTo({
url: "/subPageC/orderHomestay/orderList"
});
}, 1000)
} else {
uni.showToast({
title: '支付失败',
icon: 'none'
});
setTimeout(() => {
uni.navigateTo({
url: "/subPageC/orderHomestay/orderList"
});
}, 1000)
}
//uni.showToast({title: data.detail.errMsg,icon:'none'});
},
closePay() {
let that = this
uni.showModal({
title: '提示',
content: '确定取消支付?',
cancelText: '再想想',
showCancel: true,
success: function(res) {
if (res.confirm) {
that.isPayPopup = false
setTimeout(() => {
uni.redirectTo({
url: "/subPageC/orderHomestay/orderList"
});
}, 500)
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
}
}
}
</script>

@ -4,12 +4,15 @@
<view class="v-order-title">取消原因<text class="text">*</text></view>
<view class="v-order-tip">请告知取消原因我们将努力改善服务</view>
<view class="v-order-cancel-list">
<view class="list_item row" v-for="(item,index) in cancelList" :key="index">
<view class="label col">{{item.label}}</view>
<view>
<radio :value="item.value" :checked="item.value === current" />
</view>
</view>
<radio-group @change="radioChange">
<label class="list_item row" v-for="(item, index) in cancelList" :key="item.value">
<view class="label col">{{item.label}}</view>
<view>
<radio color="#0983ff" :value="item.value" :checked="item.value === current" />
</view>
</label>
</radio-group>
</view>
</view>
<view class="v-cancel-bottom">
@ -28,7 +31,7 @@
}
},
onLoad(options) {
this.orderId = options.orderId
this.orderId = options.id
this.getInitPage()
},
@ -40,31 +43,40 @@
});
},
radioChange: function(evt) {
for (let i = 0; i < this.cancelList.length; i++) {
if (this.cancelList[i].value === evt.detail.value) {
this.current = evt.detail.value;
break;
}
}
},
submit() {
const userInfo = uni.getStorageSync("userInfo");
let parame = {
id: this.orderId,
openid: userInfo.openid,
cancelType: this.current,
}
this.$Request.get(this.$config.userCancelUpdateOrder, parame, 'json', null, false, null).then((res) => {
if(res.code=="200"){
}
this.$Request.get(this.$config.userCancelUpdateOrder, parame, null, null, false, null).then((res) => {
if (res.code == "0") {
uni.showToast({
title: '订单取消成功',
icon: 'none'
});
});
setTimeout(() => {
uni.navigateTo({
url: "/subPageC/orderHomestay/orderList"
});
}, 1000)
}else{
} else {
uni.showToast({
title: '订单取消失败,请稍后重试',
icon: 'none'
});
});
}
}).catch(() => {
});
@ -99,7 +111,10 @@
.list_item {
margin: 30rpx 0;
.label{font-size: 28rpx;}
.label {
font-size: 28rpx;
}
}
}

@ -11,7 +11,8 @@
</view>
<view class="tip">
<view v-if="homestayOrderData.orderStatus == '2'||homestayOrderData.orderStatus == '3'">
{{homestayOrderData.cancelReason}}</view>
{{homestayOrderData.cancelReason}}
</view>
<view v-else>{{promptText(homestayOrderData.orderStatus)}}</view>
</view>
@ -128,12 +129,11 @@
</view>
</view>
</view>
<u-popup :show="isPayPopup" mode="bottom" @close="isPayPopup = false" round="10">
<u-popup :show="isPayPopup" mode="bottom" @close="closePay" round="10">
<f-pay :show-title="false" :show="isPayPopup" :order="homestayOrderData"
:payMoney="homestayOrderData.orderAmount" :tradeNo="homestayOrderData.orderNumber"
@payResult="payResult"></f-pay>
</u-popup>
</view>
</template>
@ -142,7 +142,6 @@
import uPopup from "../components/uview-ui/components/u-popup/u-popup.vue";
export default {
components: {
fPay,
uPopup
@ -222,16 +221,43 @@
},
//
navigation() {
console.log("this.homestayOrderData",this.homestayOrderData)
uni.openLocation({
latitude: Number(this.homestayOrderData.lat),
longitude: Number(this.homestayOrderData.lon),
longitude: Number(this.homestayOrderData.lng),
name: this.homestayOrderData.hotelName,
address: this.homestayOrderData.addressInfo,
complete: function(result) {
console.log(result);
},
});
// #ifdef H5
if (this.$wechat.isWechat()) {
var mapParam = {
latitude: this.homestayOrderData.lat,
longitude: this.homestayOrderData.lng,
scale: 18,
name: this.homestayOrderData.hotelName,
address: this.homestayOrderData.addressInfo,
};
this.$util.openLocation(mapParam);
return;
}
window.location.href =
"https://uri.amap.com/navigation?from=" +
this.$param.clng +
"," +
this.$param.clat +
",我的位置&to=" +
this.homestayOrderData.lng +
"," +
this.homestayOrderData.lat +
"," +
this.homestayOrderData.addressInfo +
"&mode=walk&src=sjz_uniapp&callnative=1";
// #endif
},
//
promptText: function(val) {
// 0 1 2 3 4 5 6 7 退 8退
@ -240,7 +266,7 @@
return "酒店房间有限,请尽快支付,超时后订单将自动取消"
break;
case "1":
return "等待商家确认汇总,请及时关注订单状态"
return "等待商家确认,请及时关注订单状态"
break;
case "2":
return "订单超时未支付,请重新下单"
@ -277,6 +303,13 @@
url: "/subPageC/orderHomestay/cancelStep?orderId=" + orderId
});
},
payOrder(val) {
console.log("订单==========", val)
this.isPayPopup = true
},
//
payResult(data) {
if (data.payStatus == 1) {
@ -299,10 +332,21 @@
//uni.showToast({title: data.detail.errMsg,icon:'none'});
},
payOrder(val) {
console.log("订单==========", val)
this.isPayPopup = true
closePay() {
let that = this
uni.showModal({
title: '提示',
content: '确定取消支付?',
cancelText: '再想想',
showCancel: true,
success: function(res) {
if (res.confirm) {
that.isPayPopup = false
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
},
stateImg: function(val) {
@ -340,7 +384,7 @@
//
cacelOrder() {
uni.navigateTo({
url: "/subPageC/orderHomestay/orderCancel?orderId=" + this.homestayOrderData.orderNumber
url: "/subPageC/orderHomestay/orderCancel?id=" + this.homestayOrderData.id
});
},
stateMessage: function(val) {

@ -1,11 +1,12 @@
<template>
<view class="v-order-list">
<mescroll-uni :up="upOption" @down="downCallback" @up="upCallback" :fixed="false">
<view class="list_item container-fluid m-b-24" v-for="(item,index) in orderList">
<view class="list_item container-fluid m-b-24" v-for="(item,index) in orderList"
@click="toHomeStayDetailPage(item.id)">
<view class="item_title">{{item.hotelName}}</view>
<view class="row">
<view class="item_image">
<image class="img" height="50" :src="item.hotelLogo" width="50"></image>
<image class="img" :src="rootPath+item.hotelLogo" mode="widthFix"></image>
</view>
<view class="item_content col">
<view class="content-title">{{item.houseName}}</view>
@ -20,9 +21,8 @@
<view class="btn" v-if="item.orderStatus=='0'" @click="payOrder(item)">去支付</view>
<view class="btn" v-if="item.orderStatus !='0' && item.orderStatus !='1'"
@click="toHomeStayBookingPage(item.hotelId)">再次预定</view>
<view class="btn" v-if="item.orderStatus =='7' || item.orderStatus =='8'"
<view class="btn" v-if="item.refundDisplay =='1'"
@click="toRefundPage(item.id)">退款进度</view>
<view class="btn" @click="toHomeStayDetailPage(item.id)">详情</view>
</view>
</view>
</view>
@ -32,9 +32,8 @@
</view>
</mescroll-uni>
<u-popup :show="isPayPopup" mode="bottom" @close="isPayPopup = false" round="10">
<f-pay :show-title="false" :show="isPayPopup" :order="orderInfo"
:payMoney="orderInfo.orderAmount" :tradeNo="orderInfo.orderNumber"
@payResult="payResult"></f-pay>
<f-pay :show-title="false" :show="isPayPopup" :order="orderInfo" :payMoney="orderInfo.orderAmount"
:tradeNo="orderInfo.orderNumber" @payResult="payResult"></f-pay>
</u-popup>
</view>
@ -82,6 +81,11 @@
//TODO:
this.judgeLogin()
},
onUnload: function() {
uni.navigateTo({
url: '/pages/personcenter/personcenter'
});
},
methods: {
stateMessage: function(val) {
// 0 1 2 3 4 5 6 7 退 8退
@ -90,7 +94,7 @@
return "待支付"
break;
case "1":
return "已支付"
return "待确认"
break;
case "2":
return "已取消"
@ -182,7 +186,7 @@
});
},
//
payOrder(val) {
payOrder(val) {
this.orderInfo = val
console.log("订单==========", this.orderInfo)
this.isPayPopup = true
@ -278,10 +282,10 @@
}
&.type2 {
color: #07C060;
color: #666666;
padding: 8rpx 30rpx 8rpx 20rpx;
border-radius: 30rpx 0 0 30rpx;
background: linear-gradient(to right, rgba(7, 192, 96, .2), transparent);
background: linear-gradient(to right, rgba(102, 102, 102, .2), transparent);
}
&.type3 {

Loading…
Cancel
Save