Merge branch 'dev'

yj-dev
杨杰 4 years ago
commit dc1906285e
  1. 1
      Utils/Api.js
  2. 35
      common/share.js
  3. 475
      components/sl-filter/filter-view.vue
  4. 20
      components/sl-filter/iconfont/iconfont.css
  5. 122
      components/sl-filter/popup-layer.vue
  6. 302
      components/sl-filter/sl-filter.vue
  7. 12
      components/uni-search-bar/components/uni-search-bar/uni-search-bar.vue
  8. 5
      main.js
  9. 81
      pages.json
  10. 3
      pages/goods/coupon-details/coupon-details.vue
  11. 2
      pages/goods/coupons-info-details/coupons-info-details.vue
  12. 208
      pages/goods/refuel/refuel.vue
  13. 2
      pages/pay/payment/payment.vue
  14. 1
      pages/pay/success/success.vue
  15. 395
      pages/tabBar/home/home.vue
  16. 2
      pages/tabBar/user/user.vue
  17. BIN
      static/img/btjy.png
  18. BIN
      static/img/dh.png
  19. BIN
      static/img/dhl.png
  20. BIN
      static/img/fqhed.png
  21. BIN
      static/img/fqicon.png
  22. BIN
      static/img/headzq.png
  23. BIN
      static/img/jbhed.png
  24. BIN
      static/img/jbicon.png
  25. BIN
      static/img/succes.png
  26. BIN
      static/img/xiala.png
  27. BIN
      static/img/yhl.png
  28. BIN
      static/img/yql.png
  29. 13
      uni.scss

