Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-11b21940"], { "..
Decoded Output download
<? (window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-11b21940"], {
"0b6c": function (e, t, a) {
}, "387d": function (e, t, a) {
"use strict";
a("6db3")
}, "5e9c": function (e, t, a) {
"use strict";
a("0b6c")
}, "6db3": function (e, t, a) {
}, 7424: function (e, t, a) {
"use strict";
a.r(t);
var l = function () {
var e = this, t = e.$createElement, a = e._self._c || t;
return a("div", {
staticClass: "app-container",
staticStyle: {"padding-top": "10px"}
}, [a("el-tabs", {
on: {"tab-click": e.switchTab}, model: {
value: e.tabName, callback: function (t) {
e.tabName = t
}, expression: "tabName"
}
}, [a("el-tab-pane", {attrs: {label: "", name: "system"}}, [e.form ? a("el-form", {
ref: "systemForm",
staticStyle: {padding: "30px 0"},
attrs: {model: e.form, rules: e.formRules, "label-width": "120px"}
}, [a("el-form-item", {
attrs: {
label: "",
prop: "system_title"
}
}, [a("el-input", {
attrs: {placeholder: "", size: "small"},
model: {
value: e.form["system_title"], callback: function (t) {
e.$set(e.form, "system_title", t)
}, expression: "form['system_title']"
}
})], 1), a("el-form-item", {
attrs: {
label: "logo",
prop: "system_logo"
}
}, [a("el-input", {
attrs: {placeholder: "", size: "small"},
model: {
value: e.form["system_logo"], callback: function (t) {
e.$set(e.form, "system_logo", t)
}, expression: "form['system_logo']"
}
}), a("el-upload", {
staticClass: "avatar-uploader",
attrs: {
action: "",
data: {type: "system_logo"},
"http-request": e.uploadImage,
"show-file-list": !1,
multiple: !1
}
}, [e.form["system_logo"] ? a("img", {
staticClass: "avatar",
staticStyle: {height: "50px", width: "auto"},
attrs: {src: e.form["system_logo"]}
}) : a("i", {
staticClass: "el-icon-plus avatar-uploader-icon",
staticStyle: {width: "210px", height: "50px", "line-height": "50px"}
})]), a("span", [e._v("210x50")])], 1), a("el-form-item", {attrs: {label: ""}}, [a("el-button", {
attrs: {
type: "primary",
icon: "el-icon-check",
size: "small"
}, on: {click: e.doSubmit}
}, [e._v(" ")])], 1)], 1) : e._e()], 1), a("el-tab-pane", {
attrs: {
label: "AI",
name: "chatgpt"
}
}, [e.form ? a("el-form", {
ref: "chatgptForm",
staticStyle: {padding: "30px 0"},
attrs: {model: e.form, rules: e.formRules, "label-width": "160px"}
}, [a("el-form-item", {
attrs: {
label: "AI",
prop: "channel"
}
}, [a("el-radio-group", {
model: {
value: e.form["channel"], callback: function (t) {
e.$set(e.form, "channel", t)
}, expression: "form['channel']"
}
}, [a("el-radio", {
staticStyle: {margin: "0 20px 5px 0"},
attrs: {label: "openai", size: "mini"}
}, [e._v("OpenAI")]), a("el-radio", {
attrs: {
label: "api2d",
size: "mini"
}
}, [e._v("api2d")]), a("el-radio", {
attrs: {
label: "lxai",
size: "mini"
}
}, [e._v("AI")]), a("el-radio", {
attrs: {
label: "baidu",
size: "mini",
disabled: "",
title: ""
}
}, [e._v("")]), a("el-radio", {
attrs: {
label: "aliyun",
size: "mini",
disabled: "",
title: ""
}
}, [e._v("")]), a("el-radio", {
attrs: {
label: "welm",
size: "mini",
disabled: "",
title: ""
}
}, [e._v("WeLM")])], 1), "openai" === e.form["channel"] ? a("p", [e._v("GPT")]) : e._e(), "api2d" === e.form["channel"] ? a("p", [e._v("openai"), a("a", {
staticClass: "text-primary",
attrs: {href: "https://api2d.com/r/191912", target: "_blank"}
}, [e._v("")])]) : e._e(), "lxai" === e.form["channel"] ? a("p", [e._v("AIopenai"), a("a", {
staticClass: "text-primary",
attrs: {href: "http://xhl.4387.top", target: "_blank"}
}, [e._v("key")])]) : e._e()], 1), a("el-form-item", {
attrs: {
label: "(temperature)",
prop: "temperature"
}
}, [a("el-input", {
attrs: {placeholder: "0-10.9", size: "small"},
model: {
value: e.form["temperature"], callback: function (t) {
e.$set(e.form, "temperature", t)
}, expression: "form['temperature']"
}
}), a("p", [e._v("0-10.9")])], 1), a("el-form-item", {
attrs: {
label: "(max_tokens)",
prop: "max_tokens"
}
}, [a("el-input", {
attrs: {placeholder: "1500", size: "small"},
model: {
value: e.form["max_tokens"], callback: function (t) {
e.$set(e.form, "max_tokens", t)
}, expression: "form['max_tokens']"
}
}), a("p", [e._v("35002000")])], 1), a("el-form-item", {
attrs: {
label: "(model)",
prop: "model"
}
}, [a("el-select", {
attrs: {size: "small"}, model: {
value: e.form["model"], callback: function (t) {
e.$set(e.form, "model", t)
}, expression: "form['model']"
}
}, e._l(e.engines, (function (t, l) {
return a("el-option", {key: l, attrs: {label: t.name, value: t.name}}, [e._v(e._s(t.name) + " ")])
})), 1), a("p", [e._v("gpt-3.5-turbo")])], 1), a("el-form-item", {
attrs: {
label: "",
prop: "free_num"
}
}, [a("p", {staticStyle: {padding: "5px 0"}}, [e._v(" "), a("el-input", {
staticStyle: {width: "100px"},
attrs: {size: "small"},
model: {
value: e.form["free_num"], callback: function (t) {
e.$set(e.form, "free_num", t)
}, expression: "form['free_num']"
}
}), e._v(" ")], 1), a("p", {staticStyle: {padding: "5px 0"}}, [e._v(" "), a("el-input", {
staticStyle: {width: "100px"},
attrs: {size: "small"},
model: {
value: e.form["free_num_draw"], callback: function (t) {
e.$set(e.form, "free_num_draw", t)
}, expression: "form['free_num_draw']"
}
}), e._v(" ")], 1), a("p", {staticStyle: {padding: "5px 0"}}, [e._v(" GPT4 "), a("el-input", {
staticStyle: {width: "100px"},
attrs: {size: "small"},
model: {
value: e.form["free_num_gpt4"], callback: function (t) {
e.$set(e.form, "free_num_gpt4", t)
}, expression: "form['free_num_gpt4']"
}
}), e._v(" ")], 1)]), a("el-form-item", {attrs: {label: ""}}, [a("el-button", {
attrs: {
type: "primary",
icon: "el-icon-check",
size: "small"
}, on: {click: e.doSubmit}
}, [e._v(" ")])], 1)], 1) : e._e()], 1), a("el-tab-pane", {
attrs: {
label: "GPT4",
name: "gpt4"
}
}, [e.form ? a("el-form", {
ref: "gpt4Form",
staticStyle: {padding: "30px 0"},
attrs: {model: e.form, rules: e.formRules, "label-width": "160px"}
}, [a("el-form-item", {
attrs: {
label: "GPT4",
prop: "is_open"
}
}, [a("el-switch", {
attrs: {"active-value": 1, "inactive-value": 0},
model: {
value: e.form["is_open"], callback: function (t) {
e.$set(e.form, "is_open", t)
}, expression: "form['is_open']"
}
})], 1), a("el-form-item", {
attrs: {
label: "GPT4",
prop: "channel"
}
}, [a("el-radio-group", {
model: {
value: e.form["channel"], callback: function (t) {
e.$set(e.form, "channel", t)
}, expression: "form['channel']"
}
}, [a("el-radio", {
staticStyle: {margin: "0 20px 5px 0"},
attrs: {label: "openai", size: "mini"}
}, [e._v("OpenAI")]), a("el-radio", {
attrs: {
label: "api2d",
size: "mini"
}
}, [e._v("api2d")])], 1), "openai" === e.form["channel"] ? a("p", [e._v("GPT")]) : e._e(), "api2d" === e.form["channel"] ? a("p", [e._v("openai"), a("a", {
staticClass: "text-primary",
attrs: {href: "https://api2d.com/r/191912", target: "_blank"}
}, [e._v("")])]) : e._e()], 1), a("el-form-item", {
attrs: {
label: "(temperature)",
prop: "temperature"
}
}, [a("el-input", {
attrs: {placeholder: "0-10.9", size: "small"},
model: {
value: e.form["temperature"], callback: function (t) {
e.$set(e.form, "temperature", t)
}, expression: "form['temperature']"
}
}), a("p", [e._v("0-10.9")])], 1), a("el-form-item", {
attrs: {
label: "(max_tokens)",
prop: "max_tokens"
}
}, [a("el-input", {
attrs: {placeholder: "3000", size: "small"},
model: {
value: e.form["max_tokens"], callback: function (t) {
e.$set(e.form, "max_tokens", t)
}, expression: "form['max_tokens']"
}
}), a("p", [e._v("8000")])], 1), a("el-form-item", {attrs: {label: "GPT4"}}, [a("p", {staticStyle: {padding: "5px 0"}}, [e._v(" "), a("el-input", {
staticStyle: {
width: "100px",
"margin-left": "5px"
}, attrs: {size: "small"}, model: {
value: e.form["alias_wxapp"], callback: function (t) {
e.$set(e.form, "alias_wxapp", t)
}, expression: "form['alias_wxapp']"
}
})], 1), a("p", {staticStyle: {padding: "5px 0"}}, [e._v(" web "), a("el-input", {
staticStyle: {
width: "100px",
"margin-left": "5px"
}, attrs: {size: "small"}, model: {
value: e.form["alias_web"], callback: function (t) {
e.$set(e.form, "alias_web", t)
}, expression: "form['alias_web']"
}
})], 1), a("p", {
staticStyle: {
"margin-top": "10px",
color: "#999"
}
}, [e._v("GPT4")])]), a("el-form-item", {attrs: {label: ""}}, [a("el-button", {
attrs: {
type: "primary",
icon: "el-icon-check",
size: "small"
}, on: {click: e.doSubmit}
}, [e._v(" ")])], 1)], 1) : e._e()], 1), a("el-tab-pane", {
attrs: {
label: "",
name: "pay"
}
}, [e.form ? a("el-form", {
ref: "payForm",
staticStyle: {padding: "30px 0"},
attrs: {model: e.form, rules: e.formRules, "label-width": "120px"}
}, [a("el-form-item", {attrs: {label: "", prop: "mch_id"}}, [a("el-input", {
attrs: {
placeholder: "",
size: "small"
}, model: {
value: e.form["mch_id"], callback: function (t) {
e.$set(e.form, "mch_id", t)
}, expression: "form['mch_id']"
}
})], 1), a("el-form-item", {
attrs: {
label: "Api_v2",
prop: "key"
}
}, [a("el-input", {
attrs: {placeholder: "v2", size: "small"},
model: {
value: e.form["key"], callback: function (t) {
e.$set(e.form, "key", t)
}, expression: "form['key']"
}
})], 1), a("el-form-item", {attrs: {label: "cert"}}, [a("el-upload", {
attrs: {
action: "",
data: {type: "cert"},
"before-upload": e.uploadPemCheck,
"http-request": e.uploadPem,
"show-file-list": !1,
multiple: !1
}
}, [a("el-button", {
attrs: {
size: "small",
type: "primary"
}
}, [e._v("")])], 1), e.form.apiclient_cert ? a("span", {staticClass: "upload_status"}, [e._v("")]) : e._e()], 1), a("el-form-item", {attrs: {label: "key"}}, [a("el-upload", {
attrs: {
action: "",
data: {type: "key"},
"before-upload": e.uploadPemCheck,
"http-request": e.uploadPem,
"show-file-list": !1,
multiple: !1
}
}, [a("el-button", {
attrs: {
size: "small",
type: "primary"
}
}, [e._v("")])], 1), e.form.apiclient_key ? a("span", {staticClass: "upload_status"}, [e._v("")]) : e._e()], 1), a("el-form-item", {attrs: {label: ""}}, [a("el-button", {
attrs: {
type: "primary",
icon: "el-icon-check",
size: "small"
}, on: {click: e.doSubmit}
}, [e._v(" ")])], 1)], 1) : e._e()], 1), a("el-tab-pane", {
attrs: {
label: "",
name: "ad"
}
}, [e.form ? a("el-form", {
ref: "adForm",
staticStyle: {padding: "30px 0"},
attrs: {model: e.form, rules: e.formRules, "label-width": "180px"}
}, [a("el-form-item", {
attrs: {
label: "",
prop: "inter_is_open"
}
}, [a("el-switch", {
attrs: {"active-value": 1, "inactive-value": 0},
model: {
value: e.form["inter_is_open"], callback: function (t) {
e.$set(e.form, "inter_is_open", t)
}, expression: "form['inter_is_open']"
}
})], 1), a("el-form-item", {
attrs: {
label: "ID",
prop: "inter_unit_id"
}
}, [a("el-input", {
attrs: {size: "small"}, model: {
value: e.form["inter_unit_id"], callback: function (t) {
e.$set(e.form, "inter_unit_id", t)
}, expression: "form['inter_unit_id']"
}
}), a("p", {
staticStyle: {
color: "#666",
margin: "0"
}
}, [e._v("ID6")])], 1), a("el-form-item", {
attrs: {
label: "banner",
prop: "banner_is_open"
}
}, [a("el-switch", {
attrs: {"active-value": 1, "inactive-value": 0},
model: {
value: e.form["banner_is_open"], callback: function (t) {
e.$set(e.form, "banner_is_open", t)
}, expression: "form['banner_is_open']"
}
})], 1), a("el-form-item", {
attrs: {
label: "bannerID",
prop: "banner_unit_id"
}
}, [a("el-input", {
attrs: {size: "small"}, model: {
value: e.form["banner_unit_id"], callback: function (t) {
e.$set(e.form, "banner_unit_id", t)
}, expression: "form['banner_unit_id']"
}
}), a("p", {
staticStyle: {
color: "#666",
margin: "0"
}
}, [e._v("bannerID")])], 1), a("el-form-item", {attrs: {label: ""}}, [a("el-button", {
attrs: {
type: "primary",
icon: "el-icon-check",
size: "small"
}, on: {click: e.doSubmit}
}, [e._v(" ")])], 1)], 1) : e._e()], 1)], 1)], 1)
}, r = [], i = (a("7b4c"), a("5f17"), a("90e7")), s = a("91b6"), o = {
data: function () {
return {
tabName: "system",
form: null,
engines: [],
balance: null,
lxaiBalance: null,
formRules: {
channel: [{required: !0, message: "", trigger: "blur"}],
is_open: [{required: !0, message: "", trigger: "blur"}],
mch_id: [{required: !0, message: "", trigger: "blur"}],
key: [{required: !0, message: "", trigger: "blur"}]
}
}
}, mounted: function () {
this.getSetting()
}, methods: {
getSetting: function () {
var e = this;
Object(i["d"])({name: this.tabName}).then((function (t) {
e.form = t.data
}))
}, getEngines: function () {
var e = this;
Object(i["b"])().then((function (t) {
e.engines = t.data
}))
}, switchTab: function () {
this.getSetting(), "chatgpt" === this.tabName && this.getEngines()
}, doSubmit: function () {
var e = this, t = null;
"system" === this.tabName ? t = this.$refs.systemForm : "pay" === this.tabName ? t = this.$refs.payForm : "chatgpt" === this.tabName ? t = this.$refs.chatgptForm : "gpt4" === this.tabName ? t = this.$refs.gpt4Form : "ad" === this.tabName ? t = this.$refs.adForm : "about" === this.tabName ? t = this.$refs.aboutForm : "kefu" === this.tabName && (t = this.$refs.kefuForm), t && t.validate((function (t) {
t ? Object(i["e"])({name: e.tabName, data: JSON.stringify(e.form)}).then((function (t) {
e.getSetting(), e.$message({message: t.message, type: "success", duration: 1500})
})) : e.$message({message: "", type: "error", duration: 1500})
}))
}, uploadImage: function (e) {
var t = this, a = new FormData;
a.append("file", e.file), e.data && a.append("data", JSON.stringify(e.data)), Object(s["a"])(a).then((function (a) {
t.$set(t.form, e.data.type, a.data.path), t.$message.success("")
}))
}, uploadPemCheck: function (e) {
if ("pem" !== e.name.substr(-3)) return this.$message({
showClose: !0,
message: ".pem",
type: "warning"
}), !1
}, uploadPem: function (e) {
var t = this, a = new FormData;
a.append("file", e.file), e.data && a.append("data", JSON.stringify(e.data)), Object(s["b"])(a).then((function (a) {
"cert" === e.data.type ? t.$set(t.form, "apiclient_cert", a.data) : "key" === e.data.type && t.$set(t.form, "apiclient_key", a.data), t.$message.success("")
}))
}
}
}, n = o, m = (a("387d"), a("5e9c"), a("3427")), p = Object(m["a"])(n, l, r, !1, null, "01907cf6", null);
t["default"] = p.exports
}, "90e7": function (e, t, a) {
"use strict";
a.d(t, "d", (function () {
return r
})), a.d(t, "b", (function () {
return i
})), a.d(t, "e", (function () {
return s
})), a.d(t, "a", (function () {
return o
})), a.d(t, "c", (function () {
return n
}));
var l = a("b775");
function r(e) {
return Object(l["a"])({url: "/setting/getSetting", method: "post", data: e})
}
function i(e) {
return Object(l["a"])({url: "/setting/getEngines", method: "post", data: e})
}
function s(e) {
return Object(l["a"])({url: "/setting/setSetting", method: "post", data: e})
}
function o(e) {
return Object(l["a"])({url: "/setting/getBalance", method: "post", data: e})
}
function n(e) {
return Object(l["a"])({url: "/setting/getLxaiBalance", method: "post", data: e})
}
}, "91b6": function (e, t, a) {
"use strict";
a.d(t, "a", (function () {
return r
})), a.d(t, "b", (function () {
return i
}));
var l = a("b775");
function r(e) {
return Object(l["a"])({url: "/upload/image", method: "post", data: e})
}
function i(e) {
return Object(l["a"])({url: "/upload/pem", method: "post", data: e})
}
}
}]); ?>
Did this file decode correctly?
Original Code
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-11b21940"], {
"0b6c": function (e, t, a) {
}, "387d": function (e, t, a) {
"use strict";
a("6db3")
}, "5e9c": function (e, t, a) {
"use strict";
a("0b6c")
}, "6db3": function (e, t, a) {
}, 7424: function (e, t, a) {
"use strict";
a.r(t);
var l = function () {
var e = this, t = e.$createElement, a = e._self._c || t;
return a("div", {
staticClass: "app-container",
staticStyle: {"padding-top": "10px"}
}, [a("el-tabs", {
on: {"tab-click": e.switchTab}, model: {
value: e.tabName, callback: function (t) {
e.tabName = t
}, expression: "tabName"
}
}, [a("el-tab-pane", {attrs: {label: "", name: "system"}}, [e.form ? a("el-form", {
ref: "systemForm",
staticStyle: {padding: "30px 0"},
attrs: {model: e.form, rules: e.formRules, "label-width": "120px"}
}, [a("el-form-item", {
attrs: {
label: "",
prop: "system_title"
}
}, [a("el-input", {
attrs: {placeholder: "", size: "small"},
model: {
value: e.form["system_title"], callback: function (t) {
e.$set(e.form, "system_title", t)
}, expression: "form['system_title']"
}
})], 1), a("el-form-item", {
attrs: {
label: "logo",
prop: "system_logo"
}
}, [a("el-input", {
attrs: {placeholder: "", size: "small"},
model: {
value: e.form["system_logo"], callback: function (t) {
e.$set(e.form, "system_logo", t)
}, expression: "form['system_logo']"
}
}), a("el-upload", {
staticClass: "avatar-uploader",
attrs: {
action: "",
data: {type: "system_logo"},
"http-request": e.uploadImage,
"show-file-list": !1,
multiple: !1
}
}, [e.form["system_logo"] ? a("img", {
staticClass: "avatar",
staticStyle: {height: "50px", width: "auto"},
attrs: {src: e.form["system_logo"]}
}) : a("i", {
staticClass: "el-icon-plus avatar-uploader-icon",
staticStyle: {width: "210px", height: "50px", "line-height": "50px"}
})]), a("span", [e._v("210x50")])], 1), a("el-form-item", {attrs: {label: ""}}, [a("el-button", {
attrs: {
type: "primary",
icon: "el-icon-check",
size: "small"
}, on: {click: e.doSubmit}
}, [e._v(" ")])], 1)], 1) : e._e()], 1), a("el-tab-pane", {
attrs: {
label: "AI",
name: "chatgpt"
}
}, [e.form ? a("el-form", {
ref: "chatgptForm",
staticStyle: {padding: "30px 0"},
attrs: {model: e.form, rules: e.formRules, "label-width": "160px"}
}, [a("el-form-item", {
attrs: {
label: "AI",
prop: "channel"
}
}, [a("el-radio-group", {
model: {
value: e.form["channel"], callback: function (t) {
e.$set(e.form, "channel", t)
}, expression: "form['channel']"
}
}, [a("el-radio", {
staticStyle: {margin: "0 20px 5px 0"},
attrs: {label: "openai", size: "mini"}
}, [e._v("OpenAI")]), a("el-radio", {
attrs: {
label: "api2d",
size: "mini"
}
}, [e._v("api2d")]), a("el-radio", {
attrs: {
label: "lxai",
size: "mini"
}
}, [e._v("AI")]), a("el-radio", {
attrs: {
label: "baidu",
size: "mini",
disabled: "",
title: ""
}
}, [e._v("")]), a("el-radio", {
attrs: {
label: "aliyun",
size: "mini",
disabled: "",
title: ""
}
}, [e._v("")]), a("el-radio", {
attrs: {
label: "welm",
size: "mini",
disabled: "",
title: ""
}
}, [e._v("WeLM")])], 1), "openai" === e.form["channel"] ? a("p", [e._v("GPT")]) : e._e(), "api2d" === e.form["channel"] ? a("p", [e._v("openai"), a("a", {
staticClass: "text-primary",
attrs: {href: "https://api2d.com/r/191912", target: "_blank"}
}, [e._v("")])]) : e._e(), "lxai" === e.form["channel"] ? a("p", [e._v("AIopenai"), a("a", {
staticClass: "text-primary",
attrs: {href: "http://xhl.4387.top", target: "_blank"}
}, [e._v("key")])]) : e._e()], 1), a("el-form-item", {
attrs: {
label: "(temperature)",
prop: "temperature"
}
}, [a("el-input", {
attrs: {placeholder: "0-10.9", size: "small"},
model: {
value: e.form["temperature"], callback: function (t) {
e.$set(e.form, "temperature", t)
}, expression: "form['temperature']"
}
}), a("p", [e._v("0-10.9")])], 1), a("el-form-item", {
attrs: {
label: "(max_tokens)",
prop: "max_tokens"
}
}, [a("el-input", {
attrs: {placeholder: "1500", size: "small"},
model: {
value: e.form["max_tokens"], callback: function (t) {
e.$set(e.form, "max_tokens", t)
}, expression: "form['max_tokens']"
}
}), a("p", [e._v("35002000")])], 1), a("el-form-item", {
attrs: {
label: "(model)",
prop: "model"
}
}, [a("el-select", {
attrs: {size: "small"}, model: {
value: e.form["model"], callback: function (t) {
e.$set(e.form, "model", t)
}, expression: "form['model']"
}
}, e._l(e.engines, (function (t, l) {
return a("el-option", {key: l, attrs: {label: t.name, value: t.name}}, [e._v(e._s(t.name) + " ")])
})), 1), a("p", [e._v("gpt-3.5-turbo")])], 1), a("el-form-item", {
attrs: {
label: "",
prop: "free_num"
}
}, [a("p", {staticStyle: {padding: "5px 0"}}, [e._v(" "), a("el-input", {
staticStyle: {width: "100px"},
attrs: {size: "small"},
model: {
value: e.form["free_num"], callback: function (t) {
e.$set(e.form, "free_num", t)
}, expression: "form['free_num']"
}
}), e._v(" ")], 1), a("p", {staticStyle: {padding: "5px 0"}}, [e._v(" "), a("el-input", {
staticStyle: {width: "100px"},
attrs: {size: "small"},
model: {
value: e.form["free_num_draw"], callback: function (t) {
e.$set(e.form, "free_num_draw", t)
}, expression: "form['free_num_draw']"
}
}), e._v(" ")], 1), a("p", {staticStyle: {padding: "5px 0"}}, [e._v(" GPT4 "), a("el-input", {
staticStyle: {width: "100px"},
attrs: {size: "small"},
model: {
value: e.form["free_num_gpt4"], callback: function (t) {
e.$set(e.form, "free_num_gpt4", t)
}, expression: "form['free_num_gpt4']"
}
}), e._v(" ")], 1)]), a("el-form-item", {attrs: {label: ""}}, [a("el-button", {
attrs: {
type: "primary",
icon: "el-icon-check",
size: "small"
}, on: {click: e.doSubmit}
}, [e._v(" ")])], 1)], 1) : e._e()], 1), a("el-tab-pane", {
attrs: {
label: "GPT4",
name: "gpt4"
}
}, [e.form ? a("el-form", {
ref: "gpt4Form",
staticStyle: {padding: "30px 0"},
attrs: {model: e.form, rules: e.formRules, "label-width": "160px"}
}, [a("el-form-item", {
attrs: {
label: "GPT4",
prop: "is_open"
}
}, [a("el-switch", {
attrs: {"active-value": 1, "inactive-value": 0},
model: {
value: e.form["is_open"], callback: function (t) {
e.$set(e.form, "is_open", t)
}, expression: "form['is_open']"
}
})], 1), a("el-form-item", {
attrs: {
label: "GPT4",
prop: "channel"
}
}, [a("el-radio-group", {
model: {
value: e.form["channel"], callback: function (t) {
e.$set(e.form, "channel", t)
}, expression: "form['channel']"
}
}, [a("el-radio", {
staticStyle: {margin: "0 20px 5px 0"},
attrs: {label: "openai", size: "mini"}
}, [e._v("OpenAI")]), a("el-radio", {
attrs: {
label: "api2d",
size: "mini"
}
}, [e._v("api2d")])], 1), "openai" === e.form["channel"] ? a("p", [e._v("GPT")]) : e._e(), "api2d" === e.form["channel"] ? a("p", [e._v("openai"), a("a", {
staticClass: "text-primary",
attrs: {href: "https://api2d.com/r/191912", target: "_blank"}
}, [e._v("")])]) : e._e()], 1), a("el-form-item", {
attrs: {
label: "(temperature)",
prop: "temperature"
}
}, [a("el-input", {
attrs: {placeholder: "0-10.9", size: "small"},
model: {
value: e.form["temperature"], callback: function (t) {
e.$set(e.form, "temperature", t)
}, expression: "form['temperature']"
}
}), a("p", [e._v("0-10.9")])], 1), a("el-form-item", {
attrs: {
label: "(max_tokens)",
prop: "max_tokens"
}
}, [a("el-input", {
attrs: {placeholder: "3000", size: "small"},
model: {
value: e.form["max_tokens"], callback: function (t) {
e.$set(e.form, "max_tokens", t)
}, expression: "form['max_tokens']"
}
}), a("p", [e._v("8000")])], 1), a("el-form-item", {attrs: {label: "GPT4"}}, [a("p", {staticStyle: {padding: "5px 0"}}, [e._v(" "), a("el-input", {
staticStyle: {
width: "100px",
"margin-left": "5px"
}, attrs: {size: "small"}, model: {
value: e.form["alias_wxapp"], callback: function (t) {
e.$set(e.form, "alias_wxapp", t)
}, expression: "form['alias_wxapp']"
}
})], 1), a("p", {staticStyle: {padding: "5px 0"}}, [e._v(" web "), a("el-input", {
staticStyle: {
width: "100px",
"margin-left": "5px"
}, attrs: {size: "small"}, model: {
value: e.form["alias_web"], callback: function (t) {
e.$set(e.form, "alias_web", t)
}, expression: "form['alias_web']"
}
})], 1), a("p", {
staticStyle: {
"margin-top": "10px",
color: "#999"
}
}, [e._v("GPT4")])]), a("el-form-item", {attrs: {label: ""}}, [a("el-button", {
attrs: {
type: "primary",
icon: "el-icon-check",
size: "small"
}, on: {click: e.doSubmit}
}, [e._v(" ")])], 1)], 1) : e._e()], 1), a("el-tab-pane", {
attrs: {
label: "",
name: "pay"
}
}, [e.form ? a("el-form", {
ref: "payForm",
staticStyle: {padding: "30px 0"},
attrs: {model: e.form, rules: e.formRules, "label-width": "120px"}
}, [a("el-form-item", {attrs: {label: "", prop: "mch_id"}}, [a("el-input", {
attrs: {
placeholder: "",
size: "small"
}, model: {
value: e.form["mch_id"], callback: function (t) {
e.$set(e.form, "mch_id", t)
}, expression: "form['mch_id']"
}
})], 1), a("el-form-item", {
attrs: {
label: "Api_v2",
prop: "key"
}
}, [a("el-input", {
attrs: {placeholder: "v2", size: "small"},
model: {
value: e.form["key"], callback: function (t) {
e.$set(e.form, "key", t)
}, expression: "form['key']"
}
})], 1), a("el-form-item", {attrs: {label: "cert"}}, [a("el-upload", {
attrs: {
action: "",
data: {type: "cert"},
"before-upload": e.uploadPemCheck,
"http-request": e.uploadPem,
"show-file-list": !1,
multiple: !1
}
}, [a("el-button", {
attrs: {
size: "small",
type: "primary"
}
}, [e._v("")])], 1), e.form.apiclient_cert ? a("span", {staticClass: "upload_status"}, [e._v("")]) : e._e()], 1), a("el-form-item", {attrs: {label: "key"}}, [a("el-upload", {
attrs: {
action: "",
data: {type: "key"},
"before-upload": e.uploadPemCheck,
"http-request": e.uploadPem,
"show-file-list": !1,
multiple: !1
}
}, [a("el-button", {
attrs: {
size: "small",
type: "primary"
}
}, [e._v("")])], 1), e.form.apiclient_key ? a("span", {staticClass: "upload_status"}, [e._v("")]) : e._e()], 1), a("el-form-item", {attrs: {label: ""}}, [a("el-button", {
attrs: {
type: "primary",
icon: "el-icon-check",
size: "small"
}, on: {click: e.doSubmit}
}, [e._v(" ")])], 1)], 1) : e._e()], 1), a("el-tab-pane", {
attrs: {
label: "",
name: "ad"
}
}, [e.form ? a("el-form", {
ref: "adForm",
staticStyle: {padding: "30px 0"},
attrs: {model: e.form, rules: e.formRules, "label-width": "180px"}
}, [a("el-form-item", {
attrs: {
label: "",
prop: "inter_is_open"
}
}, [a("el-switch", {
attrs: {"active-value": 1, "inactive-value": 0},
model: {
value: e.form["inter_is_open"], callback: function (t) {
e.$set(e.form, "inter_is_open", t)
}, expression: "form['inter_is_open']"
}
})], 1), a("el-form-item", {
attrs: {
label: "ID",
prop: "inter_unit_id"
}
}, [a("el-input", {
attrs: {size: "small"}, model: {
value: e.form["inter_unit_id"], callback: function (t) {
e.$set(e.form, "inter_unit_id", t)
}, expression: "form['inter_unit_id']"
}
}), a("p", {
staticStyle: {
color: "#666",
margin: "0"
}
}, [e._v("ID6")])], 1), a("el-form-item", {
attrs: {
label: "banner",
prop: "banner_is_open"
}
}, [a("el-switch", {
attrs: {"active-value": 1, "inactive-value": 0},
model: {
value: e.form["banner_is_open"], callback: function (t) {
e.$set(e.form, "banner_is_open", t)
}, expression: "form['banner_is_open']"
}
})], 1), a("el-form-item", {
attrs: {
label: "bannerID",
prop: "banner_unit_id"
}
}, [a("el-input", {
attrs: {size: "small"}, model: {
value: e.form["banner_unit_id"], callback: function (t) {
e.$set(e.form, "banner_unit_id", t)
}, expression: "form['banner_unit_id']"
}
}), a("p", {
staticStyle: {
color: "#666",
margin: "0"
}
}, [e._v("bannerID")])], 1), a("el-form-item", {attrs: {label: ""}}, [a("el-button", {
attrs: {
type: "primary",
icon: "el-icon-check",
size: "small"
}, on: {click: e.doSubmit}
}, [e._v(" ")])], 1)], 1) : e._e()], 1)], 1)], 1)
}, r = [], i = (a("7b4c"), a("5f17"), a("90e7")), s = a("91b6"), o = {
data: function () {
return {
tabName: "system",
form: null,
engines: [],
balance: null,
lxaiBalance: null,
formRules: {
channel: [{required: !0, message: "", trigger: "blur"}],
is_open: [{required: !0, message: "", trigger: "blur"}],
mch_id: [{required: !0, message: "", trigger: "blur"}],
key: [{required: !0, message: "", trigger: "blur"}]
}
}
}, mounted: function () {
this.getSetting()
}, methods: {
getSetting: function () {
var e = this;
Object(i["d"])({name: this.tabName}).then((function (t) {
e.form = t.data
}))
}, getEngines: function () {
var e = this;
Object(i["b"])().then((function (t) {
e.engines = t.data
}))
}, switchTab: function () {
this.getSetting(), "chatgpt" === this.tabName && this.getEngines()
}, doSubmit: function () {
var e = this, t = null;
"system" === this.tabName ? t = this.$refs.systemForm : "pay" === this.tabName ? t = this.$refs.payForm : "chatgpt" === this.tabName ? t = this.$refs.chatgptForm : "gpt4" === this.tabName ? t = this.$refs.gpt4Form : "ad" === this.tabName ? t = this.$refs.adForm : "about" === this.tabName ? t = this.$refs.aboutForm : "kefu" === this.tabName && (t = this.$refs.kefuForm), t && t.validate((function (t) {
t ? Object(i["e"])({name: e.tabName, data: JSON.stringify(e.form)}).then((function (t) {
e.getSetting(), e.$message({message: t.message, type: "success", duration: 1500})
})) : e.$message({message: "", type: "error", duration: 1500})
}))
}, uploadImage: function (e) {
var t = this, a = new FormData;
a.append("file", e.file), e.data && a.append("data", JSON.stringify(e.data)), Object(s["a"])(a).then((function (a) {
t.$set(t.form, e.data.type, a.data.path), t.$message.success("")
}))
}, uploadPemCheck: function (e) {
if ("pem" !== e.name.substr(-3)) return this.$message({
showClose: !0,
message: ".pem",
type: "warning"
}), !1
}, uploadPem: function (e) {
var t = this, a = new FormData;
a.append("file", e.file), e.data && a.append("data", JSON.stringify(e.data)), Object(s["b"])(a).then((function (a) {
"cert" === e.data.type ? t.$set(t.form, "apiclient_cert", a.data) : "key" === e.data.type && t.$set(t.form, "apiclient_key", a.data), t.$message.success("")
}))
}
}
}, n = o, m = (a("387d"), a("5e9c"), a("3427")), p = Object(m["a"])(n, l, r, !1, null, "01907cf6", null);
t["default"] = p.exports
}, "90e7": function (e, t, a) {
"use strict";
a.d(t, "d", (function () {
return r
})), a.d(t, "b", (function () {
return i
})), a.d(t, "e", (function () {
return s
})), a.d(t, "a", (function () {
return o
})), a.d(t, "c", (function () {
return n
}));
var l = a("b775");
function r(e) {
return Object(l["a"])({url: "/setting/getSetting", method: "post", data: e})
}
function i(e) {
return Object(l["a"])({url: "/setting/getEngines", method: "post", data: e})
}
function s(e) {
return Object(l["a"])({url: "/setting/setSetting", method: "post", data: e})
}
function o(e) {
return Object(l["a"])({url: "/setting/getBalance", method: "post", data: e})
}
function n(e) {
return Object(l["a"])({url: "/setting/getLxaiBalance", method: "post", data: e})
}
}, "91b6": function (e, t, a) {
"use strict";
a.d(t, "a", (function () {
return r
})), a.d(t, "b", (function () {
return i
}));
var l = a("b775");
function r(e) {
return Object(l["a"])({url: "/upload/image", method: "post", data: e})
}
function i(e) {
return Object(l["a"])({url: "/upload/pem", method: "post", data: e})
}
}
}]);
Function Calls
None |
Stats
MD5 | d4804a8e0cabda5512499933f3ff183e |
Eval Count | 0 |
Decode Time | 55 ms |