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

学美工难吗seo网站优化专员

学美工难吗,seo网站优化专员,织梦可以放两个网站,网站制作设计方案云点播是专门应对上传大视频文件的。 腾讯云点播文档:https://cloud.tencent.com/document/product/266/18177 这个文档比较简单,实在不行,把demo下载下来,一看就明白了,然后再揉一下挪到自己的项目里。完事。 getSign…

云点播是专门应对上传大视频文件的。
腾讯云点播文档:https://cloud.tencent.com/document/product/266/18177
这个文档比较简单,实在不行,把demo下载下来,一看就明白了,然后再揉一下挪到自己的项目里。完事。
getSignature: function(callback) {
uni.request({
url: ‘https://www.xxx.com/mnp/zsapi/getSignature.php’,
method: ‘POST’,
data: {
mid: uni.getStorageSync(‘mid’),
token: uni.getStorageSync(‘token’)
},
header: {
‘content-type’: ‘application/x-www-form-urlencoded’
},
success: function(res) {
if (res.data.signature) {
callback(
res.data.signature
);
} else {
return ‘获取签名失败’;
}
}
});
},
ChooseImage(e) {
console.log(e)
let that = this
// 选择多张图片
uni.chooseMedia({
count: 15, // 最多可以选择的图片张数
mediaType: [‘image’, ‘video’],
sizeType: [‘compressed’], // 可以指定是原图还是压缩图
sourceType: [‘album’], // 可以指定来源是相册还是相机
// maxDuration: 30,
// camera: ‘back’,
success: function(res) {
console.log(res, res.tempFiles[0], ‘???’)
if (res.type == ‘video’) {
if (e == ‘0’) {
uni.showToast({
title: ‘第一张必须上次图片’,
duration: 2000,
icon: ‘none’
})
return
}
//选择视频
that.videoFile = res.tempFiles[0]
setTimeout(() => {
that.startUpload(e)
}, 500)

					} else {// 选择图片成功,res.tempFiles 包含选择的图片路径列表uni.showLoading({title: '上传中...'})// console.log(res.tempFiles)that.uploadDIY( res.tempFiles, 0, 0, 0,  res.tempFiles.length,e);returnfor (let i = 0; i < res.tempFiles.length; i++) {uni.uploadFile({url: 'https://www.xxx.com/mnp/zsapi/gongdi_upload.php',filePath: res.tempFiles[i].tempFilePath,name: 'file',formData: {'mid': uni.getStorageSync('mid'),'token': uni.getStorageSync('token'),},success(res) {const data = JSON.parse(res.data.replace('\uFEFF',''))console.log(data)if (data.bs == 'success') {uni.showToast({title: data.errmsg,duration: 2000,icon: 'success'})that.infolist[e].imglist.push(data.img)} else if (data.bs == 'guoqi') {uni.showToast({title: data.errmsg,duration: 2000,icon: 'error'})setTimeout(function() {uni.redirectTo({url: '../../pagesD/login/login'})}, 500)} else {uni.showToast({title: data.errmsg,duration: 2000,icon: 'error'})}},fail() {uni.showToast({title: '服务器繁忙,请稍后再试',duration: 2000,icon: 'error'})}})}}}})},startUpload(e) {let that = thisuni.showLoading({title: '上传中...',mask: true,})const self = this;const uploader = VodUploader.start({mediaFile: self.videoFile, //必填,把chooseVideo回调的参数(file)传进来getSignature: self.getSignature, //必填,获取签名的函数error: function(result) {console.log("error");console.log(result);// uni.hideLoading();uni.showModal({title: "上传失败",content: JSON.stringify(result),showCancel: false});},progress: function(result) {console.log("progress");console.log(result);// uni.hideLoading();self.progress = parseInt(result.percent * 100)},finish: function(result) {console.log("finish");console.log(result);let brr = []let obj = {}obj.url = result.videoUrlbrr.push(`myvideo${e}`)that.videoarr = brrobj.id =  `myvideo${e}`self.infolist[e].videolist.push(obj)uni.showToast({title: '上传成功',duration: 2000,icon: 'success'})self.reset();}});this.uploader = uploader},uploadDIY(filePaths, successUp, failUp, i, length,e) {let that = thisuni.uploadFile({url: 'https://www.xxxx.com/mnp/zsapi/gongdi_upload.php',filePath: filePaths[i].tempFilePath,name: 'file',formData: {'mid': uni.getStorageSync('mid'),'token': uni.getStorageSync('token'),},success: (res) => {const data = JSON.parse(res.data.replace('\uFEFF',''))if (data.bs == 'success') {uni.showToast({title: data.errmsg,duration: 2000,icon: 'success'})successUp++;// console.log('上传图片成功:', JSON.parse(res.data));// var data = JSON.parse(res.data);// console.log(data)// 把获取到的路径存入imagesurl字符串中that.infolist[e].imglist.push(data.img)// console.log(this.data.imagesurl)} else if (data.bs == 'guoqi') {uni.showToast({title: data.errmsg,duration: 2000,icon: 'error'})setTimeout(function() {uni.redirectTo({url: '../../pagesD/login/login'})}, 500)} else {uni.showToast({title: data.errmsg,duration: 2000,icon: 'error'})}},fail: (res) => {failUp++;},complete: () => {i++;if (i == length) {// Toast('总共' + successUp + '张上传成功,' + failUp + '张上传失败!');} else { //递归调用uploadDIY函数that.uploadDIY(filePaths, successUp, failUp, i, length,e);}},});},
http://www.ds6.com.cn/news/99717.html

相关文章:

  • wix做网站步骤cps广告是什么意思
  • 关于外贸的网站win7一键优化工具
  • 建设厅特种工广州seo网站推广公司
  • 企业网站建设 广州产品推广运营的公司
  • 用买的服务器 做网站开封网站优化公司
  • 万网网站 banner图片不显示网页设计培训学校
  • 门户网站的主要功能搜索引擎优化排名品牌
  • 网站个人中心wordpress如何网络营销自己的产品
  • 做seo网站的步骤外链怎么打开
  • 免费网站服务商站长网站优化公司
  • 如何建b2c网站百度 seo排名查询
  • 馆陶网站seo优化就业前景
  • 在猪八戒找人做网站靠谱吗海外网络推广
  • 珠海 网站 设计地推拉新接单平台
  • 苏州朗冠网站建设公司网络营销策略实施的步骤
  • 手机网站设计制作服务媒体发稿网
  • 破解织梦做的网站友情链接交易平台
  • 公司网站建设请示报告美食软文300字
  • dede网站搬家国际域名注册网站
  • c 做网站教程网络营销推广seo
  • 建筑给排水代做网站哪里做网络推广
  • 简述网站建设的主要内容必应bing国内版
  • 郑州市网站制作公司漳州seo网站快速排名
  • 炫酷网站 css工具营销型网站外包
  • .net电商网站开发设计域名比价网
  • 网站加载效果怎么做的sem网站推广怎么做
  • 外国人做中国数学视频网站windows11优化大师
  • 兰溪网站建设学徒郑州抖音seo
  • 申请了域名怎么做网站大连百度关键词优化
  • wordpress适合企业网站模板郑州官网关键词优化公司