@ -135,7 +135,6 @@ export const getStoreList = params => {
/** /**
* H5 获取用户信息 * H5 获取用户信息
*/ */
//搜索门店
export const getH5UserInfo = params => { export const getH5UserInfo = params => {
return POST('GET', `${base}/wechat/getH5UserInfo`, params).then(res => res.data); return POST('GET', `${base}/wechat/getH5UserInfo`, params).then(res => res.data);
} }

@ -0,0 +1,35 @@
export default{
data(){
return {
//设置默认的分享参数
//如果页面不设置share,就触发这个默认的分享
share:{
title:'嗨森逛',
path:'/pages/tabBar/home/home',
imageUrl:'',
desc:'',
content:''
}
}
},
onShareAppMessage(res) {
return {
title:this.share.title,
path:this.share.path,
imageUrl:this.share.imageUrl,
desc:this.share.desc,
content:this.share.content,
success(res){
uni.showToast({
title:'分享成功'
})
},
fail(res){
uni.showToast({
title:'分享失败',
icon:'none'
})
}
}
}
}

@ -0,0 +1,475 @@
<template>
<view>
<view style="padding: 0px 0px;">
<view class="filter-content" v-for="(item, index) in menuList" :key="index" v-if="menuIndex == index">
<view v-if="item.isSort">
<view class="filter-content-list">
<view v-for="(detailItem,idx) in selectDetailList" :key="idx" :class="detailItem.isSelected?'filter-content-list-item-active':'filter-content-list-item-default'"
:style="{'color': detailItem.isSelected?themeColor:'#666666'}" @tap="sortTap(idx,selectDetailList,item.key)">
<text>{{detailItem.title}}</text>
</view>
</view>
</view>
<view v-else>
<!-- <view class="filter-content-title" v-if="item.detailTitle && item.detailTitle.length">
<text>{{item.detailTitle}}</text>
</view> -->
<view class="filter-content-detail">
<text v-for="(detailItem,idx) in selectDetailList" :key="idx" class='filter-content-detail-item-default' :style="{'background-color':detailItem.isSelected?themeColor:'#f6f6f6','color':detailItem.isSelected?'#FFFFFF':'#999999'}"
@tap="itemTap(idx,selectDetailList,item.isMutiple,item.key)">
{{detailItem.title}}
</text>
</view>
<view class="filter-content-footer">
<view class="filter-content-footer-item" style="color: #777777; background-color: #FFFFFF;" @tap="resetClick(selectDetailList,item.key)">
<text>重置</text>
</view>
<view class="filter-content-footer-item" :style="{'color': '#FFFFFF', 'background-color': themeColor}" @tap="sureClick">
<text>确定</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
selectArr: [],
result: {},
menuIndex: 0,
selectDetailList: [],
independenceObj: {},
selectedKey: '',
cacheSelectedObj: {},
defaultSelectedTitleObj: {}
};
},
props: {
themeColor: {
type: String,
default () {
return '#D1372C'
}
},
menuList: {
type: Array,
default () {
return []
}
},
independence: {
type: Boolean,
default: false
}
},
computed: {
selectedTitleObj() {
let obj = {}
for (let i = 0; i < this.menuList.length; i++) {
let item = this.menuList[i];
obj[item.key] = item.title;
}
return obj;
},
defaultSelectedObj() { //
return this.getSelectedObj()
},
selectedObj: {
get() {
return this.getSelectedObj()
},
set(newObj) {
return newObj;
}
}
},
methods: {
getSelectedObj() {
let obj = {}
for (let i = 0; i < this.menuList.length; i++) {
let item = this.menuList[i];
if (!this.independence && item.defaultSelectedIndex != null && item.defaultSelectedIndex.toString().length > 0) { //
if (item.isMutiple) {
obj[item.key] = [];
item.detailList[0].isSelected = false;
if (!Array.isArray(item.defaultSelectedIndex)) { //
item.defaultSelectedIndex = [item.defaultSelectedIndex];
}
for (let j = 0; j < item.defaultSelectedIndex.length; j++) { // selectedObj
item.detailList[item.defaultSelectedIndex[j]].isSelected = true;
obj[item.key].push(item.detailList[item.defaultSelectedIndex[j]].value)
}
} else {
obj[item.key] = item.detailList[item.defaultSelectedIndex].value;
this.selectedTitleObj[item.key] = item.detailList[item.defaultSelectedIndex].title;
this.defaultSelectedTitleObj[item.key] = item.detailList[item.defaultSelectedIndex].title;
item.detailList[0].isSelected = false;
item.detailList[item.defaultSelectedIndex].isSelected = true;
}
} else {
if (item.isMutiple) {
obj[item.key] = [];
} else {
obj[item.key] = '';
}
}
}
this.result = obj;
return obj;
},
// result
resetAllSelect(callback) {
let titles = [];
for (let i = 0; i < this.menuList.length; i++) {
this.resetSelected(this.menuList[i].detailList,this.menuList[i].key);
titles[this.menuList[i].key] = this.menuList[i].title;
}
let obj = {
'result': this.result,
'titles': titles,
'isReset': true
}
this.$emit("confirm", obj);
callback(this.result);
},
// result
resetSelectToDefault(callback) {
for (let i = 0; i < this.menuList.length; i++) {
this.selectDetailList = this.menuList[i].detailList;
if (this.menuList[i].defaultSelectedIndex) {
if (Array.isArray(this.menuList[i].defaultSelectedIndex)) { // falsetrue
for (let j = 0; j < this.menuList[i].defaultSelectedIndex.length; j++) {
if (this.selectDetailList[this.menuList[i].defaultSelectedIndex[j]].isSelected == false) {
this.itemTap(this.menuList[i].defaultSelectedIndex[j], this.selectDetailList, this.menuList[i].isMutiple, this
.menuList[i].key)
}
}
} else {
this.itemTap(this.menuList[i].defaultSelectedIndex, this.selectDetailList, this.menuList[i].isMutiple, this.menuList[
i].key)
}
//
let unDefaultSelectedIndexArr = this.getUnDefaultSelectedIndex(this.menuList[i])
// truefalse
for (let j = 0; j < unDefaultSelectedIndexArr.length; j++) {
if (this.selectDetailList[unDefaultSelectedIndexArr[j]].isSelected == true) {
this.itemTap(unDefaultSelectedIndexArr[j], this.selectDetailList, this.menuList[i].isMutiple, this
.menuList[i].key)
}
}
}
}
this.selectedObj = this.defaultSelectedObj;
this.result = this.defaultSelectedObj;
let obj = {
'result': this.result,
'titles': this.defaultSelectedTitleObj,
'isReset': true
}
this.$emit("confirm", obj);
callback(this.result)
},
getUnDefaultSelectedIndex(menuListItem) { //
let tempDefault = menuListItem.defaultSelectedIndex;
if (!Array.isArray(tempDefault)) {
tempDefault = [tempDefault];
}
//
let all = [];
for (let i = 0; i < menuListItem.detailList.length; i++) {
all.push(i)
}
//
var unDefaultSelectedIndex = tempDefault.filter(function(v) {
return !(all.indexOf(v) > -1)
}).concat(all.filter(function(v) {
return !(tempDefault.indexOf(v) > -1)
}));
return unDefaultSelectedIndex;
},
resetMenuList(val) {
this.menuList = val;
this.$emit('update:menuList', val)
},
menuTabClick(index) {
this.menuIndex = index;
this.selectDetailList = this.menuList[index].detailList;
this.selectedKey = this.menuList[index].key;
//
if (this.independence && !this.menuList[index].isSort) {
if (JSON.stringify(this.independenceObj) == '{}') {
this.initIndependenceObj(index);
} else {
for (let key in this.independenceObj) {
if (key != this.selectedKey) {
this.initIndependenceObj(index);
this.resetSelected(this.menuList[index].detailList, this.selectedKey);
}
}
}
}
if (this.independence && this.menuList[index].isSort) {
this.independenceObj = {};
}
if (this.independence) {
let idx = this.menuList[index].defaultSelectedIndex;
if (idx != null && idx.toString().length > 0) { //
if (this.menuList[index].isMutiple) {
for (let i = 0; i < idx.length; i++) {
if (this.menuList[index].detailList[idx[i]].isSelected == false) {
this.itemTap(idx[i], this.menuList[index].detailList, true, this.selectedKey);
}
}
} else {
if (this.menuList[index].detailList[idx].isSelected == false) {
this.itemTap(idx, this.menuList[index].detailList, false, this.selectedKey);
}
}
}
}
// #ifdef H5
this.selectedObj = this.selectedObj;
this.$forceUpdate();
// #endif
},
initIndependenceObj(index) {
this.independenceObj = {};
if (this.menuList[index].isMutiple) {
this.independenceObj[this.selectedKey] = [];
} else {
this.independenceObj[this.selectedKey] = '';
}
},
itemTap(index, list, isMutiple, key) {
if (isMutiple == true) {
list[index].isSelected = !list[index].isSelected;
if (index == 0) {
this.resetSelected(list, key)
if (!this.independence) {
this.selectedTitleObj[key] = list[index].title;
}
} else {
list[0].isSelected = false
if (list[index].isSelected) {
if (this.independence) {
this.independenceObj[this.selectedKey].push(list[index].value);
} else {
this.selectedObj[key].push(list[index].value);
}
} else {
list[index].isSelected = false;
if (this.independence) {
var idx = this.independenceObj[this.selectedKey].indexOf(list[index].value);
this.independenceObj[this.selectedKey].splice(idx, 1);
} else {
var idx = this.selectedObj[key].indexOf(list[index].value);
this.selectedObj[key].splice(idx, 1);
}
}
if (this.independence) {
this.result = this.independenceObj;
} else {
this.result = this.selectedObj;
}
}
} else {
if (index == 0) {
this.resetSelected(list, key)
if (!this.independence) {
this.selectedTitleObj[key] = list[index].title;
}
} else {
list[0].isSelected = false
if (this.independence) {
this.independenceObj[this.selectedKey] = list[index].value;
this.result = this.independenceObj;
} else {
this.selectedObj[key] = list[index].value;
this.result = this.selectedObj;
this.selectedTitleObj[key] = list[index].title;
}
for (let i = 0; i < list.length; i++) {
if (index == i) {
list[i].isSelected = true
} else {
list[i].isSelected = false
}
}
}
}
// #ifdef H5
this.$forceUpdate();
// #endif
},
resetSelected(list, key) {
if (typeof this.result[key] == 'object') {
this.result[key] = [];
this.selectedTitleObj[key] = list[0].title;
} else {
this.result[key] = '';
this.selectedTitleObj[key] = list[0].title;
}
for (let i = 0; i < list.length; i++) {
if (i == 0) {
list[i].isSelected = true;
} else {
list[i].isSelected = false;
}
}
// #ifdef H5
this.$forceUpdate();
// #endif
},
sortTap(index, list, key) {
if (this.independence) {
this.independenceObj[this.selectedKey] = list[index].value;
this.result = this.independenceObj;
} else {
this.selectedObj[key] = list[index].value;
this.result = this.selectedObj;
this.selectedTitleObj[key] = list[index].title;
}
for (let i = 0; i < list.length; i++) {
if (index == i) {
list[i].isSelected = true;
} else {
list[i].isSelected = false;
}
}
let obj = {
'result': this.result,
'titles': this.selectedTitleObj,
'isReset': false
}
this.$emit("confirm", obj);
},
sureClick() {
let obj = {
'result': this.result,
'titles': this.selectedTitleObj,
'isReset': false
}
this.$emit("confirm", obj);
},
resetClick(list, key) {
this.resetSelected(list, key)
}
}
}
</script>
<style>
.filter-content {
background-color: #FFFFFF;
}
.filter-content-title {
border-bottom: #EEEEEE 1px solid;
padding: 10px 15px;
font-size: 13px;
color: #999999;
}
.filter-content-detail {
padding: 5px 15px;
}
.filter-content-detail-item-active {
background-color: #D1372C;
color: #FFFFFF;
padding: 5px 15px;
border-radius: 20px;
margin-right: 10px;
margin-top: 10px;
display: inline-block;
font-size: 14px;
}
.filter-content-detail-item-default {
background-color: #FFFFFF;
color: #666666;
padding: 5px 15px;
border-radius: 5px;
margin-right: 10px;
margin-top: 10px;
display: inline-block;
font-size: 14px;
}
.filter-content-footer {
display: flex;
justify-content: space-between;
width: 100%;
height: 45px;
margin-top: 10px;
}
.filter-content-footer-item {
width: 50%;
display: flex;
justify-content: center;
align-items: center;
font-size: 16px;
}
.filter-content-list {
padding: 5px 15px;
}
.filter-content-list-item-default {
color: #666666;
width: 100%;
padding: 10px 0px;
}
.filter-content-list-item-default text {
width: 90%;
font-size: 14px;
display: inline-block;
}
.filter-content-list-item-active {
color: #D1372C;
width: 100%;
padding: 10px 0px;
}
.filter-content-list-item-active text {
font-size: 14px;
width: 90%;
display: inline-block;
}
.filter-content-list-item-active:after {
content: '✓';
}
</style>

