Commit 3380ed97 authored by 黄媛媛's avatar 黄媛媛

update

parent e1bfe137
......@@ -47,8 +47,8 @@ import PAGE_CONFIG from './config/pageConfig.js'
const { Provider } = WeAppRedux;
const store = createStore(reducer) // redux store
let md5 = require('utils/md5.js')
let netUrl = 'http://testapi.oytour.com/api/common/post';
// let netUrl = 'https://reborn.oytour.com/api/common/post';
// let netUrl = 'http://testapi.oytour.com/api/common/post';
let netUrl = 'https://reborn.oytour.com/api/common/post';
App(
Provider(store)(
......
......@@ -8,7 +8,7 @@
"pages/logs/logs",
"pages/me/index",
"partials/chating/chating",
"pages/video/index",
"pages/video/video",
"components/emoji/emoji",
"components/inputclear/inputclear",
"components/inputmodal/inputmodal",
......@@ -23,7 +23,6 @@
"pages/tripover/tripover",
"pages/comments/comments",
"pages/VoucherDetails/VoucherDetails"
],
"window": {
"backgroundTextStyle": "light",
......@@ -50,7 +49,7 @@
"selectedIconPath": "images/tabbar/msga.png"
},
{
"pagePath": "pages/video/index",
"pagePath": "pages/video/video",
"text": "旅友圈",
"iconPath": "images/tabbar/video.png",
"selectedIconPath": "images/tabbar/videoa.png"
......
......@@ -14,7 +14,7 @@
</view>
</view>
<view wx:for="{{dataInfo.ImageList}}" wx:key="index" style="margin:20rpx 0 20rpx 0">
<image bindtap="modeImg" data-img="{{item}}" wx:if="item" mode="widthFix" style="max-width:100%" src="{{item}}"></image>
<image bindtap="modeImg" data-img="{{item}}" wx:if="item" mode="widthFix" style="max-width:100%;min-width:100%" src="{{item}}"></image>
<image wx:else style="width:100%" src="../../../images/index/default.png"></image>
</view>
<view style="padding-bottom: 20rpx;" class="f28">
......
//index.js
//获取应用实例
const app = getApp()
......@@ -15,32 +14,32 @@ Page({
autoplay: false,
interval: 2000,
duration: 500,
loginState:true,
dataInfo:{},
todayMsg:{
ConfigId:0,
TCID:'',
loginState: true,
dataInfo: {},
todayMsg: {
ConfigId: 0,
TCID: '',
Date: '2019-11-03',
GuestId:0,
GuestId: 0,
},
todayList:[],
todayList: [],
contactState: true,
contactInfo:{},
airState:true,
configId:'',
tcid:'',
pathUrl:'/pages/index/index',
optionTCID:'7003',
contactInfo: {},
airState: true,
configId: '',
tcid: '',
pathUrl: '/pages/index/index',
optionTCID: '7003',
// 8705
getimg:true,
guidegrey:5,
guidemsg:{
LeaderId:0,
Type:0,
CreateBy:'',
Score:0,
Description:'',
getimg: true,
guidegrey: 5,
guidemsg: {
LeaderId: 0,
Type: 0,
CreateBy: '',
Score: 0,
Description: '',
},
},
......@@ -51,7 +50,7 @@ Page({
// url: '../logs/logs'
// })
},
onLoad: function (options) {
onLoad: function(options) {
// if (app.globalData.userInfo) {
// this.setData({
// userInfo: app.globalData.userInfo,
......@@ -79,14 +78,14 @@ Page({
// })
// }
console.log("options", options)
let that=this;
let that = this;
let openId = (wx.getStorageSync('openId'))
if (!openId) {
wx.login({
success(res) {
if (res.code) {
//发起网络请求
let msg={
let msg = {
code: res.code,
type: 2
}
......@@ -97,20 +96,21 @@ Page({
openId: res
})
that.login(res);
}).catch(err => { })
} else {
}
}).catch(err => {})
} else {}
}
})
}
},
goVoucher(){
goVoucher() {
wx.navigateTo({
url: '/pages/VoucherDetails/VoucherDetails'
})
},
goMsg(){
wx.switchTab({ url: '/pages/msg/index/index' })
goMsg() {
wx.switchTab({
url: '/pages/msg/index/index'
})
},
scoreColor(e) {
......@@ -144,34 +144,36 @@ Page({
setGuide() {
let userInfo = (wx.getStorageSync('userInfo'))
if (!userInfo) {
util.showToast('text', '请先核对身份!', { duration: 3000 })
util.showToast('text', '请先核对身份!', {
duration: 3000
})
return;
}
this.data.guidemsg.CreateBy = userInfo.GuestId;
app.$api('b2b_set_SetLeaderGuideScore', this.data.guidemsg).then(res => {
this.setData({
contactState:true
contactState: true
})
}).catch(err => { })
}).catch(err => {})
},
dYBtn(){
dYBtn() {
let userInfo = (wx.getStorageSync('userInfo'))
let openId = (wx.getStorageSync('openId'))
let msg={
let msg = {
OpenId: openId,
TempleteIdList:[],
TempleteIdList: [],
GuestId: userInfo.GuestId,
};
msg.TempleteIdList= ['h0wT8WWk0N2bMQTD8lDm3xC_8ns0MiH1QGYkL7oNNx8'];
msg.TempleteIdList = ['h0wT8WWk0N2bMQTD8lDm3xC_8ns0MiH1QGYkL7oNNx8'];
wx.requestSubscribeMessage({
tmplIds: ['h0wT8WWk0N2bMQTD8lDm3xC_8ns0MiH1QGYkL7oNNx8'],
success(res) {
if (res.errMsg == "requestSubscribeMessage:ok" && res.h0wT8WWk0N2bMQTD8lDm3xC_8ns0MiH1QGYkL7oNNx8 == "accept"){
if (res.errMsg == "requestSubscribeMessage:ok" && res.h0wT8WWk0N2bMQTD8lDm3xC_8ns0MiH1QGYkL7oNNx8 == "accept") {
app.$api('b2b_set_SetLXYGuestSubscribe', msg).then(res => {
}).catch(err => { })
}).catch(err => {})
}
},
fail(res) {
......@@ -179,7 +181,7 @@ Page({
},
})
},
onShow: function (){
onShow: function() {
let that = this;
let userInfo = (wx.getStorageSync('userInfo'))
if (userInfo) {
......@@ -190,7 +192,7 @@ Page({
}
that.getData();
},
goComment(e){
goComment(e) {
let that = this;
let userInfo = (wx.getStorageSync('userInfo'))
let info = e.currentTarget.dataset.item;
......@@ -204,7 +206,9 @@ Page({
let that = this;
let userInfo = (wx.getStorageSync('userInfo'))
if (!userInfo) {
util.showToast('text', '请先核对身份!', { duration: 3000 })
util.showToast('text', '请先核对身份!', {
duration: 3000
})
return;
}
let info = e.currentTarget.dataset.item;
......@@ -216,24 +220,26 @@ Page({
wx.setStorageSync('pathUrl', this.data.pathUrl)
},
goDetail(e){
goDetail(e) {
let that = this;
let userInfo = (wx.getStorageSync('userInfo'))
if (!userInfo){
util.showToast('text', '请先核对身份!', { duration: 3000 })
if (!userInfo) {
util.showToast('text', '请先核对身份!', {
duration: 3000
})
return;
}
let info = e.currentTarget.dataset.item;
let Id = info.Id;
let GuestId = userInfo.GuestId;
let src="";
if (info.Type==4){
src ='/pages/index/hotelDetails/hotelDetails';
let src = "";
if (info.Type == 4) {
src = '/pages/index/hotelDetails/hotelDetails';
wx.navigateTo({
url: src+'?GuestId=' + GuestId + '&Id=' + Id
url: src + '?GuestId=' + GuestId + '&Id=' + Id
})
}
if (info.Type==2) {
if (info.Type == 2) {
src = '/pages/index/sceneDetail/sceneDetail';
wx.navigateTo({
url: src + '?GuestId=' + GuestId + '&Id=' + Id
......@@ -253,17 +259,19 @@ Page({
}
},
tripDay(e){
let that=this;
tripDay(e) {
let that = this;
let info = e.currentTarget.dataset.item;
wx.navigateTo({
url: '/pages/index/tripDay/tripDay?ConfigId=' + that.data.configId + "&TCID=" + that.data.tcid + "&DayNum=" + info.DayNum
})
},
makePhone(e){
makePhone(e) {
let userInfo = (wx.getStorageSync('userInfo'))
if (!userInfo) {
util.showToast('text', '请先核对身份!', { duration: 3000 })
util.showToast('text', '请先核对身份!', {
duration: 3000
})
return;
}
let phone = e.currentTarget.dataset.item.MobilePhone;
......@@ -271,7 +279,7 @@ Page({
phoneNumber: phone,
})
},
seeFight(){
seeFight() {
this.setData({
airState: false,
})
......@@ -281,23 +289,22 @@ Page({
airState: true,
})
},
closeState(e){
closeState(e) {
this.setData({
contactState:true,
contactState: true,
})
},
noThing(e){
},
goWeb(e){
noThing(e) {},
goWeb(e) {
let info = e.currentTarget.dataset.item;
let name = info.Name;
wx.navigateTo({
url: '/pages/webview/webview?name='+name
url: '/pages/webview/webview?name=' + name
})
},
getContact(e){
getContact(e) {
let guidemsg = this.data.guidemsg;
guidemsg={
guidemsg = {
LeaderId: 0,
Type: 0,
CreateBy: '',
......@@ -306,7 +313,7 @@ Page({
}
this.setData({
guidemsg: guidemsg,
guidegrey:5,
guidegrey: 5,
})
let info = e.currentTarget.dataset.item;
......@@ -315,12 +322,12 @@ Page({
contactInfo.type = type;
console.log("info", info)
console.log("type", type)
contactInfo.LeaderId=info.Id;
contactInfo.LeaderId = info.Id;
guidemsg.LeaderId = info.Id;
guidemsg.Type = type;
if(type==1){
if (type == 1) {
contactInfo.Name = info.Surname + info.Name;
contactInfo.MobilePhone = info.MobilePhone;
contactInfo.LdNum = info.LdNum;
......@@ -343,7 +350,7 @@ Page({
if (type == 3) {
contactInfo.Name = info.Contact;
contactInfo.MobilePhone = info.ContactNumber;
contactInfo.DyNum =info.CustomerNum;
contactInfo.DyNum = info.CustomerNum;
contactInfo.LdPhoto = info.CustomerPhoto;
contactInfo.Score = parseInt(info.CustomerScore);
contactInfo.geryScore = 5 - contactInfo.Score;
......@@ -351,32 +358,32 @@ Page({
contactInfo.Description = info.MyScore.Description;
}
this.setData({
contactState:false,
contactState: false,
contactInfo: contactInfo,
guidemsg: guidemsg,
})
},
getData(){
getData() {
let userInfo = this.data.userInfo;
let msg={
ConfigId:0,
TCID:this.data.optionTCID,
OrderId: userInfo.OrderId ? userInfo.OrderId:'',
CityId: userInfo.DepartureCityId ? userInfo.DepartureCityId:''
let msg = {
ConfigId: 0,
TCID: this.data.optionTCID,
OrderId: userInfo.OrderId ? userInfo.OrderId : '',
CityId: userInfo.DepartureCityId ? userInfo.DepartureCityId : ''
};
app.$api('b2b_get_GetMXYTravelIndexInfo', msg).then(res => {
wx.setStorageSync('tcid', res.tcid)
if (res.IsTravelEnd){
if (res.IsTravelEnd) {
// wx.navigateTo({
// url: '/pages/tripover/tripover'
// })
}
if (res.CityList.length>0){
res.CityList.forEach(item=>{
if (res.CityList.length > 0) {
res.CityList.forEach(item => {
item.all = parseInt(item.Score);
item.grey = 5- parseInt(item.Score);
item.grey = 5 - parseInt(item.Score);
})
}
let todayMsg = this.data.todayMsg;
......@@ -384,15 +391,15 @@ Page({
todayMsg.TCID = res.tcid;
this.setData({
dataInfo:res,
dataInfo: res,
todayMsg: todayMsg,
configId: res.configId,
tcid: res.tcid
})
console.log("res", res)
let chartOtherList=[];
if (res.LeaderModel){
let obj={};
let chartOtherList = [];
if (res.LeaderModel) {
let obj = {};
obj.name = res.LeaderModel.Surname + res.LeaderModel.Name;
obj.LdPhoto = res.LeaderModel.LdPhoto;
obj.Id = res.LeaderModel.Id;
......@@ -421,14 +428,20 @@ Page({
obj.typename = "销售顾问";
chartOtherList.push(obj);
}
let objNew = {}
chartOtherList = chartOtherList.reduce(function(item, next) {
objNew[next.Id] ? ' ' : objNew[next.Id] = true && item.push(next)
return item;
}, [])
wx.setStorageSync('chartOtherList', chartOtherList)
this.getToday();
}).catch(err => { })
}).catch(err => {})
},
getToday(){
getToday() {
let todayMsg = this.data.todayMsg;
let userInfo = (wx.getStorageSync('userInfo'))
if (userInfo){
if (userInfo) {
todayMsg.GuestId = userInfo.GuestId;
this.setData({
todayMsg: todayMsg,
......@@ -437,8 +450,8 @@ Page({
app.$api('b2b_get_GetMXYToDayTourList', todayMsg).then(res => {
if (res.Status==1){
res.List.forEach(item=>{
if (res.Status == 1) {
res.List.forEach(item => {
item.all = parseInt(item.Score);
item.grey = 5 - parseInt(item.Score);
})
......@@ -447,16 +460,15 @@ Page({
})
}
}).catch(err => { })
}).catch(err => {})
},
goCard(){
goCard() {
let self = wx.getStorageSync('self')
if(!self){
if (!self) {
this.setData({
getimg:false
getimg: false
})
}
else{
} else {
wx.navigateTo({
url: `/pages/validateForm/validate/validate?TCID${this.data.tcid}`
})
......
......@@ -17,7 +17,7 @@
<view wx:if="{{dataInfo.SupportCount && dataInfo.SupportCount!=''}}" style="margin-top:10rpx" class="f24 c99">餐厅人数:{{dataInfo.SupportCount}}</view>
<view wx:if="{{dataInfo.ParkInfo && dataInfo.ParkInfo!=''}}" style="margin-top:10rpx" class="f24 c99">停车说明:{{dataInfo.ParkInfo}}</view>
<view wx:for="{{dataInfo.ImageList}}" wx:key="index" style="margin:40rpx 0 30rpx 0">
<image bindtap="modeImg" data-img="{{item}}" wx:if="{{item}}" mode="widthFix" style="max-width:100%" src="{{item}}"></image>
<image bindtap="modeImg" data-img="{{item}}" wx:if="{{item}}" mode="widthFix" style="max-width:100%;min-width:100%" src="{{item}}"></image>
<image wx:else style="width:100%" src="../../../images/index/default.png"></image>
</view>
<view style="padding-bottom: 20rpx;" class="f28">
......
......@@ -15,7 +15,7 @@
</view>
<view style="margin-top:12rpx" class="f26">{{dataInfo.Remark}}</view>
<view wx:for="{{dataInfo.ImageList}}" wx:key="index" style="margin:30rpx 0 30rpx 0">
<image bindtap="modeImg" data-img="{{item}}" wx:if="{{item}}" mode="widthFix" style="max-width:100%" src="{{item}}"></image>
<image bindtap="modeImg" data-img="{{item}}" wx:if="{{item}}" mode="widthFix" style="max-width:100%;min-width:100%" src="{{item}}"></image>
<image wx:else style="width:100%" src="../../../images/index/default.png"></image>
</view>
<view style="padding-bottom: 20rpx;" class="f28">
......
......@@ -15,7 +15,7 @@
</view>
<view style="margin-top:12rpx" class="f26">{{dataInfo.Remark}}</view>
<view wx:for="{{dataInfo.ImageList}}" wx:key="index" style="margin:30rpx 0 30rpx 0">
<image bindtap="modeImg" data-img="{{item}}" wx:if="{{item}}" mode="widthFix" style="max-width:100%" src="{{item}}"></image>
<image bindtap="modeImg" data-img="{{item}}" wx:if="{{item}}" mode="widthFix" style="max-width:100%;min-width:100%" src="{{item}}"></image>
<image wx:else style="width:100%;border-radius:20rpx" src="../../../images/index/default.png"></image>
</view>
<view style="padding-bottom: 20rpx;" class="f28">
......
<!--pages/me/index.wxml-->
<text>pages/me/index.wxml</text>
<view class="f30 c99 center">
正在开发中请稍后
</view>
<!--pages/video/index.wxml-->
<text>pages/video/index.wxml</text>
/* pages/video/index.wxss */
\ No newline at end of file
// pages/video/index.js
// pages/video/video.js
Page({
/**
......
<view class="f30 c99 center">
正在开发中请稍后
</view>
/* pages/video/video.wxss */
\ No newline at end of file
{
"usingComponents": {}
"usingComponents": {},
"navigationStyle": "custom"
}
\ No newline at end of file
......@@ -167,6 +167,20 @@
"pathName": "pages/msg/index/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "欢迎页",
"pathName": "pages/welcome/welcome",
"query": "",
"scene": null
},
{
"id": 17,
"name": "旅又圈",
"pathName": "pages/video/video",
"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