天府星

This commit is contained in:
yanran200730
2022-11-08 13:58:55 +08:00
parent b9f3cda9b8
commit ecd44a3c78
7 changed files with 231 additions and 33 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div class="StoreDetail">
<div class="StoreDetail" v-if="pageShow">
<div class="header" :class="[isFixed ? 'header-active' : '']">
<div class="status-bar" :style="{height: statusBarHeight + 'px'}"></div>
<div class="nav-bar">
@@ -10,22 +10,20 @@
<div class="back-wrapper" @click="back" v-show="!isFixed" :style="{marginTop : statusBarHeight + 'px'}">
<image src="/static/img/left.png"/>
</div>
<image class="banner" src="https://jisheng-xiaochengxu.oss-cn-hangzhou.aliyuncs.com/admin/5bad9165-fa6e-4c81-894d-2beae426260b.png" />
<image class="banner" :src="info.merchantPhoto || 'https://jisheng-xiaochengxu.oss-cn-hangzhou.aliyuncs.com/admin/5bad9165-fa6e-4c81-894d-2beae426260b.png'" />
<div class="wrapper">
<div class="top">
<image src="https://cdn.cunwuyun.cn/wxmp/tianfuxing/avatar.png" />
<image :src="info.merchantInfo.photoUrl" />
<div class="top-right">
<h2>商户名称名称名称</h2>
<p>成都市金牛区xxxx大厦成都成都成都成都</p>
<h2>{{ info.merchantInfo.merchantName }}</h2>
<p @click="toAddress">{{ info.merchantInfo.address }}</p>
</div>
</div>
<div class="detail">
<h2>优惠详情</h2>
<div class="detail-content">
<h3>Lv.1会员进店享受9折优惠</h3>
<p>需要将 input 组件 type 的值设置为 nickname当用户在此 input 进行输入时键盘上方会展示微信昵称
从基础库2.24.4版本起在onBlur 事件触发时微信将异步对用户输入的内容进行安全监测若未通过安全监测微信将清空用户输入的内容
建议开发者通过 form 中form-type 为submit 的button 组件收集用户输入的内容</p>
<h3>{{ info.title }}</h3>
<p>{{ info.content }}</p>
</div>
</div>
</div>
@@ -42,17 +40,21 @@
return {
isFixed: false,
statusBarHeight: 20,
list: [],
hideStatus: false,
pageShow: false,
current: 1,
isMore: false,
isChoose: true
info: {}
}
},
onLoad () {
onShow () {
},
onLoad (query) {
this.id = query.id
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
this.$loading()
this.getInfo(query.id)
},
methods: {
back () {
@@ -61,6 +63,27 @@
})
},
toAddress () {
uni.openLocation({
latitude: this.info.merchantInfo.lat,
longitude: this.info.merchantInfo.lng,
scale: 18
})
},
getInfo (id) {
this.$loading()
this.$instance.post(`/api/appmerchantinfo/queryDiscountDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.info = res.data
this.$nextTick(() => {
this.pageShow = true
})
}
})
},
preview (url) {
let imgs = this.list.map(v => v.accessUrl)
@@ -73,7 +96,7 @@
onPageScroll (params) {
this.isFixed = params.scrollTop > 60
},
}
}
</script>
@@ -103,6 +126,10 @@
box-shadow: 0 0 8px 0 rgba(0,0,0,0.02);
border-radius: 16px;
.top-right {
flex: 1;
}
image {
width: 112px;
height: 112px;