This commit is contained in:
kbing1981 2024-07-16 16:10:46 +08:00
commit ac5fa0d82c
12 changed files with 288 additions and 337 deletions

View File

@ -2139,41 +2139,49 @@
} }
}); });
}, },
// cancelOrders(data){//
cancelOrder(e) {
let contentName = '';
let closeKC = this.$queue.getData('closeKC');
if (e.status == 7 || e.status == 8 && closeKC) {
let money = parseFloat(parseFloat(e.price) * parseFloat(closeKC)).toFixed(2);
contentName = '取消订单将扣除' + money + '元的手续费,并且车费将全部扣除!';
}
let that = this let that = this
uni.showModal({ that.$Request.post('/app/artificer/deleteOrders', data).then(res => {
title: '温馨提示', uni.hideLoading();
content: '是否确认取消订单?' + contentName, if (res.code == 0) {
success: function(res) { that.page = 1;
if (res.confirm) { uni.showToast({
let data = { title:'操作成功!'
ordersId: e.ordersId })
} that.getOrder()
that.$queue.showLoading('提交中...') } else {
that.$Request.post('/app/artificer/deleteOrders', data).then(res => { that.$queue.showToast(res.msg);
uni.hideLoading();
if (res.code == 0) {
uni.showToast({
title:'操作成功!'
})
that.getOrder();
} else {
that.$queue.showToast(res.msg);
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
} }
}); })
},
//
cancelOrder(e) {
let that = this
let data = {
ordersId: e.ordersId
}
//
that.$Request.post('/app/artificer/cancelOrdersMoney', data).then(resa => {
uni.hideLoading();
if (resa.code == 0) {
that.page = 1;
uni.showModal({
title: '温馨提示',
content: '是否确认取消订单?' + resa.data,
success: function(res) {
if (res.confirm) {
that.cancelOrders(data)
that.$queue.showLoading('取消中...')
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
} else {
that.$queue.showToast(res.msg);
}
})
}, },
// //
cancel(e) { cancel(e) {
@ -2190,6 +2198,10 @@
that.$Request.post('/app/artificer/accomplishOrders', data).then(res => { that.$Request.post('/app/artificer/accomplishOrders', data).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.code == 0) { if (res.code == 0) {
uni.showToast({
title:'操作成功!'
})
that.getOrder()
uni.navigateBack() uni.navigateBack()
} else { } else {
that.$queue.showToast(res.msg); that.$queue.showToast(res.msg);

View File

@ -1691,37 +1691,49 @@
} }
}); });
}, },
// cancelOrders(data){//
cancelOrder(e) {
let contentName = '';
let closeKC = this.$queue.getData('closeKC');
if (e.status == 7 || e.status == 8 && closeKC) {
let money = parseFloat(parseFloat(e.price) * parseFloat(closeKC)).toFixed(2);
contentName = '取消订单将扣除' + money + '元的手续费,并且车费将全部扣除!';
}
let that = this let that = this
uni.showModal({ that.$Request.post('/app/artificer/deleteOrders', data).then(res => {
title: '温馨提示', uni.hideLoading();
content: '是否确认取消订单?' + contentName, if (res.code == 0) {
success: function(res) { that.page = 1;
if (res.confirm) { uni.showToast({
let data = { title:'操作成功!'
ordersId: e.ordersId })
} that.getOrder()
that.$queue.showLoading('提交中...') } else {
that.$Request.post('/app/artificer/deleteOrders', data).then(res => { that.$queue.showToast(res.msg);
uni.hideLoading();
if (res.code == 0) {
that.getOrder()
} else {
that.$queue.showToast(res.msg);
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
} }
}); })
},
//
cancelOrder(e) {
let that = this
let data = {
ordersId: e.ordersId
}
//
that.$Request.post('/app/artificer/cancelOrdersMoney', data).then(resa => {
uni.hideLoading();
if (resa.code == 0) {
that.page = 1;
uni.showModal({
title: '温馨提示',
content: '是否确认取消订单?' + resa.data,
success: function(res) {
if (res.confirm) {
that.cancelOrders(data)
that.$queue.showLoading('取消中...')
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
} else {
that.$queue.showToast(res.msg);
}
})
}, },
// //
cancel(e) { cancel(e) {

View File

@ -23,9 +23,12 @@
<span></span> <span></span>
<span>{{orderXm.price}}</span> <span>{{orderXm.price}}</span>
</view> </view>
<view> <view v-if="orderXm.qyType!='1'">
<uni-number-box :width='27' :min="1" @change="changeValue" /> <uni-number-box :width='27' :min="1" @change="changeValue" />
</view> </view>
<view v-else>
<uni-number-box :width='27' v-model="orderXm.qyMinNum" :min="qyMinNum" @change="changeValue" />
</view>
</view> </view>
</view> </view>
</view> </view>
@ -296,6 +299,7 @@
couponDataList:'', couponDataList:'',
orderXm:[], orderXm:[],
number:1, number:1,
qyMinNum:''
} }
}, },
onLoad(e) { onLoad(e) {
@ -326,7 +330,10 @@
this.ordersId = this.$queue.getData('ordersId'); this.ordersId = this.$queue.getData('ordersId');
this.userPackageDetailId = this.$queue.getData('userPackageDetailId'); this.userPackageDetailId = this.$queue.getData('userPackageDetailId');
this.youhui() this.youhui()
// this.getOrder() if(this.orderXm.qyType=='1'){
this.qyMinNum=this.orderXm.qyMinNum;
this.number=this.orderXm.qyMinNum;
}
}, },
onShow() { onShow() {
@ -1244,12 +1251,6 @@
}, },
// //
cancelOrder(e) { cancelOrder(e) {
let contentName = '';
let closeKC = this.$queue.getData('closeKC');
if (e.status == 7 || e.status == 8 && closeKC) {
let money = parseFloat(parseFloat(e.price) * parseFloat(closeKC)).toFixed(2);
contentName = '取消订单将扣除' + money + '元的手续费,并且车费将全部扣除!';
}
let that = this let that = this
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
@ -1263,7 +1264,9 @@
that.$Request.post('/app/artificer/deleteOrders', data).then(res => { that.$Request.post('/app/artificer/deleteOrders', data).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.code == 0) { if (res.code == 0) {
// that.getOrder() uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
that.$queue.showToast(res.msg); that.$queue.showToast(res.msg);
} }

View File

@ -1265,35 +1265,38 @@
} }
}); });
}, },
// cancelOrders(data){//
cancelOrder(e) {
let contentName = '';
let closeKC = this.$queue.getData('closeKC');
if (e.status == 7 || e.status == 8 && closeKC) {
let money = parseFloat(parseFloat(e.price) * parseFloat(closeKC)).toFixed(2);
contentName = '取消订单将扣除' + money + '元的手续费,并且车费将全部扣除!';
}
let that = this let that = this
that.$Request.post('/app/artificer/deleteOrders', data).then(res => {
uni.hideLoading();
if (res.code == 0) {
that.page = 1;
uni.showToast({
title:'操作成功!'
})
uni.switchTab({
url:'/pages/order/index'
})
that.getOrder()
} else {
that.$queue.showToast(res.msg);
}
})
},
//
cancelOrder(e) {
let that = this
let data = {
ordersId: e.ordersId
}
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
content: '是否确认取消订单?' + contentName, content: '是否确认取消订单?',
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
let data = { that.cancelOrders(data)
ordersId: e.ordersId that.$queue.showLoading('取消中...')
}
that.$queue.showLoading('提交中...')
that.$Request.post('/app/artificer/deleteOrders', data).then(res => {
uni.hideLoading();
if (res.code == 0) {
that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
} else {
that.$queue.showToast(res.msg);
}
})
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消'); console.log('用户点击取消');
} }

View File

@ -1980,40 +1980,49 @@
} }
}); });
}, },
// cancelOrders(data){//
cancelOrder(e) {
let contentName = '';
let closeKC = this.$queue.getData('closeKC');
if (e.status == 7 || e.status == 8 && closeKC) {
let money = parseFloat(parseFloat(e.price) * parseFloat(closeKC)).toFixed(2);
contentName = '取消订单将扣除' + money + '元的手续费,并且车费将全部扣除!';
}
let that = this let that = this
uni.showModal({ that.$Request.post('/app/artificer/deleteOrders', data).then(res => {
title: '温馨提示', uni.hideLoading();
content: '是否确认取消订单?' + contentName, if (res.code == 0) {
success: function(res) { that.page = 1;
if (res.confirm) { uni.showToast({
let data = { title:'操作成功!'
ordersId: e.ordersId })
} that.getOrder()
that.$queue.showLoading('提交中...') } else {
that.$Request.post('/app/artificer/deleteOrders', data).then(res => { that.$queue.showToast(res.msg);
uni.hideLoading();
if (res.code == 0) {
that.getOrder()
uni.showToast({
title:'操作成功!'
})
} else {
that.$queue.showToast(res.msg);
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
} }
}); })
},
//
cancelOrder(e) {
let that = this
let data = {
ordersId: e.ordersId
}
//
that.$Request.post('/app/artificer/cancelOrdersMoney', data).then(resa => {
uni.hideLoading();
if (resa.code == 0) {
that.page = 1;
uni.showModal({
title: '温馨提示',
content: '是否确认取消订单?' + resa.data,
success: function(res) {
if (res.confirm) {
that.cancelOrders(data)
that.$queue.showLoading('取消中...')
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
} else {
that.$queue.showToast(res.msg);
}
})
}, },
// //
cancel(e) { cancel(e) {

View File

@ -1263,38 +1263,38 @@
} }
}); });
}, },
// cancelOrders(data){//
let that = this
that.$Request.post('/app/artificer/deleteOrders', data).then(res => {
uni.hideLoading();
if (res.code == 0) {
that.getOrder()
uni.showToast({
title:'操作成功!'
})
uni.switchTab({
url:'/pages/order/index'
})
} else {
that.$queue.showToast(res.msg);
}
})
},
//
cancelOrder(e) { cancelOrder(e) {
let contentName = '';
let closeKC = this.$queue.getData('closeKC');
if (e.status == 7 || e.status == 8 && closeKC) {
let money = parseFloat(parseFloat(e.price) * parseFloat(closeKC)).toFixed(2);
contentName = '取消订单将扣除' + money + '元的手续费,并且车费将全部扣除!';
}
let that = this let that = this
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
content: '是否确认取消订单?' + contentName, content: '是否确认取消订单?',
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
let data = { let data = {
ordersId: e.ordersId ordersId: e.ordersId
} }
that.$queue.showLoading('提交中...') that.$queue.showLoading('提交中...')
that.$Request.post('/app/artificer/deleteOrders', data).then(res => { that.cancelOrders(data)
uni.hideLoading();
if (res.code == 0) {
that.getOrder()
uni.showToast({
title:'操作成功!'
})
uni.switchTab({
url:'/pages/order/index'
})
} else {
that.$queue.showToast(res.msg);
}
})
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消'); console.log('用户点击取消');
} }

