第一提交

This commit is contained in:
caolc
2023-04-26 14:03:20 +08:00
commit ed478c7402
383 changed files with 67118 additions and 0 deletions

View File

@@ -0,0 +1,140 @@
<template>
<view class="page-content bg-main-oil">
<view class="qr-container shadow bg-white">
<view class="text-xxl padding back-x" @tap="goBack(1)">
<text class="cuIcon-close ">
</text>
</view>
<view class="text-center logo">
<image style="width:180upx" :src="mainURL+'logo.png'" mode="widthFix"></image>
<!-- <image style="width:150upx" :src="mainURL+'bg-qy.png'" mode="widthFix"></image> -->
</view>
<view class="margin padding text-center oil-main-color text-xl">
<text @tap="getCompanyQrCode(id)">{{companyName}}</text>
<view class="cu-tag bg-red bg-main-oil padding-left self-tag" @tap="goBack(1)">
<text class="padding-left-sm">
<text class="cuIcon-order icon-exchange "></text>
切换企业</text>
</view>
</view>
<view class="padding-top text-center qr-part">
<view class="qrimg" @tap="copyQrStr">
<tki-qrcode ref="qrcode" cid="2" loadMake :val="val" :size="400" unit="upx" background="#fff" foreground="#000"
pdground="#000" :icon="iconUrl" iconSize="40" onval :usingComponents="usingComponents" showLoading @result="qrR" />
</view>
</view>
<view class="margin padding text-center bg-white ">
<text>使用星油扫一扫司机即可快速加入该企业</text>
</view>
</view>
</view>
</template>
<script>
import partnerApi from '@/api/partner.js'
// 引入二维码库
import tkiQrcode from "../../../components/tki-qrcode/tki-qrcode.vue" //二维码生成器
export default {
components: {
tkiQrcode
},
data() {
return {
qrImg: "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1102530589,2787379918&fm=11&gp=0.jpg",
val: '',
iconUrl: '../../static/img/qr-icon.png',
mainURL: this.global.mainURL,
id: '',
companyName: ''
}
},
onLoad(option) {
console.log(option.id)
this.id = option.id
this.companyName = option.name
},
onShow() {
// this.qrInit()
this.getCompanyQrCode(this.id)
},
onPullDownRefresh() {
this.getCompanyQrCode(this.id)
},
created() {},
methods: {
goBack(num) {
uni.navigateBack({
delta: num
})
},
qrR() {
},
copyQrStr() {
uni.setClipboardData({
data: this.val,
success: () => {
uni.showToast({
title: '已复制',
icon: 'none'
})
}
})
},
getCompanyQrCode(id) {
const data1 = {
companyId: id,
oilSiteCode: uni.getStorageSync('oilSite').oilSiteCode
}
partnerApi.getCompanyQrCode(data1).then(res => {
if (res.code == 20000) {
this.val = res.data
}
})
}
}
}
</script>
<style scoped>
.qr-container {
height: 80%;
position: absolute;
bottom: 0;
width: 750upx;
border-radius: 10px 10px 0 0;
box-shadow: 3px -3px 4px rgba(26, 26, 26, 0.2);
}
.logo {
position: absolute;
width: 100%;
top: -80rpx;
}
.qr-part {
position: relative;
z-index: 2;
}
.self-tag {
position: absolute;
right: 0;
top: 2em;
border-radius: 100upx 0 0 100upx;
}
.icon-exchange {
/* transform: scale(1, 1.8); */
transform: rotate(90deg);
position: absolute;
left: 15upx;
line-height: 1rem;
}
.back-x {
position: relative;
z-index: 3;
}
</style>

View File

