Commit 9b0dbe03 authored by xd's avatar xd

新增页面

parent c51bb914
...@@ -71,4 +71,10 @@ input:focus{ outline: none;} ...@@ -71,4 +71,10 @@ input:focus{ outline: none;}
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-direction: column;
}
.contain {
width: 100%;
display: flex;
justify-content: space-between;
} }
\ No newline at end of file
...@@ -9,7 +9,7 @@ import { Toast } from 'vant'; ...@@ -9,7 +9,7 @@ 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 VeeValidate, { Validator } from 'vee-validate'
import cn from 'vee-validate/dist/locale/zh_CN'; // import cn from 'vee-validate/dist/locale/zh_CN';
// Validator.addLocale(cn) // Validator.addLocale(cn)
// Vue.use(VeeValidate, { // Vue.use(VeeValidate, {
......
...@@ -161,6 +161,11 @@ const routes = [ ...@@ -161,6 +161,11 @@ const routes = [
path: '/qrCode', path: '/qrCode',
name: 'qrCode', name: 'qrCode',
component: () => import('@/views/qrCode/index') component: () => import('@/views/qrCode/index')
},
{
path: '/noSet',
name: 'noSet',
component: () => import('@/views/counter/noSet')
}, },
...mineRoute ...mineRoute
// { // {
......
...@@ -43,10 +43,16 @@ export default { ...@@ -43,10 +43,16 @@ export default {
console.log(res.data); console.log(res.data);
this.list = res.data this.list = res.data
}) })
}, },
handleStoreChange(val) { handleStoreChange(val) {
sessionStorage.setItem('oyStallCode',val) sessionStorage.setItem('oyStallCode',val)
let obj = this.list.find(function (obj) {
return obj.oyStallCode == val;//取出this.studentL里的id为1的那条数据所有的信息
})
console.log(obj,'obj')
sessionStorage.setItem("barFrom", obj.name)
} }
} }
}; };
......
...@@ -170,7 +170,7 @@ export default { ...@@ -170,7 +170,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("只允许上传jpg/png格式的图片!")
return false; return false;
} }
return true; return true;
......
...@@ -69,15 +69,11 @@ export default { ...@@ -69,15 +69,11 @@ export default {
this.$router.push("counterEdit") this.$router.push("counterEdit")
}, },
getChargeCode() { getChargeCode() {
if(this.info == 1) {
this.$router.push('pushStoreInfo')
}else {
this.$router.push("chargeCode") this.$router.push("chargeCode")
}
}, },
handleCounterHome() { handleCounterHome() {
if(this.info == 1) { if(this.info == 1) {
this.$router.push('pushStoreInfo') this.$router.push('noSet')
}else { }else {
this.$router.push("counterHome") this.$router.push("counterHome")
} }
......
<template>
<div class="contain">
<div>
<div style="text-align:center;margin-top: 50%;">
<div class="circle"></div>
</div>
<h6>专柜未配置</h6>
<p>当前专柜未配置任何信息,请尽快完成配置</p>
<van-button class="back" plain type="info" size="large" @click="handleBack">返回</van-button>
</div>
</div>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
handleBack() {
this.$router.push('counterInfo')
}
}
}
</script>
<style scoped>
.circle {
display: inline-block;
width: 100px;
height: 100px;
border-radius: 100%;
background-color: #7b7b7b;
}
.contain {
justify-content: center;
height: 100%;
text-align: center;
}
h6{
margin-top:30px;
}
p {
font-size: 16px;
margin-top: 10px;
}
.back {
width: 70%;
margin-top: 30px;
}
</style>
...@@ -208,8 +208,20 @@ export default { ...@@ -208,8 +208,20 @@ export default {
} }
}, },
created() { created() {
if(sessionStorage.getItem('personalFan')) {
console.log(sessionStorage.getItem('personalFan'),'已有个人粉丝数');
this.test.barInfo.personalFans = sessionStorage.getItem('personalFan')
}
if(sessionStorage.getItem('barFrom')) {
this.test.manInfo.barFrom = sessionStorage.getItem('barFrom')
console.log(sessionStorage.getItem('barFrom'),'已有昵称')
}
if(sessionStorage.getItem('barName')) {
this.test.manInfo.barFrom = sessionStorage.getItem('barName')
console.log(sessionStorage.getItem('barName'),'已有专柜名称')
}
this.checkNowMenuBar() this.checkNowMenuBar()
this.zReadyUserId() // this.zReadyUserId()
this.zTestGetNowUrlInfo() this.zTestGetNowUrlInfo()
// this.oyStallCode = sessionStorage.getItem('oyStallCode') // this.oyStallCode = sessionStorage.getItem('oyStallCode')
// this.userId = sessionStorage.getItem('userId') // this.userId = sessionStorage.getItem('userId')
...@@ -231,6 +243,7 @@ export default { ...@@ -231,6 +243,7 @@ export default {
}) })
.then(res => { .then(res => {
this.test.manInfo.barFrom = res.data.data.name this.test.manInfo.barFrom = res.data.data.name
sessionStorage.setItem("barFrom", res.data.data.name)
this.test.manInfo.logoUrl = res.data.data.avatar this.test.manInfo.logoUrl = res.data.data.avatar
sessionStorage.setItem("avatar", res.data.data.avatar) sessionStorage.setItem("avatar", res.data.data.avatar)
}) })
...@@ -251,6 +264,7 @@ export default { ...@@ -251,6 +264,7 @@ export default {
}) })
.then(res => { .then(res => {
this.test.barInfo.personalFans = res.data.data.length this.test.barInfo.personalFans = res.data.data.length
sessionStorage.setItem("personalFan", res.data.data.length)
}) })
.catch(err => { .catch(err => {
console.log(err); console.log(err);
...@@ -264,15 +278,14 @@ export default { ...@@ -264,15 +278,14 @@ export default {
getStoreDetail(params).then(res => { getStoreDetail(params).then(res => {
if(res.data.stallInfo != null) { if(res.data.stallInfo != null) {
this.test.manInfo.barName = res.data.stallInfo.name this.test.manInfo.barName = res.data.stallInfo.name
sessionStorage.setItem("barName", res.data.stallInfo.name)
} }
}) })
}, },
checkNowMenuBar() { checkNowMenuBar() {
let inData = "1"; let inData = "1";
this.test.menuBarInfo.icon.now = this.test.menuBarInfo.icon.ua; this.test.menuBarInfo.icon.now = this.test.menuBarInfo.icon.ua;
this.test.menuBarInfo.icon.now[inData] = this.test.menuBarInfo.icon.ac[ this.test.menuBarInfo.icon.now[inData] = this.test.menuBarInfo.icon.ac[inData];
inData
];
}, },
manInfoClick() { manInfoClick() {
this.$router.push("counterInfo"); this.$router.push("counterInfo");
......
...@@ -106,17 +106,17 @@ ...@@ -106,17 +106,17 @@
</template> </template>
<script> <script>
import { ApiStoreAddStore } from "@api/in/store"; import { ApiStoreAddStore } from "@api/in/store"
const zlog = console.log.bind(console); const zlog = console.log.bind(console)
export default { export default {
data() { data() {
// 中英文验证规则 // 中英文验证规则
const nameValidate = (rule, value, callback) => { const nameValidate = (rule, value, callback) => {
let reg = /^[a-zA-Z\u4e00-\u9fa5]+$/; let reg = /^[a-zA-Z\u4e00-\u9fa5]+$/
if (!reg.test(value)) { if (!reg.test(value)) {
callback(new Error("含有非法字符(只能输入字母、汉字)!")); callback(new Error("含有非法字符(只能输入字母、汉字)!"))
} else { } else {
callback(); callback();
} }
......
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