Commit 587059de authored by Mac's avatar Mac

修改

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