Skip to content

Commit

Permalink
优化页面问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Hello-hao committed Jun 22, 2023
1 parent a59f577 commit 8c7d965
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 18 deletions.
1 change: 0 additions & 1 deletion src/assets/js/photo.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ export default {
}
if (that.delOver) {
clearInterval(interval);
debugger;
that.isDelfun = false;
that.$Message.success("删除完成");
if (data.errorlist != null) {
Expand Down
2 changes: 1 addition & 1 deletion src/assets/js/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export default {
if (res.status == 200) {
this.storageList = res.data.data;
// this.$Message.error("请求时出现错误");
this.loadInfo = [];
this.getLoadInfo()
}
}).catch(err => {
Expand All @@ -131,7 +132,6 @@ export default {
"/admin/root/LoadInfo",
params).then(res => {
if (res.status == 200) {
this.loadInfo = [];
this.loadInfo.push(res.data.data)
}
}).catch(err => {
Expand Down
17 changes: 14 additions & 3 deletions src/assets/js/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default {
urlUploadMsg: false,
termMsg: false,//上传期限的弹窗
imgUrl: null,
referer:null,
uploadInfo: {
// - 图片支持格式
suffix: null,
Expand Down Expand Up @@ -247,7 +248,7 @@ export default {
if (this.imgUrl != null && this.imgUrl != '') {
if (this.imgUrl.indexOf("http") != -1 && this.imgUrl.indexOf("://") != -1 && this.imgUrl.indexOf(".") != -1) {
this.loading = true;
this.sendUploadForUrl(this.imgUrl);
this.sendUploadForUrl(this.imgUrl,this.referer);
this.loading = false;
this.urlUploadMsg = false;
this.spinShow = true;
Expand All @@ -258,10 +259,11 @@ export default {
this.$Message.warning("请先输入图像链接");
}
},
sendUploadForUrl(urlText) {
sendUploadForUrl(urlText,referer) {
var param = {
day: this.img_day,
imgUrl: urlText,
referer:referer,
}
request(
"/uploadForUrl",
Expand All @@ -281,6 +283,7 @@ export default {
}
}
this.imgUrl = null;
this.referer = null;
var text = "";
if (jsonData.excess > 0) {
text = "欲上传总数为: <font color='#6495ed' style='font-size: 16px;'>" + jsonData.counts +
Expand All @@ -296,6 +299,7 @@ export default {
content: text
});
this.imgUrl = null;
this.referer = null;
} else {
this.$Message.warning(res.data.info);
}
Expand Down Expand Up @@ -427,7 +431,14 @@ export default {
}
}
},

urlUploadHelp(){
this.$Modal.info({
title: "图片",
content: "<div style='width: 100%word-break: break-all;word-wrap: break-word;'>此选择为选填内容,目的是解决部分网址的防盗链功能。<br />" +
"如:你想转存微博的图片地址:<br /><b>https://wx2.sinaimg.cn/mw690/s542fSdgwegsd.jpg</b><br />" +
"但是微博图片的链接有防盗链,你就需要在此网址框输入上图片链接所在的网站域名:<br /><b>https://weibo.com/</b></div>"
});
},
imgOnOk() {
// var op = 0;
// var than = this;
Expand Down
2 changes: 1 addition & 1 deletion src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ vue.use(vuex)

const store = new vuex.Store({
state: {
version: 20230519,
version: 20230622,
isMobile: 'pc',
serverHost: null,
copyAllUrl: null,//一键复制存储内容
Expand Down
4 changes: 2 additions & 2 deletions src/views/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
<Form ref="formInline" :model="formInline" :rules="ruleInline" inline @submit.native.prevent>
<FormItem prop="email" style="display: inline-block;width: 80%;">
<Input prefix="md-mail" :maxlength="100" size="large" v-model="formInline.email"
placeholder="Email Or UserName" style="width: 100%;height: 40px;"/>
placeholder="邮箱或用户名" style="width: 100%;height: 40px;"/>
</FormItem>
<FormItem prop="password" style="display: inline-block;width: 80%;">
<Input prefix="md-lock" :maxlength="200" @keyup.enter.native="handleSubmit('formInline')" size="large"
type="password" password v-model="formInline.password" placeholder="User Password"
type="password" password v-model="formInline.password" placeholder="密码"
style="width: 100%;height: 40px;"/>
</FormItem>
<FormItem style="display: inline-block;width: 80%;">
Expand Down
33 changes: 23 additions & 10 deletions src/views/upload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,31 @@
<!--URL上传窗-->
<Modal v-model="urlUploadMsg" :footer-hide="true">
<br/>
<Form @submit.native.prevent>
<FormItem>
<Input @on-change="onGetLines" type="textarea" v-model="imgUrl" :rows="5"
placeholder="图像链接请按照每行一条填写(部分非直链图像或防盗链图像可能会转存失败)"/>
<!-- <Form @submit.native.prevent>-->
<!-- <FormItem>-->
<!-- <Input @on-change="onGetLines" type="textarea" v-model="imgUrl" :rows="5"-->
<!-- placeholder="图像链接请按照每行一条填写(部分非直链图像或防盗链图像可能会转存失败)"/>-->
<!-- </FormItem>-->
<!-- <p style="text-align: center;color: #d55757;" v-show="tempURLErr">您所输入的行数已经超过单次可上传的数量</p>-->
<!-- <p style="text-align: center;color: #5f5f5f;"-->
<!-- v-text="'单次批量上传 '+tempLink+'/'+this.uploadInfo.imgcount"></p>-->
<!-- <FormItem>-->
<!-- <Button :disabled="tempURLErr" type="primary" :loading="loading" icon="md-cloud-upload" long shape="circle"-->
<!-- @click="uploadForUrl">开始转存-->
<!-- </Button>-->
<!-- </FormItem>-->
<!-- </Form>-->
<Form @submit.native.prevent>
<FormItem >
<Input @on-change="onGetLines" type="textarea" v-model="imgUrl" :rows="5" placeholder="图像链接请按照每行一条填写(部分非直链图像可能会转存失败)" />
</FormItem>
<p style="text-align: center;color: #d55757;" v-show="tempURLErr">您所输入的行数已经超过单次可上传的数量</p>
<p style="text-align: center;color: #5f5f5f;"
v-text="'单次批量上传 '+tempLink+'/'+this.uploadInfo.imgcount"></p>
<Input v-model="referer" placeholder="选填:图片链接所在的网站网址(可解决防盗链)">
<Button slot="append" icon="md-help-circle" @click.native="urlUploadHelp"></Button>
</Input>
<p style="text-align: center;color: #d98282;" v-show="tempURLErr" >所输入行数已超过单次最大限制</p>
<p style="text-align: center;color: #5f5f5f;" v-text="'单次批量上传 '+tempLink+'/'+this.uploadInfo.imgcount"></p>
<FormItem>
<Button :disabled="tempURLErr" type="primary" :loading="loading" icon="md-cloud-upload" long shape="circle"
@click="uploadForUrl">开始转存
</Button>
<Button :disabled="tempURLErr" type="primary" :loading="loading" icon="md-cloud-upload" long shape="circle" @click="uploadForUrl" >开始转存</Button>
</FormItem>
</Form>
</Modal>
Expand Down

0 comments on commit 8c7d965

Please sign in to comment.