This commit is contained in:
许允枞 2025-03-28 16:03:03 +08:00
parent f44c20c547
commit 0126be9038
3 changed files with 47 additions and 21 deletions

View File

@ -84,9 +84,9 @@
</view>
</scroll-view>
<submit @inputs="inputs" @heights="heights" :title="this.info.title"></submit>
<u-picker :show="langShow" ref="langPicker" :defaultIndex="langIndex" :columns="columns" @confirm="langConfirm"
<u-picker :show="langShow" ref="langPicker" cancelText="Cancel" confirmText="Confirm" :defaultIndex="langIndex" :columns="columns" @confirm="langConfirm"
@cancel="langCancel"></u-picker>
<u-picker :show="sayLangShow" ref="langPicker" :defaultIndex="sayLangIndex" keyName="label"
<u-picker :show="sayLangShow" ref="langPicker" cancelText="Cancel" confirmText="Confirm" :defaultIndex="sayLangIndex" keyName="label"
:columns="[sayLangColumns]"
@confirm="sayLangConfirm"
@cancel="sayLangCancel"></u-picker>

View File

@ -13,7 +13,9 @@
@focus="focus" v-model="msg" placeholder="Please enter content"></textarea>
<view class="record btn" :class="{displaynone:!isrecord}" @touchstart="touchstart" @touchend="touchend"
@touchmove="touchmove">
按住说话
<span style="font-size: 30rpx">
Please press and hold to speak
</span>
</view>
<!-- <view class="bt-img" @tap="emoji">
<image src="/static/logo.png"></image>
@ -37,11 +39,11 @@
<view class="more" :class="{displaynone:!ismore}">
<view class="more-list" @tap="sendImg('album')">
<image src="/static/chat/pictures.png"></image>
<view class="more-list-title">图片</view>
<view class="more-list-title">Photos</view>
</view>
<view class="more-list" @tap="sendImg('camera')">
<image src="/static/chat/takepictures.png"></image>
<view class="more-list-title">拍照</view>
<view class="more-list-title">Take Photo</view>
</view>
</view>

View File

@ -428,21 +428,44 @@
},
methods: {
//判断使用什么打车
async getDcType() {
console.log(430);
let _this = this
let res = await request({
url: 'takeTaxi/getDcType',
method: 'post',
data: {
latitude: _this.staInfo.location.split(',')[1],
longitude: _this.staInfo.location.split(',')[0],
}
})
console.log("判断使用什么打车", res);
_this.dcType = res.data
},
newCallCar(){
async getDcType() {
console.log(430);
console.log('此时的 staInfo.location:', this.staInfo.location);
try {
let latitude, longitude;
if (Array.isArray(this.staInfo.location)) {
// 如果 location 是数组,转为字符串格式 "longitude,latitude"
[longitude, latitude] = this.staInfo.location;
this.staInfo.location = `${longitude},${latitude}`; // 更新为字符串格式
} else if (typeof this.staInfo.location === 'string') {
// 如果 location 已经是字符串,直接使用
[longitude, latitude] = this.staInfo.location.split(',');
} else {
throw new Error(`staInfo.location 类型未知: ${this.staInfo.location}`);
}
// console.log(`解析后的经度: ${longitude}, 解析后的纬度: ${latitude}`);
// console.log(`修正后的 location: ${this.staInfo.location}`);
let res = await request({
url: 'takeTaxi/getDcType',
method: 'post',
data: { latitude, longitude }
});
// console.log('请求成功:', res);
// console.log("判断使用什么打车", res);
this.dcType = res.data;
} catch (error) {
console.error('请求失败:', error);
}
}
,
newCallCar(){
console.log('叫车')
this.staInfo = {}
this.endInfo.name = this.detailInfo.name
@ -491,7 +514,7 @@
},
//1 获取附近空车
async ifNearCard() {
console.log(491);
console.log(491,'开始轿车');
this.bindex= 1
if (!this.endInfo.location) {
uni.showToast({
@ -567,6 +590,7 @@
},
//2 预估费用 data为模拟数据
getOrderEstimate() {
console.log(551,'第一步')
uni.showLoading({
title: 'Loading...'
});