天府星
This commit is contained in:
@@ -283,7 +283,7 @@ import { mapActions, mapState } from 'vuex'
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@click="preview(item.accessUrl)"
|
||||||
toAddress () {
|
toAddress () {
|
||||||
wx.openLocation({
|
wx.openLocation({
|
||||||
latitude: this.info.lat,
|
latitude: this.info.lat,
|
||||||
|
|||||||
@@ -31,13 +31,14 @@
|
|||||||
<div class="section yh">
|
<div class="section yh">
|
||||||
<h2>商家优惠</h2>
|
<h2>商家优惠</h2>
|
||||||
<div class="yh-list">
|
<div class="yh-list">
|
||||||
<div class="yh-item" v-for="(item, index) in 4" :key="index" hover-class="text-hover" @click="$linkTo('./StoreDetail')">
|
<div class="yh-item" v-for="(item, index) in list" :key="index" hover-class="text-hover" @click="$linkTo('./StoreDetail?id=' + item.id)">
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/tianfuxing/banner.png" />
|
<image :src="item.userAvatarUrl || 'https://cdn.cunwuyun.cn/wxmp/tianfuxing/banner.png'" />
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<h2>实惠超市</h2>
|
<h2>{{ item.merchantName }}</h2>
|
||||||
<p>Lv.1会员进店享受9折优惠</p>
|
<p>{{ item.title }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<AiEmpty v-if="!list.length"></AiEmpty>
|
||||||
</div>
|
</div>
|
||||||
<div class="more" @click="$linkTo('./Store')" hover-class="text-hover">查看更多优惠</div>
|
<div class="more" @click="$linkTo('./Store')" hover-class="text-hover">查看更多优惠</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -99,10 +100,31 @@
|
|||||||
} else {
|
} else {
|
||||||
this.getUserInfo()
|
this.getUserInfo()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.getList()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(['autoLogin', 'getUserInfo'])
|
...mapActions(['autoLogin', 'getUserInfo']),
|
||||||
|
|
||||||
|
getList () {
|
||||||
|
this.$instance.post(`/api/appmerchantinfo/discountList`, null, {
|
||||||
|
withoutToken: true,
|
||||||
|
params: {
|
||||||
|
current: 1,
|
||||||
|
size: 4,
|
||||||
|
status: 1
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.list = res.data.records
|
||||||
|
this.isMore = true
|
||||||
|
} else {
|
||||||
|
this.isMore = true
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -31,9 +31,9 @@
|
|||||||
<AiEmpty v-if="!list.length"></AiEmpty>
|
<AiEmpty v-if="!list.length"></AiEmpty>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-wrapper">
|
<div class="btn-wrapper">
|
||||||
<div class="top">
|
<div class="top" @click="isChoose = !isChoose">
|
||||||
<i v-show="!isChoose" @click="isChoose = !isChoose"></i>
|
<i v-show="!isChoose"></i>
|
||||||
<image class="bg-img" @click="isChoose = !isChoose" v-show="isChoose" src="https://cdn.cunwuyun.cn/wxmp/tianfuxing/Selected.png" />
|
<image class="bg-img" v-show="isChoose" src="https://cdn.cunwuyun.cn/wxmp/tianfuxing/Selected.png" />
|
||||||
<span>同意将上传的内容公开分享到文明广场</span>
|
<span>同意将上传的内容公开分享到文明广场</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn" @click="upload" hover-class="text-hover">拍照上传</div>
|
<div class="btn" @click="upload" hover-class="text-hover">拍照上传</div>
|
||||||
@@ -146,6 +146,7 @@
|
|||||||
this.$instance.post(`/api/appwechatescalation/addOrUpdate`, {
|
this.$instance.post(`/api/appwechatescalation/addOrUpdate`, {
|
||||||
type: 0,
|
type: 0,
|
||||||
listType: 0,
|
listType: 0,
|
||||||
|
openStatus: this.isChoose ? 1 : 0,
|
||||||
openId: this.user.openId,
|
openId: this.user.openId,
|
||||||
accessUrl: this.imgList[0]
|
accessUrl: this.imgList[0]
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<div class="status-bar" :style="{height: statusBarHeight + 'px'}"></div>
|
<div class="status-bar" :style="{height: statusBarHeight + 'px'}"></div>
|
||||||
<div class="nav-bar">
|
<div class="nav-bar">
|
||||||
<image src="/static/img/left.png" @click="back"/>
|
<image src="/static/img/left.png" @click="back"/>
|
||||||
<h2>海报接力</h2>
|
<h2>文明榜单</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="back-wrapper" @click="back" v-show="!isFixed" :style="{marginTop : statusBarHeight + 'px'}">
|
<div class="back-wrapper" @click="back" v-show="!isFixed" :style="{marginTop : statusBarHeight + 'px'}">
|
||||||
|
|||||||
@@ -1,22 +1,91 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="Store">
|
<div class="Store">
|
||||||
<div class="store-list">
|
<div class="store-list">
|
||||||
<div class="store-item" v-for="(item, index) in 4" :key="index" hover-class="text-hover" @click="$linkTo('./StoreDetail')">
|
<div class="store-item" v-for="(item, index) in list" :key="index" hover-class="text-hover" @click="$linkTo('./StoreDetail?id=' + item.id)">
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/tianfuxing/avatar.png" />
|
<image :src="item.userAvatarUrl || 'https://cdn.cunwuyun.cn/wxmp/tianfuxing/banner.png'" />
|
||||||
<div class="middle">
|
<div class="middle">
|
||||||
<h2>实惠超市</h2>
|
<h2>{{ item.merchantName }}</h2>
|
||||||
<p>Lv.1会员进店享受9折优惠</p>
|
<p>{{ item.title }}</p>
|
||||||
</div>
|
</div>
|
||||||
<image class="right" src="https://cdn.cunwuyun.cn/wxmp/tianfuxing/ContentRightArrow@2x.png" />
|
<image class="right" src="https://cdn.cunwuyun.cn/wxmp/tianfuxing/ContentRightArrow@2x.png" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<AiEmpty v-if="!list.length"></AiEmpty>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapActions, mapState } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
appName: '商家优惠',
|
appName: '商家优惠',
|
||||||
name: 'Store',
|
name: 'Store',
|
||||||
|
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
current: 1,
|
||||||
|
list: [],
|
||||||
|
isMore: false,
|
||||||
|
isFixed: false,
|
||||||
|
statusBarHeight: 20,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
...mapState(['user', 'token'])
|
||||||
|
},
|
||||||
|
|
||||||
|
onLoad () {
|
||||||
|
this.getList()
|
||||||
|
|
||||||
|
if (!this.token) {
|
||||||
|
this.autoLogin()
|
||||||
|
} else {
|
||||||
|
this.getUserInfo()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
...mapActions(['autoLogin', 'getUserInfo']),
|
||||||
|
|
||||||
|
getList () {
|
||||||
|
if (this.isMore) return
|
||||||
|
|
||||||
|
this.$loading()
|
||||||
|
this.$instance.post(`/api/appmerchantinfo/discountList`, null, {
|
||||||
|
withoutToken: true,
|
||||||
|
params: {
|
||||||
|
current: this.current,
|
||||||
|
size: 10,
|
||||||
|
status: 1
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$hideLoading()
|
||||||
|
if (this.current > 1) {
|
||||||
|
this.list = [...this.list, ...res.data.records]
|
||||||
|
} else {
|
||||||
|
this.list = res.data.records
|
||||||
|
}
|
||||||
|
|
||||||
|
if (res.data.records.length < 10) {
|
||||||
|
this.isMore = true
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
this.current = this.current + 1
|
||||||
|
} else {
|
||||||
|
this.isMore = true
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.$hideLoading()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onReachBottom () {
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="StoreDetail">
|
<div class="StoreDetail" v-if="pageShow">
|
||||||
<div class="header" :class="[isFixed ? 'header-active' : '']">
|
<div class="header" :class="[isFixed ? 'header-active' : '']">
|
||||||
<div class="status-bar" :style="{height: statusBarHeight + 'px'}"></div>
|
<div class="status-bar" :style="{height: statusBarHeight + 'px'}"></div>
|
||||||
<div class="nav-bar">
|
<div class="nav-bar">
|
||||||
@@ -10,22 +10,20 @@
|
|||||||
<div class="back-wrapper" @click="back" v-show="!isFixed" :style="{marginTop : statusBarHeight + 'px'}">
|
<div class="back-wrapper" @click="back" v-show="!isFixed" :style="{marginTop : statusBarHeight + 'px'}">
|
||||||
<image src="/static/img/left.png"/>
|
<image src="/static/img/left.png"/>
|
||||||
</div>
|
</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="wrapper">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/tianfuxing/avatar.png" />
|
<image :src="info.merchantInfo.photoUrl" />
|
||||||
<div class="top-right">
|
<div class="top-right">
|
||||||
<h2>商户名称名称名称</h2>
|
<h2>{{ info.merchantInfo.merchantName }}</h2>
|
||||||
<p>成都市金牛区xxxx大厦成都成都成都成都…</p>
|
<p @click="toAddress">{{ info.merchantInfo.address }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="detail">
|
<div class="detail">
|
||||||
<h2>优惠详情</h2>
|
<h2>优惠详情</h2>
|
||||||
<div class="detail-content">
|
<div class="detail-content">
|
||||||
<h3>Lv.1会员进店享受9折优惠</h3>
|
<h3>{{ info.title }}</h3>
|
||||||
<p>需要将 input 组件 type 的值设置为 nickname,当用户在此 input 进行输入时,键盘上方会展示微信昵称。
|
<p>{{ info.content }}</p>
|
||||||
从基础库2.24.4版本起,在onBlur 事件触发时,微信将异步对用户输入的内容进行安全监测,若未通过安全监测,微信将清空用户输入的内容,
|
|
||||||
建议开发者通过 form 中form-type 为submit 的button 组件收集用户输入的内容。</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -42,17 +40,21 @@
|
|||||||
return {
|
return {
|
||||||
isFixed: false,
|
isFixed: false,
|
||||||
statusBarHeight: 20,
|
statusBarHeight: 20,
|
||||||
list: [],
|
|
||||||
hideStatus: false,
|
hideStatus: false,
|
||||||
pageShow: false,
|
pageShow: false,
|
||||||
current: 1,
|
info: {}
|
||||||
isMore: false,
|
|
||||||
isChoose: true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad () {
|
onShow () {
|
||||||
|
},
|
||||||
|
|
||||||
|
onLoad (query) {
|
||||||
|
this.id = query.id
|
||||||
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
|
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
|
||||||
|
|
||||||
|
this.$loading()
|
||||||
|
this.getInfo(query.id)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
back () {
|
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) {
|
preview (url) {
|
||||||
let imgs = this.list.map(v => v.accessUrl)
|
let imgs = this.list.map(v => v.accessUrl)
|
||||||
|
|
||||||
@@ -73,7 +96,7 @@
|
|||||||
|
|
||||||
onPageScroll (params) {
|
onPageScroll (params) {
|
||||||
this.isFixed = params.scrollTop > 60
|
this.isFixed = params.scrollTop > 60
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -103,6 +126,10 @@
|
|||||||
box-shadow: 0 0 8px 0 rgba(0,0,0,0.02);
|
box-shadow: 0 0 8px 0 rgba(0,0,0,0.02);
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
|
|
||||||
|
.top-right {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 112px;
|
width: 112px;
|
||||||
height: 112px;
|
height: 112px;
|
||||||
|
|||||||
@@ -1,22 +1,101 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="AppSquare">
|
<div class="AppSquare">
|
||||||
<div class="item" v-for="(item, index) in 10" :key="index">
|
<div class="item" v-for="(item, index) in list" :key="index">
|
||||||
<image src="https://jisheng-xiaochengxu.oss-cn-hangzhou.aliyuncs.com/admin/5bad9165-fa6e-4c81-894d-2beae426260b.png" />
|
<image :src="item.accessUrl" mode="aspectFill" @click="preview(item.accessUrl)" />
|
||||||
<div class="item-bottom">
|
<div class="item-bottom">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/tianfuxing/avatar.png" />
|
<image src="https://cdn.cunwuyun.cn/wxmp/tianfuxing/avatar.png" />
|
||||||
<span>张三</span>
|
<span>{{ item.userName }}</span>
|
||||||
</div>
|
</div>
|
||||||
<p>2022-11-05 17:45</p>
|
<p>{{ item.createTime }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapActions, mapState } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
appName: '文明广场',
|
appName: '文明广场',
|
||||||
name: 'AppSquare',
|
name: 'AppSquare',
|
||||||
|
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
current: 1,
|
||||||
|
list: [],
|
||||||
|
isMore: false,
|
||||||
|
isFixed: false,
|
||||||
|
statusBarHeight: 20,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
...mapState(['user', 'token'])
|
||||||
|
},
|
||||||
|
|
||||||
|
onLoad () {
|
||||||
|
this.getList()
|
||||||
|
|
||||||
|
if (!this.token) {
|
||||||
|
this.autoLogin()
|
||||||
|
} else {
|
||||||
|
this.getUserInfo()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
...mapActions(['autoLogin', 'getUserInfo']),
|
||||||
|
|
||||||
|
preview (url) {
|
||||||
|
let imgs = this.list.map(v => v.accessUrl)
|
||||||
|
|
||||||
|
uni.previewImage({
|
||||||
|
urls: imgs,
|
||||||
|
current: url
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
getList () {
|
||||||
|
if (this.isMore) return
|
||||||
|
|
||||||
|
this.$loading()
|
||||||
|
this.$instance.post(`/api/appwechatescalation/list`, null, {
|
||||||
|
params: {
|
||||||
|
current: this.current,
|
||||||
|
size: 10,
|
||||||
|
status: 1,
|
||||||
|
openStatus: 1,
|
||||||
|
listType: 0
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$hideLoading()
|
||||||
|
if (this.current > 1) {
|
||||||
|
this.list = [...this.list, ...res.data.records]
|
||||||
|
} else {
|
||||||
|
this.list = res.data.records
|
||||||
|
}
|
||||||
|
|
||||||
|
if (res.data.records.length < 10) {
|
||||||
|
this.isMore = true
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
this.current = this.current + 1
|
||||||
|
} else {
|
||||||
|
this.isMore = true
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.$hideLoading()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onReachBottom () {
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user