@@ -0,0 +1,122 @@
<template>
<view class="page-content ">
<cu-custom class="main- totextbar bg-main-oil" round :isBack="true" bgColor="bg-main-oil">
<block slot="backText">返回</block>
<block slot="content">公户加油</block>
</cu-custom>
<view class="cu-bar padding-bottom padding-top solids-bottom search">
<view class="search-form round">
<text class="cuIcon-search"></text>
<input class="" v-model="searchCondition" @confirm="onSearch" @focus="InputFocus" @blur="InputBlur"
:adjust-position="false" type="text" clearable placeholder="请输入车牌号搜索" confirm-type="search"></input>
</view>
</view>
<view class="cu-list menu sm-border" v-if="userList.length>0">
<driver-item class="cu-item" v-for="item in userList" :key="item.driverId" :driver="item" />
</view>
<view v-if="userList.length<1">
<Empty />
</view>
<view v-show="isLoadMore">
<uni-load-more :status="loadStatus"></uni-load-more>
</view>
</view>
</template>
<script>
import UniLoadMore from '@/components/uni-load-more/uni-load-more.vue'
import partnerApi from '@/api/partner.js'
import DriverItem from '../../../components/driver-item.vue'
export default {
components: {
DriverItem,
UniLoadMore
},
data() {
return {
searchCondition: '',
staff: {
data: 'lalall'
},
pageSize: 10,
currentPage: 1,
oilSite: uni.getStorageSync('oilSite'),
userList: [],
value: '',
isLoadMore: false,
loadStatus: 'loading',
companyId: ''
}
},
onLoad(option) {
console.log(option.id)
this.companyId = option.id
},
onShow() {
this.userList = []
this.currentPage = 1
this.getList()
},
onPullDownRefresh() {
this.userList = []
this.currentPage = 1
this.getList()
},
onReachBottom() {
if (!this.isLoadMore) {
console.log('xiala')
this.getList()
}
},
methods: {
InputBlur() {
// this.isLoadMore = false
// console.log(this.searchCondition)
// this.userList = []
// this.currentPage = 1
// this.getList()
// console.log('InputBlur')
},
InputFocus() {
console.log(this.searchCondition)
},
onSearch() {
this.isLoadMore = false
this.userList = []
this.currentPage = 1
console.log('onSearch')
this.getList()
},
getList() {
if (!this.isLoadMore) {
const data3 = {
pageSize: this.pageSize,
currentPage: this.currentPage,
plateNumber: this.searchCondition,
belongCompany: this.companyId
}
partnerApi.getUserMegByCarNo(data3).then(res => {
uni.stopPullDownRefresh();
if (res.code == 20000) {
this.userList = this.userList.concat(res.data)
if (res.data.length < this.pageSize) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
this.isLoadMore = true
this.loadStatus = 'nomore'
} else {
this.currentPage++
this.isLoadMore = false
}
console.log(this.isLoadMore, this.loadStatus, this.currentPage)
}
})
}
}
}
}
</script>
<style lang="scss" scoped>
.page-content {
min-height: 100%;
}
</style>

View File

@@ -0,0 +1,126 @@
<template>
<view class="page-content">
<cu-custom class="main-totextbar bg-main-oil" :isBack="true" bgColor="bg-main-oil">
<block slot="backText">返回</block>
<block slot="content">合作企业</block>
</cu-custom>
<view v-if="companyList.length>0">
<company-item v-for="item in companyList" :key="item.id" :company="item"></company-item>
</view>
<view v-if="companyList.length<1">
<Empty />
</view>
</view>
</view>
</template>
<script>
import partnerApi from '@/api/partner.js'
import companyItem from '../../components/company-item.vue'
export default {
components: {
companyItem
},
data() {
return {
wanjinAccount: true,
companyList:[],
oilSiteId:uni.getStorageSync('oilSite').oilSiteCode
}
},
onShow() {
this.getCompanyList()
},
methods: {
routerTo(key) {
if (key === 'xk') {
var url = '/pages/qrcode/QrCode_xy/QrCode_xy'
} else {
var url = '/pages/qrcode/QrCode-wjy/QrCode-wjy'
}
console.log(url)
uni.navigateTo({
url: url,
fail: (err) => {
console.log('失败', url, err)
}
})
},
getCompanyList(){
partnerApi.companyJoinSite(this.oilSiteId).then(res=>{
if(res.code==20000){
this.companyList = res.data
}
})
}
}
}
</script>
<style scoped>
.card {
position: relative;
width: 700upx;
margin: auto;
}
.qr-bg {
min-height: 200rpx;
text-align: center;
max-height: 300rpx;
}
.text {
position: absolute;
z-index: 1;
left: 4rem;
top: 1.2rem;
color: #fff;
}
.van-tag {
display: inline-block;
padding: 0.3rem 0.4rem;
position: absolute;
right: 1px;
font-size: 12px;
top: 15.75%;
background-color: #fff;
border-radius: 10rem 0 0 10rem;
border-color: transparent;
}
.opened {
color: #fe0505;
}
.before-open {
padding-bottom: 4px;
}
.qr-bg image {
background-size: cover;
width: 700upx;
height: 232rpx;
}
.tip-container {
margin-top: 0.5rem;
color: rgba(191, 39, 1, 1);
background: rgba(255, 255, 255, 1);
box-shadow: 6px 2px 6px 1px rgba(0, 0, 0, 0.06);
opacity: 0.71;
border-radius: 0px 20px 20px 15px;
padding: 0.3rem 0.8rem;
}
.opened {
color: #fe0505;
}
.before-open {
padding-bottom: 4px;
}
</style>