Commit dfa2928a by Your Name

加油

1 parent 77d655f0
import indexMixin from './indexMixin' import indexMixin from './indexMixin'
import pay from './pay'
export { export {
indexMixin indexMixin,
pay
} }
\ No newline at end of file \ No newline at end of file
import WxConfig from '@u/WxConfig'
const WX = new WxConfig(['chooseWXPay']);
export default {
data() {
return {
}
},
mounted() {
},
methods: {
chooseWXPay() {
WX.chooseWXPay().then(res => {
console.log(res)
})
},
},
}
\ No newline at end of file \ No newline at end of file
...@@ -93,22 +93,22 @@ class WxConfig { ...@@ -93,22 +93,22 @@ class WxConfig {
}) })
}) })
} }
chooseWXPay(timestamp,nonceStr,pack,signType,paySign) { chooseWXPay(timestamp,nonceStr,packages,signType,paySign) {
return this.ready(resolve => { return this.ready(resolve => {
wx.chooseWXPay({ wx.chooseWXPay({
timestamp, // 支付签名时间戳,注意微信js sdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 timestamp, // 支付签名时间戳,注意微信js sdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
nonceStr, // 支付签名随机串,不长于 32 位 nonceStr, // 支付签名随机串,不长于 32 位
package:pack, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*) package:packages, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)
signType, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5' signType, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
paySign, // 支付签名 paySign, // 支付签名
success(res) { success(res) {
resolve(res) resolve(res)
}, },
fail: function () { fail() {
window.vm.showToast('已取消支付')
}, },
cancel: function () { cancel() {
window.vm.showToast('支付失败,请重试')
} }
}) })
}) })
......
...@@ -97,6 +97,7 @@ export default { ...@@ -97,6 +97,7 @@ export default {
this.hideLoading() this.hideLoading()
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
console.log(data)
} else { } else {
this.showToast(message) this.showToast(message)
} }
......
...@@ -14,7 +14,15 @@ ...@@ -14,7 +14,15 @@
<script> <script>
export default { export default {
name: "opening" name: "opening",
data() {
return {
}
},
methods: {
}
} }
</script> </script>
......
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
<!-- <div class="business-select-price2">¥299 <span>权益价</span></div>--> <!-- <div class="business-select-price2">¥299 <span>权益价</span></div>-->
</div> </div>
</div> </div>
<div class="business-item business-number"> <!-- <div class="business-item business-number">-->
<div class="business-item-label">购买数量<span>最多购买10张</span></div> <!-- <div class="business-item-label">购买数量<span>最多购买10张</span></div>-->
<van-stepper v-model="bussinessNumber" theme="round" button-size="22" disable-input max="10"/> <!-- <van-stepper v-model="bussinessNumber" theme="round" button-size="22" disable-input max="10"/>-->
</div> <!-- </div>-->
<div class="business-item business-number-n">已抢光</div> <div class="business-item business-number-n">已抢光</div>
<div class="business-item"> <div class="business-item">
<div class="business-item-label">质保质期</div> <div class="business-item-label">质保质期</div>
...@@ -80,9 +80,9 @@ ...@@ -80,9 +80,9 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import WxConfig from '@u/WxConfig' import { pay} from '@/mixins'
const WX = new WxConfig(['chooseWXPay']);
export default { export default {
mixins: [pay],
name: "business", name: "business",
data() { data() {
return { return {
...@@ -101,14 +101,6 @@ export default { ...@@ -101,14 +101,6 @@ export default {
getMore() { getMore() {
this.show = true; this.show = true;
}, },
//支付
chooseWXPay() {
WX.chooseWXPay().then(res => {
console.log(res)
}).catch(error=>{
console.log(error)
})
},
selectBusiness(index) { selectBusiness(index) {
this.bindex = index this.bindex = index
}, },
...@@ -129,8 +121,10 @@ export default { ...@@ -129,8 +121,10 @@ export default {
top: 30px; top: 30px;
width: 40px; width: 40px;
height: 174px; height: 174px;
background: #F0F0F0; background: #e4e4e4;
opacity: .95;
z-index: 10; z-index: 10;
border-radius: 6px;
.business-more-b { .business-more-b {
text-align: center; text-align: center;
width: 14px; width: 14px;
......
...@@ -49,17 +49,24 @@ ...@@ -49,17 +49,24 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
export default { export default {
name: "process" name: "process",
data() {
return {
status: 1
}
},
mounted() {
console.log(window.vm)
},
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.main { .main {
.process-title { .process-title {
height: 46px; margin-top: 16px;
line-height: 46px; line-height: 20px;
padding-left: 20px; padding-left: 20px;
margin: 0 auto;
font-weight: 700; font-weight: 700;
color: #333333; color: #333333;
font-size: 14px; font-size: 14px;
...@@ -68,6 +75,16 @@ export default { ...@@ -68,6 +75,16 @@ export default {
.process-step-panel { .process-step-panel {
border-bottom: 6px solid #F4F4F4; border-bottom: 6px solid #F4F4F4;
padding: 0px 10px 20px 10px; padding: 0px 10px 20px 10px;
.van-step--vertical {
padding: 16px 16px 16px 0;
}
.van-step__circle-container {
top: 26px;
}
.van-step__line {
height: 30px;
top: 38px;
}
h3 { h3 {
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
......
...@@ -35,15 +35,15 @@ ...@@ -35,15 +35,15 @@
<van-icon name="smile-comment-o" class="card-roll-icon"/> <van-icon name="smile-comment-o" class="card-roll-icon"/>
<div>客服</div> <div>客服</div>
</div> </div>
<div class="recharge-operation"><span>8.00元</span>立即充值</div> <div class="recharge-operation" @click="chooseWXPay"><span>8.00元</span>立即充值</div>
</div> </div>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import WxConfig from '@u/WxConfig' import { pay} from '@/mixins'
const WX = new WxConfig(['chooseWXPay']);
export default { export default {
mixins: [pay],
name: "recharge", name: "recharge",
data() { data() {
return { return {
...@@ -57,14 +57,6 @@ export default { ...@@ -57,14 +57,6 @@ export default {
getCard() { getCard() {
window.vm.$router.push({ name: 'cardRoll.index' }) window.vm.$router.push({ name: 'cardRoll.index' })
}, },
//支付
chooseWXPay() {
WX.chooseWXPay().then(res => {
console.log(res)
}).catch(error=>{
console.log(error)
})
},
selectType(item) { selectType(item) {
this.typeSno = item; this.typeSno = item;
}, },
......
...@@ -2,19 +2,20 @@ ...@@ -2,19 +2,20 @@
<div class="main"> <div class="main">
<div class="box"> <div class="box">
<div class="de-header"> <div class="de-header">
<img src="@a/images/marketing/bg.png"> <img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAAQABAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/2wBDAQUFBQcGBw4ICA4eFBEUHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh7/wAARCABLAEsDASIAAhEBAxEB/8QAGgAAAwADAQAAAAAAAAAAAAAAAwQFAAIGAf/EADUQAAIBAwIDBQUGBwAAAAAAAAECAwAEEQUhEjFRBhMyQXEUImGBwQcjUnOhsRYzQmJygpL/xAAaAQADAAMBAAAAAAAAAAAAAAACAwQAAQYF/8QAKxEAAgEDAgMGBwAAAAAAAAAAAQIAAwQREiEFMUETMlGRwfAUImFxgaGx/9oADAMBAAIRAxEAPwDrIYCwG1OwQFRyreCMYp2JfdwaW9SQUqIECkIbyrHgydqaWPBooQCkl5ToBkx4WTlXiOy881VMHH5Vr7IB4hWdoIJonpEBIehrYStnlVCOzUjOAPWltZ1Ls5aXWnadHPdNeX5xbs0REc3UqcYIHrQ9oNQUDMatBypboJqZPdoRcZorREHFD7o0QxA3nluuMU6iZxSMbFTyNULd84oXm0xymxQqKyMEnGKPwkiiQx75NKLbRwXeeIp22ovd7b0dEHStuEGklo0LBWdv393FAOTsAfTzo/bZbUXmlxNFEXhLtACo+7wmCV6bHHzpzQYs6irgeBSfpXPdopZLr7Ru64wYLTSyxXH9ckuAf+YzSQS1cfQSlQFoMcc4NwDuKAU3puVOHOKWbmedWgzz2GJ7DEvLAppIx5LU9dQsIz793CPgHBP6U3Fqlqw+5S4m/LgY/SsZX8Ipbm3G2seeY4qgDGKOiYFIrd3Ln7vTLojq5RB+po4fU28NraxD++Ysf0H1pRU9T+4wXKnugn8H1AjQ2rOMdKW7nUX8d5bx/lwE/uaPa2jpdC3NxJcztgNxhVSP0A5n1oCABzlVqla5fSqEDqSRgeRMs9nQCZ5McsD61zzLa/xTq17JEzu6xRAq2x4OLY9MFjy55rr4IPY7N0LcZyST8q42VnlBKEglzJgeZJqWkdVVj797TobKyp1AVfcCPyoiqjTW8Co/IBT+/OlpdPtmcss5jB3CleLHz86ralCy9n4rtiGAYEfAVIt5UaBGJG486oUtzEcbKhcJnTyONpEtika4jRE/xUD9qetZWJ94k0NLdQAQKKmAcVWxBnHopEfiY4o6nNLxchR06VIZSIQHBB6Gp63zWOuTCT8ZZSfMHcU+Kl6xa96MyBgiglJUHEY/gwG5X4jcVigE4M9vg9xSp1ClXk0Yvu0ms3t5JpNlokkUBA4tSedeDB58KeInmKq6BpInuBx7RqMn0rieLUbRO/jImgPKSNuND8xTth2juBbyQITxuMbURoYHyTozw5lpH4dhg9Z0PbTVFvbyLSrIgxpscHYmuAm7Q9p55Wk7O6FYXml54be4mnKNKBsWA/CSCR1GDR9RD30zaDayN3kyB9TnU/yYG5Rg+TybjqE4j5iqi2/dqscaKiIAqqowFA2AHwqmki013Gfv/ffrOa4pe9hptrY7LzPiZQEZ4dq9SE8WTRkoyAbbVOXM8XSJpGpzRQDWygVtQEwgJgrCaxuVDNam4pcadbSytMne207c5beQxufXGzf7A1PutN1dQWtrzTZ5QPclu7LDqfIkxkBvQqM1aBNe+VGHIjqVzWpdxiJK0XSYdKsvZ0d5pXcy3E8mOOeVvE7fE9OQAAGwpooOlMPQSd62WLHJk8//2Q==">
</div> </div>
<div class="box-detail">
<div class="de-desc"> <div class="de-desc">
<div class="de-desc-title">中国海油协和升山加油站</div> <div class="de-desc-title">中国海油协和升山加油站</div>
<div class="de-desc-price"> <div class="de-desc-price">
<span>¥6.57/升</span> <span>¥6.57/升</span>
<span>国标价¥6.78</span> <span class="line-through">国标价¥6.78</span>
<span>每升优惠0.21元</span> <span>每升优惠0.21元</span>
</div> </div>
<div class="de-desc-select">站内开票</div> <div class="de-desc-select">站内开票</div>
<div class="de-desc-localtion"> <div class="de-desc-localtion">
<span>南山区西丽留仙大道北侧中段</span> <div>南山区西丽留仙大道北侧中段</div>
<span>距离10cm</span> <div><img src="@a/images/navigation.png" alt="">距离10cm</div>
</div> </div>
</div> </div>
<div class="de-select"> <div class="de-select">
...@@ -32,6 +33,7 @@ ...@@ -32,6 +33,7 @@
<p>1、请先加油后下单,即您到站后,与工作人员确认油号、枪号后再付款。</p> <p>1、请先加油后下单,即您到站后,与工作人员确认油号、枪号后再付款。</p>
<p>2、请勿先付款后加油。若您已先下单付款,请于24小时内到加油站完成加油;若您48小时内未完成加油,请及时发起退单;逾期退单可能会退单失败。</p> <p>2、请勿先付款后加油。若您已先下单付款,请于24小时内到加油站完成加油;若您48小时内未完成加油,请及时发起退单;逾期退单可能会退单失败。</p>
</div> </div>
</div>
<div class="de-btn-p"> <div class="de-btn-p">
<div class="de-btn">下一步</div> <div class="de-btn">下一步</div>
</div> </div>
...@@ -69,93 +71,129 @@ export default { ...@@ -69,93 +71,129 @@ export default {
min-height: 100%; min-height: 100%;
width: 100%; width: 100%;
overflow-x: hidden; overflow-x: hidden;
padding: 0 6px;
box-sizing: border-box; box-sizing: border-box;
>.de-header { >.de-header {
img { img {
width: 375px; width: 375px;
height: 100px; height: 185px;
} }
} }
>.de-desc { .box-detail {
padding: 10px; position: absolute;
margin-top: 10px; top: 120px;
border-radius: 6px; padding: 15px;
}
.de-desc {
padding: 15px;
border-radius: 8px;
background: #FFFFFF; background: #FFFFFF;
>.de-desc-price { .de-desc-title {
font-size: 14px;
color: #333333;
line-height: 30px;
}
.de-desc-price {
font-size: 14px;
color: #FE6B00;
>span { >span {
margin-right: 30px; margin-right: 10px;
&:nth-child(1) { &:nth-child(1) {
} }
&:nth-child(2) { &:nth-child(2) {
text-decoration:line-through; font-size: 10px;
color: #999999;
margin-right: 50px;
} }
&:nth-child(3) { &:nth-child(3) {
display: inline-block;
padding: 1px;
border: 1px solid #666666;
border-radius: 8px;
} }
} }
} }
>.de-desc-select { >.de-desc-select {
border: 1px solid #666666;
display: inline-block; display: inline-block;
border-radius: 3px; background: #FE6000;
padding: 1px 3px; border-radius: 16px;
color: #FFFFFF;
font-size: 10px;
padding: 2px 5px;
margin: 10px 0px;
} }
>.de-desc-localtion { >.de-desc-localtion {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 12px;
color: #333333;
img {
width: 14px;
height: 14px;
margin-right: 3px;
}
} }
} }
>.de-select { .de-select {
padding: 16px 10px; padding: 15px;
margin-top: 10px; margin-top: 10px;
border-radius: 6px; border-radius: 6px;
background: #FFFFFF; background: #FFFFFF;
>.select-item-title {
font-size: 14px;
color: #4C4C4C;
}
>.select-item-panel { >.select-item-panel {
margin-top: 12px; margin-top: 12px;
display: flex; display: flex;
>.select-item { >.select-item {
width: 50px; width: 40px;
height: 30px; height: 20px;
margin-bottom: 6px; margin-bottom: 15px;
margin-right: 6px; margin-right: 20px;
text-align: center; text-align: center;
border: 1px solid #666666; border: 1px solid #7E7E7E;
line-height: 30px; border-radius: 4px;
border-radius: 10px; box-sizing: border-box;
line-height: 20px;
font-size: 12px;
color: #777777;
&.checked { &.checked {
background: #2f77f3; background: #FE6000;
color: #FFFFFF;
border: none;
} }
} }
} }
} }
>.de-explain { .de-explain {
padding: 16px 10px; padding: 15px;
border-radius: 6px; border-radius: 8px;
margin-top: 10px; margin-top: 10px;
background: #FFFFFF; background: #FFFFFF;
margin-bottom: 50px;
>.de-explain-title { >.de-explain-title {
font-size: 16px;
line-height: 30px; line-height: 30px;
font-size: 14px;
color: #565656;
} }
>p { >p {
font-size: 12px;
line-height: 20px; line-height: 20px;
margin-top: 6px;
font-size: 14px;
color: #666666;
} }
} }
>.de-btn-p { .de-btn-p {
position: fixed;
width: 100%;
height: 50px;
bottom: 0px;
background: #FFFFFF;
.de-btn { .de-btn {
margin: 3px auto;
background: #008FFF;
color: #FFFFFF;
text-align: center; text-align: center;
margin: 10px auto; width: 343px;
border: 1px solid #666666; height: 44px;
width: 350px; line-height: 44px;
height: 42px; border-radius: 20px;
line-height: 42px;
border-radius: 10px;
} }
} }
} }
......
...@@ -5,21 +5,24 @@ ...@@ -5,21 +5,24 @@
<van-search <van-search
v-model="input" v-model="input"
show-action show-action
shape="round"
clearable
placeholder="请输入目的地或加油站名称" placeholder="请输入目的地或加油站名称"
@search="onSearch" @search="onSearch"
> >
<template #action> <template #action>
<div @click="onSearch">搜索</div> <div @click="onSearch" class="search-btn" v-if="localStatus">搜索</div>
<div @click="onCancel" class="search-btn" v-if="!localStatus">取消</div>
</template> </template>
</van-search> </van-search>
</div> </div>
<map-search v-show="!localStatus" :keyword="input" ref="maps" @selectLocation="selectLocation"></map-search> <map-search v-show="!localStatus" :keyword="input" ref="maps" @selectLocation="selectLocation"></map-search>
<div class="location-result" v-show="localStatus"> <div class="location-result" v-show="localStatus">
<div class="location-now-h"> <div class="location-now-h">
<div class="location-now-h1">当前定位</div> <div class="location-now-h1">当前定位<van-icon name="location" class="location-icon"/></div>
<div class="location-now-h2"> <div class="location-now-h2">
<div class="loaction-now-address">世界之窗</div> <div class="location-now-address">世界之窗</div>
<div class="loaction-now-refresh" @click="handleLocation">重新定位<van-icon name="replay" :class="{'refresh-animation':this.refresh}"/></div> <div class="location-now-refresh" @click="handleLocation"><img src="@a/images/repositioning.png" alt="">重新定位</div>
</div> </div>
</div> </div>
<div class="location-history"> <div class="location-history">
...@@ -29,7 +32,7 @@ ...@@ -29,7 +32,7 @@
</div> </div>
<div class="location-history-list"> <div class="location-history-list">
<div class="location-history-item" v-for="(item,index) in hisList" :key="index"> <div class="location-history-item" v-for="(item,index) in hisList" :key="index">
<div class="history-list-icon"><van-icon name="clock-o" class="history-icons"/>asdfsd</div> <div class="history-list-icon">asdfsd</div>
<div class="history-list-clear"><van-icon name="cross" /></div> <div class="history-list-clear"><van-icon name="cross" /></div>
</div> </div>
</div> </div>
...@@ -44,19 +47,6 @@ import mapSearch from './map-search' ...@@ -44,19 +47,6 @@ import mapSearch from './map-search'
import AMap from 'AMap'; import AMap from 'AMap';
import WxConfig from '@u/WxConfig' import WxConfig from '@u/WxConfig'
const WX = new WxConfig(['scanQRCode', 'chooseImage', 'getLocation']); const WX = new WxConfig(['scanQRCode', 'chooseImage', 'getLocation']);
const throttle = (fn, gapTime) => {
if (gapTime == null || gapTime == undefined) {
gapTime = 1500
}
let _lastTime = null
return function() {
let _nowTime = +new Date()
if (_nowTime - _lastTime > gapTime || !_lastTime) {
fn.apply(this, arguments)
_lastTime = _nowTime
}
}
}
export default { export default {
name: "location", name: "location",
data() { data() {
...@@ -70,17 +60,35 @@ export default { ...@@ -70,17 +60,35 @@ export default {
components: { components: {
mapSearch mapSearch
}, },
watch: {
input(newValue, oldValue) {
if (newValue !== oldValue) {
this.ms = 1000;
clearTimeout(this.timeID);
this.timeID = setTimeout(() => {
this.onSearch();
}, this.ms)
}
}
},
mounted() {
},
methods: { methods: {
//重新定位 //重新定位
handleLocation: throttle(function (){ handleLocation() {
this.refresh = true; if(!this.refresh) {
this.getLocation(); this.getLocation();
},2000), this.refresh = true;
getLocation(){
let _this = this;
setTimeout(()=>{ setTimeout(()=>{
_this.refresh = false; this.refresh = false;
},2000) },1000)
}
},
// handleLocation: Vue.prototype.throttle(function (){
// this.refresh = true;
// this.getLocation();
// },2000),
getLocation(){
WX.getLocation().then(res => { WX.getLocation().then(res => {
AMap.plugin('AMap.Geocoder', () => { AMap.plugin('AMap.Geocoder', () => {
const geocoder = new AMap.Geocoder() const geocoder = new AMap.Geocoder()
...@@ -92,43 +100,64 @@ export default { ...@@ -92,43 +100,64 @@ export default {
}) })
}) })
}, },
onCancel() {
this.localStatus = true;
},
onSearch(){ onSearch(){
this.localStatus = false; this.localStatus = false;
this.$refs.maps.onSearch(); this.$refs.maps.onSearch();
}, },
selectLocation(value) { selectLocation(value) {
window.vm.$router.push({ name: 'oilStation.index',query:{location:value}}) window.vm.$router.push({ path: '/oilStation/index',query:{location:JSON.stringify(value)}})
} }
} }
} }
</script> </script>
<style>
.amap_lib_placeSearch {
border: none;
}
.amap_lib_placeSearch {
width: 100%;
}
</style>
<style scoped lang='scss'> <style scoped lang='scss'>
.main { .main {
.box { .box {
.search-btn {
font-size: 14px;
color: #008FFF;
}
.location-result { .location-result {
padding: 0 30px; padding: 0 15px;
.location-now-h { .location-now-h {
line-height: 30px; line-height: 30px;
margin-bottom: 30px; margin-bottom: 30px;
.location-now-h1 {
font-size: 14px;
color: #666666;
>.location-icon {
font-size: 12px;
color: #333333;
margin-left: 3px;
vertical-align: middle;
}
}
.location-now-h2 { .location-now-h2 {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
>.loaction-now-refresh { align-items: center;
color: #fa5151; font-size: 14px;
color: #333333;
.location-now-refresh {
font-size: 10px;
color: #008FFF;
}
img {
width: 15px;
height: 15px;
vertical-align: text-top;
margin-right: 3px;
} }
} }
} }
.location-history-t { .location-history-t {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 14px;
color: #333333;
} }
.location-history-list { .location-history-list {
margin-top: 30px; margin-top: 30px;
...@@ -136,10 +165,15 @@ export default { ...@@ -136,10 +165,15 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
line-height: 30px; line-height: 24px;
height: 30px; height: 24px;
margin-bottom: 10px; margin-bottom: 10px;
.history-list-icon {
padding-left: 30px;
}
.history-icons { .history-icons {
font-size: 14px;
color: #666666;
margin-right: 10px; margin-right: 10px;
vertical-align: middle; vertical-align: middle;
} }
......
...@@ -46,10 +46,16 @@ export default { ...@@ -46,10 +46,16 @@ export default {
}); });
}, },
onSearch(){ onSearch(){
this.pageIndex = 1;
this.localList = [];
this.onLocation();
},
onLocation() {
this.showLoading();
let _this = this; let _this = this;
placeSearch.setPageIndex(this.pageIndex); placeSearch.setPageIndex(this.pageIndex);
placeSearch.search(this.keyword, function(status, result) { placeSearch.search(this.keyword, function(status, result) {
console.log(status,result) _this.hideLoading();
if(status == 'complete') { if(status == 'complete') {
let poiList = result.poiList.pois; let poiList = result.poiList.pois;
_this.localList = _this.localList.concat(poiList); _this.localList = _this.localList.concat(poiList);
...@@ -58,12 +64,13 @@ export default { ...@@ -58,12 +64,13 @@ export default {
_this.localList = []; _this.localList = [];
} }
}); });
}, },
searchMore() { searchMore() {
//查看更多搜索数据
this.pageIndex ++; this.pageIndex ++;
this.onSearch(); this.onLocation();
}, },
//选择定位
selectAddress(value) { selectAddress(value) {
this.$emit('selectLocation',value) this.$emit('selectLocation',value)
}, },
...@@ -82,11 +89,13 @@ export default { ...@@ -82,11 +89,13 @@ export default {
.list-address { .list-address {
margin-left: 10px; margin-left: 10px;
&-n { &-n {
font-size: 16px;
line-height: 24px; line-height: 24px;
font-size: 14px;
color: #151515;
} }
&-d { &-d {
font-size: 12px;
color: #999999;
} }
} }
} }
...@@ -94,6 +103,8 @@ export default { ...@@ -94,6 +103,8 @@ export default {
text-align: center; text-align: center;
margin-top: 20px; margin-top: 20px;
line-height: 30px; line-height: 30px;
color: #008FFF;
font-size: 14px;
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="main"> <div class="main">
<div class="oil-panel"> <div class="oil-panel">
<div class="oil-item" v-for="(item,key) in oilList" :key="key"> <div class="oil-item" :class="{'refund-status': index==2}" v-for="(item,index) in oilList" :key="index">
<div class="item-title"> <div class="item-title">
<div class="item-title-time">2020-11-20 10:50:06</div> <div class="item-title-time">2020-11-20 10:50:06</div>
<div class="item-title-status">已支付</div> <div class="item-title-status" style="color: #248B20;">已支付</div>
</div> </div>
<div class="item-desc"> <div class="item-desc">
<div class="item-desc-img">
</div>
<div class="item-desc-detail"> <div class="item-desc-detail">
<div class="item-desc-name">中国海油协和升山加油站</div> <div class="item-desc-name">中国海油协和升山加油站</div>
<div class="item-desc-total"> <div class="item-desc-total">
<span>加油金额</span> <span>加油金额:200元</span>
<span>实付100</span> <span>实付100</span>
</div> </div>
<div class="item-desc-number"> <div class="item-desc-number">
<div>
<span>36.23升</span> <span>36.23升</span>
<span>92#</span> <span>92#</span>
</div>
<span>优惠10.2元</span> <span>优惠10.2元</span>
</div> </div>
</div> </div>
...@@ -34,7 +33,7 @@ export default { ...@@ -34,7 +33,7 @@ export default {
name: "record", name: "record",
data() { data() {
return { return {
oilList: [1,2] oilList: [1,2,1,1,]
} }
}, },
} }
...@@ -45,38 +44,59 @@ export default { ...@@ -45,38 +44,59 @@ export default {
.oil-panel { .oil-panel {
background: #f2f2f2; background: #f2f2f2;
position: absolute; position: absolute;
min-height: 100%; height: 100%;
width: 100%; width: 100%;
overflow-x: hidden; overflow-x: hidden;
padding: 0 6px; padding: 15px;
box-sizing: border-box; box-sizing: border-box;
>.oil-item { >.oil-item {
padding: 16px 10px; padding: 0px 15px;
border-radius: 5px; border-radius: 5px;
margin: 5px auto; margin-bottom: 15px;
background: #FFFFFF; background: #FFFFFF;
&.refund-status {
* {
color: #999999!important;
}
}
>.item-title { >.item-title {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 10px; height: 30px;
line-height: 30px;
border-bottom: 1px solid #E9E9E9;
font-size: 14px;
color: #333333;
.item-title-status {
font-size: 12px;
} }
>.item-desc {
display: flex;
.item-desc-img {
width: 100px;
height: 80px;
background: #dddddd;
} }
>.item-desc {
.item-desc-detail { .item-desc-detail {
margin-left: 20px; .item-desc-name {
flex: 1; font-size: 14px;
>div { color: #333333;
line-height: 24px;
}
.item-desc-total {
font-size: 12px;
color: #FE6000;
display: flex; display: flex;
height: 26px;
line-height: 26px;
justify-content: space-between; justify-content: space-between;
line-height: 24px;
>span {
&:last-child {
font-size: 14px;
color: #333333;
}
}
} }
.item-desc-number { .item-desc-number {
font-size: 12px;
color: #FE6000;
display: flex;
justify-content: space-between;
line-height: 24px;
>span { >span {
&:nth-child(3) { &:nth-child(3) {
display: inline-block; display: inline-block;
...@@ -89,9 +109,9 @@ export default { ...@@ -89,9 +109,9 @@ export default {
} }
} }
>.item-order { >.item-order {
line-height: 22px; line-height: 26px;
font-size: 14px; font-size: 10px;
margin-top: 10px; color: #999999;
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!