|
@@ -133,7 +133,8 @@
|
|
<!-- 角色信息板块 -->
|
|
<!-- 角色信息板块 -->
|
|
<view class="info-section">
|
|
<view class="info-section">
|
|
<view class="character-name">
|
|
<view class="character-name">
|
|
- {{ starInfo.nickname }}
|
|
|
|
|
|
+ <uv-input v-if="state == 5" v-model="starInfo.nickname" placeholder="请输入昵称" border="none" />
|
|
|
|
+ <text v-else>{{ starInfo.nickname }}</text>
|
|
<image class="male" v-if="starInfo.sex == 0" src="../../static/me/wd_icon_nan.png"
|
|
<image class="male" v-if="starInfo.sex == 0" src="../../static/me/wd_icon_nan.png"
|
|
mode="aspectFit">
|
|
mode="aspectFit">
|
|
</image>
|
|
</image>
|
|
@@ -141,18 +142,19 @@
|
|
mode="aspectFit">
|
|
mode="aspectFit">
|
|
</image>
|
|
</image>
|
|
<image class="other" v-else src="../../static/me/wd_icon_qita.png" mode="aspectFit"></image>
|
|
<image class="other" v-else src="../../static/me/wd_icon_qita.png" mode="aspectFit"></image>
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
- <!-- <view class="section-title">关于Ta</view> -->
|
|
|
|
|
|
|
|
<!-- 人物简介 -->
|
|
<!-- 人物简介 -->
|
|
<view class="description-box">
|
|
<view class="description-box">
|
|
<view class="description-title">
|
|
<view class="description-title">
|
|
<view>Ta的设定</view>
|
|
<view>Ta的设定</view>
|
|
- <view v-if="false" class="edit-button">编辑<text class="fa fa-angle-right"
|
|
|
|
- style="color: #000;"></text></view>
|
|
|
|
|
|
+ <view v-if="state == 5" class="edit-button" @click="showEditPopup">
|
|
|
|
+ 编辑<text class="fa fa-angle-right" style="color: #000;"></text>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="description-text">
|
|
|
|
+ <text>{{ starInfo.content }}</text>
|
|
</view>
|
|
</view>
|
|
- <view class="description-text"> <text>{{ starInfo.content }}</text> </view>
|
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<!-- 标签展示 -->
|
|
<!-- 标签展示 -->
|
|
@@ -174,6 +176,21 @@
|
|
<view class="join-button" @tap="handleJoin(0)" v-if="state == 6"> 已驻星球 </view>
|
|
<view class="join-button" @tap="handleJoin(0)" v-if="state == 6"> 已驻星球 </view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
+ <!-- 编辑弹窗 -->
|
|
|
|
+ <uni-popup ref="editPopup" type="center">
|
|
|
|
+ <view class="edit-popup">
|
|
|
|
+ <view class="popup-title">修改设定</view>
|
|
|
|
+ <view class="popup-content">
|
|
|
|
+ <uv-textarea v-model="editContent" :maxlength="500" count autoHeight placeholder="输入Ta的设定"
|
|
|
|
+ class="edit-textarea" />
|
|
|
|
+ </view>
|
|
|
|
+ <view class="popup-buttons">
|
|
|
|
+ <view class="cancel-btn" @click="closeEditPopup">再考虑一下</view>
|
|
|
|
+ <view class="confirm-btn" @click="saveEdit">确认添加</view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </uni-popup>
|
|
|
|
+
|
|
<SharePopup :visible="showShare" :share-url="shareUrl" :share-title="shareTitle" :share-desc="shareDesc"
|
|
<SharePopup :visible="showShare" :share-url="shareUrl" :share-title="shareTitle" :share-desc="shareDesc"
|
|
:share-img="shareImg" @close="showShare = false" />
|
|
:share-img="shareImg" @close="showShare = false" />
|
|
</view>
|
|
</view>
|
|
@@ -239,6 +256,7 @@ export default {
|
|
maxRetries: 10, // 最大重试次数
|
|
maxRetries: 10, // 最大重试次数
|
|
retryCount: 0, // 当前重试次数
|
|
retryCount: 0, // 当前重试次数
|
|
pollingInterval: 30000, // 轮询间隔时间(毫秒)
|
|
pollingInterval: 30000, // 轮询间隔时间(毫秒)
|
|
|
|
+ editContent: '',
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onLoad() {
|
|
onLoad() {
|
|
@@ -273,33 +291,31 @@ export default {
|
|
this.formData.tags.push(tag);
|
|
this.formData.tags.push(tag);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- handleJoin() {
|
|
|
|
- console.log("入驻星球");
|
|
|
|
- // 处理入驻逻辑
|
|
|
|
- uni.request({
|
|
|
|
- url: this.$apiHost + "/AIpipei/gogogo",
|
|
|
|
- data: {
|
|
|
|
- uuid: getApp().globalData.uuid,
|
|
|
|
- },
|
|
|
|
- header: {
|
|
|
|
- "content-type": "application/x-www-form-urlencoded",
|
|
|
|
- sign: getApp().globalData.headerSign,
|
|
|
|
- },
|
|
|
|
- method: "POST",
|
|
|
|
- // 设置60秒超时
|
|
|
|
- timeout: 60000,
|
|
|
|
- success: (res) => {
|
|
|
|
- this.aIpipeiGetinfo({ polling: false })
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- fail: (err) => {
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- complete: () => {
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
|
|
+ handleJoin(type) {
|
|
|
|
+ if (type === 1) {
|
|
|
|
+ // 保存修改后的信息到服务器
|
|
|
|
+ uni.request({
|
|
|
|
+ url: this.$apiHost + "/AIpipei/gogogo",
|
|
|
|
+ data: {
|
|
|
|
+ uuid: getApp().globalData.uuid,
|
|
|
|
+ nickname: this.starInfo.nickname,
|
|
|
|
+ content: this.starInfo.content,
|
|
|
|
+ },
|
|
|
|
+ header: {
|
|
|
|
+ "content-type": "application/x-www-form-urlencoded",
|
|
|
|
+ sign: getApp().globalData.headerSign,
|
|
|
|
+ },
|
|
|
|
+ method: "POST",
|
|
|
|
+ success: (res) => {
|
|
|
|
+ this.aIpipeiGetinfo({ polling: false });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ // 已入驻状态,直接跳转
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/isLand/homeLand'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
|
|
// 提交用户 开始创建的命令
|
|
// 提交用户 开始创建的命令
|
|
@@ -398,11 +414,11 @@ export default {
|
|
console.log("查询到生成信息", res.data);
|
|
console.log("查询到生成信息", res.data);
|
|
// 重置重试计数
|
|
// 重置重试计数
|
|
this.retryCount = 0;
|
|
this.retryCount = 0;
|
|
-
|
|
|
|
|
|
+
|
|
if (res && res.data && res.data.info) {
|
|
if (res && res.data && res.data.info) {
|
|
if (res.data.info && res.data.info.tags != "") {
|
|
if (res.data.info && res.data.info.tags != "") {
|
|
res.data.info.tags = res.data.info.tags.split(",");
|
|
res.data.info.tags = res.data.info.tags.split(",");
|
|
- this.predefinedTags = res.data.info.tags.map(tag => { return { text: tag, value: tag } })
|
|
|
|
|
|
+ this.predefinedTags = res.data.info.tags.map(tag => { return { text: tag, value: tag } })
|
|
console.log(666, res);
|
|
console.log(666, res);
|
|
|
|
|
|
} else {
|
|
} else {
|
|
@@ -440,7 +456,7 @@ export default {
|
|
console.error("请求失败:", err);
|
|
console.error("请求失败:", err);
|
|
// 增加重试计数
|
|
// 增加重试计数
|
|
this.retryCount++;
|
|
this.retryCount++;
|
|
-
|
|
|
|
|
|
+
|
|
// 显示错误提示
|
|
// 显示错误提示
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title: `网络请求失败,第${this.retryCount}次重试`,
|
|
title: `网络请求失败,第${this.retryCount}次重试`,
|
|
@@ -463,7 +479,7 @@ export default {
|
|
this.aIpipeiGetinfo({ polling: true });
|
|
this.aIpipeiGetinfo({ polling: true });
|
|
}, this.pollingInterval);
|
|
}, this.pollingInterval);
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ }
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 保存表单信息
|
|
// 保存表单信息
|
|
@@ -563,7 +579,23 @@ export default {
|
|
case 'other':
|
|
case 'other':
|
|
return 2
|
|
return 2
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ // 显示编辑弹窗
|
|
|
|
+ showEditPopup() {
|
|
|
|
+ this.editContent = this.starInfo.content;
|
|
|
|
+ this.$refs.editPopup.open();
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 关闭编辑弹窗
|
|
|
|
+ closeEditPopup() {
|
|
|
|
+ this.$refs.editPopup.close();
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 保存编辑内容
|
|
|
|
+ saveEdit() {
|
|
|
|
+ this.starInfo.content = this.editContent;
|
|
|
|
+ this.closeEditPopup();
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
@@ -637,7 +669,7 @@ export default {
|
|
align-items: center;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
width: 100%;
|
|
width: 100%;
|
|
- height: calc( 90rpx + var(--status-bar-height));
|
|
|
|
|
|
+ height: calc(90rpx + var(--status-bar-height));
|
|
padding: 0 20rpx;
|
|
padding: 0 20rpx;
|
|
padding-top: var(--status-bar-height);
|
|
padding-top: var(--status-bar-height);
|
|
background-color: transparent;
|
|
background-color: transparent;
|
|
@@ -686,4 +718,80 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+.edit-popup {
|
|
|
|
+ width: 600rpx;
|
|
|
|
+ background: #fff;
|
|
|
|
+ border-radius: 24rpx;
|
|
|
|
+ padding: 40rpx 32rpx;
|
|
|
|
+
|
|
|
|
+ .popup-title {
|
|
|
|
+ font-size: 32rpx;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ text-align: center;
|
|
|
|
+ margin-bottom: 32rpx;
|
|
|
|
+ color: #000;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .popup-content {
|
|
|
|
+ margin-bottom: 32rpx;
|
|
|
|
+
|
|
|
|
+ .edit-textarea {
|
|
|
|
+ background: #F7F7F7;
|
|
|
|
+ border-radius: 16rpx;
|
|
|
|
+ padding: 24rpx;
|
|
|
|
+ min-height: 160rpx;
|
|
|
|
+
|
|
|
|
+ ::v-deep .uv-textarea__field {
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
+ color: #333;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .popup-buttons {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ gap: 24rpx;
|
|
|
|
+
|
|
|
|
+ .cancel-btn,
|
|
|
|
+ .confirm-btn {
|
|
|
|
+ flex: 1;
|
|
|
|
+ height: 88rpx;
|
|
|
|
+ line-height: 88rpx;
|
|
|
|
+ text-align: center;
|
|
|
|
+ border-radius: 44rpx;
|
|
|
|
+ font-size: 32rpx;
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .cancel-btn {
|
|
|
|
+ background: #fff;
|
|
|
|
+ color: #333;
|
|
|
|
+ border: 2rpx solid #E5E5E5;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .confirm-btn {
|
|
|
|
+ background: #000;
|
|
|
|
+ color: #fff;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.description-title {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ align-items: center;
|
|
|
|
+
|
|
|
|
+ .edit-button {
|
|
|
|
+ color: #7ebc00;
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+
|
|
|
|
+ .fa-angle-right {
|
|
|
|
+ margin-left: 10rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
</style>
|
|
</style>
|