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>
<view>
<view >
<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;">
<uni-easyinput @input="iconClick" @confirm="confirmFn" style="width: 90%; margin: 0 auto;"
prefixIcon="search" v-model="nameOrPhone" placeholder="请输入内容" />

View File

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

View File

@@ -15,7 +15,7 @@
阅读并同意 <text style="color: #2A67FE;">用户隐私政策</text> <text
style="color: #2A67FE;">星油能源注册服务协议</text>
</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>
<uni-popup ref="popup" type="center">

View File

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