Commit ad431e8f authored by Mac's avatar Mac

1

parent 760f9f97
......@@ -35,6 +35,9 @@
},
{
"path": "pages/webbox/webbox"
},
{
"path": "pages/webbox/webbox2"
}
],
"subPackages": [{
......@@ -79,13 +82,13 @@
]
},
// {
// "root": "pages/live",
// // "plugins": {
// // "live-player-plugin": {
// // "version": "1.3.0",
// // "provider": "wx2b03c6e691cd7370"
// // }
// // },
// "root": "pages/live", //赞羊、甲鹤、罗演的杂货铺
// "plugins": {
// "live-player-plugin": {
// "version": "1.3.2",
// "provider": "wx2b03c6e691cd7370"
// }
// },
// "pages": [{
// "path": "index"
// }, {
......
......@@ -443,7 +443,6 @@
let richtext = this.detailsData.Content;
let regex = new RegExp('<p', 'gi');
this.detailsData.Content = richtext.replace(regex, `<p style="display: flex;flex-direction: column;"`); //图片超出的处理
console.log(this.detailsData.Content)
if(this.detailsData.EnrollList && this.detailsData.EnrollList.length>0){
this.detailsData.EnrollList.forEach(x=>{
x.Content = JSON.parse(x.Content)
......
......@@ -378,7 +378,17 @@
}
return text
},
},
getPCfile(e,index){
let detail = e.data[0]
let blckdata = detail.data
blckdata.FileList.push(detail.FileUrl)
blckdata.FileListName.push(detail.FileName)
this.dataList[index].CompData = blckdata
console.log(blckdata)
}
}
}
</script>
......@@ -9,7 +9,7 @@
<u-icon name="cross" color="#909399" size="36" @click='getdelete(y)'></u-icon>
</view>
</view>
<u-button type="primary" size='mini' @click="xzfile">上传文件</u-button>
<u-button type="primary" size='mini' @click="xzfile" v-if="CompData.FileList.length<CompData.FileCount">上传文件</u-button>
<view class="single_Remark" v-if="CompData.Remark">{{CompData.Remark}}</view>
</view>
</template>
......@@ -31,7 +31,8 @@
this.action = this.UploadConfig().UploadUrl + "?fileSavePath=" + newPath;
if(this.CompData.FileListName==undefined){
this.CompData.FileListName = []
}
}
console.log(this.CompData)
},
methods: {
getdelete(index){
......@@ -40,17 +41,25 @@
this.$emit('success', this.CompData, this.index)
},
xzfile(){
let that = this
wx.chooseMessageFile({
count: this.CompData.FileCount==0?9999999:this.CompData.FileCount,
count: 9,
type: 'file',
success (res) {
console.log(res)
const tempFilePaths = res.tempFiles
let show = false
tempFilePaths.map((x,index)=>{//判断是否是文件
if(show == true){return}
if(that.CompData.FileList.length>=that.CompData.FileCount){
uni.showToast({
title:'超出了最多文件数量',
icon:'none'
})
show = true
}
if(x.type!='file'){
uni.showToast({
title:'请选择正确文件',
......@@ -83,11 +92,21 @@
}
})
},
fail(err){
console.log(err)
uni.navigateTo({
url:'/pages/webbox/webbox2?u=http://localhost:8181/#/koreaUpload&data='+encodeURIComponent(JSON.stringify(this.CompData))+'&index='+this.index
})
}
})
},
upFile(filePath,name) {
uni.showLoading({
title:'上传中...'
})
let action = this.action
let that = this
uni.uploadFile({
......@@ -108,6 +127,7 @@
}
},
fail: function(res) {
uni.hideLoading()
wx.showToast({
title: '上传失败!',
icon: 'none',
......
<template>
<web-view :src="url+'?data='+data " @message="postMessage2" ></web-view>
</template>
<script>
export default {
data() {
return {
url: "",
data:'',
index:0,
}
},
onLoad: function(option) { //option为object类型,会序列化上个页面传递的参数
this.url = decodeURIComponent(option.u)
this.data = decodeURIComponent(option.data)
if(option.index){
this.index = decodeURIComponent(option.index)
}
},
methods:{
postMessage2(data){
console.log(data,'data2')
let currentPages = getCurrentPages();
let beforePage = currentPages[currentPages.length - 2];
beforePage.$vm.getPCfile(data.detail,this.index)
}
}
}
</script>
<style>
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment