feat: 会员中心 hgcloud 主题初始化 + drone 部署步骤
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
- 解压官方默认主题 default_yfMBA.tar.gz 到 clientarea/hgcloud/ - .gitignore 排除压缩包和临时解压目录 - drone 新增步骤: 同步 hgcloud 到 /clientarea/template/pc/
This commit is contained in:
47
clientarea/hgcloud/components/hostStatus/hostStatus.js
Normal file
47
clientarea/hgcloud/components/hostStatus/hostStatus.js
Normal file
@@ -0,0 +1,47 @@
|
||||
/* 处理产品转移中的状态 */
|
||||
const hostStatus = {
|
||||
template:
|
||||
`
|
||||
<div>
|
||||
<div class="host-is-transfer" v-if="isTransferring">{{lang.host_transferring}}</div>
|
||||
<slot v-else></slot>
|
||||
</div>
|
||||
`,
|
||||
data () {
|
||||
return {
|
||||
isTransferring: false,
|
||||
};
|
||||
},
|
||||
props: {
|
||||
id: {
|
||||
type: Number | String,
|
||||
required: true,
|
||||
default: null,
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getHostTransferStatus () {
|
||||
try {
|
||||
const res = await hostIsTransfer({ id: this.id * 1 });
|
||||
const transferring = res.data.data.status;
|
||||
// 状态为 Active 且 transferring === 1 的时候显示转移中
|
||||
this.isTransferring = transferring && this.status === 'Active';
|
||||
} catch (error) {
|
||||
this.$message.error(error.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
const arr = JSON.parse(
|
||||
document.querySelector("#addons_js").getAttribute("addons_js")
|
||||
).map((item) => {
|
||||
return item.name;
|
||||
});
|
||||
arr.includes("HostTransfer") && this.getHostTransferStatus();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user