Merge branch 'master' of https://gitea.qinmian.online/TreeData/cloud-web
commit
8c8cbde692
|
@ -57,3 +57,16 @@ export function getBirthday(data) {
|
||||||
data:data
|
data:data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getPostcode(code) {
|
||||||
|
return request({
|
||||||
|
url: '/port/list/getPostcode?code='+code,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getWeather() {
|
||||||
|
return request({
|
||||||
|
url: '/port/list/getWeather',
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -31,6 +31,16 @@ export function userRecharge(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 调用第三方实名认证
|
||||||
|
export function checkRealNameAuth(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/aliyun/pay/doPost',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 充值用户余额记录
|
// 充值用户余额记录
|
||||||
export function createRechargeRecord(data) {
|
export function createRechargeRecord(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -4,6 +4,25 @@
|
||||||
<h1>用户余额</h1>
|
<h1>用户余额</h1>
|
||||||
<p>余额:{{ userBalanceData.userBalance || '加载中...' }}</p>
|
<p>余额:{{ userBalanceData.userBalance || '加载中...' }}</p>
|
||||||
<el-button type="primary" @click="navigateToRecharge">充值</el-button>
|
<el-button type="primary" @click="navigateToRecharge">充值</el-button>
|
||||||
|
<el-dialog
|
||||||
|
title="实名认证"
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
width="30%"
|
||||||
|
@close="handleDialogClose"
|
||||||
|
>
|
||||||
|
<el-form :model="authForm" :rules="rules" ref="authFormRef">
|
||||||
|
<el-form-item label="姓名" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="authForm.name"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="身份证号" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="authForm.idCard"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="handleCancel">取消</el-button>
|
||||||
|
<el-button type="primary" @click="handleConfirm">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,22 +63,36 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { userBalance } from "@/api/system/user"; //
|
import {userBalance} from "@/api/system/user"; //
|
||||||
import * as echarts from 'echarts' //引用echarts
|
import * as echarts from 'echarts' //引用echarts
|
||||||
|
import {checkRealNameAuth} from "@/api/system/user";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
charts: "",
|
charts: "",
|
||||||
|
dialogVisible: false,
|
||||||
dialogFormVisible: false,
|
dialogFormVisible: false,
|
||||||
formLabelWidth: '120px',
|
formLabelWidth: '120px',
|
||||||
opinionData: ["155", "400", "900", "800", "300", "900", "270","684","165","0","300","150"], // 数据
|
opinionData: ["155", "400", "900", "800", "300", "900", "270", "684", "165", "0", "300", "150"], // 数据
|
||||||
userBalanceData: {
|
userBalanceData: {
|
||||||
userBalance: '加载中...'
|
userBalance: '加载中...'
|
||||||
},
|
},
|
||||||
form:{
|
authForm: {
|
||||||
|
name: '',
|
||||||
}
|
idCard: ''
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
name: [
|
||||||
|
{required: true, message: '请输入姓名', trigger: 'blur'},
|
||||||
|
{min: 2, max: 10, message: '姓名长度在 2 到 10 个字符', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
idCard: [
|
||||||
|
{required: true, message: '请输入身份证号', trigger: 'blur'},
|
||||||
|
{pattern: /^\d{17}[\dXx]$/, message: '身份证号格式不正确', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
},
|
||||||
|
form: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -69,8 +102,51 @@ export default {
|
||||||
this.drawLine();
|
this.drawLine();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
navigateToRecharge() {
|
handleCancel() {
|
||||||
this.$router.push('/money/zfb');
|
this.dialogVisible = false;
|
||||||
|
},
|
||||||
|
handleDialogClose() {
|
||||||
|
this.authForm.name = '';
|
||||||
|
this.authForm.idCard = '';
|
||||||
|
},
|
||||||
|
async navigateToRecharge() {
|
||||||
|
try {
|
||||||
|
const response = await checkRealNameAuth(this.authForm);
|
||||||
|
if (response.data && response.data.desc) {
|
||||||
|
// 如果已实名认证,直接跳转页面
|
||||||
|
this.$router.push('/money/zfb');
|
||||||
|
} else {
|
||||||
|
// 如果未实名认证,显示对话框
|
||||||
|
this.dialogVisible = true;
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
this.$message.error('实名认证检查失败,请稍后再试');
|
||||||
|
console.error('实名认证检查失败:', error);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleConfirm() {
|
||||||
|
this.$refs.authFormRef.validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
try {
|
||||||
|
const {name, idCard} = this.authForm;
|
||||||
|
const authResponse = await checkRealNameAuth(this.authForm);
|
||||||
|
if (authResponse.data && authResponse.data.desc) {
|
||||||
|
this.$message.success('实名认证成功');
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.$router.push('/money/zfb');
|
||||||
|
} else {
|
||||||
|
this.$message.error('实名认证失败,请检查您的信息');
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
this.$message.error('实名认证验证失败,请稍后再试');
|
||||||
|
console.error('实名认证验证失败:', error);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log('error submit!!');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
async fetchUserBalance() {
|
async fetchUserBalance() {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testPhone()" v-if="connector.connectorName=='手机号查询归属地'">测试API</el-button>
|
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testPhone()" v-if="connector.connectorName=='手机号查询归属地'">测试API</el-button>
|
||||||
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testIP()" v-if="connector.connectorName=='IP查询归属地'">测试API</el-button>
|
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testIP()" v-if="connector.connectorName=='IP查询归属地'">测试API</el-button>
|
||||||
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testNews()" v-if="connector.connectorName=='新闻头条'">测试API</el-button>
|
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testNews()" v-if="connector.connectorName=='新闻头条'">测试API</el-button>
|
||||||
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testWeather()" v-if="connector.connectorName=='气象预警'">测试</el-button>
|
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testWeather()" v-if="connector.connectorName=='气象预警'">测试API</el-button>
|
||||||
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testBirthdate()" v-if="connector.connectorName=='生辰助手'">测试API</el-button>
|
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testBirthdate()" v-if="connector.connectorName=='生辰助手'">测试API</el-button>
|
||||||
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testMailbox()" v-if="connector.connectorName=='邮编查询'">测试</el-button>
|
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testMailbox()" v-if="connector.connectorName=='邮编查询'">测试API</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -88,31 +88,62 @@
|
||||||
<el-input v-model="formBirthday.hour" autocomplete="off" placeholder="请输入几点"></el-input>
|
<el-input v-model="formBirthday.hour" autocomplete="off" placeholder="请输入几点"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<span style="font-weight: bold;font-size: 20px" v-if="formBirthday.reason==true">
|
<span style="font-weight: bold;font-size: 20px" v-if="formBirthday.reason==true">
|
||||||
{{this.formBirthday.years}}<br>
|
years: {{this.formBirthday.years}}<br>
|
||||||
{{this.formBirthday.months}}<br>
|
months: {{this.formBirthday.months}}<br>
|
||||||
{{this.formBirthday.days}}<br>
|
days: {{this.formBirthday.days}}<br>
|
||||||
{{this.formBirthday.animal}}<br>
|
animal: {{this.formBirthday.animal}}<br>
|
||||||
{{this.formBirthday.imonthcn}}<br>
|
imonthcn: {{this.formBirthday.imonthcn}}<br>
|
||||||
{{this.formBirthday.idaycn}}<br>
|
idaycn: {{this.formBirthday.idaycn}}<br>
|
||||||
{{this.formBirthday.cyear}}<br>
|
cyear: {{this.formBirthday.cyear}}<br>
|
||||||
{{this.formBirthday.cmonth}}<br>
|
cmonth: {{this.formBirthday.cmonth}}<br>
|
||||||
{{this.formBirthday.cday}}<br>
|
cday: {{this.formBirthday.cday}}<br>
|
||||||
{{this.formBirthday.gzyear}}<br>
|
gzyear: {{this.formBirthday.gzyear}}<br>
|
||||||
{{this.formBirthday.gzmonth}}<br>
|
gzmonth: {{this.formBirthday.gzmonth}}<br>
|
||||||
{{this.formBirthday.gzday}}<br>
|
gzday: {{this.formBirthday.gzday}}<br>
|
||||||
{{this.formBirthday.isleap}}<br>
|
isleap: {{this.formBirthday.isleap}}<br>
|
||||||
{{this.formBirthday.ncweek}}<br>
|
ncweek: {{this.formBirthday.ncweek}}<br>
|
||||||
{{this.formBirthday.isterm}}<br>
|
isterm: {{this.formBirthday.isterm}}<br>
|
||||||
{{this.formBirthday.term}}<br>
|
term: {{this.formBirthday.term}}<br>
|
||||||
{{this.formBirthday.astro}}<br>
|
astro: {{this.formBirthday.astro}}<br>
|
||||||
{{this.formBirthday.eightall}}<br>
|
eightall: {{this.formBirthday.eightall}}<br>
|
||||||
{{this.formBirthday.fiveall}}
|
fiveall: {{this.formBirthday.fiveall}}
|
||||||
</span>
|
</span>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="getBirthday()">发起请求</el-button>
|
<el-button type="primary" @click="getBirthday()">发起请求</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!--邮编查询-->
|
||||||
|
<el-dialog title="邮编查询" :visible.sync="dialogFormVisible3">
|
||||||
|
<el-form :model="formPostCode">
|
||||||
|
<el-form-item label="邮编" >
|
||||||
|
<el-input v-model="formPostCode.code" autocomplete="off" placeholder="请输入邮编"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-table :data="gridData2" v-if="formPostCode.reason==true">
|
||||||
|
<el-table-column property="postNumber" label="邮编" width="150"></el-table-column>
|
||||||
|
<el-table-column property="province" label="省" width="200"></el-table-column>
|
||||||
|
<el-table-column property="city" label="市"></el-table-column>
|
||||||
|
<el-table-column property="district" label="区"></el-table-column>
|
||||||
|
<el-table-column property="address" label="县"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="getPostcode()">发起请求</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 气象预警-->
|
||||||
|
<el-dialog title="气象预警" :visible.sync="dialogFormVisible4">
|
||||||
|
<el-aside width="100%">
|
||||||
|
<el-tree :data="data" :props="defaultProps">
|
||||||
|
<template slot-scope="{data,node}">
|
||||||
|
<span>{{data.provinceName}}{{data.cityName}}--{{data.cityCode}}</span>
|
||||||
|
</template>
|
||||||
|
</el-tree>
|
||||||
|
</el-aside>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -125,6 +156,8 @@ import {phonePlace} from "@/api/port/port";
|
||||||
import {getIpPlace} from "@/api/port/port";
|
import {getIpPlace} from "@/api/port/port";
|
||||||
import {getHeadlines} from "@/api/port/port";
|
import {getHeadlines} from "@/api/port/port";
|
||||||
import {getBirthday} from "@/api/port/port";
|
import {getBirthday} from "@/api/port/port";
|
||||||
|
import {getPostcode} from "@/api/port/port";
|
||||||
|
import {getWeather} from "@/api/port/port";
|
||||||
export default {
|
export default {
|
||||||
//import引入的组件需要注入到对象中才能使用"
|
//import引入的组件需要注入到对象中才能使用"
|
||||||
components: {},
|
components: {},
|
||||||
|
@ -133,9 +166,26 @@ export default {
|
||||||
//这里存放数据"
|
//这里存放数据"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
formWeather:{},
|
||||||
|
data:[],
|
||||||
|
defaultProps: {
|
||||||
|
children:"citys",
|
||||||
|
label:'provinceName',
|
||||||
|
},
|
||||||
connectorList:[],
|
connectorList:[],
|
||||||
gridData:[],
|
gridData:[],
|
||||||
|
gridData2:[],
|
||||||
form:{},
|
form:{},
|
||||||
|
// 邮编查询
|
||||||
|
formPostCode:{
|
||||||
|
code:"",
|
||||||
|
// postNumber:"",
|
||||||
|
// province:"",
|
||||||
|
// city:"",
|
||||||
|
// district:"",
|
||||||
|
// address:"",
|
||||||
|
reason:"",
|
||||||
|
},
|
||||||
// 手机号查询归属地formInline
|
// 手机号查询归属地formInline
|
||||||
formInline:{
|
formInline:{
|
||||||
tel:"",
|
tel:"",
|
||||||
|
@ -189,6 +239,8 @@ export default {
|
||||||
dialogFormVisible:false,
|
dialogFormVisible:false,
|
||||||
dialogFormVisible1:false,
|
dialogFormVisible1:false,
|
||||||
dialogFormVisible2:false,
|
dialogFormVisible2:false,
|
||||||
|
dialogFormVisible3:false,
|
||||||
|
dialogFormVisible4:false,
|
||||||
dialogTableVisible:false,
|
dialogTableVisible:false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -205,6 +257,26 @@ export default {
|
||||||
watch: {},
|
watch: {},
|
||||||
//方法集合",
|
//方法集合",
|
||||||
methods: {
|
methods: {
|
||||||
|
// 气象预警
|
||||||
|
testWeather(){
|
||||||
|
|
||||||
|
getWeather().then((res)=>{
|
||||||
|
this.data=res.data;
|
||||||
|
|
||||||
|
this.dialogFormVisible4=true;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 邮编查询
|
||||||
|
getPostcode(){
|
||||||
|
getPostcode(this.formPostCode.code).then((res)=>{
|
||||||
|
console.log(res.data);
|
||||||
|
this.gridData2=res.data;
|
||||||
|
this.formPostCode.reason=true;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
testMailbox(){
|
||||||
|
this.dialogFormVisible3=true;
|
||||||
|
},
|
||||||
getBirthday(){
|
getBirthday(){
|
||||||
getBirthday(this.formBirthday).then((res)=>{
|
getBirthday(this.formBirthday).then((res)=>{
|
||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
|
@ -226,8 +298,8 @@ export default {
|
||||||
this.formBirthday.isterm=res.data.isterm;
|
this.formBirthday.isterm=res.data.isterm;
|
||||||
this.formBirthday.term=res.data.term;
|
this.formBirthday.term=res.data.term;
|
||||||
this.formBirthday.astro=res.data.astro;
|
this.formBirthday.astro=res.data.astro;
|
||||||
// this.formBirthday.eightall=res.data.eightall;
|
this.formBirthday.eightall=res.data.eightall;
|
||||||
// this.formBirthday.fiveall=res.data.fiveall;
|
this.formBirthday.fiveall=res.data.fiveall;
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -16,15 +16,16 @@
|
||||||
<el-card style="margin-top: 50px;">
|
<el-card style="margin-top: 50px;">
|
||||||
<h3>接口列表</h3>
|
<h3>接口列表</h3>
|
||||||
<el-divider></el-divider>
|
<el-divider></el-divider>
|
||||||
<el-table :data="tableData">
|
<!-- <el-table :data="tableData">-->
|
||||||
<el-table-column label="">
|
<!-- <el-table-column label="">-->
|
||||||
<template slot-scope="scope">
|
<!-- <template slot-scope="scope">-->
|
||||||
<span style="margin-left: 10px">{{ scope.row.connectorName }}</span>
|
<!-- <span style="margin-left: 10px">{{ scope.row.connectorName }}</span>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
</el-table>
|
<!-- </el-table>-->
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
Loading…
Reference in New Issue