Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
aixianling
2022-11-09 11:07:56 +08:00
10 changed files with 49 additions and 33 deletions

View File

@@ -109,7 +109,7 @@
this.$loading('上传中')
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],
name: 'file',
header: {
@@ -118,7 +118,6 @@
},
success: (res) => {
const data = JSON.parse(res.data)
console.log(data)
if (data.code === 0) {
this.photoUrl = data.data[0].split(';')[0]
@@ -165,7 +164,8 @@
photoUrl: this.photoUrl,
lat: this.lat,
lng: this.lng,
openId: this.user.openId
openId: this.user.openId,
id: this.user.merchantInfo ? this.user.merchantInfo.id : ''
}).then(res => {
uni.hideLoading()
if (res.code === 0) {
@@ -173,8 +173,8 @@
title: '温馨提示',
content: '提交申请成功,请等待后台审核!'
}).then(() => {
wx.navigateBack()
})
uni.navigateBack()
}).catch(() => {})
}
})
},

View File

@@ -27,7 +27,7 @@
<span>文明榜单</span>
</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">
<image :src="item.imgUrl" mode="aspectFill" />
</swiper-item>
@@ -36,7 +36,7 @@
<h2>商家优惠</h2>
<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)">
<image :src="item.userAvatarUrl || 'https://cdn.cunwuyun.cn/wxmp/tianfuxing/banner.png'" />
<image :src="item.merchantPhoto" mode="aspectFill" />
<div class="right">
<h2>{{ item.merchantName }}</h2>
<p>{{ item.title }}</p>
@@ -99,6 +99,11 @@
...mapState(['user', 'token'])
},
onShow () {
this.isMore = false
this.getList()
},
onLoad () {
if (!this.token) {
this.autoLogin()
@@ -106,7 +111,6 @@
this.getUserInfo()
}
this.getList()
this.getBannerList()
},

View File

@@ -119,7 +119,7 @@ export default {
uploadFile (img, total, type) {
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,
name: 'file',
header: {

View File

@@ -124,7 +124,7 @@
uploadFile (img, total) {
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,
name: 'file',
header: {

View File

@@ -2,7 +2,7 @@
<div class="Store">
<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)">
<image :src="item.userAvatarUrl || 'https://cdn.cunwuyun.cn/wxmp/tianfuxing/banner.png'" />
<image :src="item.merchantPhoto" mode="aspectFill" />
<div class="middle">
<h2>{{ item.merchantName }}</h2>
<p>{{ item.title }}</p>

View File

@@ -10,10 +10,9 @@
<div class="back-wrapper" @click="back" v-show="!isFixed" :style="{marginTop : statusBarHeight + 'px'}">
<image src="/static/img/left.png"/>
</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="top">
<image :src="info.merchantInfo.photoUrl" />
<div class="top-right">
<h2>{{ info.merchantInfo.merchantName }}</h2>
<p @click="toAddress">{{ info.merchantInfo.address }}</p>

View File

@@ -2,7 +2,7 @@
<div class="AddDiscounts">
<div class="form">
<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 class="btn-wrapper">
<div class="btn" hover-class="text-hover" @click="save">发布</div>

View File

@@ -15,9 +15,9 @@
<h2>{{ item.title }}</h2>
<p>{{ item.content }}</p>
<div class="item-tags">
<span v-if="item.status === '1'">审核通过</span>
<span v-if="item.status === '0'">待审核</span>
<span v-if="item.status === '2'">审核拒绝</span>
<span :class="'status-' + 1" v-if="item.status === '1'">审核通过</span>
<span :class="'status-' + 0" v-if="item.status === '0'">待审核</span>
<span :class="'status-' + 2" v-if="item.status === '2'">审核拒绝</span>
</div>
</div>
<div class="item-bottom">

View File

@@ -6,36 +6,36 @@
<h2>头像</h2>
<div class="form-item__right">
<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>
</div>
</div>
<div class="form-item">
<h2>昵称</h2>
<div class="form-item__right">
<input placeholder="请输入昵称" type="nickname" v-model="user.nickName" />
<input placeholder="请输入昵称" type="nickname" v-model="userInfo.nickName" />
</div>
</div>
<div class="form-item">
<h2>手机号</h2>
<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 class="form-item">
<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">
<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" />
</div>
</picker>
</div>
<div class="form-item">
<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">
<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" />
</div>
</picker>
@@ -77,29 +77,29 @@
methods: {
save () {
if (!this.user.avatarUrl) {
if (!this.userInfo.avatarUrl) {
return this.$toast('请上传头像')
}
if (!this.user.nickName) {
if (!this.userInfo.nickName) {
return this.$toast('请输入昵称')
}
if (!this.user.phone) {
if (!this.userInfo.phone) {
return this.$toast('请输入手机号')
}
if (!this.user.sssq) {
if (!this.userInfo.sssq) {
return this.$toast('请选择所在社区')
}
if (!this.user.szxq) {
if (!this.userInfo.szxq) {
return this.$toast('请选择所在小区')
}
this.$loading()
this.$instance.post('/api/appwechatuser/update-nickName', null, {
params: {
...this.user
...this.userInfo
}
}).then(res => {
if (res.code === 0) {
@@ -117,7 +117,7 @@
onChooseAvatar (e) {
this.$loading()
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,
name: 'file',
header: {

View File

@@ -10,6 +10,7 @@
<p>{{ item.createTime }}</p>
</div>
</div>
<AiEmpty v-if="!list.length && isMore"></AiEmpty>
</div>
</template>
@@ -19,6 +20,7 @@
export default {
appName: '文明广场',
name: 'AppSquare',
enablePullDownRefresh: true,
data () {
return {
@@ -57,7 +59,10 @@
},
getList () {
if (this.isMore) return
if (this.isMore) {
uni.stopPullDownRefresh()
return
}
this.$loading()
this.$instance.post(`/api/appwechatescalation/list`, null, {
@@ -71,6 +76,7 @@
}).then(res => {
if (res.code === 0) {
this.$hideLoading()
uni.stopPullDownRefresh()
if (this.current > 1) {
this.list = [...this.list, ...res.data.records]
} else {
@@ -88,6 +94,7 @@
this.isMore = true
}
}).catch(() => {
uni.stopPullDownRefresh()
this.$hideLoading()
})
}
@@ -95,7 +102,13 @@
onReachBottom () {
this.getList()
}
},
onPullDownRefresh() {
this.isMore = false
this.current = 1
this.getList()
},
}
</script>