添加推广相关

pull/1/head
franktrue 3 years ago
commit 7f8e55f647

@ -9,6 +9,21 @@
<link rel="icon" href="/favicon.ico"> <link rel="icon" href="/favicon.ico">
<title>Api2gpt</title> <title>Api2gpt</title>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]--> <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://anydoor.matomo.cloud/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '4']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src='//cdn.matomo.cloud/anydoor.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
<style> <style>
html, html,
body, body,
@ -122,7 +137,7 @@
top: 0; top: 0;
width: 51%; width: 51%;
height: 100%; height: 100%;
background: #7171C6; background: #74c0ce;
z-index: 1000; z-index: 1000;
-webkit-transform: translateX(0); -webkit-transform: translateX(0);
-ms-transform: translateX(0); -ms-transform: translateX(0);
@ -206,7 +221,7 @@
<div id="loader"></div> <div id="loader"></div>
<div class="loader-section section-left"></div> <div class="loader-section section-left"></div>
<div class="loader-section section-right"></div> <div class="loader-section section-right"></div>
<div class="load_title">正在加载系统资源,请耐心等待</div> <div class="load_title"></div>
</div> </div>
</div> </div>
<script type="module" src="/src/main.js"></script> <script type="module" src="/src/main.js"></script>

@ -10,8 +10,8 @@
</div> </div>
</template> </template>
<el-row :gutter="20" class="info"> <el-row :gutter="20" class="info">
<el-col :span="8">帐户余额<el-text class="mx-1" >{{ userBalance }}</el-text></el-col> <el-col :span="8">帐户余额<el-text class="mx-1" >{{ NumFilter(userBalance) }}</el-text></el-col>
<el-col :span="8">本月消费<el-text class="mx-1" >{{ userBalanceMonth }}</el-text></el-col> <el-col :span="8">本月消费<el-text class="mx-1" >{{ NumFilter(userBalanceMonth) }}</el-text></el-col>
<el-col :span="8">帐户等级<el-tag class="ml-2" type="success">1</el-tag></el-col> <el-col :span="8">帐户等级<el-tag class="ml-2" type="success">1</el-tag></el-col>
</el-row> </el-row>
</el-card> </el-card>
@ -22,11 +22,13 @@
<span>推荐计划</span> <span>推荐计划</span>
</div> </div>
</template> </template>
<p class="info">推荐用户首次充值成功后将获得佣金奖励{{ rewardDesc }}奖励可在充值记录中查看</p> <el-input v-model="pushUrl" size="large" readonly @click.stop="handleCopy(pushUrl)">
<el-input v-model="pushUrl" size="large" readonly> <template #append>
<template #prepend>推广链接:</template> <el-button @click="handleCopy(pushUrl)"></el-button>
</template>
</el-input> </el-input>
</el-card> </el-card>
<el-alert :title="'推荐用户首次充值成功后将获得佣金奖励:' + rewardDesc+',奖励可在充值记录中查看'" type="success" :closable="false" />
</div> </div>
<div class="main2"> <div class="main2">
<el-card class="box-card"> <el-card class="box-card">
@ -35,24 +37,33 @@
<span>服务信息</span> <span>服务信息</span>
</div> </div>
</template> </template>
<el-space direction="vertical" alignment="start" :size="30"> <div style="margin-top: 10px; margin-bottom: 10px;">
<div> <el-input v-model="serverUrl" size="large" readonly @click.stop="handleCopy(serverUrl)">
<el-input v-model="serverUrl" size="large" style="width:500px" readonly>
<template #prepend>Api Server:</template> <template #prepend>Api Server:</template>
<template #append>
<el-button @click="handleCopy(serverUrl)"></el-button>
</template>
</el-input> </el-input>
</div> </div>
<div> <div style="margin-top: 10px; margin-bottom: 10px;">
<el-input v-model="userKey" size="large" style="width:500px" readonly>
<el-input v-model="userKey" size="large" readonly @click.stop="handleCopy(userKey)">
<template #prepend>Api Key:</template> <template #prepend>Api Key:</template>
<template #append>
<el-button @click="handleCopy(userKey)"></el-button>
</template>
</el-input> </el-input>
</div> </div>
<div> <div style="margin-top: 10px; margin-bottom: 10px;">
<el-input v-model="serverUrl2" size="large" style="width:500px" readonly> <el-input v-model="serverUrl2" size="large" type="password" readonly @click.stop="handleCopy(serverUrl2)">
<template #prepend>Api Server备用:</template> <template #prepend>Api Server备用:</template>
<template #append>
<el-button @click="handleCopy(serverUrl2)"></el-button>
</template>
</el-input> </el-input>
</div> </div>
</el-space>
</el-card> </el-card>
<el-alert title="点击输入框或按钮可直接复制" type="success" :closable="false" />
</div> </div>
<div class="main2"> <div class="main2">
<el-card class="box-card"> <el-card class="box-card">
@ -61,20 +72,26 @@
<span>模型定价</span> <span>模型定价</span>
</div> </div>
</template> </template>
<div style="margin-bottom: 10px;">
<el-alert title="注意模型价格中的计费单位为每1000个token而不是字数。算法基本和官方保持一致一个中文字符大致消耗2个token, 用英文提问回复更省token" type="warning" :closable="false"/>
</div>
<el-table :data="modelList" height="250" style="width: 100%"> <el-table :data="modelList" height="250" style="width: 100%">
<el-table-column prop="modelName" label="模型" /> <el-table-column prop="modelName" label="模型" />
<el-table-column prop="modelPrice" label="提问价格" width="180" > <el-table-column prop="modelPrice" label="提问价格" width="180" >
<template #default="scope"> <template #default="scope">
{{scope.row.modelPrice*1000}}/k {{NumFilter4(scope.row.modelPrice*1000)}}/k
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="modelPrice" label="回答价格" width="180"> <el-table-column prop="modelPrice" label="回答价格" width="180">
<template #default="scope"> <template #default="scope">
{{scope.row.modelPrice*1000}}/k {{NumFilter4(scope.row.modelPrice*1000)}}/k
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="remark" label="备注" /> <el-table-column prop="remark" label="备注" />
</el-table> </el-table>
<div>
<el-alert title="GPT4接口暂未上线尽请期待" type="error" :closable="false"/>
</div>
</el-card> </el-card>
</div> </div>
</div> </div>
@ -85,6 +102,7 @@ import { getCertIndex } from '@/api/cert/index'
import { getConfigKey } from "@/api/system/config"; import { getConfigKey } from "@/api/system/config";
import { ref } from 'vue'; import { ref } from 'vue';
const { proxy } = getCurrentInstance();
const modelList = ref([]); const modelList = ref([]);
const serverUrl = ref(""); const serverUrl = ref("");
const serverUrl2 = ref(""); const serverUrl2 = ref("");
@ -122,6 +140,32 @@ function getIndex() {
}) })
} }
function handleCopy(id){
//
const text = id;
// input
const input = document.createElement("input");
input.value = text;
document.body.appendChild(input);
//
input.select();
document.execCommand("copy");
// input
document.body.removeChild(input);
proxy.$modal.msgSuccess("复制成功");
}
function NumFilter (value) {
//
let realVal = parseFloat(value).toFixed(2)
return realVal
}
function NumFilter4 (value) {
//
let realVal = parseFloat(value).toFixed(4)
return realVal
}
getIndex() getIndex()
</script> </script>
@ -148,7 +192,6 @@ getIndex()
} }
.info { .info {
margin: 0;
font-size: 15px; font-size: 15px;
color: #606266; color: #606266;
} }

