十一月十一凌晨更新
This commit is contained in:
@@ -2,6 +2,7 @@ import request from '@/utils/request'
|
||||
const service_name = "cloud-site-service"
|
||||
const group_name = "cloudSite"
|
||||
export default {
|
||||
|
||||
// 换手机号提交
|
||||
updatePhone(data) {
|
||||
return request({
|
||||
|
||||
12
api/g7.js
Normal file
12
api/g7.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import request from '@/utils/request'
|
||||
const service_name = "cloud-site-service"
|
||||
const group_name = "tbOilOrder"
|
||||
export default {
|
||||
// G7订单支付状态
|
||||
getPayStatus(id) {
|
||||
return request({
|
||||
url: `/${service_name}/${group_name}/get/${id} `,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
}
|
||||
35
api/partner.js
Normal file
35
api/partner.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import request from '@/utils/request'
|
||||
const service_name = "cloud-site-service"
|
||||
const group_name = "cloudSite"
|
||||
export default {
|
||||
// 获取企业列表
|
||||
companyJoinSite(oilSiteId) {
|
||||
return request({
|
||||
url: `/${service_name}/${group_name}/companyJoinSite/${oilSiteId}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
// 获取企业二维码
|
||||
getCompanyQrCode(data) {
|
||||
return request({
|
||||
url: `/${service_name}/${group_name}/getCompanyQrCode`,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
// 获取模拟司机的二维码
|
||||
getQrCode(id) {
|
||||
return request({
|
||||
url: `/${service_name}/${group_name}/getQrCode/${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
// 根据车牌/手机号/司机Id获取加油司机信息
|
||||
getUserMegByCarNo(data) {
|
||||
return request({
|
||||
url: `/${service_name}/${group_name}/getUserMegByCarNo`,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
}
|
||||
110
components/company-item.vue
Normal file
110
components/company-item.vue
Normal file
@@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<view class="margin padding bg-gragul-oil radius company-card">
|
||||
<view class="padding-top padding-bottom-lg flex">
|
||||
<view class="basis-xl">
|
||||
<text class="text-white">{{company.companyName}}</text>
|
||||
<view class="padding-top-xs">
|
||||
<text class="text-white" @tap="makeCall(company.leaderPhone)">负责人:{{company.leaderName}} ({{company.leaderPhone|phoneFilter}})</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="basis-xs">
|
||||
<!-- bg-qy -->
|
||||
<view class="bg-qy">
|
||||
<image style="width: 100%;" :src="mainURL+'bg-qy.png'" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="dashed-top padding-top">
|
||||
<view class="flex">
|
||||
<view class="flex-sub text-center" v-show="company.openJoinCompany" @tap="joinqr">
|
||||
<button class="cu-btn round bg-white text-red text-sm">
|
||||
<text class="text-lg">
|
||||
<text class="cuIcon-qr_code padding-right-xs"></text>
|
||||
</text>
|
||||
出示二维码
|
||||
</button>
|
||||
</view>
|
||||
<view class="flex-sub text-center" v-show="company.openDirectOil" @tap="oiling">
|
||||
<button class="cu-btn round bg-white text-red text-sm">
|
||||
<text class="text-lg">
|
||||
<text class="cuIcon-addressbook padding-right-xs"></text>
|
||||
</text>
|
||||
<!-- <text class="cuIcon-crown padding-right-xs"></text> -->
|
||||
直接加油
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props:{
|
||||
company:{
|
||||
type:Object,
|
||||
default(){}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mainURL: this.global.mainURL,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
oiling() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/partnership/partner-group/partner-group?id=${this.company.companyId}`
|
||||
})
|
||||
},
|
||||
joinqr() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/partnership/join-qr/join-qr?id=${this.company.companyId}&name=${this.company.companyName}`
|
||||
})
|
||||
},
|
||||
makeCall(number){
|
||||
uni.makePhoneCall({
|
||||
phoneNumber:number
|
||||
})
|
||||
}
|
||||
},
|
||||
filters:{
|
||||
phoneFilter(value){
|
||||
if(value){
|
||||
return value.substring(0, 3) + ' ' + ' **** ' + ' ' + value.substring(7, 11)
|
||||
}else{
|
||||
return '暂无手机号'
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.bg-gragul-oil {
|
||||
background: linear-gradient(-51deg, rgba(255, 0, 0, 0.81), rgba(255, 19, 19, 0.81));
|
||||
}
|
||||
|
||||
.dashed-top::after {
|
||||
border-color: #fff !important;
|
||||
}
|
||||
|
||||
.company-card {
|
||||
position: relative;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.bg-qy {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
width: 120upx;
|
||||
height: 120upx;
|
||||
top: 15rpx;
|
||||
right: 2.5rem;
|
||||
}
|
||||
|
||||
.cu-btn {
|
||||
border-radius: 100upx 100upx 100upx 0;
|
||||
}
|
||||
</style>
|
||||
67
components/driver-item.vue
Normal file
67
components/driver-item.vue
Normal file
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<view class="solid-bottom content" @tap="virtualScan(driver.driverId)">
|
||||
<view class="text-xl">
|
||||
<text class="cuIcon-deliver text-red padding-sm padding-bottom-0">
|
||||
</text>
|
||||
<text class="text-df text-black padding-top-sm">
|
||||
{{driver.plateNumber?driver.plateNumber:'暂无车牌号'}}
|
||||
</text>
|
||||
</view>
|
||||
<view class="padding-left padding-bottom margin-left">
|
||||
<view class="bg-white padding-left-xs">
|
||||
<text class="padding-right-lg text-df">{{driver.userName}} ({{driver.driverId}})</text>{{driver.phone|phoneFilter}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import partnerApi from '@/api/partner.js'
|
||||
export default {
|
||||
props: {
|
||||
driver: {
|
||||
type: Object,
|
||||
default () {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mainURL: this.global.mainURL,
|
||||
loginUser: uni.getStorageSync('loginUser'),
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
virtualScan(id) {
|
||||
partnerApi.getQrCode(id).then(res=>{
|
||||
if(res.code==20000){
|
||||
uni.setStorageSync('qrCode', res.data)
|
||||
uni.navigateTo({
|
||||
url:`/pages/stationDetail/stationDetail`
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
phoneFilter(value) {
|
||||
if (value) {
|
||||
return value.substring(0, 3) + ' ' + ' **** ' + ' ' + value.substring(7, 11)
|
||||
} else {
|
||||
return '暂无手机号'
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.cu-tag {
|
||||
border-radius: 100upx 0 0 100upx;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 30rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -84,18 +84,16 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- <xkempty v-else></xkempty> -->
|
||||
<!-- <Empty /> -->
|
||||
<!-- 评价的弹出层 -->
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Empty from '@/components/Empty'
|
||||
|
||||
export default {
|
||||
name: 'oilOrders',
|
||||
components: {
|
||||
xkempty: Empty
|
||||
},
|
||||
|
||||
props: {
|
||||
item: {
|
||||
type: Object,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<!-- 客服热线 -->
|
||||
<view class="">
|
||||
|
||||
<view class="round text-center">
|
||||
<button class="cu-btn round bg-main-oil" open-type='contact'>
|
||||
<text class="cuIcon-servicefill padding-right-xs"></text>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
mode="widthFix"></image>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<text class="uni-load-more__text" :style="{color: color}">{{ status === 'more' ? contentText.contentdown : status === 'loading' ? contentText.contentrefresh : contentText.contentnomore }}</text>
|
||||
<text class="uni-load-more__text text-sm" :style="{color: color}">{{ status === 'more' ? contentText.contentdown : status === 'loading' ? contentText.contentrefresh : contentText.contentnomore }}</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: '#777777'
|
||||
default: '#888'
|
||||
},
|
||||
contentText: {
|
||||
type: Object,
|
||||
@@ -137,7 +137,7 @@
|
||||
}
|
||||
|
||||
.uni-load-more__text {
|
||||
font-size: 15px;
|
||||
font-size:14px;
|
||||
}
|
||||
|
||||
.uni-load-more__img {
|
||||
|
||||
4
main.js
4
main.js
@@ -10,8 +10,8 @@ Vue.component('home', home)
|
||||
|
||||
import setup from '@/pages/setup/setup.vue'
|
||||
Vue.component('setup', setup)
|
||||
|
||||
|
||||
import Empty from '@/components/Empty'
|
||||
Vue.component('Empty', Empty)
|
||||
Vue.component('cu-custom', cuCustom)
|
||||
Vue.component('service-hotline', serviceHotline)
|
||||
Vue.config.productionTip = false
|
||||
|
||||
55
pages.json
55
pages.json
@@ -6,10 +6,23 @@
|
||||
"navigationBarTitleText": "星油",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},{
|
||||
},
|
||||
{
|
||||
"path": "pages/stationDetail/stationDetail",
|
||||
"style": {}
|
||||
},{
|
||||
}, {
|
||||
"path": "pages/orderList/orderList",
|
||||
"style": {}
|
||||
}, {
|
||||
"path": "pages/temp/temp",
|
||||
"style": {}
|
||||
}, {
|
||||
"path": "pages/login/boforeLogin/boforeLogin",
|
||||
"style": {}
|
||||
}, {
|
||||
"path": "pages/station-info/scan-camera/scan-camera",
|
||||
"style": {}
|
||||
}, {
|
||||
"path": "pages/setup/changePhone/changePhone",
|
||||
"style": {}
|
||||
},
|
||||
@@ -42,17 +55,11 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "pages/login/boforeLogin/boforeLogin",
|
||||
"style": {}
|
||||
}, {
|
||||
"path": "pages/staff/editStaff/addUser",
|
||||
"style": {}
|
||||
}, {
|
||||
"path": "pages/orderList/OrderDetail/OrderDetail",
|
||||
"style": {}
|
||||
}, {
|
||||
"path": "pages/orderList/orderList",
|
||||
"style": {}
|
||||
}, {
|
||||
"path": "pages/staff/List/List",
|
||||
"style": {
|
||||
@@ -63,10 +70,7 @@
|
||||
"path": "pages/qrcode/QrCode_xy",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/temp/temp",
|
||||
"style": {}
|
||||
},
|
||||
|
||||
|
||||
|
||||
{
|
||||
@@ -75,13 +79,34 @@
|
||||
}, {
|
||||
"path": "pages/orderList/dailyOrder/dailyOrder",
|
||||
"style": {}
|
||||
}, {
|
||||
"path": "pages/test/test",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "pages/partnership/partnership",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "pages/partnership/partner-group/partner-group",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "pages/partnership/join-qr/join-qr",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
|
||||
,{
|
||||
"path" : "pages/station-info/scan-camera/scan-camera",
|
||||
"style" : {}
|
||||
}
|
||||
],
|
||||
"subPackages": [{
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
</view>
|
||||
<text>{{ item.name }}</text>
|
||||
</view>
|
||||
|
||||
<!-- <view class="cu-item" @tap="routerTo('/pages/orderList/orderList')">
|
||||
<view :class="['cuIcon-' + cuIconList[1].cuIcon, 'text-' + cuIconList[1].color]" class="text-sl">
|
||||
<view class="cu-tag badge" v-if="cuIconList[1].badge != 0">
|
||||
@@ -123,19 +124,44 @@
|
||||
name: '油站信息'
|
||||
},
|
||||
{
|
||||
cuIcon: 'form',
|
||||
cuIcon: 'new',
|
||||
path: '暂无',
|
||||
color: 'orange',
|
||||
badge: 0,
|
||||
name: '经营分析'
|
||||
}, {
|
||||
cuIcon: 'form',
|
||||
color: 'yellow',
|
||||
path: '/pages/orderList/orderList',
|
||||
badge: 0,
|
||||
name: '加油订单'
|
||||
},
|
||||
{
|
||||
cuIcon: 'new',
|
||||
path: '暂无',
|
||||
color: 'yellow',
|
||||
badge: 0,
|
||||
name: '经营分析'
|
||||
},
|
||||
// {
|
||||
// cuIcon: 'new',
|
||||
// path: '暂无',
|
||||
// color: 'orange',
|
||||
// badge: 0,
|
||||
// name: '经营分析'
|
||||
// }, {
|
||||
// cuIcon: 'form',
|
||||
// color: 'yellow',
|
||||
// path: '/pages/orderList/orderList',
|
||||
// badge: 0,
|
||||
// name: '加油订单'
|
||||
// }, {
|
||||
// cuIcon: 'location',
|
||||
// path: '/pages/station-info/station-info',
|
||||
// color: 'red',
|
||||
// badge: 0,
|
||||
// name: '油站信息'
|
||||
// },
|
||||
// {
|
||||
// cuIcon: 'form',
|
||||
// color: 'yellow',
|
||||
// path: '/pages/orderList/orderList',
|
||||
// badge: 0,
|
||||
// name: '加油订单'
|
||||
// },
|
||||
{
|
||||
cuIcon: 'scan',
|
||||
path: '/pages/stationDetail/stationDetail',
|
||||
@@ -150,13 +176,21 @@
|
||||
path: '/pages/qrcode/QrCode_xy',
|
||||
name: '油站二维码'
|
||||
},
|
||||
|
||||
{
|
||||
cuIcon: 'punch',
|
||||
path: '/pages/partnership/partnership',
|
||||
color: 'blue',
|
||||
badge: 0,
|
||||
name: '合作企业'
|
||||
}, {
|
||||
cuIcon: 'expressman',
|
||||
color: 'red',
|
||||
color: 'mauve',
|
||||
// color: 'pink',
|
||||
path: '暂无',
|
||||
badge: 0,
|
||||
name: '员工管理'
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
};
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="margin text-center">
|
||||
<view @tap="loginWeixin" class="cu-avatar xl bg-transparent">
|
||||
|
||||
@@ -36,12 +36,46 @@
|
||||
<view class="margin-lg padding-lg bottom-bg">
|
||||
<button class="bg-main-oil round" v-if="showRandom" @tap="loginRandom">登录</button>
|
||||
<button class="bg-main-oil round" v-else @tap="loginPwd">登录</button>
|
||||
|
||||
<view class="text-center margin-top text-gray text-sm padding-right" @tap="showTips">
|
||||
<text class="cuIcon-question padding-right-xs"></text>突然登不上了
|
||||
</view>
|
||||
<official-account @binderror="bindload" @bindload="binderror"></official-account>
|
||||
</view>
|
||||
|
||||
<view class="bottom-part">
|
||||
<service-hotline />
|
||||
</view>
|
||||
<view class="cu-modal" :class="modalName">
|
||||
<view class="cu-dialog">
|
||||
<view class="cu-bar bg-red light justify-end">
|
||||
<view class="content ">
|
||||
{{'温馨提示'}}
|
||||
</view>
|
||||
<view class="action" @tap="hideModal">
|
||||
<text class="cuIcon-close text-red"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-left padding-xl padding-bottom padding-top bg-white">
|
||||
<view class="padding-bottom-sm">
|
||||
由于微信平台规则变更,现用户要关注 “星油云站” 公众号,才能登陆
|
||||
</view>
|
||||
<view class="padding-bottom-sm ">
|
||||
之前已经关注过的小部分用户,可能需要重新关注才能登陆,即取消关注,再关注
|
||||
</view>
|
||||
<official-account @binderror="bindload" @bindload="binderror"></official-account>
|
||||
<view class="text-center" @longpress="navToQr" @tap="toQr">
|
||||
<view class=" img-view">
|
||||
<image height="200" src="https://xingka51.oss-cn-hangzhou.aliyuncs.com/applets/cloudSite/yunzhan.jpg" mode="widthFix"></image>
|
||||
星油云站公众号
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="text-center padding-top padding-bottom">
|
||||
<button class="cu-btn bg-red light round" open-type='contact' @tap="hideModal">未解决,联系在线客服</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -53,6 +87,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
modalName: '',
|
||||
baseURL: this.global.baseURL,
|
||||
mainURL: this.global.mainURL,
|
||||
forcedLogin: true,
|
||||
@@ -68,76 +103,98 @@
|
||||
uni.showShareMenu()
|
||||
},
|
||||
methods: {
|
||||
bindload(){
|
||||
toQr() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/test/test'
|
||||
})
|
||||
},
|
||||
navToQr() {
|
||||
uni.setClipboardData({
|
||||
data: 'https://xingka51.oss-cn-hangzhou.aliyuncs.com/applets/cloudSite/yunzhan.jpg',
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: '二维码链接已复制',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
hideModal() {
|
||||
this.modalName = ''
|
||||
},
|
||||
showTips() {
|
||||
this.modalName = 'show'
|
||||
},
|
||||
bindload() {
|
||||
console.log('组件夹杂')
|
||||
},
|
||||
binderror(){
|
||||
binderror() {
|
||||
console.log('组件夹杂失败')
|
||||
},
|
||||
loginWeixin() {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: loginRes => {
|
||||
const code = loginRes.code
|
||||
console.log('启动页code', code)
|
||||
loginApi.loginWeixin(code).then(res => {
|
||||
if (res.code === 20000) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
fail: (err) => {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'success',
|
||||
duration: 3000
|
||||
})
|
||||
uni.setStorage({
|
||||
key: 'Authorization',
|
||||
data: res.data.accessToken,
|
||||
success: () => {
|
||||
console.log('Authorization成功', res.data.accessToken)
|
||||
}
|
||||
})
|
||||
uni.setStorage({
|
||||
key: 'device',
|
||||
data: res.data.openid,
|
||||
success: () => {
|
||||
console.log('deviceopenid', res.data.openid)
|
||||
}
|
||||
})
|
||||
uni.setStorageSync('userMenu', res.data.loginUser.procedureAuthList)
|
||||
uni.setStorageSync('loginUser', {
|
||||
id: res.data.loginUser.id,
|
||||
name: res.data.loginUser.name,
|
||||
userPhone: res.data.loginUser.userPhone
|
||||
})
|
||||
} else {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/boforeLogin/boforeLogin',
|
||||
fail: (err) => {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
console.log('res', res.code)
|
||||
}
|
||||
// loginWeixin() {
|
||||
// uni.login({
|
||||
// provider: 'weixin',
|
||||
// success: loginRes => {
|
||||
// const code = loginRes.code
|
||||
// console.log('启动页code', code)
|
||||
// loginApi.loginWeixin(code).then(res => {
|
||||
// if (res.code === 20000) {
|
||||
// uni.reLaunch({
|
||||
// url: '/pages/index/index',
|
||||
// fail: (err) => {
|
||||
// console.log(err)
|
||||
// }
|
||||
// })
|
||||
// uni.showToast({
|
||||
// title: res.msg,
|
||||
// icon: 'success',
|
||||
// duration: 3000
|
||||
// })
|
||||
// uni.setStorage({
|
||||
// key: 'Authorization',
|
||||
// data: res.data.accessToken,
|
||||
// success: () => {
|
||||
// console.log('Authorization成功', res.data.accessToken)
|
||||
// }
|
||||
// })
|
||||
// uni.setStorage({
|
||||
// key: 'device',
|
||||
// data: res.data.openid,
|
||||
// success: () => {
|
||||
// console.log('deviceopenid', res.data.openid)
|
||||
// }
|
||||
// })
|
||||
// uni.setStorageSync('userMenu', res.data.loginUser.procedureAuthList)
|
||||
// uni.setStorageSync('loginUser', {
|
||||
// id: res.data.loginUser.id,
|
||||
// name: res.data.loginUser.name,
|
||||
// userPhone: res.data.loginUser.userPhone
|
||||
// })
|
||||
// } else {
|
||||
// uni.reLaunch({
|
||||
// url: '/pages/login/boforeLogin/boforeLogin',
|
||||
// fail: (err) => {
|
||||
// console.log(err)
|
||||
// }
|
||||
// })
|
||||
// console.log('res', res.code)
|
||||
// }
|
||||
|
||||
|
||||
}).catch(err => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/boforeLogin/boforeLogin',
|
||||
fail: (err) => {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
}
|
||||
});
|
||||
},
|
||||
// }).catch(err => {
|
||||
// uni.reLaunch({
|
||||
// url: '/pages/login/boforeLogin/boforeLogin',
|
||||
// fail: (err) => {
|
||||
// console.log(err)
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// },
|
||||
// fail: err => {
|
||||
// console.log(err)
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
|
||||
loginPwd() {
|
||||
uni.login({
|
||||
@@ -439,4 +496,15 @@
|
||||
position: sticky;
|
||||
bottom: 50upx;
|
||||
}
|
||||
|
||||
.img-view {
|
||||
max-width: 300upx;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.qrimg-yunzhan {
|
||||
width: 200upx;
|
||||
height: 200rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -86,13 +86,14 @@
|
||||
下单时间
|
||||
<text class="fr">{{orderItem.createDatetime}}</text>
|
||||
</view>
|
||||
<view class="margin-bottom-sm">
|
||||
<!-- <view class="margin-bottom-sm">
|
||||
扣款时间
|
||||
<text class="fr">{{orderItem.paydatetime}}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="padding-bottom-sm">
|
||||
开票状态
|
||||
<text class="fr">{{orderItem.invoiceState|invoiceStateFormat}}</text>
|
||||
<text class="fr" v-if="formQr">未开票</text>
|
||||
<text class="fr" v-else>{{orderItem.invoiceState|invoiceStateFormat}}</text>
|
||||
</view>
|
||||
<!-- <view class="margin-bottom-sm" v-if="orderItem.paydatetime">
|
||||
支付时间
|
||||
@@ -121,12 +122,28 @@
|
||||
// orderId:'',
|
||||
orderId: uni.getStorageSync('orderId'),
|
||||
formQr: uni.getStorageSync('formQr') ? true : false,
|
||||
tempOrderInfo: uni.getStorageSync('tempOrderInfo'),
|
||||
orderItem: {},
|
||||
baseURL: this.global.baseURL
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.formQr && !this.tempOrderInfo.payOrderId) {
|
||||
this.orderItem = {
|
||||
...this.tempOrderInfo,
|
||||
orderID: this.tempOrderInfo.payOrderId,
|
||||
amount: this.tempOrderInfo.standardAmount,
|
||||
realamount: this.tempOrderInfo.oilAmount,
|
||||
userName: this.tempOrderInfo.driverId,
|
||||
carNo: this.tempOrderInfo.plateNumber,
|
||||
createDatetime: this.tempOrderInfo.createTime,
|
||||
paydatetime: this.tempOrderInfo.payTime,
|
||||
bar: this.tempOrderInfo.oilGun,
|
||||
vol: this.tempOrderInfo.volume,
|
||||
}
|
||||
} else {
|
||||
this.getOrderDetail()
|
||||
}
|
||||
},
|
||||
onHide() {
|
||||
this.clearStatus()
|
||||
@@ -139,7 +156,7 @@
|
||||
uni.removeStorageSync('formQr')
|
||||
},
|
||||
scanQr() {
|
||||
scanUrl = '/pages/station-info/scan-camera/scan-camera'
|
||||
var scanUrl = '/pages/station-info/scan-camera/scan-camera'
|
||||
uni.navigateTo({
|
||||
url: scanUrl,
|
||||
fail: (err) => {
|
||||
|
||||
@@ -63,11 +63,11 @@
|
||||
import cloudSiteApi from '@/api/cloud-site.js'
|
||||
import OrderItem from '@/components/order-item'
|
||||
import UniLoadMore from '@/components/uni-load-more/uni-load-more.vue'
|
||||
import Empty from '@/components/Empty'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
OrderItem,
|
||||
Empty,
|
||||
|
||||
UniLoadMore
|
||||
},
|
||||
data() {
|
||||
|
||||
@@ -63,11 +63,11 @@
|
||||
import cloudSiteApi from '@/api/cloud-site.js'
|
||||
import OrderItem from '@/components/order-item'
|
||||
import UniLoadMore from '@/components/uni-load-more/uni-load-more.vue'
|
||||
import Empty from '@/components/Empty'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
OrderItem,
|
||||
Empty,
|
||||
|
||||
UniLoadMore
|
||||
},
|
||||
data() {
|
||||
|
||||
139
pages/partnership/join-qr/join-qr.vue
Normal file
139
pages/partnership/join-qr/join-qr.vue
Normal file
@@ -0,0 +1,139 @@
|
||||
<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;
|
||||
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>
|
||||
BIN
pages/partnership/join-qr/qr-icon.png
Normal file
BIN
pages/partnership/join-qr/qr-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
122
pages/partnership/partner-group/partner-group.vue
Normal file
122
pages/partnership/partner-group/partner-group.vue
Normal 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>
|
||||
126
pages/partnership/partnership.vue
Normal file
126
pages/partnership/partnership.vue
Normal 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>
|
||||
@@ -19,7 +19,7 @@
|
||||
<text class="color-999 font-12">
|
||||
<text class="cuIcon-refresh padding-right-xs"></text>
|
||||
<!-- 付款码自动 (25s) -->
|
||||
付款码
|
||||
收款码
|
||||
<text class="oil-main-color">
|
||||
刷新
|
||||
</text>
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<text class="color-000">版本号</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">1.2.3</text>
|
||||
<text class="text-grey text-sm">1.3.0</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
@@ -29,11 +29,11 @@
|
||||
<script>
|
||||
import UniLoadMore from '@/components/uni-load-more/uni-load-more.vue'
|
||||
import staffApi from '@/api/staff.js'
|
||||
import Empty from '@/components/Empty'
|
||||
|
||||
import StaffItem from '@/components/staff-item'
|
||||
export default {
|
||||
components: {
|
||||
Empty,
|
||||
|
||||
StaffItem,
|
||||
UniLoadMore
|
||||
},
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
},
|
||||
scancode(e) {
|
||||
if (!this.once) {
|
||||
var scanUrl = '/pages/stationDetail/stationDetail'
|
||||
var scanUrl = ''
|
||||
// uni.getStorageSync('scanUrl')
|
||||
// 提示音
|
||||
innerAudioContext.play()
|
||||
@@ -109,7 +109,7 @@
|
||||
uni.setStorageSync('qrCode', res)
|
||||
this.once = true
|
||||
uni.redirectTo({
|
||||
url: scanUrl,
|
||||
url: `/pages/stationDetail/stationDetail`,
|
||||
fail: (err) => {
|
||||
console.log(err)
|
||||
},
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<view class="page-content">
|
||||
<view class v-show="beforePay">
|
||||
<cu-custom class="main-topbar bg-main-oil" :isBack="true" bgColor="bg-main-oil">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">{{stationMsg.oilSiteName}}</block>
|
||||
</cu-custom>
|
||||
|
||||
<view class="cu-list menu-avatar">
|
||||
<view class="cu-item margin-sm margin-left margin-right radius">
|
||||
<view class="cu-avatar round lg" :style="'background-image:url('+driverMsg.headUrl+');'"></view>
|
||||
@@ -86,6 +86,68 @@
|
||||
</view>
|
||||
<button class="margin round bg-main-oil" @tap="charge">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class v-show="!beforePay&&isG7">
|
||||
<cu-custom class="main-topbar bg-main-oil" :isBack="true" bgColor="bg-main-oil">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">{{payState|payStateFormat}}</block>
|
||||
</cu-custom>
|
||||
<view class="margin-sm bg-white padding-lg">
|
||||
<view class="padding-top margin-bottom"></view>
|
||||
<view class="text-xsl text-center">
|
||||
<text class="cuIcon-rechargefill oil-main-color"></text>
|
||||
</view>
|
||||
<view class="text-center text-bold">
|
||||
{{payState|payStateFormat}}
|
||||
</view>
|
||||
<view class="padding margin-sm">
|
||||
<text v-if="payErrorMessage">{{ payErrorMessage }} </text>
|
||||
<text v-else>{{ payState==0?'请勿离开当前页面,等待扣款状态查询确认后,页面会自动跳转......':'' }} </text>
|
||||
</view>
|
||||
<view class="text-center">
|
||||
<button style="width: 500upx;" class="round large cu-btn bg-main-oil" @tap="getPayStatus(orderId)">手动刷新</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-sm bg-white padding">
|
||||
<view class="margin-bottom-sm" @tap="copyId(driverMsg.driverName,'加油司机')">
|
||||
加油司机
|
||||
<text class="fr">
|
||||
{{driverMsg.driverName}}
|
||||
<text class="flex-sub padding-left-sm text-right cuIcon-copy text-lg text-red"></text>
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<view class="margin-bottom-sm" @tap="copyId(carNumber,'司机车牌')">
|
||||
司机车牌
|
||||
<text class="fr">
|
||||
{{carNumber}}
|
||||
<text class="flex-sub padding-left-sm text-right cuIcon-copy text-lg text-red"></text>
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<view class="margin-bottom-sm">
|
||||
油枪油号
|
||||
<text class="fr">{{insertResult.bar}}号枪{{insertResult.oilName}}</text>
|
||||
</view>
|
||||
<view class="margin-bottom-sm">
|
||||
加油总金额
|
||||
<text class="fr">¥ {{insertResult.vMoney|numberFilter}}</text>
|
||||
</view>
|
||||
<view class="margin-bottom-sm">
|
||||
加油升数
|
||||
<text class="fr">{{insertResult.vol|numberFilter}} 升</text>
|
||||
</view>
|
||||
<view class="margin-bottom-sm">
|
||||
星卡优惠
|
||||
<text class="fr">¥ {{insertResult.vMoney-insertResult.vDoMoney|numberFilter}}</text>
|
||||
</view>
|
||||
|
||||
<view class="margin-bottom-sm">
|
||||
实扣款
|
||||
<text class="fr oil-main-color">¥ {{insertResult.vDoMoney|numberFilter}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<PlateNumberPicker @newPlate="showPlateModal(false,true)" @onDeleteInput="onDeleteInput" :showInputList="showInputList"
|
||||
:showPlateList="showPlateList" @selectNo="selectNo" @clearAll="clearPlateNumber" @selectName="selectText" @hideModal="showModel=''"
|
||||
:modalName="showModel" />
|
||||
@@ -94,6 +156,7 @@
|
||||
|
||||
<script>
|
||||
import cloudSiteApi from '@/api/cloud-site.js'
|
||||
import g7Api from '@/api/g7.js'
|
||||
import PlateNumberPicker from '@/components/plate-number-picker/plate-number-picker.vue'
|
||||
export default {
|
||||
components: {
|
||||
@@ -101,6 +164,8 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isG7: false,
|
||||
beforePay: true,
|
||||
testResult: false,
|
||||
showPlateList: true,
|
||||
showInputList: false,
|
||||
@@ -109,6 +174,7 @@
|
||||
plateText: '',
|
||||
imgList: [],
|
||||
plateName: '',
|
||||
orderId: '',
|
||||
showModel: '',
|
||||
// 车牌号,上
|
||||
radio: 'B',
|
||||
@@ -124,6 +190,8 @@
|
||||
stationMsg: {
|
||||
|
||||
},
|
||||
payErrorMessage: '',
|
||||
timer: null,
|
||||
selected: {},
|
||||
insertResult: {
|
||||
bar: 1,
|
||||
@@ -136,10 +204,25 @@
|
||||
vMoney: "0.00",
|
||||
vol: ""
|
||||
},
|
||||
orderKey: ''
|
||||
orderKey: '',
|
||||
payState: '0'
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
if (this.qrCode) {
|
||||
if (this.qrCode.substr(0, 2) == 'HT' || this.qrCode.substr(0, 2) == 'G7') {
|
||||
this.isG7 = true
|
||||
console.log('G7加油站')
|
||||
}
|
||||
}
|
||||
this.verifyQrCode()
|
||||
},
|
||||
onUnload() {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
oilTypeList: {
|
||||
handler(newVal, oldVal) {
|
||||
@@ -182,11 +265,29 @@
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
this.verifyQrCode()
|
||||
},
|
||||
|
||||
methods: {
|
||||
queryTimer() {
|
||||
var count = 5
|
||||
this.timer = setInterval(() => {
|
||||
console.log('查询次', count)
|
||||
count--
|
||||
this.getPayStatus(this.orderId)
|
||||
}, 5000);
|
||||
if (!count) {
|
||||
clearInterval(this.timer)
|
||||
}
|
||||
},
|
||||
copyId(id, name) {
|
||||
uni.setClipboardData({
|
||||
data: id,
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: name + '已复制',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
clearPlateNumber() {
|
||||
this.plateText = ''
|
||||
this.plateNo = ""
|
||||
@@ -214,7 +315,7 @@
|
||||
if (this.plateNo.length == 1) {
|
||||
this.plateNo = ''
|
||||
}
|
||||
if(!this.carNumber){
|
||||
if (!this.carNumber) {
|
||||
this.plateText = ''
|
||||
this.plateNo = ''
|
||||
this.showPlateList = false
|
||||
@@ -280,26 +381,57 @@
|
||||
cloudSiteApi.saveOrder(data6).then(res => {
|
||||
if (res.code === 20000) {
|
||||
uni.showToast({
|
||||
title: '下单成功!请确认是否支付成功!'
|
||||
title: '下单成功!'
|
||||
});
|
||||
uni.setStorageSync('formQr', true)
|
||||
uni.setStorageSync('tempOrderInfo', res.data)
|
||||
if (!this.isG7) {
|
||||
setTimeout(() => {
|
||||
this.toDetails(res.data.orderId)
|
||||
}, 800)
|
||||
this.toDetails(res.data.payOrderId)
|
||||
}, 400)
|
||||
} else {
|
||||
this.beforePay = false
|
||||
setTimeout(() => {
|
||||
this.orderId = res.data.orderId
|
||||
this.queryTimer()
|
||||
this.getPayStatus(this.orderId)
|
||||
}, 400)
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
||||
uni.showToast({
|
||||
title: '车牌号校验不通过',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
getPayStatus(id) {
|
||||
// 获取订单支付状态
|
||||
console.log('获取支付状态', id)
|
||||
g7Api.getPayStatus(id).then(res => {
|
||||
if (res.code == 20000) {
|
||||
this.payState = res.data.payState
|
||||
if (res.data.payState == -1) {
|
||||
this.payErrorMessage = res.data.payErrorMessage
|
||||
clearInterval(this.timer)
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.payErrorMessage
|
||||
})
|
||||
}
|
||||
if (res.data.payState == 1) {
|
||||
clearInterval(this.timer)
|
||||
this.toDetails(res.data.payOrderId)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
toDetails(id) {
|
||||
uni.setStorageSync('orderId', id)
|
||||
console.log('id', id)
|
||||
uni.navigateTo({
|
||||
uni.redirectTo({
|
||||
url: '/pages/orderList/OrderDetail/OrderDetail'
|
||||
})
|
||||
|
||||
@@ -365,9 +497,22 @@
|
||||
return value.substring(5, 16)
|
||||
}
|
||||
},
|
||||
|
||||
numberFilter(value) {
|
||||
value = value - 1 + 1
|
||||
return value.toFixed(2)
|
||||
},
|
||||
payStateFormat(value) {
|
||||
switch (parseInt(value)) {
|
||||
case 1:
|
||||
return '支付成功'
|
||||
case -1:
|
||||
return '支付失败'
|
||||
case 0:
|
||||
return '等待支付'
|
||||
default:
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,143 +1,113 @@
|
||||
<template>
|
||||
<view class="page-content my-bg">
|
||||
<cu-custom class="main-topbar bg-main-oil" bgColor="bg-white">
|
||||
<block slot="content">绑定星油云站</block>
|
||||
</cu-custom>
|
||||
<view class="pannel">
|
||||
<view class="logo margin-top">
|
||||
<img :src="baseURL+'/static/img/order-xy.png'" mode="" />
|
||||
</view>
|
||||
<view class="bg-white margin padding radius shadow-warp">
|
||||
<view class="text-bold padding-bottom text-center">
|
||||
油站工作人员绑定油站
|
||||
</view>
|
||||
<view class="text-grey padding-bottom text-center">
|
||||
请确认您的手机号码已注册星油云站
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">云站号</view>
|
||||
<input placeholder="请输入云站编号" name="input"></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin">
|
||||
<button class="bg-main-oil" @tap="loginWeixin">
|
||||
登录
|
||||
</button>
|
||||
<button class="bg-main-oil" open-type="getUserInfo" @getuserinfo="getUserInfo">
|
||||
登录测试getuserinfo
|
||||
</button>
|
||||
<button class="bg-main-oil" @tap="getMsg">
|
||||
订阅消息
|
||||
</button>
|
||||
<button class="bg-gradual-pink" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">获取微信绑定手机号</button>
|
||||
<button class="bg-gradual-pink" open-type="launchApp" @error="launchAppError">获取微信绑定手机号</button>
|
||||
</view>
|
||||
<view class="page-content">
|
||||
<view class="page-section page-section-gap">
|
||||
<map
|
||||
style="width: 100%; height: 1600rpx;"
|
||||
id="mymap"
|
||||
show-location
|
||||
enable-traffic
|
||||
show-compass
|
||||
:latitude="latitude"
|
||||
enable-3D
|
||||
:longitude="longitude"
|
||||
:markers="covers"
|
||||
:polyline="polyline"
|
||||
@markertap="ontouchMaker"
|
||||
></map>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import loginApi from '@/api/login.js'
|
||||
export default {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
baseURL: this.global.baseURL,
|
||||
forcedLogin: true
|
||||
};
|
||||
id: 0, // 使用 marker点击事件 需要填写id
|
||||
title: 'map',
|
||||
longitude: 117.166483,
|
||||
latitude: 31.764309,
|
||||
|
||||
polyline: [{
|
||||
points: [{
|
||||
latitude: 31.764325,
|
||||
longitude: 117.16659
|
||||
}, {
|
||||
latitude: 31.764309,
|
||||
longitude: 117.166482
|
||||
},
|
||||
created() {
|
||||
// this.loginWeixin()
|
||||
{
|
||||
latitude: 31.764308,
|
||||
longitude: 117.166483
|
||||
},
|
||||
{
|
||||
latitude: 31.764312,
|
||||
longitude: 117.166488
|
||||
},
|
||||
{
|
||||
latitude: 31.764332,
|
||||
longitude: 117.166583
|
||||
}
|
||||
],
|
||||
color: '#0AED4D',
|
||||
width: 3,
|
||||
borderWidth: 2,
|
||||
}],
|
||||
|
||||
|
||||
covers: [{
|
||||
id: 0,
|
||||
latitude: 39.909,
|
||||
longitude: 116.39742,
|
||||
iconPath: '../../static/img/60.jpg',
|
||||
width: 36,
|
||||
height: 36,
|
||||
alpha: 0.8
|
||||
}, {
|
||||
id: 1,
|
||||
latitude: 39.90,
|
||||
longitude: 116.39,
|
||||
iconPath: '../../static/img/28.png',
|
||||
width: 36,
|
||||
alpha: 0.8,
|
||||
height: 36
|
||||
}]
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
var mymap = uni.createMapContext('mymap', this)
|
||||
mymap.moveToLocation()
|
||||
|
||||
},
|
||||
onReady() {
|
||||
var mymap = uni.createMapContext('mymap', this)
|
||||
mymap.moveToLocation()
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
launchAppError(err){
|
||||
console.log(err)
|
||||
},
|
||||
getPhoneNumber(obj){
|
||||
console.log(obj)
|
||||
},
|
||||
getMsg() {
|
||||
uni.requestSubscribeMessage({
|
||||
tmplIds: ['W5XD3NQVa6knC5jXHeWT8GS7q5CHrDUMY_sF79kLkKk'],
|
||||
success: (res) => {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
},
|
||||
getUserInfo({
|
||||
detail
|
||||
}) {
|
||||
console.log('三方登录只演示登录api能力,暂未关联云端数据');
|
||||
console.log('detail', detail)
|
||||
if (detail.userInfo) {
|
||||
this.loginLocal(detail.userInfo.nickName);
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '登陆失败'
|
||||
});
|
||||
ontouchMaker(e) {
|
||||
console.log(e, e.detail)
|
||||
console.log(this.covers[e.detail.markerId])
|
||||
}
|
||||
|
||||
},
|
||||
loginLocal(nickName) {
|
||||
uni.setStorageSync('login_type', 'local')
|
||||
uni.setStorageSync('username', nickName)
|
||||
this.toMain(nickName);
|
||||
},
|
||||
toMain(userName) {
|
||||
// this.login(userName)
|
||||
console.log(userName)
|
||||
/**
|
||||
* 强制登录时使用reLaunch方式跳转过来
|
||||
* 返回首页也使用reLaunch方式
|
||||
*/
|
||||
if (this.forcedLogin) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
success: () => {
|
||||
console.log('success')
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.navigateBack();
|
||||
}
|
||||
|
||||
},
|
||||
loginWeixin() {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: loginRes => {
|
||||
const code = loginRes.code
|
||||
console.log(code)
|
||||
loginApi.loginWeixin(code).then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page-content {
|
||||
.page-content {
|
||||
min-height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.logo {
|
||||
.logo {
|
||||
min-width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.logo img {
|
||||
.logo img {
|
||||
width: 200upx;
|
||||
height: 200rpx;
|
||||
background-size: contain;
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
23
pages/test/test.vue
Normal file
23
pages/test/test.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- <web-view src="https://xingka51.oss-cn-hangzhou.aliyuncs.com/applets/cloudSite/yunzhan.jpg"></web-view> -->
|
||||
<web-view class="qrimg-yunzhan" src="https://www.51xingka.net/LSMDRIVER/static/img/yunzhan.jpg" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -2,13 +2,15 @@ import axios from 'axios'
|
||||
import utils from '@/utils/encode'
|
||||
const service = axios.create({
|
||||
// baseURL: 'http://192.168.0.104:48080', // 小杰
|
||||
// baseURL: 'http://a27389c632.qicp.vip', // 生产
|
||||
// baseURL: 'http://a27389c632.qicp.vip', //
|
||||
// baseURL: 'http://121.199.72.230:2333/oil', // 生产,yds测试网关
|
||||
// baseURL: 'http://www.15617055136.top', // 龙龙
|
||||
// baseURL: 'http://172.16.2.143:28080', // 龙龙出差蒲公英,好像用不了
|
||||
// baseURL: 'http://172.16.3.34:48080', // 小杰出差蒲公英,好像用不了
|
||||
|
||||
// baseURL: 'http://192.168.0.112:48080', // 龙龙
|
||||
baseURL: 'http://31g4904724.picp.vip', // 龙龙出差
|
||||
// baseURL:'http://datou.wicp.vip',// 龙龙// 龙龙// 龙龙
|
||||
// baseURL: 'https://www.51xingka.net/oilApp',
|
||||
// baseURL: 'http://31g4904724.picp.vip', // 龙龙小杰出差花生壳
|
||||
baseURL:'http://www.15617055136.top',// 龙龙// 龙龙// 龙龙
|
||||
// baseURL: 'https://www.51xingka.net/oilApp',//生产
|
||||
timeout: 5000
|
||||
})
|
||||
var url = ''
|
||||
|
||||
Reference in New Issue
Block a user