ZZ vor 1 Woche
Ursprung
Commit
c71b2cbc5b

+ 24 - 10
mer_uniapp/components/discoverDetails/index.vue

@@ -46,7 +46,7 @@
 						<view class="noteTitle flex-between-center">
 							<view>{{noteDetails.title}}</view>
 							<view v-if="dazi && noteDetails.authorId !== uid && !noteDetails.userIsJoin" class="dazi-info" @tap="onJoin">加入</view>
-							<view v-if="dazi && noteDetails.authorId !== uid && noteDetails.userIsJoin" class="dazi-info" @tap="onJoinColse">取消</view>
+							<view v-if="dazi && noteDetails.authorId !== uid && noteDetails.userIsJoin" class="dazi-info dazi-cancel" @tap="onJoinColse">取消</view>
 						</view>
 						<view>
 							<view class="text" v-if="noteDetails.isMore || (noteDetails.content && noteDetails.content.length<=70)">
@@ -553,15 +553,25 @@
 				this.$refs.joinDialog.open()
 			},
 			onJoinColse() {
-				myGameJoinIdApi(this.noteDetails.id).then(res => {
-					that.$util.Tips({
-						title: '取消成功'
-					});
-				}).catch(err => {
-					uni.showToast({
-						title: err,
-						icon: 'none'
-					})
+				let that = this;
+				uni.showModal({
+					content: '确定要取消么?',
+					success: function(res) {
+						if (res.confirm) {
+							myGameJoinIdApi(that.noteDetails.id).then(res => {
+								that.$util.Tips({
+									title: '取消成功'
+								});
+							}).catch(err => {
+								uni.showToast({
+									title: err,
+									icon: 'none'
+								})
+							});
+						} else if (res.cancel) {
+							console.log('用户点击取消');
+						}
+					}
 				});
 			},
 			handleInputClose() {
@@ -1089,6 +1099,10 @@
 		padding: 6rpx 25rpx;
 		border-radius: 8rpx;
 	}
+	.dazi-cancel {
+		background: #F8F9FB !important;
+		color: #141414 !important;
+	}
 
 	.tui-modal-custom {
 		width: 600rpx;

+ 7 - 1
mer_uniapp/components/discoverFlowItem/discoverFlowItem.vue

@@ -15,7 +15,8 @@
 					<view v-else class="flex-col flex-between-center h-136" style="align-items: flex-start;padding: 15rpx; 0">
 						<view class="w-full info-dzi fs-26 flex-between-center">
 							<text style="font-weight: bold;">{{items.title || ''}}</text>
-							<view class="dazi-info" v-if="fromTo !== 'home'">加入</view>
+							<view class="dazi-info" v-if="fromTo !== 'home' && !items.userIsJoin">加入</view>
+							<view class="dazi-info dazi-cancel" v-if="fromTo !== 'home' && items.userIsJoin">取消</view>
 						</view>
 						<view class="info-xzi-jj">{{items.content || ''}}</view>
 					</view>
@@ -306,6 +307,11 @@
 		border-radius: 8rpx;
 	}
 	
+	.dazi-cancel {
+		background: #F8F9FB !important;
+		color: #141414 !important;
+	}
+	
 	.type-image {
 		width: 58rpx;
 		height: 58rpx;