Commit d219c02e authored by xd's avatar xd

切换专柜未写

parent fbeb2c85
...@@ -13,9 +13,20 @@ ...@@ -13,9 +13,20 @@
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
/* .swiper-container { .center {
height: 400px; display: flex;
} */ justify-content: start;
flex-direction: column;
width: 100%;
}
.swiper-container {
height: 500px;
width: 100%;
}
.swiper-container img {
height: 500px;
width: 100%;
}
.list { .list {
height: auto; height: auto;
width: 100%; width: 100%;
...@@ -58,41 +69,41 @@ ...@@ -58,41 +69,41 @@
font-size: 24px; font-size: 24px;
color: rgba(45, 71, 106, 0.8); color: rgba(45, 71, 106, 0.8);
} }
.fwb {
width: 100%;
padding: 30px !important;
}
</style> </style>
</head> </head>
<body> <body>
<div class="center">
<div class="swiper-container"> <div class="swiper-container">
<div class="swiper-wrapper"> <div class="swiper-wrapper" id="slider"></div>
<div class="swiper-slide">
<img src="http://files.cailiao.com/vue/cailiao/pc_21/images/ba1.jpg" alt="">
</div>
<div class="swiper-slide">
<img src="http://files.cailiao.com/vue/cailiao/pc_21/images/ba2.png" alt="">
</div>
<div class="swiper-slide">
<img src="http://files.cailiao.com/vue/cailiao/pc_21/images/ba3.png" alt="">
</div>
</div>
<div class="swiper-pagination"></div> <div class="swiper-pagination"></div>
</div> </div>
<div class="list"> <div class="list">
<div class="left flex"> <div class="left flex">
<img src="../img/counter.png" alt="" /> <img id="logo" src="" alt="" />
</div> </div>
<div class="right"> <div class="right">
<div class="title">欧亚一号专柜</div> <div class="title">欧亚一号专柜</div>
<div class="txt"> <div class="txt">
<i class="iconfont icon-dianhua" style="font-size: 16px;"></i> <i class="iconfont icon-dianhua" style="font-size: 16px;"></i>
<span>18888888888</span> <span id="phone">18888888888</span>
</div> </div>
<div class="txt"> <div class="txt">
<i class="iconfont icon-dizhi" style="font-size: 16px;"></i> <i class="iconfont icon-dizhi" style="font-size: 16px;"></i>
<span>欧亚商场一楼181号</span> <span id="address">欧亚商场一楼181号</span>
</div>
</div> </div>
</div> </div>
<div id="fwb" style="padding: 40px;" >
</div> </div>
</div>
<script> <script>
// 获取店铺code
function GetQueryString(name) { function GetQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg) var r = window.location.search.substr(1).match(reg)
...@@ -103,67 +114,51 @@ ...@@ -103,67 +114,51 @@
r = null r = null
return context == null || context == "" || context == "undefined" ? "" : context; return context == null || context == "" || context == "undefined" ? "" : context;
} }
// alert(GetQueryString("storeCode")) const oyStallCode = GetQueryString("oyStallCode")
const storecode = GetQueryString("storeCode")
$(function () {
showQRInfo()
});
const showQRInfo = () => {
// let pageUri = `${nowUrl}&detailid=${voucherId}&actionid=${activeId}&unionid=${unionId}`;
// let storecode = "181"
let pageUri = `pages/user/register/register?storeCode=${storecode}`
let pageUrl = `http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`;
$.ajax({
type: "POST",
url: pageUrl,
data: {},
success: function (res) {
$('#image').attr('src', res.data)
},
error: function (data) {
}
});
}
// 轮播图
/* swiper轮播组件 */ /* swiper轮播组件 */
var swiper = new Swiper('.swiper-container', { var swiper = new Swiper('.swiper-container', {
autoplay: true, autoplay: true,
pagination: { pagination: {
el: '.swiper-pagination', el: '.swiper-pagination',
}, },
});
/*鼠标移入停止轮播,鼠标离开 继续轮播*/
$('.swiper-container').mouseenter(function () {
swiper.stopAutoplay();
}).mouseleave(function () {
swiper.startAutoplay();
}) })
$(function () {
showQRInfo()
})
const showQRInfo = () => {
$.ajax({
type: 'GET',
url: `http://139.155.48.151:8084/admin/auth/stall/getByOyStallCode?oyStallCode=${oyStallCode}`,
success: function (data) {
console.log(data,'data')
var str = "";
for (i = 0; i < data.data.carousel.length; i++) {
var _data = data.data.carousel[i]
str += '<div class="swiper-slide"><img src="'+ _data + '" alt=""></div>'
}
$("#slider").append(str)
var mySwiper = new Swiper('.swiper-container', {
loop: true,
autoplay: true,
pagination: '.swiper-pagination',
})
let info = data.data.stallInfo
$("#logo").attr('src',info.logo)
let content = info.summary.replace(/<img/g,'<img style="width:100%;"')
$("#address").text(info.location)
$("#fwb").html(content)
}
})
}
// $(function () { /*鼠标移入停止轮播,鼠标离开 继续轮播*/
// $.ajax({ // $('.swiper-container').mouseenter(function () {
// type: 'GET', // swiper.stopAutoplay();
// url: 'a.json', // }).mouseleave(function () {
// success: function (data) { // swiper.startAutoplay();
// var str = "";
// for (i = 0; i < data.list.length; i++) {
// var _data = data.list[i];
// str += '<div class="swiper-slide"><a href="'+_data.URL+'">' +
// '<img src="'+_data.Pic+'" alt=""></a></div>';
// };
// $("#slider").append(str);
// if(data.data.list.length > 1){
// var mySwiper = new Swiper('.swiper-container', {
// loop: true,
// autoplay: 2000,
// pagination: '.swiper-pagination',
// })
// }
// }
// })
// }) // })
</script> </script>
</body> </body>
......
...@@ -14,30 +14,6 @@ ...@@ -14,30 +14,6 @@
</div> </div>
<van-radio slot="right-icon" name="1" /> <van-radio slot="right-icon" name="1" />
</van-cell> </van-cell>
<van-cell clickable @click="radio = '2'">
<div class="list">
<div class="left">
<img src="../../../public/img/counter.png" alt="" />
</div>
<div class="right">
<h3>欧亚一号专柜</h3>
<p>由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状。</p>
</div>
</div>
<van-radio slot="right-icon" name="2" />
</van-cell>
<van-cell clickable @click="radio = '3'">
<div class="list">
<div class="left">
<img src="../../../public/img/counter.png" alt="" />
</div>
<div class="right">
<h3>欧亚一号专柜</h3>
<p>由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状。</p>
</div>
</div>
<van-radio slot="right-icon" name="3" />
</van-cell>
</van-cell-group> </van-cell-group>
</van-radio-group> </van-radio-group>
</div> </div>
......
...@@ -22,6 +22,11 @@ ...@@ -22,6 +22,11 @@
<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="电话">
<template slot="default">
<van-field v-model="addForm.phone" placeholder="输入名称" class="input" />
</template>
</van-cell>
<div class="border"> <div class="border">
<div class="des">摘要信息</div> <div class="des">摘要信息</div>
<van-field <van-field
...@@ -74,7 +79,8 @@ export default { ...@@ -74,7 +79,8 @@ export default {
summaryTitle: '', summaryTitle: '',
name: '', name: '',
location: '', location: '',
summary: '' summary: '',
phone: ''
}, },
oyStallCode: '', oyStallCode: '',
list: [], list: [],
......
...@@ -46,8 +46,6 @@ export default { ...@@ -46,8 +46,6 @@ export default {
}, },
mounted() { mounted() {
this.oyStallCode = sessionStorage.getItem('oyStallCode') this.oyStallCode = sessionStorage.getItem('oyStallCode')
console.log(this.oyStallCode,'专柜信息oyStallCode');
this.getAgentAuth() this.getAgentAuth()
this.getDetail() this.getDetail()
}, },
......
<template> <template>
<div class="container"> <div class="container">
<div>推送</div> <div>建设中...</div>
<!-- <div>
<van-search v-model="inputValue" placeholder="请输入搜索关键词" />
</div>
<van-checkbox-group v-model="list" @change="onChange">
<van-cell-group >
<van-cell class="content" v-for="(item, index) in newMemberList" :key="index" clickable data-index="index" bind:click="toggle">
<template slot="title">
<img src="../../../public/img/photo.png" alt="" />
<span class="custom-title">{{ item.name }}</span>
</template>
<van-checkbox slot="right-icon" catch:tap="noop" :name="item.id" />
</van-cell>
</van-cell-group>
</van-checkbox-group> -->
</div> </div>
</template> </template>
<script> <script>
import axios from "axios";
import { wxRequest } from '@/utils/aWxRequest'
// import VConsole from 'vconsole/dist/vconsole.min.js' //import vconsole
// let vConsole = new VConsole()
export default { export default {
data() { data() {
return { return {
inputValue: '',
newMemberList: [
{
id: 1,
src: "",
name: "Solomon"
},
{
id: 2,
src: "",
name: "Solomon"
}
],
list: [],
info: '',
userId: ''
} }
}, },
mounted() { mounted() {
this.getAgentAuth()
this.getList()
}, },
methods: { methods: {
getList() {
let url = 'http://oysales.oywanhao.com:8087/counterPageHome'
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,'错误信息')
}
})
// this.userId = sessionStorage.getItem('userId')
// let postData = {
// userId: this.userId
// }
// let header = {
// token: sessionStorage.getItem('XToken'),
// corpId: 'ww4df265003b43fa0d',
// agentId: '1000033'
// }
// wx.invoke('selectExternalContact', { "filterType": 0}, function(res){
// if(res.err_msg == "selectExternalContact:ok"){
// console.log(res,'联系人列表')
// }else {
// console.log('获取失败')
// }
// })
},
onChange(val) { },
toggle(event) {
const { index } = event.currentTarget.dataset;
const checkbox = this.selectComponent(`.checkboxes-${index}`);
checkbox.toggle();
},
noop() {}
} }
} }
</script> </script>
......
...@@ -70,11 +70,9 @@ ...@@ -70,11 +70,9 @@
<script> <script>
import {configWx, getUserInfo} from "@/utils/aCommon" import {configWx, getUserInfo} from "@/utils/aCommon"
import { getUserInfoByUserId } from "@/api/sidebar/voucher";
import axios from "axios" import axios from "axios"
// import VConsole from 'vconsole/dist/vconsole.min.js' //import vconsole
import { editStore } from "@/api/sidebar/voucher"; import { editStore } from "@/api/sidebar/voucher";
// let vConsole = new VConsole()
export default { export default {
name: "me", name: "me",
data() { data() {
......
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