Commit 097c21d5 authored by xd's avatar xd

差表单验证和粉丝数显示

parent 003e4135
...@@ -24,3 +24,11 @@ export function getStoreDetail(params) { ...@@ -24,3 +24,11 @@ export function getStoreDetail(params) {
params params
}) })
} }
// 获取专柜列表
export function getStoreList(params) {
return requestCF({
url: '/admin/auth/stall/getStallInfoListByUserId',
method: 'get',
params
})
}
<template> <template>
<div class="container"> <div class="container">
<van-radio-group v-model="radio" class="nobr"> <van-radio-group v-model="radio" class="nobr">
<van-cell-group> <van-cell-group @change="handleStoreChange" >
<van-cell clickable @click="radio = '1'"> <van-cell v-for="(item,index) in list" :key="index" :name="item.oyStallCode" >
<div class="list"> <div class="list">
<div class="left"> <div class="left">
<img src="../../../public/img/counter.png" alt="" /> <img :src="item.logo" alt="" />
</div> </div>
<div class="right"> <div class="right">
<h3>欧亚一号专柜</h3> <h3>{{ item.name }}</h3>
<p>由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状。</p> <p>{{ item.summaryTitle }}</p>
</div> </div>
</div> </div>
<van-radio slot="right-icon" name="1" /> <van-radio slot="right-icon" name="1" />
...@@ -20,11 +20,33 @@ ...@@ -20,11 +20,33 @@
</template> </template>
<script> <script>
import { getStoreList } from "@/api/sidebar/voucher"
export default { export default {
data() { data() {
return { return {
radio: "" radio: "1",
}; userId: '',
list: []
}
},
created() {
this.getList()
this.userId = sessionStorage.getItem('userId')
},
methods: {
getList() {
let params = {
user_id: 'shanDian'
}
getStoreList(params).then(res => {
console.log(res.data);
this.list = res.data
})
},
handleStoreChange(val) {
sessionStorage.setItem('oyStallCode',val)
}
} }
}; };
</script> </script>
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
</van-cell> </van-cell>
<van-cell title="专柜地址"> <van-cell title="专柜地址">
<template slot="default"> <template slot="default">
<van-field v-model="addForm.location" placeholder="输入名称" class="input" /> <van-field v-model="addForm.location" placeholder="输入地址" class="input" />
</template> </template>
</van-cell> </van-cell>
<van-cell title="电话"> <van-cell title="电话">
<template slot="default"> <template slot="default">
<van-field v-model="addForm.phone" placeholder="输入名称" class="input" /> <van-field v-model="addForm.phone" placeholder="输入电话" class="input" />
</template> </template>
</van-cell> </van-cell>
<div class="border"> <div class="border">
...@@ -118,7 +118,6 @@ export default { ...@@ -118,7 +118,6 @@ export default {
}, },
mounted() { mounted() {
this.addForm.oyStallCode = sessionStorage.getItem('oyStallCode') this.addForm.oyStallCode = sessionStorage.getItem('oyStallCode')
console.log(this.addForm.oyStallCode,'编辑专柜信息oyStallCode');
this.getDetail() this.getDetail()
}, },
methods: { methods: {
......
...@@ -34,12 +34,12 @@ import "quill/dist/quill.bubble.css" ...@@ -34,12 +34,12 @@ import "quill/dist/quill.bubble.css"
export default { export default {
data() { data() {
return { return {
info: 1,
oyStallCode: '', oyStallCode: '',
storeInfo: { storeInfo: {
logo: './img/counter.png', logo: './img/counter.png',
name: 'only专柜', name: 'only专柜',
summaryTitle: 'ONLY是丹麦著名的国际时装公司BESTSELLER拥有的众多著名品牌之一', summaryTitle: 'ONLY是丹麦著名的国际时装公司BESTSELLER拥有的众多著名品牌之一',
}, },
carousel:['./img/cswiper.png','./img/cswiper.png','./img/cswiper.png','./img/cswiper.png'] carousel:['./img/cswiper.png','./img/cswiper.png','./img/cswiper.png','./img/cswiper.png']
} }
...@@ -56,9 +56,12 @@ export default { ...@@ -56,9 +56,12 @@ export default {
} }
getStoreDetail(params).then(res => { getStoreDetail(params).then(res => {
if(res.data.stallInfo != null) { if(res.data.stallInfo != null) {
this.info = 2
console.log(res,'res'); console.log(res,'res');
this.carousel = res.data.carousel this.carousel = res.data.carousel
this.storeInfo = res.data.stallInfo this.storeInfo = res.data.stallInfo
}else {
this.info = 1
} }
}) })
}, },
...@@ -66,12 +69,23 @@ export default { ...@@ -66,12 +69,23 @@ 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) {
this.$router.push('pushStoreInfo')
}else {
this.$router.push("counterHome") this.$router.push("counterHome")
}
}, },
handlePushInfo() { handlePushInfo() {
if(this.info == 1) {
this.$router.push('pushStoreInfo')
}else {
let url = `http://oysales.oywanhao.com:8087/counterPageHome?oyStallCode=${this.oyStallCode}` let url = `http://oysales.oywanhao.com:8087/counterPageHome?oyStallCode=${this.oyStallCode}`
wx.invoke("shareToExternalContact", { wx.invoke("shareToExternalContact", {
title: '专柜首页', // 消息的标题 title: '专柜首页', // 消息的标题
...@@ -88,6 +102,7 @@ export default { ...@@ -88,6 +102,7 @@ export default {
} }
} }
} }
}
</script> </script>
<style scoped> <style scoped>
......
<template> <template>
<div class="container"> <div class="main" style="display: flex;flex-direction: column;justify-content: flex-start;font-size: 14px;">
<div>建设中...</div> <div>建设中...</div>
</div> </div>
</template> </template>
<script> <script>
import Vue from "vue";
const zlog = console.log.bind(console);
export default { export default {
name: "goodPostIndex",
data() { data() {
return { return {
};
},
created() {
}
}, },
mounted() { mounted() {
}, },
methods: { methods: {
} }
} };
</script> </script>
<style scoped> <style scoped>
.content { .main {
align-items: center; background-color: white;
} width: 100%;
.content >>> .van-icon-arrow:before { height: 100%;
margin-top: 10px;
color: #2d476a;
}
.custom-title { display: flex;
margin-left: 12px; flex-direction: column;
font-size: 16px; justify-content: start;
font-weight: bold;
color: rgba(45, 71, 106, 1);
}
.content img {
width: 44px;
height: 44px;
border-radius: 50%;
vertical-align: middle;
} }
</style> </style>
...@@ -265,7 +265,7 @@ export default { ...@@ -265,7 +265,7 @@ export default {
this.$router.push("counterInfo"); this.$router.push("counterInfo");
}, },
switchBarClick() { switchBarClick() {
this.$router.push("changeCounter"); this.$router.push("ChangeCounter");
}, },
testButtonClick() {}, testButtonClick() {},
menu01Click() {}, menu01Click() {},
......
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