Merge remote-tracking branch 'origin/master'
commit
ba898beeb2
|
@ -46,7 +46,7 @@ export function structure(data){
|
|||
})
|
||||
}
|
||||
|
||||
//测试连接
|
||||
//同步资产结构
|
||||
export function connectionTest(data){
|
||||
return request({
|
||||
url: "/source/source/connectionTest",
|
||||
|
@ -61,7 +61,16 @@ export function deleteSource(ids){
|
|||
return request({
|
||||
url: "/source/source/"+ids,
|
||||
method: "delete",
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//修改
|
||||
export function update(data){
|
||||
return request({
|
||||
url: "/source/source/update",
|
||||
method: "post",
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
export function getPhonePlace(data) {
|
||||
export function getPhonePlace(tel) {
|
||||
return request({
|
||||
url: '/mart/list/getPhonePlace',
|
||||
method: 'get',
|
||||
data:data
|
||||
url: '/mart/list/getPhonePlace?tel='+tel,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ export function listUser(query) {
|
|||
// 用户余额
|
||||
export function userRecharge(data) {
|
||||
return request({
|
||||
url: '/money/alipay/recharge',
|
||||
url: '/system/alipay/recharge',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
|
@ -23,7 +23,7 @@ export function userRecharge(data) {
|
|||
// 查询用户余额
|
||||
export function userBalance(userId) {
|
||||
return request({
|
||||
url: '/money/balance/' + userId,
|
||||
url: '/system/user/balance/' + userId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
|
|
@ -69,6 +69,7 @@ const user = {
|
|||
commit('SET_ROLES', ['ROLE_DEFAULT'])
|
||||
}
|
||||
commit('SET_ID', user.userId)
|
||||
localStorage.setItem('userId', user.userId)
|
||||
commit('SET_NAME', user.userName)
|
||||
commit('SET_AVATAR', avatar)
|
||||
resolve(res)
|
||||
|
|
|
@ -56,9 +56,9 @@
|
|||
</el-button>
|
||||
|
||||
|
||||
<el-dialog title="添加数据源接入" :visible.sync="dialogFormVisible" append-to-body width="60%">
|
||||
<el-dialog title="title" :visible.sync="dialogFormVisible" append-to-body width="60%">
|
||||
|
||||
<el-form ref="form" :model="sourceAddReq" label-width="140px" :inline="true" class="demo-form-inline">
|
||||
<el-form ref="form" :model="sourceAddReq" :rules="rules" label-width="140px" :inline="true" class="demo-form-inline">
|
||||
<el-form-item label="接入源名称">
|
||||
<el-input v-model="sourceAddReq.dataResourceName"></el-input>
|
||||
</el-form-item>
|
||||
|
@ -262,7 +262,7 @@
|
|||
<script>
|
||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
import {selectSourceList} from "@/api/etl/switch";
|
||||
import {selectSourceList, update} from "@/api/etl/switch";
|
||||
import {selectSourceExport} from "@/api/etl/switch";
|
||||
import {connectionTest} from "@/api/etl/switch";
|
||||
import {insertAdd} from "@/api/etl/switch";
|
||||
|
@ -278,6 +278,17 @@ export default {
|
|||
//这里存放数据"
|
||||
|
||||
return {
|
||||
rules: {
|
||||
dataResourceName: [
|
||||
{required: true, message: "接入源名称不能为空", trigger: "blur"}
|
||||
],
|
||||
dataSourcesSystemName: [
|
||||
{required: true, message: "数据来源系统名称不能为空", trigger: "blur"}
|
||||
],
|
||||
host: [
|
||||
{required: true, message: "主机地址不能为空", trigger: "blur"}
|
||||
]
|
||||
},
|
||||
ids:[],
|
||||
dialogFormVisible:false,
|
||||
SourceReq:{
|
||||
|
@ -295,6 +306,20 @@ export default {
|
|||
watch: {},
|
||||
//方法集合",
|
||||
methods: {
|
||||
reset() {
|
||||
this.sourceAddReq = {
|
||||
};
|
||||
this.resetForm("sourceAddReq");
|
||||
},
|
||||
//修改
|
||||
update(row){
|
||||
this.reset();
|
||||
getInfo(row.id).then(res=>{
|
||||
this.sourceAddReq=res.data;
|
||||
this.dialogFormVisible=true;
|
||||
this.title="修改岗位"
|
||||
})
|
||||
},
|
||||
struceure(row){
|
||||
structure(row).then(res=>{
|
||||
if (res ===200){
|
||||
|
@ -326,11 +351,21 @@ export default {
|
|||
})
|
||||
},
|
||||
addSource(){
|
||||
insertAdd(this.sourceAddReq).then(res=>{
|
||||
if (this.sourceAddReq.id!=undefined){
|
||||
update(this.sourceAddReq).then(res=>{
|
||||
if (res.code===200){
|
||||
alert("修改成功")
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
}else {
|
||||
insertAdd(this.sourceAddReq).then(res=>{
|
||||
if(res.code===200){
|
||||
alert("添加成功")
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
//测试连接
|
||||
textConnect(row){
|
||||
|
@ -343,7 +378,9 @@ export default {
|
|||
})
|
||||
},
|
||||
|
||||
//新增
|
||||
insertAdd(){
|
||||
this.reset();
|
||||
this.dialogFormVisible=true
|
||||
},
|
||||
findSelectSourceList(){
|
||||
|
|
|
@ -1,30 +1,48 @@
|
|||
<template>
|
||||
<div>
|
||||
<span style="text-align: center">账户余额: {{ balance }}</span>
|
||||
<el-card style="margin-top: 50px;">
|
||||
<h1>用户余额</h1>
|
||||
<p>余额:{{ userBalanceData.userBalance || '加载中...' }}</p>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import {userBalance} from "@/api/system/user";
|
||||
import { userBalance } from "@/api/system/user"; // 假设你的userBalance函数在@/api/money目录下
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
balance: null, // 用于存储用户余额
|
||||
userBalanceData: {
|
||||
userBalance: '加载中...'
|
||||
}
|
||||
};
|
||||
},
|
||||
async created() {
|
||||
created() {
|
||||
this.fetchUserBalance();
|
||||
},
|
||||
methods: {
|
||||
async fetchUserBalance() {
|
||||
try {
|
||||
const userId = 1; // 根据实际情况获取用户 ID
|
||||
const userId = localStorage.getItem('userId');
|
||||
console.log(userId)// 登录后把userId存到了localStorage
|
||||
if (!userId) {
|
||||
this.userBalanceData = {userBalance: '未登录'};
|
||||
return;
|
||||
}
|
||||
const response = await userBalance(userId);
|
||||
this.balance = response.data.balance; // 假设响应数据中包含余额信息
|
||||
if (response.data) {
|
||||
console.log(response.data)
|
||||
this.userBalanceData.userBalance = response.data; // 假设response.data直接返回了余额信息
|
||||
} else {
|
||||
this.userBalanceData.userBalance = {userBalance: '获取失败'};
|
||||
}
|
||||
} catch (error) {
|
||||
this.userBalanceData = {userBalance: '获取失败'};
|
||||
console.error('Error fetching user balance:', error);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 添加样式 */
|
||||
</style>
|
||||
|
|
|
@ -1,31 +1,61 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="8">
|
||||
<el-card shadow="hover">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>手机号查询归属地</span>
|
||||
<el-button style="float: right; padding: 3px 0" type="text">购买</el-button>
|
||||
</div>
|
||||
<el-form :model="formLabelAlign">
|
||||
<el-form-item placeholder="请输入手机号">
|
||||
<el-input v-model="formLabelAlign.tel"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button @click="getPhonePlace">查询</el-button>
|
||||
<span>省份:{{this.formLabelAlign.province}}</span><br>
|
||||
<span>城市:{{this.formLabelAlign.city}}</span><br>
|
||||
<span>区号:{{this.formLabelAlign.areacode}}</span><br>
|
||||
<span>邮编:{{this.formLabelAlign.zip}}</span><br>
|
||||
<span>运营商:{{this.formLabelAlign.company}}</span>
|
||||
</el-card>
|
||||
<el-card class="box-card">
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card shadow="hover">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>IP查询归属地</span>
|
||||
<el-button style="float: right; padding: 3px 0" type="text">购买</el-button>
|
||||
</div>
|
||||
<div v-for="o in 4" :key="o" class="text item">
|
||||
{{'列表内容 ' + o }}
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card shadow="never">
|
||||
从不显示
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <div>-->
|
||||
<!-- <el-card class="box-card">-->
|
||||
<!-- <div slot="header" class="clearfix">-->
|
||||
<!-- <span>手机号查询归属地</span>-->
|
||||
<!-- <el-button style="float: right; padding: 3px 0" type="text">购买</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- <el-form :model="formLabelAlign">-->
|
||||
<!-- <el-form-item placeholder="请输入手机号">-->
|
||||
<!-- <el-input v-model="formLabelAlign.tel"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item placeholder="请输入手机号">-->
|
||||
<!-- <el-button @click="getPhonePlace">查询</el-button>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- <span>省份:{{this.formLabelAlign.province}}</span><br>-->
|
||||
<!-- <span>城市:{{this.formLabelAlign.city}}</span><br>-->
|
||||
<!-- <span>区号:{{this.formLabelAlign.areacode}}</span><br>-->
|
||||
<!-- <span>邮编:{{this.formLabelAlign.zip}}</span><br>-->
|
||||
<!-- <span>运营商:{{this.formLabelAlign.company}}</span>-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div>-->
|
||||
<!-- <el-card class="box-card">-->
|
||||
<!-- <div slot="header" class="clearfix">-->
|
||||
<!-- <span>IP查询归属地</span>-->
|
||||
<!-- <el-button style="float: right; padding: 3px 0" type="text">购买</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div v-for="o in 4" :key="o" class="text item">-->
|
||||
<!-- {{'列表内容 ' + o }}-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -57,6 +87,7 @@ export default {
|
|||
//方法集合",
|
||||
methods: {
|
||||
getPhonePlace(){
|
||||
alert("111")
|
||||
getPhonePlace(this.formLabelAlign.tel).then((res)=>{
|
||||
this.formLabelAlign.province=res.data.province;
|
||||
this.formLabelAlign.city=res.data.city;
|
||||
|
|
Loading…
Reference in New Issue