@ -7,7 +7,7 @@
</div> </div>
</template> </template>
<div class="info"> <div class="info">
请先参考<a href="https://www.api2gpt.com/helper" target="_blank">api2gpt 文档</a> 请先参考<a href="https://www.api2gpt.com/" target="_blank">api2gpt 文档</a>
</div> </div>
</el-card> </el-card>
</div> </div>

@ -3,12 +3,12 @@
<el-card shadow="always"> <el-card shadow="always">
<el-space alignment="start" :size="30"> <el-space alignment="start" :size="30">
充值金值 充值金值
<el-input-number v-model="form.paymentPrice" :precision="1" :step="0.1" :max="500" :min="0.1" /> <el-input-number v-model="form.paymentPrice" :precision="1" :step="0.1" :max="100" :min="0.1" />
<el-button type="primary" @click="handlePayment" :loading="loading">充值</el-button> <el-button type="primary" @click="handlePayment" :loading="loading">充值</el-button>
</el-space> </el-space>
</el-card> </el-card>
<div style="margin-top:5px;"> <div style="margin-top:5px;">
<el-alert title="第一次充值建议先小额进行试用,充值最高500元" type="warning" :closable="false" /> <el-alert title="第一次充值建议先小额进行试用,充值最高100元" type="warning" :closable="false" />
</div> </div>
<div class="main2"> <div class="main2">
<el-card class="box-card"> <el-card class="box-card">
@ -143,6 +143,17 @@ function getList() {
}); });
} }
proxy.$notify({
title: '充值须值',
message: '<div>1. 充值后不支持退款,建议先小额充值进行测试,平台不限制最低充值金额,请按需充值。</div>'+
'<div>2. 定价页面没写的模型和接口即不支持,不是所有的接口都支持,有特殊需求的朋友要注意。</div>'+
'<div>3. 支付宝充值到账一般为几秒钟到几分钟,但是偶尔也会遇到延迟比较高的情况,如果遇到支付状态长时间没有变化,请点击手动刷新更新状态即可</div>'+
'<div>4. 商务订制等大需求,请联系客服</div>',
type: 'warning',
dangerouslyUseHTMLString: true,
duration: 0
});
getList() getList()
</script> </script>

Loading…
Cancel
Save