You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
high-mini/pages/user/business/business.vue

101 lines
11 KiB

<template>
<view>
<!-- <view class="topTabBar" :style="{position:headerPosition,top:headerTop}">
<view class="grid" v-for="(grid,tbIndex) in businType" :key="tbIndex" @tap="showType(tbIndex)">
<view class="text" :class="[tbIndex==tabbarIndex?'on':'']">{{grid}}</view>
</view>
</view> -->
<view class="width100 mart60 fotct" @click="scan">
<image style="width: 120px;height: 120px;"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkRBOD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P6qZOIqqu0Pekt85727eRnOVqQ/uIHnfrLpuniACpY6qdNodjRfUNdZpQP5UR5
</image>
</view>
</view>
</template>
<script>
import {
useCouponCode
} from '../../../Utils/Api.js';
let app = getApp();
export default {
data() {
return {
businType: ['扫码消核', '消核统计'],
tabbarIndex: 0,
headerPosition: "fixed",
headerTop: "0px",
}
},
onPageScroll(e) {
return;
//兼容iOS端下拉时顶部漂移
this.headerPosition = e.scrollTop >= 0 ? "fixed" : "absolute";
},
methods: {
showType(tbIndex) {
this.tabbarIndex = tbIndex;
},
scan() {
uni.scanCode({
success: function(res) {
let datas = {
"code": res.result
}
useCouponCode(datas).then(res => {
if (res.return_code == '000000') {
uni.showToast({
title: res.return_data,
duration: 2000
})
} else {
uni.showToast({
title: res.return_msg,
icon: "none"
})
}
})
}
});
}
}
}
</script>
<style lang="scss">
.topTabBar {
width: 100%;
position: fixed;
top: 0;
z-index: 10;
background-color: #f8f8f8;
height: 80upx;
display: flex;
justify-content: space-around;
.grid {
width: 20%;
height: 80upx;
display: flex;
justify-content: center;
align-items: center;
color: #444;
font-size: 28upx;
.text {
height: 76upx;
display: flex;
align-items: center;
&.on {
color: #0083f5;
border-bottom: solid 4upx #0083f5;
}
}
}
}
</style>