Commit 097c21d5 authored by xd's avatar xd

差表单验证和粉丝数显示

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