Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
ybf
Project
Project
Details
Activity
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
xulili
ybf
Commits
02f5c0ea
Commit
02f5c0ea
authored
Apr 13, 2020
by
xd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面轮播图 以及修改轮播图多图上传测试
parent
9224f37c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
28 deletions
+54
-28
index.html
wx_application/public/counterPageHome/index.html
+8
-8
counterEdit.vue
wx_application/src/views/counter/counterEdit.vue
+42
-16
index.vue
wx_application/src/views/mainSale/active/main/index.vue
+4
-4
No files found.
wx_application/public/counterPageHome/index.html
View file @
02f5c0ea
...
@@ -126,6 +126,8 @@
...
@@ -126,6 +126,8 @@
pagination
:
{
pagination
:
{
el
:
'.swiper-pagination'
,
el
:
'.swiper-pagination'
,
},
},
observer
:
true
,
observeParents
:
true
})
})
$
(
function
()
{
$
(
function
()
{
showQRInfo
()
showQRInfo
()
...
@@ -134,19 +136,17 @@
...
@@ -134,19 +136,17 @@
$
.
ajax
({
$
.
ajax
({
type
:
'GET'
,
type
:
'GET'
,
url
:
`http://139.155.48.151:8084/admin/auth/stall/getByOyStallCode?oyStallCode=
${
oyStallCode
}
`
,
url
:
`http://139.155.48.151:8084/admin/auth/stall/getByOyStallCode?oyStallCode=
${
oyStallCode
}
`
,
// url: `http://139.155.48.151:8084/admin/auth/stall/getByOyStallCode?oyStallCode=1`,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
console
.
log
(
data
,
'data'
)
console
.
log
(
data
,
'data'
)
var
str
=
""
;
var
str
=
""
;
for
(
i
=
0
;
i
<
data
.
data
.
carousel
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
data
.
data
.
carousel
.
length
;
i
++
)
{
var
_data
=
data
.
data
.
carousel
[
i
]
var
_data
=
data
.
data
.
carousel
[
i
]
str
+=
'<div class="swiper-slide"><img src="'
+
_data
+
'" alt=""></div>'
str
+=
'<div class="swiper-slide"><img src="'
+
_data
+
'" alt=""></div>'
}
}
$
(
"#slider"
).
append
(
str
)
$
(
"#slider"
).
append
(
str
)
var
mySwiper
=
new
Swiper
(
'.swiper-container'
,
{
let
r1
=
document
.
getElementById
(
'slider'
).
innerHTML
loop
:
true
,
let
r
=
document
.
getElementById
(
'slider'
).
innerHTML
autoplay
:
true
,
pagination
:
'.swiper-pagination'
,
})
let
info
=
data
.
data
.
stallInfo
let
info
=
data
.
data
.
stallInfo
$
(
"#logo"
).
attr
(
'src'
,
info
.
logo
)
$
(
"#logo"
).
attr
(
'src'
,
info
.
logo
)
$
(
".title"
).
text
(
info
.
name
)
$
(
".title"
).
text
(
info
.
name
)
...
...
wx_application/src/views/counter/counterEdit.vue
View file @
02f5c0ea
...
@@ -57,6 +57,7 @@
...
@@ -57,6 +57,7 @@
:before-read=
"beforeRead"
:before-read=
"beforeRead"
:after-read=
"afterAddBanner"
:after-read=
"afterAddBanner"
@
delete=
"deleteBanner"
@
delete=
"deleteBanner"
multiple=
"true"
/>
/>
<quill-editor
<quill-editor
v-model=
"addForm.summary"
v-model=
"addForm.summary"
...
@@ -170,11 +171,25 @@ export default {
...
@@ -170,11 +171,25 @@ export default {
this
.
$emit
(
"input"
,
this
.
addForm
.
summary
);
this
.
$emit
(
"input"
,
this
.
addForm
.
summary
);
},
},
beforeRead
(
file
)
{
beforeRead
(
file
)
{
//上传之前校验
if
(
file
.
type
)
{
if
(
file
.
type
!==
"image/jpeg"
&&
file
.
type
!==
"image/png"
)
{
if
(
file
.
type
!==
"image/jpeg"
&&
file
.
type
!==
"image/png"
)
{
this
.
$toast
(
"只允许上传jpg/png格式的图片!"
)
this
.
$toast
(
"只允许上传jpg/png格式的图片!"
)
return
false
;
return
false
;
}
}
else
{
console
.
log
(
222
);
file
.
forEach
(
item
=>
{
if
(
item
.
type
!==
"image/jpeg"
&&
item
.
type
!==
"image/png"
)
{
this
.
$toast
(
"只允许上传jpg/png格式的图片!"
)
}
})
// console.log(file,'file');
// console.log(file.type,'file.type');
}
}
//上传之前校验
return
true
;
return
true
;
},
},
async
afterRead
(
file
)
{
async
afterRead
(
file
)
{
...
@@ -183,18 +198,27 @@ export default {
...
@@ -183,18 +198,27 @@ export default {
console
.
log
(
this
.
addForm
.
logo
,
"this.addForm.logo"
);
console
.
log
(
this
.
addForm
.
logo
,
"this.addForm.logo"
);
},
},
async
getImgUrl
(
file
)
{
async
getImgUrl
(
file
)
{
let
params
=
new
FormData
();
params
.
append
(
"file"
,
file
);
let
url
=
"http://139.155.48.151:8084/admin/auth/util/saveImg"
;
let
params
=
new
FormData
()
const
img
=
await
axios
.
post
(
url
,
params
);
params
.
append
(
"file"
,
file
)
let
url
=
"http://139.155.48.151:8084/admin/auth/util/saveImg"
const
img
=
await
axios
.
post
(
url
,
params
)
let
urls
=
img
.
data
.
data
.
imgPath
;
let
urls
=
img
.
data
.
data
.
imgPath
;
console
.
log
(
urls
,
"urls"
);
console
.
log
(
urls
,
"urls"
);
return
urls
;
return
urls
;
},
},
async
afterAddBanner
(
file
)
{
async
afterAddBanner
(
file
)
{
let
img
=
await
this
.
getImgUrl
(
file
.
file
);
if
(
file
.
file
)
{
this
.
list
.
push
(
img
);
let
img
=
await
this
.
getImgUrl
(
file
.
file
);
console
.
log
(
this
.
list
,
"list"
);
this
.
list
.
push
(
img
);
}
else
{
file
.
forEach
(
async
item
=>
{
let
imgs
=
await
this
.
getImgUrl
(
item
.
file
)
this
.
list
.
push
(
imgs
);
console
.
log
(
this
.
list
,
'list1'
)
})
}
},
},
deleteBanner
(
file
,
index
)
{
deleteBanner
(
file
,
index
)
{
this
.
list
.
splice
(
index
.
index
,
1
);
this
.
list
.
splice
(
index
.
index
,
1
);
...
@@ -230,11 +254,13 @@ export default {
...
@@ -230,11 +254,13 @@ export default {
this
.
$toast
(
"请输入正文"
)
this
.
$toast
(
"请输入正文"
)
return
false
return
false
}
}
editStore
(
Object
.
assign
(
this
.
addForm
,{
carousel
})).
then
(
res
=>
{
console
.
log
(
Object
.
assign
(
this
.
addForm
,{
carousel
}),
'11'
);
if
(
res
.
result
==
'success'
)
{
this
.
$router
.
go
(
-
1
)
editStore
(
Object
.
assign
(
this
.
addForm
,{
carousel
})).
then
(
res
=>
{
}
if
(
res
.
result
==
'success'
)
{
})
this
.
$router
.
go
(
-
1
)
}
})
}
}
}
}
};
};
...
...
wx_application/src/views/mainSale/active/main/index.vue
View file @
02f5c0ea
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<img
class=
"logos-logo"
:src=
"test.manInfo.logoUrl"
/>
<img
class=
"logos-logo"
:src=
"test.manInfo.logoUrl"
/>
</div>
</div>
<div
class=
"manInfo-name"
@
click=
"manInfoClick"
>
我的专柜:
{{
test
.
manInfo
.
barName
}}
</div>
<div
class=
"manInfo-name"
@
click=
"manInfoClick"
>
我的专柜:
{{
test
.
manInfo
.
barName
}}
</div>
<div
class=
"manInfo-switch"
@
click=
"switchBarClick"
>
<div
class=
"manInfo-switch"
@
click=
"switchBarClick"
v-if=
"flag == 1"
>
<div
class=
"switch-text"
>
切换
</div>
<div
class=
"switch-text"
>
切换
</div>
<img
class=
"switch-icon"
:src=
"test.manInfo.icon['1']"
/>
<img
class=
"switch-icon"
:src=
"test.manInfo.icon['1']"
/>
</div>
</div>
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<img
class=
"menu-logo"
:src=
"test.menuInfo.icon['2']"
/>
<img
class=
"menu-logo"
:src=
"test.menuInfo.icon['2']"
/>
<div
class=
"menu-text"
>
任务列表
</div>
<div
class=
"menu-text"
>
任务列表
</div>
</div>
</div>
<div
class=
"menu"
@
click=
"menu05Click"
v-if=
"flag == 1"
>
<div
class=
"menu
margin1
"
@
click=
"menu05Click"
v-if=
"flag == 1"
>
<img
class=
"menu-logo"
:src=
"test.menuInfo.icon['5']"
/>
<img
class=
"menu-logo"
:src=
"test.menuInfo.icon['5']"
/>
<div
class=
"menu-text"
>
活动模版
</div>
<div
class=
"menu-text"
>
活动模版
</div>
</div>
</div>
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
<img
class=
"menu-logo"
:src=
"test.menuInfo.icon['4']"
/>
<img
class=
"menu-logo"
:src=
"test.menuInfo.icon['4']"
/>
<div
class=
"menu-text"
>
专柜维护
</div>
<div
class=
"menu-text"
>
专柜维护
</div>
</div>
</div>
<div
class=
"menu"
@
click=
"handleCoupon"
v-if=
"flag == 1"
>
<div
class=
"menu
margin2
"
@
click=
"handleCoupon"
v-if=
"flag == 1"
>
<img
class=
"menu-logo"
:src=
"test.menuInfo.icon['1']"
/>
<img
class=
"menu-logo"
:src=
"test.menuInfo.icon['1']"
/>
<div
class=
"menu-text"
>
优惠券管理
</div>
<div
class=
"menu-text"
>
优惠券管理
</div>
</div>
</div>
...
@@ -218,7 +218,7 @@ export default {
...
@@ -218,7 +218,7 @@ export default {
userInfoResOld
:
""
,
userInfoResOld
:
""
,
userInfoResNew
:
""
userInfoResNew
:
""
},
},
flag
:
1
flag
:
2
};
};
},
},
created
()
{
created
()
{
...
...
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