View File

@ -1394,16 +1394,10 @@
}, },
// //
cancelOrder(e) { cancelOrder(e) {
let contentName = '';
let closeKC = this.$queue.getData('closeKC');
if (e.status == 7 || e.status == 8 && closeKC) {
let money = parseFloat(parseFloat(e.price) * parseFloat(closeKC)).toFixed(2);
contentName = '取消订单将扣除' + money + '元的手续费,并且车费将全部扣除!';
}
let that = this let that = this
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
content: '是否确认取消订单?' + contentName, content: '是否确认取消订单?',
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
let data = { let data = {

View File

@ -76,12 +76,16 @@
</view> </view>
<view class="flex tabber padding-top-sm padding-bottom-sm align-center"> <view class="flex tabber padding-top-sm padding-bottom-sm align-center">
<!-- <u-button @click="cancelOrder(order)" shape="circle" :custom-style="customStyle" :hair-line="false"
>
取消订单
</u-button> -->
<u-button @click="openpay(order)" shape="circle" :custom-style="customStyle2" :hair-line="false" <u-button @click="openpay(order)" shape="circle" :custom-style="customStyle2" :hair-line="false"
class="dingshi">立即支付 class="dingshi">立即支付
</u-button> </u-button>
<u-button :custom-style="customStyle2" shape="circle" :plain="true" @click="goChat" <u-button :custom-style="customStyle2" shape="circle" :plain="true" @click="goChat"
class="dingshi">联系客服</u-button> class="dingshi">联系客服</u-button>
</view> </view>
</view> </view>
@ -938,16 +942,13 @@
}, },
// //
cancelOrder(e) { cancelOrder(e) {
let contentName = '';
let closeKC = this.$queue.getData('closeKC');
if (e.status == 7 || e.status == 8 && closeKC) {
let money = parseFloat(parseFloat(e.price) * parseFloat(closeKC)).toFixed(2);
contentName = '取消订单将扣除' + money + '元的手续费,并且车费将全部扣除!';
}
let that = this let that = this
let data = {
ordersId: e.ordersId
}
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
content: '是否确认取消订单?' + contentName, content: '是否确认取消订单?',
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
let data = { let data = {

View File

@ -42,17 +42,6 @@
} }
} }
}, },
{
"path": "pages/index/searchAddress",
"style": {
"navigationBarTitleText": "搜索地址",
"enablePullDownRefresh": true,
"navigationStyle": "custom",
"app-plus": {
"titleNView": false
}
}
},
{ {
"path": "pages/videoCircle/index", "path": "pages/videoCircle/index",
"style": { "style": {

View File

@ -427,8 +427,6 @@
} }
} }
}) })
// 116.481488,39.990464
// 125.424295,43.878294
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
geocode: true, //true geocode: true, //true
@ -447,27 +445,28 @@
// that.getorderlist('') // that.getorderlist('')
that.getKTCityList(); that.getKTCityList();
// #endif // #endif
var dizhi={ that.selectCity(that.longitude,that.latitude)
key:'4f23770b6e53b96e7d0661a7ccfb9c21', // var dizhi={
location:that.longitude+','+res.latitude, // key:'4f23770b6e53b96e7d0661a7ccfb9c21',
radius:'1000', // location:that.longitude+','+res.latitude,
extensions:'all', // radius:'1000',
output:'JSON' // extensions:'all',
} // output:'JSON'
uni.request({ // }
url: 'https://restapi.amap.com/v3/geocode/regeo', // uni.request({
data:dizhi, // url: 'https://restapi.amap.com/v3/geocode/regeo',
method:'GET', // data:dizhi,
success(rea) { // method:'GET',
console.log("获取城市名称成功", rea) // success(rea) {
if (rea.statusCode ==200) { // console.log("", rea)
that.city = rea.data.regeocode.addressComponent.township; // if (rea.statusCode ==200) {
// uni.setStorageSync('citySou',rea.data.regeocode.addressComponent.city) // that.city = rea.data.regeocode.addressComponent.township;
} else { // // uni.setStorageSync('citySou',rea.data.regeocode.addressComponent.city)
console.log("获取信息失败,请重试!") // } else {
} // console.log("")
} // }
}); // }
// });
// #ifdef H5 // #ifdef H5
// that.city = that.latitude+','+that.longitude // that.city = that.latitude+','+that.longitude
@ -530,39 +529,34 @@
}) })
} }
that.token = uni.getStorageSync('token'); that.token = uni.getStorageSync('token');
// that.getKTCityList();
// if (uni.getStorageSync('token')) {
// console.log(22)
// if (that.latitude && that.longitude) {
// that.page = 1
// that.getHomeArtificerList()
// } else {
// console.log(33)
// uni.getLocation({
// type: 'wgs84',
// // highAccuracyExpireTime: 500,
// geocode: true, //true
// success: function(res) {
// console.log(44)
// console.log( '------>',res)
// that.latitude = res.latitude
// that.longitude = res.longitude
// that.page = 1
// that.getHomeArtificerList()
// },
// fail: function() {
// console.log(55)
// console.log('2')
// }
// })
// }
// }
}, },
methods: { methods: {
goCity(){ goCity(){
uni.navigateTo({ var that = this
url:'/pages/index/searchAddress' uni.chooseLocation({
}) success: function(res) {
console.log('位置名称:' + res.name);
console.log('详细地址:' + res.address);
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
that.detailaddress = res.name
that.latitude = res.latitude
that.longitude = res.longitude
that.selectCity(res.longitude, res.latitude)
}
});
},
selectCity(longitude, latitude) {
this.$Request.get('/app/Login/selectCity?lat=' + latitude + '&lng=' + longitude).then(res => {
if (res.code == 0) {
this.city = res.data.address ? res.data.address : '未知'
// uni.setStorageSync('city', res.data.province)
this.page = 1
// this.getorderlist('')
this.getKTCityList();
}
});
}, },
searchBtn(){// searchBtn(){//
uni.navigateTo({ uni.navigateTo({
@ -747,17 +741,7 @@
} }
}); });
}, },
selectCity(longitude, latitude) {
this.$Request.get('/app/Login/selectCity?lat=' + latitude + '&lng=' + longitude).then(res => {
if (res.code == 0) {
this.city = res.data.city ? res.data.city : '未知'
uni.setStorageSync('city', res.data.city)
this.page = 1
this.getorderlist('')
this.getKTCityList();
}
});
},
chaoji(){// chaoji(){//
uni.navigateTo({ uni.navigateTo({
url:'/my/wallet/index' url:'/my/wallet/index'

View File

@ -1,65 +0,0 @@
<template>
<view>
<input type="text" v-model="keywords"/>
<view @click="inpuCity">搜索</view>
</view>
</template>
<script>
export default{
data(){
return{
keywords:''
}
},
onLoad() {
var that=this;
},
methods:{
inpuCity(){
var that=this;
that.$nextTick(() =>{
that.getCity()
},100)
},
getCity(e){
// this.keywords=e.detail.value;
var that=this;
const value = uni.getStorageSync('citySou');
var dizhi={
// a90dccd8b55793bb939c38c7a4be3e15
key:'4f23770b6e53b96e7d0661a7ccfb9c21',
keywords:that.keywords,
city:'城市中文'+'|'+'citycode'+'|'+'中文全拼'+'|'+'adcode',
citylimit:true,
datatype:'all',
location:'125.424295,43.878294',
output:'JSON',
// type:'010000'+'|'+'020000'+'|'+'030000'+'|'+'040000'+'|'+'050000'+'|'+'060000'
// +'|'+'070000'+'|'+'080000'+'|'+'090000'+'|'+'100000'+'|'+'110000'+'|'+'120000'
// +'|'+'130000'+'|'+'140000'+'|'+'150000'+'|'+'160000'+'|'+'170000'+'|'+'180000'
// +'|'+'190000'+'|'+'200000'+'|'+'220000'+'|'+'970000'+'|'+'990000'+'|'+'991000'+'|'+'991001'
// +'|'+'991400'+'|'+'991401'+'|'+'991500'+'|'+'991600'+'|'+'991601'
// ,
// type:'010000|020000|030000|040000|050000|060000|080000|090000|100000|110000|120000|130000|140000|150000|160000|170000|180000|190000|200000',
}
uni.request({
url: 'https://restapi.amap.com/v3/assistant/inputtips',
data:dizhi,
method:'GET',
success(res) {
if (res.statusCode ==200) {
// that.city = res.data.regeocode.formatted_address
} else {
console.log("获取信息失败,请重试!")
}
}
});
}
}
}
</script>
<style>
</style>

View File

@ -704,41 +704,50 @@
this.page = 1 this.page = 1
this.getOrderList() this.getOrderList()
}, },
// cancelOrders(data){//
cancelOrder(e) {
let contentName = '';
let closeKC = this.$queue.getData('closeKC');
if (e.status == 7 || e.status == 8 && closeKC) {
let money = parseFloat(parseFloat(e.price) * parseFloat(closeKC)).toFixed(2);
contentName = '取消订单将扣除' + money + '元的手续费,并且车费将全部扣除!';
}
let that = this let that = this
uni.showModal({ that.$Request.post('/app/artificer/deleteOrders', data).then(res => {
title: '温馨提示', uni.hideLoading();
content: '是否确认取消订单?' + contentName, if (res.code == 0) {
success: function(res) { that.page = 1;
if (res.confirm) { uni.showToast({
let data = { title:'操作成功!'
ordersId: e.ordersId })
} that.getOrderList()
that.$queue.showLoading('取消中...') } else {
that.$Request.post('/app/artificer/deleteOrders', data).then(res => { that.$queue.showToast(res.msg);
uni.hideLoading();
if (res.code == 0) {
that.page = 1;
uni.showToast({
title:'操作成功!'
})
that.getOrderList()
} else {
that.$queue.showToast(res.msg);
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
} }
}); })
},
//
cancelOrder(e) {
let that = this
let data = {
ordersId: e.ordersId
}
//
that.$Request.post('/app/artificer/cancelOrdersMoney', data).then(resa => {
uni.hideLoading();
if (resa.code == 0) {
that.page = 1;
uni.showModal({
title: '温馨提示',
content: '是否确认取消订单?' + resa.data,
success: function(res) {
if (res.confirm) {
that.cancelOrders(data)
that.$queue.showLoading('取消中...')
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
} else {
that.$queue.showToast(res.msg);
}
})
}, },
/*下拉刷新的回调 */ /*下拉刷新的回调 */
downCallback() { downCallback() {