This commit is contained in:
xiaozhiyong
2026-04-01 14:26:55 +08:00
parent c501ba0a53
commit c32f9e842c
4 changed files with 33 additions and 30 deletions

View File

@@ -1,7 +1,7 @@
<template> <template>
<view> <view >
<uni-popup @change="change" ref="popup" type="bottom" background-color="#fff"> <uni-popup @change="change" ref="popup" type="bottom" background-color="#fff">
<view style="height:35vh; display: flex;flex-direction: column;"> <view style="height:35vh; display: flex;flex-direction: column;padding-top: 40rpx;">
<view style="display: flex;"> <view style="display: flex;">
<uni-easyinput @input="iconClick" @confirm="confirmFn" style="width: 90%; margin: 0 auto;" <uni-easyinput @input="iconClick" @confirm="confirmFn" style="width: 90%; margin: 0 auto;"
prefixIcon="search" v-model="nameOrPhone" placeholder="请输入内容" /> prefixIcon="search" v-model="nameOrPhone" placeholder="请输入内容" />

View File

@@ -61,7 +61,8 @@
currentPage: 1, currentPage: 1,
pageSize: 10, pageSize: 10,
sorted: { sorted: {
createTime: 'desc' // createTime: 'desc'
balance:'asc'
}, },
params: { params: {
accountName: '' accountName: ''
@@ -95,7 +96,7 @@
// }, // },
methods: { methods: {
chargeChange(item) { chargeChange(item) {
this.paramter.params.businessLeader = item.id this.paramter.params.operateUser = item.id
this.paramter.params.name = item.userName this.paramter.params.name = item.userName
this.seachFn() this.seachFn()
}, },

View File

@@ -15,7 +15,7 @@
阅读并同意 <text style="color: #2A67FE;">用户隐私政策</text> <text 阅读并同意 <text style="color: #2A67FE;">用户隐私政策</text> <text
style="color: #2A67FE;">星油能源注册服务协议</text> style="color: #2A67FE;">星油能源注册服务协议</text>
</view> </view>
<button @tap="sumit" style="margin-top:26rpx; " class="form_body_butten">一键登录</button> <button @tap="sumit" style="margin-top:26rpx; " class="form_body_butten">登录</button>
</view> </view>
</view> </view>
<uni-popup ref="popup" type="center"> <uni-popup ref="popup" type="center">

View File

@@ -13,8 +13,11 @@
<view class="xian" style="flex: 1;"></view> <view class="xian" style="flex: 1;"></view>
</view> </view>
<view style="text-align: center;margin-top: 32rpx;"> <view style="text-align: center;margin-top: 32rpx;">
<button class="wxlogin" open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumber"> <!-- class="wxlogin" -->
<image class="wx" style="" src="@/static/wxlogo.png"></image> <button type="primary" plain="true" size="mini" open-type="getPhoneNumber"
@getphonenumber="decryptPhoneNumber">
手机号快捷登录
<!-- <image class="wx" style="" src="@/static/wxlogo.png"></image> -->
</button> </button>
</view> </view>
</view> </view>
@@ -37,7 +40,7 @@
* @property {Function} decryptPhoneNumber: 微信获取用户手机号回调函数 * @property {Function} decryptPhoneNumber: 微信获取用户手机号回调函数
* @property {Function} bindLoginByPhone: 微信获取用户手机号回调成功后请求手机号登录接口 * @property {Function} bindLoginByPhone: 微信获取用户手机号回调成功后请求手机号登录接口
* @property {Function} loginSuccess: 登陆成功后执行 存储到本地token等数据 * @property {Function} loginSuccess: 登陆成功后执行 存储到本地token等数据
*/ */
import starlogin from './coments/starlogin.vue' import starlogin from './coments/starlogin.vue'
import password from './coments/passwordLogin.vue' import password from './coments/passwordLogin.vue'
import verificationCode from './coments/verificationCode.vue' import verificationCode from './coments/verificationCode.vue'
@@ -50,7 +53,7 @@
}, },
data() { data() {
return { return {
type:0, type: 0,
sessionKey: '', sessionKey: '',
ishow: { ishow: {
state: 0 state: 0
@@ -66,12 +69,12 @@
that.ishow.state = e.state that.ishow.state = e.state
that.phone = e.phone that.phone = e.phone
}) })
if(e.type){ if (e.type) {
this.type = JSON.parse(e.type) this.type = JSON.parse(e.type)
console.log(this.type,e.type,'*-*-') console.log(this.type, e.type, '*-*-')
} }
this.loginFn() this.loginFn()
}, },
methods: { methods: {
decryptPhoneNumber(e) { decryptPhoneNumber(e) {
@@ -91,7 +94,7 @@
}) })
} }
}, },
bindLoginByPhone(data) { bindLoginByPhone(data) {
oilIdentityApi.bindLoginByPhone(data).then(res => { oilIdentityApi.bindLoginByPhone(data).then(res => {
if (res.code == 20000) { if (res.code == 20000) {
@@ -106,36 +109,36 @@
uni.setStorageSync('accountStatus', resData.isCompanyAccount) uni.setStorageSync('accountStatus', resData.isCompanyAccount)
let user = resData.authTokenDTO.loginUser let user = resData.authTokenDTO.loginUser
uni.setStorageSync('user', user) uni.setStorageSync('user', user)
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none', icon: 'none',
complete: (err) => { complete: (err) => {
setTimeout(() => { setTimeout(() => {
uni.redirectTo({ uni.redirectTo({
url:'../index/newindex' url: '../index/newindex'
}) })
}, 1000); }, 1000);
// console.log(err) // console.log(err)
} }
}) })
} }
}, },
loginFn() { loginFn() {
uni.clearStorageSync() uni.clearStorageSync()
if(this.type==1){ if (this.type == 1) {
uni.setStorageSync('logintype',this.type) uni.setStorageSync('logintype', this.type)
} }
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',
success: (loginRes) => { success: (loginRes) => {
const code = loginRes.code const code = loginRes.code
// this.onceCode = code // this.onceCode = code
oilIdentityApi.sendCode({ oilIdentityApi.sendCode({
code: code code: code
}).then(res => { }).then(res => {
if (res.code === 20000) { if (res.code === 20000) {
console.log(res.data,'--------------') console.log(res.data, '--------------')
uni.setStorageSync('openid', res.data.openId) uni.setStorageSync('openid', res.data.openId)
uni.setStorageSync('unionid', res.data.unionId) uni.setStorageSync('unionid', res.data.unionId)
this.sessionKey = res.data.sessionKey this.sessionKey = res.data.sessionKey
@@ -150,8 +153,7 @@
console.log('res', res.code) console.log('res', res.code)
} }
}).catch(err => { }).catch(err => {})
})
}, },
fail: err => {}, fail: err => {},
@@ -343,4 +345,4 @@
margin-top: 421rpx; margin-top: 421rpx;
} }
</style> </style>