Compare commits

..

6 Commits

16 changed files with 99 additions and 93 deletions

View File

@@ -1,6 +1,6 @@
import request from '@/utils/request'
const service_name ='oil-user'
const group_name ='oilCustomerChannelRelation'
const service_name ='xkhl-user'
const group_name ='oilCustomerChannelRelation'
const change_phone ='sysCustomerInfo'
export default{
//根据用户手机查询油站
@@ -91,7 +91,7 @@ export default{
initCouldUser(){
return request({
url: `/${service_name}/sysCustomerInfo/initCouldUser/initCouldUser`,
method: 'GET'
method: 'GET'
})
},
}
}

View File

@@ -3559,8 +3559,9 @@ scroll-view.cu-steps .cu-item {
}
.bg-gradual-orange {
background-image: linear-gradient(45deg, #ff9700, #ed1c24);
/* background-image: linear-gradient(45deg, #ff9700, #ed1c24); */
color: #ffffff;
background-color: #1890FF;
}
.bg-gradual-green {
@@ -3579,7 +3580,7 @@ scroll-view.cu-steps .cu-item {
}
.bg-main-oil {
background-color: #FE0505;
background-color: #1890FF;
color: #ffffff;
}

View File

@@ -30,11 +30,11 @@ page {
}
.oil-main-color {
color: #FE0505 !important;
color: #000000 !important;
}
.bg-main-oil {
background-color: #FE0505 !important;
background-color: #1890FF !important;
}
.oil-main-btn-color {
@@ -168,7 +168,7 @@ page {
.mini-label::before {
content: '';
position: absolute;
background-color: #FF5200;
background-color: #1890FF;
width: 8upx;
height: 1.4rem;
left: 0;

View File

@@ -1,5 +1,5 @@
{
"name" : "星油云站",
"name" : "中品云站",
"appid" : "__UNI__F1ED4B9",
"description" : "",
"versionName" : "1.0.0",

View File

@@ -1,7 +1,7 @@
<template>
<view class="page-content">
<cu-custom :isBack="true" class="main-topbar bg-main-oil" bgColor="bg-main-oil">
<block slot="content">绑定星油云站</block>
<block slot="content">绑定中品云站</block>
<block slot="backText">返回</block>
</cu-custom>
<view class=" margin radius cu-card shadow no-card padding-top padding-bottom ">
@@ -52,7 +52,9 @@
tips: '发送验证码',
frozen: false, // 验证码冷却时间
auth: {},
verifyCodeToken:'',
verifyCodeToken:'',
pwd:"",
authpwd:"",
loginUser: uni.getStorageSync('loginUser')
}
},

View File

@@ -53,7 +53,7 @@
<view class="margin-bottom-xs">1员工添加成功后系统会向该员工发送一条短信短信中包含了云站的识别码</view>
<view
class="margin-bottom-xs"
>2用户在收到短信后需要关注星油云站公众号进入小程序输入云站编码后根据页面要求输入对应的手机号姓名身份证信息与管理员添加的信息一致方可绑定成功</view>
>2用户在收到短信后需要关注中品云站公众号进入小程序输入云站编码后根据页面要求输入对应的手机号姓名身份证信息与管理员添加的信息一致方可绑定成功</view>
<view class>3绑定成功后无需再次登录操作</view>
</view>
</view>

View File

@@ -229,7 +229,7 @@
"allowsBounceVertical": "NO"
},
"navigationBarBackgroundColor": "#FE0606",
"navigationBarTitleText": "星油云站",
"navigationBarTitleText": "中品云站",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
},

View File

@@ -1,7 +1,7 @@
<template>
<view class="page-content my-bg">
<cu-custom :isBack="true" class="main-topbar bg-main-oil" bgColor="bg-main-oil">
<block slot="content">绑定星油云站</block>
<block slot="content">绑定中品云站</block>
<block slot="backText">返回</block>
</cu-custom>
<view class="pannel">
@@ -11,7 +11,7 @@
{{oilSite.oilSiteName}}
</view>
<view class="padding-xs text-lg">
星油云站欢迎您的加入
中品云站欢迎您的加入
</view>
</view>
</view>
@@ -44,7 +44,7 @@
</view>
<view class="margin-left">
<text class="cuIcon-infofill padding-right-xs text-sm oil-main-color"></text>
<text class="text-sm">请确认您的手机号已添加为星油云站管理员账号</text>
<text class="text-sm">请确认您的手机号已添加为中品云站管理员账号</text>
</view>
<view class="margin margin-top-xl">
<!-- <button class="bg-main-oil" @tap="beforeLogin" open-type="getUserInfo" @getuserinfo="getUserInfo">

View File

@@ -2,7 +2,7 @@
<view class="content my-bg">
<cu-custom class="main-topbar bg-main-oil" @showLists='showLists' :isChange='true' bgColor="bg-main-oil">
<block slot="changeChannel">切换</block>
<block slot="content">{{'星油云站'}}</block>
<block slot="content">{{'中品云站'}}</block>
</cu-custom>
<view class="main-money bg-main-oil">
<view class="padding-left-lg">当前油站为<text>{{accountName}}</text></view>
@@ -84,7 +84,7 @@
</view>
<text>{{ cuIconList[4].name }}</text>
</view>
<view class="cu-item" v-for="(item,index) in menusList" :key="index" @tap="routerTo(item.path)" v-if=' item.name != "星油云站超级管理员"' >
<view class="cu-item" v-for="(item,index) in menusList" :key="index" @tap="routerTo(item.path)" v-if=' item.name != "中品云站超级管理员"' >
<view :class="['cuIcon-' + item.cuIcon, 'text-' + cuIconList[index+1].color]" class="text-sl">
<view class="cu-tag badge" v-if="item.badge != 0">
<block v-if="item.badge != 1">{{ item.badge > 99 ? '99+' : item.badge }}</block>
@@ -135,7 +135,7 @@
</view>
<view class="cu-modal" :class="checkList">
<view class="cu-dialog">
<view class="cu-bar bg-red justify-end">
<view class="cu-bar bg-blue justify-end">
<view class="content ">
{{'选择登录油站'}}
</view>
@@ -147,7 +147,7 @@
<view class="flex align-center justify-between margin-bottom-sm " v-for="(list,i) in oliList" :key='list'>
<view class=""> {{list.siteName}}</view>
<view class="">
<view class=" bg-red cu-btn text-white text-center btn-radius-10 text-sm" @tap="checkLists(list)">
<view class=" bg-blue cu-btn text-white text-center btn-radius-10 text-sm" @tap="checkLists(list)">
进入
</view>
</view>
@@ -157,7 +157,7 @@
</view>
<view class="cu-modal" :class="[checkFirst ? 'show':'']" >
<view class="cu-dialog">
<view class="cu-bar bg-red justify-end">
<view class="cu-bar bg-blue justify-end">
<view class="content ">
{{'选择登录油站'}}
</view>
@@ -169,7 +169,7 @@
<view class="flex align-center justify-between margin-bottom-sm " v-for="(list,i) in oliList" :key='list'>
<view class=""> {{list.siteName}}</view>
<view class="">
<view class=" bg-red cu-btn text-white text-center btn-radius-10 text-sm" @tap="checkLists(list)">
<view class=" bg-blue cu-btn text-white text-center btn-radius-10 text-sm" @tap="checkLists(list)">
进入
</view>
</view>
@@ -400,7 +400,7 @@
obj.color= 'blue',
obj.badge= 0,
obj.name=list.roleName
}else if(list.roleName == '星油云站超级管理员'){
}else if(list.roleName == '中品云站超级管理员'){
obj.cuIcon = 'punch',
obj.path= ' ',
obj.color= 'blue',
@@ -615,7 +615,7 @@
transition: all linear .3s;
}
.color-red{
color: #f70e0e;
color: #1890FF;
font-weight: 700;
font-size: 35rpx;
margin-left: 3%;

View File

@@ -1,26 +1,26 @@
<template>
<view class="page-content " :class="(PageCur=='home'||PageCur=='scan')?'my-bg':''">
<!-- <uni-nav-bar left-icon="back" left-text="返回" right-text="菜单" title="导航栏组件"></uni-nav-bar> -->
<home ref='homecheck' v-if="PageCur=='home'||PageCur=='scan'" :user-account="userAccount" @changMenus='changMenus' :site="userAccount" :menusList = 'menusList' :checkUser = 'checkUser'></home>
<home ref='homecheck' v-if="PageCur==='home'||PageCur==='scan'" :user-account="userAccount" @changMenus='changMenus' :site="userAccount" :menusList = 'menusList' :checkUser = 'checkUser'></home>
<setup v-if="PageCur=='setup'"></setup>
<view class="bottom-view">
<view class="padding-top radius shadow bottom-bar-fixed">
<view class="cu-bar tabbar bg-white">
<view class="action text-gray" @tap="NavChange" data-cur="home">
<view class="cuIcon-homefill sl" :class="PageCur=='home'?'text-red':'text-gray'"></view>
<text :class="PageCur=='home'?'text-red':'text-gray'">
<view class="cuIcon-homefill sl" :class="PageCur=='home'?'text-blue':'text-gray'"></view>
<text :class="PageCur=='home'?'text-blue':'text-gray'">
加油站
</text>
</view>
</view>
<view class="action text-gray add-action" @tap="NavChange" data-cur="scan">
<button class="cu-btn cuIcon-scan sl shadow" :class="PageCur=='scan'?'bg-main-oil':'bg-gradual-orange'"></button>
<text :class="PageCur=='scan'?'text-red':'text-gray'">
<text :class="PageCur=='scan'?'text-blue':'text-gray'">
一键扫码
</text>
</view>
<view class="action text-gray" @tap="NavChange" data-cur="setup">
<view class="cuIcon-peoplefill sl" :class="PageCur=='setup'?'text-red':'text-gray'"></view>
<text :class="PageCur=='setup'?'text-red':'text-gray'">
<view class="cuIcon-peoplefill sl" :class="PageCur=='setup'?'text-blue':'text-gray'"></view>
<text :class="PageCur=='setup'?'text-blue':'text-gray'">
我的
</text>
</view>
@@ -30,11 +30,11 @@
</view>
</template>
<script>
<script>
import cloudSiteApi from '@/api/cloud-site.js'
import oliSiteApi from '@/api/oli-site.js'
import oliUserApi from '@/api/oli-user.js'
export default {
export default {
data() {
return {
checkUser:false,
@@ -48,7 +48,7 @@
totalCount: 0,
totalMoney: 0.00
},
loginUser: uni.getStorageSync('loginUser'),
loginUser: uni.getStorageSync('loginUser'),
channelId:uni.getStorageSync('channelId'),
menusList:[],
site: {},
@@ -62,10 +62,10 @@
url: '../../packageOrders/pages/printTicket/printTicket'
})
},
onShow() {
onShow() {
const token = uni.getStorageSync('Authorization')
const openid = uni.getStorageSync('device')
if (token && openid) {
const openid = uni.getStorageSync('device')
if (token && openid) {
} else {
uni.showToast({
title: '您还没有登录哦',
@@ -74,9 +74,9 @@
setTimeout(function() {
uni.reLaunch({
url: '/pages/login/boforeLogin/boforeLogin',
success: () => {
success: () => {
},
fail: (err) => {
fail: (err) => {
}
})
}, 1500);
@@ -99,10 +99,10 @@
// this.Splicing(item)
menusList.push(this.Splicing(item))
}
})
})
//console.log('这里是menusLisPush',menusList)
// uni.setStorageSync('menusLists',menusList)
let check = uni.getStorageSync('checkFirst')
let check = uni.getStorageSync('checkFirst')
//console.log(check)
if(check){
_that.checkUser = true
@@ -110,7 +110,7 @@
uni.setStorageSync('menusChangeList',menusList)
this.menusList = menusList
//console.log('这里是menusfor循环完成处',this.menusList)
// this.getUserInfo()
// this.getUserInfo()
this.longiCheck()
// //console.log('++++++++')
//console.log('这里是传值处menus',this.menusList)
@@ -134,26 +134,26 @@
this.menusList =data
},
longiCheck(){
let userInfo = uni.getStorageSync('loginUser'),
_that =this
let userInfo = uni.getStorageSync('loginUser')
const _that = this
//console.log(userInfo)
oliUserApi.getByPhone(userInfo.userPhone).then((res)=>{
//console.log('调用')
if(res.code == 20000){
_that.checkList = 'show'
_that.oliList = res.data
_that.oliList = res.data
_that.checkList = 'show'
_that.changeChannel.username = _that.loginUser.userPhone
_that.changeChannel.unionId = uni.getStorageSync('unionId')
this.$refs.homecheck.oliList = res.data
}else{
uni.showToast({
title:'请求失败,请稍后再试',
icon:'none'
})
}
})
},
Splicing(list){
Splicing(list){
let obj = {
cuIcon: '',
path: '',
@@ -203,7 +203,7 @@
obj.color= 'blue',
obj.badge= 0,
obj.name=list.roleName
}else if(list.roleName == '星油云站超级管理员'){
}else if(list.roleName == '中品云站超级管理员'){
obj.cuIcon = 'punch',
obj.path= ' ',
obj.color= 'blue',
@@ -226,7 +226,7 @@
// getUserInfo() {
// // 获取云站当前登录用户的基础资料
// oliSiteApi.getSiteBasicData(this.channelId).then(res => {
// //console.log('用户资料', res)
// //console.log('用户资料', res)
// uni.stopPullDownRefresh();
// if (res.code === 20000) {
// uni.setStorageSync('ueserList',res.data)

View File

@@ -3,21 +3,18 @@
<cu-custom class="main-topbar bg-main-oil" bgColor="bg-main-oil">
<block slot="content">星油云站</block>
</cu-custom>
<view class="bg-img margin flex padding-lg radius align-center text-center" :style="'background-image: url('+mainURL+'login-bg.png)'">
<view class=" header_card bg-img margin flex padding-lg radius align-center text-center" >
<view class="padding-lg margin text-center text-lg text-white w100">
<text class="">
油站工作人员绑定油站
</text>
</view>
</view>
</view>
<view class="pannel">
<view class="bg-white margin padding radius ">
<view class="cu-form-group radius " @tap="routerTo('/pages/login/posLogin/posLogin')">
<view class="title mini-label text-black">已有账号登录</view>
<view class="cuIcon-right">
</view>
<view class="cuIcon-right"></view>
</view>
<!-- <view class="cu-form-group padding-top" @tap="routerTo('/pages/login/login')">
<view class="title mini-label text-black">首次认证登录</view>
@@ -25,7 +22,7 @@
</view>
</view> -->
</view>
</view>
<view class="margin text-center">
<button class="cu-btn round bg-main-oil lg text-lg" open-type="getPhoneNumber"
@@ -84,11 +81,11 @@
if (res.code === 20000) {
this.sessionKey = res.data.sessionKey
uni.setStorageSync('openid', res.data.openId)
uni.setStorageSync('unionid', res.data.unionId)
uni.setStorageSync('unionid', res.data.unionId)
if(_that.outType !== '1'){
this.autoLogin()
return
}
}
} else if (res.code == 1002) {
uni.showModal({
title: '微信登录失败提醒',
@@ -96,7 +93,7 @@
})
} else {
// console.log('res', res.code)
}
}
}).catch(err => {
uni.reLaunch({
url: '/BagAuth/pages/login/boforeLogin/boforeLogin',
@@ -126,7 +123,7 @@
title: '您已拒绝授权手机号'
})
}
},
},
bindLoginByPhone(data, url) { //绑定用户手机号
if (this.count < 1) {
oilIdentityApi.bindLoginByPhonePersonal(data, url).then(res => {
@@ -134,10 +131,10 @@
this.loginSuccess(res)
}
})
}
}
},
loginSuccess(res) {//这里是绑定登录
if (res.data.authTokenDTO.loginFlag) {
loginSuccess(res) {//这里是绑定登录
if (res.data.authTokenDTO.loginFlag) {
this.setStored(res)
}
},
@@ -158,22 +155,17 @@
let data={
unionId:uni.getStorageSync('unionid'),
openId:uni.getStorageSync('openid')
}
}
console.log(data,'这里是自动登录data')
oilIdentityApi.loginPersonal(data).then(res => { //微信自动登录
console.log(res,'这里是自动登录res')
if (res.data.authTokenDTO.loginFlag == true) {
if (res.data.authTokenDTO.loginFlag == true) {
this.setStored(res)
}else {
uni.showToast({
icon: 'none',
title: res.data.msg
})
}
}
})
},
// 存值本地 根据手机号获取其下的油站并且存储本地
setStored(res){
setStored(res){
let user = res.data.authTokenDTO.loginUser,
unionId = uni.getStorageSync('unionid'),
openId = uni.getStorageSync('openid'),
@@ -187,7 +179,7 @@
}
})
}, 1000);
uni.setStorageSync('user', user)
uni.setStorageSync('user', user)
uni.setStorage({
key: 'Authorization',
data: res.data.authTokenDTO.accessToken,
@@ -234,20 +226,20 @@
console.log(err)
}
})
} else {
} else {
uni.showToast({
title: '未绑定油站请联系客服',
icon: 'none',
duration: 1500
})
}
}
})
},
nextStep() {
if (this.oilSiteNo) {
cloudSiteApi.verifyOilSite({
oilSiteCode: this.oilSiteNo
}).then(res => {
}).then(res => {
if (res.code === 20000) {
//历史遗留代码---------------------------------
// address: "安徽省合肥市庐阳区大杨镇"
@@ -325,7 +317,7 @@
this.toMain(nickName);
},
toMain(userName) {
// this.login(userName)
// this.login(userName)
/**
* 强制登录时使用reLaunch方式跳转过来
* 返回首页也使用reLaunch方式
@@ -350,6 +342,10 @@
</script>
<style scoped>
.header_card{
background-image: url('../../../static/img/header_card.png') !important;
background-size: 100% 100%;
}
.btnSize{
font-size:60rpx;
}

View File

@@ -1,9 +1,9 @@
<template>
<view class="page-content my-bg">
<cu-custom class="main-topbar bg-main-oil" bgColor="bg-main-oil" :isBack="true">
<block slot="content">绑定星油云站</block>
<block slot="content">绑定中品云站</block>
</cu-custom>
<view class="bg-img margin flex padding-lg radius align-center text-center" :style="'background-image: url('+mainURL+'login-bg.png)'">
<view class=" header_card bg-img margin flex padding-lg radius align-center text-center" >
<view class="padding-lg margin text-center text-lg text-white w100">
<text class="">
油站工作人员绑定油站
@@ -20,7 +20,7 @@
</view>
<view class="margin-left">
<text class="cuIcon-infofill padding-right-xs text-sm oil-main-color"></text>
<text class="text-sm">请确认您的手机号已添加为星油云站管理员账号</text>
<text class="text-sm">请确认您的手机号已添加为中品云站管理员账号</text>
</view>
</view>
<view class="margin-lg padding-lg bottom-bg">
@@ -223,7 +223,10 @@
background-size: contain;
margin: auto;
}
.header_card{
background-image: url('@/static/img/header_card.png') !important;
background-size: 100% 100%;
}
.bottom-bg {
position: sticky;
bottom: 50upx;

View File

@@ -2,9 +2,9 @@
<template>
<view class="page-content my-bg">
<cu-custom class="main-topbar bg-main-oil" bgColor="bg-main-oil" :isBack="true">
<block slot="content">星油云站</block>
<block slot="content">中品云站</block>
</cu-custom>
<view class="bg-img margin flex padding-lg radius align-center text-center" :style="'background-image: url('+mainURL+'login-bg.png)'">
<view class=" header_card bg-img margin flex padding-lg radius align-center text-center" >
<view class="padding-lg margin text-center text-lg text-white w100">
<text class>油站工作人员绑定油站</text>
</view>
@@ -56,7 +56,7 @@
</view>
<view class="text-left padding-xl padding-bottom padding-top bg-white">
<view class="padding-bottom-sm">
由于微信平台规则变更现用户要关注 星油云站 公众号才能登陆
由于微信平台规则变更现用户要关注 中品云站 公众号才能登陆
</view>
<view class="padding-bottom-sm ">
之前已经关注过的小部分用户可能需要重新关注才能登陆即取消关注再关注
@@ -65,7 +65,7 @@
<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">
@@ -656,6 +656,10 @@
</script>
<style scoped>
.header_card{
background-image: url('../../../static/img/header_card.png') !important;
background-size: 100% 100%;
}
.textshowCheck{
flex-direction: column;
}

View File

@@ -12,7 +12,7 @@
<view class="text-center logo-part">
<view class="cu-avatar xl text-sl" :style="'background-image: url('+mainURL+'qr-icon.png)'"></view>
<view class>
<text class="text-lg">星油云站</text>
<text class="text-lg">中品云站</text>
</view>
</view>
</view>

BIN
static/img/header_card.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@@ -1,17 +1,17 @@
import axios from 'axios'
import utils from '@/utils/encode'
const env = 'test' /* */
const env = 'test' /*1 */
// const env = 'test'// 仅用于测试、
// const env = 'production'
// const env = 'production'
//42 洛超 /29 孙志华 /40 阿浩
// 测试日日顺时需要连阿浩
const testUrl = 'http://192.168.20:38080'
const testUrl = 'http://192.168.26:38080'
// const productionUrl = 'https://www.51xingka.net/oilApp' // 生产,加密 old
// const productionUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
// const productionUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
const productionUrl = 'http://uat.xingoil.com/adminapi'
const productionUrl = 'http://119.177.60.118:8000/adminapi'
// const env = process.env.NODE_ENV // 环境
const service = axios.create({
baseURL: env=='production'?productionUrl:testUrl, //
@@ -124,7 +124,7 @@ service.interceptors.response.use(
title: '下线提醒',
confirmText: '重新登录',
cancelText: "退出",
content: '您的账号在另一微信下登录了星油云站,请确认是否本加油站工作人员操作',
content: '您的账号在另一微信下登录了中品云站,请确认是否本加油站工作人员操作',
success: function(res) {
if (res.confirm) {
uni.reLaunch({