Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
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
fbeb2c85
Commit
fbeb2c85
authored
Apr 03, 2020
by
xd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
专柜信息维护初测试完成
parent
1e373745
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
100 additions
and
74 deletions
+100
-74
voucher.js
wx_application/src/api/sidebar/voucher.js
+6
-6
index.js
wx_application/src/router/index.js
+2
-2
counterEdit.vue
wx_application/src/views/counter/counterEdit.vue
+59
-50
counterInfo.vue
wx_application/src/views/counter/counterInfo.vue
+33
-16
No files found.
wx_application/src/api/sidebar/voucher.js
View file @
fbeb2c85
...
...
@@ -13,14 +13,14 @@ export function editStore(data) {
return
requestCF
({
url
:
'/admin/auth/stall/settingOrUpdateStall'
,
method
:
'post'
,
data
data
:
qs
.
stringify
(
data
)
})
}
//
上传图片
export
function
uploadPic
(
data
)
{
//
获取门店详情
export
function
getStoreDetail
(
params
)
{
return
requestCF
({
url
:
'/admin/auth/
util/saveImg
'
,
method
:
'
pos
t'
,
data
url
:
'/admin/auth/
stall/getByOyStallCode
'
,
method
:
'
ge
t'
,
params
})
}
\ No newline at end of file
wx_application/src/router/index.js
View file @
fbeb2c85
...
...
@@ -3,7 +3,7 @@ import VueRouter from 'vue-router'
import
Home
from
'../views/home.vue'
import
{
getXToken
,
configWx
}
from
'@/utils/aCommon'
//
import mineRoute from './mine'
import
mineRoute
from
'./mine'
Vue
.
use
(
VueRouter
)
const
routes
=
[
...
...
@@ -157,7 +157,7 @@ const routes = [
name
:
'qrCode'
,
component
:
()
=>
import
(
'@/views/qrCode/index'
)
},
//
...mineRoute
...
mineRoute
// {
// path: '/about',
// name: 'about',
...
...
wx_application/src/views/counter/counterEdit.vue
View file @
fbeb2c85
...
...
@@ -5,7 +5,7 @@
<van-cell-group
class=
"gn"
>
<van-cell
title=
"专柜LOGO"
>
<template
slot=
"default"
>
<van-uploader
v-model=
"
addForm.
logoList"
:max-count=
"1"
class=
"input"
:after-read=
"afterRead"
:before-read=
"beforeRead"
@
delete=
"deleteLogo"
>
<van-uploader
v-model=
"logoList"
:max-count=
"1"
class=
"input"
:after-read=
"afterRead"
:before-read=
"beforeRead"
@
delete=
"deleteLogo"
>
<div>
<van-icon
name=
"photo"
size=
"20"
/>
</div>
...
...
@@ -38,8 +38,8 @@
</div>
<div
class=
"flex-start fwb"
>
<div
class=
"txt"
>
轮播图
</div>
<van-uploader
v-model=
"bannerList"
:max-count=
"4"
class=
"pic"
:before-read=
"beforeRead"
/>
<quill-editor
v-model=
"addForm.summary"
ref=
"myQuillEditor"
:options=
"editorOption"
@
change=
"onEditorChange($event)"
@
delete=
"deleteBanner"
></quill-editor>
<van-uploader
v-model=
"bannerList"
:max-count=
"4"
class=
"pic"
:before-read=
"beforeRead"
:after-read=
"afterAddBanner"
@
delete=
"deleteBanner"
/>
<quill-editor
v-model=
"addForm.summary"
ref=
"myQuillEditor"
:options=
"editorOption"
@
change=
"onEditorChange($event)"
></quill-editor>
</div>
</div>
...
...
@@ -48,15 +48,15 @@
</template>
<
script
>
import
{
quillEditor
,
Quill
}
from
"vue-quill-editor"
;
import
{
container
,
ImageExtend
,
QuillWatch
}
from
"quill-image-extend-module"
;
import
{
editStore
,
uploadPic
}
from
"@/api/sidebar/voucher"
;
import
"quill/dist/quill.core.css"
;
import
"quill/dist/quill.snow.css"
;
import
"quill/dist/quill.bubble.css"
;
Quill
.
register
(
"modules/ImageExtend"
,
ImageExtend
)
;
import
{
quillEditor
,
Quill
}
from
"vue-quill-editor"
import
{
container
,
ImageExtend
,
QuillWatch
}
from
"quill-image-extend-module"
import
{
editStore
,
getStoreDetail
}
from
"@/api/sidebar/voucher"
import
"quill/dist/quill.core.css"
import
"quill/dist/quill.snow.css"
import
"quill/dist/quill.bubble.css"
Quill
.
register
(
"modules/ImageExtend"
,
ImageExtend
)
import
axios
from
'axios'
import
{
log
}
from
'util'
;
import
{
log
}
from
'util'
const
toolbarOptions
=
[
[{
size
:
[
"small"
,
false
,
"large"
,
"huge"
]
}],
// 字体大小
[
"image"
]
// 图片
...
...
@@ -70,7 +70,6 @@ export default {
data
()
{
return
{
addForm
:
{
logoList
:
[],
logo
:
''
,
summaryTitle
:
''
,
name
:
''
,
...
...
@@ -81,6 +80,7 @@ export default {
list
:
[],
bannerList
:
[],
title
:
""
,
logoList
:
[],
// 富文本框参数设置
editorOption
:
{
modules
:
{
...
...
@@ -89,7 +89,7 @@ export default {
// size: 3,
action
:
"http://139.155.48.151:8084/admin/auth/util/saveImg"
,
response
:
res
=>
{
return
res
.
data
.
imgPath
;
return
res
.
data
.
imgPath
},
headers
:
xhr
=>
{
// xhr.setRequestHeader('Content-Type','multipart/form-data')
...
...
@@ -112,8 +112,30 @@ export default {
},
mounted
()
{
this
.
addForm
.
oyStallCode
=
sessionStorage
.
getItem
(
'oyStallCode'
)
console
.
log
(
this
.
addForm
.
oyStallCode
,
'编辑专柜信息oyStallCode'
);
this
.
getDetail
()
},
methods
:
{
getDetail
()
{
let
params
=
{
oyStallCode
:
this
.
addForm
.
oyStallCode
}
getStoreDetail
(
params
).
then
(
res
=>
{
if
(
res
.
data
.
stallInfo
!=
null
)
{
console
.
log
(
res
,
'详情'
)
this
.
list
=
res
.
data
.
carousel
let
obj
=
{}
obj
.
url
=
res
.
data
.
stallInfo
.
logo
this
.
logoList
.
push
(
obj
)
res
.
data
.
carousel
.
forEach
(
item
=>
{
let
obj2
=
{}
obj2
.
url
=
item
this
.
bannerList
.
push
(
obj2
)
})
this
.
addForm
=
res
.
data
.
stallInfo
}
})
},
change
(
val
)
{
console
.
log
(
val
)
},
...
...
@@ -129,51 +151,38 @@ export default {
},
async
afterRead
(
file
)
{
// this.addForm.logo = await this.getImgUrl(file.file)//使用上传的方法。file.file
this
.
addForm
.
logo
=
this
.
getImgUrl
(
file
.
file
)
this
.
addForm
.
logo
=
await
this
.
getImgUrl
(
file
.
file
)
console
.
log
(
this
.
addForm
.
logo
,
'this.addForm.logo'
);
},
// async getImgUrl(file) {
// let params = new FormData()
// 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
// console.log(urls,'urls')
// return urls
// },
getImgUrl
(
file
)
{
async
getImgUrl
(
file
)
{
let
params
=
new
FormData
()
params
.
append
(
'file'
,
file
)
uploadPic
(
params
).
then
(
res
=>
{
console
.
log
(
res
,
'文件'
);
return
res
.
data
.
imgPath
})
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
console
.
log
(
urls
,
'urls'
)
return
urls
},
async
afterAddBanner
(
file
)
{
let
img
=
await
this
.
getImgUrl
(
file
.
file
)
this
.
list
.
push
(
img
)
console
.
log
(
this
.
list
,
'list'
);
},
deleteBanner
(
file
,
index
)
{
this
.
list
.
splice
(
index
.
index
,
1
)
},
deleteLogo
(
file
)
{
this
.
addForm
.
logo
=
''
},
handleBannerList
()
{
let
list
=
[]
let
carousel
=
''
this
.
bannerList
.
forEach
(
item
=>
{
console
.
log
(
item
.
file
,
'item'
);
let
img
=
this
.
getImgUrl
(
item
.
file
)
console
.
log
(
img
,
'img'
)
list
.
push
(
img
)
carousel
=
list
.
toString
()
console
.
log
(
carousel
,
'carousel1'
);
return
carousel
})
},
handleSave
()
{
this
.
addForm
.
oyStallCode
=
1
const
carousel
=
this
.
handleBannerList
()
console
.
log
(
carousel
,
'carouse2'
)
// editStore(Object.assign(this.addForm,{ carousel })).then( res => {
// console.log(res,'res')
// })
},
deleteBanner
(
file
)
{
const
carousel
=
this
.
list
.
join
(
';'
)
delete
this
.
addForm
.
id
editStore
(
Object
.
assign
(
this
.
addForm
,{
carousel
})).
then
(
res
=>
{
if
(
res
.
result
==
'success'
)
{
this
.
$router
.
go
(
-
1
)
}
})
}
}
}
...
...
wx_application/src/views/counter/counterInfo.vue
View file @
fbeb2c85
<
template
>
<div
class=
"container"
>
<div
class=
"img"
>
<van-swipe
:autoplay=
"3000"
>
<van-swipe-item>
<img
src=
"../../../public/img/cswiper.png"
/>
</van-swipe-item>
<van-swipe-item>
<img
src=
"../../../public/img/cswiper.png"
/>
</van-swipe-item>
<van-swipe-item>
<img
src=
"../../../public/img/cswiper.png"
/>
<van-swipe
:autoplay=
"3000"
>
<van-swipe-item
v-for=
"(item,index) in carousel"
:key=
"index"
>
<img
:src=
"item"
/>
</van-swipe-item>
</van-swipe>
</div>
<div
class=
"list"
>
<div
class=
"left"
>
<img
src=
"../../../public/img/counter.png
"
alt=
""
/>
<img
:src=
"storeInfo.logo
"
alt=
""
/>
</div>
<div
class=
"right"
>
<h3>
欧亚一号专柜
</h3>
<p>
由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状。
</p>
<h3>
{{
storeInfo
.
name
}}
</h3>
<p>
{{
storeInfo
.
summaryTitle
}}
</p>
</div>
</div>
<van-cell-group
class=
"gn"
>
...
...
@@ -32,6 +26,7 @@
</
template
>
<
script
>
import
{
getStoreDetail
}
from
"@/api/sidebar/voucher"
;
import
{
quillEditor
}
from
"vue-quill-editor"
import
"quill/dist/quill.core.css"
import
"quill/dist/quill.snow.css"
...
...
@@ -39,13 +34,36 @@ import "quill/dist/quill.bubble.css"
export
default
{
data
()
{
return
{
oyStallCode
:
''
oyStallCode
:
''
,
storeInfo
:
{
logo
:
'./img/counter.png'
,
name
:
'only专柜'
,
summaryTitle
:
'ONLY是丹麦著名的国际时装公司BESTSELLER拥有的众多著名品牌之一'
,
},
carousel
:[
'./img/cswiper.png'
,
'./img/cswiper.png'
,
'./img/cswiper.png'
,
'./img/cswiper.png'
]
}
},
mounted
()
{
mounted
()
{
this
.
oyStallCode
=
sessionStorage
.
getItem
(
'oyStallCode'
)
console
.
log
(
this
.
oyStallCode
,
'专柜信息oyStallCode'
);
this
.
getAgentAuth
()
this
.
getDetail
()
},
methods
:
{
getDetail
()
{
let
params
=
{
oyStallCode
:
this
.
oyStallCode
}
getStoreDetail
(
params
).
then
(
res
=>
{
if
(
res
.
data
.
stallInfo
!=
null
)
{
console
.
log
(
res
,
'res'
);
this
.
carousel
=
res
.
data
.
carousel
this
.
storeInfo
=
res
.
data
.
stallInfo
}
})
},
handleEdit
()
{
this
.
$router
.
push
(
"counterEdit"
)
},
...
...
@@ -56,7 +74,6 @@ export default {
this
.
$router
.
push
(
"counterHome"
)
},
handlePushInfo
()
{
this
.
oyStallCode
=
sessionStorage
.
getItem
(
'oyStallCode'
)
let
url
=
`http://oysales.oywanhao.com:8087/counterPageHome?oyStallCode=
${
this
.
oyStallCode
}
`
wx
.
invoke
(
"shareToExternalContact"
,
{
title
:
'专柜首页'
,
// 消息的标题
...
...
@@ -97,7 +114,7 @@ export default {
.img
{
width
:
100%
;
height
:
200px
;
background-color
:
pink
;
background-color
:
#fff
;
}
.img
img
{
width
:
100%
;
...
...
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