Commit 4db99a87 authored by 黄媛媛's avatar 黄媛媛

111

parent c1748bc3
...@@ -36,12 +36,10 @@ Component({ ...@@ -36,12 +36,10 @@ Component({
getCityList() { getCityList() {
let city = "成都", let city = "成都",
_this = this; _this = this;
console.log(app.state.admin)
app.$api('b2b_get_site', {}).then(res => { app.$api('b2b_get_site', {}).then(res => {
_this.setData({ _this.setData({
cityList: res cityList: res
}) })
console.log(_this.data.cityList)
}).catch(err => { }) }).catch(err => { })
if (app.state.locaSite) { if (app.state.locaSite) {
...@@ -60,7 +58,6 @@ Component({ ...@@ -60,7 +58,6 @@ Component({
'content-type': 'application/json' // 默认值 'content-type': 'application/json' // 默认值
}, },
success(res) { success(res) {
console.log("res")
city = res.data.result.address_component.city.replace('市', ''); city = res.data.result.address_component.city.replace('市', '');
app.state.locaSite = true app.state.locaSite = true
app.$api('b2b_get_site', {}).then(res => { app.$api('b2b_get_site', {}).then(res => {
...@@ -84,7 +81,6 @@ Component({ ...@@ -84,7 +81,6 @@ Component({
_this.setData({ _this.setData({
cityList: res cityList: res
}) })
console.log(_this.data.cityList)
}).catch(err => { }) }).catch(err => { })
} }
}) })
......
// pages/GroupTour/FillOrder/FillOrder.js // pages/GroupTour/FillOrder/FillOrder.js
let app = getApp(); let app = getApp();
var util = require('../../../utils/util.js')
Page({ Page({
/** /**
...@@ -139,14 +141,9 @@ Page({ ...@@ -139,14 +141,9 @@ Page({
} else { } else {
money = e.detail.value.substring(0, e.detail.value.length - 1); money = e.detail.value.substring(0, e.detail.value.length - 1);
} }
console.log(money)
if (money !== "" && parseFloat(money) > this.data.RedEnvelopeMoneyALL) { if (money !== "" && parseFloat(money) > this.data.RedEnvelopeMoneyALL) {
money = this.data.RedEnvelopeMoneyALL money = this.data.RedEnvelopeMoneyALL
wx.showToast({ util.shownone('最大金额不能超过余额');
title: '最大金额不能超过余额',
icon: 'none',
duration: 2000
})
} }
this.setData({ this.setData({
RedMoney: parseFloat(money) RedMoney: parseFloat(money)
...@@ -165,19 +162,11 @@ Page({ ...@@ -165,19 +162,11 @@ Page({
//兑换码兑换 //兑换码兑换
subCode: function () { subCode: function () {
if (this.data.code == "") { if (this.data.code == "") {
wx.showToast({ util.shownone('请输入兑换码');
title: '请输入兑换码',
icon: 'none',
duration: 2000
})
return return
} }
app.$apiJavaData("api/b2b/user/updateUseCouponBycode", { ActivateCode: this.data.code}).then(res => { app.$apiJavaData("api/b2b/user/updateUseCouponBycode", { ActivateCode: this.data.code}).then(res => {
wx.showToast({ util.shownone('兑换成功,请到优惠券列表查看');
title: '兑换成功,请到优惠券列表查看',
icon: 'none',
duration: 2000
})
this.getCpList() this.getCpList()
}).catch(err => { }) }).catch(err => { })
}, },
...@@ -191,7 +180,6 @@ Page({ ...@@ -191,7 +180,6 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function(options) { onLoad: function(options) {
console.log(options)
let payInfo = wx.getStorageSync('payInfo'); let payInfo = wx.getStorageSync('payInfo');
this.setData({ this.setData({
payInfo: payInfo, payInfo: payInfo,
...@@ -201,7 +189,6 @@ Page({ ...@@ -201,7 +189,6 @@ Page({
let that = this; let that = this;
let msg = {}; let msg = {};
if (options) { if (options) {
// console.log("options", options)
msg.configId = decodeURIComponent(options.idDes); msg.configId = decodeURIComponent(options.idDes);
msg.tcid = options.tcid; msg.tcid = options.tcid;
if (options.teamType) { if (options.teamType) {
...@@ -268,11 +255,7 @@ Page({ ...@@ -268,11 +255,7 @@ Page({
if (str.test(phoneNumber)) { if (str.test(phoneNumber)) {
return true return true
} else { } else {
wx.showToast({ util.shownone('手机号不正确');
title: '手机号不正确',
duration: 500,
icon: 'none',
})
return false return false
} }
}, },
...@@ -280,19 +263,11 @@ Page({ ...@@ -280,19 +263,11 @@ Page({
StartYd() { StartYd() {
let that = this; let that = this;
if (that.data.payInfo.ContactMobile == "" || !that.data.payInfo.ContactMobile || that.data.payInfo.ContactMobile.length<11) { if (that.data.payInfo.ContactMobile == "" || !that.data.payInfo.ContactMobile || that.data.payInfo.ContactMobile.length<11) {
wx.showToast({ util.shownone('请输入正确的手机号');
title: "请输入正确的手机号",
icon: 'none',
duration: 1000
})
return; return;
} }
if (that.data.payInfo.ContactName == "" || !that.data.payInfo.ContactName) { if (that.data.payInfo.ContactName == "" || !that.data.payInfo.ContactName) {
wx.showToast({ util.shownone('请输入联系人姓名');
title: "请输入联系人姓名",
icon: 'none',
duration: 1000
})
return; return;
} }
this.data.payInfo.CouponAllotIds = this.data.CouponIds ? this.data.CouponIds.slice(0, this.data.CouponIds.length - 1) : '' this.data.payInfo.CouponAllotIds = this.data.CouponIds ? this.data.CouponIds.slice(0, this.data.CouponIds.length - 1) : ''
......
...@@ -61,7 +61,6 @@ Page({ ...@@ -61,7 +61,6 @@ Page({
}, },
GodetailList(e){ GodetailList(e){
let item = e.currentTarget.dataset.item; let item = e.currentTarget.dataset.item;
console.log(item)
wx.navigateTo({ wx.navigateTo({
url: '/pages/GroupTour/GroupDetails/GroupDetails?idDes=' + encodeURIComponent(item.id) + "&tcid=" + item.tcid + "&teamType=0", url: '/pages/GroupTour/GroupDetails/GroupDetails?idDes=' + encodeURIComponent(item.id) + "&tcid=" + item.tcid + "&teamType=0",
}) })
...@@ -73,7 +72,6 @@ Page({ ...@@ -73,7 +72,6 @@ Page({
}) })
}, },
ChangeSite(val) { ChangeSite(val) {
console.log(val.detail);
this.setData({ this.setData({
site: val.detail site: val.detail
}) })
...@@ -146,7 +144,6 @@ Page({ ...@@ -146,7 +144,6 @@ Page({
dataList: [], dataList: [],
arrList: [] arrList: []
}) })
console.log("lineList", that.data.lineList)
this.GetLoadList(0); this.GetLoadList(0);
}).catch(err => {}) }).catch(err => {})
}, },
...@@ -164,14 +161,12 @@ Page({ ...@@ -164,14 +161,12 @@ Page({
that.setData({ that.setData({
tiaoshui: res.pageData tiaoshui: res.pageData
}) })
console.log(that.data.tiaoshui)
}).catch(err => { }).catch(err => {
}) })
}, },
onPageScroll: function(e) { onPageScroll: function(e) {
let that=this; let that=this;
// console.log(e);//{scrollTop:99}
let query = wx.createSelectorQuery(); let query = wx.createSelectorQuery();
//选择id //选择id
query.select('#scrollView').boundingClientRect() query.select('#scrollView').boundingClientRect()
......
...@@ -29,7 +29,6 @@ Page({ ...@@ -29,7 +29,6 @@ Page({
that.setData({ that.setData({
payInfo: info payInfo: info
}) })
console.log("payInfo", that.data.payInfo)
} }
that.countdown(that); that.countdown(that);
......
...@@ -64,12 +64,8 @@ Page({ ...@@ -64,12 +64,8 @@ Page({
phoneInput(e) { phoneInput(e) {
let val = e.detail.value; let val = e.detail.value;
this.data.msg.contactMobile = val; this.data.msg.contactMobile = val;
if (val.length > 11) {     if (val.length > 11) {  
wx.showToast({      util.shownone('手机号有误'); 
title: '手机号有误',
     icon: 'none',
     duration: 500    
})   
}   }  
this.setData({ this.setData({
msg: this.data.msg msg: this.data.msg
...@@ -91,11 +87,7 @@ Page({ ...@@ -91,11 +87,7 @@ Page({
let tomonth = util.changeMonth(this.data.tomonth, num) let tomonth = util.changeMonth(this.data.tomonth, num)
let today = util.YYMM(new Date()); let today = util.YYMM(new Date());
if (!util.CompareDate(tomonth, today)) { if (!util.CompareDate(tomonth, today)) {
wx.showToast({ util.shownone('不能选择过去的日期!'); 
title: "不能选择过去的日期!",
icon: 'none',
duration: 1000
})
return; return;
} }
this.setData({ this.setData({
...@@ -194,11 +186,7 @@ Page({ ...@@ -194,11 +186,7 @@ Page({
let that = this; let that = this;
let msg = that.data.msg; let msg = that.data.msg;
if (msg.useDate == "") { if (msg.useDate == "") {
wx.showToast({ util.shownone('请选择使用日期'); 
title: "请选择使用日期",
icon: 'none',
duration: 1000
})
return; return;
} }
app.$apiJavaData('/api/b2b/scenic/setTicketOrder', msg).then(res => { app.$apiJavaData('/api/b2b/scenic/setTicketOrder', msg).then(res => {
...@@ -207,11 +195,7 @@ Page({ ...@@ -207,11 +195,7 @@ Page({
url: '/pages/member/orderCenter/orderCenter?index=3', url: '/pages/member/orderCenter/orderCenter?index=3',
}) })
} else { } else {
wx.showToast({ util.shownone(res.message); 
title: res.message,
icon: 'none',
duration: 1000
})
} }
}).catch(err => {}) }).catch(err => {})
......
...@@ -61,7 +61,6 @@ Page({ ...@@ -61,7 +61,6 @@ Page({
}, },
getlineTeam(e) { getlineTeam(e) {
console.log(e);
let item = e.currentTarget.dataset.item; let item = e.currentTarget.dataset.item;
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
this.setData({ this.setData({
...@@ -79,14 +78,12 @@ Page({ ...@@ -79,14 +78,12 @@ Page({
fromOrigin: 1, fromOrigin: 1,
} }
app.$apiJavaNew('/api/b2b/food/getHomeFoodList', msg).then(res => { app.$apiJavaNew('/api/b2b/food/getHomeFoodList', msg).then(res => {
console.log("getFood")
console.log(res);
let list = res.pageData; let list = res.pageData;
this.setData({ this.setData({
foodList: list foodList: list
}) })
console.log("foodList", this.data.foodList);
}).catch(err => { }) }).catch(err => { })
}, },
...@@ -156,7 +153,6 @@ Page({ ...@@ -156,7 +153,6 @@ Page({
}) })
}, },
ChangeSite(val) { ChangeSite(val) {
console.log(val.detail);
this.setData({ this.setData({
site: val.detail site: val.detail
}) })
......
...@@ -82,7 +82,6 @@ Page({ ...@@ -82,7 +82,6 @@ Page({
wx.getStorage({ wx.getStorage({
key: 'admin', key: 'admin',
success: res => { success: res => {
console.log(e)
let type = e.detail.target.dataset.type; let type = e.detail.target.dataset.type;
let formId = e.detail.formId let formId = e.detail.formId
let url = ''; let url = '';
...@@ -126,7 +125,6 @@ Page({ ...@@ -126,7 +125,6 @@ Page({
}, },
// 获取数据 // 获取数据
getList: function (type) { getList: function (type) {
console.log(this.data.pageIndex, this.data.totalPage, type)
if (this.data.pageIndex >= this.data.totalPage && type) { if (this.data.pageIndex >= this.data.totalPage && type) {
return return
} }
...@@ -157,7 +155,6 @@ Page({ ...@@ -157,7 +155,6 @@ Page({
//切换类型 //切换类型
setActiveTag: function (e) { setActiveTag: function (e) {
let index = e.target.id.split('active')[1] let index = e.target.id.split('active')[1]
console.log(index)
this.setData({ this.setData({
dropdownActive: Number(index), dropdownActive: Number(index),
tagBoxShow: false, tagBoxShow: false,
......
...@@ -5,14 +5,9 @@ Page({ ...@@ -5,14 +5,9 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
// urlHref: "http://activity.oytour.com/html/GT_activities.html",
urlHref:"http://127.0.0.1:5500/html/GT_activities.html", urlHref:"http://127.0.0.1:5500/html/GT_activities.html",
}, },
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) { onLoad: function (options) {
let admin = wx.getStorageSync('admin'); let admin = wx.getStorageSync('admin');
let customerId = admin.id; let customerId = admin.id;
...@@ -21,59 +16,10 @@ Page({ ...@@ -21,59 +16,10 @@ Page({
let secretKey = admin.secretKey; let secretKey = admin.secretKey;
let platform = "xcx"; let platform = "xcx";
let urlHref = this.data.urlHref + "?customerId=" + customerId + '&accountId=' + accountId + '&token=' + token + '&secretKey=' + secretKey + '&platform=' + platform; let urlHref = this.data.urlHref + "?customerId=" + customerId + '&accountId=' + accountId + '&token=' + token + '&secretKey=' + secretKey + '&platform=' + platform;
console.log("urlHref", urlHref)
this.setData({ this.setData({
urlHref: urlHref urlHref: urlHref
}) })
}, },
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })
\ No newline at end of file
...@@ -136,6 +136,14 @@ const getNextMonth = (date) => { ...@@ -136,6 +136,14 @@ const getNextMonth = (date) => {
var t2 = year2 + '-' + month2 + '-' + day2; var t2 = year2 + '-' + month2 + '-' + day2;
return t2; return t2;
} }
const shownone = text => wx.showToast({
title: text,
icon: 'none',
duration: 1000
})
module.exports = { module.exports = {
formatTime: formatTime, formatTime: formatTime,
CompareDate: CompareDate, CompareDate: CompareDate,
...@@ -146,4 +154,5 @@ module.exports = { ...@@ -146,4 +154,5 @@ module.exports = {
AddDays: AddDays, AddDays: AddDays,
getNextMonth: getNextMonth, getNextMonth: getNextMonth,
getPreMonth: getPreMonth, getPreMonth: getPreMonth,
shownone: shownone
} }
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