Compare commits

...

7 Commits

Author SHA1 Message Date
骆超
be6bc9c046 更换手机号,修改密码,新老手机号验证 2023-05-10 15:59:19 +08:00
69357846e7 Merge pull request '密码登录' (#2) from lc into caolc
Reviewed-on: #2
2023-05-09 02:30:30 +00:00
骆超
843ae242bc 密码登录 2023-05-09 10:29:56 +08:00
caolc
3c8c985cce Merge branch 'caolc' of http://121.196.213.68:3000/caoliancun/LSM_OIL_SITE_zhongping into caolc 2023-05-08 08:59:00 +08:00
caolc
50ffdddce6 1 2023-05-08 08:58:58 +08:00
a1ebcaf789 Merge pull request '用户登录&退出' (#1) from lc into caolc
Reviewed-on: #1
2023-05-06 09:03:48 +00:00
骆超
767f164e59 用户登录&退出 2023-05-06 17:03:05 +08:00
9 changed files with 133 additions and 106 deletions

View File

@@ -1,17 +1,24 @@
import request from '@/utils/request'
const service_name ='oil-identity'
const group_name ='weChatCloudAuthorization'
const service_name ='xkhl-identity'
const group_name ='unionAuth'
const Customer_name = 'oilCustomerChannelRelation'
const WchatLogin_name ='weChatCloudAuthorization'
export default{
// 新登录接口 手机密码登录
loginByPhonePwd (data) {
return request({
url: `/${service_name}/${group_name}/loginByPhonePwd`,
url: `/${service_name}/${group_name}/loginPwd`,
method: 'post',
data:data
})
},
// 新登录接口 手机密码登录
logout () {
return request({
url: `/${service_name}/${group_name}/logout`,
method: 'get',
})
},
// 获取用户信息
sendCode(code){
return request({

View File

@@ -1,5 +1,5 @@
import request from '@/utils/request'
const service_name ='oil-user'
const service_name ='xkhl-user'
const group_name ='oilCustomerChannelRelation'
const change_phone ='sysCustomerInfo'
export default{

View File

@@ -1,6 +1,6 @@
{
"name" : "星油云站",
"appid" : "__UNI__EA8D131",
"appid" : "__UNI__F1ED4B9",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",

View File

@@ -53,6 +53,8 @@
frozen: false, // 验证码冷却时间
auth: {},
verifyCodeToken:'',
pwd:"",
authpwd:"",
loginUser: uni.getStorageSync('loginUser')
}
},

View File

@@ -1,7 +1,7 @@
<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">
@@ -134,23 +134,23 @@
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.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){

View File

@@ -164,6 +164,11 @@
console.log(res,'这里是自动登录res')
if (res.data.authTokenDTO.loginFlag == true) {
this.setStored(res)
}else {
uni.showToast({
icon: 'none',
title: res.data.msg
})
}
})
},

View File

@@ -13,7 +13,7 @@
<view class="bg-white margin padding radius shadow-warp">
<view class="cu-form-group">
<view class="title mini-label text-black">手机号</view>
<input type="number" v-model="auth.phone" placeholder="请输入手机号" name="input" @blur="bulrInput" />
<input type="number" v-model="auth.phone" placeholder="请输入手机号" name="input" />
</view>
<view class="cu-form-group padding-top-sm" v-if="showRandom">
<view class="title text-black mini-label">验证码</view>
@@ -464,9 +464,12 @@
});
},
sendMsg() {
if(!this.checkUser){
return
}
console.log("发送验证码",this.checkUser)
// if(!this.checkUser){
// return
// }
if (!this.frozen) {
if (this.auth.phone) {
const data2 = {

View File

@@ -76,6 +76,7 @@
<script>
import cloudSiteApi from '@/api/cloud-site.js'
import oilIdentityApi from "@/api/oil-identity";
export default {
data() {
return {
@@ -98,13 +99,22 @@
}
})
},
async loginOut() {
// await cloudSiteApi.logout();
loginOut() {
oilIdentityApi.logout().then(res => {
if (res.code===20000){
uni.showToast({
title: '退出登录成功',
icon: 'success',
duration: 2000
});
setTimeout(()=>{
uni.clearStorage()
uni.reLaunch({
url: '/pages/login/boforeLogin/boforeLogin?type=1' //
url: '/pages/login/boforeLogin/boforeLogin?type=1'
})
},2000)
}
})
},
getInfo() {
this.userInfo = uni.getStorageSync('loginUser')

View File

@@ -7,7 +7,7 @@ import utils from '@/utils/encode'
//42 洛超 /29 孙志华 /40 阿浩
// 测试日日顺时需要连阿浩
const testUrl = 'http://192.168.26:38080'
const testUrl = 'http://192.168.20: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
@@ -212,7 +212,7 @@ service.interceptors.response.use(
})
} else {
uni.showToast({
title: '请求失败!',
title: res.msg?res.msg:'请求失败!',
icon: "none"
})
}