Commit 3c3efc27 authored by Mac's avatar Mac

1

parent 6ee0079f
......@@ -280,9 +280,9 @@
<view class="cans_c_l">参与品牌:</view>
<view class="cans_c_r">{{x.ObjectName}}</view>
</view>
<view v-for="(item,index) in x.Content" :key='index' class="cans_c">
<view v-for="(item,index) in x.Content" :key='index' >
<!-- 图片 -->
<view v-if="item.CompKey=='ImageUploadComp' && item.CompData.FileList && item.CompData.FileList.length>0" style="display: flex;flex-wrap: wrap;">
<view class="cans_c" v-if="item.CompKey=='ImageUploadComp' && item.CompData.FileList && item.CompData.FileList.length>0" style="display: flex;flex-wrap: wrap;">
<view
v-for="(src, sindex) in item.CompData.FileList"
:key="sindex"
......@@ -298,7 +298,7 @@
</view>
</view>
<!-- 视频 -->
<view v-if="item.CompKey=='VideoUploadComp'&& item.CompData.FileList && item.CompData.FileList.length>0">
<view class="cans_c" v-if="item.CompKey=='VideoUploadComp'&& item.CompData.FileList && item.CompData.FileList.length>0">
<view style="width:calc(100vw - 70px); height: 320rpx;position: relative;margin-bottom: 10px;" v-for="(src,sindex) in item.CompData.FileList" :key="y">
<!-- <video class="mmyVideo" :id="'myVideo'+sindex" :src="src" controls='true' :ref="'myVideo'+sindex" ></video> -->
<video class="mmyVideo" :id="'myVideo'+y+index+sindex" :src="src" :controls='controls' :show-center-play-btn='false'
......@@ -311,11 +311,11 @@
</view>
</view>
<view style="display: flex;align-items: flex-start;width: 100%;" v-if="(item.CompKey=='SingleLineText' || item.CompKey=='MultiLineText')&& item.CompData.TextValue && item.CompData.TextValue!=''">
<view class="cans_c" style="display: flex;align-items: flex-start;width: 100%;" v-if="(item.CompKey=='SingleLineText' || item.CompKey=='MultiLineText')&& item.CompData.TextValue && item.CompData.TextValue!=''">
<view class="cans_c_l">{{item.CompData.Name}}:</view>
<view class="cans_c_r">{{item.CompData.TextValue}}</view>
</view>
<view style="display: flex;align-items: flex-start;width: 100%;" v-if="(item.CompKey=='DorpDownList' )&& item.CompData.OptionValue && item.CompData.OptionValue!=''">
<view class="cans_c" style="display: flex;align-items: flex-start;width: 100%;" v-if="(item.CompKey=='DorpDownList' )&& item.CompData.OptionValue && item.CompData.OptionValue!=''">
<view class="cans_c_l">{{item.CompData.Name}}:</view>
<view class="cans_c_r">{{getDorpDownData(item.CompData.OptionValue,item.CompData.OptionList)}}</view>
</view>
......@@ -404,7 +404,6 @@
if(this.detailsData.EnrollList && this.detailsData.EnrollList.length>0){
this.detailsData.EnrollList.forEach(x=>{
x.Content = JSON.parse(x.Content)
console.log(x.Content)
})
}
......
......@@ -4,7 +4,7 @@
<input @click="showModal" v-model="_value" :style="disabled?'color:#c0c4cc':''" :placeholder="placeholder" disabled/>
<!-- <text v-if="clearable&&!disabled" @click="empty" class="selectIcon iconcross"></text> -->
<u-icon name="arrow" color="#909399" size="36" ></u-icon>
<u-icon @click="showModal" name="arrow" color="#909399" size="36" ></u-icon>
</view>
<view class="select-modal" :class="isShowModal?'show':''" @tap="hideModal">
<view class="select-dialog" @tap.stop="" :style="{backgroundColor:bgColor}">
......@@ -14,7 +14,7 @@
</view>
<view class="select-content">
<view class="select-item" v-for="(item,index) in list" :key="index"
:style="valueIndexOf(item)?'color:'+selectColor+';background-color:'+selectBgColor+';':'color:'+color+';'"
:style="valueIndexOf(item)?'color:'+selectColor:'color:'+color+';'"
@click="select(item)">
<view class="title">{{getLabelKeyValue(item)}}</view>
<view style="width: 16px;">
......
......@@ -270,7 +270,8 @@
this.addMsg.ObjectType = this.CarrierList[e].ObjectType;
},
datasuccess(data, index) {
this.dataList[index].CompData = data
this.dataList[index].CompData = data
console.log(data)
},
setapply() {
console.log('提交', this.dataList)
......
......@@ -28,7 +28,9 @@
},
created() {
let MallBaseId = uni.getStorageSync("mall_UserInfo").MallBaseId ? uni.getStorageSync("mall_UserInfo").MallBaseId : 1;
this.action = this.host2 + '/api/File/UploadTencent?MallBaseId=' + MallBaseId
// this.action = this.host2 + '/api/File/UploadTencent?MallBaseId=' + MallBaseId
var newPath = "/EduSystem/Test/Upload/";
this.action = this.UploadConfig().UploadUrl + "?fileSavePath=" + newPath;
if(this.CompData.FileList.length>0){
this.fileList=[]
this.CompData.FileList.forEach(x=>{
......@@ -44,6 +46,10 @@
methods:{
uploadSuccessHandler(data, index, lists) {
let r = JSON.parse(data);
console.log(r,index,lists,'listslistslistslists')
var url= this.UploadConfig().ImageUrl+ r.FilePath;
console.log(url)
this.CompData.FileList.push(r.data);
this.$emit('success', this.CompData, this.index)
......
......@@ -84,8 +84,6 @@
count: 1,
sourceType: ['camera', 'album'],
success: function(res) {
console.log(res)
if(that.CompData.FileSizeLimit>0){//大于0 进入判断
let size = res.size
if(res.size>(that.CompData.FileSizeLimit*1024*1024)){
......@@ -108,12 +106,10 @@
});
},
upFile(filePath, type) {
let MallBaseId = uni.getStorageSync("mall_UserInfo").MallBaseId ? uni.getStorageSync("mall_UserInfo")
.MallBaseId :
1;
let action = this.host2 + '/api/File/UploadTencent?MallBaseId=' + MallBaseId
var newPath = "/EduSystem/Test/Upload/" ;
// let action = "http://192.168.20.214:8120/Upload/UploadBase64?filePath="+newPath
var newPath = "/EduSystem/Test/Upload/";
let action = this.UploadConfig().UploadUrl + "?fileSavePath=" + newPath;
let that = this
uni.uploadFile({
......@@ -124,17 +120,17 @@
user: 'tesdt'
},
success: (uploadFileRes) => {
uni.hideLoading()
if (uploadFileRes.statusCode == 200) {
let data = JSON.parse(uploadFileRes.data)
// that.model.VideoUrl=data.data
that.FileList.push(data.data)
that.CompData.FileList.push(data.data)
that.$forceUpdate()
that.$emit('success', that.CompData, that.index)
uni.hideLoading()
var jsonData=JSON.parse(uploadFileRes.data);
if (jsonData.StatusCode == 1) {
var url= that.UploadConfig().ImageUrl+ jsonData.FilePath;
that.FileList.push(url);
that.CompData.FileList.push(url)
that.$forceUpdate()
that.$emit('success', that.CompData, that.index)
}
},
fail: function(res) {
console.log(res)
......
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