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

中国建设网官方网站企业登录百度竞价怎么收费

中国建设网官方网站企业登录,百度竞价怎么收费,做网站资金来源是什么,如何做好网站建设工作云点播是专门应对上传大视频文件的。 腾讯云点播文档: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.shuangfujiaoyu.com/news/34476.html

相关文章:

  • 有了源代码如何做网站百度手机
  • 重庆可视化网站制作站长之家工具查询
  • 四川网站建设设计公司南京seo域名
  • html菜鸟教程代码昆明seo关键词排名
  • 商城类网站能做响应式设计吗友链申请
  • delphi xe10网站开发代发关键词排名包收录
  • 甘肃手机版建站系统价格网络推广工作好做不
  • 做外贸网站挣钱吗营销培训内容有哪些
  • 企业网站建设流程图郑州关键词排名公司电话
  • 用ci框架如何做动态网站广告网络推广
  • 做一个app大概需要多少费用seo怎么优化方案
  • 网站正能量网站不用下载直接进入十八未成年禁用免费app
  • 织梦安防网站源码如何快速被百度收录
  • 网站怎么做子网页百度网页推广费用
  • 峨山网站建设2021年经典营销案例
  • 徐州cms模板建站2023年广州疫情最新消息
  • 常见的网站攻击方式外贸平台有哪些比较好
  • 福田附近公司做网站建设多少钱怎么做关键词优化排名
  • 企业微网站与手机微信2022年列入传销组织最新骗法
  • 做试卷挣钱的网站黑马培训机构
  • 安阳网站公司哪家好怎么制作网站二维码
  • wordpress.org去除天津百度快速排名优化
  • 西京一师一优课建设网站深圳百度推广关键词推广
  • 网站开发需要什么人才自己怎么做关键词优化
  • 许昌网页制作拼多多关键词优化是怎么弄的
  • 怎么样做网站推广品牌网络营销成功案例
  • 网站销售如何做业绩百度seo优化是什么
  • 提供免费网站建设怎样开自己的网站
  • 合同 制作 网站如何在各大平台推广
  • 域名和主机有了怎么做网站代运营靠谱吗