Commit 5e944b9b authored by xd's avatar xd

专柜维护修改

parent 097c21d5
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
"jssdk": "^0.0.1", "jssdk": "^0.0.1",
"vant": "^2.5.9", "vant": "^2.5.9",
"vconsole": "^3.3.4", "vconsole": "^3.3.4",
"vee-validate": "^3.2.5", "vee-validate": "^2.0.0-rc.25",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-quill-editor": "^3.0.6", "vue-quill-editor": "^3.0.6",
"vue-router": "^3.1.6", "vue-router": "^3.1.6",
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>专柜首页</title> <title>专柜首页</title>
<link rel="stylesheet" href="../css/swiper.css" /> <link rel="stylesheet" href="../css/swiper.css" />
<link rel="stylesheet" href="../css/quill.snow.css" />
<link rel="stylesheet" href="../css/iconfont.css"> <link rel="stylesheet" href="../css/iconfont.css">
<script src="../js/jquery-3.4.1.min.js"></script> <script src="../js/jquery-3.4.1.min.js"></script>
<script src="../js/swiper.min.js" type="text/javascript" charset="utf-8"></script> <script src="../js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
...@@ -70,7 +71,7 @@ ...@@ -70,7 +71,7 @@
color: rgba(45, 71, 106, 0.8); color: rgba(45, 71, 106, 0.8);
} }
.fwb { .fwb {
width: 100%; /* width: 100%; */
padding: 30px !important; padding: 30px !important;
} }
</style> </style>
...@@ -98,11 +99,15 @@ ...@@ -98,11 +99,15 @@
</div> </div>
</div> </div>
</div> </div>
<div id="fwb" style="padding: 40px;" > <!-- <div class="ql-container ql-snow">
<div class="fwb ql-editor">
</div> </div>
</div> -->
<div id="fwb"></div>
</div> </div>
<script src="../js/quill.min.js"></script>
<script> <script>
var options = [];
// 获取店铺code // 获取店铺code
function GetQueryString(name) { function GetQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
...@@ -146,18 +151,19 @@ ...@@ -146,18 +151,19 @@
$("#logo").attr('src',info.logo) $("#logo").attr('src',info.logo)
let content = info.summary.replace(/<img/g,'<img style="width:100%;"') let content = info.summary.replace(/<img/g,'<img style="width:100%;"')
$("#address").text(info.location) $("#address").text(info.location)
$("#fwb").html(content) $("#phone").text(info.phone)
var html = content //这个是通过quill获取到的html
var quill = new Quill('#fwb', {
modules: {
toolbar: options
},
})
quill.container.firstChild.innerHTML = html
quill.enable(false)
} }
}) })
} }
/*鼠标移入停止轮播,鼠标离开 继续轮播*/
// $('.swiper-container').mouseenter(function () {
// swiper.stopAutoplay();
// }).mouseleave(function () {
// swiper.startAutoplay();
// })
</script> </script>
</body> </body>
......
This diff is collapsed.
wx_application/public/img/code.jpg

1.35 KB | W: | H:

wx_application/public/img/code.jpg

35.3 KB | W: | H:

wx_application/public/img/code.jpg
wx_application/public/img/code.jpg
wx_application/public/img/code.jpg
wx_application/public/img/code.jpg
  • 2-up
  • Swipe
  • Onion skin
