Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
mallapp
Commits
9c5cd8be
Commit
9c5cd8be
authored
Sep 03, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
38e2ca79
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
726 additions
and
25 deletions
+726
-25
billboarddetails.vue
pages/kotra/billboard/billboarddetails.vue
+23
-3
img-upload.vue
pages/kotra/billboard/components/img-upload.vue
+503
-0
listsignUp.vue
pages/kotra/billboard/listsignUp.vue
+9
-5
fileType.vue
pages/kotra/billboard/plugin/fileType.vue
+171
-0
pictureUpload.vue
pages/kotra/billboard/plugin/pictureUpload.vue
+7
-9
videoUpload.vue
pages/kotra/billboard/plugin/videoUpload.vue
+8
-3
api.js
plugin/api.js
+5
-5
No files found.
pages/kotra/billboard/billboarddetails.vue
View file @
9c5cd8be
...
...
@@ -238,12 +238,12 @@
</view>
</view>
<view
class=
"box_conent_basic"
v-if=
"detailsData && detailsData.ListState==3"
>
<view
class=
"box_conent_basic"
v-if=
"detailsData && detailsData.ListState==3
&& detailsData.RankList.length>0
"
>
<view
class=
"box_conent_basic_img"
>
<view
class=
"box_conent_basic_img_t"
>
评比结果
</view>
</view>
<view
class=
"box_conent_basic_c"
style=
"padding: 0 5px;"
v-if=
"detailsData"
>
<view
v-for=
"(x,y) in
RankList"
:key=
'y'
class=
"box_c_b_c_item
"
>
<view
v-for=
"(x,y) in
detailsData.RankList"
:key=
'y'
class=
"box_c_b_c_item"
@
click=
"goxiangqin(x)
"
>
<view
class=
"cbc_item_l"
>
<view
v-if=
"detailsData.EnableRank==1"
class=
"cbc_item_l"
>
<image
v-if=
"y==0"
src=
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/bdbando.png'
style=
"width: 100%;height: 100%;"
></image>
...
...
@@ -319,6 +319,12 @@
<view
class=
"cans_c_l"
>
{{
item
.
CompData
.
Name
}}
:
</view>
<view
class=
"cans_c_r"
>
{{
getDorpDownData
(
item
.
CompData
.
OptionValue
,
item
.
CompData
.
OptionList
)
}}
</view>
</view>
<view
class=
"cans_c"
style=
"display: flex;align-items: flex-start;width: 100%;"
v-if=
"item.CompKey=='CommonUploadComp' && item.CompData.FileList && item.CompData.FileList.length>0"
>
<view
class=
"cans_c_l"
>
{{
item
.
CompData
.
Name
}}
:
</view>
<view
class=
"cans_c_r"
>
<view
v-for=
"(src, sindex) in item.CompData.FileListName"
>
{{
src
}}
</view>
</view>
</view>
</view>
<view
class=
"btn_bm"
v-if=
"detailsData.ListState==1"
@
click=
"goeditsignUp(x)"
>
编辑
</view>
...
...
@@ -404,6 +410,7 @@
if
(
this
.
detailsData
.
EnrollList
&&
this
.
detailsData
.
EnrollList
.
length
>
0
){
this
.
detailsData
.
EnrollList
.
forEach
(
x
=>
{
x
.
Content
=
JSON
.
parse
(
x
.
Content
)
})
}
...
...
@@ -446,7 +453,7 @@
});
},
getDorpDownData
(
value
,
list
){
console
.
log
(
data
,
'split'
)
let
data
=
value
.
toString
().
split
(
','
)
let
text
=
''
...
...
@@ -465,6 +472,19 @@
})
return
text
},
goxiangqin
(
item
){
//点击放榜列表 进入详情
if
(
item
.
ObjectType
==
1
){
//品牌
uni
.
navigateTo
({
url
:
"/pages/kotra/brand/detail?id="
+
item
.
ObjectId
})
}
else
if
(
item
.
ObjectType
==
2
){
//载体
uni
.
navigateTo
({
url
:
"/pages/kotra/carrier/detail?id="
+
item
.
ObjectId
})
}
}
}
}
...
...
pages/kotra/billboard/components/img-upload.vue
0 → 100644
View file @
9c5cd8be
This diff is collapsed.
Click to expand it.
pages/kotra/billboard/listsignUp.vue
View file @
9c5cd8be
...
...
@@ -62,8 +62,10 @@
@
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'
@
enlarge=
'enlarge()'
@
success=
"datasuccess()"
></videoUpload>
<videoUpload
v-if=
"item.CompKey=='VideoUploadComp'"
:CompData=
"item.CompData"
:index=
'index'
@
success=
"datasuccess()"
></videoUpload>
<fileType
v-if=
"item.CompKey=='CommonUploadComp'"
:CompData=
"item.CompData"
:index=
'index'
@
success=
"datasuccess()"
></fileType>
</
template
>
<view
class=
"btn"
@
click=
"setapply()"
>
提交申请
...
...
@@ -86,6 +88,7 @@
import
selectChoice
from
"./plugin/selectChoice"
import
pictureUpload
from
"./plugin/pictureUpload"
import
videoUpload
from
"./plugin/videoUpload"
import
fileType
from
"./plugin/fileType"
export
default
{
components
:
{
...
...
@@ -93,7 +96,8 @@
multipleText
,
selectChoice
,
pictureUpload
,
videoUpload
,
videoUpload
,
fileType
},
data
()
{
...
...
@@ -271,10 +275,10 @@
},
datasuccess
(
data
,
index
)
{
this
.
dataList
[
index
].
CompData
=
data
console
.
log
(
data
)
},
setapply
()
{
console
.
log
(
'提交'
,
this
.
dataList
)
let
show
=
false
//验证必填
if
(
this
.
addMsg
.
ObjectId
==
0
||
this
.
addMsg
.
ObjectId
==
null
||
this
.
addMsg
.
ObjectId
==
''
){
...
...
pages/kotra/billboard/plugin/fileType.vue
0 → 100644
View file @
9c5cd8be
<
template
>
<view>
<view
class=
"single_Phone"
>
<span
style=
"color:red;margin-right:5rpx;"
v-show=
"CompData.IsRequire"
>
*
</span>
{{
CompData
.
Name
}}
</view>
<view
class=
"fliebox"
v-for=
"(x,y) in CompData.FileListName"
:key=
'y'
>
<view
class=
"fliebox_l"
>
{{
x
}}
</view>
<view
class=
"fliebox_r"
>
<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>
<view
class=
"single_Remark"
v-if=
"CompData.Remark"
>
{{
CompData
.
Remark
}}
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:
[
"CompData"
,
'index'
],
data
()
{
return
{
action
:
''
,
FileList
:
''
,
}
},
created
()
{
this
.
FileList
=
JSON
.
parse
((
JSON
.
stringify
(
this
.
CompData
.
FileList
)))
var
newPath
=
"/korea/Test/Upload/"
;
this
.
action
=
this
.
UploadConfig
().
UploadUrl
+
"?fileSavePath="
+
newPath
;
if
(
this
.
CompData
.
FileListName
==
undefined
){
this
.
CompData
.
FileListName
=
[]
}
},
methods
:
{
getdelete
(
index
){
this
.
CompData
.
FileList
.
splice
(
index
,
1
)
this
.
CompData
.
FileListName
.
splice
(
index
,
1
)
this
.
$emit
(
'success'
,
this
.
CompData
,
this
.
index
)
},
xzfile
(){
let
that
=
this
wx
.
chooseMessageFile
({
count
:
this
.
CompData
.
FileCount
==
0
?
9999999
:
this
.
CompData
.
FileCount
,
type
:
'file'
,
success
(
res
)
{
const
tempFilePaths
=
res
.
tempFiles
let
show
=
false
tempFilePaths
.
map
((
x
,
index
)
=>
{
//判断是否是文件
if
(
show
==
true
){
return
}
if
(
x
.
type
!=
'file'
){
uni
.
showToast
({
title
:
'请选择正确文件'
,
icon
:
'none'
})
show
=
true
}
else
{
if
(
that
.
CompData
.
FileType
.
indexOf
(
that
.
gethou
(
x
.
path
))
==-
1
){
uni
.
showToast
({
title
:
'请选择正确文件'
,
icon
:
'none'
})
show
=
true
}
else
{
if
(
that
.
CompData
.
FileSizeLimit
>
0
){
//大于0 进入判断
let
size
=
res
.
size
if
(
x
.
size
>
(
that
.
CompData
.
FileSizeLimit
*
1024
*
1024
)){
uni
.
showToast
({
title
:
'文件超出指定大小'
,
icon
:
'none'
})
show
=
true
}
else
{
that
.
upFile
(
x
.
path
,
x
.
name
)
}
}
else
{
that
.
upFile
(
x
.
path
,
x
.
name
)
}
}
}
})
}
})
},
upFile
(
filePath
,
name
)
{
let
action
=
this
.
action
let
that
=
this
uni
.
uploadFile
({
url
:
action
,
filePath
:
filePath
,
name
:
'file'
,
formData
:
{
user
:
'tesdt'
},
success
:
(
uploadFileRes
)
=>
{
uni
.
hideLoading
()
var
jsonData
=
JSON
.
parse
(
uploadFileRes
.
data
);
if
(
jsonData
.
StatusCode
==
1
)
{
var
url
=
that
.
UploadConfig
().
ImageUrl
+
jsonData
.
FilePath
;
that
.
CompData
.
FileList
.
push
(
url
)
that
.
CompData
.
FileListName
.
push
(
name
)
that
.
$emit
(
'success'
,
that
.
CompData
,
that
.
index
)
}
},
fail
:
function
(
res
)
{
wx
.
showToast
({
title
:
'上传失败!'
,
icon
:
'none'
,
duration
:
1000
})
}
});
},
gethou
(
filename
){
//获取后缀名
var
index
=
filename
.
lastIndexOf
(
"."
);
var
suffix
=
filename
.
substring
(
index
+
1
);
return
suffix
}
}
}
</
script
>
<
style
>
.slot-btn
{
width
:
220
rpx
;
height
:
220
rpx
;
background
:
#F5F5F5
;
border-radius
:
17
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.slot-btn
.image
{
width
:
54
rpx
;
height
:
auto
;
}
.mmyVideo
{
width
:
100%
;
height
:
100%
;
}
.fliebox
{
width
:
100%
;
height
:
30px
;
padding
:
0
10px
;
border
:
1px
solid
#e2e2e2
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
border-radius
:
4px
;
font-size
:
12px
;
margin-bottom
:
5px
;
}
.fliebox_l
{
width
:
1px
;
flex
:
1
;
overflow
:
hidden
;
display
:
inline-block
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.fliebox_r
{
width
:
36
rpx
;
}
</
style
>
pages/kotra/billboard/plugin/pictureUpload.vue
View file @
9c5cd8be
...
...
@@ -3,33 +3,33 @@
<view
class=
"single_Phone"
>
<span
style=
"color:red;margin-right:5rpx;"
v-show=
"CompData.IsRequire"
>
*
</span>
{{
CompData
.
Name
}}
</view>
<
u-
upload
ref=
"uUpload"
:action=
"action"
:show-tips=
"false"
@
on-remove=
"onRemove"
<
img
upload
ref=
"uUpload"
:action=
"action"
:show-tips=
"false"
@
on-remove=
"onRemove"
@
on-oversize=
"onversize"
@
on-exceed=
"onexceed"
:max-size=
"CompData.FileSizeLimit==0?99999* 1024 * 1024:CompData.FileSizeLimit * 1024 * 1024"
:max-count=
"CompData.FileCount==0?'999999':CompData.FileCount"
:file-list=
"fileList"
@
on-success=
"uploadSuccessHandler"
></
u-
upload>
></
img
upload>
<view
style=
"width: 100%;height: 1px;background: #e2e2e2;"
></view>
<view
class=
"single_Remark"
v-if=
"CompData.Remark"
>
{{
CompData
.
Remark
}}
</view>
</view>
</
template
>
<
script
>
import
imgupload
from
'../components/img-upload.vue'
export
default
{
props
:
[
"CompData"
,
'index'
],
components
:
{
imgupload
},
data
(){
return
{
action
:
this
.
host2
+
"/api/File/UploadTencent"
,
action
:
''
,
fileList
:[],
}
},
created
()
{
let
MallBaseId
=
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
:
1
;
// this.action = this.host2 + '/api/File/UploadTencent?MallBaseId=' + MallBaseId
var
newPath
=
"/EduSystem/Test/Upload/"
;
var
newPath
=
"/korea/Test/Upload/"
;
this
.
action
=
this
.
UploadConfig
().
UploadUrl
+
"?fileSavePath="
+
newPath
;
if
(
this
.
CompData
.
FileList
.
length
>
0
){
this
.
fileList
=
[]
...
...
@@ -46,11 +46,9 @@
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
.
CompData
.
FileList
.
push
(
url
);
this
.
$emit
(
'success'
,
this
.
CompData
,
this
.
index
)
},
...
...
pages/kotra/billboard/plugin/videoUpload.vue
View file @
9c5cd8be
...
...
@@ -19,7 +19,7 @@
display: flex;
align-items: center;
justify-content: center;
"
@
tap
.
stop=
"
CompData.FileList.splice(y,1),FileList.splice(y,1
)"
>
"
@
tap
.
stop=
"
getdelete(y
)"
>
<u-icon
class=
"u-icon"
name=
"cross"
size=
"30"
color=
"#ffffff"
></u-icon>
</view>
...
...
@@ -59,7 +59,12 @@
created
()
{
this
.
FileList
=
JSON
.
parse
((
JSON
.
stringify
(
this
.
CompData
.
FileList
)))
},
methods
:
{
methods
:
{
getdelete
(
index
){
this
.
CompData
.
FileList
.
splice
(
index
,
1
)
this
.
FileList
.
splice
(
index
,
1
)
this
.
$emit
(
'success'
,
this
.
CompData
,
this
.
index
)
},
enlarge
(
file
)
{
// 全屏
...
...
@@ -106,7 +111,7 @@
});
},
upFile
(
filePath
,
type
)
{
var
newPath
=
"/
EduSystem
/Test/Upload/"
;
var
newPath
=
"/
korea
/Test/Upload/"
;
let
action
=
this
.
UploadConfig
().
UploadUrl
+
"?fileSavePath="
+
newPath
;
...
...
plugin/api.js
View file @
9c5cd8be
...
...
@@ -8,11 +8,11 @@ export default {
// Vue.prototype.host2 = "http://192.168.20.17:8014"
// Vue.prototype.host2 = "http://192.168.20.17:8014"
// Vue.prototype.host2 = "http://testmall.oytour.com/"
Vue
.
prototype
.
UploadConfig
=
function
()
{
return
{
UploadUrl
:
"http://192.168.20.214:8120/Upload/AppUpload"
,
ImageUrl
:
"http://192.168.20.214:8130"
}
Vue
.
prototype
.
UploadConfig
=
function
()
{
//本地上传配置
return
{
UploadUrl
:
this
.
host2
.
indexOf
(
'mallApi'
)
!=-
1
?
"https://upload.oytour.com/Upload/AppUpload"
:
"http://192.168.20.214:8120/Upload/AppUpload"
,
ImageUrl
:
this
.
host2
.
indexOf
(
'mallApi'
)
!=-
1
?
"https://imgfile.oytour.com"
:
"http://192.168.20.214:8130"
,
}
}
Vue
.
prototype
.
request
=
function
(
param
,
success
,
failed
)
{
//网络请求
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment