123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <template>
- <view class="message-detail-index">
- <view class="message-detail-content">
- {{detail.sendUserName}}{{detail.message}}
- </view>
- <view class="message-btn-box">
- <view class="message-btn red" @click="btnClick('拒绝')">拒绝</view>
- <view class="line"></view>
- <view class="message-btn primary" @click="btnClick('同意')">同意</view>
- </view>
- </view>
- </template>
- <script>
- import {
- getMessageDetailById,
- bindProject
- } from '@/request/api/message.js'
- export default {
- data() {
- return {
- messageId: '',
- detail: {}
- }
- },
- onLoad(body) {
- this.messageId = body.id;
- this.detail = JSON.parse(body.item);
- },
- methods: {
- init() {
- },
- btnClick(msg) {
- uni.showModal({
- title: '有极提示',
- content: '是否' + msg + '加入该项目',
- success: (res) => {
- if (res.confirm) {
- bindProject({
- organizationId: this.detail.organizationId,
- projectId: this.detail.projectId,
- clientId: this.detail.dataId,
- userId: this.$store.getters.user.userId,
- identityId: this.detail.identityId || 1
- }).then(res => {
- if (res.code === 200) {
- this.$toast('操作成功')
- }
- })
- }
- }
- });
- }
- }
- }
- </script>
- <style lang="scss">
- .message-detail-index {
- background: $uni-white;
- padding: 20rpx;
- padding-bottom: 0;
- margin: 20rpx 30rpx;
- border-radius: 10rpx;
- .message-detail-content {
- min-height: 200rpx;
- padding-bottom: 40rpx;
- }
- .message-btn-box {
- width: 100%;
- display: flex;
- height: 80rpx;
- align-items: center;
- border-top: 1px solid $uni-border-3;
- .line {
- width: 1px;
- height: 40rpx;
- background: $uni-border-3;
- }
- .message-btn {
- text-align: center;
- flex: 1;
- }
- .red {
- color: $uni-error;
- }
- .primary {
- color: $uni-primary;
- }
- }
- }
- </style>
|