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

111

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