Merge branch 'dev' into test

This commit is contained in:
LinCyJang
2025-06-02 13:07:03 +08:00
26 changed files with 874 additions and 61 deletions
+3
View File
@@ -9,6 +9,9 @@
#### 安装教程 #### 安装教程
1. xxxx 1. xxxx
2. xxxx 2. xxxx
3. xxxx 3. xxxx
+8
View File
@@ -120,6 +120,14 @@ export default {
webUrl: this.$VUE_APP_RESOURCES_URL, webUrl: this.$VUE_APP_RESOURCES_URL,
// 输入模式:input-键盘,sound-语音 // 输入模式:input-键盘,sound-语音
inputModel: 'input', inputModel: 'input',
/**
* 端午节送礼攻略
* 丽江逛吃攻略
* 云南非遗有哪些?
* 怎么申请地理标志保护产品?
* 想找个像《去有风的地方》那样的治愈县城
* 云南有哪些小众县城适合旅居?
*/
prompt: '', prompt: '',
recordManager: null, recordManager: null,
// 录音权限是否开通 // 录音权限是否开通
+100 -3
View File
@@ -1,7 +1,9 @@
import { import {
getSseConfigV1, getSseConfigV1,
getCompletionsV2, getCompletionsV2,
deleteChatItemByConversationId deleteChatItemByConversationId,
getAnalyzeKeywordsV1,
getAnalyzeKeywordsChangeV1
} from '@/api/chat/index' } from '@/api/chat/index'
import { VUE_APP_API_URL } from '@/config' import { VUE_APP_API_URL } from '@/config'
import settings from '@/config/baseSetting.js' import settings from '@/config/baseSetting.js'
@@ -104,10 +106,21 @@ export const chatMixins = {
copyContentHandle(data) { copyContentHandle(data) {
uni.setClipboardData({ uni.setClipboardData({
data, data,
success: () => success: () => {
uni.showToast({ uni.showToast({
title: '已复制' title: '已复制'
}) })
}
})
},
copyMoreInfoHandle(item) {
uni.setClipboardData({
data: JSON.stringify(item.showMoreInfo),
success: () => {
uni.showToast({
title: '已复制'
})
}
}) })
}, },
shareHandle() { shareHandle() {
@@ -181,7 +194,8 @@ export const chatMixins = {
conversationId: '', conversationId: '',
prompt, prompt,
listQuestion: [], listQuestion: [],
type: -2 type: -2,
showMoreInfo: {}
}) })
_this.loading = true _this.loading = true
_this.showCursor = false _this.showCursor = false
@@ -207,6 +221,32 @@ export const chatMixins = {
_this.chatErrorSetContent() _this.chatErrorSetContent()
}) })
}) })
getAnalyzeKeywordsV1({
'chatNumber': _this.chatNumber,
conversationId,
prompt
}).then(keywordRes => {
if (keywordRes.success) {
const keywordResData = keywordRes.data
const show = (keywordResData.searchArtworks ||
keywordResData.searchDiscount ||
keywordResData.searchGoods ||
keywordResData.searchLandmark ||
keywordResData.searchTowns ||
keywordResData.searchTravelGuide
) && (keywordResData.resultItems && keywordResData.resultItems.length > 0)
_this.chatMessageList[_this.chatMessageListLength - 1].showMoreInfo = keywordResData
_this.chatMessageList[_this.chatMessageListLength - 1].showMoreInfo.show = show
// 展示类型
_this.chatMessageList[_this.chatMessageListLength - 1].showMoreInfo.showType = ''
if (show && keywordResData.resultItems) {
keywordResData.resultItems.map(resItem => {
_this.chatMessageList[_this.chatMessageListLength - 1].showMoreInfo.showType = resItem.type
})
}
console.log(_this.chatMessageList[_this.chatMessageListLength - 1])
}
})
} else { } else {
_this.chatErrorSetContent() _this.chatErrorSetContent()
} }
@@ -215,6 +255,63 @@ export const chatMixins = {
_this.chatErrorSetContent() _this.chatErrorSetContent()
}) })
}, },
analyzeKeywordsChangeHandle(conversationId, showMoreInfo) {
getAnalyzeKeywordsChangeV1({
conversationId,
...showMoreInfo
}).then(res => {
const { success, data } = res
if (success) {
let resultItems = []
let idx = -1
this.chatMessageList.map((item, index) => {
if (item.conversationId === conversationId) {
resultItems = data.resultItems || []
idx = index
}
})
if (idx > -1) {
this.$set(this.chatMessageList[idx].showMoreInfo, 'resultItems', resultItems)
this.$forceUpdate()
}
}
})
},
productItemClickHandle(item) {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
id: item.id
}
})
},
hotelItemClickHandle(item) {
this.$yrouter.push({
path: '/pagesInn/inn/innHome',
query: {
id: item.id
}
})
},
ichItemClickHandle(item) {
this.$yrouter.push({
path: '/pkg_product/views/heritage/details',
query: {
id: item.id
}
})
},
qianxianItemClickHandle(item) {
this.$yrouter.push({
path: '/pkg_product/views/famousQianxianShop',
query: {
id: item.id
}
})
},
prizeItemClickHandle() {
this.$yrouter.push({ path: '/pkg-video/views/lottery' })
},
chatErrorSetContent() { chatErrorSetContent() {
this.chatMessageList[this.chatMessageListLength - 1].isError = true this.chatMessageList[this.chatMessageListLength - 1].isError = true
this.chatMessageList[this.chatMessageListLength - 1].content = this.errorMsg this.chatMessageList[this.chatMessageListLength - 1].content = this.errorMsg
+117 -1
View File
@@ -100,6 +100,121 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 换一换 -->
<view
v-if="!item.showCursor && item.nodes && item.nodes.length && !item.isError && item.showMoreInfo.show"
class="change-list-wrap"
>
<view v-if="item.showMoreInfo.showType === '特产商品'" class="list-wrap">
<view
v-for="(productItem, productIndex) in item.showMoreInfo.resultItems"
:key="productIndex"
class="product-item"
@click="productItemClickHandle(productItem)"
>
<image
:src="productItem.img"
class="img"
/>
<view class="product-info">
<view class="name one-t">
{{ productItem.name }}
</view>
<view class="price-wrap">
<view class="price">
<text class="txt"></text>{{ productItem.price }}
</view>
<view class="btn">立即查看</view>
</view>
</view>
</view>
</view>
<view v-if="item.showMoreInfo.showType === '店铺'" class="list-wrap">
<view
v-for="(hotel, hotelIndex) in item.showMoreInfo.resultItems"
:key="hotelIndex"
class="product-item"
@click="hotelItemClickHandle(hotel)"
>
<view class="hotel-type">
{{ hotel.hotelTypeName }}
</view>
<image
:src="hotel.img"
class="img"
/>
<view class="product-info">
<view class="name one-t">
{{ hotel.name }}
</view>
<view class="desc-wrap one-t">
{{ hotel.description || '' }}
</view>
</view>
</view>
</view>
<view v-if="item.showMoreInfo.showType === '非遗文化'" class="list-wrap">
<view
v-for="(ich, ichIndex) in item.showMoreInfo.resultItems"
:key="ichIndex"
class="product-item"
@click="ichItemClickHandle(ich)"
>
<image
:src="ich.img"
class="img"
/>
<view class="product-info">
<view class="name one-t">
{{ ich.name }}
</view>
<view class="desc-wrap one-t">
{{ ich.description || '' }}
</view>
</view>
</view>
</view>
<view v-if="item.showMoreInfo.showType === '千县名品'" class="list-wrap">
<view
v-for="(qianxian, qianxianIndex) in item.showMoreInfo.resultItems"
:key="qianxianIndex"
class="product-item"
@click="qianxianItemClickHandle(qianxian)"
>
<image
:src="qianxian.img"
class="img"
/>
<view class="product-info">
<view class="name name2 one-t">
{{ qianxian.name }}
</view>
</view>
</view>
</view>
<view v-if="item.showMoreInfo.showType === '优惠活动'" class="list-wrap prize-list-wrap">
<view
v-for="(prize, prizeIndex) in item.showMoreInfo.resultItems"
:key="prizeIndex"
class="prize-item"
@click="prizeItemClickHandle(prize)"
>
<image
:src="prize.img"
class="img"
mode="widthFix"
/>
</view>
</view>
<view v-if="item.showMoreInfo.showType !== '优惠活动'" class="change-btn">
<image
:src="webUrl + '/aiChat/icon-change.png'"
class="icon"
mode="widthFix"
@click="analyzeKeywordsChangeHandle(item.conversationId, item.showMoreInfo)"
/>
</view>
</view>
<view <view
v-if="index === (chatMessageListLength - 1) && item.listQuestion.length > 0" v-if="index === (chatMessageListLength - 1) && item.listQuestion.length > 0"
class="suggestion-wrap" class="suggestion-wrap"
@@ -222,7 +337,8 @@ export default {
conversationId: item.messageId, conversationId: item.messageId,
showCursor: false, showCursor: false,
listQuestion: item.listQuestion || [], listQuestion: item.listQuestion || [],
type: -2 type: -2,
showMoreInfo: {}
}) })
} }
} }
+234 -7
View File
@@ -12,7 +12,7 @@
color="#333" color="#333"
transparent="auto" transparent="auto"
barPlaceholder="hidden" barPlaceholder="hidden"
title="云灵AI智能助手" title="云灵AI助手"
@click-left="clickBackHandle" @click-left="clickBackHandle"
/> />
<page-container <page-container
@@ -21,8 +21,9 @@
:z-index="1" :z-index="1"
@beforeleave="pageContainerBeforeleave" @beforeleave="pageContainerBeforeleave"
> >
<view style="opacity: 0;"></view> <view style="opacity: 0;">
遮罩层用于监听实体键返回 遮罩层用于监听实体键返回
</view>
</page-container> </page-container>
<view <view
id="fixTbabarBody" id="fixTbabarBody"
@@ -48,6 +49,73 @@
</view> </view>
</view> </view>
</view> </view>
<view v-if="weatherData.city && holidayData.suit" class="weather-holiday-wrap">
<view class="weather-data data-wrap">
<block v-if="!weatherDataLoading">
<view v-if="weatherIsLoad">
<!-- 各种天气对应的图标
https://yikeapi.com/help/wea
https://yikeapi.com/help/tianqiimg -->
<view class="title">
<image
:src="webUrl + '/aiChat/weather/' + weatherData.wea_img +'.png'"
class="icon"
mode="widthFix"
/>
<view class="tem-wrap">
<view class="tem">{{ weatherData.tem }}</view>
<view class="unit"></view>
</view>
</view>
<view class="loca">
<view class="addr">
<image
:src="webUrl + '/aiChat/addr.png'"
class="icon"
mode="widthFix"
/>
{{ weatherData.city }}
</view>
<view class="tem-range">
{{ weatherData.wea }}&nbsp;&nbsp;{{ weatherData.tem2 }}~{{ weatherData.tem1 }}
</view>
</view>
<view class="content">今日风向{{ weatherData.win }}</view>
<view class="content">紫外线指数{{ weatherData.uvIndex }}&nbsp;&nbsp;{{ weatherData.uvDescription }}</view>
</view>
<view v-else class="no-weather">
<image
:src="webUrl + '/aiChat/weather/no-weather.png'"
class="img"
mode="widthFix"
/>
<view>无法获取天气信息</view>
</view>
</block>
<block v-else>
<view class="txt-loading">加载中...</view>
</block>
</view>
<view v-if="holidayData.suit" class="holiday-data data-wrap">
<view class="title">
<view class="day">{{ holidayData.lunarCalendar }}</view>
<view>{{ holidayData.date.substr(5).replace('-', '/') }}&nbsp;{{ weekDayArr[holidayData.weekDay] }}</view>
</view>
<view class="desc">{{ holidayData.yearTips }}/{{ holidayData.chineseZodiac }}</view>
<view class="tip">
<view class="label"></view>
<view class="content">
{{ holidayData.suit }}
</view>
</view>
<view class="tip">
<view class="label label2"></view>
<view class="content">
{{ holidayData.avoid }}
</view>
</view>
</view>
</view>
<view class="topic-wrap"> <view class="topic-wrap">
<view class="title"> <view class="title">
<image <image
@@ -165,9 +233,125 @@
/> />
重新生成 重新生成
</view> </view>
<view class="item item2" @click="copyMoreInfoHandle(item)">拷贝</view>
</view> </view>
</view> </view>
</view> </view>
<!-- 换一换 -->
<view
v-if="!item.showCursor && item.nodes && item.nodes.length && !item.isError && item.showMoreInfo.show"
class="change-list-wrap"
>
<view v-if="item.showMoreInfo.showType === '特产商品'" class="list-wrap">
<view
v-for="(productItem, productIndex) in item.showMoreInfo.resultItems"
:key="productIndex"
class="product-item"
@click="productItemClickHandle(productItem)"
>
<image
:src="productItem.img"
class="img"
/>
<view class="product-info">
<view class="name one-t">
{{ productItem.name }}
</view>
<view class="price-wrap">
<view class="price">
<text class="txt"></text>{{ productItem.price }}
</view>
<view class="btn">立即查看</view>
</view>
</view>
</view>
</view>
<view v-if="item.showMoreInfo.showType === '店铺'" class="list-wrap">
<view
v-for="(hotel, hotelIndex) in item.showMoreInfo.resultItems"
:key="hotelIndex"
class="product-item"
@click="hotelItemClickHandle(hotel)"
>
<view class="hotel-type">
{{ hotel.hotelTypeName }}
</view>
<image
:src="hotel.img"
class="img"
/>
<view class="product-info">
<view class="name one-t">
{{ hotel.name }}
</view>
<view class="desc-wrap one-t">
{{ hotel.description || '' }}
</view>
</view>
</view>
</view>
<view v-if="item.showMoreInfo.showType === '非遗文化'" class="list-wrap">
<view
v-for="(ich, ichIndex) in item.showMoreInfo.resultItems"
:key="ichIndex"
class="product-item"
@click="ichItemClickHandle(ich)"
>
<image
:src="ich.img"
class="img"
/>
<view class="product-info">
<view class="name one-t">
{{ ich.name }}
</view>
<view class="desc-wrap one-t">
{{ ich.description || '' }}
</view>
</view>
</view>
</view>
<view v-if="item.showMoreInfo.showType === '千县名品'" class="list-wrap">
<view
v-for="(qianxian, qianxianIndex) in item.showMoreInfo.resultItems"
:key="qianxianIndex"
class="product-item"
@click="qianxianItemClickHandle(qianxian)"
>
<image
:src="qianxian.img"
class="img"
/>
<view class="product-info">
<view class="name name2 one-t">
{{ qianxian.name }}
</view>
</view>
</view>
</view>
<view v-if="item.showMoreInfo.showType === '优惠活动'" class="list-wrap prize-list-wrap">
<view
v-for="(prize, prizeIndex) in item.showMoreInfo.resultItems"
:key="prizeIndex"
class="prize-item"
@click="prizeItemClickHandle(prize)"
>
<image
:src="prize.img"
class="img"
mode="widthFix"
/>
</view>
</view>
<view v-if="item.showMoreInfo.showType !== '优惠活动'" class="change-btn">
<image
:src="webUrl + '/aiChat/icon-change.png'"
class="icon"
mode="widthFix"
@click="analyzeKeywordsChangeHandle(item.conversationId, item.showMoreInfo)"
/>
</view>
</view>
<view <view
v-if="index === (chatMessageListLength - 1) && item.listQuestion.length > 0" v-if="index === (chatMessageListLength - 1) && item.listQuestion.length > 0"
class="suggestion-wrap" class="suggestion-wrap"
@@ -195,7 +379,11 @@
</view> </view>
</view> </view>
</view> </view>
<view id="bottom_postion" class="bottom-postion" /> <view
v-if="chatNumber"
id="bottom_postion"
class="bottom-postion"
/>
</view> </view>
</view> </view>
<view <view
@@ -246,6 +434,10 @@ import {
getAiSystemInfoSetting, getAiSystemInfoSetting,
getAiSystemInfoTopic getAiSystemInfoTopic
} from '@/api/public' } from '@/api/public'
import {
getWeatherData,
getHolidayData
} from '@/api/chat/index'
import AiHistoryList from '../components/historyList' import AiHistoryList from '../components/historyList'
import BottomSend from '../components/bottomSend.vue' import BottomSend from '../components/bottomSend.vue'
export default { export default {
@@ -257,12 +449,21 @@ export default {
mixins: [chatMixins], mixins: [chatMixins],
data() { data() {
return { return {
cityName: '',
weatherDataLoading: false,
weatherIsLoad: true,
weatherData: {},
holidayData: {},
weekDayArr: Object.freeze(['', '周一', '周二', '周三', '周四', '周五', '周六', '周日']),
animationWidth: '150%', animationWidth: '150%',
animationStr: '', animationStr: '',
settingInfo: {}, settingInfo: {},
topicList: [] topicList: []
} }
}, },
onLoad(options) {
this.cityName = options.cityName || ''
},
onShow() { onShow() {
const addNewChat = uni.getStorageSync('addNewChat') === '1' const addNewChat = uni.getStorageSync('addNewChat') === '1'
// 从历史界面点击新增对话 // 从历史界面点击新增对话
@@ -287,12 +488,37 @@ export default {
this.animationStr = `TranslateXSwiper-${data.systemTopicDivMaxWidth * 10} ${data.systemTopicDivScrollDuration}s infinite linear alternate` this.animationStr = `TranslateXSwiper-${data.systemTopicDivMaxWidth * 10} ${data.systemTopicDivScrollDuration}s infinite linear alternate`
} }
}) })
getAiSystemInfoTopic().then(res => { this.loadData()
})
},
loadData() {
getAiSystemInfoTopic().then(res => {
const { success, data } = res
if (success) {
this.topicList = data || []
}
})
if (this.cityName) {
this.weatherDataLoading = true
getWeatherData({
cityName: this.cityName
}).then(res => {
const { success, data } = res const { success, data } = res
if (success) { if (success) {
this.topicList = data || [] this.weatherData = data
} }
this.weatherIsLoad = true
this.weatherDataLoading = false
}).catch(() => {
this.weatherDataLoading = false
this.weatherIsLoad = false
}) })
}
getHolidayData().then(res => {
const { success, data } = res
if (success) {
this.holidayData = data
}
}) })
}, },
// 创建新会话 // 创建新会话
@@ -304,6 +530,7 @@ export default {
this.loading = false this.loading = false
this.getConfigLoading = false this.getConfigLoading = false
this.chatMessageList = [] this.chatMessageList = []
this.loadData()
}, },
clickBackHandle() { clickBackHandle() {
if (!this.chatNumber) { if (!this.chatNumber) {
@@ -372,7 +599,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 60rpx 40rpx; padding: 0 40rpx;
.guide-left { .guide-left {
.avatar { .avatar {
display: block; display: block;
+18
View File
@@ -12,6 +12,16 @@ export function getCompletionsV2(params) {
return request.get('/v1/chat/sse/completions2', params, { login: true }) return request.get('/v1/chat/sse/completions2', params, { login: true })
} }
// 通过关键字-搜索列表
export function getAnalyzeKeywordsV1(data) {
return request.post('/v1/chat/analyzeKeywords', data, { login: true })
}
// 通过关键字-搜索列表-换一换
export function getAnalyzeKeywordsChangeV1(data) {
return request.post('/v1/chat/aiSearch', data, { login: true })
}
export function deleteChatItemByConversationId(id) { export function deleteChatItemByConversationId(id) {
return request.delete('/v1/chat/message/' + id, {}, { login: true }) return request.delete('/v1/chat/message/' + id, {}, { login: true })
} }
@@ -27,3 +37,11 @@ export function historyChatMessage(params) {
export function deleteChatListByType(type) { export function deleteChatListByType(type) {
return request.delete('/v1/chat/type/' + type, {}, { login: true }) return request.delete('/v1/chat/type/' + type, {}, { login: true })
} }
export function getWeatherData(params) {
return request.get('/v1/chat/weatherData', params, { login: true })
}
export function getHolidayData(params) {
return request.get('/v1/chat/holidayData', params, { login: true })
}
+253
View File
@@ -488,6 +488,7 @@ page {
} }
} }
.bottom-btns { .bottom-btns {
position: relative;
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
padding: 20rpx 0 0 0; padding: 20rpx 0 0 0;
@@ -510,6 +511,13 @@ page {
margin: 0 6rpx 0 0; margin: 0 6rpx 0 0;
} }
} }
.item2 {
position: absolute;
bottom: 0;
right: 0;
margin: 0;
color: transparent;
}
} }
} }
} }
@@ -919,4 +927,249 @@ page {
100% { 100% {
height: 20rpx; height: 20rpx;
} }
}
.change-list-wrap {
.list-wrap {
display: flex;
flex-wrap: nowrap;
width: 100%;
flex-shrink: 0;
padding: 40rpx 0;
overflow-x: auto;
.product-item {
position: relative;
width: 240rpx;
margin: 0 24rpx 0 0;
border-radius: 20rpx;
background-color: #fff;
box-shadow: 0rpx 6rpx 12rpx rgba(0,0,0,0.16);
&:last-child {
margin: 0;
}
.img {
position: relative;
z-index: 2;
display: block;
width: 240rpx;
height: 240rpx;
border-radius: 20rpx;
}
.product-info {
padding: 12rpx;
.name {
height: 34rpx;
font-size: 24rpx;
color: #333;
line-height: 34rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
transition: all linear 0.2s;
}
.name2 {
font-weight: bold;
}
.price-wrap {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 12rpx;
.price {
color: #C52733;
font-size: 24rpx;
font-weight: bold;
.txt {
font-size: 16rpx;
}
}
.btn {
height: 30rpx;
padding: 0 12rpx;
border-radius: 16rpx;
color: #fff;
font-size: 22rpx;
background-color: #C52733;
}
}
.desc-wrap {
font-size: 24rpx;
color: #999;
line-height: 34rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.hotel-type {
position: absolute;
top: 0;
left: 0;
z-index: 5;
height: 40rpx;
padding: 0 24rpx;
border-top-left-radius: 20rpx;
border-bottom-right-radius: 20rpx;
color: #fff;
font-size: 24rpx;
background-color: rgba(0, 0, 0, 0.5);
}
}
}
.prize-list-wrap {
display: block;
.prize-item {
.img {
display: block;
width: 100%;
border-radius: 20rpx;
}
}
}
.change-btn {
display: flex;
align-items: center;
justify-content: center;
padding: 0 0 20rpx 0;
.icon {
display: block;
width: 124rpx;
height: 38rpx;
}
}
}
.weather-holiday-wrap {
display: flex;
align-items: stretch;
justify-content: space-between;
gap: 12px;
padding: 0 24rpx 48rpx 24rpx;
.data-wrap {
flex: 1;
padding: 20rpx;
border-radius: 20rpx;
box-sizing: border-box;
background-color: #fff;
box-shadow: 0rpx 0rpx 20rpx rgba(0,0,0,0.16);
}
.weather-data {
.title {
display: flex;
align-items: center;
color: #3D4CF1;
.icon {
display: block;
width: 100rpx;
height: 100rpx;
margin: 0 12rpx 0 0;
}
.tem-wrap {
display: flex;
align-items: baseline;
}
.tem {
font-size: 70rpx;
line-height: 70rpx;
font-weight: bold;
}
.unit {
font-size: 36rpx;
line-height: 36rpx;
}
}
.loca {
display: flex;
padding: 24rpx 0;
font-size: 26rpx;
line-height: 36rpx;
color: #333;
.addr {
display: flex;
align-items: center;
.icon {
display: block;
width: 24rpx;
height: 24rpx;
margin: 0 4rpx 0 0;
}
}
.tem-range {
padding: 0 0 0 24rpx;
}
}
.content + .content {
padding: 12rpx 0 0 0;
}
.content {
color: #3D4CF1;
font-size: 26rpx;
line-height: 36rpx;
font-weight: bold;
}
.txt-loading {
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
min-height: 200rpx;
}
.no-weather {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
font-size: 26rpx;
color: #999;
line-height: 38rpx;
.img {
display: block;
width: 226rpx;
height: 130rpx;
margin: 0 0 12rpx 0;
}
}
}
.holiday-data {
.title {
display: flex;
font-size: 24rpx;
color: #333;
line-height: 36rpx;
.day {
margin: 0 8rpx 0 0;
color: #3D4CF1;
font-size: 28rpx;
}
}
.desc {
font-size: 24rpx;
color: #333;
line-height: 36rpx;
}
.tip {
display: flex;
flex-wrap: wrap;
padding: 20rpx 0 0 0;
.label {
display: block;
width: 32rpx;
height: 32rpx;
margin: 0 12rpx 0 0;
border-radius: 8rpx;
text-align: center;
line-height: 32rpx;
font-size: 24rpx;
color: #fff;
background-color: #3D4CF1;
}
.label2 {
background-color: #C52733;
}
.content {
width: calc(100% - 44rpx);
margin: -6rpx 0 0 0;
font-size: 24rpx;
}
}
}
} }
+3 -1
View File
@@ -31,7 +31,7 @@
<image <image
v-if="activeVideo !== 'video' + evaluateWtapperIndex" v-if="activeVideo !== 'video' + evaluateWtapperIndex"
:src="item.video + '?vframe/jpg/offset/1'" :src="item.video + '?vframe/jpg/offset/1'"
class="image" class="image pic-img"
@click="pauseOtherVideo('video' + evaluateWtapperIndex)" @click="pauseOtherVideo('video' + evaluateWtapperIndex)"
> >
@@ -106,6 +106,7 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.attr-bg{ .attr-bg{
background: rgba(197,39,51,0.1); background: rgba(197,39,51,0.1);
padding: 7rpx 5px; padding: 7rpx 5px;
@@ -118,6 +119,7 @@ export default {
.evaluateWtapper .evaluateItem .imgList .pictrue{ .evaluateWtapper .evaluateItem .imgList .pictrue{
position: relative; position: relative;
width: 300rpx; width: 300rpx;
height: 300rpx;
.play-icon { .play-icon {
position: absolute; position: absolute;
top: 0; top: 0;
+7 -1
View File
@@ -15,6 +15,12 @@ import {
} from '@/api/public' } from '@/api/public'
export default { export default {
name: 'AiEntrance', name: 'AiEntrance',
props: {
cityName: {
type: String,
default: ''
}
},
data() { data() {
return { return {
showImg: false, showImg: false,
@@ -36,7 +42,7 @@ export default {
}, },
enterAiChat() { enterAiChat() {
uni.navigateTo({ uni.navigateTo({
url: '/aiChat/views/index?click=1' url: '/aiChat/views/index?click=1&cityName=' + this.cityName
}) })
} }
} }
+2 -2
View File
@@ -855,7 +855,7 @@
{ {
"path": "views/index", "path": "views/index",
"style": { "style": {
"navigationBarTitleText": "云灵AI智能助手", "navigationBarTitleText": "云灵AI助手",
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@@ -863,7 +863,7 @@
{ {
"path": "views/history", "path": "views/history",
"style": { "style": {
"navigationBarTitleText": "云灵AI智能助手", "navigationBarTitleText": "云灵AI助手",
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
+3 -1
View File
@@ -353,7 +353,9 @@
paddingBottom="200rpx" paddingBottom="200rpx"
/> />
<FunctionGuide :maxStep="15" @hide="setGuide('index')" :guideData="functionGuideData" ref="FunctionGuide"></FunctionGuide> <FunctionGuide :maxStep="15" @hide="setGuide('index')" :guideData="functionGuideData" ref="FunctionGuide"></FunctionGuide>
<AiEntrance /> <AiEntrance
:city-name="cityName"
/>
<xdd-tabbar :curr-index="0" @getElementData="elementData" @getIcon="getIcon"/> <xdd-tabbar :curr-index="0" @getElementData="elementData" @getIcon="getIcon"/>
</view> </view>
</template> </template>
+2
View File
@@ -178,6 +178,7 @@
<Loading :loaded="loaded" :loading="loading"></Loading> <Loading :loaded="loaded" :loading="loading"></Loading>
<Payment v-model="pay" :types="payType" @checked="toPay" :balance="userInfo.nowMoney"></Payment> <Payment v-model="pay" :types="payType" @checked="toPay" :balance="userInfo.nowMoney"></Payment>
<passkeyborad <passkeyborad
v-if="isShowPayPwdPop"
:money="orderInfo.payPrice" :money="orderInfo.payPrice"
showMoney showMoney
:show="isShowPayPwdPop" :show="isShowPayPwdPop"
@@ -279,6 +280,7 @@ export default {
icon: 'success', icon: 'success',
title: '修改成功!' title: '修改成功!'
}) })
uni.setStorageSync('sourceAddress', chooseAddress)
_this.changeType() _this.changeType()
}).finally(() => { }).finally(() => {
uni.hideLoading() uni.hideLoading()
+8 -6
View File
@@ -426,7 +426,7 @@
:src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' + system_store.latitude + ',' +system_store.longitude +'&referer=' +mapKey"></iframe> :src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' + system_store.latitude + ',' +system_store.longitude +'&referer=' +mapKey"></iframe>
</view> </view>
<passkeyborad :money="orderInfo.payPrice" showMoney :show="isShowPayPwdPop" ref='payPwdPop' @close="pwdPopClose" <passkeyborad v-if="isShowPayPwdPop" :money="orderInfo.payPrice" showMoney :show="isShowPayPwdPop" ref='payPwdPop' @close="pwdPopClose"
@finish="pwdPopFinish"></passkeyborad> @finish="pwdPopFinish"></passkeyborad>
</view> </view>
@@ -502,9 +502,10 @@ export default {
...mapGetters(["userInfo"]) ...mapGetters(["userInfo"])
}, },
onShow() { onShow() {
const _this = this
const chooseAddress = uni.getStorageSync('chooseAddress') || {} const chooseAddress = uni.getStorageSync('chooseAddress') || {}
const addressId = chooseAddress.id || '' const addressId = chooseAddress.id || ''
console.log(addressId, 'addressId');
// 监听到选择收货地址 // 监听到选择收货地址
if (addressId) { if (addressId) {
uni.setStorageSync('chooseAddress', {}) uni.setStorageSync('chooseAddress', {})
@@ -519,13 +520,14 @@ export default {
uni.showLoading() uni.showLoading()
editAddress({ editAddress({
addressId, addressId,
orderId: _this.orderInfo.orderId orderId: this.orderInfo.orderId
}).then(res => { }).then(res => {
uni.showToast({ uni.showToast({
icon: 'success', icon: 'success',
title: '修改成功!' title: '修改成功!'
}) })
_this.getDetail() uni.setStorageSync('sourceAddress', chooseAddress)
this.getDetail()
}).finally(() => { }).finally(() => {
uni.hideLoading() uni.hideLoading()
}) })
@@ -536,8 +538,8 @@ export default {
} }
}) })
} else { } else {
_this.id = _this.$yroute.query.id; this.id = this.$yroute.query.id;
_this.getDetail(); this.getDetail();
} }
}, },
// inject: ["app"], // inject: ["app"],
+31 -26
View File
@@ -288,6 +288,7 @@
@redirect="addressRedirect" @redirect="addressRedirect"
/> />
<passkeyborad <passkeyborad
v-if="isShowPayPwdPop"
ref='payPwdPop' ref='payPwdPop'
showMoney showMoney
:money="orderPrice.payPrice" :money="orderPrice.payPrice"
@@ -413,6 +414,31 @@ export default {
_this.getCartInfo() _this.getCartInfo()
//获取用户信息 //获取用户信息
_this.$store.dispatch("getUser", true) _this.$store.dispatch("getUser", true)
// 监听到选择收货地址
const chooseAddress = uni.getStorageSync('chooseAddress') || {}
const sourceAddress = uni.getStorageSync('sourceAddress') || uni.getStorageSync('chooseAddress')
// 监听到选择收货地址
if (chooseAddress.id && (chooseAddress.id !== sourceAddress.id)) {
uni.showModal({
title:'确定修改地址吗?',
content: '',
showCancel: true,
cancelText: '取消',
confirmText: '确认',
success: (res) => {
if(res.confirm) {
_this.addressInfo = chooseAddress
// 地址切换也要重新计算一下
uni.setStorageSync('sourceAddress', _this.addressInfo || '')
_this.computedPrice('onLoad chooseAddress')
}
},
complete: () => {
uni.hideLoading()
uni.setStorageSync('chooseAddress', {})
}
})
}
}, },
methods: { methods: {
@@ -504,32 +530,11 @@ export default {
if(_this.$yroute.query.address !== undefined ) { if(_this.$yroute.query.address !== undefined ) {
_this.addressInfo = JSON.parse(_this.$yroute.query.address) || {} _this.addressInfo = JSON.parse(_this.$yroute.query.address) || {}
} else { } else {
_this.addressInfo = uni.getStorageSync('chooseAddress') ? uni.getStorageSync('chooseAddress') : data.addressInfo || {} _this.addressInfo = uni.getStorageSync('sourceAddress') || data.addressInfo || {}
} console.log(data.addressInfo);
const chooseAddress = uni.getStorageSync('chooseAddress') || {}
const sourceAddress = uni.getStorageSync('sourceAddress') || data.addressInfo || uni.getStorageSync('chooseAddress')
// 监听到选择收货地址
if (chooseAddress.id && (chooseAddress.id !== sourceAddress.id)) {
uni.showModal({
title:'确定修改地址吗?',
content: '',
showCancel: true,
cancelText: '取消',
confirmText: '确认',
success: (res) => {
if(res.confirm) {
_this.addressInfo = chooseAddress
// 地址切换也要重新计算一下
uni.setStorageSync('sourceAddress', _this.addressInfo || '')
_this.computedPrice('onLoad chooseAddress')
}
},
complete: () => {
uni.hideLoading()
// uni.setStorageSync('chooseAddress', {})
}
})
} }
_this.systemStore = data.systemStore || {} _this.systemStore = data.systemStore || {}
_this.storeSelfMention = data.storeSelfMention _this.storeSelfMention = data.storeSelfMention
_this.computedPrice() _this.computedPrice()
@@ -683,7 +688,7 @@ export default {
storeId: this.storeItems ? this.storeItems.id : this.systemStore.id, storeId: this.storeItems ? this.storeItems.id : this.systemStore.id,
...from ...from
} }
uni.setStorageSync('chooseAddress', {})
//余额支付的支付密码 //余额支付的支付密码
if (this.active == 'yue') { if (this.active == 'yue') {
params.passwordPay = this.payPassword; params.passwordPay = this.payPassword;
+2 -1
View File
@@ -252,7 +252,8 @@ export default {
setHistory(word) { setHistory(word) {
const index = this.historyKey.findIndex(item => item.word === word) const index = this.historyKey.findIndex(item => item.word === word)
if (index > -1) { if (index > -1) {
return this.historyKey.splice(index, 1)
// return
} }
this.historyKey.unshift({id: this.$global.generateMixed(10), word }) this.historyKey.unshift({id: this.$global.generateMixed(10), word })
uni.setStorageSync('historyKey', JSON.stringify(this.historyKey)) uni.setStorageSync('historyKey', JSON.stringify(this.historyKey))
@@ -172,7 +172,7 @@ export default {
this.loadend = res.data.length < this.limit this.loadend = res.data.length < this.limit
this.page = this.page + 1 this.page = this.page + 1
if (this.choosMode === 1) { if (this.choosMode === 1) {
this.currentId = uni.getStorageSync('chooseAddress') ? uni.getStorageSync('chooseAddress').id : this.addressList.find(e => e.isDefault === 1) ? this.addressList.find(e => e.isDefault === 1).id : null this.currentId = uni.getStorageSync('sourceAddress') ? uni.getStorageSync('sourceAddress').id : this.addressList.find(e => e.isDefault === 1) ? this.addressList.find(e => e.isDefault === 1).id : null
} }
// 来源购物车 // 来源购物车
if (this.choosMode === 2) { if (this.choosMode === 2) {
+1 -1
View File
@@ -44,7 +44,7 @@
<view class=""> <view class="">
<CitySelect <CitySelect
ref="cityselect" ref="cityselect"
:defaultValue="addressText" :defaultValue="addressText || ''"
@callback="result" @callback="result"
:items="district" :items="district"
></CitySelect> ></CitySelect>
+1
View File
@@ -619,6 +619,7 @@ export default {
} else { } else {
this.fetchInnInfoList() this.fetchInnInfoList()
} }
this.initPoster()
this.fetchInnDetail() this.fetchInnDetail()
// this.fetchGoods(this.id) // this.fetchGoods(this.id)
}, },
+3 -2
View File
@@ -78,7 +78,7 @@
<view class="input-box"> <view class="input-box">
<textarea <textarea
v-model="content" v-model="content"
maxlength="150" maxlength="500"
:auto-height="true" :auto-height="true"
:fixed="true" :fixed="true"
:show-confirm-bar="false" :show-confirm-bar="false"
@@ -279,7 +279,8 @@ export default {
}, },
userInput(event) { userInput(event) {
this.content = event.detail.value; // 只取前500字
this.content = event.detail.value.slice(0, 500);
}, },
userSend(msg_type) { userSend(msg_type) {
+1 -1
View File
@@ -268,7 +268,7 @@
<view class="u-text__value" :class="{'area-item':form.area && form.area.length===0}"> <view class="u-text__value" :class="{'area-item':form.area && form.area.length===0}">
<CitySelect <CitySelect
ref="cityselect" ref="cityselect"
:defaultValue="form.area" :defaultValue="form.area || ''"
:disabled="reviewing" :disabled="reviewing"
:items="district" :items="district"
@callback="result" @callback="result"
+5 -5
View File
@@ -152,7 +152,7 @@
<view class="u-text__value" :class="{'area-item':formSupplier.area && formSupplier.area.length===0}"> <view class="u-text__value" :class="{'area-item':formSupplier.area && formSupplier.area.length===0}">
<CitySelect <CitySelect
ref="cityselect" ref="cityselect"
:defaultValue="formSupplier.area" :defaultValue="formSupplier.area || ''"
:disabled="reviewing" :disabled="reviewing"
:items="district" :items="district"
@callback="resultSupplier" @callback="resultSupplier"
@@ -391,7 +391,7 @@
<view class="u-text__value" :class="{'area-item':form.area && form.area.length===0}"> <view class="u-text__value" :class="{'area-item':form.area && form.area.length===0}">
<CitySelect <CitySelect
ref="cityselect2" ref="cityselect2"
:defaultValue="form.area" :defaultValue="form.area || ''"
:disabled="reviewing" :disabled="reviewing"
:items="district" :items="district"
@callback="result" @callback="result"
@@ -432,7 +432,7 @@
<text class="required">*</text> <text class="required">*</text>
</template> </template>
<template #value> <template #value>
<u--text :text="form.serviceTime + ' - ' + form.serviceEndTime"></u--text> <u--text :text="`${form.serviceTime || ''} - ${form.serviceEndTime || ''}`"></u--text>
<tpf-time-range <tpf-time-range
startTime="00:00" startTime="00:00"
endTime="23:59" endTime="23:59"
@@ -928,9 +928,9 @@ export default {
this.formSupplier = data.supplierInfo this.formSupplier = data.supplierInfo
this.formSupplier.typeText = this.columnsSupplierType[this.indexSupplierType].value this.formSupplier.typeText = this.columnsSupplierType[this.indexSupplierType].value
this.formSupplier.position = this.$forceToDecimal(this.formSupplier.longitude, 6) + ',' + this.$forceToDecimal(this.formSupplier.latitude, 6) this.formSupplier.position = this.$forceToDecimal(this.formSupplier.longitude, 6) + ',' + this.$forceToDecimal(this.formSupplier.latitude, 6)
this.formSupplier.area = `${this.formSupplier.provinceName || ''} ${this.formSupplier.cityName || ''} ${this.formSupplier.areaName || ''}` this.formSupplier.area = `${this.formSupplier.provinceName || ''} ${this.formSupplier.cityName || ''} ${this.formSupplier.areaName || ''}` || ''
this.indexSupplierType = this.columnsSupplierType.findIndex(item => item.key === this.formSupplier.subType) this.indexSupplierType = this.columnsSupplierType.findIndex(item => item.key === this.formSupplier.subType)
// console.log(this.formSupplier); console.log(this.formSupplier);
} }
}) })
}, },
+1 -1
View File
@@ -161,7 +161,7 @@
<view class="u-text__value" :class="{'area-item':form.area.length===0}"> <view class="u-text__value" :class="{'area-item':form.area.length===0}">
<CitySelect <CitySelect
ref="cityselect" ref="cityselect"
:defaultValue="form.area" :defaultValue="form.area || ''"
:disabled="reviewing" :disabled="reviewing"
:items="district" :items="district"
@callback="result" @callback="result"
+1 -1
View File
@@ -4,7 +4,7 @@
<view <view
class="ys-btn v12-mr-3 v12-radius-100 v12-dark-text v12-px-5 v12-py-2 v12-font-28 v12-font-bold" class="ys-btn v12-mr-3 v12-radius-100 v12-dark-text v12-px-5 v12-py-2 v12-font-28 v12-font-bold"
@click="toSanctun" @click="toSanctun"
>养生</view >养生</view
> >
<view <view
class="v12-radius-100 v12-primary v12-white-text v12-px-5 v12-py-2 v12-font-28 v12-font-bold" class="v12-radius-100 v12-primary v12-white-text v12-px-5 v12-py-2 v12-font-28 v12-font-bold"
+67
View File
@@ -380,6 +380,73 @@ export default {
this.getFarmerData() this.getFarmerData()
}, },
methods: { methods: {
saveImg() {
const _this = this
uni.getSetting({
success: getRes => {
if (getRes.authSetting["scope.writePhotosAlbum"]) {
_this.downloadImage()
} else {
uni.authorize({
scope: "scope.writePhotosAlbum",
success: () => {
_this.downloadImage()
},
fail: () => {
uni.openSetting({
success: openRes => {
console.log(typeof openRes, openRes)
},
fail: () => {
uni.showToast({
title: "请在设置中打开对应权限",
icon: "none"
})
}
})
}
})
}
},
fail: (err) => {
console.log(err, 2)
}
})
},
downloadImage() {
const _this = this
const randomID = () => Math.random().toString(36).substring(2)
uni.downloadFile({
url: this.posterUrl, // 网络图片的地址
filePath: wx.env.USER_DATA_PATH + "/share_" + randomID() + ".png", // 指定的本地文件路径
success: downRes => {
uni.saveImageToPhotosAlbum({
filePath: downRes.filePath, // 临时文件地址
success: function () {
uni.showToast({
title: "保存成功",
icon: "success",
success() {
_this.showShare = false
}
})
},
fail: function (err) {
uni.showToast({
title: err,
icon: "none"
})
}
})
},
fail: function (err) {
uni.showToast({
title: err.errMsg,
icon: "error"
})
}
})
},
changeShare() { changeShare() {
uni.showLoading() uni.showLoading()
postJiaLouShare(this.id).then(res => { postJiaLouShare(this.id).then(res => {
+1
View File
@@ -125,6 +125,7 @@
<passkeyborad <passkeyborad
ref='payPwdPop' ref='payPwdPop'
showMoney showMoney
v-if="isShowPayPwdPop"
:money="payPrice" :money="payPrice"
:show="isShowPayPwdPop" :show="isShowPayPwdPop"
@close="isShowPayPwdPop = false" @close="isShowPayPwdPop = false"
+1
View File
@@ -187,6 +187,7 @@
showMoney showMoney
:show="isShowPayPwdPop" :show="isShowPayPwdPop"
ref='payPwdPop' ref='payPwdPop'
v-if="isShowPayPwdPop"
@close="pwdPopClose" @close="pwdPopClose"
@finish="pwdPopFinish" @finish="pwdPopFinish"
></passkeyborad> ></passkeyborad>