Commit 587059de authored by Mac's avatar Mac

修改

parent 113f4cc0
......@@ -164,10 +164,9 @@
}
.img{
width: 190rpx ;
height: 190rpx ;
margin-bottom: 10px;
margin: 0 5px;
width: calc((100vw - 30px - 30px - 10px - 30px)/3 ) ;
height: calc((100vw - 30px - 30px - 10px - 30px)/3 );
margin: 5px;
}
}
}
......@@ -184,6 +183,10 @@
font-weight: bold;
}
}
.mmyVideo{
width: 100%;
height: 100%;
}
.oneText{
overflow: hidden;display: inline-block;white-space: nowrap; text-overflow:ellipsis;
......@@ -279,8 +282,8 @@
</view>
<view v-for="(item,index) in x.Content" :key='index' class="cans_c">
<!-- 图片 -->
<view v-if="item.CompKey=='ImageUploadComp' && item.CompData.FileList && item.CompData.FileList.length>0">
<view style="display: flex;flex-wrap: wrap;"
<view 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"
>
......@@ -296,16 +299,15 @@
</view>
<!-- 视频 -->
<view v-if="item.CompKey=='VideoUploadComp'&& item.CompData.FileList && item.CompData.FileList.length>0">
<view style="width:100%; height: 320rpx;position: relative;margin-bottom: 10px;" v-for="(x,y) in FileList" :key="y">
<video class="mmyVideo" :id="'myVideo'+y" :src="x" controls='true'
></video>
<!-- <view
<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'
:show-fullscreen-btn='false' @fullscreenchange='videoControl'></video>
<view
style="width: 100%;height: 100%;position: absolute;left: 0;top: 0;display: flex;align-items: center;justify-content: center;"
@click="enlarge('myVideo'+y)">
<u-icon name="play-circle-o" :size="70" color="#FFF"></u-icon>
</view> -->
@click="enlarge('myVideo'+y+index+sindex)">
<u-icon name="play-circle-o" :size="100" color="#FFF"></u-icon>
</view>
</view>
</view>
......@@ -345,6 +347,7 @@
detailsData:null,
RankList:[],
type:1,//1位列表过来的 2 为自己报名列表过来的
controls:false,
}
},
onLoad(options) {
......@@ -368,6 +371,22 @@
}
},
methods:{
enlarge(file) {
// 全屏
this.videoContext = uni.createVideoContext(file);
this.videoContext.requestFullScreen({
direction: 0
})
},
videoControl(e) {
if (e.detail.fullScreen == false) {
this.videoContext.stop()
this.controls = false
} else {
this.videoContext.play()
this.controls = true
}
},
getDetails(){
let parms = {
url: "/api/AppletTrade/GetAppletFistShopListInfo",
......@@ -385,8 +404,9 @@
if(this.detailsData.EnrollList && this.detailsData.EnrollList.length>0){
this.detailsData.EnrollList.forEach(x=>{
x.Content = JSON.parse(x.Content)
console.log(x.Content)
})
console.log(this.detailsData.EnrollList)
}
}
......@@ -407,15 +427,13 @@
data.template_message_list = this.detailsData.template_message_list;
data.ListId = this.detailsData.Id;
console.log(data)
uni.navigateTo({//编码
url: "/pages/kotra/billboard/listsignUp?formData="+encodeURIComponent(JSON.stringify(data)),
});
},
previewImage(i,list) {
console.log(i);
uni.previewImage({
urls: list,
current: i,
......@@ -423,14 +441,15 @@
itemList: ["发送给朋友", "保存图片", "收藏"],
success: function (data) {},
fail: function (err) {
console.log(err.errMsg);
},
},
});
},
getDorpDownData(value,list){
let data = value.split(',')
console.log(data,list)
console.log(data,'split')
let data = value.toString().split(',')
let text = ''
data.forEach((x,y)=>{
list.map(j=>{
......@@ -445,9 +464,9 @@
}
})
})
console.log(text)
return text
}
},
}
}
</script>
......
......@@ -107,12 +107,11 @@
created() {
if(this.multiple == true){
if(this.value!=''){
this.value= this.value.split(',')
this.value = this.value.split(',').map(Number)
}else{
this.value = []
}
}
}
},
methods: {
get_value(val){ // 将数组值转换为以,隔开的字符串
......@@ -122,18 +121,17 @@
val.forEach(item=>{
let choose = this.list.find(temp => {
let val_val = this.getValueKeyValue(temp)
return item === val_val
})
console.log(choose,'choose')
return item == val_val
})
chooseAttr.push(choose)
console.log(chooseAttr)
})
let values = chooseAttr.map(temp => this.getLabelKeyValue(temp)).join(',')
return values
} else {
let choose = this.list.find(temp => {
let val_val = this.getValueKeyValue(temp)
return val === val_val
return val == val_val
})
return this.getLabelKeyValue(choose)
}
......@@ -154,18 +152,20 @@
this.$emit('change', _value)
}
} else {
this.value = val
// this.value = val
this.$emit('change', val)
this.hideModal()
}
},
valueIndexOf(item){
let val = this.getValueKeyValue(item);
valueIndexOf(item){
let val = this.getValueKeyValue(item);
if(Array.isArray(this.value)){
return this.value.indexOf(val)!=-1
} else {
return this.value === val
return this.value == val
}
},
getLabelKeyValue(item){ // 获取label
......
......@@ -2,7 +2,7 @@
.listsignUp {
width: 100%;
height: 100vh;
overflow-y: auto;
/* overflow-y: auto; */
background: #F6F6F6;
padding: 18px;
}
......@@ -47,7 +47,7 @@
<span style="color:red;margin-right:5rpx;" >*</span>参与品牌/载体
</view>
<view class="single_Input" @click="show=true" style="width: 100%;display: flex;align-items: center;justify-content: space-between;">
<input style="width: 90%" v-model="ObjectName" placeholder="请选择" />
<input style="width: 90%" v-model="ObjectName" :disabled="true" placeholder="请选择" />
<u-icon name="arrow" color="#909399" size="36" ></u-icon>
</view>
......@@ -62,7 +62,7 @@
@success="datasuccess()"></selectChoice>
<pictureUpload v-if="item.CompKey=='ImageUploadComp'" :CompData="item.CompData" :index='index'
@success="datasuccess()"></pictureUpload>
<videoUpload v-if="item.CompKey=='VideoUploadComp'" :CompData="item.CompData" :index='index'
<videoUpload v-if="item.CompKey=='VideoUploadComp'" :CompData="item.CompData" :index='index' @enlarge='enlarge()'
@success="datasuccess()"></videoUpload>
</template>
<view class="btn" @click="setapply()">
......@@ -114,7 +114,8 @@
CarrierList: [],
ObjectName:'',
show:false,
companyStatus:0,
companyStatus:0,
type:1
}
},
created() {
......@@ -131,6 +132,7 @@
if (option && option.formData) { //解码
this.formData = JSON.parse(decodeURIComponent(option.formData))
if(this.formData.ObjectId && this.formData.ObjectId>0){
this.type=2
this.addMsg.Id = this.formData.Id
this.addMsg.ListId = this.formData.ListId
this.addMsg.ObjectType = this.formData.ObjectType
......@@ -268,7 +270,6 @@
this.addMsg.ObjectType = this.CarrierList[e].ObjectType;
},
datasuccess(data, index) {
console.log(data, index)
this.dataList[index].CompData = data
},
setapply() {
......@@ -288,9 +289,9 @@
if (show == true) {
return
}
if(x.CompKey=='DorpDownList' && x.CompData.IsMultiple==true){
x.CompData.OptionValue = x.CompData.OptionValue.join(',')
}
// if(x.CompKey=='DorpDownList' && x.CompData.IsMultiple==true){
// x.CompData.OptionValue = x.CompData.OptionValue.join(',')
// }
if (x.CompData.IsRequire && x.CompData.IsRequire == true) {
if ((x.CompKey == 'SingleLineText' || x.CompKey == 'MultiLineText') && x.CompData
.TextValue == '') { //单行输入或者多行
......@@ -329,13 +330,23 @@
title: '申请成功',
icon: 'none'
})
setTimeout(() => {
uni.navigateBack({
success: function() {
beforePage.$vm.getDetails(); // 执行前一个页面的方法
}
});
}, 1000)
if(that.type==1){
setTimeout(() => {
uni.redirectTo({
url: "/pages/kotra/billboard/mybillbordList"
})
}, 1000)
}else{
setTimeout(() => {
uni.navigateBack({
success: function() {
beforePage.$vm.getDetails(); // 执行前一个页面的方法
}
});
}, 1000)
}
}
);
......
......@@ -29,7 +29,6 @@
},
methods:{
selectChange(e){
console.log(e)
this.CompData.OptionValue = e
this.$emit('success', this.CompData, this.index)
}
......
......@@ -5,14 +5,14 @@
</view>
<view style="width:100%; height: 320rpx;position: relative;margin-bottom: 10px;" v-for="(x,y) in FileList" :key="y">
<video class="mmyVideo" :id="'myVideo'+y" :src="x" :controls='controls' :show-center-play-btn='false'
:show-fullscreen-btn='false' @fullscreenchange='videoControl'></video>
<view
<!-- <video class="mmyVideo" :id="'myVideo'+y" :src="x" :controls='controls' :show-center-play-btn='false'
:show-fullscreen-btn='false' @fullscreenchange='videoControl'></video> -->
<video class="mmyVideo" :id="'myVideo'+y" :src="x" controls='true' ></video>
<!-- <view
style="width: 100%;height: 100%;position: absolute;left: 0;top: 0;display: flex;align-items: center;justify-content: center;"
@click="enlarge('myVideo'+y)">
<u-icon name="play-circle-o" :size="70" color="#FFF"></u-icon>
</view>
</view> -->
<view style="width: 50rpx;height: 50rpx;position: absolute;right: 10rpx;top:10rpx;
border-radius: 25rpx;
background: #F30329;
......@@ -48,14 +48,12 @@
}
},
created() {
let MallBaseId = uni.getStorageSync("mall_UserInfo").MallBaseId ? uni.getStorageSync("mall_UserInfo")
.MallBaseId : 1;
this.action = this.host2 + '/api/File/UploadTencent?MallBaseId=' + MallBaseId
this.FileList = JSON.parse((JSON.stringify(this.CompData.FileList)))
},
methods: {
enlarge(file) {
// 全屏
// 全屏
this.videoContext = uni.createVideoContext(file);
this.videoContext.requestFullScreen({
direction: 0
......@@ -92,7 +90,8 @@
let MallBaseId = uni.getStorageSync("mall_UserInfo").MallBaseId ? uni.getStorageSync("mall_UserInfo")
.MallBaseId :
1;
let action = this.host2 + '/api/File/UploadTencent?MallBaseId=' + MallBaseId
let action = this.host2 + '/api/File/UploadTencent?MallBaseId=' + MallBaseId
// let action = 'http://192.168.20.214:8120/Upload/UploadBlob'
let that = this
uni.uploadFile({
url: action,
......
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