This commit is contained in:
LinCyJang
2026-04-28 01:21:55 +08:00
7 changed files with 111 additions and 42 deletions
+19 -5
View File
@@ -252,7 +252,8 @@ export const chatMixinsV2 = {
type: -2, type: -2,
showMoreInfo: {}, showMoreInfo: {},
currentSwiperIndex: 0, currentSwiperIndex: 0,
showChangeBtn: true showChangeBtn: true,
changeIsRotate: false
}) })
_this.loading = true _this.loading = true
_this.showCursor = false _this.showCursor = false
@@ -408,6 +409,18 @@ export const chatMixinsV2 = {
this.chatMessageList[index].currentSwiperIndex = e.detail.current this.chatMessageList[index].currentSwiperIndex = e.detail.current
}, },
analyzeKeywordsChangeHandle(conversationId, item) { analyzeKeywordsChangeHandle(conversationId, item) {
let idx = -1
this.chatMessageList.map((item, index) => {
if (item.conversationId === conversationId) {
idx = index
}
})
if (idx > -1) {
this.$set(this.chatMessageList[idx], 'changeIsRotate', true)
if (this.chatMessageList[idx].changeIsRotate) {
return
}
}
let listKey = '' let listKey = ''
// 抽奖和订单查询没有换一换 // 抽奖和订单查询没有换一换
if (item.goodsList.length > 0) { if (item.goodsList.length > 0) {
@@ -431,17 +444,18 @@ export const chatMixinsV2 = {
const { success, data } = res const { success, data } = res
if (success) { if (success) {
let changeList = [] let changeList = []
let idx = -1 this.chatMessageList.map((item) => {
this.chatMessageList.map((item, index) => {
if (item.conversationId === conversationId) { if (item.conversationId === conversationId) {
changeList = data.list || [] changeList = data.list || []
idx = index
} }
}) })
if (idx > -1 && listKey) { if (idx > -1 && listKey) {
this.$set(this.chatMessageList[idx], 'listKey', changeList) this.$set(this.chatMessageList[idx], listKey, changeList)
this.$forceUpdate() this.$forceUpdate()
} }
setTimeout(() => {
this.$set(this.chatMessageList[idx], 'changeIsRotate', false)
}, 1000)
} }
}) })
}, },
+13 -7
View File
@@ -320,12 +320,17 @@
" "
class="change-btn" class="change-btn"
> >
<image <view class="change-btn-content" @click="analyzeKeywordsChangeHandle(item.conversationId, item)">
:src="webUrl + '/aiChat/icon-change.png'" <image
class="icon" :src="webUrl + '/aiChat/icon-53.png'"
mode="widthFix" :class="{
@click="analyzeKeywordsChangeHandle(item.conversationId, item)" 'rotate': item.changeIsRotate
/> }"
class="icon"
mode="widthFix"
/>
换一换
</view>
</view> </view>
</view> </view>
<!-- 建议提问 --> <!-- 建议提问 -->
@@ -489,7 +494,8 @@ export default {
type: -2, type: -2,
showMoreInfo: {}, showMoreInfo: {},
currentSwiperIndex: 0, currentSwiperIndex: 0,
showChangeBtn: false showChangeBtn: false,
changeIsRotate: false
} }
if (item.cardData) { if (item.cardData) {
const { contentType, finish, items = [] } = item.cardData const { contentType, finish, items = [] } = item.cardData
+36 -12
View File
@@ -12,7 +12,7 @@
color="#333" color="#333"
transparent="auto" transparent="auto"
barPlaceholder="hidden" barPlaceholder="hidden"
title="云灵AI助手" title="云灵"
@click-left="clickBackHandle" @click-left="clickBackHandle"
/> />
<page-container <page-container
@@ -99,9 +99,12 @@
<view class="topic-wrap"> <view class="topic-wrap">
<view class="title"> <view class="title">
<view class="title-left">大家都在问</view> <view class="title-left">大家都在问</view>
<view class="title-right" @click="loadData"> <view class="title-right" @click="loadData('click')">
<image <image
:src="webUrl + '/aiChat/icon-53.png'" :src="webUrl + '/aiChat/icon-53.png'"
:class="{
'rotate': topicIsRotate
}"
class="icon" class="icon"
mode="widthFix" mode="widthFix"
/> />
@@ -433,12 +436,17 @@
" "
class="change-btn" class="change-btn"
> >
<image <view class="change-btn-content" @click="analyzeKeywordsChangeHandle(item.conversationId, item)">
:src="webUrl + '/aiChat/icon-change.png'" <image
class="icon" :src="webUrl + '/aiChat/icon-53.png'"
mode="widthFix" :class="{
@click="analyzeKeywordsChangeHandle(item.conversationId, item)" 'rotate': item.changeIsRotate
/> }"
class="icon"
mode="widthFix"
/>
换一换
</view>
</view> </view>
</view> </view>
<!-- 建议提问 --> <!-- 建议提问 -->
@@ -573,7 +581,8 @@ export default {
animationStr: '', animationStr: '',
settingInfo: {}, settingInfo: {},
topicList: [], topicList: [],
onlyOneToAddCart: false onlyOneToAddCart: false,
topicIsRotate: false
} }
}, },
onLoad(options) { onLoad(options) {
@@ -603,7 +612,11 @@ export default {
this.loadData() this.loadData()
}) })
}, },
loadData() { loadData(type = '') {
if (this.topicIsRotate) return
if (type === 'click') {
this.topicIsRotate = true
}
getAiSystemInfoTopic().then(res => { getAiSystemInfoTopic().then(res => {
const { success, data } = res const { success, data } = res
if (success) { if (success) {
@@ -619,6 +632,9 @@ export default {
} }
list.sort(() => Math.random() - 0.5) list.sort(() => Math.random() - 0.5)
this.topicList = list.slice(0, 3) this.topicList = list.slice(0, 3)
setTimeout(() => {
this.topicIsRotate = false
}, 1000)
} }
}) })
}, },
@@ -731,7 +747,7 @@ export default {
font-size: 34rpx; font-size: 34rpx;
} }
.content { .content {
padding: 30rpx 0 0 0; padding: 30rpx 24rpx 0 24rpx;
color: #3D4CF0; color: #3D4CF0;
} }
} }
@@ -757,6 +773,10 @@ export default {
display: flex; display: flex;
width: 40rpx; width: 40rpx;
height: 32rpx; height: 32rpx;
margin: 0 8rpx 0 0;
&.rotate {
animation: spin-icon 1s linear;
}
} }
} }
.list-wrap { .list-wrap {
@@ -766,15 +786,19 @@ export default {
.list-cont { .list-cont {
padding: 0 24rpx; padding: 0 24rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: flex-start;
.list-item { .list-item {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 12rpx 18rpx; padding: 6rpx 12rpx;
margin: 0 0 24rpx 0; margin: 0 0 24rpx 0;
border-radius: 12rpx; border-radius: 12rpx;
border: 1rpx solid #ddd; border: 1rpx solid #ddd;
font-size: 28rpx; font-size: 28rpx;
color: #666; color: #666;
background-color: #fff;
.icon { .icon {
display: block; display: block;
width: 24rpx; width: 24rpx;
+25 -6
View File
@@ -12,9 +12,9 @@ page {
min-height: 100vh; min-height: 100vh;
background: linear-gradient(155deg, rgba(61, 76, 241, 0.15) 0%, rgba(255,255,255,1) 25%, rgba(255,255,255,1) 75%, rgba(61, 76, 241, 0.15) 100%); background: linear-gradient(155deg, rgba(61, 76, 241, 0.15) 0%, rgba(255,255,255,1) 25%, rgba(255,255,255,1) 75%, rgba(61, 76, 241, 0.15) 100%);
// background-color: #fff; // background-color: #fff;
// background-size: 100% 100vh; background-size: 100% calc(100vh - 160rpx);
// background-image: url(https://wxapp.xdd618.com/api/file/pic/aiChat/bg.png); // background-image: url(https://wxapp.xdd618.com/api/file/pic/aiChat/bg.png);
// background-repeat: no-repeat; background-repeat: no-repeat;
// background-attachment: fixed; // background-attachment: fixed;
.fix-tabbar-header { .fix-tabbar-header {
position: fixed; position: fixed;
@@ -1081,10 +1081,20 @@ page {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 0 0 20rpx 0; padding: 0 0 20rpx 0;
.icon { .change-btn-content {
display: block; display: flex;
width: 124rpx; align-items: center;
height: 38rpx; justify-content: center;
color: #3D4CF0;
.icon {
display: block;
width: 40rpx;
height: 32rpx;
margin: 0 8rpx 0 0;
&.rotate {
animation: spin-icon 1s linear;
}
}
} }
} }
} }
@@ -1335,3 +1345,12 @@ page {
margin: 24rpx 0 0 0; margin: 24rpx 0 0 0;
} }
} }
@keyframes spin-icon {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
+16 -6
View File
@@ -5,13 +5,15 @@
v-if="!item.isFarmerShop" v-if="!item.isFarmerShop"
:src="item[imageKey]" :src="item[imageKey]"
class="img" class="img"
lazy-load
/> />
<image <image
:src="item.farmerShopCover" :src="item.farmerShopCover"
v-if="item.farmerShopCoverType === 1 && item.isFarmerShop" v-if="item.farmerShopCoverType === 1 && item.isFarmerShop"
class="img" class="img"
mode="heightFix|widthFix"> mode="heightFix|widthFix"
</image> lazy-load
/>
<image <image
:src="item.farmerShopCover + '?vframe/jpg/offset/1'" :src="item.farmerShopCover + '?vframe/jpg/offset/1'"
mode="heightFix|widthFix" mode="heightFix|widthFix"
@@ -20,30 +22,35 @@
:show-fullscreen-btn="false" :show-fullscreen-btn="false"
:show-play-btn="false" :show-play-btn="false"
class="img" class="img"
:poster="item.farmerShopCover + '?vframe/jpg/offset/1'"> :poster="item.farmerShopCover + '?vframe/jpg/offset/1'"
</image> lazy-load
/>
<image <image
v-if="item.isOldBrand" v-if="item.isOldBrand"
:src="webUrl + '/home/old-mark.png'" :src="webUrl + '/home/old-mark.png'"
class="mark-img" class="mark-img"
lazy-load
/> />
<image <image
v-if="item.isGiftCard" v-if="item.isGiftCard"
style="left: 0;width: 120rpx;" style="left: 0;width: 120rpx;"
:src="webUrl + '/home/gift-tag.png'" :src="webUrl + '/home/gift-tag.png'"
class="mark-img" class="mark-img"
lazy-load
/> />
<image <image
v-if="item.isLandmarkGoods" v-if="item.isLandmarkGoods"
:src="webUrl + '/home/mark-land.png'" :src="webUrl + '/home/mark-land.png'"
class="mark-img" class="mark-img"
style="right: 20rpx" style="right: 20rpx"
lazy-load
/> />
<image <image
v-if="item.isCountyFamous" v-if="item.isCountyFamous"
:src="webUrl + '/home/qixian-mark.png'" :src="webUrl + '/home/qixian-mark.png'"
class="mark-img" class="mark-img"
lazy-load
/> />
<image <image
v-if="item.isIch" v-if="item.isIch"
@@ -55,6 +62,7 @@
v-if="item.isFarmerShop" v-if="item.isFarmerShop"
:src="webUrl + '/orderIcon/nm.png'" :src="webUrl + '/orderIcon/nm.png'"
class="mark-img-nm" class="mark-img-nm"
lazy-load
/> />
</view> </view>
<view v-if="item.isFarmerShop" class="more-t v12-pt-2 v12-font-bold v12-font-28 v12-px-2" >{{ item.farmerShopContent }}</view> <view v-if="item.isFarmerShop" class="more-t v12-pt-2 v12-font-bold v12-font-28 v12-px-2" >{{ item.farmerShopContent }}</view>
@@ -83,12 +91,14 @@
<text class="v12-font-20"> <text class="v12-font-20">
</text> </text>
{{ item[priceKey] }}</text> {{ item[priceKey] }}
</text>
</view> </view>
<view v-if="item.isNegotiable === 0" class="btn" @click.stop="$emit('add', item)"> <view v-if="item.isNegotiable === 0" class="btn" @click.stop="$emit('add', item)">
<image <image
:src="webUrl + '/home/icon-cart.png'" :src="webUrl + '/home/icon-cart.png'"
class="img" class="img"
lazy-load
/> />
</view> </view>
</view> </view>
@@ -97,7 +107,7 @@
v-if="item.isFarmerShop" v-if="item.isFarmerShop"
class="v12-justify-start v12-align-center v12-pt-2 v12-px-2 v12-pb-2"> class="v12-justify-start v12-align-center v12-pt-2 v12-px-2 v12-pb-2">
<view class="btn v12-mr-2"> <view class="btn v12-mr-2">
<image :src="item.farmerShopLogo" class="nm-img-logo v12-radius-100"></image> <image :src="item.farmerShopLogo" class="nm-img-logo v12-radius-100" lazy-load />
</view> </view>
<view class="one-t v12-font-24 v12-dark1-text" style="width:230rpx">{{ item.farmerShopName }}/{{ item.farmerShopCityName || '-' }}</view> <view class="one-t v12-font-24 v12-dark1-text" style="width:230rpx">{{ item.farmerShopName }}/{{ item.farmerShopCityName || '-' }}</view>
</view> </view>
+2 -2
View File
@@ -921,7 +921,7 @@
{ {
"path": "views/index", "path": "views/index",
"style": { "style": {
"navigationBarTitleText": "云灵AI助手", "navigationBarTitleText": "云灵",
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@@ -929,7 +929,7 @@
{ {
"path": "views/history", "path": "views/history",
"style": { "style": {
"navigationBarTitleText": "云灵AI助手", "navigationBarTitleText": "云灵",
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
-4
View File
@@ -39,10 +39,6 @@
@click="toTravelResidence" @click="toTravelResidence"
/> />
<image <image
<<<<<<< HEAD
=======
v-show="partnerType === 'province_partner' || partnerType === ''"
>>>>>>> 320bda6ed8582fd2c81f73c272076e2b218418ab
:src="images.experienceStoreImage" :src="images.experienceStoreImage"
class="img-item" class="img-item"
mode="widthFix" mode="widthFix"