Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
Harvey
/
ydu-lottery-shop-app
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit caede46a
由
Harvey
编写于
2022-04-21 15:18:41 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
adv
1 个父辈
635e8297
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
287 行增加
和
21 行删除
src/components/chooseImage/chooseImage.vue
src/pages.json
src/pages/center/adv.vue
src/pages/center/index.vue
src/components/chooseImage/chooseImage.vue
0 → 100644
查看文件 @
caede46
<
template
>
<view
class=
"submitGamePicture"
>
<template
v-for=
"(item,index) in tempFileList"
>
<view
class=
"submitGamePicture-item"
:key=
"item.path"
>
<image
:src=
"item.path"
class=
"submitGamePicture-icon"
></image>
<uni-icons
type=
"closeempty"
class=
"submitGamePicture-delete"
color=
"#ffffff"
@
click=
"deleteImgHandle(index)"
></uni-icons>
</view>
</
template
>
<view
v-if=
"tempFileList.length<limit"
class=
"submitGamePicture-btn"
@
click=
"chooseImageHandle"
>
<uni-icons
type=
"plusempty"
size=
"30"
></uni-icons>
<text
style=
"padding-top: 2px;"
>
添加图片
</text>
</view>
</view>
</template>
<
script
>
export
default
{
name
:
"chooseImage"
,
props
:
{
limit
:
{
type
:
String
,
default
:
'9'
},
FileList
:
{
type
:
Array
,
default
:
()
=>
{
return
[]
}
}
},
data
()
{
return
{
tempFileList
:
[],
//选择图片临时存储
};
},
mounted
()
{
this
.
tempFileList
=
this
.
FileList
;
},
methods
:
{
//上传图片
chooseImageHandle
()
{
console
.
log
(
"[上传图片]"
)
let
that
=
this
;
let
limit
=
parseInt
(
this
.
limit
);
uni
.
chooseImage
({
count
:
limit
,
//默认9
sizeType
:
[
'original'
,
'compressed'
],
//可以指定是原图还是压缩图,默认二者都有
sourceType
:
[
'album'
],
//从相册选择
success
:
function
(
res
)
{
console
.
log
(
res
)
let
tempFiles
=
res
.
tempFiles
;
tempFiles
.
forEach
(
function
(
item
,
index
)
{
let
filePath
=
item
.
path
;
let
filename
=
filePath
.
substr
(
filePath
.
lastIndexOf
(
'/'
)
+
1
);
that
.
tempFileList
.
push
({
name
:
filename
,
path
:
filePath
})
})
}
})
},
//删除图片
deleteImgHandle
(
currentIndex
)
{
const
temp
=
this
.
tempFileList
.
splice
(
currentIndex
,
1
);
},
}
}
</
script
>
<
style
scoped
>
.submitGamePicture
{
display
:
flex
;
flex-direction
:
row
;
flex-wrap
:
wrap
;
margin-top
:
2px
;
}
.submitGamePicture-item
{
width
:
70px
;
height
:
70px
;
margin-right
:
9.5px
;
margin-top
:
9.5px
;
display
:
flex
;
background-color
:
#FFFFFF
;
position
:
relative
;
}
.submitGamePicture-icon
{
border
:
1px
solid
#70737F
;
border-radius
:
8px
;
width
:
100%
;
height
:
100%
;
display
:
block
;
}
.submitGamePicture-delete
{
position
:
absolute
;
top
:
-5px
;
right
:
-5px
;
background-color
:
#ff0000
;
border-radius
:
10px
;
}
.submitGamePicture-btn
{
border
:
1px
dashed
#70737F
;
border-radius
:
8px
;
width
:
70px
;
height
:
70px
;
margin-right
:
9.5px
;
margin-top
:
9.5px
;
display
:
flex
;
flex-direction
:
column
;
font-size
:
13px
;
font-family
:
Source
Han
Sans
CN
;
font-weight
:
400
;
color
:
#999999
;
justify-content
:
center
;
align-items
:
center
;
}
</
style
>
src/pages.json
查看文件 @
caede46
...
...
@@ -8,14 +8,34 @@
"navigationStyle"
:
"custom"
}
},
{
"path"
:
"pages/center/index"
,
"aliasPath"
:
"/center"
,
"name"
:
"center"
,
"style"
:
{
"navigationBarTitleText"
:
"用户中心"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#F1F1F1"
}
},
{
"path"
:
"pages/center/adv"
,
"aliasPath"
:
"/center/adv"
,
"name"
:
"center"
,
"style"
:
{
"navigationBarTitleText"
:
"宣传设置"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#F1F1F1"
}
},
{
"path"
:
"pages/center/index"
,
"aliasPath"
:
"/center"
,
"name"
:
"center"
,
"path"
:
"pages/auth/login"
,
"aliasPath"
:
"/login"
,
"name"
:
"login"
,
"desc"
:
"登录页"
,
"style"
:
{
"navigationBarTitleText"
:
"用户中心"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#F1F1F1"
"navigationBarTitleText"
:
"登录/注册"
,
"navigationStyle"
:
"default"
}
},
{
...
...
@@ -34,15 +54,6 @@
"style"
:
{
"navigationStyle"
:
"default"
}
},
{
"path"
:
"pages/auth/login"
,
"aliasPath"
:
"/login"
,
"name"
:
"login"
,
"desc"
:
"登录页"
,
"style"
:
{
"navigationBarTitleText"
:
"登录/注册"
,
"navigationStyle"
:
"default"
}
}
],
"globalStyle"
:
{
...
...
src/pages/center/adv.vue
0 → 100644
查看文件 @
caede46
<
template
>
<view
class=
"panel"
>
<view
class=
"panel-item panel-item-bottom"
>
<text
class=
"panel-text"
>
彩店类型
</text>
</view>
<view
class=
"panel-item"
>
<view
class=
"panel-text"
>
海报显示名称水印
</view>
<switch
class=
"switch"
:checked=
"true"
color=
"#1A9BFC"
/>
</view>
<view
class=
"panel-txt"
>
<input
type=
"text"
class=
"panel-txt-txt"
placeholder=
"彩店名称"
/>
</view>
<view
class=
"panel-item-bottom panel-top"
></view>
<view
class=
"panel-item"
>
<text
class=
"panel-text"
>
海报显示店主二维码
</text>
<!--
<liSwitch
:checked=
"true"
width=
"90"
bg=
"#1A9BFC"
/>
-->
<switch
class=
"switch"
:checked=
"true"
color=
"#1A9BFC"
/>
</view>
<view
class=
"panel-img"
>
<imgUpload
/>
</view>
<button
type=
"default"
class=
"btn"
@
click=
"subimit"
>
提交
</button>
</view>
</
template
>
<
script
>
import
imgUpload
from
'@/components/chooseImage/chooseImage.vue'
export
default
{
components
:{
imgUpload
},
data
()
{
return
{
}
},
methods
:
{
subimit
(){
}
}
}
</
script
>
<
style
>
.panel
{
font-size
:
14px
;
}
.panel-item
{
padding
:
12px
20px
;
display
:
flex
;
justify-content
:
space-between
;
background-color
:
#FFFFFF
;
}
.panel-top
{
margin-top
:
15px
;
}
.panel-item-bottom
{
border-bottom
:
solid
1px
#F5F5F5
;
}
.panel-text
{
color
:
#000
;
word-wrap
:
break-word
;
line-height
:
30px
;
height
:
30px
;
text-align
:
center
;
}
.panel-txt
{
width
:
calc
(
100vw
-
40px
);
margin
:
5px
20px
;
background-color
:
#F5F5F5
;
}
.panel-txt-txt
{
margin
:
0
20px
;
color
:
#8c8c8c8
c
;
background-color
:
#F5F5F5
;
height
:
38px
;
}
.switch
{
transform
:
scale
(
0.7
,
0.7
);
}
.panel-img
{
height
:
90px
;
padding
:
0px
20px
;
}
.btn
{
height
:
44px
;
margin-top
:
15px
;
background-color
:
#D23338
;
color
:
#FFFFFF
;
}
</
style
>
src/pages/center/index.vue
查看文件 @
caede46
...
...
@@ -9,9 +9,9 @@
</view>
</view>
<view
class=
"panel"
v-for=
"(list,i1) in navList"
:class=
"
{'panel-top':i1>0}" :key="i1">
<view
v-for=
"(item,i2) in list"
class=
"panel-item"
:class=
"
{'panel-item-bottom':i2
<list
.
length-1
}"
:
key=
"i2
"
>
<text
class=
"panel-text"
>
{{
item
}}
</text>
<view
v-for=
"(item,i2) in list"
class=
"panel-item"
:class=
"
{'panel-item-bottom':i2
<list
.
length-1
}"
:key=
"i2"
:
data-to=
"item.to"
@
click=
"menuNavTo
"
>
<text
class=
"panel-text"
>
{{
item
.
name
}}
</text>
<uni-icons
type=
"forward"
size=
"14"
color=
"#d2d2d2"
></uni-icons>
</view>
</view>
...
...
@@ -24,8 +24,26 @@
data
()
{
return
{
navList
:
[
[
'宣传设置'
,
'添加子账号'
,
'分享给好友'
],
[
'联系客服'
,
'提建议'
,
'缓存清理'
]
[{
name
:
'宣传设置'
,
to
:
'/center/adv'
},
{
name
:
'添加子账号'
,
to
:
''
},
{
name
:
'分享给好友'
,
to
:
''
}],
[{
name
:
'联系客服'
,
to
:
''
},
{
name
:
'提建议'
,
to
:
''
},
{
name
:
'缓存清理'
,
to
:
''
}]
],
data
:
{
addr
:
'未登记彩店'
...
...
@@ -42,7 +60,14 @@
this
.
data
.
addr
=
data
.
addr
},
methods
:
{
menuNavTo
(
e
)
{
const
url
=
e
.
target
.
dataset
.
to
console
.
log
(
url
)
if
(
!
url
)
return
uni
.
navigateTo
({
url
})
}
}
}
</
script
>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论