feat: 点击事件
This commit is contained in:
@@ -65,7 +65,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<button
|
<button
|
||||||
class="detail-buy-button"
|
class="detail-buy-button"
|
||||||
@click="showToast(`跳转商品详情页:${product.name}`)"
|
@click="goodsDetail(product)"
|
||||||
>
|
>
|
||||||
立即购买
|
立即购买
|
||||||
</button>
|
</button>
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
v-for="question in faq"
|
v-for="question in faq"
|
||||||
:key="question"
|
:key="question"
|
||||||
class="detail-faq-chip"
|
class="detail-faq-chip"
|
||||||
@click="showToast(`追问:${question}`)"
|
@click="sendReply(question)"
|
||||||
>
|
>
|
||||||
{{ question }}
|
{{ question }}
|
||||||
</view>
|
</view>
|
||||||
@@ -94,18 +94,21 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import TopNavBar from "@/components/TopNavBar/index.vue";
|
import TopNavBar from "@/components/TopNavBar/index.vue";
|
||||||
|
import { SEND_MESSAGE_CONTENT_TEXT } from "@/constant/constant";
|
||||||
|
|
||||||
const products = [
|
const products = [
|
||||||
{
|
{
|
||||||
name: "卧龙潭皮筏艇漂流",
|
name: "卧龙潭皮筏艇漂流",
|
||||||
img: "https://one-feel-config-images-bucket.oss-cn-chengdu.aliyuncs.com/comp1.jpg",
|
img: "https://one-feel-config-images-bucket.oss-cn-chengdu.aliyuncs.com/comp1.jpg",
|
||||||
price: "50",
|
price: "50",
|
||||||
|
commodityId: "1032119438058270721",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "鸳鸯湖玻璃船",
|
name: "鸳鸯湖玻璃船",
|
||||||
img: "https://one-feel-config-images-bucket.oss-cn-chengdu.aliyuncs.com/comp12.jpg",
|
img: "https://one-feel-config-images-bucket.oss-cn-chengdu.aliyuncs.com/comp12.jpg",
|
||||||
price: "50",
|
price: "50",
|
||||||
saleTag: "漂完顺路",
|
saleTag: "漂完顺路",
|
||||||
|
commodityId: "1032121733894451202",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -117,6 +120,18 @@ const showToast = (title) => {
|
|||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const goodsDetail = (item) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/goods/index?commodityId=${item.jumpContent}`,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const sendReply = (item) => {
|
||||||
|
uni.navigateBack();
|
||||||
|
uni.$emit(SEND_MESSAGE_CONTENT_TEXT, item);
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
<view class="aigc-body">
|
<view class="aigc-body">
|
||||||
<view class="aigc-title">{{ aigc.name }}</view>
|
<view class="aigc-title">{{ aigc.name }}</view>
|
||||||
<view class="aigc-desc">{{ aigc.desc }}</view>
|
<view class="aigc-desc">{{ aigc.desc }}</view>
|
||||||
<button class="detail-solid-button aigc-button" @click="showToast('跳转 AIGC 合影功能页')">
|
<button class="detail-solid-button aigc-button" @click="jumpAigcClick">
|
||||||
生成我的合影
|
生成我的合影
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
v-for="question in faq"
|
v-for="question in faq"
|
||||||
:key="question"
|
:key="question"
|
||||||
class="detail-faq-chip"
|
class="detail-faq-chip"
|
||||||
@click="showToast(`追问:${question}`)"
|
@click="sendReply(question)"
|
||||||
>
|
>
|
||||||
{{ question }}
|
{{ question }}
|
||||||
</view>
|
</view>
|
||||||
@@ -81,6 +81,9 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import TopNavBar from "@/components/TopNavBar/index.vue";
|
import TopNavBar from "@/components/TopNavBar/index.vue";
|
||||||
|
import { SEND_MESSAGE_CONTENT_TEXT } from "@/constant/constant";
|
||||||
|
import { getAccessToken } from "@/constant/token";
|
||||||
|
import { navigateTo } from "@/router";
|
||||||
|
|
||||||
const photo = {
|
const photo = {
|
||||||
thumb: "https://one-feel-config-images-bucket.oss-cn-chengdu.aliyuncs.com/comp4.jpg",
|
thumb: "https://one-feel-config-images-bucket.oss-cn-chengdu.aliyuncs.com/comp4.jpg",
|
||||||
@@ -110,6 +113,18 @@ const showToast = (title) => {
|
|||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const jumpAigcClick = () => {
|
||||||
|
const token = getAccessToken();
|
||||||
|
navigateTo('https://onefeel.brother7.cn/aigc/#/home', { token: token });
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const sendReply = (item) => {
|
||||||
|
uni.navigateBack();
|
||||||
|
uni.$emit(SEND_MESSAGE_CONTENT_TEXT, item);
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
<view class="poi-mini-desc">
|
<view class="poi-mini-desc">
|
||||||
清道光年间建的七孔石桥,响水河上的镇景之宝,小七孔之名由此而来,桥畔可观涵碧潭。
|
清道光年间建的七孔石桥,响水河上的镇景之宝,小七孔之名由此而来,桥畔可观涵碧潭。
|
||||||
</view>
|
</view>
|
||||||
<button class="detail-solid-button" @click.stop="showToast('带我去:小七孔古桥')">
|
<button class="detail-solid-button" @click.stop="openMap">
|
||||||
带我去
|
带我去
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
v-for="question in faq"
|
v-for="question in faq"
|
||||||
:key="question"
|
:key="question"
|
||||||
class="detail-faq-chip"
|
class="detail-faq-chip"
|
||||||
@click="showToast(`追问:${question}`)"
|
@click="sendReply(question)"
|
||||||
>
|
>
|
||||||
{{ question }}
|
{{ question }}
|
||||||
</view>
|
</view>
|
||||||
@@ -77,6 +77,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import TopNavBar from "@/components/TopNavBar/index.vue";
|
import TopNavBar from "@/components/TopNavBar/index.vue";
|
||||||
|
import { SEND_MESSAGE_CONTENT_TEXT } from "@/constant/constant";
|
||||||
|
|
||||||
const faq = ["古桥有什么传说", "最佳观赏时间", "旁边还有什么景点"];
|
const faq = ["古桥有什么传说", "最佳观赏时间", "旁边还有什么景点"];
|
||||||
|
|
||||||
@@ -86,6 +87,35 @@ const showToast = (title) => {
|
|||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 打开地图
|
||||||
|
const openMap = () => {
|
||||||
|
const address = '小七孔古桥';
|
||||||
|
const latitude = 25.248714;
|
||||||
|
const longitude = 107.745735;
|
||||||
|
|
||||||
|
uni.getLocation({
|
||||||
|
type: "gcj02", //返回可以用于uni.openLocation的经纬度
|
||||||
|
success: (res) => {
|
||||||
|
console.log("当前经纬度", latitude, longitude);
|
||||||
|
|
||||||
|
uni.openLocation({
|
||||||
|
latitude: latitude,
|
||||||
|
longitude: longitude,
|
||||||
|
address: address,
|
||||||
|
success: () => {
|
||||||
|
console.log("success");
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const sendReply = (item) => {
|
||||||
|
uni.navigateBack();
|
||||||
|
uni.$emit(SEND_MESSAGE_CONTENT_TEXT, item);
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
v-for="question in faq"
|
v-for="question in faq"
|
||||||
:key="question"
|
:key="question"
|
||||||
class="detail-faq-chip"
|
class="detail-faq-chip"
|
||||||
@click="showToast(`追问:${question}`)"
|
@click="sendReply(question)"
|
||||||
>
|
>
|
||||||
{{ question }}
|
{{ question }}
|
||||||
</view>
|
</view>
|
||||||
@@ -107,6 +107,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import TopNavBar from "@/components/TopNavBar/index.vue";
|
import TopNavBar from "@/components/TopNavBar/index.vue";
|
||||||
|
import { SEND_MESSAGE_CONTENT_TEXT } from "@/constant/constant";
|
||||||
|
|
||||||
const steps = [
|
const steps = [
|
||||||
{
|
{
|
||||||
@@ -142,6 +143,12 @@ const showToast = (title) => {
|
|||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const sendReply = (item) => {
|
||||||
|
uni.navigateBack();
|
||||||
|
uni.$emit(SEND_MESSAGE_CONTENT_TEXT, item);
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
Reference in New Issue
Block a user