import Quill from './core';
import { AlignClass, AlignStyle } from './formats/align';
import { DirectionAttribute, DirectionClass, DirectionStyle } from './formats/direction';
import { IndentClass as Indent } from './formats/indent';
import Blockquote from './formats/blockquote';
import Header from './formats/header';
import List, { ListItem } from './formats/list';
import { BackgroundClass, BackgroundStyle } from './formats/background';
import { ColorClass, ColorStyle } from './formats/color';
import { FontClass, FontStyle } from './formats/font';
import { SizeClass, SizeStyle } from './formats/size';
import Bold from './formats/bold';
import Italic from './formats/italic';
import Link from './formats/link';
import Script from './formats/script';
import Strike from './formats/strike';
import Underline from './formats/underline';
import Image from './formats/image';
import Video from './formats/video';
import CodeBlock, { Code as InlineCode } from './formats/code';
import Formula from './modules/formula';
import Syntax from './modules/syntax';
import Toolbar from './modules/toolbar';
import Icons from './ui/icons';
import Picker from './ui/picker';
import ColorPicker from './ui/color-picker';
import IconPicker from './ui/icon-picker';
import Tooltip from './ui/tooltip';
import BubbleTheme from './themes/bubble';
import SnowTheme from './themes/snow';
Quill.register({
'attributors/attribute/direction': DirectionAttribute,
'attributors/class/align': AlignClass,
'attributors/class/background': BackgroundClass,
'attributors/class/color': ColorClass,
'attributors/class/direction': DirectionClass,
'attributors/class/font': FontClass,
'attributors/class/size': SizeClass,
'attributors/style/align': AlignStyle,
'attributors/style/background': BackgroundStyle,
'attributors/style/color': ColorStyle,
'attributors/style/direction': DirectionStyle,
'attributors/style/font': FontStyle,
'attributors/style/size': SizeStyle
}, true);
Quill.register({
'formats/align': AlignClass,
'formats/direction': DirectionClass,
'formats/indent': Indent,
'formats/background': BackgroundStyle,
'formats/color': ColorStyle,
'formats/font': FontClass,
'formats/size': SizeClass,
'formats/blockquote': Blockquote,
'formats/code-block': CodeBlock,
'formats/header': Header,
'formats/list': List,
'formats/bold': Bold,
'formats/code': InlineCode,
'formats/italic': Italic,
'formats/link': Link,
'formats/script': Script,
'formats/strike': Strike,
'formats/underline': Underline,
'formats/image': Image,
'formats/video': Video,
'formats/list/item': ListItem,
'modules/formula': Formula,
'modules/syntax': Syntax,
'modules/toolbar': Toolbar,
'themes/bubble': BubbleTheme,
'themes/snow': SnowTheme,
'ui/icons': Icons,
'ui/picker': Picker,
'ui/icon-picker': IconPicker,
'ui/color-picker': ColorPicker,
'ui/tooltip': Tooltip
}, true);
export default Quill;
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -8,13 +8,55 @@ import Vant from 'vant'; ...@@ -8,13 +8,55 @@ import Vant from 'vant';
import { Toast } from 'vant'; import { Toast } from 'vant';
import 'vant/lib/index.css'; import 'vant/lib/index.css';
import vConsole from 'vconsole' import vConsole from 'vconsole'
import VeeValidate, { Validator } from 'vee-validate'
import cn from 'vee-validate/dist/locale/zh_CN';
Validator.addLocale(cn)
Vue.use(VeeValidate, {
locale: 'zh_CN'
})
const dictionary = {
zh_CN: {
messages: {
required: (val) => {
let msg = ''
switch (val) {
case 'logo':
msg = 'logo'
break
case 'name':
msg = '专柜名称'
break
case 'location':
msg = '专柜地址'
break
case 'number':
msg = '电话号码'
break
case 'summaryTitle':
msg = '摘要信息'
break
case 'summary':
msg = '正文内容'
break
case 'banner':
msg = '轮播图'
break
default:;
}
msg = msg + '不能为空'
return msg
}
}
}
}
Validator.updateDictionary(dictionary)
Vue.prototype.$vConsole= new vConsole() Vue.prototype.$vConsole= new vConsole()
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.use(Vant)
Vue.use(Vant); Vue.use(Toast)
Vue.use(Toast);
const originalPush = Router.prototype.push const originalPush = Router.prototype.push
Router.prototype.push = function push(location) { Router.prototype.push = function push(location) {
......
...@@ -106,6 +106,7 @@ export default { ...@@ -106,6 +106,7 @@ export default {
} }
.left img { .left img {
width: 100%; width: 100%;
height: 80px;
} }
.right { .right {
width: 76%; width: 76%;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="flex-start top" > <div class="flex-start top" >
<div class="flex-start"> <div class="flex-start">
<van-cell-group class="gn"> <van-cell-group class="gn">
<van-cell title="专柜LOGO" > <van-cell title="专柜LOGO" class="logo" >
<template slot="default"> <template slot="default">
<van-uploader v-model="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> <div>
...@@ -149,7 +149,7 @@ export default { ...@@ -149,7 +149,7 @@ export default {
}, },
beforeRead (file) { //上传之前校验 beforeRead (file) { //上传之前校验
if (file.type !== 'image/jpeg' && file.type !== 'image/png') { if (file.type !== 'image/jpeg' && file.type !== 'image/png') {
Toast('只允许上传jpg/png格式的图片!') this.$toast("只允许上传img或png格式的图片")
return false return false
} }
return true return true
...@@ -182,7 +182,32 @@ export default { ...@@ -182,7 +182,32 @@ export default {
}, },
handleSave() { handleSave() {
const carousel = this.list.join(';') const carousel = this.list.join(';')
// this.addForm.oyStallCode = 1
delete this.addForm.id delete this.addForm.id
if(!this.addForm.logo){
this.$toast("请上传logo")
return false
}
if(!this.addForm.name){
this.$toast("请输入专柜名称")
return false
}
if(!this.addForm.location){
this.$toast("请输入专柜地址")
return false
}
if(!this.addForm.phone){
this.$toast("请输入电话号码")
return false
}
if(!this.addForm.summaryTitle){
this.$toast("请输入摘要信息")
return false
}
if(!this.addForm.summary){
this.$toast("请输入正文")
return false
}
editStore(Object.assign(this.addForm,{ carousel })).then( res => { editStore(Object.assign(this.addForm,{ carousel })).then( res => {
if(res.result == 'success') { if(res.result == 'success') {
this.$router.go(-1) this.$router.go(-1)
...@@ -195,6 +220,9 @@ export default { ...@@ -195,6 +220,9 @@ export default {
<style > <style >
</style> </style>
<style scoped> <style scoped>
.logo >>> .van-cell__value {
padding: 10px 0 0 0;
}
.pic { .pic {
border-bottom: 2px solid #ebedf0; border-bottom: 2px solid #ebedf0;
} }
...@@ -276,7 +304,6 @@ export default { ...@@ -276,7 +304,6 @@ export default {
color: rgba(45, 71, 106, 1); color: rgba(45, 71, 106, 1);
} }
.gn { .gn {
margin-top: 12px;
width: 100%; width: 100%;
padding-bottom: 12px; padding-bottom: 12px;
} }
......
...@@ -2,46 +2,64 @@ ...@@ -2,46 +2,64 @@
<div class="container"> <div class="container">
<div class="flex-start"> <div class="flex-start">
<div class="img"> <div class="img">
<van-swipe :autoplay="3000"> <van-swipe :autoplay="3000" >
<van-swipe-item> <van-swipe-item v-for="(item,index) in carousel" :key="index">
<img src="../../../public/img/cswiper.png" /> <img :src="item" />
</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-item>
<van-swipe-item>
<img src="../../../public/img/cswiper.png" />
</van-swipe-item> </van-swipe-item>
</van-swipe> </van-swipe>
</div> </div>
<div class="list"> <div class="list">
<div class="left flex"> <div class="left">
<img src="../../../public/img/counter.png" alt="" /> <img :src="storeInfo.logo" alt="" />
</div> </div>
<div class="right"> <div class="right">
<h3>欧亚一号专柜</h3> <h3>{{storeInfo.name}}</h3>
<div class="txt"> <p>{{storeInfo.summaryTitle}}</p>
<van-icon name="phone-o" size="16" style="vertical-align: middle;" />
<span>18888888888</span>
</div>
<div class="txt">
<van-icon name="location-o" size="16" style="vertical-align: middle;" />
<span>欧亚商场一楼181号</span>
</div> </div>
</div> </div>
<!-- <div class="ql-container ql-snow">
<div class="ql-editor fwb" v-html="storeInfo.summary">
</div> </div>
</div> -->
<div v-html="storeInfo.summary" class="fwb ql-editor"></div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import axios from "axios"
import { getStoreDetail } from "@/api/sidebar/voucher";
export default { export default {
data() { data() {
return { return {
oyStallCode: '',
storeInfo: {
logo: './img/counter.png',
name: 'only专柜',
summaryTitle: 'ONLY是丹麦著名的国际时装公司BESTSELLER拥有的众多著名品牌之一',
summary: '<p>ONLY在1996年来到中国,1996年9月28日,品牌诞生之初便富有远见地来到中国</p>'
},
carousel:['./img/cswiper.png','./img/cswiper.png','./img/cswiper.png','./img/cswiper.png']
}
},
mounted() {
this.oyStallCode = sessionStorage.getItem('oyStallCode')
this.getStore()
},
methods: {
// 获取店铺信息
getStore() {
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
}
})
} }
} }
} }
...@@ -60,42 +78,64 @@ export default { ...@@ -60,42 +78,64 @@ export default {
.img { .img {
width: 100%; width: 100%;
height: 200px; height: 200px;
/* background-color: pink; */ background-color: #fff;
} }
.img img { .img img {
width: 100%; width: 100%;
height: 200px;
}
.img >>> .van-swipe {
height: 200px;
} }
.list { .list {
height: auto; height: 80px;
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
display: flex; display: flex;
justify-content: flex-start; justify-content: space-between;
border-bottom: 1px solid rgba(238, 238, 238, 1); border-bottom: 1px solid rgba(238, 238, 238, 1);
box-shadow: 0px 2px 4px 0px rgba(221, 221, 221, 1); box-shadow: 0px 2px 4px 0px rgba(221, 221, 221, 1);
border-radius: 2px; border-radius: 2px;
z-index: 100; z-index: 100;
} }
.list3 {
border-bottom: none;
margin-bottom: 0;
}
.left,
.right {
height: 80px;
}
.left { .left {
width: 30%; width: 30%;
display: flex;
justify-content: center;
} }
.left img { .left img {
width: 80px; height: 80px;
} }
.right { .right {
width: 76%; width: 70%;
padding: 10px; padding: 16px 0 0 10px;
background-color: #fff; background-color: #fff;
height: auto;
} }
h3 { h3 {
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
color: rgba(45, 71, 106, 1); color: rgba(45, 71, 106, 1);
} }
.txt { p {
margin-top: 10px; margin-top: 10px;
font-size: 12px; font-size: 12px;
color: rgba(45, 71, 106, 0.8); color: rgba(45, 71, 106, 0.8);
} }
.fwb {
padding:30px;
}
.fwb >>> p {
font-size: 14px;
}
.fwb >>> img {
width: 100%;
}
</style> </style>
...@@ -131,6 +131,10 @@ export default { ...@@ -131,6 +131,10 @@ export default {
} }
.img img { .img img {
width: 100%; width: 100%;
height: 200px;
}
.img >>> .van-swipe {
height: 200px;
} }
.list { .list {
height: 80px; height: 80px;
...@@ -152,20 +156,18 @@ export default { ...@@ -152,20 +156,18 @@ export default {
height: 80px; height: 80px;
} }
.left { .left {
width: 80px; width: 30%;
background: rgba(248, 248, 248, 1); display: flex;
position: absolute; justify-content: center;
top: 188px;
left: 10px;
} }
.left img { .left img {
width: 100%; width: 80px;
} }
.right { .right {
width: 76%; width: 70%;
padding: 10px; padding: 16px 0 0 10px;
background-color: #fff; background-color: #fff;
margin-left: 94px;
} }
h3 { h3 {
font-size: 14px; font-size: 14px;
......
...@@ -198,9 +198,9 @@ export default { ...@@ -198,9 +198,9 @@ export default {
}, },
created() { created() {
this.checkNowMenuBar() this.checkNowMenuBar()
this.getUserInfo()
this.oyStallCode = sessionStorage.getItem('oyStallCode') this.oyStallCode = sessionStorage.getItem('oyStallCode')
this.userId = sessionStorage.getItem('userId') this.userId = sessionStorage.getItem('userId')
this.getUserInfo()
this.getStore() this.getStore()
this.getFans() this.getFans()
}, },
...@@ -213,7 +213,7 @@ export default { ...@@ -213,7 +213,7 @@ export default {
}; };
axios({ axios({
url: "http://139.155.48.151:8085/workWx/auth/user/get?userId=" +this.userId, url: "http://139.155.48.151:8085/workWx/auth/user/get?userId=" + this.userId,
method: "get", method: "get",
headers: headerData headers: headerData
}) })
...@@ -222,7 +222,7 @@ export default { ...@@ -222,7 +222,7 @@ export default {
this.test.manInfo.logoUrl = res.data.data.avatar this.test.manInfo.logoUrl = res.data.data.avatar
}) })
.catch(err => { .catch(err => {
console.log(err); console.log(err)
}); });
}, },
getFans() { getFans() {
......
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
</div> </div>
</div> </div>
<div class="lists"> <div class="lists">
<div class="list"> <!-- <div class="list">
<div class="list-title">我的客户</div> <div class="list-title">我的客户</div>
<img class="list-icon" :src="cache.icon.arrowRightDark" /> <img class="list-icon" :src="cache.icon.arrowRightDark" />
</div> </div> -->
<div class="list" @click="listTaskClick"> <div class="list" @click="listTaskClick">
<div class="list-title">任务列表</div> <div class="list-title">任务列表</div>
<img class="list-icon" :src="cache.icon.arrowRightDark" /> <img class="list-icon" :src="cache.icon.arrowRightDark" />
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
}, },
mounted() { mounted() {
this.checkNowMenuBar() this.checkNowMenuBar()
// this.zReadyUserId() this.zReadyUserId()
this.zTestGetNowUrlInfo() this.zTestGetNowUrlInfo()
}, },
......
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