Commit 3874bc80 authored by 刘殿昕's avatar 刘殿昕

我的金币接口,订单so on

parent 0b1eaed6
......@@ -2,11 +2,11 @@
<div class="order_list">
<div class="order_th_pad">
<el-row class="order_th">
<el-col :span="8">服务信息</el-col>
<el-col :span="7">服务信息</el-col>
<el-col :span="5">规格</el-col>
<el-col :span="3">购买时长</el-col>
<el-col :span="3">总价</el-col>
<el-col :span="2">申请状态</el-col>
<el-col :span="3">申请状态</el-col>
<el-col :span="3">操作</el-col>
</el-row>
</div>
......
......@@ -66,7 +66,7 @@
<el-col :span="6">
<el-form-item prop="cpu" class="form_item input_has_right">
<div class="form_item_title">CPU:</div>
<el-select v-model="formNew.cpu" placeholder="请选择CPU使用量">
<el-select v-model="formNew.cpu" @change="changeCPU" placeholder="请选择CPU使用量">
<el-option
v-for="item in optionsCPU"
:key="item.value"
......@@ -1101,7 +1101,6 @@ export default {
},
tabClick() {},
getNewList(val) {
console.log(val);
this.formNew.apply_file_name = val[0].name;
this.formNew.apply_file = val[0].url;
},
......@@ -1111,7 +1110,6 @@ export default {
},
handleChange() {},
getForm(val) {
console.log(val);
if (val !== "") {
let paramsOld = this.workSpaceOptions[val];
this.workSpaceId = paramsOld.Id;
......@@ -1328,6 +1326,22 @@ export default {
}
}
},
changeCPU(val) {
console.log(val);
this.formOld.memory = "";
this.formNew.memory = "";
if (val == "8") {
this.optionsRAM = [
{ value: "16", label: "16" },
{ value: "32", label: "32" },
]
} else if (val == "16") {
this.optionsRAM = [
{ value: "32", label: "32" },
{ value: "64", label: "64" },
]
}
}
},
};
</script>
......
......@@ -24,8 +24,8 @@
<div class="card_word">
<p class="card_name">账户余额</p>
<p>
{{ helper.numberFormat(user_info.answer_num)
}}<span v-if="user_info.answer_num > 10000" class="card_wan">
{{ helper.numberFormat(user_info.account_balance)
}}<span v-if="user_info.account_balance > 10000" class="card_wan">
</span>
</p>
......@@ -36,8 +36,8 @@
<div class="card_word">
<p class="card_name">充值笔数</p>
<p>
{{ helper.numberFormat(user_info.view_num)
}}<span v-if="user_info.view_num > 10000" class="card_wan">
{{ helper.numberFormat(user_info.recharge_count)
}}<span v-if="user_info.recharge_count > 10000" class="card_wan">
</span>
</p>
......@@ -67,6 +67,7 @@
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:clearable="false"
@change="getCoinList"
></el-date-picker>
</div>
<apass-table
......@@ -103,12 +104,11 @@ export default {
user_info: {
user_name: "",
role: "",
question_num: 0,
answer_num: 0,
view_num: 0,
account_balance: 0,
recharge_count: 0,
picture_path: "",
},
tableData: [{}, {}],
tableData: [],
table_header: [],
total_list: 0,
currentPage: 1,
......@@ -125,8 +125,8 @@ export default {
this.pagination.page += val;
this.refreshData();
},
getUserCoin() {
this.$api.user.getUserQA().then((response) => {
getUserCoins() {
this.$api.user.getUserCoins().then((response) => {
if (response.data.success == 1) {
this.user_info = response.data.data;
}
......@@ -140,39 +140,47 @@ export default {
let query = {
start: this.date.length != 0 ? this.date[0] : "",
end: this.date.length != 0 ? this.date[1] : "",
limit: this.currentlimit,
page: this.currentPage,
};
console.log(query)
this.$api.user.getUserQA().then((response) => {
this.$api.user.getCoinList(query).then((response) => {
if (response.data.success == 1) {
this.user_info = response.data.data;
if (response.data.data && response.data.data.length != 0) {
this.tableData = response.data.data
} else {
this.tableData = [];
this.currentPage = 1;
}
this.total_list = response.data.total;
}
});
},
},
mounted() {
this.getUserCoin();
this.getUserCoins();
this.getCoinList();
this.table_header = [
{
prop: "title",
prop: "serial_number",
label: "充值流水ID",
align: "center",
type: "html",
getHtml: (str) => {
return `<span style="color:#0f2683;font-weight:bold;width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.title}">123123</span>`;
return `<span style="color:#0f2683;font-weight:bold;width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.serial_number}">${str.serial_number}</span>`;
},
},
{
prop: "content",
prop: "amount",
label: "充值金额(金币/个)",
align: "center",
type: "html",
getHtml: (str) => {
return `<span style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">123123123</span>`;
return `<span style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">${str.amount}</span>`;
},
},
{
prop: "answer_num",
prop: "balance",
label: "账户余额(金币/个)",
align: "center",
},
......
This diff is collapsed.
......@@ -1144,8 +1144,12 @@ export default {
bodys = JSON.stringify(request);
} else if (this.zhfwQqt == "x-www-form-urlencoded") {
let request = this.$refs.fwcs_zhfw_www.getTableData().concat();
let arr = [];
request.pop();
bodys = JSON.stringify(request);
request.forEach(item => {
arr.push({key: item.requestEncoding, val: item.requestValue, field_type: "text"})
});
bodys = JSON.stringify(arr);
}
}
}
......
......@@ -71,10 +71,10 @@ const user = {
// my coins
getUserCoins() {
return axios.get(``)
return axios.get(`/apaas/backmgt/user/myAccount`)
},
getCoinList() {
return axios.get(``)
getCoinList(params) {
return axios.get(`/apaas/backmgt/user/rechargeRecords?start=${params.start}&end=${params.end}&limit=${params.limit}&page=${params.page}`)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment