Commit 99a52289 authored by 罗超's avatar 罗超

修改联运,和部分BUG

parent 9522d699
...@@ -574,6 +574,15 @@ ...@@ -574,6 +574,15 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
,{
"path" : "modify_password",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
] ]
}, },
......
...@@ -328,8 +328,8 @@ export default { ...@@ -328,8 +328,8 @@ export default {
if (x.startDate == `${year}-${m}-${d}`) { if (x.startDate == `${year}-${m}-${d}`) {
isexsit = true; isexsit = true;
if (x.remainNum > 0) { if (x.remainNum > 0) {
// days.push(this.$utils.getretailer() ? x.b2BPrice : x.b2CPrice); days.push(this.$utils.getretailer() ? x.b2BPrice : x.b2CPrice);
days.push(x.b2CPrice); //days.push(x.b2CPrice);
} else { } else {
days.push(-1); days.push(-1);
} }
......
...@@ -421,7 +421,7 @@ ...@@ -421,7 +421,7 @@
<template v-else> <template v-else>
<view style="height: calc(100vh - 120px);overflow: hidden;"> <view style="height: calc(100vh - 120px);overflow: hidden;">
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower" :style="{ height: '100%' }"> <scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower" :style="{ height: '100%' }">
<view class="jz_ListMain" v-for="(item,index) in dataList" :key="index" @click="goJzDetail(item.tcid,item.configId)"> <view class="jz_ListMain" v-for="(item,index) in dataList" :key="index" @click="goJzDetail(item)">
<view class="jz_List"> <view class="jz_List">
<view class="jz_TuDiv"> <view class="jz_TuDiv">
<img class="jz_TuBigImg" mode="aspectFill" :src="getImgs(item.imgCover)" alt="" v-if="item.imgCover && item.imgCover.length>0 && getImgs(item.imgCover)!=''" /> <img class="jz_TuBigImg" mode="aspectFill" :src="getImgs(item.imgCover)" alt="" v-if="item.imgCover && item.imgCover.length>0 && getImgs(item.imgCover)!=''" />
...@@ -436,6 +436,9 @@ ...@@ -436,6 +436,9 @@
<view class="start-city" style="margin-right: 20rpx;" v-if="item.startCityName"> <view class="start-city" style="margin-right: 20rpx;" v-if="item.startCityName">
<text>{{item.startCityName}}出发</text> <text>{{item.startCityName}}出发</text>
</view> </view>
<view style="margin-right: 20rpx;" v-if="item.companyUnions && item.companyUnions.length>1">
<u-tag border-color="#DFBE6E" color="#FFF" bg-color="#DFBE6E" text="多个出发城市" size="mini"></u-tag>
</view>
<view> <view>
<u-tag mode="plain" border-color="#DFBE6E" color="#DFBE6E" :text="`${item.dayNum}天`" size="mini"></u-tag> <u-tag mode="plain" border-color="#DFBE6E" color="#DFBE6E" :text="`${item.dayNum}天`" size="mini"></u-tag>
</view> </view>
...@@ -486,7 +489,7 @@ ...@@ -486,7 +489,7 @@
startDate: '', startDate: '',
endDate: '', endDate: '',
startCityId: -1, startCityId: -1,
companyId: -1, companyId: 0,
searchKey: '', //搜索数据 searchKey: '', //搜索数据
priceOrderByField:2, priceOrderByField:2,
PlaceIds: '', PlaceIds: '',
...@@ -579,12 +582,10 @@ ...@@ -579,12 +582,10 @@
}; };
}, },
created() { created() {
this.getLineQuery();
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "精品旅游线路" title: "精品旅游线路"
}) })
}, },
onLoad(option) { onLoad(option) {
if(option&&option.LineTeamIds){ if(option&&option.LineTeamIds){
...@@ -602,7 +603,8 @@ ...@@ -602,7 +603,8 @@
if(option&&option.PlaceIds){ if(option&&option.PlaceIds){
this.msg.PlaceIds = option.PlaceIds this.msg.PlaceIds = option.PlaceIds
} }
this.research(); this.getLineQuery();
}, },
methods: { methods: {
allTeamsChangeHandler(e){ allTeamsChangeHandler(e){
...@@ -619,6 +621,7 @@ ...@@ -619,6 +621,7 @@
}, },
//获取查询条件 //获取查询条件
getLineQuery() { getLineQuery() {
let customerInfo = uni.getStorageSync("b2b_user")
this.apipost( this.apipost(
"b2b_get_GetMiniAppTravelQuery", {}, "b2b_get_GetMiniAppTravelQuery", {},
res => { res => {
...@@ -642,6 +645,14 @@ ...@@ -642,6 +645,14 @@
}else{ }else{
this.currentLineId = this.lineList[0] this.currentLineId = this.lineList[0]
} }
if(customerInfo && customerInfo.salesBaseInfo){
let tempCompany = this.branchList.find(x=>x.BId == customerInfo.salesBaseInfo.rB_Branch_id)
console.log(tempCompany)
if(tempCompany && tempCompany.BId){
this.msg.companyId=tempCompany.BId
this.currentBrachName = tempCompany.BName
}
}
//let temp = '' //let temp = ''
// if(this.msg.team.length>0){ // if(this.msg.team.length>0){
// if(this.lineList.length>0){ // if(this.lineList.length>0){
...@@ -656,6 +667,7 @@ ...@@ -656,6 +667,7 @@
// } // }
// } // }
} }
this.research();
}, },
null null
); );
...@@ -830,7 +842,8 @@ ...@@ -830,7 +842,8 @@
this.msg, this.msg,
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.dataList = this.dataList.concat(res.data.pageData); let format = this.getFormatUnionStartCityHandler(res.data.pageData)
this.dataList = this.dataList.concat(format);
this.page_count = res.data.pageCount; this.page_count = res.data.pageCount;
} }
this.loading=false this.loading=false
...@@ -841,6 +854,30 @@ ...@@ -841,6 +854,30 @@
} }
); );
}, },
getFormatUnionStartCityHandler(data){
data.forEach(x=>{
if(x.unionList && x.unionList.length>0){
let companyUnions = x.unionList.filter(y=>y.unionBranchId==this.msg.companyId)
if(companyUnions && companyUnions.length>0){
if(companyUnions[0].unionCityId>0){
x.startCityId = companyUnions[0].unionCityId
x.startCityName = companyUnions[0].startCityName
}else{
let tempCity = this.branchList.find(y=>y.BId==this.msg.companyId)
if(tempCity && tempCity.CityId){
x.startCityId = tempCity.CityId
x.startCityName = tempCity.BName.replace('站','')
}
}
// x.b2BPrice = x.b2BPrice + companyUnions[0].goAddPrice + companyUnions[0].backAddPrice
// x.b2CPrice = x.b2CPrice + companyUnions[0].goAddPrice + companyUnions[0].backAddPrice
x.companyUnions = companyUnions
}
}
})
return data
},
//获取日期 //获取日期
getStratDate(val) { getStratDate(val) {
console.log(val, 'val'); console.log(val, 'val');
...@@ -855,9 +892,9 @@ ...@@ -855,9 +892,9 @@
} }
}, },
//跳转至详情 //跳转至详情
goJzDetail(tcid, configId) { goJzDetail(item) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/jiuzhai/jz_LineDetail?tcid=" + tcid + '&configId=' + configId + '&cityId=' + this.CityId url: "/pages/jiuzhai/jz_LineDetail?tcid=" + item.tcid + '&configId=' + item.configId + '&cityId=' + (item.startCityId?item.startCityId:this.CityId)
}); });
}, },
//获取第一张图 //获取第一张图
......
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
<text style="color: #999999; font-size: 28rpx; font-weight: 400"> <text style="color: #999999; font-size: 28rpx; font-weight: 400">
/人起</text /人起</text
> >
<text <!-- <text
style=" style="
color: #999999; color: #999999;
font-size: 28rpx; font-size: 28rpx;
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
margin-left: 30rpx; margin-left: 30rpx;
" "
>2728人出游</text >2728人出游</text
> > -->
</view> </view>
<!-- <view class="jz_OrderNow" @click="downloadFile">下载</view> <!-- <view class="jz_OrderNow" @click="downloadFile">下载</view>
<view class="jz_OrderNow" @click="downloadFile2">下载2</view> --> <view class="jz_OrderNow" @click="downloadFile2">下载2</view> -->
...@@ -186,7 +186,8 @@ ...@@ -186,7 +186,8 @@
</view> </view>
</view> 罗超注释 2023-09-20 --> </view> 罗超注释 2023-09-20 -->
<view class="jz_TripDays"> <view class="jz_TripDays">
<view style="margin-bottom: 40px"> <view style="display: flex; align-items: flex-start;">
<view style="margin-bottom: 40px;width:1px;flex:1;">
<span style="display: inline-block; position: relative"> <span style="display: inline-block; position: relative">
<text <text
style=" style="
...@@ -197,10 +198,9 @@ ...@@ -197,10 +198,9 @@
font-weight: bold; font-weight: bold;
" "
> >
<text v-if="dataList.startCityName">{{ <text v-if="dataList.startCityName || (dataList.currentPriceInfo.priceUnion && dataList.currentPriceInfo.priceUnion.startCityName)">{{
dataList.startCityName dataList.currentPriceInfo.priceUnion && dataList.currentPriceInfo.priceUnion.startCityName?dataList.currentPriceInfo.priceUnion.startCityName:dataList.startCityName
}}</text }}</text>出发
>出发
</text> </text>
<span <span
style=" style="
...@@ -216,6 +216,16 @@ ...@@ -216,6 +216,16 @@
></span> ></span>
</span> </span>
</view> </view>
<view @click="showStartCities=true" style="font-size: 12px;padding:5px;display: flex; align-items: center;" v-if="startCities && startCities.length>1">
<span style="width:4px;height: 4px;background-color: #ff3166;border-radius: 4px;display: inline-block;"></span>
<text style="margin:0 5px">选择其它出发城市</text>
<u-icon
name="arrow"
color="#000"
size="28"
></u-icon>
</view>
</view>
<view style="display: flex; overflow-x: auto"> <view style="display: flex; overflow-x: auto">
<template v-for="(item, pindex) in dataList.priceList"> <template v-for="(item, pindex) in dataList.priceList">
<view <view
...@@ -1117,7 +1127,7 @@ ...@@ -1117,7 +1127,7 @@
</view> </view>
<view style="display: flex; align-items: center"> <view style="display: flex; align-items: center">
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<button @click="downloadTripPlanHandler" class="jz_ConButton"> <button @click="downloadTripPlanHandler" class="jz_ConButton" v-if="d.length>3">
<img <img
style="width: 36rpx; height: 38rpx" style="width: 36rpx; height: 38rpx"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1695376860000_131.png" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1695376860000_131.png"
...@@ -1154,6 +1164,29 @@ ...@@ -1154,6 +1164,29 @@
@changeuserinfo="reloadUserinfo" @changeuserinfo="reloadUserinfo"
@gbAuth="gbAuth" @gbAuth="gbAuth"
></auth> ></auth>
<u-popup v-model="showStartCities"
mode="bottom"
border-radius="20"
length="60%"
:safe-area-inset-bottom="true">
<view style="display: flex;flex-direction: column;height:100%;width:100%;">
<view style="font-size: 24px; font-weight: 700;padding: 20px;font-family: city-font;">
出发城市
</view>
<scroll-view scroll-y="true" style="width: 100%;height: 1px; flex: 1;">
<view style="padding:20px">
<view @click="changeStartCity(x)" :style="{'background': delMsg.cityId==x.StartCityId?'#DFBE6E':''}" style="padding:20px;display: flex;align-items: center;margin-bottom: 20px;box-shadow: 0px 0px 20px 0px rgba(76,87,125,0.2); border-radius: 8px;" v-for="(x,i) in startCities">
<view style="font-size: 18px;font-family: city-font;width:1px;flex:1;">{{ x.StartCityName }}</view>
<view style="color: #ff3166;">
<text class="jz_renmin">¥</text>
<text class="jz_B2bPrice">{{ $utils.getretailer()?(currentPrice.originalB2BPrice+x.BackAddPrice+x.GoAddPrice):(currentPrice.originalB2CPrice+x.BackAddPrice+x.GoAddPrice) }}</text>
<text style="color: #999999; font-size: 28rpx; font-weight: 400">/人起</text>
</view>
</view>
</view>
</scroll-view>
</view>
</u-popup>
</view> </view>
</template> </template>
<script> <script>
...@@ -1173,6 +1206,7 @@ export default { ...@@ -1173,6 +1206,7 @@ export default {
pageTitle: "线路详情", pageTitle: "线路详情",
showDateChosen: false, showDateChosen: false,
showOrderPreviwe: false, showOrderPreviwe: false,
showStartCities:false,
crCount: 1, crCount: 1,
etCount: 0, etCount: 0,
yeCount: 0, yeCount: 0,
...@@ -1208,7 +1242,8 @@ export default { ...@@ -1208,7 +1242,8 @@ export default {
hideshare: false, hideshare: false,
topheight:0, topheight:0,
shareData:null, shareData:null,
isDownloading:false isDownloading:false,
startCities:[]
}; };
}, },
created() {}, created() {},
...@@ -1238,9 +1273,9 @@ export default { ...@@ -1238,9 +1273,9 @@ export default {
} }
this.getDetails(); this.getDetails();
this.U = uni.getStorageSync("mall_UserInfo"); this.U = uni.getStorageSync("mall_UserInfo");
if (this.U) { // if (this.U) {
this.getLXYProductSharf() // this.getLXYProductSharf()
} // }
let that = this; let that = this;
uni.getSystemInfo({ uni.getSystemInfo({
success(res) { success(res) {
...@@ -1255,108 +1290,52 @@ export default { ...@@ -1255,108 +1290,52 @@ export default {
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
}, },
methods: { methods: {
// downloadFile() { changeStartCity(item){
// let msg = { this.showStartCities=false
// configId: "7274", this.delMsg.cityId=item.StartCityId
// cityId: "0", this.getDetails();
// tcid: "11409", },
// orderId: "0",
// FileName: "2021-10-11飞猪平台九寨沟3天2晚3日游",
// isShowBase: 1,
// isShowFlight: 1,
// isShowFeature: 1,
// isShowFee: 1,
// isShowShop: 1,
// isShowTip: 1,
// isShowB2B: 1,
// isShowTrip: 1,
// isShowTitle: 0,
// isShowGuest: 0,
// isShowMan: 1,
// isShowTCNUM: 1,
// isShowTripImage: 1,
// isShowVisa: 1,
// isShowVideoImg: 1,
// isPc: 2,
// templateId: 3,
// UId: 615,
// };
// this.apipostDownload("GetWebHtmlTwo_V2", msg, (res) => {
// console.log(res);
// let url = "https://reborn.oytour.com" + res.data;
// uni.downloadFile({
// url: url,
// success: (res) => {
// if (res.statusCode === 200) {
// console.log("下载成功");
// }
// },
// });
// });
// },
// downloadFile2() {
// let url =
// "https://reborn.oytour.com/Upload/Temporary/C7274_T11409_CTY0_OD0_MMDD637695432017412893_1_1.pdf";
// uni.downloadFile({
// url: url,
// success: (res) => {
// console.log("suc", res);
// if (res.statusCode === 200) {
// console.log("下载成功");
// const tempFilePath = res.tempFilePath; //返回的文件临时地址,用于后面打开本地预览所用
// wx.openDocument({
// filePath: tempFilePath,
// showMenu: true,
// fileType: "pdf",
// success: function (res) {},
// });
// }
// },
// fail(err) {
// console.log("err", err);
// },
// });
// },
downloadTripPlanHandler(){ downloadTripPlanHandler(){
if(this.isDownloading) return; if(this.isDownloading) return;
let that = this
uni.showLoading({ uni.showLoading({
title:'这可能需要30秒,请耐心等待' title:'这可能需要30秒,请耐心等待'
}) })
this.isDownloading=true this.isDownloading=true
let url = `http://uploadfile.oytour.com/Home/PcToPdf2023New?configId=${this.delMsg.configId}&cityId=0&TCID=${this.delMsg.tcid}&orderId=0&isShowBase=1&isShowFlight=1&isShowFeature=1&isShowFee=1&isShowShop=1&isShowTip=1&isShowB2B=1&isShowTrip=1&isShowTitle=0&isShowGuest=0&isShowMan=1&isShowTCNUM=1&isShowVisa=1&isShowTripImage=1&templateId=3&isShowVideoImg=1&unionfid=0` let url = `http://uploadfile.oytour.com/Home/PcToPdf2023New?configId=${this.delMsg.configId}&cityId=0&TCID=${this.delMsg.tcid}&orderId=0&isShowBase=1&isShowFlight=1&isShowFeature=1&isShowFee=1&isShowShop=1&isShowTip=1&isShowB2B=1&isShowTrip=1&isShowTitle=0&isShowGuest=0&isShowMan=1&isShowTCNUM=1&isShowVisa=1&isShowTripImage=1&templateId=3&isShowVideoImg=1&unionfid=0`
url = `http://ocr.oytour.com/Home/DownloadFileForPdf?url=${encodeURIComponent(url)}` url = `https://ocr.oytour.com/Home/DownloadFileForPdf?url=${encodeURIComponent(url)}`
const filePath= wx.env.USER_DATA_PATH + `/${this.dataList.currentPriceInfo?.startDate+'_'}${this.dataList.ltName.replace(/\s+/g,"").replaceAll("/","")}.pdf`
uni.downloadFile({ uni.downloadFile({
url: url, url: url,
filePath,
success: (res) => { success: (res) => {
console.log("suc", res);
if (res.statusCode === 200) {
console.log("下载成功");
const tempFilePath = res.tempFilePath; //返回的文件临时地址,用于后面打开本地预览所用
wx.openDocument({ wx.openDocument({
filePath: tempFilePath, filePath:filePath,
showMenu: true, showMenu: true,
fileType: "pdf", success: fres => {
success: function (res) {},
});
}else{
uni.showToast({
title:'下载失败,请重试。如果仍然失败,请联系销售索要PDF行程'
})
}
uni.hideLoading() uni.hideLoading()
this.isDownloading=false that.isDownloading=false
},
fail: fres => {
console.log('打开失败', fres)
that.downloadFailed('打开失败,请重试。如果仍然失败,请联系销售索要PDF行程')
},
})
}, },
fail(err) { fail(err) {
console.log(err)
that.downloadFailed('下载失败,请重试。如果仍然失败,请联系销售索要PDF行程')
},
});
},
downloadFailed(msg){
uni.showToast({ uni.showToast({
title:'下载失败,请重试。如果仍然失败,请联系销售索要PDF行程' icon:'none',
title:msg
}) })
uni.hideLoading() uni.hideLoading()
this.isDownloading=false this.isDownloading=false
}, },
});
},
previewTravelPicHandler(url,urls){ previewTravelPicHandler(url,urls){
uni.previewImage({ uni.previewImage({
urls:urls, urls:urls,
...@@ -1365,7 +1344,7 @@ export default { ...@@ -1365,7 +1344,7 @@ export default {
}, },
reloadUserinfo() { reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
this.getLXYProductSharf() //this.getLXYProductSharf()
}, },
//关闭登录窗口 //关闭登录窗口
gbAuth() { gbAuth() {
...@@ -1446,32 +1425,41 @@ export default { ...@@ -1446,32 +1425,41 @@ export default {
: Math.floor(e.detail.scrollTop - 100) / 100; : Math.floor(e.detail.scrollTop - 100) / 100;
this.$forceUpdate(); this.$forceUpdate();
}, },
getLXYProductSharf(){//获取显示返佣金额 // getLXYProductSharf(){//获取显示返佣金额
this.request2( // this.request2(
{ // {
url: "/api/appletgoods/GetLXYProductSharfCommission", // url: "/api/appletgoods/GetLXYProductSharfCommission",
data:{TCID:this.delMsg.tcid}, // data:{TCID:this.delMsg.tcid},
}, // },
(res) => { // (res) => {
this.shareData = res.data; // this.shareData = res.data;
}, // },
(err) => { // (err) => {
// }
// );
// },
getStartCitiesHandler(){
this.apipost("b2b_get_GetCityListByTCID",{ tcid:this.delMsg.tcid },(res) => {
if (res.resultCode == 1) {
this.startCities = res.data
} }
); })
}, },
//获取详情 //获取详情
getDetails() { getDetails() {
uni.showLoading()
this.apipost( this.apipost(
"b2b_get_GetB2BTravelInfoNoDesV1", "b2b_get_GetB2BTravelInfoNoDesV1",
this.delMsg, this.delMsg,
(res) => { (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
try{ try{
this.getStartCitiesHandler()
res.data.tempImgCover = JSON.parse(res.data.imgCover); res.data.tempImgCover = JSON.parse(res.data.imgCover);
// let tempPrice= res.data.priceList.filter(x=>x.remainNum>0) // let tempPrice= res.data.priceList.filter(x=>x.remainNum>0)
// res.data.priceList=tempPrice // res.data.priceList=tempPrice
this.dataList = res.data; this.dataList = res.data;
try{ try{
this.formatDay() this.formatDay()
...@@ -1543,17 +1531,35 @@ export default { ...@@ -1543,17 +1531,35 @@ export default {
} }
// #endif // #endif
}catch(e){ }catch(e){
console.log(e)
//TODO handle the exception //TODO handle the exception
uni.showToast({ uni.showToast({
icon:"none", icon:"none",
title:'团队信息不完善,无法完成显示' title:'团队信息不完善,无法完成显示'
}) })
} }
uni.hideLoading()
} else { } else {
uni.hideLoading()
uni.showToast({
icon:'none',
title:'行程已下架,请查看其它行程'
})
setTimeout(()=>{
uni.redirectTo({
url:'/pages/index/index'
})
})
} }
}, },
null (err)=>{
uni.hideLoading()
setTimeout(()=>{
uni.redirectTo({
url:'/pages/index/index'
})
})
}
); );
}, },
formatDay() { formatDay() {
...@@ -1710,6 +1716,8 @@ export default { ...@@ -1710,6 +1716,8 @@ export default {
encodeURIComponent(JSON.stringify(ren)) + encodeURIComponent(JSON.stringify(ren)) +
"&tcid=" + "&tcid=" +
this.delMsg.tcid + this.delMsg.tcid +
"&cityId= " +
this.delMsg.cityId +
"&lineId=" + "&lineId=" +
this.dataList.lineId, this.dataList.lineId,
}); });
...@@ -1796,6 +1804,12 @@ export default { ...@@ -1796,6 +1804,12 @@ export default {
}; };
</script> </script>
<style> <style>
/* 上海成都武汉昆明重庆南宁西安北京厦门选择出发城市 */
@font-face {
font-family: "city-font";src: url("//at.alicdn.com/wf/webfont/MQHUV6e56ce5/pc81HtdOdtly.woff2") format("woff2"),
url("//at.alicdn.com/wf/webfont/MQHUV6e56ce5/cHntSgti5kmY.woff") format("woff");
font-display: swap;
}
.jz_FlightItem { .jz_FlightItem {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
...@@ -295,7 +295,7 @@ ...@@ -295,7 +295,7 @@
{{ ltName }} {{ ltName }}
</view> </view>
<view class="big-title"> <view class="big-title">
<text>{{ currentPriceInfo.startCityName }}出发</text> <text>{{ realCurrentPriceInfo.priceUnion && realCurrentPriceInfo.priceUnion.startCityName?realCurrentPriceInfo.priceUnion.startCityName:currentPriceInfo.startCityName }}出发</text>
</view> </view>
<view class="jz_ReseQue"> <view class="jz_ReseQue">
<img <img
...@@ -628,7 +628,8 @@ export default { ...@@ -628,7 +628,8 @@ export default {
currentCoupon:{ currentCoupon:{
discountMoney:0 discountMoney:0
}, },
mainColor:'' mainColor:'',
realCurrentPriceInfo:{}
}; };
}, },
created() { created() {
...@@ -651,7 +652,7 @@ export default { ...@@ -651,7 +652,7 @@ export default {
this.calcMoney(); this.calcMoney();
} }
if (option.tcid) { if (option.tcid) {
this.getDetails(option.tcid); this.getDetails(option.tcid,option.cityId);
} }
if(option.lineId){ if(option.lineId){
this.lineId=option.lineId this.lineId=option.lineId
...@@ -697,16 +698,17 @@ export default { ...@@ -697,16 +698,17 @@ export default {
} }
}, },
//获取详情 //获取详情
getDetails(id) { getDetails(id,cityId) {
uni.showLoading({ uni.showLoading({
title: '加载中' title: '加载中'
}); });
this.apipost( this.apipost(
"b2b_get_GetB2BTravelInfoNoDesV1", "b2b_get_GetB2BTravelInfoNoDesV1",
{ tcid: id }, { tcid: id,cityId },
(res) => { (res) => {
uni.hideLoading(); uni.hideLoading();
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.realCurrentPriceInfo = res.data.currentPriceInfo
this.tips = res.data.feature.importantTipText; this.tips = res.data.feature.importantTipText;
this.ltName = res.data.ltName; this.ltName = res.data.ltName;
this.currentPriceInfo.visaPrice = res.data.currentPriceInfo.visaPrice this.currentPriceInfo.visaPrice = res.data.currentPriceInfo.visaPrice
...@@ -861,7 +863,7 @@ export default { ...@@ -861,7 +863,7 @@ export default {
ContactName: ContactName, ContactName: ContactName,
ContactMobile: ContactMobile, ContactMobile: ContactMobile,
CustomerId: CustomerId, CustomerId: CustomerId,
DepartureCityId: 262, DepartureCityId: 0,
IsIntermodal: 2, IsIntermodal: 2,
Unit_Price: price, Unit_Price: price,
TC_Price: price, TC_Price: price,
...@@ -898,7 +900,7 @@ export default { ...@@ -898,7 +900,7 @@ export default {
VisaNum: this.orderMsg.ManNum + this.orderMsg.ChirdNum, VisaNum: this.orderMsg.ManNum + this.orderMsg.ChirdNum,
SafeNum: this.orderMsg.ManNum + this.orderMsg.ChirdNum, SafeNum: this.orderMsg.ManNum + this.orderMsg.ChirdNum,
AirticketNum: 0, AirticketNum: 0,
ReturnArriveCityId: 262, ReturnArriveCityId: 0,
IsReturnIntermodal: 2, IsReturnIntermodal: 2,
GoCityTime: "", GoCityTime: "",
BackCityTime: "", BackCityTime: "",
...@@ -915,6 +917,12 @@ export default { ...@@ -915,6 +917,12 @@ export default {
Remarks: this.Remarks, //备注 Remarks: this.Remarks, //备注
//GuestList: newobj, //GuestList: newobj,
}; };
if(this.realCurrentPriceInfo.priceUnion){
msg.DepartureCityId = this.realCurrentPriceInfo.priceUnion.unionCityId
msg.IsIntermodal = 1
msg.ReturnArriveCityId = this.realCurrentPriceInfo.priceUnion.unionCityId
msg.IsReturnIntermodal=1
}
this.apipost( this.apipost(
"sellorder_post_SetOrderInfoForB2B", "sellorder_post_SetOrderInfoForB2B",
msg, msg,
......
<template>
<view class="modify-page">
<!-- <view class="logo-head">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1695262844000_280.png" mode="widthFix"></image>
<view class="logo-text">旅小友</view>
</view> -->
<view class="modify-form">
<view class="modify-title">修改密码</view>
<view class="modify-item">
<input type="password" v-model="msg.currentPwd" placeholder="请输入你的当前密码" :class="{'focus':currentFocus=='account'}" @blur="changeCurrentFocus('')" @focus="changeCurrentFocus('account')">
</view>
<view class="modify-item">
<input type="password" v-model="msg.newPwd" placeholder="请输入你的新密码" :class="{'focus':currentFocus=='newPwd'}" @blur="changeCurrentFocus('')" @focus="changeCurrentFocus('newPwd')">
<view style="margin-top: 5px;font-size: 12px;color:#ccc">
提示:密码应是长度不小于8位的字母和数字组合
</view>
</view>
<view class="modify-item">
<input type="password" v-model="msg.secondPwd" placeholder="请再次输入你的新密码" :class="{'focus':currentFocus=='secondPwd'}" @blur="changeCurrentFocus('')" @focus="changeCurrentFocus('secondPwd')">
</view>
<view class="modify-item">
<view class="modify-btn" @click="modifyPasswordHandler" :class="{'disable':msg.currentPwd==''||msg.newPwd==''||msg.secondPwd==''}">保存修改</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
msg:{
currentPwd:'',
newPwd:'',
secondPwd:''
},
currentFocus:'',
modifyLoading:false
}
},
methods: {
changeCurrentFocus(val){
this.currentFocus=val
},
modifyPasswordHandler(){
if(this.msg.currentPwd==''||this.msg.newPwd==''||this.msg.secondPwd=='') return;
if(!this.modifyLoading){
let regNumber = /\d+/
let regString = /[a-zA-Z]+/
this.modifyLoading=true
if(this.msg.currentPwd==0){
this.showErrorMsg('请输入当前登录密码')
}else if(this.msg.newPwd.length<8){
this.showErrorMsg('密码的长度不应该低于8位')
}else if((!regNumber.test(this.msg.newPwd))||(!regString.test(this.msg.newPwd))){
this.showErrorMsg('新密码应该为字母和数字组合')
}else if(this.msg.newPwd!=this.msg.secondPwd){
this.showErrorMsg('两次输入的密码不一致')
}else{
uni.showLoading()
let params={
newPassword:this.msg.newPwd,
oldPassword:this.msg.currentPwd
}
this.apipost("b2b_post_ModifyAccountPassowrd",params,(res) => {
if (res.resultCode == 1) {
uni.showToast({
title:'密码修改成功',
icon:'none'
})
setTimeout(()=>{
uni.redirectTo({
url:'/pages/user-center/user-center'
})
},1000)
}
// else{
// this.showErrorMsg('密码修改失败,请重试或联系销售专员')
// }
uni.hideLoading()
this.modifyLoading=false
},(error)=>{
this.modifyLoading=false
uni.hideLoading()
})
}
}
},
showErrorMsg(msg){
uni.showToast({
title:msg,
icon:'error'
})
this.modifyLoading=false
}
}
}
</script>
<style>
/* 修改密码保存。 */
@font-face {
font-family: "modify-font";src: url("//at.alicdn.com/wf/webfont/MQHUV6e56ce5/T24Rhfe1qmDx.woff2") format("woff2"),
url("//at.alicdn.com/wf/webfont/MQHUV6e56ce5/yAHhA3kgong1.woff") format("woff");
font-display: swap;
}
.modify-page{
padding:20px;
}
.modify-page .modify-form{
margin-top:50px;
padding:20px;
}
.modify-page .modify-form .modify-title{
font-size: 20px;
font-weight: 700;
font-family: modify-font;
margin-bottom: 30px;
}
.modify-page .modify-form .modify-item{
margin-top: 30px;
}
.modify-page .modify-form .modify-item input{
background-color: rgba(0,0,0,.05);
padding:0 12px;
height: 46px;
line-height: 46px;
border-radius: 8px;
color:#1d1d1d;
font-family: nav-font;
}
.modify-page .modify-form .modify-item input.focus{
background: #1d1d1d;
color:#FFF;
}
.modify-page .modify-form .modify-btn {
height: 80rpx;
background-color: #111111;
text-align: center;
line-height: 80rpx;
color: #fff;
/* font-weight: 600; */
font-size: 28rpx;
border-radius: 16rpx;
font-family: modify-font;
font-size: 16px;
}
.modify-page .modify-form .modify-btn.disable {
/* background-color: #ecf1f4;
color: #111; */
opacity: 0.5;
}
</style>
\ No newline at end of file
...@@ -5,7 +5,7 @@ export default { ...@@ -5,7 +5,7 @@ export default {
// Vue.prototype.host2 = "http://192.168.20.17:8020" // Vue.prototype.host2 = "http://192.168.20.17:8020"
Vue.prototype.host2 = "https://erpmallapi.oytour.com" Vue.prototype.host2 = "https://erpmallapi.oytour.com"
// Vue.prototype.host3 = "http://192.168.20.17:8015" //Vue.prototype.host3 = "http://192.168.10.128"
Vue.prototype.host3 = "https://reborn.oytour.com" Vue.prototype.host3 = "https://reborn.oytour.com"
Vue.prototype.host4 = "https://upload.oytour.com" Vue.prototype.host4 = "https://upload.oytour.com"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment