Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -109,7 +109,7 @@
|
|||||||
this.$loading('上传中')
|
this.$loading('上传中')
|
||||||
|
|
||||||
uni.uploadFile({
|
uni.uploadFile({
|
||||||
url: this.$instance.defaults.baseURL + (process.env.NODE_ENV == 'production' ? 'api' : '') + '/file/add',
|
url: this.$instance.defaults.baseURL + (process.env.NODE_ENV == 'production' ? '/api' : '') + '/file/add',
|
||||||
filePath: res.tempFilePaths[0],
|
filePath: res.tempFilePaths[0],
|
||||||
name: 'file',
|
name: 'file',
|
||||||
header: {
|
header: {
|
||||||
@@ -118,7 +118,6 @@
|
|||||||
},
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
const data = JSON.parse(res.data)
|
const data = JSON.parse(res.data)
|
||||||
console.log(data)
|
|
||||||
|
|
||||||
if (data.code === 0) {
|
if (data.code === 0) {
|
||||||
this.photoUrl = data.data[0].split(';')[0]
|
this.photoUrl = data.data[0].split(';')[0]
|
||||||
@@ -165,7 +164,8 @@
|
|||||||
photoUrl: this.photoUrl,
|
photoUrl: this.photoUrl,
|
||||||
lat: this.lat,
|
lat: this.lat,
|
||||||
lng: this.lng,
|
lng: this.lng,
|
||||||
openId: this.user.openId
|
openId: this.user.openId,
|
||||||
|
id: this.user.merchantInfo ? this.user.merchantInfo.id : ''
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
@@ -173,8 +173,8 @@
|
|||||||
title: '温馨提示',
|
title: '温馨提示',
|
||||||
content: '提交申请成功,请等待后台审核!'
|
content: '提交申请成功,请等待后台审核!'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
wx.navigateBack()
|
uni.navigateBack()
|
||||||
})
|
}).catch(() => {})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<span>文明榜单</span>
|
<span>文明榜单</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<swiper class="banner" indicatorDots circular :autoplay="true" :interval="5000">
|
<swiper class="banner" indicatorDots circular :autoplay="true" :interval="5000" v-if="bannerList.length">
|
||||||
<swiper-item v-for="(item, index) in bannerList" :key="index">
|
<swiper-item v-for="(item, index) in bannerList" :key="index">
|
||||||
<image :src="item.imgUrl" mode="aspectFill" />
|
<image :src="item.imgUrl" mode="aspectFill" />
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<h2>商家优惠</h2>
|
<h2>商家优惠</h2>
|
||||||
<div class="yh-list">
|
<div class="yh-list">
|
||||||
<div class="yh-item" v-for="(item, index) in list" :key="index" hover-class="text-hover" @click="$linkTo('./StoreDetail?id=' + item.id)">
|
<div class="yh-item" v-for="(item, index) in list" :key="index" hover-class="text-hover" @click="$linkTo('./StoreDetail?id=' + item.id)">
|
||||||
<image :src="item.userAvatarUrl || 'https://cdn.cunwuyun.cn/wxmp/tianfuxing/banner.png'" />
|
<image :src="item.merchantPhoto" mode="aspectFill" />
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<h2>{{ item.merchantName }}</h2>
|
<h2>{{ item.merchantName }}</h2>
|
||||||
<p>{{ item.title }}</p>
|
<p>{{ item.title }}</p>
|
||||||
@@ -99,6 +99,11 @@
|
|||||||
...mapState(['user', 'token'])
|
...mapState(['user', 'token'])
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onShow () {
|
||||||
|
this.isMore = false
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
|
||||||
onLoad () {
|
onLoad () {
|
||||||
if (!this.token) {
|
if (!this.token) {
|
||||||
this.autoLogin()
|
this.autoLogin()
|
||||||
@@ -106,7 +111,6 @@
|
|||||||
this.getUserInfo()
|
this.getUserInfo()
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getList()
|
|
||||||
this.getBannerList()
|
this.getBannerList()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ export default {
|
|||||||
|
|
||||||
uploadFile (img, total, type) {
|
uploadFile (img, total, type) {
|
||||||
uni.uploadFile({
|
uni.uploadFile({
|
||||||
url: this.$instance.defaults.baseURL + (process.env.NODE_ENV == 'production' ? 'api' : '') + '/file/add',
|
url: this.$instance.defaults.baseURL + (process.env.NODE_ENV == 'production' ? '/api' : '') + '/file/add',
|
||||||
filePath: img,
|
filePath: img,
|
||||||
name: 'file',
|
name: 'file',
|
||||||
header: {
|
header: {
|
||||||
|
|||||||
@@ -124,7 +124,7 @@
|
|||||||
|
|
||||||
uploadFile (img, total) {
|
uploadFile (img, total) {
|
||||||
uni.uploadFile({
|
uni.uploadFile({
|
||||||
url: this.$instance.defaults.baseURL + (process.env.NODE_ENV == 'production' ? 'api' : '') + '/file/add',
|
url: this.$instance.defaults.baseURL + (process.env.NODE_ENV == 'production' ? '/api' : '') + '/file/add',
|
||||||
filePath: img,
|
filePath: img,
|
||||||
name: 'file',
|
name: 'file',
|
||||||
header: {
|
header: {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="Store">
|
<div class="Store">
|
||||||
<div class="store-list">
|
<div class="store-list">
|
||||||
<div class="store-item" v-for="(item, index) in list" :key="index" hover-class="text-hover" @click="$linkTo('./StoreDetail?id=' + item.id)">
|
<div class="store-item" v-for="(item, index) in list" :key="index" hover-class="text-hover" @click="$linkTo('./StoreDetail?id=' + item.id)">
|
||||||
<image :src="item.userAvatarUrl || 'https://cdn.cunwuyun.cn/wxmp/tianfuxing/banner.png'" />
|
<image :src="item.merchantPhoto" mode="aspectFill" />
|
||||||
<div class="middle">
|
<div class="middle">
|
||||||
<h2>{{ item.merchantName }}</h2>
|
<h2>{{ item.merchantName }}</h2>
|
||||||
<p>{{ item.title }}</p>
|
<p>{{ item.title }}</p>
|
||||||
|
|||||||
@@ -10,10 +10,9 @@
|
|||||||
<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="info.merchantPhoto || 'https://jisheng-xiaochengxu.oss-cn-hangzhou.aliyuncs.com/admin/5bad9165-fa6e-4c81-894d-2beae426260b.png'" />
|
<image class="banner" mode="aspectFill" :src="info.merchantInfo.photoUrl" />
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<image :src="info.merchantInfo.photoUrl" />
|
|
||||||
<div class="top-right">
|
<div class="top-right">
|
||||||
<h2>{{ info.merchantInfo.merchantName }}</h2>
|
<h2>{{ info.merchantInfo.merchantName }}</h2>
|
||||||
<p @click="toAddress">{{ info.merchantInfo.address }}</p>
|
<p @click="toAddress">{{ info.merchantInfo.address }}</p>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="AddDiscounts">
|
<div class="AddDiscounts">
|
||||||
<div class="form">
|
<div class="form">
|
||||||
<input placeholder="输入优惠内容标题" v-model="title" placeholder-style="color: #999; font-size: 15px;" />
|
<input placeholder="输入优惠内容标题" v-model="title" placeholder-style="color: #999; font-size: 15px;" />
|
||||||
<textarea placeholder="输入优惠内容详情" v-model="content" placeholder-class="input-placeholder" placeholder-style="color: #999; font-size: 15px;" />
|
<textarea placeholder="输入优惠内容详情" :maxlength="1000" v-model="content" placeholder-class="input-placeholder" placeholder-style="color: #999; font-size: 15px;" />
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-wrapper">
|
<div class="btn-wrapper">
|
||||||
<div class="btn" hover-class="text-hover" @click="save">发布</div>
|
<div class="btn" hover-class="text-hover" @click="save">发布</div>
|
||||||
|
|||||||
@@ -15,9 +15,9 @@
|
|||||||
<h2>{{ item.title }}</h2>
|
<h2>{{ item.title }}</h2>
|
||||||
<p>{{ item.content }}</p>
|
<p>{{ item.content }}</p>
|
||||||
<div class="item-tags">
|
<div class="item-tags">
|
||||||
<span v-if="item.status === '1'">审核通过</span>
|
<span :class="'status-' + 1" v-if="item.status === '1'">审核通过</span>
|
||||||
<span v-if="item.status === '0'">待审核</span>
|
<span :class="'status-' + 0" v-if="item.status === '0'">待审核</span>
|
||||||
<span v-if="item.status === '2'">审核拒绝</span>
|
<span :class="'status-' + 2" v-if="item.status === '2'">审核拒绝</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-bottom">
|
<div class="item-bottom">
|
||||||
|
|||||||
@@ -6,36 +6,36 @@
|
|||||||
<h2>头像</h2>
|
<h2>头像</h2>
|
||||||
<div class="form-item__right">
|
<div class="form-item__right">
|
||||||
<button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
|
<button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
|
||||||
<image class="avatar" :src="user.avatarUrl || 'https://cdn.cunwuyun.cn/wxmp/tianfuxing/avatar.png'"></image>
|
<image class="avatar" :src="userInfo.avatarUrl || 'https://cdn.cunwuyun.cn/wxmp/tianfuxing/avatar.png'"></image>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-item">
|
<div class="form-item">
|
||||||
<h2>昵称</h2>
|
<h2>昵称</h2>
|
||||||
<div class="form-item__right">
|
<div class="form-item__right">
|
||||||
<input placeholder="请输入昵称" type="nickname" v-model="user.nickName" />
|
<input placeholder="请输入昵称" type="nickname" v-model="userInfo.nickName" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-item">
|
<div class="form-item">
|
||||||
<h2>手机号</h2>
|
<h2>手机号</h2>
|
||||||
<div class="form-item__right">
|
<div class="form-item__right">
|
||||||
<input placeholder="请输入手机号" type="number" maxlength="11" v-model="user.phone" />
|
<input placeholder="请输入手机号" type="number" maxlength="11" v-model="userInfo.phone" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-item">
|
<div class="form-item">
|
||||||
<h2>所在社区</h2>
|
<h2>所在社区</h2>
|
||||||
<picker :range="sqList" range-key="dictName" @change="e => (user.sssq = sqList[e.detail.value].dictName)">
|
<picker :range="sqList" range-key="dictName" @change="e => (userInfo.sssq = sqList[e.detail.value].dictName)">
|
||||||
<div class="form-item__right">
|
<div class="form-item__right">
|
||||||
<span :style="{color: user.sssq ? '#333' : '#999'}">{{ user.sssq ? user.sssq : '请输入所在社区' }}</span>
|
<span :style="{color: userInfo.sssq ? '#333' : '#999'}">{{ userInfo.sssq ? userInfo.sssq : '请输入所在社区' }}</span>
|
||||||
<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>
|
||||||
</picker>
|
</picker>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-item">
|
<div class="form-item">
|
||||||
<h2>所在小区</h2>
|
<h2>所在小区</h2>
|
||||||
<picker :range="xqList" range-key="dictName" @change="e => (user.szxq = xqList[e.detail.value].dictName)">
|
<picker :range="xqList" range-key="dictName" @change="e => (userInfo.szxq = xqList[e.detail.value].dictName)">
|
||||||
<div class="form-item__right">
|
<div class="form-item__right">
|
||||||
<span :style="{color: user.szxq ? '#333' : '#999'}">{{ user.szxq ? user.szxq : '请输入所在小区' }}</span>
|
<span :style="{color: userInfo.szxq ? '#333' : '#999'}">{{ userInfo.szxq ? userInfo.szxq : '请输入所在小区' }}</span>
|
||||||
<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>
|
||||||
</picker>
|
</picker>
|
||||||
@@ -77,29 +77,29 @@
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
save () {
|
save () {
|
||||||
if (!this.user.avatarUrl) {
|
if (!this.userInfo.avatarUrl) {
|
||||||
return this.$toast('请上传头像')
|
return this.$toast('请上传头像')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.user.nickName) {
|
if (!this.userInfo.nickName) {
|
||||||
return this.$toast('请输入昵称')
|
return this.$toast('请输入昵称')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.user.phone) {
|
if (!this.userInfo.phone) {
|
||||||
return this.$toast('请输入手机号')
|
return this.$toast('请输入手机号')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.user.sssq) {
|
if (!this.userInfo.sssq) {
|
||||||
return this.$toast('请选择所在社区')
|
return this.$toast('请选择所在社区')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.user.szxq) {
|
if (!this.userInfo.szxq) {
|
||||||
return this.$toast('请选择所在小区')
|
return this.$toast('请选择所在小区')
|
||||||
}
|
}
|
||||||
this.$loading()
|
this.$loading()
|
||||||
this.$instance.post('/api/appwechatuser/update-nickName', null, {
|
this.$instance.post('/api/appwechatuser/update-nickName', null, {
|
||||||
params: {
|
params: {
|
||||||
...this.user
|
...this.userInfo
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
onChooseAvatar (e) {
|
onChooseAvatar (e) {
|
||||||
this.$loading()
|
this.$loading()
|
||||||
uni.uploadFile({
|
uni.uploadFile({
|
||||||
url: this.$instance.defaults.baseURL + (process.env.NODE_ENV == 'production' ? 'api' : '') + '/file/add',
|
url: this.$instance.defaults.baseURL + (process.env.NODE_ENV == 'production' ? '/api' : '') + '/file/add',
|
||||||
filePath: e.detail.avatarUrl,
|
filePath: e.detail.avatarUrl,
|
||||||
name: 'file',
|
name: 'file',
|
||||||
header: {
|
header: {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
<p>{{ item.createTime }}</p>
|
<p>{{ item.createTime }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<AiEmpty v-if="!list.length && isMore"></AiEmpty>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -19,6 +20,7 @@
|
|||||||
export default {
|
export default {
|
||||||
appName: '文明广场',
|
appName: '文明广场',
|
||||||
name: 'AppSquare',
|
name: 'AppSquare',
|
||||||
|
enablePullDownRefresh: true,
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -57,7 +59,10 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
getList () {
|
getList () {
|
||||||
if (this.isMore) return
|
if (this.isMore) {
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.$loading()
|
this.$loading()
|
||||||
this.$instance.post(`/api/appwechatescalation/list`, null, {
|
this.$instance.post(`/api/appwechatescalation/list`, null, {
|
||||||
@@ -71,6 +76,7 @@
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$hideLoading()
|
this.$hideLoading()
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
if (this.current > 1) {
|
if (this.current > 1) {
|
||||||
this.list = [...this.list, ...res.data.records]
|
this.list = [...this.list, ...res.data.records]
|
||||||
} else {
|
} else {
|
||||||
@@ -88,6 +94,7 @@
|
|||||||
this.isMore = true
|
this.isMore = true
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
this.$hideLoading()
|
this.$hideLoading()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -95,7 +102,13 @@
|
|||||||
|
|
||||||
onReachBottom () {
|
onReachBottom () {
|
||||||
this.getList()
|
this.getList()
|
||||||
}
|
},
|
||||||
|
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.isMore = false
|
||||||
|
this.current = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user