@ -0,0 +1,20 @@
@font-face {
font-family: 'sl-font';
src: url('data:font/truetype;charset=utf-8;base64,AAEAAAALAIAAAwAwR1NVQrD+s+0AAAE4AAAAQk9TLzI8kEgOAAABfAAAAFZjbWFwZO3RAgAAAeAAAAGGZ2x5Zh0ZI/EAAANwAAAAyGhlYWQVZkUXAAAA4AAAADZoaGVhB94DhAAAALwAAAAkaG10eAwAAAAAAAHUAAAADGxvY2EAMgBkAAADaAAAAAhtYXhwAREAKAAAARgAAAAgbmFtZT5U/n0AAAQ4AAACbXBvc3TohGjqAAAGqAAAADMAAQAAA4D/gABcBAAAAAAABAAAAQAAAAAAAAAAAAAAAAAAAAMAAQAAAAEAANxW6kVfDzz1AAsEAAAAAADZJADbAAAAANkkANsAAAAABAACZAAAAAgAAgAAAAAAAAABAAAAAwAcAAQAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKAB4ALAABREZMVAAIAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAAAAQQAAZAABQAIAokCzAAAAI8CiQLMAAAB6wAyAQgAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABA5hrmHAOA/4AAXAOAAIAAAAABAAAAAAAABAAAAAQAAAAEAAAAAAAABQAAAAMAAAAsAAAABAAAAV4AAQAAAAAAWAADAAEAAAAsAAMACgAAAV4ABAAsAAAABgAEAAEAAuYa5hz//wAA5hrmHP//AAAAAAABAAYABgAAAAEAAgAAAQYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAKAAAAAAAAAACAADmGgAA5hoAAAABAADmHAAA5hwAAAACAAAAAAAAADIAZAAEAAAAAAOlAmQAEwAWABkAGgAAEwEWMjcBNjIWFAcBBiInASY0NjIBMDEVMDEnmQFgAgoDAV8LHRUK/n8LHAv+fwoVHQFoAQJZ/qEDAwFfCxYcC/6ACwsBgAsdFf6bAgQAAAAABAAAAAADpAJkABMAFgAZABsAACUBJiIHAQYiJjQ3ATYyFwEWFAYiATAxNTAxFzEDZ/6hAwoD/qELHRUKAYELHAsBgQoVHf6YAacBXwMD/qELFhwLAYEKCv5/CxwWAWUCBAAAAAAAEgDeAAEAAAAAAAAAFQAAAAEAAAAAAAEACAAVAAEAAAAAAAIABwAdAAEAAAAAAAMACAAkAAEAAAAAAAQACAAsAAEAAAAAAAUACwA0AAEAAAAAAAYACAA/AAEAAAAAAAoAKwBHAAEAAAAAAAsAEwByAAMAAQQJAAAAKgCFAAMAAQQJAAEAEACvAAMAAQQJAAIADgC/AAMAAQQJAAMAEADNAAMAAQQJAAQAEADdAAMAAQQJAAUAFgDtAAMAAQQJAAYAEAEDAAMAAQQJAAoAVgETAAMAAQQJAAsAJgFpCkNyZWF0ZWQgYnkgaWNvbmZvbnQKaWNvbmZvbnRSZWd1bGFyaWNvbmZvbnRpY29uZm9udFZlcnNpb24gMS4waWNvbmZvbnRHZW5lcmF0ZWQgYnkgc3ZnMnR0ZiBmcm9tIEZvbnRlbGxvIHByb2plY3QuaHR0cDovL2ZvbnRlbGxvLmNvbQAKAEMAcgBlAGEAdABlAGQAIABiAHkAIABpAGMAbwBuAGYAbwBuAHQACgBpAGMAbwBuAGYAbwBuAHQAUgBlAGcAdQBsAGEAcgBpAGMAbwBuAGYAbwBuAHQAaQBjAG8AbgBmAG8AbgB0AFYAZQByAHMAaQBvAG4AIAAxAC4AMABpAGMAbwBuAGYAbwBuAHQARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABzAHYAZwAyAHQAdABmACAAZgByAG8AbQAgAEYAbwBuAHQAZQBsAGwAbwAgAHAAcgBvAGoAZQBjAHQALgBoAHQAdABwADoALwAvAGYAbwBuAHQAZQBsAGwAbwAuAGMAbwBtAAAAAAIAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwECAQMBBAAEZG93bgJ1cAAAAA==') format('truetype');
}
.sl-font {
font-family: "sl-font" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.sl-down:before {
content: "\e61a";
}
.sl-up:before {
content: "\e61c";
}

@ -0,0 +1,122 @@
<template>
<scroll-view scroll-y v-show="ifshow" @tap="ableClose" @touchmove.stop.prevent class="popup-layer">
<view ref="popRef" class="popup-content" @tap.stop="stopEvent" :style="_location">
<slot></slot>
</view>
</scroll-view>
</template>
<script>
export default {
name: 'popup-layer',
props: {
direction: {
type: String,
default: 'top', // topbottomleftright
},
autoClose: {
type: Boolean,
default: true,
},
isTransNav: {
type: Boolean,
default: false
},
navHeight: {
type: Number,
default: 0
}
},
data() {
return {
ifshow: false, // ,
translateValue: -100, //
timer: null,
iftoggle: false,
};
},
computed: {
_translate() {
if (this.isTransNav) {
const transformObj = {
'top': `transform:translateY(${-this.translateValue}%)`,
'bottom': `transform:translateY(calc(${this.translateValue}% + ${this.navHeight}px))`,
'left': `transform:translateX(${-this.translateValue}%)`,
'right': `transform:translateX(${this.translateValue}%)`
};
return transformObj[this.direction]
} else {
const transformObj = {
'top': `transform:translateY(${-this.translateValue}%)`,
'bottom': `transform:translateY(${this.translateValue}%)`,
'left': `transform:translateX(${-this.translateValue}%)`,
'right': `transform:translateX(${this.translateValue}%)`
};
return transformObj[this.direction]
}
},
_location() {
const positionValue = {
'top': 'bottom:0px;width:100%;',
'bottom': 'top:0px;width:100%;',
'left': 'right:0px;height:100%;',
'right': 'left:0px;height:100%;',
};
return positionValue[this.direction] + this._translate;
}
},
methods: {
show() {
let _this = this;
this.ifshow = true;
let _open = setTimeout(() => {
this.translateValue = 0;
_open = null;
}, 100)
let _toggle = setTimeout(() => {
this.iftoggle = true;
_toggle = null;
}, 300);
},
close() {
if (this.timer !== null || !this.iftoggle) {
return;
}
this.translateValue = -100 - this.navHeight;
this.timer = setTimeout(() => {
this.ifshow = false;
this.timer = null;
this.iftoggle = false;
}, 300);
this.$emit("close")
},
ableClose() {
if (this.autoClose) {
this.close();
}
},
stopEvent(event) {},
}
}
</script>
<style>
.popup-layer {
position: absolute;
z-index: 999999;
background: rgba(0, 0, 0, .3);
height: calc(100% - 50px);
width: 100%;
left: 0px;
overflow: hidden;
}
.popup-content {
position: absolute;
z-index: 1000000;
background: #FFFFFF;
transition: all .3s ease;
}
</style>

@ -0,0 +1,302 @@
<template>
<view class="content">
<view :style="{height: tabHeight + 1 +'px'}">
<view :class="topFixed?'select-tab-fixed-top':'select-tab'" :style="{height: tabHeight+'px'}">
<view class="select-tab-item" :style="{width: itemWidth}" v-for="(item,index) in titleList" :key="index" @tap="showMenuClick(index)">
<text :style="{color:color}">{{item.title}}</text>
<text class="arrows sl-font" :class="statusList[index].isActive?up:down"></text>
</view>
</view>
</view>
<popup-layer ref="popupRef" :direction="'bottom'" @close="close" :isTransNav="isTransNav" :navHeight="navHeight"
:tabHeight="tabHeight">
<sl-filter-view :ref="'slFilterView'" :independence="independence" :themeColor="themeColor" :menuList.sync="menuListTemp"
ref="slFilterView" @confirm="filterResult"></sl-filter-view>
</popup-layer>
</view>
</template>
<script>
import popupLayer from '@/components/sl-filter/popup-layer.vue';
import slFilterView from '@/components/sl-filter/filter-view.vue';
export default {
components: {
popupLayer,
slFilterView
},
props: {
menuList: {
type: Array,
default () {
return []
}
},
themeColor: {
type: String,
default () {
return '#089bf5'
}
},
color: {
type: String,
default () {
return '#666666'
}
},
independence: {
type: Boolean,
default: false
},
isTransNav: {
type: Boolean,
default: false
},
navHeight: {
type: Number,
default: 0
},
topFixed: {
type: Boolean,
default: false
}
},
computed: {
itemWidth() {
return 'calc(100%/2)'
},
menuListTemp: {
get() {
return this.getMenuListTemp();
},
set(newObj) {
return newObj;
}
}
},
// #ifndef H5
onReady: function() {
let arr = [];
let titleArr = [];
let r = {};
for (let i = 0; i < this.menuList.length; i++) {
arr.push({
'isActive': false
});
// titleArr.push({
// 'title': this.menuList[i].title,
// 'key': this.menuList[i].key
// })
r[this.menuList[i].key] = this.menuList[i].title;
if (this.menuList[i].reflexTitle && this.menuList[i].defaultSelectedIndex > -1) {
titleArr.push({
'title': this.menuList[i].detailList[this.menuList[i].defaultSelectedIndex].title,
'key': this.menuList[i].key
})
} else {
titleArr.push({
'title': this.menuList[i].title,
'key': this.menuList[i].key
})
}
}
this.statusList = arr;
this.titleList = titleArr;
this.tempTitleObj = r;
},
// #endif
// #ifdef H5
created: function() {
let arr = [];
let titleArr = [];
let r = {};
for (let i = 0; i < this.menuList.length; i++) {
arr.push({
'isActive': false
});
// titleArr.push({
// 'title': this.menuList[i].title,
// 'key': this.menuList[i].key
// });
r[this.menuList[i].key] = this.menuList[i].title;
if (this.menuList[i].reflexTitle && this.menuList[i].defaultSelectedIndex > -1) {
titleArr.push({
'title': this.menuList[i].detailList[this.menuList[i].defaultSelectedIndex].title,
'key': this.menuList[i].key
})
} else {
titleArr.push({
'title': this.menuList[i].title,
'key': this.menuList[i].key
})
}
}
this.statusList = arr;
this.titleList = titleArr;
this.tempTitleObj = r;
},
// #endif
data() {
return {
down: 'sl-down',
up: 'sl-up',
tabHeight: 50,
statusList: [],
selectedIndex: '',
titleList: [],
tempTitleObj: {}
};
},
methods: {
getMenuListTemp() {
let arr = this.menuList;
for (let i = 0; i < arr.length; i++) {
let item = arr[i];
for (let j = 0; j < item.detailList.length; j++) {
let d_item = item.detailList[j];
if (j == 0) {
d_item.isSelected = true
} else {
d_item.isSelected = false
}
}
}
return arr;
},
// result
resetAllSelect(callback) {
this.$refs.slFilterView.resetAllSelect(function(e){
callback(e);
});
},
// result
resetSelectToDefault(callback) {
this.$refs.slFilterView.resetSelectToDefault(function(e){
callback(e);
});
},
resetMenuList(val) {
this.menuList = val;
this.$emit('update:menuList', val)
this.$forceUpdate();
this.$refs.slFilterView.resetMenuList(val)
},
showMenuClick(index) {
this.selectedIndex = index;
if (this.statusList[index].isActive == true) {
this.$refs.popupRef.close();
this.statusList[index].isActive = false
} else {
this.menuTabClick(index);
this.$refs.popupRef.show()
}
},
menuTabClick(index) {
this.$refs.slFilterView.menuTabClick(index);
for (let i = 0; i < this.statusList.length; i++) {
if (index == i) {
this.statusList[i].isActive = true;
} else {
this.statusList[i].isActive = false;
}
}
},
filterResult(obj) {
let val = obj.result;
let titlesObj = obj.titles;
// title
if (this.independence) {
if (!this.menuList[this.selectedIndex].isMutiple || this.menuList[this.selectedIndex].isSort) {
let tempTitle = '';
for (let i = 0; i < this.menuList[this.selectedIndex].detailList.length; i++) {
let item = this.menuList[this.selectedIndex].detailList[i];
if (item.value == val[this.menuList[this.selectedIndex].key]) {
tempTitle = item.title;
}
}
if (this.menuList[this.selectedIndex].reflexTitle) {
this.titleList[this.selectedIndex].title = tempTitle;
}
}
} else {
for (let key in titlesObj) {
if (!Array.isArray(titlesObj[key])) {
this.tempTitleObj[key] = titlesObj[key];
}
}
for (let key in this.tempTitleObj) {
for (let i = 0; i < this.titleList.length; i++) {
if (this.titleList[i].key == key) {
this.titleList[i].title = this.tempTitleObj[key];
}
}
}
}
this.$refs.popupRef.close()
if (obj.isReset) {
} else{
this.$emit("result", val)
}
},
close() {
for (let i = 0; i < this.statusList.length; i++) {
this.statusList[i].isActive = false;
}
}
}
}
</script>
<style>
@import 'iconfont/iconfont.css';
.select-tab {
border-bottom: #F7F7F7 1px solid;
background-color: #FFFFFF;
display: flex;
width: 100%;
}
.select-tab-fixed-top {
border-bottom: #F7F7F7 1px solid;
background-color: #FFFFFF;
display: flex;
width: 100%;
position: fixed;
/* #ifdef H5 */
top: 44px;
/* #endif */
/* #ifndef H5 */
top: 0;
/* #endif */
}
.arrows {
margin-left: 5px;
}
.select-tab .select-tab-item,
.select-tab-fixed-top .select-tab-item {
display: flex;
justify-content: center;
align-items: center;
}
.select-tab .select-tab-item text,
.select-tab-fixed-top .select-tab-item text {
color: #666666;
font-size: 14px;
}
</style>

@ -3,7 +3,8 @@
<view :style="{borderRadius:radius+'px',backgroundColor: bgColor}" class="uni-searchbar__box" @click="searchClick"> <view :style="{borderRadius:radius+'px',backgroundColor: bgColor}" class="uni-searchbar__box" @click="searchClick">
<view class="uni-searchbar__box-icon-search"> <view class="uni-searchbar__box-icon-search">
<slot name="searchIcon"> <slot name="searchIcon">
<uni-icons color="#999999" size="18" type="search" /> <!-- <uni-icons color="#999999" size="18" type="search" /> -->
<text class="icon search"></text>
</slot> </slot>
</view> </view>
<input v-if="show || searchVal" :focus="showSync" :placeholder="placeholder" :maxlength="maxlength" class="uni-searchbar__box-search-input" <input v-if="show || searchVal" :focus="showSync" :placeholder="placeholder" :maxlength="maxlength" class="uni-searchbar__box-search-input"
@ -12,7 +13,8 @@
<view v-if="show && (clearButton==='always'||clearButton==='auto'&&searchVal!=='')" class="uni-searchbar__box-icon-clear" <view v-if="show && (clearButton==='always'||clearButton==='auto'&&searchVal!=='')" class="uni-searchbar__box-icon-clear"
@click="clear"> @click="clear">
<slot name="clearIcon"> <slot name="clearIcon">
<uni-icons color="#c0c4cc" size="18" type="clear" /> <!-- <uni-icons color="#c0c4cc" size="18" type="clear" /> -->
<text class="icon shanchu"></text>
</slot> </slot>
</view> </view>
</view> </view>
@ -177,7 +179,9 @@
<style lang="scss" scoped> <style lang="scss" scoped>
$uni-searchbar-height: 36px; $uni-searchbar-height: 36px;
.icon{
font-size: 15px;
}
.uni-searchbar { .uni-searchbar {
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: flex; display: flex;
@ -202,7 +206,7 @@
height: $uni-searchbar-height; height: $uni-searchbar-height;
padding: 5px 8px 5px 0px; padding: 5px 8px 5px 0px;
border-width: 0.5px; border-width: 0.5px;
border-style: solid; // border-style: solid;
border-color: $uni-border-color; border-color: $uni-border-color;
} }

@ -1,12 +1,11 @@
import Vue from 'vue' import Vue from 'vue'
import App from './App' import App from './App'
// import api from './Utils/Api.js'
import {VueJsonp} from 'vue-jsonp' import {VueJsonp} from 'vue-jsonp'
import share from 'common/share.js'
Vue.config.productionTip = false Vue.config.productionTip = false
// Vue.prototype.api = api;
Vue.use(VueJsonp) Vue.use(VueJsonp)
App.mpType = 'app' App.mpType = 'app'
Vue.mixin(share)
const app = new Vue({ const app = new Vue({
...App ...App
}) })

@ -1,10 +1,25 @@
{ {
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages "pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path" : "pages/goods/refuel/refuel",
"style" :
{
"navigationBarTitleText": "加油站列表",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false
}
},
{ {
"path": "pages/tabBar/home/home", "path": "pages/tabBar/home/home",
"style": { "style": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
// "enablePullDownRefresh": true, // "enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"onReachBottomDistance": 50, "onReachBottomDistance": 50,
"app-plus": { "app-plus": {
"titleNView": false, // "titleNView": false, //
@ -20,6 +35,9 @@
{ {
"path": "pages/goods/store-list/store-list", "path": "pages/goods/store-list/store-list",
"style": { "style": {
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "门店列表", "navigationBarTitleText": "门店列表",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@ -29,6 +47,9 @@
"path": "pages/tabBar/category/category", "path": "pages/tabBar/category/category",
"style": { "style": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"titleNView": false, // "titleNView": false, //
"bounce": "none" "bounce": "none"
@ -41,6 +62,9 @@
"style": { "style": {
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"titleNView": false, // "titleNView": false, //
"softinputNavBar": "none", "softinputNavBar": "none",
@ -57,8 +81,8 @@
"style": { "style": {
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#f06c7a", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#f06c7a", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"titleNView": false, // "titleNView": false, //
@ -74,6 +98,9 @@
"path": "pages/goods/goods-list/goods-list", "path": "pages/goods/goods-list/goods-list",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"app-plus": { "app-plus": {
"bounce": "none" "bounce": "none"
@ -84,6 +111,9 @@
"path": "pages/goods/HM-search/HM-search", "path": "pages/goods/HM-search/HM-search",
"style": { "style": {
"navigationBarTitleText": "搜索", "navigationBarTitleText": "搜索",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"softinputNavBar": "none" "softinputNavBar": "none"
} }
@ -93,7 +123,9 @@
"path": "pages/goods/goods", "path": "pages/goods/goods",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#f1f1f1", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"onReachBottomDistance": 50, "onReachBottomDistance": 50,
"h5": { "h5": {
"titleNView": false "titleNView": false
@ -107,7 +139,8 @@
{ {
"path": "pages/login/login", "path": "pages/login/login",
"style": { "style": {
"navigationBarBackgroundColor": "#f06c7a", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"bounce": "none", // "bounce": "none", //
@ -119,7 +152,8 @@
"path": "pages/login/register", "path": "pages/login/register",
"style": { "style": {
"navigationBarTitleText": "手机号登录", "navigationBarTitleText": "手机号登录",
"navigationBarBackgroundColor": "#f06c7a", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"bounce": "none", // "bounce": "none", //
@ -131,7 +165,8 @@
"path": "pages/login/resetpasswd", "path": "pages/login/resetpasswd",
"style": { "style": {
"navigationBarTitleText": "修改密码", "navigationBarTitleText": "修改密码",
"navigationBarBackgroundColor": "#f06c7a", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"bounce": "none", // "bounce": "none", //
@ -142,20 +177,27 @@
"path": "pages/order/confirmation", "path": "pages/order/confirmation",
"style": { "style": {
"navigationBarTitleText": "确认订单", "navigationBarTitleText": "确认订单",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"softinputNavBar": "none" "softinputNavBar": "none"
} }
}, { }, {
"path": "pages/user/setting/setting", "path": "pages/user/setting/setting",
"style": { "style": {
"navigationBarBackgroundColor": "#f8f8f8",
"navigationBarTitleText": "我的设置", "navigationBarTitleText": "我的设置",
"backgroundColorTop": "#ffffff", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"backgroundColorBottom": "#f3f3f3" "backgroundColorBottom": "#f3f3f3"
} }
}, { }, {
"path": "pages/user/myQR/myQR", "path": "pages/user/myQR/myQR",
"style": { "style": {
"navigationBarTitleText": "我的二维码", "navigationBarTitleText": "我的二维码",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"bounce": "none" "bounce": "none"
} }
@ -165,14 +207,15 @@
"style": { "style": {
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarTitleText": "消息列表", "navigationBarTitleText": "消息列表",
"navigationBarBackgroundColor": "#f06c7a", "navigationBarBackgroundColor": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, { }, {
"path": "pages/user/coupon/coupon", "path": "pages/user/coupon/coupon",
"style": { "style": {
"navigationBarTitleText": "优惠券", "navigationBarTitleText": "优惠券",
"navigationBarBackgroundColor": "#f06c7a", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"bounce": "none" "bounce": "none"
@ -182,8 +225,8 @@
"path": "pages/user/keep/keep", "path": "pages/user/keep/keep",
"style": { "style": {
"navigationBarTitleText": "我的收藏", "navigationBarTitleText": "我的收藏",
"navigationBarBackgroundColor": "#f06c7a", "navigationBarBackgroundColor": "#0083f5",
"navigationBarTextStyle": "white", "backgroundColorTop": "#0083f5",
"app-plus": { "app-plus": {
"bounce": "none" "bounce": "none"
} }
@ -272,7 +315,7 @@
"path": "pages/user/order_details/order_details", "path": "pages/user/order_details/order_details",
"style": { "style": {
// "navigationBarTitleText": "订单详情", // "navigationBarTitleText": "订单详情",
"navigationBarBackgroundColor": "#f06c7a", "navigationBarBackgroundColor": "#0083f5",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@ -323,8 +366,8 @@
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#f06c7a", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#f06c7a", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, },
@ -334,8 +377,8 @@
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTitleText": "", "navigationBarTitleText": "",
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#f06c7a", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#f06c7a", "backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -349,7 +392,7 @@
} }
} }
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
@ -361,7 +404,7 @@
}, },
"tabBar": { "tabBar": {
"color": "#333333", "color": "#333333",
"selectedColor": "#f06c7a", "selectedColor": "#0083f5",
"borderStyle": "black", "borderStyle": "black",
"backgroundColor": "#ffffff", "backgroundColor": "#ffffff",
"list": [{ "list": [{

@ -23,10 +23,11 @@
</view> </view>
<view class="line1 mart15"></view> <view class="line1 mart15"></view>
<view class="width90 mart10 fcor666" v-if="couponDesInfo.highUserCoupon.status != 0">核销码(商户扫客户)</view> <view class="width90 mart10 fcor666" v-if="couponDesInfo.highUserCoupon.status != 0">核销码(商户扫客户)</view>
<view class="mart20 fotct fcorred font15 marb20" v-if="couponDesInfo.highUserCoupon.status != 0">请告知加油员用码商支付</view>
<view class="width90 mart20 fotct" v-if="couponDesInfo.highUserCoupon.status != 0"> <view class="width90 mart20 fotct" v-if="couponDesInfo.highUserCoupon.status != 0">
<image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.highUserCoupon.qrCodeImg"></image> <image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.highUserCoupon.qrCodeImg"></image>
</view> </view>
<view class="fotct fcor333 font15 marb10 mart10">{{couponDesInfo.couponCodeInfo.codeKey}}</view>
<view class="width90 mart20" style="height: 80px;" v-for="(store,i) in storeList" :key="i"> <view class="width90 mart20" style="height: 80px;" v-for="(store,i) in storeList" :key="i">
<view class="coupon-des flleft"> <view class="coupon-des flleft">
立即<br>前往 立即<br>前往

@ -26,10 +26,10 @@
<view class="line1 mart15"></view> <view class="line1 mart15"></view>
<view class="width90 mart10 fcor666" v-if="couponDesInfo.highUserCoupon.status != 0">核销码(商户扫客户)</view> <view class="width90 mart10 fcor666" v-if="couponDesInfo.highUserCoupon.status != 0">核销码(商户扫客户)</view>
<view class="mart20 fotct fcorred font15 marb20" v-if="couponDesInfo.highUserCoupon.status != 0">请告知加油员用码商支付</view>
<view class="width90 mart20 fotct" v-if="couponDesInfo.highUserCoupon.status != 0"> <view class="width90 mart20 fotct" v-if="couponDesInfo.highUserCoupon.status != 0">
<image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.couponCode.ext1"></image> <image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.couponCode.ext1"></image>
</view> </view>
<!-- <view class="width90 mart20" style="height: 80px;" v-for="(store,i) in storeList" :key="i"> <!-- <view class="width90 mart20" style="height: 80px;" v-for="(store,i) in storeList" :key="i">
<view class="coupon-des flleft"> <view class="coupon-des flleft">
立即<br>前往 立即<br>前往

@ -0,0 +1,208 @@
<template>
<view>
<view class="width100 backcorfff">
<image mode="widthFix" class=" flleft sear mart15" src="../../../static/img/btjy.png"></image>
<uSearchBar @confirm="search" @input="input"></uSearchBar>
</view>
<slFilter :independence="true" :color="titleColor" :themeColor="themeColor" :menuList.sync="menuList"
@result="result"></slFilter>
<view class="width90 height100p backcorfff border-r mart10">
<image mode="widthFix" src="../../../static/img/noorder.png" class="recontleft flleft mart10 border-r"></image>
<view class="recontright">
<view class="text1 width100 font15 fontwig6 paddtop10">贵州花冠中石油燃气加油站</view>
<view class="width100 mart10 height22">
<view class="width70 flleft text1 font13 fcor999">
花冠路贵惠大道桐荫26号
</view>
<view class="width30 flright font13 fcor666 fotct">
<image mode="widthFix" src="../../../static/img/dh.png" style="width: 10px;"></image>1.9km
</view>
</view>
<view class="font14 width100 fcoreb5 mart5 height22">
<text class="font18 fontwig6">6.40</text><text class="fcor999 margle">油站价6.88</text>
</view>
</view>
</view>
<view class="width90 height100p backcorfff border-r mart10">
<image mode="widthFix" src="../../../static/img/noorder.png" class="recontleft flleft mart10 border-r"></image>
<view class="recontright">
<view class="text1 width100 font15 fontwig6 paddtop10">贵州花冠中石油燃气加油站</view>
<view class="width100 mart10 height22">
<view class="width70 flleft text1 font13 fcor999">
花冠路贵惠大道桐荫26号
</view>
<view class="width30 flright font13 fcor666 fotct">
<image mode="widthFix" src="../../../static/img/dh.png" style="width: 10px;"></image>1.9km
</view>
</view>
<view class="font14 width100 fcoreb5 mart5 height22">
<text class="font18 fontwig6">6.40</text><text class="fcor999 margle">油站价6.88</text>
</view>
</view>
</view>
<view class="width90 height100p backcorfff border-r mart10">
<image mode="widthFix" src="../../../static/img/noorder.png" class="recontleft flleft mart10 border-r"></image>
<view class="recontright">
<view class="text1 width100 font15 fontwig6 paddtop10">贵州花冠中石油燃气加油站</view>
<view class="width100 mart10 height22">
<view class="width70 flleft text1 font13 fcor999">
花冠路贵惠大道桐荫26号
</view>
<view class="width30 flright font13 fcor666 fotct">
<image mode="widthFix" src="../../../static/img/dh.png" style="width: 10px;"></image>1.9km
</view>
</view>
<view class="font14 width100 fcoreb5 mart5 height22">
<text class="font18 fontwig6">6.40</text><text class="fcor999 margle">油站价6.88</text>
</view>
</view>
</view>
</view>
</template>
<script>
import slFilter from '@/components/sl-filter/sl-filter.vue';
import uSearchBar from '../../../components/uni-search-bar/components/uni-search-bar/uni-search-bar.vue';
export default {
components: {
slFilter,
uSearchBar
},
data() {
return {
themeColor: '#089bf5',
titleColor: '#666666',
filterResult: '',
menuList: [{
'title': '品牌',
'key': 'single',
'isMutiple': false,
'detailTitle': '请选择(单选)',
'reflexTitle': true,
'defaultSelectedIndex': 0,
'detailList': [{
'title': '全部品牌',
'value': '全部品牌'
}, {
'title': '中石化',
'value': '中石化'
}, {
'title': '中石油',
'value': '中石油'
}, {
'title': '亮牌',
'value': '亮牌'
}, {
'title': '其他',
'value': '其他'
},
]
},
{
'title': '距离',
'key': 'single',
'isMutiple': false,
'detailTitle': '请选择(单选)',
'reflexTitle': true,
'defaultSelectedIndex': 0,
'detailList': [{
'title': '距离最近',
'value': '距离最近'
}]
},
{
'title': '油号',
'key': 'single',
'isMutiple': false,
'detailTitle': '请选择(单选)',
'reflexTitle': true,
'defaultSelectedIndex': 0,
'detailList': [{
'title': '89#',
'value': '89#'
}, {
'title': '92#',
'value': '92#'
}, {
'title': '95#',
'value': '92#'
}, {
'title': '98#',
'value': '98#'
}, ]
},
{
'title': '距离',
'key': 'single',
'isMutiple': false,
'detailTitle': '请选择(单选)',
'reflexTitle': true,
'defaultSelectedIndex': 0,
'detailList': [{
'title': '默认排序',
'value': ''
},
{
'title': '发布时间',
'value': 'add_time'
},
{
'title': '薪资最高',
'value': 'wages_up'
},
{
'title': '离我最近',
'value': 'location'
}
]
}
]
}
},
onLoad() {
},
methods: {
result(val) {
console.log('filter_result:' + JSON.stringify(val));
this.filterResult = JSON.stringify(val, null, 2)
}
}
}
</script>
<style lang="scss">
page {
background-color: #f6f6f6;
}
.sear {
margin-left: 10px;
width: 50px;
}
.searImg {
margin-left: 55px;
}
.recontleft {
width: 80px;
margin-left: 10px;
}
.recontright {
margin-left: 95px;
}
.text {
margin-top: 50px;
margin-left: 20px;
width: 100%;
}
</style>

@ -66,7 +66,9 @@
orderToGoldPay orderToGoldPay
} from '../../../Utils/Api.js' } from '../../../Utils/Api.js'
let app = getApp(); let app = getApp();
// #ifdef H5
var jweixin = require('jweixin-module'); var jweixin = require('jweixin-module');
// #endif
export default { export default {
data() { data() {
return { return {

@ -24,6 +24,7 @@
</view> </view>
<view class="line1 mart15"></view> <view class="line1 mart15"></view>
<view class="width90 mart10 fcor666">核销码(商户扫客户)</view> <view class="width90 mart10 fcor666">核销码(商户扫客户)</view>
<view class="mart20 fotct fcorred font15 marb20">请告知加油员用码商支付</view>
<view class="width90 mart20 fotct"> <view class="width90 mart20 fotct">
<image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.highUserCoupon.qrCodeImg"></image> <image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.highUserCoupon.qrCodeImg"></image>
</view> </view>

@ -29,6 +29,7 @@
<!-- 占位 --> <!-- 占位 -->
<view v-if="showHeader" class="place"></view> <view v-if="showHeader" class="place"></view>
<!-- 轮播图 --> <!-- 轮播图 -->
<view class="height90 backcor008 viewbor"></view>
<view class="swiper"> <view class="swiper">
<view class="swiper-box"> <view class="swiper-box">
<swiper circular="true" autoplay="true" @change="swiperChange"> <swiper circular="true" autoplay="true" @change="swiperChange">
@ -42,16 +43,75 @@
</view> </view>
</view> </view>
</view> </view>
<!-- / -->
<view class="height60 backcorfff"></view>
<view class="category-list">
<view class="category" v-for="(row, index) in categoryList" :key="index" @tap="toCategory(row)">
<view class="img">
<image :src="row.img"></image>
</view>
<view class="text">{{ row.name }}</view>
</view>
</view>
<!-- 赠券 -->
<view style="width: 91%;margin-left: 5%;">
<image class="mart30 width100" mode="widthFix" src="../../../static/img/headzq.png"></image>
</view>
<swiper class="orange-content" style="border: 2px solid #ff5836;" :display-multiple-items="productListleg">
<swiper-item class="swiper-hed" v-for="pro in productList" :key="product.id">
<view class="swiper-item" @tap="tapList" :data-id="pro.id">
<image class="img" :src="imageUrl+pro.couponImg" mode="aspectFit">
</image>
<view class="fotct fcor333 font14 text1 mart10">{{pro.couponName}}</view>
<view class="subject fotct mart5">{{pro.discountPrice}}</view>
</view>
</swiper-item>
</swiper>
<!-- 金币 -->
<view style="width: 90%;margin-left: 5%;">
<image class="mart30 width100" mode="widthFix" src="../../../static/img/jbhed.png"></image>
</view>
<!-- v-if="goldproductList&&goldproductList.length>0" -->
<swiper class="orange-content" :display-multiple-items="goldproductListleg" next-margin="50rpx">
<swiper-item class="swiper-hed" v-for="(item,index) in goldproductList" :key="index">
<view class="swiper-item" @tap="tapList" :data-id="item.id">
<image class="img" :src="imageUrl+item.couponImg" mode="aspectFit"></image>
<view class="fotct fcor333 font14 text1 mart10">{{item.couponName}}</view>
<view class="subject fotct mart5">{{ item.discountPrice}}</view>
</view>
</swiper-item>
</swiper>
<!-- 分期 -->
<view style="width: 90%;margin-left: 5%;">
<image class="mart30 width100" mode="widthFix" src="../../../static/img/fqhed.png"></image>
</view>
<swiper class="orange-content" :display-multiple-items="productListleg">
<swiper-item class="swiper-hed" v-for="pro in productList" :key="product.id">
<view class="swiper-item" @tap="tapList" :data-id="pro.id">
<image class="img" :src="imageUrl+pro.couponImg" mode="aspectFit">
</image>
<view class="fotct fcor333 font14 text1 mart10">{{pro.couponName}}</view>
<view class="subject fotct mart5">{{pro.discountPrice}}</view>
</view>
</swiper-item>
</swiper>
<!-- 广告图 --> <!-- 广告图 -->
<!-- <view class="banner" @click="tao"> <!-- <view class="banner" @click="tao">
<image src="/static/img/banner.jpg"></image> <image src="/static/img/banner.jpg"></image>
</view> --> </view> -->
<!-- 商品列表 --> <!-- 商品列表 -->
<view class="goods-list"> <view class="goods-list">
<view class="title"> <view :class="[cpStuats == 1?'active_tie':'title']" @click="eheckStu(1)">
<image src="/static/img/hua.png"></image> 猜你喜欢
赠券专区 </view>
<image src="/static/img/hua.png"></image> <view :class="[cpStuats == 2?'active_tie':'title']" @click="eheckStu(2)">
今日特价
</view>
<view :class="[cpStuats == 3?'active_tie':'title']" @click="eheckStu(3)">
发现好店
</view> </view>
<view v-if="productList == '' || productList == null" class="mart60 fotct font14 fcor666"> <view v-if="productList == '' || productList == null" class="mart60 fotct font14 fcor666">
<image style="width: 100px;height: 100px;" <image style="width: 100px;height: 100px;"
@ -70,10 +130,9 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="loading-text">{{ loadingText }}</view> -->
</view> </view>
<view class="goods-list"> <!-- <view class="goods-list">
<view class="title"> <view class="title">
<image src="/static/img/hua.png"></image> <image src="/static/img/hua.png"></image>
金币专区 金币专区
@ -103,8 +162,7 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="loading-text">{{ loadingText }}</view> --> </view> -->
</view>
</view> </view>
</template> </template>
@ -144,33 +202,59 @@
], ],
// //
productList: [], productList: [],
productListleg: '',
goldproductList: [], goldproductList: [],
goldproductListleg: '',
loadingText: '正在加载...', loadingText: '正在加载...',
pageNum: 1, pageNum: 1,
pageSize: 6, pageSize: 6,
//
categoryList: [{
id: 1,
name: '办公',
img: '/static/img/wxpay.png'
},
{
id: 2,
name: '家电',
img: '/static/img/wxpay.png'
},
{
id: 3,
name: '服饰',
img: '/static/img/wxpay.png'
},
{
id: 4,
name: '日用',
img: '/static/img/wxpay.png'
},
{
id: 5,
name: '蔬果',
img: '/static/img/wxpay.png'
},
{
id: 6,
name: '运动',
img: '/static/img/wxpay.png'
},
{
id: 7,
name: '书籍',
img: '/static/img/wxpay.png'
},
{
id: 8,
name: '文具',
img: '/static/img/wxpay.png'
}
],
//
cpStuats: 1
}; };
}, },
onPageScroll(e) {
//iOS
// this.headerPosition = e.scrollTop >= 0 ? "fixed" : "absolute";
// this.headerTop = e.scrollTop >= 0 ? null : 0;
// this.statusTop = e.scrollTop >= 0 ? null : -this.statusHeight + 'px';
},
//page.json "enablePullDownRefresh": true
onPullDownRefresh() {
// setTimeout(function() {
// uni.stopPullDownRefresh();
// }, 1000);
},
//page.json"onReachBottomDistance"
onReachBottom() {
},
authColse() {
},
onShow() { onShow() {
// #ifdef H5 // #ifdef H5
var arr1 = window.location.href; var arr1 = window.location.href;
@ -178,7 +262,7 @@
if (!app.globalData.userInfo && arr2[1] != undefined && arr2[2] == '2#/') { if (!app.globalData.userInfo && arr2[1] != undefined && arr2[2] == '2#/') {
this.getH5UserInfo(arr2[1]); this.getH5UserInfo(arr2[1]);
} }
if (app.globalData.userInfo && arr2[1] != undefined && arr2[2] == '1#/') { if (app.globalData.userInfo && arr2[1] != undefined && arr2[2] == '1#/') {
this.getH5AccessToken(arr2[1]); this.getH5AccessToken(arr2[1]);
} }
@ -306,8 +390,8 @@
uni.setStorage({ uni.setStorage({
key: "openId", key: "openId",
data: res.return_data data: res.return_data
.object .object
.highUser.openIdH5 .highUser.openIdH5
}) })
app.globalData.openId = res.return_data app.globalData.openId = res.return_data
.object .object
@ -372,6 +456,11 @@
getCouponList(params).then(res => { getCouponList(params).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.productList = res.return_data.list; this.productList = res.return_data.list;
if (res.return_data.total > 4) {
this.productListleg = 4;
return;
}
this.productListleg = res.return_data.total;
} }
}) })
}, },
@ -386,6 +475,12 @@
getCouponList(params).then(res => { getCouponList(params).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.goldproductList = res.return_data.list; this.goldproductList = res.return_data.list;
this.goldproductListleg = res.return_data.total;
if (res.return_data.total > 4) {
this.goldproductListleg = 4;
return;
}
this.goldproductListleg = res.return_data.total;
} }
}) })
}, },
@ -406,48 +501,12 @@
} }
}); });
}, },
//
toMsg() {
// uni.navigateTo({
// url: '../../msg/msg'
// })
// uni.showToast({
// title: '',
// icon: 'none'
// });
},
//
toSearch() {
uni.navigateTo({
url: '../../goods/HM-search/HM-search'
})
// uni.showToast({ title: '' });
},
//
toSwiper(e) {
// uni.showToast({
// title: e.src,
// icon: 'none'
// });
uni.reLaunch({
url: '../category/category'
})
},
//
toGoods(e) {
// uni.showToast({
// title: '' + e.goods_id,
// icon: 'none'
// });
uni.navigateTo({
url: '../../goods/goods?id=' + e
});
},
// //
swiperChange(event) { swiperChange(event) {
this.currentSwiper = event.detail.current; this.currentSwiper = event.detail.current;
},
eheckStu(item){
this.cpStuats = item;
} }
} }
}; };
@ -455,7 +514,7 @@
<style lang="scss"> <style lang="scss">
page { page {
position: relative; position: relative;
background-color: #fff; background-color: #F5F5F5;
} }
@font-face { @font-face {
@ -503,9 +562,9 @@
display: flex; display: flex;
align-items: center; align-items: center;
position: fixed; position: fixed;
background-color: #0083f5;
top: 0; top: 0;
z-index: 10; z-index: 10;
background-color: #fff;
/* #ifdef APP-PLUS */ /* #ifdef APP-PLUS */
top: var(--status-bar-height); top: var(--status-bar-height);
@ -518,6 +577,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 28upx; font-size: 28upx;
color: #FFFFFF;
.icon { .icon {
height: 60upx; height: 60upx;
@ -584,15 +644,21 @@
/* #endif */ /* #endif */
} }
.viewbor {
border-radius: 0px 0px 10px 10px;
position: relative;
}
.swiper { .swiper {
width: 100%; width: 100%;
margin-top: 10upx;
display: flex; display: flex;
justify-content: center; justify-content: center;
position: absolute;
top: 60px;
.swiper-box { .swiper-box {
width: 92%; width: 92%;
height: 150px; height: 130px;
overflow: hidden; overflow: hidden;
border-radius: 15upx; border-radius: 15upx;
box-shadow: 0upx 8upx 25upx rgba(0, 0, 0, 0.2); box-shadow: 0upx 8upx 25upx rgba(0, 0, 0, 0.2);
@ -602,12 +668,12 @@
swiper { swiper {
width: 100%; width: 100%;
height: 150px; height: 130px;
swiper-item { swiper-item {
image { image {
width: 100%; width: 100%;
height: 150px; height: 130px;
} }
} }
} }
@ -636,43 +702,6 @@
} }
} }
.category-list {
width: 92%;
margin: 0 4%;
padding: 0 0 30upx 0;
border-bottom: solid 2upx #f6f6f6;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.category {
width: 25%;
margin-top: 50upx;
display: flex;
flex-wrap: wrap;
.img {
width: 100%;
display: flex;
justify-content: center;
image {
width: 9vw;
height: 9vw;
}
}
.text {
margin-top: 16upx;
width: 100%;
display: flex;
justify-content: center;
font-size: 24upx;
color: #3c3c3c;
}
}
}
.banner { .banner {
width: 92%; width: 92%;
margin: 40upx 4%; margin: 40upx 4%;
@ -779,24 +808,70 @@
} }
} }
.category-list {
width: 100%;
padding: 0 0 30upx 0;
background-color: #FFFFFF;
border-bottom: solid 2upx #f6f6f6;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.category {
width: 20%;
margin-top: 50upx;
display: flex;
flex-wrap: wrap;
.img {
width: 100%;
display: flex;
justify-content: center;
image {
width: 9vw;
height: 9vw;
}
}
.text {
margin-top: 16upx;
width: 100%;
display: flex;
justify-content: center;
font-size: 24upx;
color: #3c3c3c;
}
}
}
.goods-list { .goods-list {
background-color: #FFFFFF;
margin-top: 40px;
// background-color: #f4f4f4;
.title { .title {
width: 100%; height: 80rpx;
display: flex; color: #333333;
justify-content: center; text-align: center;
align-items: center; margin-top: 10px;
height: 80upx; font-size: 30rpx;
color: #f47825; width: 100px;
font-size: 40rpx; line-height: 80rpx;
margin-top: 20rpx;
margin-bottom: 10px; margin-bottom: 10px;
float: left;
}
image { .active_tie {
width: 30upx; font-size: 42rpx;
height: 30upx; font-weight: bold;
} height: 80rpx;
color: #333333;
margin-top: 10px;
text-align: center;
width: 100px;
line-height: 80rpx;
margin-bottom: 10px;
float: left;
} }
.loading-text { .loading-text {
@ -861,4 +936,72 @@
} }
} }
} }
//
.orange-wrap {
position: relative;
box-sizing: border-box;
}
.orange-title {
display: flex;
justify-content: space-between;
margin-bottom: 20rpx;
padding-right: 30rpx;
}
.orange-title .al {
font-weight: 700;
font-size: 34rpx;
}
.orange-title .ar {
font-size: 28rpx;
color: #777;
position: relative;
top: 10rpx;
}
.orange-content {
height: 160px;
width: 90%;
margin-left: 5%;
border-radius: 0 0 10px 10px;
margin-top: -3px;
background-color: white;
}
.swiper-hed {
width: 28%;
}
.orange-content .swiper-item {
height: 180rpx;
margin-left: 14rpx;
margin-top: 14rpx;
}
.orange-content .swiper-item .img {
width: 100%;
height: 100%;
// border-Radius:10rpx;
}
.orange-content .swiper-item .subject {
font-size: 26rpx;
width: 100%;
color: #ff5836;
}
.lookmore {
background-color: #e2e2e2;
text-align: center;
line-height: 140rpx;
}
.lookmore .moretext {
color: #777;
font-size: 28rpx;
}
</style> </style>

@ -119,7 +119,7 @@
} from "../../../Utils/Api.js"; } from "../../../Utils/Api.js";
import uniBadge from "../../../components/uni-badge/components/uni-badge/uni-badge.vue"; import uniBadge from "../../../components/uni-badge/components/uni-badge/uni-badge.vue";
let app = getApp() let app = getApp()
import authorize from '../../../components/Authorize'; import authorize from '../../components/Authorize';
export default { export default {
components: { components: {
authorize, authorize,

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

@ -225,7 +225,11 @@ $uni-font-size-paragraph:30upx;
.backcorf06{ .backcorf06{
background-color: #f06c7a; background-color: #f06c7a;
} }
.backcor008{
background-color: #0083f5;
}
.backcor89 { .backcor89 {
background-color: #089bf5; background-color: #089bf5;
@ -462,6 +466,13 @@ $uni-font-size-paragraph:30upx;
.flright { .flright {
float: right; float: right;
} }
/**
* 圆角
*/
.border-r{
border-radius: 5px;
}
/* button样式 */ /* button样式 */
.btnw70 { .btnw70 {

Loading…
Cancel
Save