当前位置: 首页 > news >正文

网站运营前期中期后期天津代理记账

网站运营前期中期后期,天津代理记账,广州公关公司有哪些,网络域名备案笔记 20240710 未验证&#xff0c;现在还没有阿里云空间&#xff0c;等买个sit环境就可以验证一下。 前端 页面 <!--页面--> <el-form-item label"优惠券图片" prop"couponImg"><single-upload v-model"dataForm.couponImg"&g…

 笔记

20240710   未验证,现在还没有阿里云空间,等买个sit环境就可以验证一下。

 前端

        页面
<!--页面-->
<el-form-item label="优惠券图片" prop="couponImg"><single-upload v-model="dataForm.couponImg"></single-upload>
</el-form-item><!--vue引入-->
import SingleUpload from "@/components/upload/singleUpload";<!--vue对象里加组件-->
components: { SingleUpload },<!--保存方法,couponImg就是url路径-->
        组件
<template> <div><!-- action必选参数,上传地址,bucket的外网访问域名 --><el-uploadaction="https://vivi-gulimall.oss-cn-hangzhou.aliyuncs.com":data="dataObj"list-type="picture":multiple="false" :show-file-list="showFileList":file-list="fileList":before-upload="beforeUpload":on-remove="handleRemove":on-success="handleUploadSuccess":on-preview="handlePreview"><el-button size="small" type="primary">点击上传</el-button><div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过10MB</div></el-upload><el-dialog :visible.sync="dialogVisible"><img width="100%" :src="fileList[0].url" alt=""></el-dialog></div>
</template>
<script>import {policy} from './policy'import { getUUID } from '@/utils'export default {name: 'singleUpload',props: {value: String},computed: {imageUrl() {return this.value;},imageName() {if (this.value != null && this.value !== '') {return this.value.substr(this.value.lastIndexOf("/") + 1);} else {return null;}},fileList() {return [{name: this.imageName,url: this.imageUrl}]},showFileList: {get: function () {return this.value !== null && this.value !== ''&& this.value!==undefined;},set: function (newValue) {}}},data() {return {dataObj: {policy: '',signature: '',key: '',ossaccessKeyId: '',dir: '',host: '',// callback:'',},dialogVisible: false};},methods: {emitInput(val) {this.$emit('input', val)},handleRemove(file, fileList) {this.emitInput('');},handlePreview(file) {this.dialogVisible = true;},beforeUpload(file) {let _self = this;return new Promise((resolve, reject) => {policy().then(response => {_self.dataObj.policy = response.data.policy;_self.dataObj.signature = response.data.signature;_self.dataObj.ossaccessKeyId = response.data.accessid;_self.dataObj.key = response.data.dir + getUUID() + '_${filename}';_self.dataObj.dir = response.data.dir;_self.dataObj.host = response.data.host;console.log("上传前请求服务端签名,得到结果:", _self.dataObj)resolve(true)}).catch(err => {reject(false)})})},handleUploadSuccess(res, file) {console.log("上传成功...")this.showFileList = true;this.fileList.pop();this.fileList.push({name: file.name, url: this.dataObj.host + '/' + this.dataObj.key.replace("${filename}",file.name) });this.emitInput(this.fileList[0].url);}}}
</script>
<style></style>

http://www.yayakq.cn/news/542893/

相关文章:

  • wordpress 工具安装教程长春求推荐好的网站优化推广
  • 网站内容过滤网站功能
  • wordpress背景音乐整站seo排名公司
  • 手机能看禁止网站的浏览器邢台移动网络优化是哪家公司
  • 利用php做直播网站wordpress移动端顶部菜单
  • 网站个人备案模版广州谷歌推广
  • 安徽智能网站建设哪里有2021良心网址
  • 郑州做网站哪家便宜建站公司都是如何为建站服务定价的
  • 网赌网站怎么做的鹿泉城乡建设局网站
  • 中小企业网站建设与管理少儿编程课程收费标准
  • 做网站软件ps网站建设入门书
  • 湘潭网站建设 就找磐石网络网站设计稿尺寸
  • 企业网站制作的公司外贸业务流程
  • 京东网站建设及特点韶关企业网站建设公司
  • 南安网站建设常用的网络营销的手段有
  • 邯郸网站建设怎么做网站的签约编辑
  • 青海宾馆网站建设公司秦皇岛市建设局网站
  • 长沙网站建设联系电话WordPress添加评论提醒
  • 河北秦皇岛建设局网站建设网站应该注意的地方
  • 网站开发上线流程申请网站怎样申请
  • 自己建的网站也要注册域名吗微网站后台怎么注册
  • 门户网站开发报价.net 网站地图
  • 枝江网站建设太平洋建设 网站
  • 北京建设工程联合验收网站百度收录哪个网站多
  • 网站开发策划方案知乎免费开商城网站
  • 用excel做网站wordpress主题汉化是什么
  • 深圳企业网站建设服务平台安阳吧百度贴吧
  • 网站贸易表格怎么做游戏ui设计是什么
  • 福州免费做网站专业的图纸设计网站
  • 杭州seo网站哪家好室内设计培训班要多少钱