|
@@ -63,8 +63,7 @@
|
|
|
v-model:title="title"
|
|
v-model:title="title"
|
|
|
v-model:content="content"
|
|
v-model:content="content"
|
|
|
v-model:images="images"
|
|
v-model:images="images"
|
|
|
- :villageInfo="villageInfoForAI.content.value ?? undefined"
|
|
|
|
|
- :tag="querys.tag"
|
|
|
|
|
|
|
+ :extraInfoFoAi="extraInfoFoAi"
|
|
|
@upload="uploader?.pick()"
|
|
@upload="uploader?.pick()"
|
|
|
@close="showAgentPopup = false"
|
|
@close="showAgentPopup = false"
|
|
|
/>
|
|
/>
|
|
@@ -73,32 +72,31 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { onMounted, ref, watch } from 'vue';
|
|
|
|
|
|
|
+import { computed, onMounted, ref, watch } from 'vue';
|
|
|
import { useLoadQuerys } from '@/components/composeabe/LoadQuerys';
|
|
import { useLoadQuerys } from '@/components/composeabe/LoadQuerys';
|
|
|
import { Debounce, formatError } from '@imengyu/imengyu-utils';
|
|
import { Debounce, formatError } from '@imengyu/imengyu-utils';
|
|
|
-import { confirm, toast, alert } from '@/components/dialog/CommonRoot';
|
|
|
|
|
|
|
+import { confirm, toast } from '@/components/dialog/CommonRoot';
|
|
|
import { useAuthStore } from '@/store/auth';
|
|
import { useAuthStore } from '@/store/auth';
|
|
|
import { useSimpleDataLoader } from '@/components/composeabe/loader/SimpleDataLoader';
|
|
import { useSimpleDataLoader } from '@/components/composeabe/loader/SimpleDataLoader';
|
|
|
-import { envVersion } from '@/common/config/AppCofig';
|
|
|
|
|
-import CommonContent from '@/api/CommonContent';
|
|
|
|
|
|
|
+import { envVersion, isDevEnv } from '@/common/config/AppCofig';
|
|
|
|
|
+import { back, backAndCallOnPageBack } from '@/components/utils/PageAction';
|
|
|
|
|
+import { confirm as uniConfirm } from '@/components/utils/DialogAction';
|
|
|
|
|
+import type { UploaderAction, UploaderItem } from '@/components/form/Uploader';
|
|
|
import BackgroundBox from '@/components/display/block/BackgroundBox.vue';
|
|
import BackgroundBox from '@/components/display/block/BackgroundBox.vue';
|
|
|
import Field from '@/components/form/Field.vue';
|
|
import Field from '@/components/form/Field.vue';
|
|
|
import Uploader, { type UploaderInstance } from '@/components/form/Uploader.vue';
|
|
import Uploader, { type UploaderInstance } from '@/components/form/Uploader.vue';
|
|
|
import FlexCol from '@/components/layout/FlexCol.vue';
|
|
import FlexCol from '@/components/layout/FlexCol.vue';
|
|
|
import ProvideVar from '@/components/theme/ProvideVar.vue';
|
|
import ProvideVar from '@/components/theme/ProvideVar.vue';
|
|
|
import FlexRow from '@/components/layout/FlexRow.vue';
|
|
import FlexRow from '@/components/layout/FlexRow.vue';
|
|
|
-import Popup from '@/components/dialog/Popup.vue';
|
|
|
|
|
import Agent from './components/agent.vue';
|
|
import Agent from './components/agent.vue';
|
|
|
-import OfficialApi, { PostMessage } from '@/api/light/OfficialApi';
|
|
|
|
|
import CommonTopBanner from '@/common/components/CommonTopBanner.vue';
|
|
import CommonTopBanner from '@/common/components/CommonTopBanner.vue';
|
|
|
import PrimaryButton from '@/common/components/PrimaryButton.vue';
|
|
import PrimaryButton from '@/common/components/PrimaryButton.vue';
|
|
|
import Tbutton from './components/tbutton.vue';
|
|
import Tbutton from './components/tbutton.vue';
|
|
|
import Height from '@/components/layout/space/Height.vue';
|
|
import Height from '@/components/layout/space/Height.vue';
|
|
|
-import type { UploaderAction, UploaderItem } from '@/components/form/Uploader';
|
|
|
|
|
-import { back, backAndCallOnPageBack } from '@/components/utils/PageAction';
|
|
|
|
|
-import { confirm as uniConfirm } from '@/components/utils/DialogAction';
|
|
|
|
|
-import LightVillageApi from '@/api/light/LightVillageApi';
|
|
|
|
|
import Button from '@/components/basic/Button.vue';
|
|
import Button from '@/components/basic/Button.vue';
|
|
|
|
|
+import OfficialApi, { PostMessage } from '@/api/light/OfficialApi';
|
|
|
|
|
+import LightVillageApi from '@/api/light/LightVillageApi';
|
|
|
|
|
+import CommonContent from '@/api/CommonContent';
|
|
|
|
|
|
|
|
const { querys } = useLoadQuerys({
|
|
const { querys } = useLoadQuerys({
|
|
|
tag: '',
|
|
tag: '',
|
|
@@ -108,7 +106,12 @@ const { querys } = useLoadQuerys({
|
|
|
const info = uni.getSystemInfoSync();
|
|
const info = uni.getSystemInfoSync();
|
|
|
console.log(info.platform);
|
|
console.log(info.platform);
|
|
|
|
|
|
|
|
- if (!(uni as any).shareToOfficialAccount || (info.platform !== 'android' && info.platform !== 'ios')) {
|
|
|
|
|
|
|
+ if (
|
|
|
|
|
+ !isDevEnv && (
|
|
|
|
|
+ !(uni as any).shareToOfficialAccount
|
|
|
|
|
+ || (info.platform !== 'android' && info.platform !== 'ios')
|
|
|
|
|
+ )
|
|
|
|
|
+ ) {
|
|
|
uniConfirm({
|
|
uniConfirm({
|
|
|
title: '提示',
|
|
title: '提示',
|
|
|
content: '抱歉,微信目前不支持在电脑端编写贴图,您可以在手机版微信中编写贴图哦!',
|
|
content: '抱歉,微信目前不支持在电脑端编写贴图,您可以在手机版微信中编写贴图哦!',
|
|
@@ -149,6 +152,19 @@ const villageInfoForAI = useSimpleDataLoader(async () => {
|
|
|
return null;
|
|
return null;
|
|
|
}, false);
|
|
}, false);
|
|
|
|
|
|
|
|
|
|
+const extraInfoFoAi = computed(() => {
|
|
|
|
|
+ const result = [] as string[];
|
|
|
|
|
+ result.push('用户正在编写话题:' +
|
|
|
|
|
+ //亮乡源话题中的“广场”意思是话题广场,AI容易曲解为现实中的地标广场,此处需要去除
|
|
|
|
|
+ querys.value.tag?.replace('广场', '')
|
|
|
|
|
+ );
|
|
|
|
|
+ if (villageInfoForAI.content.value) {
|
|
|
|
|
+ result.push('用户编写内容与此村社有关:' + villageInfoForAI.content.value.name);
|
|
|
|
|
+ result.push('地址:' + villageInfoForAI.content.value.address);
|
|
|
|
|
+ }
|
|
|
|
|
+ return result;
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
watch(title, () => saveDraftDebunce.executeWithDelay());
|
|
watch(title, () => saveDraftDebunce.executeWithDelay());
|
|
|
watch(content, () => saveDraftDebunce.executeWithDelay());
|
|
watch(content, () => saveDraftDebunce.executeWithDelay());
|
|
|
watch(images, () => saveDraftDebunce.executeWithDelay());
|
|
watch(images, () => saveDraftDebunce.executeWithDelay());
|