Commit 1508d090 by honghong

商家端和用户端合并 修改页面

parent b1d6512d
...@@ -243,6 +243,7 @@ const collectOrUncollect = (params) => { ...@@ -243,6 +243,7 @@ const collectOrUncollect = (params) => {
return ApiHttp('/app-fund/forum/collect', params, 'POST') return ApiHttp('/app-fund/forum/collect', params, 'POST')
} }
// 查询论坛信息列表/商家我的动态 // 查询论坛信息列表/商家我的动态
const listForumGET = (params) => { const listForumGET = (params) => {
return ApiHttp('/app-fund/forum/list', params, 'GET') return ApiHttp('/app-fund/forum/list', params, 'GET')
...@@ -318,6 +319,12 @@ const getlistBgroupBuying = (groupId) => { ...@@ -318,6 +319,12 @@ const getlistBgroupBuying = (groupId) => {
return ApiHttp(`/app-fund/groupBuying/${groupId}`, '', 'GET') return ApiHttp(`/app-fund/groupBuying/${groupId}`, '', 'GET')
} }
//我的关注
const getattentionGET = (params) => {
return ApiHttp('/app-fund/home/attention/list', params, 'GET')
}
export { export {
agreementGET, agreementGET,
nodeListGET, nodeListGET,
...@@ -395,5 +402,6 @@ export { ...@@ -395,5 +402,6 @@ export {
deleteCommentItem, deleteCommentItem,
merchantPOST, merchantPOST,
listBgroupBuyingGET, listBgroupBuyingGET,
getlistBgroupBuying getlistBgroupBuying,
getattentionGET
} }
\ No newline at end of file
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</view> </view>
<view class="d-flex"> <view class="d-flex">
<view v-if="isEdit" class="dynamic-delete mr-2" @click.stop="handleEdit(itemDetail.forumId)">编辑</view> <view v-if="isEdit" class="dynamic-delete mr-2" @click.stop="handleEdit(itemDetail.forumId)">编辑</view>
<view v-if="isDelete" class="dynamic-delete" @click.stop="handleDelete(itemDetail.forumId)">删除</view> <view v-if="userInfot.userId == itemDetail.userId" class="dynamic-delete" @click.stop="handleDelete(itemDetail.forumId)">删除</view>
</view> </view>
</view> </view>
</view> </view>
......
<template> <template>
<view> <view>
<view class="dynamic"> <view class="dynamic">
<image :src="itemDetail.imgs[0]" mode="aspectFit" class="bg"></image> <view v-if="type==1" class="imgs">
<image :src="item" mode="aspectFit" class="" v-for="(item,index) in itemDetail.imgs" :key="index"></image>
</view>
<image :src="itemDetail.imgs[0]" mode="aspectFit" class="bg" v-else></image>
<view class="" style="padding: 20rpx;"> <view class="" style="padding: 20rpx;">
<!-- <view class="dynamic-title">{{itemDetail.forumTitle}}</view> --> <!-- <view class="dynamic-title">{{itemDetail.forumTitle}}</view> -->
<!-- <view v-if="showAuthor" class="d-flex a-center" style="margin-top: 16rpx;"> <!-- <view v-if="showAuthor" class="d-flex a-center" style="margin-top: 16rpx;">
...@@ -79,6 +84,10 @@ ...@@ -79,6 +84,10 @@
isDelete:{ isDelete:{
type:Boolean, type:Boolean,
default:false default:false
},
type:{
type:Number,
default:0
} }
}, },
computed: { computed: {
...@@ -141,6 +150,17 @@ ...@@ -141,6 +150,17 @@
display: block; display: block;
border-radius: 16rpx 16rpx 0 0; border-radius: 16rpx 16rpx 0 0;
} }
.imgs{
display: flex;
flex-wrap: wrap;
>image{
width: 200rpx;
height: 200rpx;
margin-right: 20rpx;
}
}
&-title { &-title {
font-size: 30rpx; font-size: 30rpx;
color: #303949; color: #303949;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</block> </block>
</view> </view>
<!-- 靠左 --> <!-- 靠左 -->
<view class="inv-h-w" v-else> <view class="inv-h-w" style="background: #F8F9FA;" v-else>
<block v-for="(item,index) in list" :key="item.value"> <block v-for="(item,index) in list" :key="item.value">
<view :class="['inv-h',Inv == item.value?'inv-h-se':'']" @click="changeTab(item.value)">{{item.label}}</view> <view :class="['inv-h',Inv == item.value?'inv-h-se':'']" @click="changeTab(item.value)">{{item.label}}</view>
</block> </block>
......
...@@ -73,6 +73,14 @@ ...@@ -73,6 +73,14 @@
{{contractInfo.area}} {{contractInfo.area}}
</view> </view>
</view> </view>
<view class="index-cet-tt" v-if="contractStatus != 1 && contractStatus != 2 && contractStatus != 3 && contractStatus != 4">
<view class="index-cet-tt-lf">
优惠券:
</view>
<view class="index-cet-tt-rg">
-{{contractInfo.discountPrice||0}}
</view>
</view>
<view class="index-cet-tt"> <view class="index-cet-tt">
<view class="index-cet-tt-lf"> <view class="index-cet-tt-lf">
付款金额: 付款金额:
......
...@@ -149,7 +149,9 @@ ...@@ -149,7 +149,9 @@
async getDetailData(forumId) { async getDetailData(forumId) {
const res = await detailForumItemById(forumId) const res = await detailForumItemById(forumId)
if(res.data.imgs){
this.imgs = res.data.imgs.split(',') this.imgs = res.data.imgs.split(',')
}
this.detailData = res.data this.detailData = res.data
this.getCommentList() this.getCommentList()
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<view class="index-cent"> <view class="index-cent">
<!-- @click="handleCompanyDetail" --> <!-- @click="handleCompanyDetail" -->
<view class="index-cent-top"> <view class="index-cent-top">
<view class="d-flex a-center j-sb" @click="handleCompanyDetail"> <view class="d-flex a-center j-sb" >
<view class="index-cent-top-name"> <view class="index-cent-top-name">
{{businessInfo.businessName}} {{businessInfo.businessName}}
</view> </view>
...@@ -79,14 +79,20 @@ ...@@ -79,14 +79,20 @@
</view> --> </view> -->
<!-- 商家介绍模块 --> <!-- 商家介绍模块 -->
<view v-if="currentChecked == 0"> <view v-if="currentChecked == 0">
<view class="" v-html="cent"> </view> <!-- <view class="" v-html="cent"> </view> -->
<view class="title-txt">
{{businessInfo.businessIntroduce}}
</view>
<view class="introduce">
<image :src="item.url" mode="widthFix" v-for="(item,index) in img" :key="index"></image>
</view>
</view> </view>
<!-- 商家动态模块 --> <!-- 商家动态模块 -->
<view v-else-if="currentChecked == 1"> <view v-else-if="currentChecked == 1">
<template v-if="forumList.length"> <template v-if="forumList.length">
<view class="distence" v-for="(item,index) in forumList" :key="index" <view class="distence" v-for="(item,index) in forumList" :key="index"
@click="handleDetail(item.forumId)"> @click="handleDetail(item.forumId)">
<dynamicList :itemDetail="item" :isDelete='true' @refersh="handleRefersh"></dynamicList> <dynamicList :itemDetail="item" :isDelete='false' @refersh="handleRefersh"></dynamicList>
</view> </view>
</template> </template>
<u-empty v-else marginTop="20" width="260" height="260" textSize="26" mode="data" <u-empty v-else marginTop="20" width="260" height="260" textSize="26" mode="data"
...@@ -189,7 +195,8 @@ ...@@ -189,7 +195,8 @@
forumList: [], forumList: [],
total: 0, total: 0,
evalList: [], evalList: [],
replyData: {} replyData: {},
img:[]
}; };
}, },
onLoad(option) { onLoad(option) {
...@@ -332,6 +339,9 @@ ...@@ -332,6 +339,9 @@
this.businessInfo = res.data this.businessInfo = res.data
this.businessInfo.url = JSON.parse(res.data.businessImg)[0].url this.businessInfo.url = JSON.parse(res.data.businessImg)[0].url
this.cent = this.$utilsMethods.replaceSpecialChar(res.data.businessIntroduce) this.cent = this.$utilsMethods.replaceSpecialChar(res.data.businessIntroduce)
if(res.data.businessImg){
this.img = JSON.parse(res.data.businessImg)
}
}) })
}, },
...@@ -365,7 +375,6 @@ ...@@ -365,7 +375,6 @@
//查看地址 //查看地址
btnAddress(item) { btnAddress(item) {
console.log(this.businessInfo,"=================")
uni.openLocation({ uni.openLocation({
latitude: parseFloat(this.businessInfo.dimension), latitude: parseFloat(this.businessInfo.dimension),
longitude: parseFloat(this.businessInfo.longitude ), longitude: parseFloat(this.businessInfo.longitude ),
...@@ -523,4 +532,17 @@ ...@@ -523,4 +532,17 @@
height: 36rpx; height: 36rpx;
margin-left: 16rpx; margin-left: 16rpx;
} }
.title-txt{
font-size: 26rpx;
color: #666666;
line-height: 1.5;
margin-bottom: 20rpx;
padding-top: 20rpx;
}
.introduce{
>image{
width: 100%;
}
}
</style> </style>
\ No newline at end of file
<template> <template>
<view> <view>
<u-sticky bgColor="#ffff" offset-top="0"> <!-- <u-sticky bgColor="#ffff" offset-top="0"> -->
<com-navbar :homeShow="false" bgColor='#F7F8FA' title=" "
:titleStyle="{fontSize: '36rpx' , color: '#000000'}"></com-navbar>
<view class="index"> <view class="index">
<image class="logo" src="@/static/images/headImage.png"></image> <image class="logo" src="@/static/images/headImage.png"></image>
<view :style="{ height: `calc(${globalData.navBarHeightRpx}rpx )` }"></view> <view :style="{ height: `calc(${globalData.navBarHeightRpx}rpx )` }"></view>
<view class="index-header d-flex j-sb a-center"> <view class="index-header j-sb a-center">
<view class="d-flex a-center" @click="handleLook"> <!-- @click="handleLook" -->
<image @click.stop="handlePreview" class="index-header-avatar" <view class="d-flex a-center" style="justify-content: space-between;">
:src="clientInfo.avatar" <!-- @click.stop="handlePreview" -->
mode=""> <view class="d-flex a-center">
<image class="index-header-avatar" :src="clientInfo.avatar" mode="">
</image> </image>
<view class="index-header-info"> <view class="index-header-info">
<view class="index-header-info-name">{{clientInfo.nickName}}</view> <view class="index-header-info-name">{{clientInfo.nickName}}</view>
<view class="index-header-info-phone">{{clientInfo.userName}}</view> <view class="index-header-info-phone">{{clientInfo.userName}}</view>
</view> </view>
</view> </view>
<view class="index-header-gz" @click="handleLook">
{{ clientInfo.isFavorites?'已关注':'关注'}}
</view>
</view>
<view class="list_cen d-flex a-center">
<view class="list_cen_item">
<view class="list_item">
{{ clientInfo.attentionNum||0}}
</view>
<view class="list_txt">
关注
</view>
</view>
<view class="list_cen_item">
<view class="list_item">
{{ clientInfo.fansNum||0}}
</view>
<view class="list_txt">
粉丝
</view>
</view>
<view class="list_cen_item">
<view class="list_item">
{{ clientInfo.bePraisedNum||0}}
</view>
<view class="list_txt">
获赞
</view>
</view>
<view class="list_cen_item">
<view class="list_item">
{{ clientInfo.collectNum||0}}
</view>
<view class="list_txt">
收藏
</view>
</view>
</view>
</view> </view>
</view> </view>
<view class="px-three"> <view class="px-three">
<tabsList :list="tabsOptions" :checked="currentChecked" @change="handleChangeTab"></tabsList> <tabsList :list="tabsOptions" :checked="currentChecked" @change="handleChangeTab"></tabsList>
</view> </view>
</u-sticky> <!-- </u-sticky> -->
<view class="px-three" style="padding-bottom: 60rpx;"> <view class="px-three" style="padding-bottom: 60rpx;">
<template v-if="currentChecked == 0"> <template v-if="currentChecked == 0">
<view v-for="(item,index) in demandList" :key="index"> <view v-for="(item,index) in demandList" :key="index">
...@@ -30,7 +72,7 @@ ...@@ -30,7 +72,7 @@
<template v-else> <template v-else>
<view class="distence" v-for="(item,index) in forumList" :key="index" @click="handleDetail(item.forumId)"> <view class="distence" v-for="(item,index) in forumList" :key="index" @click="handleDetail(item.forumId)">
<!-- <dynamicList></dynamicList> --> <!-- <dynamicList></dynamicList> -->
<dynamicList :itemDetail="item"></dynamicList> <dynamicList :itemDetail="item" :type='1' @refersh='handleRefersh'></dynamicList>
</view> </view>
</template> </template>
</view> </view>
...@@ -40,11 +82,13 @@ ...@@ -40,11 +82,13 @@
<script> <script>
import tabsList from '@/components/custom/tabs.vue' import tabsList from '@/components/custom/tabs.vue'
import comDemandList from '@/components/custom/demand.vue' import comDemandList from '@/components/custom/demand.vue'
import dynamicList from '@/components/custom/dynamic.vue' // import dynamicList from '@/components/custom/dynamic.vue'
import dynamicList from '@/components/custom/dynamics.vue'
import { import {
getUserInfoById, getUserInfoById,
listClientDemandGET, listClientDemandGET,
listForumGET listForumGET,
collectOrUncollect
} from '@/api/workbench/index.js'; } from '@/api/workbench/index.js';
export default { export default {
components: { components: {
...@@ -102,7 +146,7 @@ ...@@ -102,7 +146,7 @@
// 动态详情 // 动态详情
handleDetail(forumId) { handleDetail(forumId) {
uni.navigateTo({ uni.navigateTo({
url: `./dynamicDetail?forumId=${forumId}&forumType=invitation` url: `./forumDetails?forumId=${forumId}&forumType=invitation`
}) })
}, },
// 获取需求列表 // 获取需求列表
...@@ -114,9 +158,34 @@ ...@@ -114,9 +158,34 @@
}, },
async getForumList(){ async getForumList(){
const res = await listForumGET(this.forumParams) const res = await listForumGET(this.forumParams)
res.rows.forEach((item, index) => {
if(item.imgs){
item.imgs = item.imgs.split(',')
}
})
this.forumList = res.rows this.forumList = res.rows
this.forumTotal = res.total this.forumTotal = res.total
}, },
//关注
handleLook(){
collectOrUncollect({
forumId: this.clientInfo.userId,
userId: this.userInfot.userId,
isFavoritesType: 2, // 论坛1商家2
favoriteType: 'merchant'
}).then(res => {
uni.showToast({
title: '成功!',
icon: 'none'
})
this.getUserInfo(this.clientInfo.userId)
})
},
handleRefersh(){
this.forumList=[]
this.getForumList()
}
} }
} }
...@@ -129,11 +198,13 @@ ...@@ -129,11 +198,13 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.logo { .logo {
width: 100%; width: 100%;
height: 332rpx; height: 462rpx;
position: absolute; position: absolute;
z-index: -1; z-index: -1;
top: 0%; top: 0%;
left: 0%; left: 0%;
border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 30rpx;
} }
.sticky { .sticky {
...@@ -142,14 +213,31 @@ ...@@ -142,14 +213,31 @@
box-sizing: border-box; box-sizing: border-box;
} }
.list_cen {
padding-top: 50rpx;
.list_cen_item{
flex: 1;
text-align: center;
.list_item{
font-size: 36rpx;
color: #FFFFFF;
}
.list_txt{
font-size: 28rpx;
color: rgba(255,255,255,0.8);
padding-top: 10rpx;
}
}
}
.index { .index {
height: 332rpx; height: 462rpx;
position: relative; position: relative;
&-header { &-header {
width: 100%; width: 100%;
position: absolute; position: absolute;
bottom: 40rpx; bottom: 60rpx;
padding: 0 40rpx; padding: 0 40rpx;
box-sizing: border-box; box-sizing: border-box;
...@@ -176,6 +264,17 @@ ...@@ -176,6 +264,17 @@
} }
} }
&-gz{
width: 116rpx;
height: 52rpx;
background: #4BA1FF;
border-radius: 52rpx;
font-size: 23rpx;
color: #FFFFFF;
text-align: center;
line-height: 52rpx;
}
} }
} }
......
<template>
<view class="index">
<u-sticky bgColor='#F7F8FA'>
<u-tabs :list="list1" @click="followClick" :scrollable="false" :activeStyle="{
color: '#242424',
fontSize:'32rpx',
transform:'scale(1.05)',
}"></u-tabs>
</u-sticky>
<template v-if="followList.length">
<view class="list d-flex a-center" v-for="(item, index) in followList" :key="index" @click="clickfollow(item.userType,item.userId)">
<view class="list_lf d-flex a-center">
<u--image :showLoading="true" :src="item.avatar" radius='100%' width="80rpx" height="80rpx"
class="list_img"></u--image>
<view class="list_name">
{{item.nickName}}
</view>
</view>
<view class="list_lr">
<view class="list_btn" >
已关注
</view>
</view>
</view>
</template>
<u-empty v-else marginTop="200" width="260" height="260" textSize="26" mode="data"
icon="http://cdn.uviewui.com/uview/empty/data.png">
</u-empty>
</view>
</template>
<script>
import {
getattentionGET
} from '@/api/workbench/index.js'
export default {
data() {
return {
list1: [{
name: '用户',
userType: "app_user"
}, {
name: '商家',
userType: "merchant"
}],
followList: [],
queryParams: {
pageNum: 1,
pageSize: 15,
userType: "app_user"
},
}
},
onLoad() {
this.getList()
},
onReachBottom() {
if (this.queryParams.pageNum * this.queryParams.pageSize >= this.total) return
this.queryParams.pageNum++
this.getList()
},
methods: {
followClick(e) {
this.queryParams.userType = e.userType
this.queryParams.pageNum = 1
this.followList = []
this.getList()
},
//关注列表
async getList() {
const res = await getattentionGET(this.queryParams)
this.followList = [...this.followList, ...res.data]
console.log(this.followList, "====================")
this.total = res.total
},
//去详情
clickfollow(type,id){
console.log(type,"=====")
let self = this
if(type=='merchant'){
//商家
self.$uniGo.navigateTo({
url: `/homePage/merchant/index?businessId=${id}`
});
}else{
//用户
uni.navigateTo({
url: `/homePage/merchant/personHomePage?userId=${id}`
})
}
}
}
}
</script>
<style lang="scss" scoped>
.index {
padding: 0rpx 30rpx 30rpx 30rpx;
.list {
background: #fff;
border-radius: 24rpx;
padding: 20rpx;
justify-content: space-between;
margin: 10rpx 0;
.list_lf {
.list_name {
font-size: 28rpx;
color: #333333;
padding-left: 20rpx;
}
}
.list_lr {
.list_btn {
width: 108rpx;
height: 42rpx;
border-radius: 8rpx;
border: 1rpx solid #1572FF;
font-size: 22rpx;
color: #1572FF;
text-align: center;
line-height: 42rpx;
}
}
}
}
</style>
\ No newline at end of file
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
</view> </view>
</u-sticky> </u-sticky>
<view class="px-three pb-four"> <view class="px-three pb-four" :class="currentChecked == 0?'active' :''">
<template v-if="currentChecked == 0"> <template v-if="currentChecked == 0">
<template v-if="collectList.length"> <template v-if="collectList.length">
<view class="conntainer" v-for="(item,index) in collectList" :key="index" @click="handleDetail(item)"> <view class="conntainer conntainer1" v-for="(item,index) in collectList" :key="index" @click="handleDetail(item)">
<dynamicList :showAuthor="true" :itemDetail="item" :showState="false"></dynamicList> <dynamicList :showAuthor="true" :itemDetail="item" :showState="false"></dynamicList>
</view> </view>
</template> </template>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
listBeCollectedGet listBeCollectedGet
} from '@/api/workbench/index.js' } from '@/api/workbench/index.js'
import tabsList from '@/components/custom/tabs.vue' import tabsList from '@/components/custom/tabs.vue'
import dynamicList from '@/components/custom/dynamic.vue' import dynamicList from '@/components/custom/dynamics.vue'
import articleList from './components/articleList.vue' import articleList from './components/articleList.vue'
export default { export default {
components: { components: {
...@@ -92,6 +92,11 @@ ...@@ -92,6 +92,11 @@
methods: { methods: {
async getCollectList() { async getCollectList() {
const res = await listCollectGet(this.queryParams) const res = await listCollectGet(this.queryParams)
res.rows.forEach((item, index) => {
if(item.imgs){
item.imgs = item.imgs.split(',')
}
})
this.total = res.total this.total = res.total
this.collectList = [...this.collectList,...res.rows] this.collectList = [...this.collectList,...res.rows]
}, },
...@@ -119,19 +124,42 @@ ...@@ -119,19 +124,42 @@
}, },
// 动态详情 // 动态详情
handleDetail(row) { handleDetail(row) {
// uni.navigateTo({
// url: `/homePage/merchant/dynamicDetail?forumId=${row.forumId}&forumType=${row.forumType}`
// })
if(row.forumType=='dynamic'){
uni.navigateTo({ uni.navigateTo({
url: `/homePage/merchant/dynamicDetail?forumId=${row.forumId}&forumType=${row.forumType}` url: `/homePage/merchant/dynamicDetail?forumId=${row.forumId}&forumType=${row.forumType}`
}) })
}else if(row.forumType=='invitation'){
uni.navigateTo({
url: `/homePage/merchant/forumDetails?forumId=${row.forumId}&forumType=${row.forumType}`
})
}
}, },
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.active {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.conntainer1 {
width: 48%;
padding: 0;
}
/deep/.u-empty{
width: 100%;
}
}
.conntainer { .conntainer {
background: #fff; background: #fff;
padding: 26rpx 24rpx; padding: 26rpx 24rpx;
margin-top: 20rpx; margin-top: 20rpx;
border-radius: 16rpx; border-radius: 16rpx;
} }
</style> </style>
\ No newline at end of file
...@@ -107,12 +107,14 @@ ...@@ -107,12 +107,14 @@
}, },
handleChangeTab(val) { handleChangeTab(val) {
this.currentChecked = val this.currentChecked = val
this.reset() // this.reset()
if (this.currentChecked == 0) { if (this.currentChecked == 0) {
this.isComment = true this.isComment = true
this.commentList = []
this.getCommentList() this.getCommentList()
} else if (this.currentChecked == 1) { } else if (this.currentChecked == 1) {
this.isComment = false this.isComment = false
this.commentList = []
this.getBeCommented() this.getBeCommented()
} else { } else {
this.isComment = true this.isComment = true
...@@ -126,9 +128,19 @@ ...@@ -126,9 +128,19 @@
// 动态详情 // 动态详情
handleDetail(row) { handleDetail(row) {
console.log(row, 'row===') console.log(row, 'row===')
if (this.currentChecked == 1) { // if (this.currentChecked == 1) {
// uni.navigateTo({
// url: `/homePage/merchant/dynamicDetail?forumId=${row.forumId}&forumType=${row.forumType}`
// })
// }
if(row.forumType=="comment"){
uni.navigateTo({
url: `/homePage/merchant/index?businessId=${row.forumId}`
})
}else{
uni.navigateTo({ uni.navigateTo({
url: `/homePage/merchant/dynamicDetail?forumId=${row.forumId}&forumType=${row.forumType}` url: `/homePage/merchant/forumDetails?forumId=${row.forumId}&forumType=${row.forumType}`
}) })
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="px-three pb-four"> <view class="px-three pb-four">
<template> <template>
<view class="conntainer" v-for="(item,index) in forumList" :key="index" <view class="conntainer" v-for="(item,index) in forumList" :key="index"
@click="handleDetail(item.forumId)"> @click="handleDetail(item.userId)">
<dynamicList :itemDetail="item" :showAuthor="true" :isDelete="true" :isEdit="true" @delete="handleDelete" @edit="handleEdit"> <dynamicList :itemDetail="item" :showAuthor="true" :isDelete="true" :isEdit="true" @delete="handleDelete" @edit="handleEdit">
</dynamicList> </dynamicList>
</view> </view>
...@@ -92,16 +92,11 @@ ...@@ -92,16 +92,11 @@
}, },
// 动态详情 // 动态详情
handleDetail(forumId) { handleDetail(userId) {
if(this.queryParams.forumType=='dynamic'){
uni.navigateTo({ uni.navigateTo({
url: `/homePage/merchant/dynamicDetail?forumId=${forumId}&forumType=${this.queryParams.forumType}` url: `/homePage/merchant/index?businessId=${userId}&forumType=${this.queryParams.forumType}`
}) })
}else{
uni.navigateTo({
url: `/homePage/merchant/forumDetails?forumId=${forumId}&forumType=${this.queryParams.forumType}`
})
}
} }
} }
} }
......
...@@ -124,10 +124,16 @@ ...@@ -124,10 +124,16 @@
handleDetail(row) { handleDetail(row) {
console.log(row, 'row=========') console.log(row, 'row=========')
if (row.forumType == 'comment') return if (row.forumType == 'comment') return
if(row.forumType=='dynamic'){
uni.navigateTo({ uni.navigateTo({
url: `/homePage/merchant/dynamicDetail?forumId=${row.forumId}&forumType=${row.forumType}` url: `/homePage/merchant/dynamicDetail?forumId=${row.forumId}&forumType=${row.forumType}`
}) })
}, }else if(row.forumType=='invitation'){
uni.navigateTo({
url: `/homePage/merchant/forumDetails?forumId=${row.forumId}&forumType=${row.forumType}`
})
}
}
} }
} }
</script> </script>
......
<template> <template>
<view class="index"> <view class="index">
<view class="">
<u-sticky bgColor="#fff">
<u-tabs :list="list1" :scrollable='false' @click="clikeTab"></u-tabs>
</u-sticky>
</view>
<view class="index-img"> <view class="index-img">
<!-- <image style="width: 100%;height: 100%;" src="../../static/logo.png" mode=""></image> --> <!-- <image style="width: 100%;height: 100%;" src="../../static/logo.png" mode=""></image> -->
<template> <template>
...@@ -40,8 +45,15 @@ ...@@ -40,8 +45,15 @@
screenWidth: '', screenWidth: '',
lefWidth: '', lefWidth: '',
topHeig: '', topHeig: '',
downFile:'', //downFile:'',
userInfo:{} userInfo:{},
list1:[{
name: '邀请用户',
},
{
name: '邀请商家',
}
]
}; };
}, },
onShareAppMessage() { // 分享到微信好友 onShareAppMessage() { // 分享到微信好友
...@@ -62,15 +74,40 @@ ...@@ -62,15 +74,40 @@
this.myPoster() this.myPoster()
}, },
methods: { methods: {
// tab
clikeTab(e){
console.log(e)
if(e.index=='0'){
//用户
this.myPoster()
}else{
//商家
this.myPosterSj()
}
},
//用户
myPoster() { myPoster() {
myPosterGET().then((res) => {
uni.showLoading({
title:'加载中',
mask:true
})
this.listBy(res.data.posterContent)
this.getImage(res.data.qrCode)
})
},
//商家
myPosterSj() {
myPosterSjGET().then((res) => { myPosterSjGET().then((res) => {
uni.showLoading({ uni.showLoading({
title:'加载中' title:'加载中',
mask:true
}) })
this.listBy(res.data.posterContentTwo) this.listBy(res.data.posterContentTwo)
this.getImage(res.data.qrCode) this.getImage(res.data.qrCode)
}) })
}, },
listBy(posterContent) { listBy(posterContent) {
listByIds(posterContent).then((res) => { listByIds(posterContent).then((res) => {
this.getImageInfo(res.data[0].url) this.getImageInfo(res.data[0].url)
...@@ -107,17 +144,19 @@ ...@@ -107,17 +144,19 @@
ctx.drawImage(that.imgpath, this.lefWidth, this.topHeig, 150, 150); ctx.drawImage(that.imgpath, this.lefWidth, this.topHeig, 150, 150);
// 完成绘制,将结果导出为图片 // 完成绘制,将结果导出为图片
ctx.draw(); // true表示导出时使用canvas的宽高,不进行缩放 ctx.draw(); // true表示导出时使用canvas的宽高,不进行缩放
uni.hideLoading() uni.hideLoading ()
uni.canvasToTempFilePath({ uni.canvasToTempFilePath({
canvasId: 'myCanvas', canvasId: 'myCanvas',
success: function(res) { success: function(res) {
console.log('合并后的图片路径:', res.tempFilePath); console.log('合并后的图片路径:', res.tempFilePath);
that.setData(res.tempFilePath) setTimeout(()=>{
that.setDatas(res.tempFilePath)
},500)
// 在这里你可以将合并后的图片保存到本地或进行其他处理 // 在这里你可以将合并后的图片保存到本地或进行其他处理
} }
}); });
}, },
setData(v) { setDatas(v) {
this.downFile = v this.downFile = v
// console.log(v, '11111111111111222222') // console.log(v, '11111111111111222222')
// this.parth.push(v) // this.parth.push(v)
......
...@@ -147,7 +147,9 @@ ...@@ -147,7 +147,9 @@
canvasId: 'myCanvas', canvasId: 'myCanvas',
success: function(res) { success: function(res) {
console.log('合并后的图片路径:', res.tempFilePath); console.log('合并后的图片路径:', res.tempFilePath);
that.setData(res.tempFilePath) setTimeout(()=>{
that.setDatas(res.tempFilePath)
},500)
// 在这里你可以将合并后的图片保存到本地或进行其他处理 // 在这里你可以将合并后的图片保存到本地或进行其他处理
} }
}); });
......
...@@ -407,6 +407,12 @@ ...@@ -407,6 +407,12 @@
"style": { "style": {
"navigationBarTitleText": "收藏商家" "navigationBarTitleText": "收藏商家"
} }
},
{
"path": "attention/index",
"style": {
"navigationBarTitleText": "我的关注"
}
} }
] ]
} }
......
...@@ -372,12 +372,13 @@ ...@@ -372,12 +372,13 @@
this.$uniGo.navigateTo({ this.$uniGo.navigateTo({
url: `/contract/merchant/index?contractId=${v.contractId}` url: `/contract/merchant/index?contractId=${v.contractId}`
}); });
} else {
// 跳转 -- 用户
this.$uniGo.navigateTo({
url: `/contract/index/index?contractId=${v.contractId}`
});
} }
// else {
// // 跳转 -- 用户
// this.$uniGo.navigateTo({
// url: `/contract/index/index?contractId=${v.contractId}`
// });
// }
}, },
} }
}; };
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<view class="px-three pb-four list" v-if="forumList.length"> <view class="px-three pb-four list" v-if="forumList.length">
<view class="conntainer" v-for="(item,index) in forumList" :key="index" @click="handleDetail(item.forumId)"> <view class="conntainer" v-for="(item,index) in forumList" :key="index" @click="handleDetail(item.forumId)">
<dynamicLists :itemDetail="item"></dynamicLists> <dynamicLists :itemDetail="item" @refersh="handleRefersh"></dynamicLists>
</view> </view>
</view> </view>
......
...@@ -165,9 +165,22 @@ ...@@ -165,9 +165,22 @@
}, },
//预览 //预览
handlePreview(){ handlePreview(){
// console.log(this.model,"================") console.log(this.model,"================")
if(this.model.content==''&&this.model.imgs==''&&this.model.forumTitle=='')return
this.$set(this.model, 'imgs', this.imgs) this.$set(this.model, 'imgs', this.imgs)
if(this.model.forumTitle==''||this.model.forumTitle==undefined ){
uni.$u.toast('请填写标题')
return
}
if(this.imgs==''||this.imgs==undefined ){
uni.$u.toast('请填写上传图片')
return
}
if(this.model.content==''||this.model.content==undefined ){
uni.$u.toast('请填写正文')
return
}
let data = JSON.stringify(this.model) let data = JSON.stringify(this.model)
uni.navigateTo({ uni.navigateTo({
url:"/homePage/merchant/preview?itemdata="+data url:"/homePage/merchant/preview?itemdata="+data
......
...@@ -128,10 +128,15 @@ ...@@ -128,10 +128,15 @@
img: 'wdxq.png', img: 'wdxq.png',
id: 8 id: 8
}, },
// {
// name: '收藏商家',
// img: 'scsj.png',
// id: 9
// },
{ {
name: '收藏商家', name: '我的关注',
img: 'scsj.png', img: 'follow.png',
id: 9 id: 11
}, },
{ {
name: '邀请海报', name: '邀请海报',
...@@ -251,6 +256,11 @@ ...@@ -251,6 +256,11 @@
url: `/my/collectMerchant/index` url: `/my/collectMerchant/index`
}); });
break; break;
case 11: //我的关注
self.$uniGo.navigateTo({
url: `/my/attention/index`
});
break;
} }
}, },
// 退出 // 退出
......
...@@ -145,6 +145,7 @@ ...@@ -145,6 +145,7 @@
font-size: 24rpx; font-size: 24rpx;
color: #303030; color: #303030;
padding: 8rpx 0rpx 12rpx; padding: 8rpx 0rpx 12rpx;
flex: 1;
&-tit { &-tit {
font-weight: 600; font-weight: 600;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- 员工端 首页 --> <!-- 员工端 首页 -->
<u-sticky bgColor="#F7F8FA" offset-top="0"> <u-sticky bgColor="#F7F8FA" offset-top="0">
<view class="index"> <view class="index">
<image class="header" src="@/static/headImage.png" mode=""></image> <image class="header" src="@/static/images/headImage.png" mode=""></image>
<com-navbar :leftIcon="false" title=" " bgColor="transparent" :titleStyle="{ <com-navbar :leftIcon="false" title=" " bgColor="transparent" :titleStyle="{
scrollTopHeader:scrollTopHeader scrollTopHeader:scrollTopHeader
}"></com-navbar> }"></com-navbar>
......
...@@ -27,82 +27,101 @@ ...@@ -27,82 +27,101 @@
</view> </view>
</u-form-item> </u-form-item>
<u-form-item label="手机号" borderBottom ref="item1"> <u-form-item label="手机号" ref="item1">
<view class="tx"> <view class="tx">
<u--input v-model="model1.phonenumber" placeholder="请输入" border="none" <u--input v-model="model1.phonenumber" placeholder="请输入" border="none" inputAlign='right'
inputAlign='right' maxlength='11'></u--input> maxlength='11' type='number'></u--input>
<image class="tx-jt" :src="imgBgUrl + 'yjt.png'" mode=""></image> <image class="tx-jt" :src="imgBgUrl + 'yjt.png'" mode=""></image>
</view> </view>
</u-form-item> </u-form-item>
<u-form-item label="商家名称" borderBottom ref="item1"> </u--form>
</view>
<view class="index-cetn">
<view class="">
<view class="tit">
商家名称
</view>
<view class="tx"> <view class="tx">
<u--input v-model="model1.businessName" placeholder="请输入" border="none" <u--input v-model="model1.businessName" placeholder="请输入" border="none" inputAlign='left'
inputAlign='right'></u--input> :customStyle="cty"></u--input>
<image class="tx-jt" :src="imgBgUrl + 'yjt.png'" mode=""></image> </view>
</view>
<view class="">
<view class="tit">
公司名称
</view> </view>
</u-form-item>
<u-form-item label="公司名称" borderBottom ref="item1">
<view class="tx"> <view class="tx">
<u--input v-model="model1.companyName" placeholder="请输入" border="none" <u--input v-model="model1.companyName" placeholder="请输入" border="none" inputAlign='left'
inputAlign='right'></u--input> :customStyle="cty"></u--input>
<image class="tx-jt" :src="imgBgUrl + 'yjt.png'" mode=""></image> </view>
</view>
<view class="">
<view class="tit">
营业地址
</view> </view>
</u-form-item>
<u-form-item label="营业地址" borderBottom ref="item1">
<view class="tx" @click="chooseLoca"> <view class="tx" @click="chooseLoca">
<u--input disabled v-model="model1.businessAddressContent" placeholder="请输入" border="none" <u--input disabled v-model="model1.businessAddressContent" placeholder="请输入" border="none"
inputAlign='right'></u--input> inputAlign='left' :customStyle="cty"></u--input>
<image class="tx-jt" :src="imgBgUrl + 'yjt.png'" mode=""></image> </view>
</view>
<view class="">
<view class="tit">
详细地址
</view> </view>
</u-form-item>
<u-form-item label="详细地址" borderBottom ref="item1">
<view class="tx"> <view class="tx">
<u--input v-model="model1.businessAddressInfo" placeholder="请输入" border="none" <u--input v-model="model1.businessAddressInfo" placeholder="请输入" border="none" inputAlign='left'
inputAlign='right'></u--input> :customStyle="cty"></u--input>
<image class="tx-jt" :src="imgBgUrl + 'yjt.png'" mode=""></image> </view>
</view>
<view class="">
<view class="tit">
法人姓名
</view> </view>
</u-form-item>
<u-form-item label="法人姓名" borderBottom ref="item1">
<view class="tx"> <view class="tx">
<u--input v-model="model1.corporationName" placeholder="请输入" border="none" <u--input v-model="model1.corporationName" placeholder="请输入" border="none" inputAlign='left'
inputAlign='right'></u--input> :customStyle="cty"></u--input>
<image class="tx-jt" :src="imgBgUrl + 'yjt.png'" mode=""></image> </view>
</view>
<view class="">
<view class="tit">
法人联系电话
</view> </view>
</u-form-item>
<u-form-item label="法人联系电话" :borderBottom="false" ref="item1">
<view class="tx"> <view class="tx">
<u--input v-model="model1.corporationMobile" placeholder="请输入" border="none" <u--input v-model="model1.corporationMobile" placeholder="请输入" border="none" inputAlign='left'
inputAlign='right' type="number"></u--input> :customStyle="cty"></u--input>
<image class="tx-jt" :src="imgBgUrl + 'yjt.png'" mode=""></image>
</view> </view>
</u-form-item> </view>
</u--form>
</view> </view>
<view class="index-cetn"> <view class="index-cetn">
<view class="index-cetn-tit"> <view class="index-cetn-tit">
收款账户 收款账户
</view> </view>
<view class="" <view class="">
style="display: flex;align-items: center;justify-content: space-between;padding: 40rpx 0 50rpx;">
<view class="tit"> <view class="tit">
开户行 开户行
</view> </view>
<view class="tx"> <view class="tx">
<u--input v-model="model1.bank" placeholder="请输入" border="none" inputAlign='right'></u--input> <u--input v-model="model1.bank" placeholder="请输入" border="none" inputAlign='left'
<image class="tx-jt" :src="imgBgUrl + 'yjt.png'" mode=""></image> :customStyle="cty"></u--input>
<!-- <image class="tx-jt" :src="imgBgUrl + 'yjt.png'" mode=""></image> -->
</view> </view>
</view> </view>
<view class="xin"></view> <!-- <view class="xin"></view> -->
<view class="" <view class="">
style="display: flex;align-items: center;justify-content: space-between;padding: 40rpx 0 50rpx;">
<view class="tit"> <view class="tit">
银行卡号 银行卡号
</view> </view>
<view class="tx"> <view class="tx">
<u--input type="number" v-model="model1.bankNumber" placeholder="请输入" border="none" <u--input type="number" v-model="model1.bankNumber" placeholder="请输入" border="none"
inputAlign='right'></u--input> inputAlign='left' :customStyle="cty"></u--input>
<image class="tx-jt" :src="imgBgUrl + 'yjt.png'" mode=""></image> <!-- <image class="tx-jt" :src="imgBgUrl + 'yjt.png'" mode=""></image> -->
</view> </view>
</view> </view>
<view class="tit" style="margin-bottom: 10rpx;"> <view class="tit" style="margin-bottom: 10rpx;">
...@@ -112,7 +131,8 @@ ...@@ -112,7 +131,8 @@
<view class="tit" style="margin-bottom: 10rpx;"> <view class="tit" style="margin-bottom: 10rpx;">
商家头像 商家头像
</view> </view>
<com-upload :maxCount="1" :register="true" ref="business" imgType="takePictures" @changeList="changeLists"></com-upload> <com-upload :maxCount="1" :register="true" ref="business" imgType="takePictures"
@changeList="changeLists"></com-upload>
<view class="index-cetn-tit" style="margin-top: 20rpx;"> <view class="index-cetn-tit" style="margin-top: 20rpx;">
商家介绍 商家介绍
...@@ -127,7 +147,8 @@ ...@@ -127,7 +147,8 @@
'padding':'20rpx' 'padding':'20rpx'
}" border="none"></u--textarea> }" border="none"></u--textarea>
<view class="picture"> <view class="picture">
<com-upload ref="upload" :register="true" imgType="takePictures" @changeList="changeList1"></com-upload> <com-upload ref="upload" :register="true" imgType="takePictures"
@changeList="changeList1"></com-upload>
</view> </view>
</view> </view>
</view> </view>
...@@ -137,36 +158,32 @@ ...@@ -137,36 +158,32 @@
</view> --> </view> -->
<view class="index-cetn"> <view class="index-cetn">
<view class="" <view class="">
style="display: flex;align-items: center;justify-content: space-between;padding: 40rpx 0 50rpx;">
<view class="tit"> <view class="tit">
登录账号 登录账号
</view> </view>
<view class="tx"> <view class="tx">
<u--input v-model="model1.userName" placeholder="请输入" border="none" inputAlign='right'></u--input> <u--input v-model="model1.userName" placeholder="请输入" border="none" inputAlign='left'
<image class="tx-jt" :src="imgBgUrl + 'yjt.png'" mode=""></image> :customStyle="cty"></u--input>
</view> </view>
</view> </view>
<view class="xin"></view> <view class="">
<view class=""
style="display: flex;align-items: center;justify-content: space-between;padding: 40rpx 0 50rpx;">
<view class="tit"> <view class="tit">
登录密码 登录密码
</view> </view>
<view class="tx"> <view class="tx">
<u--input v-model="model1.password" type="password" placeholder="请输入" border="none" inputAlign='right'></u--input> <u--input v-model="model1.password" type="password" placeholder="请输入" border="none"
<image class="tx-jt" :src="imgBgUrl + 'yjt.png'" mode=""></image> inputAlign='left' :customStyle="cty"></u--input>
</view> </view>
</view> </view>
<view class="xin"></view> <view class="">
<view class=""
style="display: flex;align-items: center;justify-content: space-between;padding: 40rpx 0 50rpx;">
<view class="tit"> <view class="tit">
确认密码 确认密码
</view> </view>
<view class="tx"> <view class="tx">
<u--input v-model="confirmPassword" type="password" placeholder="请输入" border="none" inputAlign='right'></u--input> <u--input v-model="confirmPassword" type="password" placeholder="请输入" border="none"
<image class="tx-jt" :src="imgBgUrl + 'yjt.png'" mode=""></image> inputAlign='left' :customStyle="cty"></u--input>
</view> </view>
</view> </view>
...@@ -218,14 +235,21 @@ ...@@ -218,14 +235,21 @@
dimension: '', dimension: '',
longitude: '', longitude: '',
businessIntroduce: '', businessIntroduce: '',
password:"", //密码 password: "", //密码
userName:"", userName: "",
businessIntroduceImg:"" //商家图片 businessIntroduceImg: "" //商家图片
}, },
confirmPassword:"", //确认密码 confirmPassword: "", //确认密码
rules: {}, rules: {},
userId: '', userId: '',
spread: '', // 分享 spread: '', // 分享
cty: {
width: '630rpx',
height: '96rpx',
backgroundColor: 'rgba(143, 146, 161, 0.08)',
borderRadius: '20rpx',
padding: "0 20rpx"
}
}; };
}, },
computed: { computed: {
...@@ -288,8 +312,8 @@ ...@@ -288,8 +312,8 @@
this.model1.businessImg = JSON.stringify(v) this.model1.businessImg = JSON.stringify(v)
}, },
//商家图片 //商家图片
changeList1(v){ changeList1(v) {
console.log(v,"获取商家图片") console.log(v, "获取商家图片")
this.model1.businessIntroduceImg = JSON.stringify(v) this.model1.businessIntroduceImg = JSON.stringify(v)
}, },
// 保存 // 保存
...@@ -323,7 +347,7 @@ ...@@ -323,7 +347,7 @@
if (!self.model1.corporationMobile) { if (!self.model1.corporationMobile) {
return uni.$u.toast('请输入法人联系电话'); return uni.$u.toast('请输入法人联系电话');
} }
if(!self.$utilsMethods.phoneFun(self.model1.corporationMobile)){ if (!self.$utilsMethods.phoneFun(self.model1.corporationMobile)) {
return uni.$u.toast('请输入正确的手机号') return uni.$u.toast('请输入正确的手机号')
} }
//开户行 //开户行
...@@ -343,22 +367,23 @@ ...@@ -343,22 +367,23 @@
return uni.$u.toast('请输入商家头像'); return uni.$u.toast('请输入商家头像');
} }
let licenseImg = JSON.parse(self.model1.licenseImg) let licenseImg = JSON.parse(self.model1.licenseImg)
licenseImg.forEach((item)=>{ licenseImg.forEach((item) => {
item.url = item.url+'?x-oss-process=image/watermark,text_5LuF6ZmQ5aSH5qGI5L2_55So' item.url = item.url + '?x-oss-process=image/watermark,text_5LuF6ZmQ5aSH5qGI5L2_55So'
}) })
self.model1.licenseImg = JSON.stringify(licenseImg) self.model1.licenseImg = JSON.stringify(licenseImg)
if(!self.model1.password){ if (!self.model1.password) {
return uni.$u.toast('请输入密码'); return uni.$u.toast('请输入密码');
} }
if(!self.confirmPassword){ if (!self.confirmPassword) {
return uni.$u.toast('请输入确认密码'); return uni.$u.toast('请输入确认密码');
} }
if(self.model1.password !== self.confirmPassword){ if (self.model1.password !== self.confirmPassword) {
return uni.$u.toast('密码和确认密码不一致'); return uni.$u.toast('密码和确认密码不一致');
} }
this.model1.spread=self.spread this.model1.spread = self.spread
// console.log(this.model1,"======================") console.log(this.model1,"======================")
merchantPOST({ merchantPOST({
...this.model1 ...this.model1
}).then((res) => { }).then((res) => {
...@@ -488,9 +513,9 @@ ...@@ -488,9 +513,9 @@
} }
.tit { .tit {
font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #333333; color: #333333;
margin: 20rpx 0;
} }
.nam { .nam {
...@@ -514,15 +539,19 @@ ...@@ -514,15 +539,19 @@
} }
::v-deep .u-input__content__field-wrapper__field { ::v-deep .u-input__content__field-wrapper__field {
background-color: #FFFFFF; //background-color: #FFFFFF;
} }
::v-deep .u-form-item__body { ::v-deep .u-form-item__body {
padding: 40rpx 0 50rpx !important; padding: 40rpx 0 50rpx !important;
} }
.com-textarea-box{ .com-textarea-box {
padding-bottom: 20rpx; padding-bottom: 20rpx;
background: #F6F7F8; background: #F6F7F8;
} }
.inp {
background: red;
}
</style> </style>
\ No newline at end of file
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