Commit d2a1e9a7 by honghong

商家端和员工端合并

parent af85162f
node_modules/
.project
unpackage/
.DS_Store
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
}, },
onShow: function() { onShow: function() {
console.log('App Show'); console.log('App Show');
this.phone(); this.phone();
this.configuration(); this.configuration();
wx.hideShareMenu(); wx.hideShareMenu();
...@@ -35,7 +36,6 @@ ...@@ -35,7 +36,6 @@
this.globalData.navBarHeight = menuButtonInfo.bottom - info.statusBarHeight + (menuButtonInfo.top - info this.globalData.navBarHeight = menuButtonInfo.bottom - info.statusBarHeight + (menuButtonInfo.top - info
.statusBarHeight) + info.statusBarHeight; .statusBarHeight) + info.statusBarHeight;
this.globalData.navBarHeightRpx = this.globalData.navBarHeight / info.screenWidth * 750; this.globalData.navBarHeightRpx = this.globalData.navBarHeight / info.screenWidth * 750;
// 底部安全距离,单位px
// #endif // #endif
}, },
configuration() { configuration() {
...@@ -60,14 +60,14 @@ ...@@ -60,14 +60,14 @@
}, },
globalData: { globalData: {
navBarHeight: null, navBarHeight: null,
navBarHeightRpx:null navBarHeightRpx:null,
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */ /* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
@import "uview-ui/index.scss"; @import 'uni_modules/uview-ui/index.scss';
@import url("common/both.css"); @import url("common/both.css");
@import url("common/common.css"); @import url("common/common.css");
......
# uniapp--vue2模板
#### Description
uniapp--vue2模板
#### Software Architecture
Software architecture description
#### Installation
1. xxxx
2. xxxx
3. xxxx
#### Instructions
1. xxxx
2. xxxx
3. xxxx
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
import {
ApiHttp
} from '@/utils/request.js'
// const orderStatisticsPOST = (params) => {
// return ApiHttp('/system/oss/upload', params, 'POST')
// }
import apiBaseConfig from '@/config/index.js'
const orderStatisticsPOST = apiBaseConfig.domain + '/system/oss/upload'
const ordersjUploadPOST = apiBaseConfig.domain + '/system/oss/sjUpload'
export {
orderStatisticsPOST,
ordersjUploadPOST
}
...@@ -43,17 +43,38 @@ const getUserProfile = () => { ...@@ -43,17 +43,38 @@ const getUserProfile = () => {
}); });
} }
const getLoginCode = () => {
return new Promise((resolve, reject) => {
uni.login({
provider: 'weixin',
success: res => {
console.log('res-login', res);
console.log('code', res.code);
resolve(res);
}
});
});
}
const xcxLoginGET = (params) => {
return ApiHttp('/xcxLogin', params, 'GET')
}
const phoneWxPOST = (params) => {
return ApiHttp('/app-fund/login', params, 'POST')
}
const axiosloginAccount = (params) => { const axiosloginAccount = (params) => {
return ApiHttp('/app-fund/staffLogin', params, 'POST') return ApiHttp('/app-fund/staffLogin', params, 'POST')
} }
export { export {
login, login,
loginOut, loginOut,
getUserProfile, getUserProfile,
getLoginCode,
loginPhone, loginPhone,
loginUserInfo, loginUserInfo,
getDealerPhone, getDealerPhone,
xcxLoginGET,
phoneWxPOST,
axiosloginAccount axiosloginAccount
} }
...@@ -3,20 +3,22 @@ ...@@ -3,20 +3,22 @@
<u-popup :show="show" mode="bottom" @close="close" @open="open" v-if="show"> <u-popup :show="show" mode="bottom" @close="close" @open="open" v-if="show">
<view class="p-three"> <view class="p-three">
<view class="com-textarea-box"> <view class="com-textarea-box">
<u--textarea :cursorSpacing="100" class="com-textarea" :focus="focus" placeholder="友善评论" <!-- :cursorSpacing="100" -->
<u--textarea autoHeight v-model="content" class="com-textarea" :focus="focus" :placeholder="isReply ? '回复' + replyName : '友善评论'"
:customStyle="{ :customStyle="{
'background':'#F6F7F8', 'background':'#F6F7F8',
'font-size':'28rpx', 'font-size':'28rpx',
'fontWeight':'bold', 'fontWeight':'bold',
'color':'#333 !important', 'color':'#333 !important',
'padding':'20rpx' 'padding':'20rpx'
}" autoHeigh border="none"></u--textarea> }" border="none"></u--textarea>
<view class="picture" v-if="!isReply"> <view class="picture">
<!-- v-if="!isReply" -->
<com-upload ref="upload" imgType="takePictures" @changeList="changeList"></com-upload> <com-upload ref="upload" imgType="takePictures" @changeList="changeList"></com-upload>
</view> </view>
</view> </view>
<view class="d-flex a-center j-sb send"> <view class="d-flex a-center j-end send">
<image class="camera" src="@/static/images/camera.png" mode=""></image> <!-- <image class="camera" src="@/static/images/camera.png" mode=""></image> -->
<view class="small-button" @click="postComments">发送</view> <view class="small-button" @click="postComments">发送</view>
</view> </view>
</view> </view>
...@@ -30,15 +32,29 @@ ...@@ -30,15 +32,29 @@
isReply:{ isReply:{
type:Boolean, type:Boolean,
default:false, default:false,
},
replyName:{
type:String,
default:''
} }
}, },
data() { data() {
return { return {
show: false, show: false,
focus: true, //是否自动获取焦点弹出系统键盘 focus: true, //是否自动获取焦点弹出系统键盘
content:'',
contentImg:''
} }
}, },
methods: { methods: {
changeList(v) {
let imageArr = []
v.map(item=>{
imageArr.push(item.url)
})
this.contentImg = imageArr.join(',')
},
open() { open() {
this.show = true; this.show = true;
console.log('open'); console.log('open');
...@@ -50,6 +66,7 @@ ...@@ -50,6 +66,7 @@
// 发送按钮点击事件 // 发送按钮点击事件
postComments() { postComments() {
console.log("发布评论"); console.log("发布评论");
this.$emit('send')
this.show = false; this.show = false;
}, },
blur() { blur() {
......
<template>
<view>
<view>
<view class="container" @click="handleDemandDetail(rowData.demandId)">
<view class="text-overflow-one title">{{rowData.demandTitle}}</view>
<view class="d-flex a-center" style="margin-top: 16rpx;">
<image class="avatar" :src="rowData.avatar" mode="widthFix"></image>
<view class="name">{{rowData.nickName}}</view>
</view>
<view class="d-flex a-center j-sb" style="margin: 16rpx 0;">
<view class="area">投影面积: <span>{{rowData.projectedArea}}</span></view>
<view class="address">装修地址: <span>{{rowData.decorationAddress}}</span></view>
</view>
<view class="d-flex a-center j-sb operate">
<view class="d-flex a-center">
<view class="operate-budget">全屋定制预算:</view>
<view class="operate-price">{{rowData.budget}}</view>
</view>
<view v-if="isInclude" class="operate-delete" @click.stop="handleDelete(rowData.demandId)">删除</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
mapGetters
} from 'vuex'
export default {
props: {
rowData: {
type: Object,
default: () => {}
},
isInclude:{
type:Boolean,
default:false
}
},
data() {
return {
}
},
methods: {
handleDemandDetail(demandId) {
uni.navigateTo({
url: `/homePage/demand/detail?demandId=${demandId}`
})
},
handleDelete(demandId) {
this.$emit('delete',demandId)
}
}
}
</script>
<style lang="scss" scoped>
.container {
padding: 26rpx 30rpx;
background: #fff;
border-radius: 16rpx;
margin-bottom: 20rpx;
.title {
font-size: 30rpx;
color: #303949;
font-weight: bold;
}
.avatar {
width: 48rpx;
height: 48rpx;
background: #F83D3D;
border-radius: 50%;
}
.name {
font-size: 26rpx;
color: #303949;
font-weight: bold;
margin: 0 8rpx;
}
.area,
.address {
font-size: 24rpx;
color: #666666;
}
span {
color: #333333;
font-weight: bold;
}
.operate {
padding-top: 10rpx;
border-top: 1px solid #ECECEC;
&-budget {
font-size: 24rpx;
color: #666666;
}
&-price {
font-size: 30rpx;
color: #1572FF;
font-weight: bold;
margin-left: 8rpx;
}
&-delete {
font-size: 24rpx;
color: #FF3141;
}
}
}
</style>
\ No newline at end of file
<template> <template>
<view> <view>
<view class="dynamic"> <view class="dynamic">
<view class="dynamic-title">动态标题动态标题动态标题动态标题动态标题动态标题动态标题动态标题动态标题动态标题</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;">
<image class="dynamic-avatar" src="https://img0.baidu.com/it/u=1893171979,2260795920&fm=253&fmt=auto&app=120&f=JPEG?w=506&h=500" <image class="dynamic-avatar" :src="itemDetail.avatar"
mode="widthFix"></image> mode="widthFix"></image>
<view class="dynamic-name">刘佳怡</view> <view class="dynamic-name">{{itemDetail.nickName}}</view>
</view> </view>
<view class="dynamic-content text-overflow-two">评价内容评价内容评价内容评价内容, 评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容, <view class="dynamic-content text-overflow-two" v-if="itemDetail && itemDetail.content">
评价内容评价内容评价内容评价内容</view> <u-parse :content="this.$utilsMethods.replaceSpecialCharFixed(itemDetail.content)"></u-parse>
</view>
<!-- <view class="dynamic-content text-overflow-two">{{itemDetail.content}}</view>
<view class="d-flex flex-wrap dynamic-picture"> <view class="d-flex flex-wrap dynamic-picture">
<image @click="previewImage(item.picUrl)" v-for="(info,ix) in 3" class="dynamic-picture-item" <image @click="previewImage(item.picUrl)" v-for="(info,ix) in 3" class="dynamic-picture-item"
src="https://img0.baidu.com/it/u=1893171979,2260795920&fm=253&fmt=auto&app=120&f=JPEG?w=506&h=500" src="https://img0.baidu.com/it/u=1893171979,2260795920&fm=253&fmt=auto&app=120&f=JPEG?w=506&h=500"
mode="widthFix"></image> mode="widthFix"></image>
</view> </view> -->
<view class="dynamic-date">2024.02.15 10:26:45</view> <view class="dynamic-date">{{itemDetail.createTime}}</view>
<view class="d-flex a-center j-sb mt-two"> <view class="d-flex a-center j-sb mt-two" v-if="showState">
<view class="d-flex a-center "> <view class="d-flex a-center ">
<view class="d-flex a-center dynamic-operate"> <view class="d-flex a-center dynamic-operate">
<image src="@/static/images/zan.png" mode=""></image> <image @click.stop="changeLikeState(itemDetail)" :src="itemDetail.isLiked ? require('@/static/images/zan-selected.png') : require('@/static/images/zan.png')" mode=""></image>
<!-- <image src="@/static/images/zan-selected.png" mode=""></image> --> <view>{{itemDetail.likesCount}}</view>
<view>124</view>
</view> </view>
<view class="d-flex a-center dynamic-operate"> <view class="d-flex a-center dynamic-operate">
<image src="@/static/images/collect.png" mode=""></image> <image @click.stop="changeCollectState(itemDetail)" :src="itemDetail.isFavorites ? require('@/static/images/collect-selected.png') : require('@/static/images/collect.png')" mode=""></image>
<!-- <image src="@/static/images/collect-selected.png" mode=""></image> --> <view>{{itemDetail.favoritesCount}}</view>
<view>124</view>
</view> </view>
<view class="d-flex a-center dynamic-operate"> <view class="d-flex a-center dynamic-operate">
<image src="@/static/images/message.png" mode=""></image> <image src="@/static/images/message.png" mode=""></image>
<view>124</view> <view>{{itemDetail.commentsCount}}</view>
</view> </view>
</view> </view>
<view v-if="isDelete" class="dynamic-delete">删除</view> <view class="d-flex">
<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>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import {
mapGetters
} from 'vuex'
import {
likeOrUnlike,
collectOrUncollect
} from '@/api/workbench/index.js'
export default { export default {
props:{ props:{
itemDetail:{
type:Object,
default:()=>{}
},
showAuthor:{ showAuthor:{
type:Boolean, type:Boolean,
default:false default:false
},//是否显示用户信息
showState:{
type:Boolean,
default:true
},//是否显示收藏状态
isEdit:{
type:Boolean,
default:false
}, },
isDelete:{ isDelete:{
type:Boolean, type:Boolean,
default:false default:false
} }
}, },
computed: {
...mapGetters({
userInfot: 'userInfo'
})
},
methods: { methods: {
// 预览图片 // 预览图片
previewImage() {} previewImage() {},
handleDelete(forumId){
this.$emit('delete',forumId)
},
// 编辑
handleEdit(forumId){
this.$emit('edit',forumId)
},
// 修改点赞状态
changeLikeState(row) {
let self = this
likeOrUnlike({
forumId: row.forumId,
userId: this.userInfot.userId,
isLikeType: 1, //论坛1评论2
}).then(res => {
uni.showToast({
title:'操作成功!',
icon:'none'
})
self.$emit('refersh')
})
},
// 修改收藏状态
changeCollectState(row){
let self = this
collectOrUncollect({
forumId: row.forumId,
userId: this.userInfot.userId,
isFavoritesType: 1, // 论坛1商家2
favoriteType:'invitation'
}).then(res => {
uni.showToast({
title:'操作成功!',
icon:'none'
})
self.$emit('refersh')
})
}
} }
} }
</script> </script>
...@@ -60,25 +125,25 @@ ...@@ -60,25 +125,25 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.dynamic { .dynamic {
&-title { &-title {
font-size: 26rpx; font-size: 30rpx;
color: #303949; color: #303949;
font-weight: bold; font-weight: bold;
} }
&-avatar{ &-avatar{
width: 48rpx; width: 50rpx;
height: 48rpx; height: 50rpx;
background: #F83D3D; background: #F83D3D;
border-radius: 50%; border-radius: 50%;
} }
&-name{ &-name{
font-size: 26rpx; font-size: 28rpx;
color: #303949; color: #303949;
font-weight: bold; font-weight: bold;
margin: 0 8rpx; margin: 0 8rpx;
} }
&-content { &-content {
font-size: 24rpx; font-size: 26rpx;
color: #666666; color: #666666;
line-height: 32rpx; line-height: 32rpx;
margin-top: 12rpx; margin-top: 12rpx;
...@@ -103,12 +168,12 @@ ...@@ -103,12 +168,12 @@
&-operate { &-operate {
>image { >image {
width: 36rpx; width: 40rpx;
height: 36rpx; height: 40rpx;
} }
>view { >view {
font-size: 24rpx; font-size: 26rpx;
color: #666666; color: #666666;
margin-left: 8rpx; margin-left: 8rpx;
} }
...@@ -124,13 +189,25 @@ ...@@ -124,13 +189,25 @@
} }
&-date { &-date {
font-size: 22rpx; font-size: 24rpx;
color: #999999; color: #999999;
margin-top: 16rpx; margin-top: 16rpx;
} }
&-delete{ &-delete{
font-size: 24rpx; font-size: 26rpx;
color: #FF3141; color: #FF3141;
} }
} }
.picture {
width: 200rpx;
height: 200rpx;
background: linear-gradient(180deg, #EEEEEE 0%, #D8D8D8 100%);
border-radius: 12rpx;
margin-top: 16rpx;
}
// 除了3倍数以外的元素
.picture:not(:nth-child(3n+3)) {
margin-right: 16rpx;
}
</style> </style>
\ No newline at end of file
<template>
<view>
<view class="dynamic">
<image :src="itemDetail.imgs[0]" mode="aspectFit" class="bg"></image>
<view class="" style="padding: 20rpx;">
<!-- <view class="dynamic-title">{{itemDetail.forumTitle}}</view> -->
<!-- <view v-if="showAuthor" class="d-flex a-center" style="margin-top: 16rpx;">
<image class="dynamic-avatar" :src="itemDetail.avatar"
mode="widthFix"></image>
<view class="dynamic-name">{{itemDetail.nickName}}</view>
</view> -->
<view class="dynamic-content text-overflow-two" v-if="itemDetail && itemDetail.forumTitle">
<!-- <u-parse :content="this.$utilsMethods.replaceSpecialCharFixed(itemDetail.content)"></u-parse> -->
{{itemDetail.forumTitle}}
</view>
<!-- <view class="dynamic-content text-overflow-two">{{itemDetail.content}}</view>
<view class="d-flex flex-wrap dynamic-picture">
<image @click="previewImage(item.picUrl)" v-for="(info,ix) in 3" class="dynamic-picture-item"
src="https://img0.baidu.com/it/u=1893171979,2260795920&fm=253&fmt=auto&app=120&f=JPEG?w=506&h=500"
mode="widthFix"></image>
</view> -->
<view class="dynamic-date">{{itemDetail.createTime}}</view>
<view class="d-flex a-center j-sb mt-two" >
<view class="d-flex a-center " style="width: 100%; justify-content: space-between;">
<view class="d-flex a-center" >
<image class="dynamic-avatar" :src="itemDetail.avatar"
mode="aspectFit"></image>
<view class="dynamic-name">{{itemDetail.nickName}}</view>
</view>
<view class="d-flex a-center dynamic-operate">
<image @click.stop="changeLikeState(itemDetail)" :src="itemDetail.isLiked ? require('@/static/images/zan-selected.png') : require('@/static/images/zan.png')" mode=""></image>
<view>{{itemDetail.likesCount||0}}</view>
</view>
<!-- <view class="d-flex a-center dynamic-operate">
<image @click.stop="changeCollectState(itemDetail)" :src="itemDetail.isFavorites ? require('@/static/images/collect-selected.png') : require('@/static/images/collect.png')" mode=""></image>
<view>{{itemDetail.favoritesCount}}</view>
</view>
<view class="d-flex a-center dynamic-operate">
<image src="@/static/images/message.png" mode=""></image>
<view>{{itemDetail.commentsCount}}</view>
</view> -->
</view>
<view class="d-flex">
<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>
</view>
</view>
</view>
</view>
</template>
<script>
import {
mapGetters
} from 'vuex'
import {
likeOrUnlike,
collectOrUncollect
} from '@/api/workbench/index.js'
export default {
props:{
itemDetail:{
type:Object,
default:()=>{}
},
showAuthor:{
type:Boolean,
default:false
},//是否显示用户信息
showState:{
type:Boolean,
default:true
},//是否显示收藏状态
isEdit:{
type:Boolean,
default:false
},
isDelete:{
type:Boolean,
default:false
}
},
computed: {
...mapGetters({
userInfot: 'userInfo'
})
},
methods: {
// 预览图片
previewImage() {},
handleDelete(forumId){
this.$emit('delete',forumId)
},
// 编辑
handleEdit(forumId){
this.$emit('edit',forumId)
},
// 修改点赞状态
changeLikeState(row) {
let self = this
console.log(row)
likeOrUnlike({
forumId: row.forumId,
userId: this.userInfot.userId,
isLikeType: 1, //论坛1评论2
}).then(res => {
uni.showToast({
title:'操作成功!',
icon:'none'
})
self.$emit('refersh')
})
},
// 修改收藏状态
changeCollectState(row){
let self = this
collectOrUncollect({
forumId: row.forumId,
userId: this.userInfot.userId,
isFavoritesType: 1, // 论坛1商家2
favoriteType:'invitation'
}).then(res => {
uni.showToast({
title:'操作成功!',
icon:'none'
})
self.$emit('refersh')
})
}
}
}
</script>
<style lang="scss" scoped>
.dynamic {
.bg{
width: 100%;
height: 300rpx;
display: block;
border-radius: 16rpx 16rpx 0 0;
}
&-title {
font-size: 30rpx;
color: #303949;
font-weight: bold;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
}
&-avatar{
width: 50rpx;
height: 50rpx;
border-radius: 50%;
}
&-name{
font-size: 24rpx;
color: #666666;
font-weight: bold;
margin: 0 8rpx;
flex: 1;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
text-overflow: ellipsis;
}
&-content {
font-size: 26rpx;
color: #666666;
margin-top: 12rpx;
height: 66rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
}
&-picture {
&-item {
width: 200rpx;
height: 200rpx;
background: linear-gradient(180deg, #EEEEEE 0%, #D8D8D8 100%);
border-radius: 12rpx;
margin-top: 16rpx;
}
// 除了3倍数以外的元素
&-item:not(:nth-child(3n+3)) {
margin-right: 16rpx;
}
}
&-operate {
>image {
width: 40rpx;
height: 40rpx;
}
>view {
font-size: 26rpx;
color: #666666;
margin-left: 8rpx;
}
}
// &-operate:not(:first-child) {
// margin-left: 40rpx;
// }
&-picture:after {
content: '';
width: 200rpx;
}
&-date {
font-size: 24rpx;
color: #999999;
margin-top: 16rpx;
}
&-delete{
font-size: 26rpx;
color: #FF3141;
}
}
.picture {
width: 200rpx;
height: 200rpx;
background: linear-gradient(180deg, #EEEEEE 0%, #D8D8D8 100%);
border-radius: 12rpx;
margin-top: 16rpx;
}
// 除了3倍数以外的元素
.picture:not(:nth-child(3n+3)) {
margin-right: 16rpx;
}
</style>
\ No newline at end of file
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
} }
.inv-h { .inv-h {
font-size: 24rpx; font-size: 26rpx;
text-align: center; text-align: center;
color: #666666; color: #666666;
height: 100rpx; height: 100rpx;
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
} }
.inv-h-se,.inv-h-center { .inv-h-se,.inv-h-center {
font-size: 30rpx; font-size: 32rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: bold; font-weight: bold;
color: #242424; color: #242424;
......
...@@ -2,104 +2,165 @@ ...@@ -2,104 +2,165 @@
<view class="evaluate"> <view class="evaluate">
<view class="evaluate-box"> <view class="evaluate-box">
<view class="evaluate-box-item d-flex"> <view class="evaluate-box-item d-flex">
<image <image @click="handleJumpPerson(itemDetail)" :src="itemDetail.avatar" mode="aspectFill"
src="https://img0.baidu.com/it/u=1893171979,2260795920&fm=253&fmt=auto&app=120&f=JPEG?w=506&h=500" class="avatar-parent"></image>
mode="aspectFill" class="avatar-parent"></image>
<view class="evaluate-box-item-main ml-two flex-1"> <view class="evaluate-box-item-main ml-two flex-1">
<!-- 父评论体-start --> <!-- 父评论体-start -->
<view class="d-flex a-center j-sb"> <view class="d-flex a-center j-sb">
<view class="d-flex"> <view class="d-flex">
<view class="evaluate-box-item-main-nickname"> <view class="evaluate-box-item-main-nickname">
李哈哈 {{itemDetail.nickName}}
</view> </view>
<view class="evaluate-box-item-main-state" v-if="showState"> <view class="evaluate-box-item-main-state" v-if="showState && itemDetail.contractNo">
已下单 已下单
</view> </view>
</view> </view>
<view class="evaluate-box-item-main-zan d-flex a-center"> <view class="evaluate-box-item-main-zan d-flex a-center">
<image <image @click="changeLikeState(itemDetail)"
src="https://duoke-card.oss-cn-hangzhou.aliyuncs.com/A0gxSGwrgBvn890d208d4d79baec3a208abafd2096ee.png" /> :src="itemDetail.isLiked ? require('@/static/images/zan-selected.png') : require('@/static/images/zan.png')" />
<view>20</view> <view>{{itemDetail.likesNum}}</view>
</view> </view>
</view> </view>
<view class="evaluate-box-item-main-content"> <view class="evaluate-box-item-main-content" @click="handleReply(itemDetail)">
评价内容评价内容评价内容评价内容, 评价内容评价内容评价内容评价内容 {{itemDetail.content}}
<view @click="prviewImage(item.picUrl)" class="d-flex flex-wrap j-sb picture"> <view class="d-flex flex-wrap j-sb picture" v-if="itemDetail.contentImg">
<image v-for="(info,ix) in 3" class="picture-item" <image v-for="(info,ix) in itemDetail.contentImg.split(',')" :key="ix" class="picture-item"
src="https://img0.baidu.com/it/u=1893171979,2260795920&fm=253&fmt=auto&app=120&f=JPEG?w=506&h=500" :src="info" mode="" @click.stop="prviewImage(itemDetail.contentImg,ix)"></image>
mode="widthFix"></image>
</view> </view>
</view> </view>
<view class="evaluate-box-item-main-foot d-flex a-center"> <view class="evaluate-box-item-main-foot d-flex a-center">
<view class="evaluate-box-item-main-foot-time">2024.02.15 10:26:45</view> <view class="evaluate-box-item-main-foot-time">{{itemDetail.createTime}}</view>
<view class="evaluate-box-item-main-foot-btn" @click="handleReply">回复</view> <view class="evaluate-box-item-main-foot-btn" @click="handleReply(itemDetail)">回复</view>
</view> </view>
<!-- 父评论体-end --> <!-- 父评论体-end -->
<!-- 子评论列表-start --> <!-- 子评论列表-start -->
<view> <view>
<view v-for="(each, index) in 2" :key="index" style="margin-top: 28rpx;"> <view v-for="(each, index) in itemDetail.commentsVoList" :key="index"
v-if="isFold ? true : index == 0" style="margin-top: 28rpx;">
<view class="d-flex"> <view class="d-flex">
<image class="avatar-parent" <image @click="handleJumpPerson(each)" class="avatar-parent" :src="each.avatar" mode="">
src="https://img2.baidu.com/it/u=3677186369,786366007&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500" </image>
mode=""></image>
<view class="evaluate-box-item-main ml-two flex-1"> <view class="evaluate-box-item-main ml-two flex-1">
<view class="d-flex a-center j-sb"> <view class="d-flex a-center j-sb">
<view class="evaluate-box-item-main-nickname"> <view class="evaluate-box-item-main-nickname">
哥萨克 回复 刘佳怡 {{each.nickName}} 回复 {{each.sonNickName}}
</view> </view>
<view class="evaluate-box-item-main-zan d-flex a-center"> <view class="evaluate-box-item-main-zan d-flex a-center">
<image <image @click="changeLikeState(each)"
src="https://duoke-card.oss-cn-hangzhou.aliyuncs.com/A0gxSGwrgBvn890d208d4d79baec3a208abafd2096ee.png" /> :src="each.isLiked ? require('@/static/images/zan-selected.png') : require('@/static/images/zan.png')" />
<view>20</view> <view>{{each.likesNum}}</view>
</view> </view>
</view> </view>
<view class="evaluate-box-item-main-content"> <view class="evaluate-box-item-main-content" @click="handleReplyChild(each)">
评价内容评价内容评价内容评价内容, 评价内容评价内容评价内容评价内容 {{each.content}}
<view class="d-flex flex-wrap picture " v-if="each.contentImg">
<image v-for="(info,ix) in each.contentImg.split(',')" :key="ix"
class="picture-item" style="margin-right: 10rpx;" :src="info" mode=""
@click.stop="prviewImage(each.contentImg,ix)"></image>
</view>
</view> </view>
<view class="evaluate-box-item-main-foot d-flex a-center"> <view class="evaluate-box-item-main-foot d-flex a-center">
<view class="evaluate-box-item-main-foot-time">2024.02.15 10:26:45</view> <view class="evaluate-box-item-main-foot-time">{{each.createTime}}</view>
<view class="evaluate-box-item-main-foot-btn">回复</view> <view class="evaluate-box-item-main-foot-btn" @click="handleReplyChild(each)">回复
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="fold-more d-flex a-center"> <view v-if="!isFold && itemDetail.commentsVoList.length > 1" class="fold-more d-flex a-center"
<view>展开更多回复</view> @click="handleShowMore">
<view class="placeholder"></view>
<view>展开{{itemDetail.commentsVoList.length - 1}}条回复</view>
<u-icon size="20" name="arrow-down" color="#333333"></u-icon> <u-icon size="20" name="arrow-down" color="#333333"></u-icon>
</view> --> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<commentPopup ref="childPopup" :isReply="true"></commentPopup> <!-- <commentPopup ref="childPopup" :isReply="true" ></commentPopup> -->
</view> </view>
</template> </template>
<script> <script>
import {
mapGetters
} from 'vuex'
import {
likeOrUnlike
} from '@/api/workbench/index.js'
import commentPopup from '@/components/custom/comment.vue' import commentPopup from '@/components/custom/comment.vue'
export default { export default {
components: { components: {
commentPopup commentPopup
}, },
props:{ props: {
showState:{ showState: {
type:Boolean, type: Boolean,
default:false, default: false,
},
itemDetail: {
type: Object,
default: () => {}
} }
}, },
data() { data() {
return { return {
isFold: true, isFold: false,
} }
}, },
computed: {
...mapGetters({
userInfot: 'userInfo'
})
},
methods: { methods: {
handleReply(){ handleReply(row) {
this.$refs.childPopup.show = true; this.$emit('reply', row.commentId, row.userId, row.nickName)
// this.$parent.isReply = true
// this.$parent.$refs.childPopup.show = true
// this.$refs.childPopup.show = true;
},
handleJumpPerson(row) {
if (row.userType == 'merchant') {
uni.navigateTo({
url: `/homePage/merchant/index?businessId=${row.userId}`
})
} else {
uni.navigateTo({
url: `/homePage/merchant/personHomePage?userId=${row.userId}`
})
}
},
handleReplyChild(row) {
this.$emit('reply', row.repliedId, row.userId, row.nickName)
}, },
// 预览图片 // 预览图片
prviewImage() {} prviewImage(imageStr, index) {
uni.previewImage({
current: index, // 当前显示图片索引
urls: imageStr.split(',') // 需要预览的图片http链接列表
});
},
changeLikeState(row) {
let self = this
likeOrUnlike({
forumId: row.commentId,
userId: this.userInfot.userId,
isLikeType: 2, //论坛1评论2
}).then(res => {
console.log('改变')
self.$emit('refersh')
})
},
handleShowMore() {
this.isFold = true
}
} }
} }
</script> </script>
...@@ -119,11 +180,12 @@ ...@@ -119,11 +180,12 @@
&-main { &-main {
&-nickname { &-nickname {
font-size: 26rpx; font-size: 28rpx;
color: #303949; color: #303949;
font-weight: bold; font-weight: bold;
} }
&-state{
&-state {
height: 32rpx; height: 32rpx;
background: #e2edff; background: #e2edff;
border-radius: 8rpx; border-radius: 8rpx;
...@@ -135,19 +197,19 @@ ...@@ -135,19 +197,19 @@
&-zan { &-zan {
>image { >image {
width: 28rpx; width: 36rpx;
height: 28rpx; height: 36rpx;
} }
>view { >view {
font-size: 24rpx; font-size: 26rpx;
color: #666666; color: #666666;
margin-left: 12rpx; margin-left: 12rpx;
} }
} }
&-content { &-content {
font-size: 24rpx; font-size: 26rpx;
color: #666666; color: #666666;
margin: 16rpx 0; margin: 16rpx 0;
...@@ -171,12 +233,12 @@ ...@@ -171,12 +233,12 @@
&-foot { &-foot {
&-time { &-time {
font-size: 22rpx; font-size: 24rpx;
color: #999999; color: #999999;
} }
&-btn { &-btn {
font-size: 22rpx; font-size: 24rpx;
color: #333333; color: #333333;
margin-left: 20rpx; margin-left: 20rpx;
} }
...@@ -187,7 +249,10 @@ ...@@ -187,7 +249,10 @@
} }
.fold-more { .fold-more {
font-size: 22rpx; font-size: 26rpx;
color: #333333; color: #333333;
} }
.placeholder{
width: 72rpx;
}
</style> </style>
\ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<u-line v-if="homeShow" direction="column" :hairline="false" length="16" margin="0 8px"></u-line> <u-line v-if="homeShow" direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
<u-icon v-if="homeShow" @click="rightClick" name="home" size="30"></u-icon> <u-icon v-if="homeShow" @click="rightClick" name="home" size="30"></u-icon>
<view class="city" v-if="showLocation"> <view class="city" v-if="showLocation">
<image :src="imgBgUrl+'sydw.png'" mode=""></image> <image :src="imgBgUrl+'sydw1.png'" mode=""></image>
{{address}} {{address}}
</view> </view>
</view> </view>
...@@ -71,8 +71,11 @@ export default { ...@@ -71,8 +71,11 @@ export default {
methods: { methods: {
leftClick() { leftClick() {
console.log('====leftClick'); console.log('====leftClick');
this.$uniGo.navigateBack({ // this.$uniGo.navigateBack({
delta: 1 // delta: 1
// });
uni.navigateBack({
delta: 1
}); });
}, },
rightClick() { rightClick() {
......
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
<script> <script>
import apiBaseConfig from '@/config/index.js'; import apiBaseConfig from '@/config/index.js';
import { import {
orderStatisticsPOST orderStatisticsPOST,
ordersjUploadPOST
} from '@/api/upload.js'; } from '@/api/upload.js';
export default { export default {
props: { props: {
...@@ -48,7 +49,13 @@ ...@@ -48,7 +49,13 @@
height: { height: {
type: Number, type: Number,
default: 170 default: 170
} },
//是否注册页面上传图片
register:{
type: Boolean,
default: false
}
}, },
data() { data() {
return { return {
...@@ -59,7 +66,7 @@ ...@@ -59,7 +66,7 @@
}, },
watch: { watch: {
fileList6: { fileList6: {
handler(val,old) { handler(val,old) {
let self = this, let self = this,
are = []; are = [];
if (self.fileList6 && self.fileList6.length) { if (self.fileList6 && self.fileList6.length) {
...@@ -89,7 +96,6 @@ ...@@ -89,7 +96,6 @@
self.fileList6 = arr; self.fileList6 = arr;
} }
}, },
// 删除图片
deletePic(event) { deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1); this[`fileList${event.name}`].splice(event.index, 1);
}, },
...@@ -131,10 +137,11 @@ ...@@ -131,10 +137,11 @@
} }
}, },
uploadFilePromise(url) { uploadFilePromise(url) {
let token = uni.getStorageSync("token") let token = uni.getStorageSync("token")
console.log(this.register,"ordersjUploadPOST=================")
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let a = uni.uploadFile({ let a = uni.uploadFile({
url: orderStatisticsPOST, // 仅为示例,非真实的接口地址 url: this.register==true?ordersjUploadPOST:orderStatisticsPOST, // 仅为示例,非真实的接口地址
filePath: url, filePath: url,
name: 'file', name: 'file',
formData: { formData: {
......
let hostUrl = 'https://fundapi.yyinhong.cn', let hostUrl = '',
api = '/prod-api', api = '',
imgApi = '/img/'; imgApi = '/img/';
switch (process.env.UNI_BASE_ENV) { switch (process.env.UNI_BASE_ENV) {
...@@ -32,7 +32,7 @@ const apiBaseConfig = { ...@@ -32,7 +32,7 @@ const apiBaseConfig = {
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
domain: hostUrl + api, domain: hostUrl + api,
upload: hostUrl + api + '/group-buy/by-file/uploadOne', upload: hostUrl + api + '/system/oss/listByIds/',
imgBgUrl: 'http://fundapi.yyinhong.cn' + imgApi, imgBgUrl: 'http://fundapi.yyinhong.cn' + imgApi,
benWrChatAPPID: 'wx8920d1dae8894242', benWrChatAPPID: 'wx8920d1dae8894242',
hygAPPID: 'wx626a1ea9888b0e0f', hygAPPID: 'wx626a1ea9888b0e0f',
......
<template>
<view class="">
<view class="index">
<!-- <view class="index-top">
<view class="index-top-tit">
预计上门安装时间
</view>
<view class="index-top-cent" @click="jump">
<view class="">
{{timeValue}}
</view>
<image :src="imgBgUrl+'rq.png'" mode=""></image>
</view>
</view> -->
<view class="index-cetn">
<view class="" style="margin-bottom: 10rpx;">
上传图片
</view>
<com-upload ref="upload" imgType="takePictures" @changeList="changeList"></com-upload>
<view class="tt">
请上传安装完成后的证明图片
</view>
</view>
</view>
<view class="btm">
<view class="tzqr" @click="jump(1)" style="width: calc(100% - 200rpx);text-align: center;">
确认
</view>
</view>
<u-datetime-picker :formatter="formatter" :show="show" v-model="value1" mode="date" @confirm="confirm"
@cancel="cancel"></u-datetime-picker>
</view>
</template>
<script>
import apiBaseConfig from '@/config/index.js';
import {
installationPicPUT,
updatePUT
} from '@/api/workbench/index.js';
export default {
data() {
return {
imgBgUrl: apiBaseConfig.imgBgUrl,
globalData: getApp().globalData,
show: false,
value1: Number(new Date()),
timeValue: '',
contractInfo: {},
setupImgs: [],
updateID: 1 // 1新增 2修改
};
},
onLoad(option) {
this.contractInfo = JSON.parse(option.contractInfo)
if (this.contractInfo.setupImgs) {
this.$refs.upload.fileList6 = this.contractInfo.setupImgs
this.updateID = 2
} else {
this.updateID = 1
}
},
methods: {
changeList(v) {
this.setupImgs = v
},
jump() {
if(this.setupImgs.length == 0){
return uni.$u.toast('请先上传安装完成后图片')
}
if (this.updateID == 2) {
//图纸修改
this.update()
} else {
// 图纸上传
this.installationPic()
}
},
installationPic() {
installationPicPUT({
contractId: this.contractInfo.contractId,
setupImgs: JSON.stringify(this.setupImgs)
}).then((res) => {
if (res.code == 200) {
uni.$u.toast('安装图纸上传成功');
let timer = setInterval(() => {
this.$uniGo.navigateBack({
delta: 1
});
clearInterval(timer)
}, 1000)
}
})
},
//图纸修改
update() {
updatePUT({
contractId: this.contractInfo.contractId,
setupImgs: JSON.stringify(this.setupImgs)
}).then((res) => {
if (res.code == 200) {
uni.$u.toast('安装图纸修改成功');
let timer = setInterval(() => {
this.$uniGo.navigateBack({
delta: 1
});
clearInterval(timer)
}, 1000)
}
})
},
async confirm(e) {
// console.log(e, 'vvvvvvv')
const timeFormat = uni.$u.timeFormat;
let timeValue = await timeFormat(e.value, 'yyyy-mm-dd');
this.timeValue = timeValue;
console.log(timeValue);
this.show = false;
},
cancel() {
this.show = false;
},
}
};
</script>
<style>
page {
background: #F7F8FA;
}
</style>
<style lang="scss" scoped>
.index {
padding: 30rpx;
&-top {
padding: 40rpx 30rpx 30rpx 30rpx;
background: #FFFFFF;
border-radius: 34rpx;
&-tit {
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
&-cent {
margin-top: 10rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding: 34rpx 30rpx;
background: rgba(143, 146, 161, 0.08);
border-radius: 20rpx;
font-weight: 400;
font-size: 28rpx;
color: #333333;
>view {
width: calc(100% - 90);
}
>image {
width: 28rpx;
height: 28rpx;
}
}
}
&-cetn {
margin-top: 30rpx;
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
}
.btm {
width: calc(100% - 80rpx);
padding: 24rpx 40rpx 62rpx;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-between;
position: fixed;
bottom: 0rpx;
}
.tzqr {
padding: 24rpx 100rpx;
border-radius: 45rpx;
border: 2rpx solid #1572FF;
font-weight: 500;
font-size: 30rpx;
color: #fff;
background: #1572FF;
}
.tt {
font-weight: 400;
font-size: 22rpx;
color: #666666;
margin-top: 10rpx;
}
</style>
\ No newline at end of file
<template>
<view class="">
<view class="index">
<view class="index-top">
<view class="index-top-tit">
预计到家时间
</view>
<view class="index-top-cent" @click="jump">
<view class="">
{{timeValue}}
</view>
<image :src="imgBgUrl+'rq.png'" mode=""></image>
</view>
</view>
</view>
<view class="btm">
<view class="tzqr" @click="expectedHome" style="width: calc(100% - 200rpx);text-align: center;">
确认
</view>
</view>
<u-datetime-picker :formatter="formatter" :show="show" v-model="value1" mode="date" @confirm="confirm"
@cancel="cancel"></u-datetime-picker>
</view>
</template>
<script>
import apiBaseConfig from '@/config/index.js';
import {
expectedHomePUT
} from '@/api/workbench/index.js';
export default {
data() {
return {
imgBgUrl: apiBaseConfig.imgBgUrl,
globalData: getApp().globalData,
show: false,
value1: Number(new Date()),
timeValue: '',
contractInfo: {},
};
},
onLoad(option) {
this.contractInfo = JSON.parse(option.contractInfo)
this.timeValue = this.contractInfo.estimatedTimeOfArrivalOfMaterials ? this.contractInfo
.estimatedTimeOfArrivalOfMaterials : ''
},
methods: {
expectedHome() {
expectedHomePUT({
estimatedTimeOfArrivalOfMaterials: this.timeValue,
contractId: this.contractInfo.contractId,
}).then((res) => {
if (res.code == 200) {
uni.$u.toast('预计到家时间设置成功');
let timer = setInterval(() => {
this.$uniGo.navigateBack({
delta: 1
});
clearInterval(timer)
}, 1000)
}
})
},
async confirm(e) {
// console.log(e, 'vvvvvvv')
const timeFormat = uni.$u.timeFormat;
let timeValue = await timeFormat(e.value, 'yyyy-mm-dd');
this.timeValue = timeValue;
console.log(timeValue);
this.show = false;
},
cancel() {
this.show = false;
},
// 跳转城市选择
jump() {
this.show = true;
}
}
};
</script>
<style>
page {
background: #F7F8FA;
}
</style>
<style lang="scss" scoped>
.index {
padding: 30rpx;
&-top {
padding: 40rpx 30rpx 30rpx 30rpx;
background: #FFFFFF;
border-radius: 34rpx;
&-tit {
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
&-cent {
margin-top: 10rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding: 34rpx 30rpx;
background: rgba(143, 146, 161, 0.08);
border-radius: 20rpx;
font-weight: 400;
font-size: 28rpx;
color: #333333;
>view {
width: calc(100% - 90);
}
>image {
width: 28rpx;
height: 28rpx;
}
}
}
}
.btm {
width: calc(100% - 80rpx);
padding: 24rpx 40rpx 62rpx;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-between;
position: fixed;
bottom: 0rpx;
}
.tzqr {
padding: 24rpx 100rpx;
border-radius: 45rpx;
border: 2rpx solid #1572FF;
font-weight: 500;
font-size: 30rpx;
color: #fff;
background: #1572FF;
}
</style>
\ No newline at end of file
<template>
<view class="">
<view class="index">
<view class="index-tops" v-for="(v,index) in drawing" :key="index">
<view class="index-tops-lef">
<image :src="imgBgUrl+'sjtz.png'" mode=""></image>
<view class="" style="width: calc(100% - 52rpx);word-wrap: break-word;">
{{v.name}}
</view>
</view>
<view class="index-tops-rig">
<view class="" @click="download(v.url)">
查看
</view>
<view class="" @click="onclick(v,index)">
删除
</view>
</view>
</view>
<view class="index-top">
上传图纸
</view>
<com-upload-identity ref="identity" imgType="takePictures" @changeList="changeList"></com-upload-identity>
</view>
<view class="btm">
<view class="tzqr" @click="jump" style="width: calc(100% - 200rpx);text-align: center;">
确认
</view>
</view>
<u-modal :show="show" :title="title" :content='content' :showCancelButton="true" @confirm="confirm"
@cancel="cancel"></u-modal>
</view>
</template>
<script>
import apiBaseConfig from '@/config/index.js';
import {
uploadDrawingPUT,
updatePUT
} from '@/api/workbench/index.js';
export default {
data() {
return {
imgBgUrl: apiBaseConfig.imgBgUrl,
globalData: getApp().globalData,
show: false,
title: '提示',
content: '确认删除该pdf?',
contractInfo: {},
drawing: [],
indId: '',
updateID:1,
};
},
onLoad(option) {
this.contractInfo = JSON.parse(option.contractInfo)
// console.log(option.contractInfo.drawing,'111111111111111111')
if(this.contractInfo.drawing){
this.$refs.identity.fileList6 = this.contractInfo.drawing
this.updateID = 2
}else{
this.updateID = 1
}
},
methods: {
changeList(v) {
this.drawing = v
console.log(v,'v============')
},
jump(){
if(this.drawing.length == 0){
return uni.$u.toast('请先上传图纸')
}
if(this.updateID == 2){
//图纸修改
this.update()
}else{
// 图纸上传
this.uploadDrawing()
}
},
// 图纸上传
uploadDrawing() {
uploadDrawingPUT({
contractId: this.contractInfo.contractId,
drawing: JSON.stringify(this.drawing)
}).then((res) => {
if (res.code == 200) {
uni.$u.toast('图纸上传成功');
let timer = setInterval(() => {
this.$uniGo.navigateBack({
delta: 1
});
clearInterval(timer)
}, 1000)
}
})
},
//图纸修改
update(){
updatePUT({
// ...this.contractInfo,
contractId: this.contractInfo.contractId,
drawing: JSON.stringify(this.drawing)
}).then((res)=>{
if (res.code == 200) {
uni.$u.toast('图纸修改成功');
let timer = setInterval(() => {
this.$uniGo.navigateBack({
delta: 1
});
clearInterval(timer)
}, 1000)
}
})
},
//签订合同下载
download(v) {
uni.downloadFile({
url: v,
success: function(res) {
console.log(res, '===========')
var filePath = res.tempFilePath;
uni.openDocument({
filePath: filePath,
showMenu: true,
success: function(res) {
console.log('打开文档成功');
},
complete: function(rest) {
console.log('打开文档成功111', rest);
}
});
}
});
},
//删除
onclick(v, ind) {
this.indId = ind
this.show = true
},
// 弹窗确认
confirm() {
this.$delete(this.drawing, this.indId)
uni.$u.toast('删除成功');
this.show = false
},
// 弹窗取消
cancel() {
this.show = false
},
}
};
</script>
<style>
page {
background-color: #F7F8FA;
}
</style>
<style lang="scss" scoped>
.index {
padding: 30rpx 30rpx 200rpx;
&-tops {
background: #FFFFFF;
border-radius: 20rpx;
padding: 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 30rpx;
&-lef {
display: flex;
align-items: center;
font-weight: 500;
font-size: 26rpx;
color: #333333;
width: calc(100% - 200rpx);
>image {
width: 36rpx;
height: 40rpx;
margin-right: 16rpx;
}
}
&-rig {
display: flex;
align-items: center;
>view:nth-child(1) {
width: 80rpx;
height: 42rpx;
text-align: center;
line-height: 42rpx;
border-radius: 8rpx;
border: 2rpx solid #1572FF;
font-weight: 400;
font-size: 22rpx;
color: #1572FF;
margin-right: 20rpx;
}
>view:nth-child(2) {
width: 80rpx;
height: 42rpx;
text-align: center;
line-height: 42rpx;
border-radius: 8rpx;
border: 2rpx solid #FF3141;
font-weight: 400;
font-size: 22rpx;
color: #FF3141;
}
}
}
&-tit {
font-weight: 400;
font-size: 26rpx;
color: #444444;
}
&-top {
font-weight: 600;
font-size: 32rpx;
color: #333333;
// margin-top: 30rpx;
margin-bottom: 20rpx;
}
}
.btm {
width: calc(100% - 80rpx);
padding: 24rpx 40rpx 62rpx;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-between;
position: fixed;
bottom: 0rpx;
}
.ptkf {
padding: 24rpx 100rpx;
border-radius: 45rpx;
border: 2rpx solid #1572FF;
font-weight: 500;
font-size: 30rpx;
color: #1572FF;
background: #fff;
}
.tzqr {
padding: 24rpx 100rpx;
border-radius: 45rpx;
border: 2rpx solid #1572FF;
font-weight: 500;
font-size: 30rpx;
color: #fff;
background: #1572FF;
}
</style>
\ No newline at end of file
<template>
<view>
<view class="index">
<view class="container">
<view class="d-flex a-center">
<view class="content">服务评分</view>
<u-rate v-model="form.serviceScore"C active-color="#FBA808"
inactive-color="#ebecf5" gutter="10" size="64"></u-rate>
</view>
<view class="d-flex a-center my-three">
<view class="content">满意度评分</view>
<u-rate v-model="form.satisficingScore" active-color="#FBA808" inactive-color="#ebecf5"
gutter="10" size="64"></u-rate>
</view>
<view class="d-flex a-center">
<view class="content">售后评分</view>
<u-rate v-model="form.afterSaleScore" active-color="#FBA808" inactive-color="#ebecf5"
gutter="10" size="64"></u-rate>
</view>
<view class="mt-three image-text p-two">
<u--textarea :customStyle="{
'background':'#f6f7f8',
'font-size':'28rpx',
'fontWeight':'bold',
'color':'#333 !important',
}" autoHeight border="none" v-model="form.content" placeholder="请输入内容"></u--textarea>
<com-upload ref="upload" imgType="takePictures" @changeList="changeList"></com-upload>
</view>
<view>
<image class="camera" src="@/static/images/camera.png" mode=""></image>
</view>
</view>
</view>
<view class="placeholder padding-secure"></view>
<view class="fixed d-flex a-center padding-secure">
<button class="full-button" @click="handleSubmit">确认</button>
</view>
</view>
</template>
<script>
import {
mapGetters
} from 'vuex'
import {
editContractEvaluate
} from '@/api/workbench/index.js'
export default {
data() {
return {
form: {
contractId: '',
afterSaleScore: 0, //售后评分
serviceScore: 0, //服务评分
satisficingScore: 0, //满意度评分
content:'',//内容
contentImg:'',
commentType: 'dynamic'
}
}
},
onLoad(option) {
console.log(option.contractId, '合同id')
this.$set(this.form, 'contractId', option.contractId)
},
computed: {
...mapGetters(['userInfo'])
},
methods: {
handleChangeNum(value) {
console.log(value, 'value==========')
},
changeList(v) {
let imageArr = []
v.map(item=>{
imageArr.push(item.url)
})
this.form.contentImg = imageArr.join(',')
},
handleSubmit() {
console.log(this.form,'参数')
editContractEvaluate({...this.form,
userType:this.userInfo.userType
}).then(res=>{
console.log(res,'评分法')
uni.showToast({
title:'成功!',
icon:'none'
})
uni.navigateBack()
})
}
}
}
</script>
<style lang="scss" scoped>
.index {
padding: 24rpx 30rpx;
}
.container {
padding: 30rpx;
background: #FFFFFF;
border-radius: 20rpx;
.content {
font-size: 28rpx;
color: #333333;
width: 140rpx;
margin-right: 20rpx;
}
}
.image-text {
background: #f6f7f8;
border-radius: 20rpx;
}
.camera {
width: 44rpx;
height: 44rpx;
margin-top: 30rpx;
}
</style>
\ No newline at end of file
<template>
<view class="">
<view class="index">
<view class="index-top">
<view class="index-top-tit">
预计到厂时间
</view>
<view class="index-top-cent" @click="jump">
<view class="">
{{timeValue}}
</view>
<image :src="imgBgUrl+'rq.png'" mode=""></image>
</view>
</view>
</view>
<view class="btm">
<view class="tzqr" @click="expectedArriva" style="width: calc(100% - 200rpx);text-align: center;">
确认
</view>
</view>
<u-datetime-picker :formatter="formatter" :show="show" v-model="value1" mode="date" @confirm="confirm"
@cancel="cancel"></u-datetime-picker>
</view>
</template>
<script>
import apiBaseConfig from '@/config/index.js';
import {
expectedArrivalPUT
} from '@/api/workbench/index.js';
export default {
data() {
return {
imgBgUrl: apiBaseConfig.imgBgUrl,
globalData: getApp().globalData,
show: false,
value1: Number(new Date()),
timeValue: '',
contractInfo: {},
};
},
onLoad(option) {
this.contractInfo = JSON.parse(option.contractInfo)
this.timeValue = this.contractInfo.estimatedTimeOfMaterialArrival?this.contractInfo.estimatedTimeOfMaterialArrival:''
},
methods: {
async confirm(e) {
// console.log(e, 'vvvvvvv')
const timeFormat = uni.$u.timeFormat;
let timeValue = await timeFormat(e.value, 'yyyy-mm-dd');
this.timeValue = timeValue;
console.log(timeValue);
this.show = false;
},
cancel() {
this.show = false;
},
// 跳转城市选择
jump() {
this.show = true;
},
expectedArriva() {
expectedArrivalPUT({
contractId: this.contractInfo.contractId,
estimatedTimeOfMaterialArrival: this.timeValue
}).then((res) => {
if (res.code == 200) {
uni.$u.toast('预计时间设置成功');
let timer = setInterval(() => {
this.$uniGo.navigateBack({
delta: 1
});
clearInterval(timer)
}, 1000)
}
})
}
}
};
</script>
<style>
page {
background: #F7F8FA;
}
</style>
<style lang="scss" scoped>
.index {
padding: 30rpx;
&-top {
padding: 40rpx 30rpx 30rpx 30rpx;
background: #FFFFFF;
border-radius: 34rpx;
&-tit {
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
&-cent {
margin-top: 10rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding: 34rpx 30rpx;
background: rgba(143, 146, 161, 0.08);
border-radius: 20rpx;
font-weight: 400;
font-size: 28rpx;
color: #333333;
>view {
width: calc(100% - 90);
}
>image {
width: 28rpx;
height: 28rpx;
}
}
}
}
.btm {
width: calc(100% - 80rpx);
padding: 24rpx 40rpx 62rpx;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-between;
position: fixed;
bottom: 0rpx;
}
.tzqr {
padding: 24rpx 100rpx;
border-radius: 45rpx;
border: 2rpx solid #1572FF;
font-weight: 500;
font-size: 30rpx;
color: #fff;
background: #1572FF;
}
</style>
\ No newline at end of file
<template>
<view class="">
<view class="index">
<view class="index-top">
<view class="index-top-tit">
预计上门安装时间
</view>
<view class="index-top-cent" @click="jump">
<view class="">
{{timeValue}}
</view>
<image :src="imgBgUrl+'rq.png'" mode=""></image>
</view>
</view>
<view class="index-cetn">
<view class="" style="margin-bottom: 10rpx;">
上传图片
</view>
<com-upload ref="upload" imgType="takePictures" @changeList="changeList"></com-upload>
<view class="tt">
请上传材料到厂图,材料清单等证明图片
</view>
</view>
</view>
<view class="btm">
<view class="tzqr" @click="jumps" style="width: calc(100% - 200rpx);text-align: center;">
确认
</view>
</view>
<u-datetime-picker :formatter="formatter" :show="show" v-model="value1" mode="date" @confirm="confirm"
@cancel="cancel"></u-datetime-picker>
</view>
</template>
<script>
import apiBaseConfig from '@/config/index.js';
import {
materialArrivalPUT,
updatePUT
} from '@/api/workbench/index.js';
export default {
data() {
return {
imgBgUrl: apiBaseConfig.imgBgUrl,
globalData: getApp().globalData,
show: false,
value1: Number(new Date()),
timeValue: '',
factoryImgs: [], // 材料到厂图
factoryImgsId: 1 // 1新增 2 修改
};
},
onLoad(option) {
this.contractInfo = JSON.parse(option.contractInfo)
console.log(this.contractInfo.factoryImgs,'this.contractInfo.factoryImgs=')
if (this.contractInfo.factoryImgs) {
this.$refs.upload.fileList6 = this.contractInfo.factoryImgs
this.timeValue = this.contractInfo.estimatedDoorInstallationTime
this.factoryImgsId = 2
} else {
this.factoryImgsId = 1
}
},
methods: {
async confirm(e) {
// console.log(e, 'vvvvvvv')
const timeFormat = uni.$u.timeFormat;
let timeValue = await timeFormat(e.value, 'yyyy-mm-dd');
this.timeValue = timeValue;
console.log(timeValue);
this.show = false;
},
changeList(v) {
console.log(v,'this.factoryImgs====')
this.factoryImgs = v
},
cancel() {
this.show = false;
},
jumps() {
if(!this.timeValue){
return uni.$u.toast('请选择预计上门安装时间')
}
if(this.factoryImgs.length == 0){
return uni.$u.toast('请先上传图片')
}
if (this.factoryImgsId == 2) {
this.update()
} else {
this.materialArrival()
}
},
update() {
updatePUT({
contractId: this.contractInfo.contractId,
factoryImgs: JSON.stringify(this.factoryImgs),
estimatedDoorInstallationTime: this.timeValue
}).then((res) => {
if (res.code == 200) {
uni.$u.toast('材料到厂修改成功');
let timer = setInterval(() => {
this.$uniGo.navigateBack({
delta: 1
});
clearInterval(timer)
}, 1000)
}
})
},
materialArrival() {
materialArrivalPUT({
contractId: this.contractInfo.contractId,
factoryImgs: JSON.stringify(this.factoryImgs),
estimatedDoorInstallationTime: this.timeValue
}).then((res) => {
if (res.code == 200) {
uni.$u.toast('材料到厂确认成功');
let timer = setInterval(() => {
this.$uniGo.navigateBack({
delta: 1
});
clearInterval(timer)
}, 1000)
}
})
},
// 跳转城市选择
jump() {
this.show = true;
}
}
};
</script>
<style>
page {
background: #F7F8FA;
}
</style>
<style lang="scss" scoped>
.index {
padding: 30rpx;
&-top {
padding: 40rpx 30rpx 30rpx 30rpx;
background: #FFFFFF;
border-radius: 34rpx;
&-tit {
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
&-cent {
margin-top: 10rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding: 34rpx 30rpx;
background: rgba(143, 146, 161, 0.08);
border-radius: 20rpx;
font-weight: 400;
font-size: 28rpx;
color: #333333;
>view {
width: calc(100% - 90);
}
>image {
width: 28rpx;
height: 28rpx;
}
}
}
&-cetn {
margin-top: 30rpx;
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
}
.btm {
width: calc(100% - 80rpx);
padding: 24rpx 40rpx 62rpx;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-between;
position: fixed;
bottom: 0rpx;
}
.tzqr {
padding: 24rpx 100rpx;
border-radius: 45rpx;
border: 2rpx solid #1572FF;
font-weight: 500;
font-size: 30rpx;
color: #fff;
background: #1572FF;
}
.tt {
font-weight: 400;
font-size: 22rpx;
color: #666666;
margin-top: 10rpx;
}
</style>
\ No newline at end of file
<template>
<view class="">
<view class="index">
<!-- <view class="index-top">
<view class="index-top-tit">
预计上门安装时间
</view>
<view class="index-top-cent" @click="jump">
<view class="">
{{timeValue}}
</view>
<image :src="imgBgUrl+'rq.png'" mode=""></image>
</view>
</view> -->
<view class="index-cetn">
<view class="" style="margin-bottom: 10rpx;">
上传图片
</view>
<com-upload ref="upload" imgType="takePictures" @changeList="changeList"></com-upload>
<view class="tt">
请上传生产中图,未安装前房屋内图等证明图片
</view>
</view>
</view>
<view class="btm">
<view class="tzqr" @click="jump" style="width: calc(100% - 200rpx);text-align: center;">
确认
</view>
</view>
<u-datetime-picker :formatter="formatter" :show="show" v-model="value1" mode="date" @confirm="confirm"
@cancel="cancel"></u-datetime-picker>
</view>
</template>
<script>
import apiBaseConfig from '@/config/index.js';
import {
materialsAtHomePUT,
updatePUT
} from '@/api/workbench/index.js';
export default {
data() {
return {
imgBgUrl: apiBaseConfig.imgBgUrl,
globalData: getApp().globalData,
show: false,
value1: Number(new Date()),
timeValue: '',
contractInfo: {},
homeImgs: [],
homeImgsId: 1 // 1新增 2修改
};
},
onLoad(option) {
this.contractInfo = JSON.parse(option.contractInfo)
if (this.contractInfo.homeImgs) {
this.$refs.upload.fileList6 = this.contractInfo.homeImgs
this.homeImgsId = 2
} else {
this.homeImgsId = 1
}
},
methods: {
changeList(v) {
this.homeImgs = v
},
// 跳转城市选择
jump() {
if(this.homeImgs.length == 0){
return uni.$u.toast('请先上传生产中图片')
}
if(this.homeImgsId == 2){
this.update()
}else{
this.materialsAtHom()
}
},
update() {
console.log("this.contractInfo.homeImgs")
updatePUT({
contractId: this.contractInfo.contractId,
homeImgs: JSON.stringify(this.homeImgs)
}).then((res) => {
if (res.code == 200) {
uni.$u.toast('生产中图片修改成功');
let timer = setInterval(() => {
this.$uniGo.navigateBack({
delta: 1
});
clearInterval(timer)
}, 1000)
}
})
},
materialsAtHom() {
materialsAtHomePUT({
contractId: this.contractInfo.contractId,
homeImgs: JSON.stringify(this.homeImgs)
}).then((res) => {
if (res.code == 200) {
uni.$u.toast('生产中图片上传成功');
let timer = setInterval(() => {
this.$uniGo.navigateBack({
delta: 1
});
clearInterval(timer)
}, 1000)
}
})
},
async confirm(e) {
// console.log(e, 'vvvvvvv')
const timeFormat = uni.$u.timeFormat;
let timeValue = await timeFormat(e.value, 'yyyy-mm-dd');
this.timeValue = timeValue;
console.log(timeValue);
this.show = false;
},
cancel() {
this.show = false;
},
}
};
</script>
<style>
page {
background: #F7F8FA;
}
</style>
<style lang="scss" scoped>
.index {
padding: 30rpx;
&-top {
padding: 40rpx 30rpx 30rpx 30rpx;
background: #FFFFFF;
border-radius: 34rpx;
&-tit {
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
&-cent {
margin-top: 10rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding: 34rpx 30rpx;
background: rgba(143, 146, 161, 0.08);
border-radius: 20rpx;
font-weight: 400;
font-size: 28rpx;
color: #333333;
>view {
width: calc(100% - 90);
}
>image {
width: 28rpx;
height: 28rpx;
}
}
}
&-cetn {
margin-top: 30rpx;
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
}
.btm {
width: calc(100% - 80rpx);
padding: 24rpx 40rpx 62rpx;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-between;
position: fixed;
bottom: 0rpx;
}
.tzqr {
padding: 24rpx 100rpx;
border-radius: 45rpx;
border: 2rpx solid #1572FF;
font-weight: 500;
font-size: 30rpx;
color: #fff;
background: #1572FF;
}
.tt {
font-weight: 400;
font-size: 22rpx;
color: #666666;
margin-top: 10rpx;
}
</style>
\ No newline at end of file
<template>
<view class="">
<view class="index">
<view class="index-tit" v-if="contractInfo.confirmHomeProportion != '0'">
完成验收后付款给商家合同总金额的{{contractInfo.confirmHomeProportion}}%,{{amount}}
</view>
<view class="index-top">
上传验收单
</view>
<com-upload ref="upload" imgType="takePictures" @changeList="changeList"></com-upload>
</view>
<view class="btm">
<view class="ptkf" @click="jump(1)">
平台客服
</view>
<view class="tzqr" @click="installationAcceptance">
确认验收
</view>
</view>
</view>
</template>
<script>
import apiBaseConfig from '@/config/index.js';
import {
installationAcceptancePUT,
nodeListGET
} from '@/api/workbench/index.js';
export default {
data() {
return {
imgBgUrl: apiBaseConfig.imgBgUrl,
globalData: getApp().globalData,
confirmImgs: [],
contractInfo: {},
proportion: '',
amount:''
};
},
onLoad(option) {
this.contractInfo = JSON.parse(option.contractInfo)
this.nodeList()
},
methods: {
nodeList() {
nodeListGET().then((res) => {
this.proportion = res.rows[3].proportion
let obj = this.$calculation.accDiv(this.contractInfo.amount, 100)
this.amount = this.$calculation.accMul(obj, this.contractInfo.confirmHomeProportion)
// this.amount = (Number(this.contractInfo.amount) / 100) * Number(this.proportion)
// console.log((Number(this.contractInfo.amount) / 100)* Number(this.proportion) ,"Number(this.contractInfo.amount) / 100")
})
},
changeList(v) {
this.confirmImgs = v
console.log(v, '===========')
},
//安装验收
installationAcceptance() {
if(this.confirmImgs.length == 0){
return uni.$u.toast('请先上传验收单')
}
installationAcceptancePUT({
contractId: this.contractInfo.contractId,
confirmImgs: JSON.stringify(this.confirmImgs)
}).then((res) => {
if (res.code == 200) {
uni.$u.toast('验收单上传成功');
let timer = setInterval(() => {
this.$uniGo.navigateBack({
delta: 1
});
clearInterval(timer)
}, 1000)
}
})
},
// 跳转
jump(v) {
let self = this
switch (v) {
case 1: // 跳转 -- 平台客服
self.$uniGo.navigateTo({
url: '/my/customer/index'
})
break;
case 2: // 确认验收
break;
}
},
}
};
</script>
<style>
page {
background-color: #F7F8FA;
}
</style>
<style lang="scss" scoped>
.index {
padding: 20rpx 30rpx 200rpx;
&-tit {
font-weight: 400;
font-size: 26rpx;
color: #444444;
}
&-top {
font-weight: 600;
font-size: 32rpx;
color: #333333;
margin-top: 20rpx;
margin-bottom: 20rpx;
}
}
.btm {
width: calc(100% - 80rpx);
padding: 24rpx 40rpx 62rpx;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-between;
position: fixed;
bottom: 0rpx;
}
.ptkf {
padding: 24rpx 100rpx;
border-radius: 45rpx;
border: 2rpx solid #1572FF;
font-weight: 500;
font-size: 30rpx;
color: #1572FF;
background: #fff;
}
.tzqr {
padding: 24rpx 100rpx;
border-radius: 45rpx;
border: 2rpx solid #1572FF;
font-weight: 500;
font-size: 30rpx;
color: #fff;
background: #1572FF;
}
</style>
\ No newline at end of file
<template>
<view class="">
<view class="index">
<view class="" style="padding:10rpx 30rpx ;background-color: #fff;border-radius: 20rpx;">
<view class=""
style="font-weight: 400;font-size: 14px;color: #333333;margin-bottom: 10rpx;display: flex;align-items: center;margin-top: 20rpx;">
<view class="" @click="clickShow">
{{areaChose}}
</view>
<image style="width: 36rpx;height: 36rpx;transform: rotate(90deg);" :src="imgBgUrl+'xzsjyjt.png'"
mode=""></image>
</view>
<u--input :customStyle="{
'background': 'rgba(143, 146, 161, 0.08)',
'border-radius': '20rpx',
'padding':'28rpx 30rpx',
}" v-model="model1.area" border="none" type="digit" @blur="blurs"></u--input>
<u--form labelPosition="top" labelWidth="300" :model="model1" :rules="rules" ref="uForm" :labelStyle="{
'margin-bottom':'10rpx',
'font-weight': '400',
'font-size': '28rpx',
'color': '#333333'
}">
<!-- <u-form-item label="投影面积" prop="name" :borderBottom="false" ref="item1">
<u--input :customStyle="{
'background': 'rgba(143, 146, 161, 0.08)',
'border-radius': '20rpx',
'padding':'28rpx 30rpx',
}" v-model="model1.area" border="none" type="digit" @blur="blurs"></u--input>
</u-form-item> -->
<u-form-item label="合同金额" prop="name" :borderBottom="false" ref="item1">
<u--input :customStyle="{
'background': 'rgba(143, 146, 161, 0.08)',
'border-radius': '20rpx',
'padding':'28rpx 30rpx',
}" v-model="model1.amount" border="none" type="digit" @blur="blur"></u--input>
</u-form-item>
<u-form-item label=" " prop="name" :borderBottom="false" ref="item1">
*合同金额包含定金金额,合同金额建议不低于{{warningAmount}}元/米²,低于此价格,此交易不受平台保护
</u-form-item>
</u--form>
</view>
<view class="index-top">
上传合同
</view>
<com-upload imgType="takePictures" ref="contract" @changeList="changeList"></com-upload>
<view class="index-top">
用户须知
</view>
<view class="index-tit">
<view class="" v-html="cont"></view>
</view>
</view>
<view class="btm">
<view class="tzqr" @click="jump" style="width: calc(100% - 200rpx);text-align: center;">
确认上传
</view>
</view>
<u-picker :defaultIndex="defaultIndex" :show="shows" :columns="columns" @confirm="clickConfirm" @cancel="cancel"></u-picker>
<u-modal :show-title="false" :show="show" :content='content' @confirm="confirm"></u-modal>
</view>
</template>
<script>
import apiBaseConfig from '@/config/index.js';
import {
userTipGET,
conUploadPUT,
warningAmountGET,
updatePUT
} from '@/api/workbench/index.js';
export default {
data() {
return {
shows: false,
columns: [
['投影面积', '展开面积']
],
imgBgUrl: apiBaseConfig.imgBgUrl,
globalData: getApp().globalData,
cont: '',
model1: {
area: '',
amount: '',
contractImgs: ""
},
rules: {},
contractInfo: {},
warningAmount: "",
show: false,
content: '',
areaChose:'投影面积',
defaultIndex:[0]
};
},
onLoad(option) {
this.contractInfo = JSON.parse(option.contractInfo)
if (this.contractInfo.area && this.contractInfo.amount) {
this.defaultIndex = []
this.model1 = this.contractInfo
this.areaChose = this.contractInfo.areaChose == '0'?'投影面积':'展开面积'
this.defaultIndex.push(this.contractInfo.areaChose)
// console.log(this.contractInfo,'this.contractInfo=======')
this.$refs.contract.fileList6 = this.contractInfo.contractImgs
}
this.userTip()
this.warning()
},
// watch: {
// 'model1.area': {
// handler(val, old) {
// if (val && this.model1.amount) {
// let warnAmount = this.$calculation.accDiv(this.model1.amount, this.model1.area)
// // console.log(warnAmount, 'warnAmount===========')
// if (Number(warnAmount) < Number(this.warningAmount)) {
// this.show = true
// }
// }
// }
// },
// 'model1.amount': {
// handler(val, old) {
// }
// }
// },
methods: {
clickConfirm(v){
console.log(v,'v=======')
this.areaChose = v.value[0]
this.shows = false
},
cancel(){
this.shows = false
},
clickShow() {
this.shows = true
},
blur() {
if (this.model1.amount && this.model1.area) {
let warnAmount = this.$calculation.accDiv(this.model1.amount, this.model1.area)
// console.log(warnAmount, 'warnAmount===========')
if (Number(warnAmount) < Number(this.warningAmount)) {
this.show = true
}
}
},
blurs() {
if (this.model1.amount && this.model1.area) {
let warnAmount = this.$calculation.accDiv(this.model1.amount, this.model1.area)
// console.log(warnAmount, 'warnAmount===========')
if (Number(warnAmount) < Number(this.warningAmount)) {
this.show = true
}
}
},
confirm() {
this.show = false
},
changeList(v) {
this.model1.contractImgs = JSON.stringify(v)
},
warning() {
warningAmountGET(1).then((res) => {
this.warningAmount = res.data.warningAmount
this.content = `*合同金额包含定金金额,合同金额建议不低于${this.warningAmount}元/米²,低于此价格,此交易不受平台保护`
})
},
userTip() {
userTipGET().then((res) => {
this.cont = this.$utilsMethods.replaceSpecialChar(res.rows[2].tipContent)
})
},
// 确认上传
jump(v) {
//投影面积
if (!this.model1.area) {
return uni.$u.toast('请输入面积');
}
//合同金额
if (!this.model1.amount) {
return uni.$u.toast('请输入合同金额');
}
//上传合同
if (!this.model1.contractImgs) {
return uni.$u.toast('请输入上传合同');
}
if (this.model1.userId) {
this.updat()
} else {
this.uploadDra()
}
},
uploadDra() {
conUploadPUT({
...this.model1,
contractId: this.contractInfo.contractId,
areaChose:this.areaChose == '投影面积'?0:1,
}).then((res) => {
if (res.code == 200) {
uni.$u.toast('上传成功');
let timer = setInterval(() => {
this.$uniGo.navigateBack({
delta: 1
});
clearInterval(timer)
}, 1000)
}
})
},
// 修改
updat() {
updatePUT({
...this.model1,
contractId: this.contractInfo.contractId,
areaChose:this.areaChose == '投影面积'?0:1,
isUpdateConPrice:1
}).then((res) => {
if (res.code == 200) {
uni.$u.toast('修改成功');
let timer = setInterval(() => {
this.$uniGo.navigateBack({
delta: 1
});
clearInterval(timer)
}, 1000)
}
})
}
}
};
</script>
<style>
page {
background-color: #F7F8FA;
}
</style>
<style lang="scss" scoped>
.index {
padding: 30rpx 30rpx 200rpx;
&-tit {
font-weight: 400;
font-size: 26rpx;
color: #444444;
}
&-top {
font-weight: 600;
font-size: 32rpx;
color: #333333;
margin-top: 30rpx;
margin-bottom: 20rpx;
}
}
.btm {
width: calc(100% - 80rpx);
padding: 24rpx 40rpx 62rpx;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-between;
position: fixed;
bottom: 0rpx;
}
.ptkf {
padding: 24rpx 100rpx;
border-radius: 45rpx;
border: 2rpx solid #1572FF;
font-weight: 500;
font-size: 30rpx;
color: #1572FF;
background: #fff;
}
.tzqr {
padding: 24rpx 100rpx;
border-radius: 45rpx;
border: 2rpx solid #1572FF;
font-weight: 500;
font-size: 30rpx;
color: #fff;
background: #1572FF;
}
</style>
\ No newline at end of file
<template>
<view class="">
<view class="index">
<view class="index-tit">
{{listData.activityName}}
</view>
<view class="index-tim">
活动时间:{{listData.activityBeginTime}}{{listData.activityStopTime }}
</view>
<view style="font-weight: 400;font-size: 26rpx;color: #666666;padding-bottom: 140rpx;" v-html="noticeContent"> </view>
</view>
<!-- <view class="fixed d-flex a-center padding-secure bt">
<view class="price">
合计:<text class="txt" >{{listData.activityPrice}}</text>
</view>
<button class="full-button" @click="btnBuy(listData.activityPrice,listData.groupId)">立即抢购</button>
</view> -->
</view>
</template>
<script>
import {
getlistBgroupBuying,
} from '@/api/workbench/index.js';
export default {
data(){
return{
listData: {},
noticeContent:""
}
},
onLoad(option) {
this.getlistData(option.groupId)
},
methods:{
async getlistData(groupId){
const res = await getlistBgroupBuying(groupId)
this.listData = res.data
this.noticeContent = this.$utilsMethods.replaceSpecialChar(res.data.activityDetail)
},
//购买
btnBuy(activityPric,groupId){
uni.navigateTo({
url:"/groupBuying/payment/index?price="+activityPric+"&id="+groupId
})
}
}
}
</script>
<style>
page {
background: #FFFFFF;
}
</style>
<style scoped lang="scss">
.index {
padding: 0 20rpx;
&-tit{
font-weight: 600;
font-size: 40rpx;
color: #242424;
margin-bottom: 22rpx;
}
&-tim{
font-weight: 400;
font-size: 24rpx;
color: #666666;
margin-bottom: 24rpx;
}
}
.bt{
display: flex;
justify-content: flex-end;
}
.price{
font-size: 24rpx;
color: #333333;
padding-right: 20rpx;
.txt{
font-size: 32rpx;
color: #F55726;
}
}
.full-button {
width: 178rpx;
height: 70rpx;
background: #1572FF;
border-radius: 45rpx;
line-height: 70rpx;
font-size: 26rpx;
color: #FFFFFF;
font-weight: bold;
margin-left: 0;
margin-right: 20rpx;
}
</style>
\ No newline at end of file
<template>
<view class="index">
<view class="list" @click="handeBtn(item.groupId)" v-for="(item ,index) in bgroupBuying" :key="index">
<!-- <image :src="list1[index]" mode="" class="list_img"></image> -->
<!-- <image :src="item.urls" mode="" class="list_img"></image> -->
<u--image :showLoading="true" :src="item.urls" width="240rpx" height="240rpx" radius='20rpx'></u--image>
<view class="list_con">
<u--text :lines="2" :text="item.activityName" size="30" color='#333333'>
</u--text>
<view class="deta">
活动时间:{{item.activityBeginTime}}{{item.activityStopTime}}
</view>
<view class="index_bt">
<view class="index_price">
<text style="font-size: 26rpx;">¥</text>{{item.activityPrice}}
</view>
<!-- <view class="index_btn">
立即抢购
</view> -->
</view>
</view>
</view>
</view>
</template>
<script>
import {
listBgroupBuyingGET,
listByIds
} from '@/api/workbench/index.js';
import apiBaseConfig from '@/config/index.js';
export default {
data() {
return {
imgBgUrl: apiBaseConfig.imgBgUrl,
queryParams:{
pageNum:1,
pageSize:10
},
bgroupBuying:[],
total:0,
list1:[]
}
},
onShow() {
this.reset()
},
onReachBottom() {
if(this.queryParams.pageNum * this.queryParams.pageSize >= this.total) return
this.queryParams.pageNum++
this.getList()
},
methods:{
reset(){
this.queryParams.pageNum = 1
this.bgroupBuying = []
this.getList()
},
// getList(){
// listBgroupBuyingGET(this.queryParams).then(res=>{
// res.rows.forEach((itm) => {
// this.listByI(itm.activitySurfacePlot)
// })
// this.bgroupBuying =res.rows
// this.total = res.total
// })
// },
async getList() {
const res = await listBgroupBuyingGET(this.queryParams)
res.rows.forEach((itm) => {
if(itm.activitySurfacePlot){
listByIds(itm.activitySurfacePlot).then((res) => {
itm.urls = res.data[0].url
})
}
})
this.bgroupBuying = [...this.bgroupBuying, ...res.rows]
this.total = res.total
},
// listByI(v) {
// listByIds(v).then((res) => {
// this.list1.push(res.data[0].url)
// })
// },
// 跳转到详情页
handeBtn(groupId){
uni.navigateTo({
url:`/groupBuying/eventDetails/index?groupId=${groupId}`
})
},
}
}
</script>
<style>
page{
background-color: #fff;
}
</style>
<style scoped lang="scss">
.index{
padding:0 30rpx 30rpx 30rpx;
.list{
display: flex;
align-items: center;
margin-top: 20rpx;
// .list_img{
// width: 240rpx;
// height: 240rpx;
// background: #D8D8D8;
// border-radius: 20rpx;
// }
.list_con{
margin-left: 20rpx;
width: 62%;
.deta{
font-size: 24rpx;
color: #666666;
padding: 20rpx 0;
}
.index_bt{
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 20rpx;
.index_price{
font-size: 40rpx;
color: #FD5001;
}
.index_btn{
width: 140rpx;
height: 58rpx;
line-height: 58rpx;
text-align: center;
border-radius: 28rpx;
border: 1rpx solid #1572FF;
font-size: 24rpx;
color: #1572FF;
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<view class="index">
<view class="index-cent" v-for="(v,index) in modeleList" :key="index">
<image style="width: 38rpx; height: 42rpx;margin-right: 20rpx;" :src="imgBgUrl+'ht.png'" mode=""></image>
<view class="" style="width: calc(100% - 60rpx);">
{{v.modelName}}
</view>
<image @click="download(v)" style="width: 32rpx; height: 32rpx;margin-left: 20rpx;" :src="imgBgUrl+'xz.png'"
mode=""></image>
</view>
</view>
</template>
<script>
import {
modelGET,
listByIds
} from "@/api/workbench/index.js";
import apiBaseConfig from '@/config/index.js';
export default {
data() {
return {
imgBgUrl: apiBaseConfig.imgBgUrl,
globalData: getApp().globalData,
modeleList:[]
};
},
onLoad() {
this.modele()
},
onReachBottom() {
console.log('触底了-------')
},
methods: {
modele(){
modelGET().then((res)=>{
this.modeleList = res.data
if (res.data && res.data.length) {
this.modeleList.forEach((itm) => {
this.listByI(itm)
})
}
})
},
listByI(v) {
listByIds(v.modelContent).then((res) => {
this.$set(v,'url',res.data[0].url)
})
},
//签订合同下载
download(v) {
uni.downloadFile({
url: v.url, //下载地址接口返回
success: (data) => {
if (data.statusCode === 200) {
console.log(data, 'data====')
uni.openDocument({
showMenu: true,
filePath: data.tempFilePath,
success: function(res) {
// console.log('打开文档成功');
}
});
return
//文件保存到本地
uni.getFileSystemManager().saveFile({
tempFilePath: data.tempFilePath, //临时路径
success: function(res) {
// uni.showToast({
// icon: 'none',
// mask: true,
// title: '文件已保存:' + res.savedFilePath, //保存路径
// duration: 2000,
// });
// setTimeout(() => {
//打开文档查看
uni.openDocument({
showMenu: true,
filePath: data.tempFilePath,
success: function(res) {
// console.log('打开文档成功');
}
});
// }, 2000)
}
});
}
},
fail: (err) => {
console.log(err);
uni.showToast({
icon: 'none',
mask: true,
title: '失败请重新下载',
});
},
},
// complete:(err)=>{
// console.log(err,);
// }
);
}
}
};
</script>
<style>
page {
background: #F7F8FA;
}
</style>
<style lang="scss" scoped>
.index {
padding: 22rpx 20rpx;
&-cent {
background: #FFFFFF;
border-radius: 17rpx;
width: calc(100% - 56rpx);
padding: 32rpx 28rpx;
display: flex;
align-items: center;
font-weight: 400;
font-size: 30rpx;
color: #333333;
margin-bottom: 22rpx;
}
}
</style>
\ No newline at end of file
<template>
<view class="table">
<view class="table-header">
<!-- 表格的表头 -->
<view class="flex-1 text-center" v-for="item in header" :key="item">{{ item }}</view>
</view>
<!-- 表格的内容 -->
<view class="table-row" v-for="(item,index) in data" :key="index">
<view class="table-cell">
<view>{{item.materialsName}}</view>
<view>({{item.lowestPriceRange}}-{{item.highestPriceRange}})</view>
</view>
<view class="table-cell">{{item.area}}</view>
<view class="table-cell">{{(Number(item.lowestPriceRange) * Number(item.area)) }} - {{ (Number(item.highestPriceRange) * Number(item.area))}}</view>
</view>
</view>
</template>
<script>
export default {
props: {
header: { // 表头数据
type: Array,
default: () => []
},
data: { // 表格内容数据
type: Array,
default: () => []
}
},
methods: {
// 表格的点击事件
handleRowClick(row) {
console.log("点击了一行数据:", row);
}
}
}
</script>
<style scoped>
.table-header {
display: flex;
align-items: center;
font-size: 26rpx;
color: #666666;
width: 100%;
border-collapse: collapse;
margin-bottom: 24rpx;
}
.table-cell {
flex: 1;
text-align: center;
font-size: 24rpx;
color: #333333;
}
.table-row {
display: flex;
align-items: center;
}
.table-row:not(:last-child){
margin-bottom: 40rpx;
}
/* .table-row:hover {
background-color: #f5f5f5;
cursor: pointer;
} */
</style>
\ No newline at end of file
<template>
<view class="index">
<view class="index-title px-three">{{detailData.demandTitle}}</view>
<view class="index-budget">
<view class="d-flex j-sb a-center">
<view class="d-flex a-center">
<!-- <view class="index-budget-avatar"></view> -->
<image class="index-budget-avatar" :src="detailData.avatar" mode=""></image>
<view class="index-budget-name">{{detailData.nickName}}</view>
</view>
<view class="index-budget-date">{{detailData.createTime}}</view>
</view>
<view class="index-budget-price d-flex a-center">
<view>全屋定制预算:</view>
<view class="main-font">{{detailData.budget}}</view>
</view>
<view class="table">
<view class="table-box">
<view class="table-row" v-for="(item, index) in tableData" :key="index">
<view class="table-cell cell1">{{ item.column1 }}</view>
<view class="table-cell cell2">{{ item.column2 }}</view>
</view>
</view>
</view>
</view>
<view class="index-comment" v-if="evalList.length">
<view class="index-comment-title">评论</view>
<view class="px-four py-three">
<view v-for="(item,index) in evalList" :key="index" style="margin-bottom: 30rpx;">
<evaluateList :itemDetail="item" @reply="handleOpenRely" @refersh="handleRefersh"></evaluateList>
</view>
</view>
</view>
<view class="placeholder padding-secure"></view>
<view class="fixed d-flex a-center padding-secure">
<button class="full-button" @click="handleComment">写评论</button>
</view>
<commentPopup :replyName="replyData.userName" ref="childPopup" @send="handleSubmit" :isReply="isReply"></commentPopup>
</view>
</template>
<script>
import {
mapGetters
} from 'vuex'
import {
getDemandDetailById,
listCommentByDemandId,
addCommentPOST
} from '@/api/workbench/index.js';
import evaluateList from '@/components/evaluate/index.vue'
import commentPopup from '@/components/custom/comment.vue'
export default {
components: {
evaluateList,
commentPopup
},
data() {
return {
isReply: false,
tableData: [{
column1: '投影面积',
column2: 'A258',
},
{
column1: '装修地址',
column2: '塑料'
},
{
column1: '柜体',
column2: '欧松板'
},
{
column1: '柜门',
column2: '欧松板'
},
{
column1: '五金',
column2: '国产'
},
],
detailData: {},
evalList: [],
replyData:{},//被回复人的数据
}
},
computed: {
...mapGetters(['userInfo'])
},
onLoad(option) {
console.log(option.demandId, '参数===')
// this.demandId = option.demandId
this.getDetailData(option.demandId)
},
methods: {
async getDetailData(demandId) {
const res = await getDemandDetailById(demandId)
console.log(res, '详情=====')
this.detailData = res.data
this.getCommentList()
this.tableData[0].column2 = res.data.projectedArea
this.tableData[1].column2 = res.data.decorationAddress
this.tableData[2].column2 = res.data.cabinet
this.tableData[3].column2 = res.data.cabinetDoor
this.tableData[4].column2 = res.data.hardware
},
async getCommentList() {
let self = this
console.log(self.userInfo.userId, 'self.userInfo.userId')
const res = await listCommentByDemandId({
forumId: self.detailData.demandId,
commentType: 'demand',
isUserId: self.userInfo.userId
})
console.log(res, 'res评论')
this.evalList = res.rows
},
// 去评价按钮点击事件
handleComment() {
this.isReply = false
this.$refs.childPopup.content = ''
this.$refs.childPopup.contentImg = ''
this.$refs.childPopup.show = true;
},
// 回复按钮点击事件
handleOpenRely(replyId,replyUserId,replyUserName){
this.replyData = {
commentId:replyId,//回复对话的id
userId:replyUserId,//回复人的id
userName:replyUserName,//回复人的昵称
}
this.isReply = true
this.$refs.childPopup.content = ''
this.$refs.childPopup.show = true;
},
async handleSubmit() {
console.log('不仅吗======')
let params;
if (this.isReply) {
// 表示回复
params = {
forumId: this.detailData.demandId,
parentCommentId:this.replyData.commentId,
repliedId:this.replyData.commentId,
repliedUserId:this.replyData.userId,
commentType: 'demand',
content: this.$refs.childPopup.content,
userId: this.userInfo.userId,
userType:this.userInfo.userType,
contentImg: this.$refs.childPopup.contentImg
}
} else {
params = {
forumId: this.detailData.demandId,
userId: this.userInfo.userId,
userType:this.userInfo.userType,
commentType: 'demand',
content: this.$refs.childPopup.content,
contentImg: this.$refs.childPopup.contentImg
}
}
const res = await addCommentPOST(params)
console.log(res, '添加=====')
uni.showToast({
title: '成功!',
icon: 'none'
})
this.getCommentList()
},
// 刷新评论列表
handleRefersh(){
this.getCommentList()
}
}
}
</script>
<style lang="scss" scoped>
.index {
padding: 22rpx 0;
&-title {
font-size: 34rpx;
color: #333333;
line-height: 44rpx;
font-weight: bolder;
}
&-budget {
width: 710rpx;
background: #fff;
border-radius: 20rpx;
margin: 20rpx auto;
padding: 26rpx 20rpx 20rpx;
box-sizing: border-box;
&-avatar {
width: 66rpx;
height: 66rpx;
background: #D8D8D8;
border-radius: 50%;
}
&-name {
font-size: 28rpx;
color: #333333;
font-weight: bold;
margin-left: 16rpx;
}
&-date {
font-size: 24rpx;
color: #999999;
}
&-price {
font-size: 26rpx;
color: #666666;
margin: 22rpx 0;
}
.main-font {
color: #1572FF;
font-size: 32rpx;
font-weight: bold;
margin-left: 8rpx;
}
.table {
&-box {
display: table;
width: 100%;
border: 1rpx solid #ECECEC;
border-radius: 12rpx;
background: #FFFFFF;
}
&-row {
display: table-row;
}
&-cell {
height: 70rpx;
display: table-cell;
border: 1px solid #ededed;
vertical-align: middle;
box-sizing: border-box;
font-size: 26rpx;
}
.cell1 {
width: 30%;
padding: 0 28rpx;
background: #F8F9FA;
border-radius: 11rpx 0rpx 0rpx 11rpx;
color: #666666;
}
.cell2 {
width: 70%;
padding: 0 38rpx;
color: #333333;
}
}
}
&-comment {
width: 100%;
background: #fff;
&-title {
padding: 24rpx 32rpx;
border-bottom: 1px solid #EBEBEB;
font-size: 28rpx;
font-weight: bold;
color: #333333;
}
}
}
</style>
\ No newline at end of file
<template>
<view>
<view style="padding: 22rpx 30rpx;">
<view v-for="(item,index) in demandList" :key="index" >
<comDemandList :rowData="item" :isInclude="true" @delete="handleDelete"></comDemandList>
</view>
</view>
</view>
</template>
<script>
import {
mapGetters
} from 'vuex'
import {
listClientDemandGET,
delDemandByIds
} from '@/api/workbench/index.js';
import comDemandList from '@/components/custom/demand.vue'
export default {
components:{
comDemandList
},
data() {
return {
queryParams: {
pageNum: 1,
pageSize: 10,
},
demandList: [], //需求列表
total: 0
}
},
onLoad() {
console.log(this.userInfo.userId)
this.$set(this.queryParams,'userId',this.userInfo.userId)
this.getDemandList()
},
computed: {
...mapGetters(['userInfo'])
},
onReachBottom() {
if (this.queryParams.pageNum * this.queryParams.pageSize >= this.total) return
this.queryParams.pageNum++
this.getDemandList()
},
methods: {
// 获取需求列表
async getDemandList() {
const res = await listClientDemandGET(this.queryParams)
this.demandList = [...this.demandList,...res.rows]
this.total = res.total
},
handleDelete(demandId){
uni.showModal({
title: '提示',
content: '您确定要删除动态吗?',
success: async res => {
if (res.confirm) {
const res = await delDemandByIds(demandId)
uni.showToast({
title:'删除成功!',
icon:'none'
})
this.reset()
} else if (res.cancel) {
console.log('取消');
}
}
});
},
reset(){
this.queryParams.pageNum = 1
this.demandList = []
this.getDemandList()
},
}
}
</script>
<style lang="scss" scoped>
.container {
padding: 26rpx 30rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin-bottom: 20rpx;
.title {
font-size: 30rpx;
color: #303949;
font-weight: bold;
}
.avatar {
width: 48rpx;
height: 48rpx;
background: #F83D3D;
border-radius: 50%;
}
.name {
font-size: 26rpx;
color: #303949;
font-weight: bold;
margin: 0 8rpx;
}
.area,
.address {
font-size: 24rpx;
color: #666666;
}
span {
color: #333333;
font-weight: bold;
}
.operate {
padding-top: 10rpx;
border-top: 1px solid #ECECEC;
&-budget {
font-size: 24rpx;
color: #666666;
}
&-price {
font-size: 30rpx;
color: #1572FF;
font-weight: bold;
margin-left: 8rpx;
}
&-delete {
font-size: 24rpx;
color: #FF3141;
}
}
}
</style>
\ No newline at end of file
<template>
<view class="">
<view class="index">
<view class="index-top">
定金金额
</view>
<u--input type="digit" placeholder="请输入内容" border="surround" v-model="value" @change="change" :customStyle="{
'background': '#FFFFFF',
'border-radius': '20rpx',
'height': '84rpx',
'border':'none'
}"></u--input>
<view class="" style="padding-bottom: 200rpx;">
<view class="index-top" style="margin-bottom: 4rpx;margin-top: 34rpx;">
用户须知
</view>
<view class="index-ct" v-html="tipContent"></view>
</view>
</view>
<view class="btm">
<view class="">
<span>付款金额:</span>
<span style="color: #F94D00;">{{numBer}}</span>
</view>
<view class="btms">
<u-button @click="jump" text="去付款" color="#1572FF" :customStyle="{
'padding':'24rpx 270rpx',
'border-radius': '45rpx',
'font-size': '30rpx'
}"></u-button>
</view>
</view>
</view>
</template>
<script>
import apiBaseConfig from '@/config/index.js';
import {
userTipGET,
createContractPUT
} from '@/api/workbench/index.js';
export default {
data() {
return {
imgBgUrl: apiBaseConfig.imgBgUrl,
globalData: getApp().globalData,
value: null,
numBer: '',
tipContent: '',
userId: ''
};
},
onLoad(option) {
this.userId = option.userId
this.userTip()
},
onReachBottom() {
console.log('触底了-------')
},
methods: {
userTip() {
userTipGET().then((res) => {
this.tipContent = this.$utilsMethods.replaceSpecialChar(res.rows[0].tipContent)
})
},
change(e) {
console.log('change', e);
this.numBer = this.$utilsMethods.numWay(e); // 调用numWay方法
console.log(this.numBer, "this.numBer"); // 3.00
},
jump() {
let self = this
if (!this.value) {
return uni.showToast({
title: '请输入定金金额',
icon: 'none',
duration: 2000,
});
}
createContractPUT({
deposit: self.value,
businessId: self.userId
}).then((res) => {
// uni.$u.toast('支付成功')
// setTimeout(() => {
// self.$uniGo.redirectTo({
// url: `/pages/index/index`
// })
// }, 1000);
// return
let obj = JSON.parse(res.data.expend.pay_info)
wx.requestPayment({
timeStamp: obj.timeStamp,
nonceStr: obj.nonceStr,
package: obj.package,
signType: obj.signType,
paySign: obj.paySign,
success(res) {
uni.$u.toast('支付成功')
setTimeout(() => {
self.$uniGo.navigateTo({
url: `/pages/index/index`
})
}, 1000);
},
fail(res) {
console.log(res, 'res=========')
self.$toast('支付失败')
}
})
})
// this.$uniGo.navigateTo({
// url: `/homePage/deposit/index`
// });
},
}
};
</script>
<style>
page {
background: #F7F8FA;
}
</style>
<style lang="scss" scoped>
.index {
padding: 60rpx 30rpx 230rpx;
&-top {
font-weight: 500;
font-size: 28rpx;
color: #333333;
margin-bottom: 20rpx;
}
&-ct {
font-weight: 400;
font-size: 24rpx;
color: #666666;
line-height: 40rp
}
}
.btm {
position: fixed;
bottom: 0rpx;
>view:nth-child(1) {
font-weight: 500;
font-size: 28rpx;
color: #1A1A1A;
margin-bottom: 20rpx;
margin-left: 30rpx;
}
}
.btms {
padding: 24rpx 60rpx 62rpx 60rpx;
width: calc(100% - 120rpx);
background-color: #FFFFFF;
}
</style>
\ No newline at end of file
<template>
<view class="index">
<view class="index-tit">
{{noticeInfo.noticeTitle}}
</view>
<view class="index-tim">
{{noticeInfo.createTime}}
</view>
<view style="font-weight: 400;font-size: 26rpx;color: #666666;" v-html="noticeContent"> </view>
</view>
</template>
<script>
import apiBaseConfig from '@/config/index.js';
import {
noticeGET
} from "@/api/workbench/index.js";
export default {
data() {
return {
imgBgUrl: apiBaseConfig.imgBgUrl,
globalData: getApp().globalData,
noticeContent: '',
noticeInfo:{}
};
},
onLoad(option) {
this.noticeG(option.noticeId)
},
onReachBottom() {
console.log('触底了-------')
},
methods: {
noticeG(noticeId) {
noticeGET(noticeId).then((res) => {
this.noticeInfo = res.data
this.noticeContent = this.$utilsMethods.replaceSpecialChar(res.data.noticeContent)
})
},
}
};
</script>
<style>
page {
background: #FFFFFF;
}
</style>
<style lang="scss" scoped>
.index {
padding: 36rpx 30rpx;
&-tit{
font-weight: 600;
font-size: 40rpx;
color: #242424;
margin-bottom: 22rpx;
}
&-tim{
font-weight: 400;
font-size: 24rpx;
color: #666666;
margin-bottom: 24rpx;
}
}
</style>
\ No newline at end of file
<template>
<view class="index">
<view class="" v-for="(v,index) in text1" :key="v.noticeId" @click="jump(v.noticeId)">
<view class="">
<view class="index-tit">
{{v.noticeTitle}}
</view>
<view class="index-cent" v-html="v.noticeCet">
</view>
<view class="index-tim">
{{v.createTime}}
</view>
</view>
<view v-if="text1.length-1 != index" class="xian"></view>
</view>
</view>
</template>
<script>
import apiBaseConfig from '@/config/index.js';
import {
noticeListGET
} from '@/api/workbench/index.js';
export default {
data() {
return {
imgBgUrl: apiBaseConfig.imgBgUrl,
globalData: getApp().globalData,
text1: [],
};
},
onLoad() {
//系统公告列表
this.notice()
},
onReachBottom() {
console.log('触底了-------')
},
methods: {
//系统公告列表
notice() {
noticeListGET().then((res) => {
if (res.data && res.data.length) {
res.data.forEach((itm) => {
itm.noticeCet = this.$utilsMethods.replaceSpecialChar(itm.noticeContent)
})
this.text1 = res.data
}
})
},
jump(noticeId) {
this.$uniGo.navigateTo({
url: `/homePage/detail/index?noticeId=${noticeId}`
});
},
}
};
</script>
<style>
page {
background-color: #Fff;
}
</style>
<style lang="scss" scoped>
.index {
padding: 22rpx 34rpx;
&-tit {
font-weight: 600;
font-size: 28rpx;
color: #333333;
overflow: hidden; // 溢出隐藏
white-space: nowrap; // 强制一行
text-overflow: ellipsis; // 文字溢出显示省略号
}
&-cent {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
font-weight: 400;
font-size: 24rpx;
color: #666666;
line-height: 36rpx;
margin-top: 12rpx;
}
&-tim{
margin-top: 20rpx;
font-weight: 400;
font-size: 24rpx;
color: #666666;
}
}
.xian{
margin: 30rpx 25rpx;
height: 2rpx;
background: #ECECEC;
}
</style>
\ No newline at end of file
<template>
<view class="index">
<view v-html="cent"> </view>
</view>
</template>
<script>
import apiBaseConfig from '@/config/index.js';
import {
manualGET
} from '@/api/workbench/index.js';
export default {
data() {
return {
imgBgUrl: apiBaseConfig.imgBgUrl,
globalData: getApp().globalData,
cent: '111111'
};
},
onLoad() {
this.manual()
},
onReachBottom() {
console.log('触底了-------')
},
methods: {
manual(){
manualGET().then((res)=>{
this.cent = this.$utilsMethods.replaceSpecialChar(res.data.manualContent)
})
}
}
};
</script>
<style>
page {
background: #F7F8FA;
}
</style>
<style lang="scss" scoped>
.index {
padding: 36rpx 30rpx;
}
</style>
\ No newline at end of file
<template>
<view>
<view style="padding: 36rpx 0 0;">
<view class="px-three">
<view class="px-two detail">
<view class="detail-title">{{detailData.forumTitle}}</view>
<view class="detail-date" v-if="detailData.sysUser && detailData.sysUser.nickName">发帖人:{{detailData.sysUser.nickName}}</view>
<view class="detail-date" v-if="detailData.sysUser && detailData.sysUser.createTime">{{detailData.sysUser.createTime}}</view>
</view>
<view class="u-content">
<u-parse :content="detailData.content"></u-parse>
</view>
</view>
<view class="comment" v-if="evalList.length">
<view class="comment-title">评论</view>
<view class="px-four py-three">
<view v-for="(item,index) in evalList" :key="index" style="margin-bottom: 30rpx;">
<evaluateList :itemDetail="item" @reply="handleOpenRely" @refersh="handleRefersh"></evaluateList>
</view>
</view>
</view>
</view>
<view class="placeholder padding-secure"></view>
<view class="fixed d-flex a-center j-sb padding-secure">
<view class="d-flex a-center">
<view class="d-flex a-center dynamic-operate">
<image @click="changeLikeState" :src="detailData.isLiked ? require('@/static/images/zan-selected.png') : require('@/static/images/zan.png')" mode=""></image>
<view>{{detailData.likesCount}}</view>
</view>
<view class="d-flex a-center dynamic-operate">
<image @click="changeCollectState" :src="detailData.isFavorites ? require('@/static/images/collect-selected.png') : require('@/static/images/collect.png')" mode=""></image>
<view>{{detailData.favoritesCount}}</view>
</view>
<view class="d-flex a-center dynamic-operate">
<image src="@/static/images/message.png" mode=""></image>
<view>{{detailData.commentsCount}}</view>
</view>
</view>
<view class="small-button" style="margin-right: 28rpx;" @click="showComments">写评论</view>
</view>
<commentPopup :replyName="replyData.userName" ref="childPopup" @send="handleSubmit" :isReply="isReply"></commentPopup>
</view>
</template>
<script>
import {
mapGetters
} from 'vuex'
import {
detailForumItemById,
listCommentByDemandId,
addCommentPOST,
likeOrUnlike,
collectOrUncollect
} from '@/api/workbench/index.js';
import evaluateList from '@/components/evaluate/index.vue'
import commentPopup from '@/components/custom/comment.vue'
export default {
components: {
evaluateList,
commentPopup
},
data() {
return {
detailData: {},
evalList:[],
isReply:false,
forumType:'invitation',
replyData:{}
}
},
computed: {
...mapGetters(['userInfo'])
},
onLoad(option) {
console.log(option.forumType,'forumType')
this.forumType = option.forumType
this.getDetailData(option.forumId)
},
methods: {
changeLikeState(row) {
let self = this
likeOrUnlike({
forumId: this.detailData.forumId,
userId: this.userInfo.userId,
isLikeType: 1, //论坛1评论2
}).then(res => {
console.log('改变')
this.getDetailData(this.detailData.forumId)
})
},
// 修改收藏状态
changeCollectState(row){
let self = this
collectOrUncollect({
forumId: this.detailData.forumId,
userId: this.userInfo.userId,
isFavoritesType: 1, // 论坛1商家2
favoriteType:'invitation'
}).then(res => {
uni.showToast({
title:'操作成功!',
icon:'none'
})
this.getDetailData(this.detailData.forumId)
})
},
async getDetailData(forumId) {
const res = await detailForumItemById(forumId)
this.detailData = res.data
this.getCommentList()
},
async getCommentList() {
let self = this
console.log(self.userInfo.userId, 'self.userInfo.userId')
const res = await listCommentByDemandId({
forumId: self.detailData.forumId,
commentType: self.forumType,
isUserId: self.userInfo.userId
})
this.evalList = res.rows
},
// 评论按钮点击事件
showComments() {
this.isReply = false
this.$refs.childPopup.content = ''
this.$refs.childPopup.contentImg = ''
this.$refs.childPopup.show = true;
},
// 回复按钮点击事件
handleOpenRely(replyId,replyUserId,replyUserName){
this.replyData = {
commentId:replyId,//回复对话的id
userId:replyUserId,//回复人的id
userName:replyUserName,//回复人的昵称
}
this.isReply = true
this.$refs.childPopup.content = ''
this.$refs.childPopup.show = true;
},
async handleSubmit() {
let params;
if (this.isReply) {
// 表示回复
params = {
forumId: this.detailData.forumId,
parentCommentId:this.replyData.commentId,
repliedId:this.replyData.commentId,
repliedUserId:this.replyData.userId,
commentType: this.forumType,
content: this.$refs.childPopup.content,
userId: this.userInfo.userId,
userType:this.userInfo.userType,
contentImg: this.$refs.childPopup.contentImg
}
} else {
params = {
forumId: this.detailData.forumId,
userId: this.userInfo.userId,
userType:this.userInfo.userType,
commentType: this.forumType,
content: this.$refs.childPopup.content,
contentImg: this.$refs.childPopup.contentImg
}
}
const res = await addCommentPOST(params)
console.log(res, '添加=====')
uni.showToast({
title: '成功!',
icon: 'none'
})
this.getCommentList()
},
// 刷新数据
handleRefersh(){
this.getCommentList()
},
}
}
</script>
<style>
page {
background: #fff;
}
</style>
<style lang="scss" scoped>
.detail {
&-title {
font-size: 40rpx;
color: #242424;
font-weight: bolder;
}
&-date {
font-size: 24rpx;
color: #666666;
margin-top: 22rpx;
margin-bottom: 24rpx;
}
}
.u-content {
font-size: 26rpx;
color: #666666;
line-height: 48rpx;
}
.comment {
width: 100%;
&-title {
padding: 24rpx 32rpx;
border-bottom: 1px solid #EBEBEB;
font-size: 26rpx;
font-weight: bold;
color: #333333;
}
}
.dynamic-operate {
margin-left: 60rpx;
>image {
width: 40rpx;
height: 40rpx;
}
>view {
font-size: 26rpx;
color: #666666;
margin-left: 8rpx;
}
}
</style>
\ No newline at end of file
<template>
<view>
<u-navbar leftText="返回" :safeAreaInsetTop="true" :placeholder="true">
<view class="u-nav-slot" slot="left">
<view class="d-flex a-center">
<u-icon name="arrow-left" color='#333' size="40rpx" @click="leftClick"></u-icon>
<view class="d-flex a-center" style="margin-left: 20rpx;">
<u--image :showLoading="true" shape="circle" :src="detailData.sysUser.avatar" width="68rpx"
height="68rpx" ></u--image>
<view class="sysUser-name">
{{detailData.sysUser.nickName}}
</view>
<view class="sj">
{{detailData.userType=='app_user'?'用户':'商家'}}
</view>
</view>
</view>
</view>
</u-navbar>
<u-swiper height="500rpx" :list="imgs"></u-swiper>
<view style="padding:36rpx 0 0;">
<view class="px-three">
<view class="detail">
<view class="detail-title">{{detailData.forumTitle}}</view>
<!-- <view class="detail-date" v-if="detailData.sysUser && detailData.sysUser.nickName">发帖人:{{detailData.sysUser.nickName}}</view> -->
<view class="detail-date" v-if="detailData.sysUser && detailData.sysUser.createTime">
{{detailData.sysUser.createTime}}
</view>
</view>
<view class="u-content">
<u-parse :content="detailData.content"></u-parse>
</view>
</view>
<view class="comment" v-if="evalList.length">
<view class="comment-title">评论</view>
<view class="px-four py-three">
<view v-for="(item,index) in evalList" :key="index" style="margin-bottom: 30rpx;">
<evaluateList :itemDetail="item" @reply="handleOpenRely" @refersh="handleRefersh">
</evaluateList>
</view>
</view>
</view>
</view>
<view class="placeholder padding-secure"></view>
<view class="fixed d-flex a-center j-sb padding-secure">
<view class="d-flex a-center">
<view class="d-flex a-center dynamic-operate">
<image @click="changeLikeState"
:src="detailData.isLiked ? require('@/static/images/zan-selected.png') : require('@/static/images/zan.png')"
mode=""></image>
<view>{{detailData.likesCount}}</view>
</view>
<view class="d-flex a-center dynamic-operate">
<image @click="changeCollectState"
:src="detailData.isFavorites ? require('@/static/images/collect-selected.png') : require('@/static/images/collect.png')"
mode=""></image>
<view>{{detailData.favoritesCount}}</view>
</view>
<view class="d-flex a-center dynamic-operate">
<image src="@/static/images/message.png" mode=""></image>
<view>{{detailData.commentsCount}}</view>
</view>
</view>
<view class="small-button" style="margin-right: 28rpx;" @click="showComments">写评论</view>
</view>
<commentPopup :replyName="replyData.userName" ref="childPopup" @send="handleSubmit" :isReply="isReply">
</commentPopup>
</view>
</template>
<script>
import {
mapGetters
} from 'vuex'
import {
detailForumItemById,
listCommentByDemandId,
addCommentPOST,
likeOrUnlike,
collectOrUncollect
} from '@/api/workbench/index.js';
import evaluateList from '@/components/evaluate/index.vue'
import commentPopup from '@/components/custom/comment.vue'
export default {
components: {
evaluateList,
commentPopup
},
data() {
return {
detailData: {},
evalList: [],
isReply: false,
forumType: 'invitation',
replyData: {},
imgs: []
}
},
computed: {
...mapGetters(['userInfo'])
},
onLoad(option) {
console.log(option, 'forumType====')
this.forumType = option.forumType
this.getDetailData(option.forumId)
},
methods: {
//返回
leftClick() {
// this.$uniGo.navigateBack({
// delta: 1
// });
uni.navigateBack()
},
changeLikeState(row) {
let self = this
likeOrUnlike({
forumId: this.detailData.forumId,
userId: this.userInfo.userId,
isLikeType: 1, //论坛1评论2
}).then(res => {
console.log('改变')
this.getDetailData(this.detailData.forumId)
})
},
// 修改收藏状态
changeCollectState(row) {
let self = this
collectOrUncollect({
forumId: this.detailData.forumId,
userId: this.userInfo.userId,
isFavoritesType: 1, // 论坛1商家2
favoriteType: 'invitation'
}).then(res => {
uni.showToast({
title: '操作成功!',
icon: 'none'
})
this.getDetailData(this.detailData.forumId)
})
},
async getDetailData(forumId) {
const res = await detailForumItemById(forumId)
this.imgs = res.data.imgs.split(',')
this.detailData = res.data
this.getCommentList()
},
async getCommentList() {
let self = this
console.log(self.userInfo.userId, 'self.userInfo.userId')
const res = await listCommentByDemandId({
forumId: self.detailData.forumId,
commentType: self.forumType,
isUserId: self.userInfo.userId
})
this.evalList = res.rows
},
// 评论按钮点击事件
showComments() {
this.isReply = false
this.$refs.childPopup.content = ''
this.$refs.childPopup.contentImg = ''
this.$refs.childPopup.show = true;
},
// 回复按钮点击事件
handleOpenRely(replyId, replyUserId, replyUserName) {
this.replyData = {
commentId: replyId, //回复对话的id
userId: replyUserId, //回复人的id
userName: replyUserName, //回复人的昵称
}
this.isReply = true
this.$refs.childPopup.content = ''
this.$refs.childPopup.show = true;
},
async handleSubmit() {
let params;
if (this.isReply) {
// 表示回复
params = {
forumId: this.detailData.forumId,
parentCommentId: this.replyData.commentId,
repliedId: this.replyData.commentId,
repliedUserId: this.replyData.userId,
commentType: this.forumType,
content: this.$refs.childPopup.content,
userId: this.userInfo.userId,
userType: this.userInfo.userType,
contentImg: this.$refs.childPopup.contentImg
}
} else {
params = {
forumId: this.detailData.forumId,
userId: this.userInfo.userId,
userType: this.userInfo.userType,
commentType: this.forumType,
content: this.$refs.childPopup.content,
contentImg: this.$refs.childPopup.contentImg
}
}
const res = await addCommentPOST(params)
console.log(res, '添加=====')
uni.showToast({
title: '成功!',
icon: 'none'
})
this.getCommentList()
this.getDetailData(this.detailData.forumId)
},
// 刷新数据
handleRefersh() {
this.getCommentList()
},
}
}
</script>
<style>
page {
background: #fff;
}
</style>
<style lang="scss" scoped>
.sysUser-name {
font-size: 28rpx;
color: #333333;
}
.detail {
&-title {
font-size: 40rpx;
color: #242424;
font-weight: bolder;
}
&-date {
font-size: 24rpx;
color: #666666;
margin-top: 22rpx;
margin-bottom: 24rpx;
}
}
.u-content {
font-size: 26rpx;
color: #666666;
line-height: 48rpx;
}
.comment {
width: 100%;
&-title {
padding: 24rpx 32rpx;
border-bottom: 1px solid #EBEBEB;
font-size: 26rpx;
font-weight: bold;
color: #333333;
}
}
.dynamic-operate {
margin-left: 60rpx;
>image {
width: 40rpx;
height: 40rpx;
}
>view {
font-size: 26rpx;
color: #666666;
margin-left: 8rpx;
}
}
.sj{
width: 72rpx;
height: 32rpx;
line-height: 32rpx;
text-align: center;
background: #1572FF;
border-radius: 8rpx;
background: rgba(21, 114, 255, 0.13);
font-size: 20rpx;
color: #1572FF;
margin-left: 10rpx;
}
</style>
\ No newline at end of file
<template>
<view>
<u-sticky bgColor="#ffff" offset-top="0">
<view class="index">
<image class="logo" src="@/static/images/headImage.png"></image>
<view :style="{ height: `calc(${globalData.navBarHeightRpx}rpx )` }"></view>
<view class="index-header d-flex j-sb a-center">
<view class="d-flex a-center" @click="handleLook">
<image @click.stop="handlePreview" class="index-header-avatar"
:src="clientInfo.avatar"
mode="">
</image>
<view class="index-header-info">
<view class="index-header-info-name">{{clientInfo.nickName}}</view>
<view class="index-header-info-phone">{{clientInfo.userName}}</view>
</view>
</view>
</view>
</view>
<view class="px-three">
<tabsList :list="tabsOptions" :checked="currentChecked" @change="handleChangeTab"></tabsList>
</view>
</u-sticky>
<view class="px-three" style="padding-bottom: 60rpx;">
<template v-if="currentChecked == 0">
<view v-for="(item,index) in demandList" :key="index">
<comDemandList :rowData="item"></comDemandList>
</view>
</template>
<template v-else>
<view class="distence" v-for="(item,index) in forumList" :key="index" @click="handleDetail(item.forumId)">
<!-- <dynamicList></dynamicList> -->
<dynamicList :itemDetail="item"></dynamicList>
</view>
</template>
</view>
</view>
</template>
<script>
import tabsList from '@/components/custom/tabs.vue'
import comDemandList from '@/components/custom/demand.vue'
import dynamicList from '@/components/custom/dynamic.vue'
import {
getUserInfoById,
listClientDemandGET,
listForumGET
} from '@/api/workbench/index.js';
export default {
components: {
tabsList,
comDemandList,
dynamicList,
},
data() {
return {
tabsOptions: [{
label: '用户需求',
value: 0
},
{
label: '论坛',
value: 1
},
],
currentChecked: 0,
queryParams: {
pageNum: 1,
pageSize: 100,
},
demandList: [], //需求列表
total: 0,
forumList:[],
forumTotal:0,
forumParams:{
pageNum: 1,
pageSize: 100,
forumType:'invitation'
},
clientInfo:{}
}
},
onLoad(option) {
console.log(option.userId, '========')
this.$set(this.queryParams,'userId',option.userId)
this.$set(this.forumParams,'userId',option.userId)
this.getUserInfo(option.userId)
this.getDemandList()
this.getForumList()
},
methods: {
async getUserInfo(userId){
const res = await getUserInfoById({
userId
})
console.log(res,'用户信息')
this.clientInfo = res.data
},
handleChangeTab(val) {
this.currentChecked = val
},
// 动态详情
handleDetail(forumId) {
uni.navigateTo({
url: `./dynamicDetail?forumId=${forumId}&forumType=invitation`
})
},
// 获取需求列表
async getDemandList() {
const res = await listClientDemandGET(this.queryParams)
console.log(res, 'res========')
this.demandList = res.rows
this.total = res.total
},
async getForumList(){
const res = await listForumGET(this.forumParams)
this.forumList = res.rows
this.forumTotal = res.total
},
}
}
</script>
<style>
/* page{
background: #fff;
} */
</style>
<style lang="scss" scoped>
.logo {
width: 100%;
height: 332rpx;
position: absolute;
z-index: -1;
top: 0%;
left: 0%;
}
.sticky {
width: 100%;
// padding: 16rpx 40rpx 20rpx;
box-sizing: border-box;
}
.index {
height: 332rpx;
position: relative;
&-header {
width: 100%;
position: absolute;
bottom: 40rpx;
padding: 0 40rpx;
box-sizing: border-box;
&-avatar {
width: 110rpx;
height: 110rpx;
background: #FFFFFF;
border: 4rpx solid rgba(255, 255, 255, 0.9);
border-radius: 50%;
}
&-info {
margin-left: 20rpx;
&-name {
font-size: 32rpx;
color: #FFFFFF;
}
&-phone {
font-size: 24rpx;
color: #FFFFFF;
margin-top: 12rpx;
}
}
}
}
.distence {
margin-bottom: 60rpx;
}
.distence:first-child {
margin-top: 20rpx;
}
</style>
\ No newline at end of file
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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