Commit 79931c48 authored by 华国豪's avatar 华国豪 🙄

修改部分小问题

parent b3ae30ea
//app.js
let md5 = require('utils/md5.js')
// let javaUrl = 'https://efficient.oytour.com/';
let javaUrl = 'http://47.96.12.235:9001/';
// let netUrl = 'https://reborn.oytour.com/api/common/post';
let netUrl = 'http://192.168.2.214:8082/api/Common/Post';
let javaUrl = 'https://efficient.oytour.com/';
// let javaUrl = 'http://47.96.12.235:9001/';
let netUrl = 'https://reborn.oytour.com/api/common/post';
// let netUrl = 'http://192.168.2.214:8082/api/Common/Post';
App({
// 小程序初始化时
onLaunch: function(options) {
......@@ -43,7 +43,7 @@ App({
},
companyId: wx.getStorageSync('site') ? wx.getStorageSync('site').companyId : 0,
cityId: wx.getStorageSync('site') ? wx.getStorageSync('site').cityId:262,
siteName: wx.getStorageSync('site') ? wx.getStorageSync('site').siteName :'成都站'
siteName: wx.getStorageSync('site') ? wx.getStorageSync('site').siteName :'成都站',
},
// 请求接口
$api: function (url, data) {
......@@ -68,7 +68,7 @@ App({
if (res.data.resultCode === 1) {
resolve(res.data.data);
} else if (res.data.resultCode === 10000 || res.data.resultCode === 10001) {
wx.reLaunch({
wx.navigateTo({
url: '/pages/login/login'
})
} else {
......@@ -132,7 +132,9 @@ App({
if (res.data.resultCode === 1) {
resolve(res.data);
} else if (res.data.resultCode === 10000 || res.data.resultCode === 10001) {
wx.navigateTo({
url: '/pages/login/login'
})
} else {
wx.showToast({
title: res.data.message,
......@@ -173,7 +175,9 @@ App({
if (res.data.resultCode === 1) {
resolve(res.data.data);
} else if (res.data.resultCode === 10000 || res.data.resultCode === 10001) {
wx.navigateTo({
url: '/pages/login/login'
})
} else {
wx.showToast({
title: res.data.message,
......@@ -212,7 +216,9 @@ App({
if (res.data.resultCode === 1) {
resolve(res.data.data);
} else if (res.data.resultCode === 10000 || res.data.resultCode === 10001) {
wx.navigateTo({
url: '/pages/login/login'
})
} else {
wx.showToast({
title: res.data.message,
......
......@@ -66,6 +66,11 @@
"pages/mine/UseDetails/UseDetails",
"pages/shopPage/shopPage"
],
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序获取当前城市所属站点"
}
},
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#FFFFFF",
......@@ -85,22 +90,10 @@
"selectedIconPath": "images/tarbar/index11.png",
"text": "首页"
},
{
"pagePath": "pages/shopPage/shopPage",
"iconPath": "images/tarbar/index2.png",
"selectedIconPath": "images/tarbar/index22.png",
"text": "目的地"
},
{
"pagePath": "pages/shopPage/shopPage",
"iconPath": "images/tarbar/index3.png",
"selectedIconPath": "images/tarbar/index33.png",
"text": "积分商城"
},
{
"pagePath": "pages/member/member",
"iconPath": "images/tarbar/index4.png",
"selectedIconPath": "images/tarbar/index44.png",
"iconPath": "images/tarbar/index422.png",
"selectedIconPath": "images/tarbar/index42.png",
"text": "我的"
}
]
......
......@@ -21,8 +21,7 @@ Component({
cityId: app.state.cityId,
siteName: app.state.siteName,
},
getCityName: '',
},
/**
......@@ -35,12 +34,49 @@ Component({
})
},
getCityList() {
app.$api('b2b_get_site', {}).then(res => {
this.setData({
cityList: res
})
console.log(this.data.cityList)
}).catch(err => {})
let city = "成都",
_this = this;
wx.getLocation({
type: 'wgs84',
success(res) {
wx.request({
url: 'http://apis.map.qq.com/ws/geocoder/v1/', //仅为示例,并非真实的接口地址
data: {
location: `${res.latitude},${res.longitude}`,
key: '66YBZ-TC3K2-NNMUD-CC637-2W6WK-AWBM2'
},
header: {
'content-type': 'application/json' // 默认值
},
success(res) {
console.log("res")
city = res.data.result.address_component.city.replace('市', '');
app.$api('b2b_get_site', {}).then(res => {
for (let i = 0; i < res.length; i++) {
if (city.indexOf(res[i].siteName.replace("站", "")) != -1) {
_this.setData({
'site.cityId': res[i].cityId,
'site.siteName': res[i].siteName
})
}
}
_this.setData({
cityList: res
})
console.log(_this.data.cityList)
}).catch(err => { })
}
})
},
fail(err) {
app.$api('b2b_get_site', {}).then(res => {
_this.setData({
cityList: res
})
console.log(_this.data.cityList)
}).catch(err => { })
}
})
},
SetCity(e) {
let that=this;
......
......@@ -3,7 +3,8 @@
<view class='cityView' hidden="{{InputFous}}">
<view bindtap='ChangeSite' class="head1" style="width:150rpx">
<image src="../../images/home/location.png"></image>
{{site.siteName}}</view>
<text>{{site.siteName}}</text>
</view>
<view style="color:#CCCCCC">|</view>
<view class="head3" style="width:500rpx">
<image src="../../images/home/search.png"></image>
......@@ -15,30 +16,8 @@
<view bindtap="CloseCity" data-target="self" class="cityChange" hidden="{{!CitySite}}">
<view class="CityView">
<view catchtap='SetCity' data-msg="{{item}}" class="CityItem" wx:for="{{cityList}}" wx:key="index">{{item.siteName}}</view>
<view catchtap='SetCity' data-msg="{{item}}" class="CityItem {{site.cityId == item.cityId ? 'active' : ''}}" wx:for="{{cityList}}" wx:key="index">{{item.siteName}}</view>
</view>
</view>
</view>
<!-- 站点显示隐藏 -->
<!-- <view class="Site" catchtouchmove="true">
<view style="background:#fff;padding:15rpx 0">
<view class='cityView'>
<view class="head1" style="width:100rpx">
<image src="../../images/home/location.png"></image>
成都</view>
<view style="color:#CCCCCC">|</view>
<view class="head3" style="width:500rpx">
<image src="../../images/home/search.png"></image>
<input bindtap="ListenInput" style="width:100%" placeholder="搜索目的地/交通/景点/酒店" auto-focus/>
</view>
</view>
</view>
<view class="cityChange">
<view class="CityItem">成都站</view>
<view class="CityItem">成都站</view>
<view class="CityItem">南京站</view>
</view>
</view> -->
\ No newline at end of file
</view>
\ No newline at end of file
......@@ -14,11 +14,14 @@
.cityView .head1 {
color: #ee4454;
display: flex;
align-items: center;
}
.cityView .head1 image {
width: 19rpx;
height: 24rpx;
margin-right: 5rpx;
}
.cityView view {
......@@ -47,23 +50,44 @@
width: 100%;
z-index: 100;
height: 100%;
}
.cityChange .CityView{
display: flex;
align-items: center;
flex-wrap: wrap;
}
.CityView{
background: #fff;
padding:15rpx 30rpx;
}
.cityChange .CityView .CityItem{
margin-right: 25rpx;
margin-bottom: 25rpx
}
.cityChange .CityView .CityItem.active{
background:rgba(238,68,84, .2);
border-radius:10rpx;
color: #EE4454 !important;
}
.Site{
height: 100%;
height: 100%;
position: fixed;
top: 0;
width: 100%;
z-index: 100;
}
.CityItem{
display: inline-block;
width: 48%;
display: flex;
align-items: center;
justify-content: center;
width:142rpx;
height:60rpx;
background:rgba(238,238,238,1);
border-radius:10rpx;
font-size:26rpx;
}
.newsite{
position: absolute;
......
images/tarbar/index1.png

598 Bytes | W: | H:

images/tarbar/index1.png

1.2 KB | W: | H:

images/tarbar/index1.png
images/tarbar/index1.png
images/tarbar/index1.png
images/tarbar/index1.png
  • 2-up
  • Swipe
  • Onion skin
images/tarbar/index11.png

597 Bytes | W: | H:

images/tarbar/index11.png

1.38 KB | W: | H:

images/tarbar/index11.png
images/tarbar/index11.png
images/tarbar/index11.png
images/tarbar/index11.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -117,17 +117,18 @@
.group .CommonList{
width: 100%;
padding:30rpx;
display: flex;
flex-wrap: wrap;
}
.group .CommonList>view{
float: left;
width:330rpx;
width: 49%;
border-radius: 12px;
border: 1px solid #EDEDED;
padding-bottom:16rpx;
margin-bottom: 30rpx;
}
.group .CommonList>view:nth-child(even){
margin-left: 30rpx;
margin-left: 2%;
}
.group .CommonList>view .pad{
padding: 0 20rpx;
......
......@@ -31,7 +31,19 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
const scene = options && options.scene ? decodeURIComponent(options.scene) : null
if (scene) {
let jump = scene.split('=')[0]
if (jump == 'jump' && scene.split('=')[1] == '2') {
wx.navigateTo({
url: '/pages/GroupTour/GroupList/GroupList?lineId=14',
})
} else if (jump == 'jump' && scene.split('=')[1] == '3') {
wx.navigateTo({
url: '/pages/mine/Happypassbook/Happypassbook',
})
}
}
this.setData({
isLogin: app.isLogin,
})
......@@ -51,6 +63,20 @@ Page({
})
this.onLoad();
},
goDetails: function (e) {
let isLogin = wx.getStorageSync('admin') ? 1 : 0
if (isLogin == 0) {
wx.navigateTo({
url: '/pages/login/login',
})
return
}
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/Ticket/TicketOrder/TicketOrder?id=' + id,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
......@@ -62,18 +88,6 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
console.log(app.isLogin)
this.setData({
isLogin: app.isLogin,
})
let City = this.selectComponent('#CityComp');
City.getCityList();
this.GetGroup();
this.GetCZTM();
this.GetAllTicket();
this.getFree();
this.getScen();
this.getLocal()
},
login(){
wx.navigateTo({
......
......@@ -10,8 +10,7 @@
<image src="{{item}}"></image>
</swiper-item>
</block>
</swiper>
<!-- <image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190626103242285.png"></image> -->
</swiper>
</view>
<view class="tablist">
<view>
......@@ -97,7 +96,7 @@
<text bindtap='goJiPiao' style="font-size:24rpx;color:#888888;float:right;margin-top:15rpx">查看更多</text>
</view>
<view style="margin-left:-20rpx;margin-top:23rpx">
<view class="tjTicket" wx:for="{{specialAirTicketItem}}" bindtap='goJiPiao' wx:key="index">
<view class="tjTicket" wx:for="{{specialAirTicketItem}}" data-id='{{item.airTicketId}}' bindtap='goDetails' wx:key="index">
<view class="listLeft">
{{item.alName}}
</view>
......@@ -124,14 +123,7 @@
</view>
</view>
<!-- <view style="font-size:30rpx;color:#000000;padding-left:30rpx">猜你喜欢</view>
<view class="likeView">
<text bindtap="Scroll" data-id="GroupScroll" data-index="{{1}}" class="activeText">跟团游</text>
<text bindtap="Scroll" data-id="FreeScroll" data-index="{{2}}">自由行</text>
<text bindtap="Scroll" data-id="ScenScroll" data-index="{{3}}">景点门票</text>
<text bindtap="Scroll" data-id="GroupScroll" data-index="{{1}}">当地游</text>
</view> -->
</view>
<!-- 猜你喜欢 -->
<scroll-view scroll-y scroll-into-view="{{ScrollView}}" scroll-with-animation="true">
......@@ -220,12 +212,4 @@
</view>
</scroll-view>
</view>
<!-- 未登录 -->
<!-- <view class="loginOut" wx:if="{{isLogin==0}}">
<view class="imgView">
<image style="width:438rpx;height:215rpx" src="http://imgfile.oytour.com/New/Upload/Cloud/2019-07/20190710035131045.png"></image>
<view style="font-size:28rpx">您还没有登录,请登录后查看</view>
<view bindtap="login" class="loginBtn">去登录</view>
</view>
</view> -->
\ No newline at end of file
</view>
\ No newline at end of file
......@@ -154,6 +154,8 @@
.Home .CommonList {
width: 100%;
padding: 30rpx;
display: flex;
flex-wrap: wrap;
}
.Home .CommonList:after {
......@@ -165,8 +167,7 @@
}
.Home .CommonList>view {
float: left;
width: 330rpx;
width: 49%;
border-radius: 12px;
border: 1px solid #ededed;
padding-bottom: 16rpx;
......@@ -174,7 +175,7 @@
}
.Home .CommonList>view:nth-child(even) {
margin-left: 30rpx;
margin-left: 2%;
}
.Home .CommonList>view .pad {
......@@ -202,6 +203,7 @@
.Home .CommonList image {
width: 100%;
height: 100%;
display: block;
}
.Home .CommonList .title {
......
......@@ -51,6 +51,14 @@ Page({
countryHidden:false,
type:'',
},
ArrivalCity: function (e) {
let id = e.currentTarget.dataset.id,
name = e.currentTarget.dataset.name,
_this = this;
wx.navigateTo({
url: '/pages/Ticket/TicketList/TicketList?date=' + _this.data.msg.qFlightDateStart + "&eName=" + name + "&eId=" + id + "&type=" + _this.data.msg.ticketType
})
},
goDetails: function (e){
let isLogin = wx.getStorageSync('admin') ? 1 : 0
......
......@@ -49,14 +49,14 @@
<text style="font-size:30rpx;color:#000000">目的地直选</text>
</view>
<view class="cztm cztm1">
<view class="cztmList1">
<view class="cztmList1" data-id='1145' data-name='科伦坡' bindtap='ArrivalCity'>
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-07/20190710042106139.png"></image>
<view class="boxshadow">
<view style="font-size:30rpx;padding-top:29rpx">科伦坡</view>
<view style="font-size:30rpx;padding-top:29rpx" >科伦坡</view>
<view style="font-size:22rpx">COlOMBO</view>
</view>
</view>
<view class="cztmList">
<view class="cztmList" data-id='893' data-name='首尔' bindtap='ArrivalCity'>
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-07/20190710042149046.png"></image>
<view class="boxshadow">
<view style="font-size:30rpx;padding-top:29rpx">首尔</view>
......@@ -66,21 +66,21 @@
</view>
<view class="cztm cztm2">
<view class="cztmList">
<view class="cztmList" data-id='653' data-name='东京' bindtap='ArrivalCity'>
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-07/20190710042122788.png"></image>
<view class="boxshadow">
<view style="font-size:30rpx;padding-top:29rpx">东京</view>
<view style="font-size:22rpx">Tokyo</view>
</view>
</view>
<view class="cztmList">
<view class="cztmList" data-id='622' data-name='巴厘岛' bindtap='ArrivalCity'>
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-07/20190710042148963.png"></image>
<view class="boxshadow">
<view style="font-size:30rpx;padding-top:29rpx">巴厘岛</view>
<view style="font-size:22rpx">BALI</view>
</view>
</view>
<view class="cztmList">
<view class="cztmList" data-id='421' data-name='香港' bindtap='ArrivalCity'>
<image src="http://imgfile.oytour.com/New/Upload/Cloud/2019-07/20190710042149091.png"></image>
<view class="boxshadow">
<view style="font-size:30rpx;padding-top:29rpx">香港</view>
......
......@@ -81,11 +81,7 @@
<view>
<image src='{{item.airlineUrl}}'></image>
<text>{{item.airlineName}} {{item.alCode}}</text>
</view>
<!-- <view>
<image src='../../../images/ticket/shijian.png'></image>
<text>33h20m</text>
</view> -->
</view>
</view>
</view>
<view class='list-item-right' bindtap='setOreder' data-id='{{item.id}}'>
......@@ -164,8 +160,7 @@
<view class='detail-box-right'>
<view class='f28 c11 bold margin-b10'>{{item.dIATA}} {{item.dName}}</view>
<view class='f24 c99 imgs-item'> <image src='{{detailMsg.airlineUrl}}'></image> {{item.alName}}</view>
<view class='f24 cff imgs-item'> 四川航空</view>
<!-- <image src='../../../images/ticket/dafeiji.png'></image> -->
<view class='f24 cff imgs-item'> 四川航空</view>
<view class='f28 c11 bold margin-t10'>{{item.aIATA}} {{item.aName}}</view>
</view>
</view>
......@@ -189,15 +184,13 @@
<view class='detail-box-right'>
<view class='f28 c11 bold margin-b10'>{{item.dIATA}} {{item.dName}}</view>
<view class='f24 c99 imgs-item'> <image src='{{detailMsg.airlineUrl}}'></image> {{item.alName}}</view>
<view class='f24 cff imgs-item'> 四川航空</view>
<!-- <image src='../../../images/ticket/dafeiji.png'></image> -->
<view class='f24 cff imgs-item'> 四川航空</view>
<view class='f28 c11 bold margin-t10'>{{item.aIATA}} {{item.aName}}</view>
</view>
</view>
<view class='detail-box-zhuan f22' wx:if="{{index!==detailMsg.backFlightList.length -1}}">
<text class='cee'>中转</text>
<text class='c66'>{{item.arrivalCityName}}</text>
<text class='cee'>行李直达</text>
<text class='c66'>{{item.arrivalCityName}}</text>
</view>
</view>
</scroll-view>
......
......@@ -11,14 +11,12 @@
<image src='../../../images/ticket/right_arr.png'></image>
</view>
<view class='info flex-ter f26 c66'>
<view>
<!-- <view>退票1000元起,不得改期 | 有免费托运行李额</view> -->
<view>
<view>含税价:成人¥{{price}} 儿童¥{{price}} 老人¥{{price}}</view>
</view>
<view class='residue'>
余票:{{details.residue}}
</view>
<!-- <image src='../../../images/ticket/right_arr.png'></image> -->
</view>
</view>
</view>
<view class='xuanzeren addpeople-btn'>
......@@ -106,8 +104,7 @@
</view>
<view class='detail-box-zhuan f22' wx:if="{{index!==details.flightList.length -1}}">
<text class='cee'>中转</text>
<text class='c66'>{{item.arrivalCityName}}</text>
<text class='cee'>行李直达</text>
<text class='c66'>{{item.arrivalCityName}}</text>
</view>
</view>
<view class='detail-box-tit f22 margin-top30'>
......
......@@ -11,7 +11,8 @@ Page({
loginState: false,
isPwd: true,
account: '',
password: ''
password: '',
tabLogin: false,
},
/**
......@@ -54,6 +55,9 @@ Page({
* 登录
*/
signIn: function (e) {
this.setData({
tabLogin:true
})
if (this.data.loginState === true) {
wx.login({
success: res => {
......
......@@ -32,7 +32,12 @@
<navigator class='form_link_text' url='revisePwd/revisePwd'>修改密码</navigator>
</view>
</view>
<form bindsubmit="signIn" report-submit>
<form bindsubmit="signIn" report-submit wx:if="!tabLogin">
<button hover-class="btn-hover" form-type="submit">
<view class='login_btn {{loginState===true?"login_btn_true":""}}'>登录</view>
</button>
</form>
<form report-submit wx:else="tabLogin">
<button hover-class="btn-hover" form-type="submit">
<view class='login_btn {{loginState===true?"login_btn_true":""}}'>登录</view>
</button>
......
......@@ -166,8 +166,8 @@
<view>
<form bindsubmit="formSubmit" report-submit>
<button hover-class="btn-hover" form-type="submit" data-url="/pages/mine/Happypassbook/Happypassbook">
<image mode="aspectFit" src="../../images/menber/menu-hong.png"></image>
<view class='order-type-name'>旅客调查</view>
<image mode="aspectFit" src="../../images/menber/redhappy.png"></image>
<view class='order-type-name'>幸福存折</view>
</button>
</form>
</view>
......
......@@ -33,7 +33,6 @@ Page({
*/
onLoad: function (options) {
this.getZhanbi();
this.getZheXian();
this.getHot();
this.scaComponnet = this.selectComponent('#mychart-dom-multi-scatter');
......@@ -218,7 +217,6 @@ Page({
getZheXian(){
let that=this;
app.$api('customer_post_GetCustomerBigRedEnvelope', { CustomerId: this.data.admin.customerAccountId }).then(res => {
let datainfo = res;
let arr1 = ['-', '-', '-', '-'];
let newarr = [];
......@@ -299,7 +297,14 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.setData({
admin: app.state.admin
})
this.getZhanbi();
this.getZheXian();
this.getHot();
this.scaComponnet = this.selectComponent('#mychart-dom-multi-scatter');
this.pieComponnet = this.selectComponent('#mychart-pie');
},
/**
......
......@@ -12,7 +12,7 @@
"autoAudits": false
},
"compileType": "miniprogram",
"libVersion": "2.7.2",
"libVersion": "2.7.7",
"appid": "wx2e070bb923f858fd",
"projectname": "FLASHMAN",
"debugOptions": {
......@@ -39,7 +39,7 @@
"list": []
},
"miniprogram": {
"current": 20,
"current": 21,
"list": [
{
"id": 2,
......@@ -187,6 +187,13 @@
"pathName": "pages/product/SametradeZW/Successview/Successview",
"query": "idDes=w%2BngpO%2BnQZw%3D%0A&tcid=3929&teamType=0",
"scene": null
},
{
"id": -1,
"name": "站位",
"pathName": "pages/mine/Happypassbook/Happypassbook",
"query": "",
"scene": null
}
]
}
......
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