diff --git a/src/main.js b/src/main.js index 6a10fd0..9beb994 100644 --- a/src/main.js +++ b/src/main.js @@ -1,5 +1,5 @@ import Vue from 'vue' -import { Popup, Toast, Picker, Tag, Tab, Tabs, Area, Search, Swipe, SwipeItem, Cell, List, Collapse, CollapseItem, Button, Field, Icon, Sticky, DropdownMenu, DropdownItem, Rate, Calendar, Checkbox, Empty, Lazyload, Radio, RadioGroup, CellGroup, Dialog, CheckboxGroup, NavBar } from 'vant'; +import { Popup, Toast, Picker, Tag, Tab, Tabs, Area, Search, Swipe, SwipeItem, Cell, List, Collapse, CollapseItem, Button, Field, Icon, Sticky, DropdownMenu, DropdownItem, Rate, Calendar, Checkbox, Empty, Lazyload, Radio, RadioGroup, CellGroup, Dialog, CheckboxGroup, NavBar, PullRefresh } from 'vant'; import App from './App.vue' import router from './router' import store from './store' @@ -44,6 +44,7 @@ Vue .use(Toast) .use(Dialog) .use(NavBar) + .use(PullRefresh) .use(RadioGroup) .use(Radio); Vue.config.productionTip = false; diff --git a/src/views/Home/MyClassList.vue b/src/views/Home/MyClassList.vue index 902dacb..9b29b4e 100644 --- a/src/views/Home/MyClassList.vue +++ b/src/views/Home/MyClassList.vue @@ -147,7 +147,7 @@ export default { } var basePosition = [this.baseInfo.signLong, this.baseInfo.signLat]; AMap.convertFrom(basePosition, 'baidu', function (status, result) { - console.log(result) + console.log('基地定位转换:',result) if (result.info === 'ok') { basePosition = [result.locations[0].lng, result.locations[0].lat]; // Array. } @@ -156,10 +156,12 @@ export default { message: '请求中...', }); this.getNowPosition((posi) => { //获取当前位置坐标 + console.log('获取当前位置坐标:',posi) this.$toast.clear(); if (posi) { var nowPosition = [posi.position.lng, posi.position.lat]; var distance = AMap.GeometryUtil.distance(nowPosition, basePosition); + console.log('两点距离:',distance) console.log(parseInt(distance), nowPosition, basePosition) if (parseInt(distance) > 500) { this.failShow = true; diff --git a/src/views/Home/component/HomeScan.vue b/src/views/Home/component/HomeScan.vue index 560d761..cd27f23 100644 --- a/src/views/Home/component/HomeScan.vue +++ b/src/views/Home/component/HomeScan.vue @@ -12,12 +12,12 @@ export default { "type": "qrCode" }).then(res => { console.log(res) - const qrcode = res.qrcode + const qrcode = res.text if(qrcode.length>10){ this.$toast.fail('请扫描正确的基地码') return; } - this.$router.push({ name: 'MyClassList', query: { qrresult: res.qrcode } }) + this.$router.push({ name: 'MyClassList', query: { qrresult: res.text } }) }).catch(err => { console.log(err) }) diff --git a/src/views/Service/CheckOrder.vue b/src/views/Service/CheckOrder.vue index 62b8cfb..00674f5 100644 --- a/src/views/Service/CheckOrder.vue +++ b/src/views/Service/CheckOrder.vue @@ -248,17 +248,22 @@ export default { "payWay": 0, "productId": this.showCourseData.id, //商品id "quit_url": location.href, - "subject": "研学产品", - "totalFee": "0.01", + "subject": this.showCourseData.course_name + '_' + this.date, + "totalFee": this.selectCombo.actualPrice * 1000 * this.count / 1000 }, onSuccess: res => { console.log(res) localStorage.setItem('outTradeNo', data.trade_no) - // res.data.data默认是我们拿到的form代码 - const div = document.createElement('div') - div.innerHTML = res.data.message + // this.BridgePay(res.data.message) + let divForm = document.getElementsByTagName('divform') + if (divForm.length) { + document.body.removeChild(divForm[0]) + } + const div = document.createElement('divform') + div.innerHTML = res.data.message // res.data就是sb支付宝返回给你的form document.body.appendChild(div) - document.forms[0].submit() //重要,这个才是点击跳页面的核心 + // document.forms[0].setAttribute('target', '_blank') // 加了_blank可能出问题所以我注释了 + document.forms[0].submit() }, onFail: err => { console.log('err', err) @@ -267,15 +272,25 @@ export default { } }, // 支付API - BridgePay (credential) { - var payMsg = { - platform: 1, - arg: { - "credential": credential, - "inSandBox": false - } - }; - }, + // BridgePay (credential) { + // var payMsg = { + // platform: 1, + // arg: { + // "credential": credential, + // "inSandBox": false + // } + // }; + // ZWJSBridge.pay(payMsg).then((result) => { + + // alert('支付成功!'); + // console.log('#### ZWJSBridge.pay() result:' + result); + + // }).catch((error) => { + // var errorMsg = JSON.stringify(error); + // alert('支付失败:' + errorMsg); + // console.log('#### ZWJSBridge.pay() error:' + error); + // }); + // }, //判断是否为支付会跳,查询订单状态 getOrderStatus (outTradeNo) { console.log('getOrderStatus') diff --git a/src/views/Service/ServiceBaseKQ.vue b/src/views/Service/ServiceBaseKQ.vue index 2743e83..52aa53b 100644 --- a/src/views/Service/ServiceBaseKQ.vue +++ b/src/views/Service/ServiceBaseKQ.vue @@ -10,7 +10,9 @@ - + + +
@@ -30,24 +32,34 @@
- +
- + + + - + + + - + + + - + + + - + + +
@@ -84,6 +96,7 @@ export default { riverList: [], tabName: 'KQ', campList: [], + loading: false } }, watch: { @@ -106,6 +119,22 @@ export default { this.initService() }, methods: { + onRefresh (list) { + if(list=='campList'){ + this.getCampList() + }else if(list=='uniList'){ + this.getUniList() + }else if(list=='weekList'){ + this.getWeekList() + }else if(list=='cityList'){ + this.getCityList() + }else if(list=='selectList'){ + this.getSelectList() + }else if(list=='riverList'){ + this.getRiverList() + } + + }, initService () { this.getUniList() this.getWeekList() @@ -138,7 +167,6 @@ export default { "channelCode": "" }, onSuccess: data => { - console.log('data', data) this.$toast.clear() let uniList = data.data.data; for (let i in uniList) { @@ -149,7 +177,9 @@ export default { uniList[i].endDate = this.Moment(uniList[i].endDate).format('YYYY.M.D'); } } + this.loading = false this.uniList = uniList + console.log('革命遗址:', data) }, onFail: err => { console.log('err', err) @@ -178,7 +208,6 @@ export default { "channelCode": "" }, onSuccess: data => { - console.log('data', data) let weekList = data.data.data; for (let i in weekList) { weekList[i].course_labels = weekList[i].course_labels?.split(','); @@ -188,7 +217,9 @@ export default { weekList[i].endDate = this.Moment(weekList[i].endDate).format('YYYY.M.D'); } } + this.loading = false this.weekList = weekList + console.log('文化传承:', weekList) }, onFail: err => { console.log('err', err) @@ -217,7 +248,6 @@ export default { "channelCode": "" }, onSuccess: data => { - console.log('data', data) let cityList = data.data.data; for (let i in cityList) { cityList[i].course_labels = cityList[i].course_labels?.split(','); @@ -227,7 +257,9 @@ export default { cityList[i].endDate = this.Moment(cityList[i].endDate).format('YYYY.M.D'); } } + this.loading = false this.cityList = cityList + console.log('红色军旅:', cityList) }, onFail: err => { console.log('err', err) @@ -256,7 +288,6 @@ export default { "channelCode": "" }, onSuccess: data => { - console.log('data', data) let selectList = data.data.data; for (let i in selectList) { selectList[i].course_labels = selectList[i].course_labels?.split(','); @@ -266,7 +297,9 @@ export default { selectList[i].endDate = this.Moment(selectList[i].endDate).format('YYYY.M.D'); } } + this.loading = false this.selectList = selectList + console.log('乡村振新:', selectList) }, onFail: err => { console.log('err', err) @@ -295,7 +328,6 @@ export default { "channelCode": "" }, onSuccess: data => { - console.log('data', data) let riverList = data.data.data; for (let i in riverList) { riverList[i].course_labels = riverList[i].course_labels?.split(','); @@ -305,7 +337,9 @@ export default { riverList[i].endDate = this.Moment(riverList[i].endDate).format('YYYY.M.D'); } } + this.loading = false this.riverList = riverList + console.log('大好河山:', riverList) }, onFail: err => { console.log('err', err) @@ -335,7 +369,6 @@ export default { "channelCode": "GZH002" }, onSuccess: data => { - console.log('data', data) let campList = data.data.data; for (let i in campList) { campList[i].course_labels = campList[i].course_labels?.split(','); @@ -345,7 +378,9 @@ export default { campList[i].endDate = this.Moment(campList[i].endDate).format('YYYY.M.D'); } } + this.loading = false this.campList = campList + console.log('每周一营:', data) }, onFail: err => { console.log('err', err) @@ -369,7 +404,7 @@ export default { // 我的优惠券 handleMyCard () { // this.$toast('暂未开放,敬请期待!'); - this.$router.push({ name: 'CardBoxXST', query: { active: 1} }) + this.$router.push({ name: 'CardBoxXST', query: { active: 1 } }) }, formatWeek (week) { return week == 1 ? '周一' : week == 2 ? '周二' : week == 3 ? '周三' : week == 4 ? '周四' : week == 5 ? '周五' : week == 6 ? '周六' : week == 0 ? '周日' : ''; @@ -378,6 +413,10 @@ export default { handleBanner () { location.href = 'https://mp.weixin.qq.com/s/a4N3xr2nXZ-aG3OEakv-Dg' }, + handleRedLink () { + location.href = 'https://720yun.com/t/89vkzwd7pfw?scene_id=80780201' + + } }, components: { Tabbar4, @@ -491,7 +530,6 @@ export default { right: 20px; z-index: 99; } - } ::v-deep .van-search__content { @@ -582,11 +620,11 @@ export default { font-size: 44px; } } - .van-tab{ + .van-tab { font-size: 40px; } - .van-tab--active{ - font-size: 44px; + .van-tab--active { + font-size: 44px; } } } diff --git a/src/views/Service/component/ServiceListThird.vue b/src/views/Service/component/ServiceListThird.vue index ce65228..ca65fe6 100644 --- a/src/views/Service/component/ServiceListThird.vue +++ b/src/views/Service/component/ServiceListThird.vue @@ -135,7 +135,7 @@ export default { } } .cardBox_title { - height: 10vw; + min-height: 10vw; width: 100%; padding: 0 3vw; box-sizing: border-box; @@ -147,7 +147,7 @@ export default { align-items: center; .cardBox_title_red { - width: 15vw; + width: 20vw; color: red; text-align: right; } -- libgit2 0.21.0