页面
This commit is contained in:
parent
6739e375ad
commit
63612f1bd4
@ -22,15 +22,15 @@
|
|||||||
radius="0px 0px 20rpx 20rpx "
|
radius="0px 0px 20rpx 20rpx "
|
||||||
:width="'100%'"
|
:width="'100%'"
|
||||||
:height="'100%'"
|
:height="'100%'"
|
||||||
src="https://bpic.588ku.com/back_list_pic/23/05/17/75e92f4e681efeb526f7d8603199ca11.jpg"
|
:src="banner_list.image"
|
||||||
/>
|
/>
|
||||||
<view
|
<view
|
||||||
class="m-2 p-2 absolute bottom-0 text-center left-0 right-0 text-white bg-gray-300 bg-opacity-5"
|
class="m-2 p-2 absolute bottom-0 text-center left-0 right-0 text-white bg-black bg-opacity-30"
|
||||||
style="backdrop-filter: blur(2rpx); border-radius: 10rpx"
|
style="backdrop-filter: blur(2rpx); border-radius: 10rpx"
|
||||||
>
|
>
|
||||||
<text class="block font-size-4 text-left">三江区街道</text>
|
<text class="block font-size-4 text-left">{{ banner_list.name }}</text>
|
||||||
<text class="block font-size-3 text-left">
|
<text class="block font-size-3 text-left">
|
||||||
因举办古韵悠然的传统民俗文化节热度飙升,在这里,你能感受到乡村文化的深厚底蕴和无穷魅力。
|
<!-- 因举办古韵悠然的传统民俗文化节热度飙升,在这里,你能感受到乡村文化的深厚底蕴和无穷魅力。 -->
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -40,36 +40,13 @@
|
|||||||
|
|
||||||
<view class="p-2">
|
<view class="p-2">
|
||||||
<wd-grid :column="4">
|
<wd-grid :column="4">
|
||||||
<view
|
<view @click="changeTab(item)" v-for="item in category">
|
||||||
@click="changeTab(item)"
|
|
||||||
v-for="item in [
|
|
||||||
{
|
|
||||||
name: '吃',
|
|
||||||
id: 1,
|
|
||||||
icon: 'https://bpic.588ku.com/back_list_pic/23/05/17/75e92f4e681efeb526f7d8603199ca11.jpg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '住',
|
|
||||||
id: 2,
|
|
||||||
icon: 'https://www.beijing.gov.cn/renwen/bjgk/mygk/myfg/202208/W020220812574023612181.jpg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '玩',
|
|
||||||
id: 3,
|
|
||||||
icon: 'https://www.keaitupian.cn/cjpic/frombd/2/253/1659552792/3869332496.jpg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '购',
|
|
||||||
id: 4,
|
|
||||||
icon: 'https://aerial.scol.com.cn/items/202001/200102174156554000120F0A.jpg',
|
|
||||||
},
|
|
||||||
]"
|
|
||||||
>
|
|
||||||
<wd-grid-item use-slot>
|
<wd-grid-item use-slot>
|
||||||
<view>
|
<view>
|
||||||
<wd-img radius="20rpx" :width="'160rpx'" :height="'100rpx'" :src="item.icon" />
|
<wd-img radius="10rpx" :width="'160rpx'" :height="'100rpx'" :src="item.image" />
|
||||||
|
|
||||||
<view
|
<view
|
||||||
class="absolute bottom-6 text-center left-0 right-0 text-white text-center text-gray-500 font-size-3"
|
class="absolute bottom-5 text-center left-0 right-0 text-white text-center text-gray-500 font-size-3 bg-black bg-opacity-20"
|
||||||
>
|
>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</view>
|
</view>
|
||||||
@ -81,69 +58,24 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<scroll-view scroll-x="true" class="scroll-view-container">
|
<scroll-view scroll-x="true" class="scroll-view-container">
|
||||||
<view
|
<view class="p-2" style="" @click="more" v-for="item in index_list">
|
||||||
class="p-2"
|
|
||||||
style=""
|
|
||||||
@click="more"
|
|
||||||
v-for="item in [
|
|
||||||
{
|
|
||||||
name: '吃',
|
|
||||||
id: 1,
|
|
||||||
icon: 'https://bpic.588ku.com/back_list_pic/23/05/17/75e92f4e681efeb526f7d8603199ca11.jpg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '住',
|
|
||||||
id: 2,
|
|
||||||
icon: 'https://www.beijing.gov.cn/renwen/bjgk/mygk/myfg/202208/W020220812574023612181.jpg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '玩',
|
|
||||||
id: 3,
|
|
||||||
icon: 'https://www.keaitupian.cn/cjpic/frombd/2/253/1659552792/3869332496.jpg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '购',
|
|
||||||
id: 4,
|
|
||||||
icon: 'https://aerial.scol.com.cn/items/202001/200102174156554000120F0A.jpg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '购',
|
|
||||||
id: 4,
|
|
||||||
icon: 'https://aerial.scol.com.cn/items/202001/200102174156554000120F0A.jpg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '购',
|
|
||||||
id: 4,
|
|
||||||
icon: 'https://aerial.scol.com.cn/items/202001/200102174156554000120F0A.jpg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '购',
|
|
||||||
id: 4,
|
|
||||||
icon: 'https://aerial.scol.com.cn/items/202001/200102174156554000120F0A.jpg',
|
|
||||||
},
|
|
||||||
]"
|
|
||||||
>
|
|
||||||
<wd-card custom-class="card-content">
|
<wd-card custom-class="card-content">
|
||||||
<view class="content p-2" style="align-items: normal">
|
<view class="content p-2" style="align-items: normal">
|
||||||
<view class="ps-2 flex-content-column">
|
<view class="ps-2 flex-content-column">
|
||||||
<view class="ps-1 font-size-4 font-bold color-black">里海科技</view>
|
<view class="ps-1 font-size-4 font-bold color-black">{{ item.author }}</view>
|
||||||
|
<view class="ps-1 font-size-3 ellipsis-2">{{ item.description }}</view>
|
||||||
|
|
||||||
<view class="p-1 font-size-3" style="align-items: end">
|
<view class="p-1 font-size-3" style="align-items: end">
|
||||||
<text class="pe-2 font-size-3">泸州市龙马潭区海吉星路</text>
|
<text class="pe-2 font-size-3">泸州市龙马潭区海吉星路</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="relative" style="width: 280rpx; height: 200rpx">
|
<view class="relative" style="width: 280rpx; height: 200rpx">
|
||||||
<wd-img
|
<wd-img :width="'100%'" :height="'100%'" radius="20rpx" :src="item.cover" alt="joy" />
|
||||||
:width="'100%'"
|
|
||||||
:height="'100%'"
|
|
||||||
radius="20rpx"
|
|
||||||
src="https://img.shetu66.com/2023/07/26/1690335889558220.png"
|
|
||||||
alt="joy"
|
|
||||||
/>
|
|
||||||
<view
|
<view
|
||||||
class="m-2 p-1 absolute bottom-0 text-right right-0 text-white bg-gray-300 bg-opacity-15"
|
class="m-2 p-1 absolute bottom-0 text-right right-0 text-white bg-black bg-opacity-20"
|
||||||
style="backdrop-filter: blur(2rpx); border-radius: 10rpx"
|
style="backdrop-filter: blur(2rpx); border-radius: 10rpx"
|
||||||
>
|
>
|
||||||
<text class="block font-size-3 text-left">距离100米</text>
|
<text class="block font-size-3 text-left">{{ item.category_name }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -154,51 +86,71 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts">
|
||||||
|
import {
|
||||||
|
getArticleCategoryAPI,
|
||||||
|
getArticleIndexAPI,
|
||||||
|
getArticleDetailAPI,
|
||||||
|
} from '@/service/crmeb/product.ts'
|
||||||
|
import { useUserStore } from '@/store'
|
||||||
|
import { getUrl, getWebUrl } from '@/utils'
|
||||||
|
|
||||||
|
const userStore = useUserStore()
|
||||||
|
const hasLogin = computed(() => userStore.userInfo?.id)
|
||||||
import { defineComponent } from 'vue'
|
import { defineComponent } from 'vue'
|
||||||
// import StickyNav from './components/StickyNav.vue'
|
|
||||||
|
|
||||||
// import { toLogin } from '@/libs/login.js'
|
export default defineComponent({
|
||||||
const currentTab = ref(1)
|
data() {
|
||||||
function changeTab(e) {
|
return {
|
||||||
console.log(e)
|
banner_list: [],
|
||||||
currentTab.value = e.id
|
show: false,
|
||||||
|
index_list: {},
|
||||||
|
detail: {},
|
||||||
|
category: {},
|
||||||
|
currentTab: 1,
|
||||||
|
city: '',
|
||||||
|
title: '',
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
async onLoad(option) {
|
||||||
|
this.getCategory()
|
||||||
|
this.getDetail(1)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
changeTab(item) {
|
||||||
|
this.banner_list = item
|
||||||
|
console.log(item)
|
||||||
|
this.getIndex(item['id'])
|
||||||
|
},
|
||||||
|
async getCategory() {
|
||||||
|
const res = await getArticleCategoryAPI([])
|
||||||
|
// 使用正确的 map 方法返回新数组
|
||||||
|
this.category = res.data
|
||||||
|
this.banner_list = this.category[0]
|
||||||
|
this.getIndex(this.category[0]['id'])
|
||||||
|
},
|
||||||
|
|
||||||
function moreVillage() {
|
async getIndex(category_id) {
|
||||||
console.log('查看乡村')
|
const res = await getArticleIndexAPI({ category_id: category_id })
|
||||||
uni.navigateTo({
|
// 使用正确的 map 方法返回新数组
|
||||||
url: '/pages-village-sub/home/index',
|
this.index_list = res.data
|
||||||
})
|
},
|
||||||
}
|
async getDetail(id) {
|
||||||
|
const res = await getArticleDetailAPI({ id: id })
|
||||||
|
// 使用正确的 map 方法返回新数组
|
||||||
|
this.detail = res.data
|
||||||
|
},
|
||||||
|
|
||||||
function moreTourism() {
|
more(item) {
|
||||||
console.log('查看旅游')
|
console.log(item)
|
||||||
uni.navigateTo({
|
if (item.type == 1) {
|
||||||
url: '/pages-tourism-sub/home/index',
|
getUrl(item.url)
|
||||||
|
} else if (item.type == 2) {
|
||||||
|
getWebUrl(item.url)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
}
|
|
||||||
function more() {
|
|
||||||
console.log('数字乡村详情')
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/index/detail',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
function goToShop() {
|
|
||||||
// if (this.isLogin) {
|
|
||||||
let urls = 'https://shop.lihaink.cn/'
|
|
||||||
uni.navigateTo({
|
|
||||||
url: `/pages/web_view/index?target=${urls}&title=区域特产`,
|
|
||||||
})
|
|
||||||
// } else {
|
|
||||||
// this.openAuto()
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
// 打开授权
|
|
||||||
function openAuto() {
|
|
||||||
toLogin()
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -13,27 +13,37 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="background_home">
|
<view class="background_home">
|
||||||
<view class="" style="" @click="more">
|
<view
|
||||||
|
class=""
|
||||||
|
style=""
|
||||||
|
@click="
|
||||||
|
more({
|
||||||
|
type: 2,
|
||||||
|
url: ' ',
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
<wd-card custom-class="card-content">
|
<wd-card custom-class="card-content">
|
||||||
<view class="relative" style="height: 680rpx">
|
<view class="relative" style="height: 680rpx">
|
||||||
<wd-swiper
|
<wd-swiper
|
||||||
value-key="url"
|
value-key="url"
|
||||||
custom-text-style="color:#fff"
|
custom-text-style="color:#fff"
|
||||||
|
v-if="swiperList"
|
||||||
|
height="680rpx"
|
||||||
|
width="100%"
|
||||||
:list="swiperList"
|
:list="swiperList"
|
||||||
autoplay
|
autoplay
|
||||||
height="680rpx"
|
|
||||||
:indicator="{ type: 'dots-bar' }"
|
:indicator="{ type: 'dots-bar' }"
|
||||||
v-model:current="current"
|
|
||||||
@change="onChange"
|
@change="onChange"
|
||||||
></wd-swiper>
|
></wd-swiper>
|
||||||
<view
|
<view
|
||||||
class="m-2 p-2 absolute bottom-0 text-center left-0 right-0 text-white bg-gray-300 bg-opacity-5"
|
class="m-2 p-2 absolute bottom-0 text-center left-0 right-0 text-white bg-black bg-opacity-40"
|
||||||
style="backdrop-filter: blur(2rpx); border-radius: 10rpx"
|
style="backdrop-filter: blur(2rpx); border-radius: 10rpx"
|
||||||
>
|
>
|
||||||
<!-- <wd-search hide-cancel placeholder-left placeholder="请输入内容"></wd-search> -->
|
<!-- <wd-search hide-cancel placeholder-left placeholder="请输入内容"></wd-search> -->
|
||||||
<text class="block font-size-4 text-left">{{ swiperList[current].name }}</text>
|
<text class="block font-size-4 text-left">{{ city }}</text>
|
||||||
<text class="block font-size-3 text-left">
|
<text class="block font-size-3 text-left">
|
||||||
{{ swiperList[current].title }}
|
{{ title }}
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -103,8 +113,13 @@
|
|||||||
<view
|
<view
|
||||||
class="p-1"
|
class="p-1"
|
||||||
style="display: inline-block; width: 300rpx"
|
style="display: inline-block; width: 300rpx"
|
||||||
@click="goToShop()"
|
@click="
|
||||||
v-for="item in product_30.list"
|
more({
|
||||||
|
type: 2,
|
||||||
|
url: ' ',
|
||||||
|
})
|
||||||
|
"
|
||||||
|
v-for="item in product_30"
|
||||||
>
|
>
|
||||||
<wd-card custom-class="card-content">
|
<wd-card custom-class="card-content">
|
||||||
<view style="height: 200rpx; width: 300rpx">
|
<view style="height: 200rpx; width: 300rpx">
|
||||||
@ -150,7 +165,16 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="pe-2 ps-2">
|
<view class="pe-2 ps-2">
|
||||||
<view class=" " style="" @click="more">
|
<view
|
||||||
|
class=" "
|
||||||
|
style=""
|
||||||
|
@click="
|
||||||
|
more({
|
||||||
|
type: 2,
|
||||||
|
url: ' ',
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
<wd-card custom-class="card-content">
|
<wd-card custom-class="card-content">
|
||||||
<view class="relative" style="height: 380rpx">
|
<view class="relative" style="height: 380rpx">
|
||||||
<wd-img
|
<wd-img
|
||||||
@ -265,7 +289,16 @@
|
|||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<view class="p-1" style="" @click="goToShop('https://shop.lihaink.cn/')">
|
<view
|
||||||
|
class="p-1"
|
||||||
|
style=""
|
||||||
|
@click="
|
||||||
|
more({
|
||||||
|
type: 2,
|
||||||
|
url: ' ',
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
<wd-card custom-class="card-content">
|
<wd-card custom-class="card-content">
|
||||||
<view style="height: 200rpx">
|
<view style="height: 200rpx">
|
||||||
<wd-img
|
<wd-img
|
||||||
@ -315,7 +348,16 @@
|
|||||||
</wd-card>
|
</wd-card>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="p-2" style="" @click="more">
|
<view
|
||||||
|
class="p-2"
|
||||||
|
style=""
|
||||||
|
@click="
|
||||||
|
more({
|
||||||
|
type: 2,
|
||||||
|
url: ' ',
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
<wd-card custom-class="card-content">
|
<wd-card custom-class="card-content">
|
||||||
<view class="content p-2" style="align-items: normal">
|
<view class="content p-2" style="align-items: normal">
|
||||||
<view style="width: 280rpx; height: 200rpx">
|
<view style="width: 280rpx; height: 200rpx">
|
||||||
@ -390,7 +432,16 @@
|
|||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<view class="p-1" style="" @click="goToShop('https://shop.lihaink.cn/')">
|
<view
|
||||||
|
class="p-1"
|
||||||
|
style=""
|
||||||
|
@click="
|
||||||
|
more({
|
||||||
|
type: 2,
|
||||||
|
url: ' ',
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
<wd-card custom-class="card-content">
|
<wd-card custom-class="card-content">
|
||||||
<view style="height: 200rpx">
|
<view style="height: 200rpx">
|
||||||
<wd-img
|
<wd-img
|
||||||
@ -421,110 +472,144 @@
|
|||||||
</wd-col>
|
</wd-col>
|
||||||
</wd-row>
|
</wd-row>
|
||||||
</view>
|
</view>
|
||||||
|
<fly-login v-model="show" />
|
||||||
<view class="p-1"></view>
|
<view class="p-1"></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts">
|
||||||
// import { toLogin } from '@/libs/login.js'
|
// import { toLogin } from '@/libs/login.js'
|
||||||
import { getProductAPI } from '@/service/crmeb/product.ts'
|
import { getProductAPI, getBannerAPI } from '@/service/crmeb/product.ts'
|
||||||
|
import { useUserStore } from '@/store'
|
||||||
|
import { getUrl, getWebUrl } from '@/utils'
|
||||||
|
|
||||||
onLoad(() => {
|
const userStore = useUserStore()
|
||||||
getProduct(30)
|
const hasLogin = computed(() => userStore.userInfo?.id)
|
||||||
// postFoo()
|
import { defineComponent } from 'vue'
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: false,
|
||||||
|
product_30: {},
|
||||||
|
swiperList: {},
|
||||||
|
|
||||||
|
currentTab: 1,
|
||||||
|
city: '',
|
||||||
|
title: '',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async onLoad(option) {
|
||||||
|
this.getBanner()
|
||||||
|
this.getProduct(30)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getBanner() {
|
||||||
|
const res = await getBannerAPI([])
|
||||||
|
// 使用正确的 map 方法返回新数组
|
||||||
|
this.swiperList = res.data.map((item) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
url: item.image,
|
||||||
|
}
|
||||||
})
|
})
|
||||||
const product_30 = ref([])
|
this.city = this.swiperList[0].city
|
||||||
const getProduct = async (id) => {
|
this.title = this.swiperList[0].title
|
||||||
|
},
|
||||||
|
async getProduct(id) {
|
||||||
const res = await getProductAPI(id)
|
const res = await getProductAPI(id)
|
||||||
product_30.value = res.data
|
this.product_30 = res.data['list']
|
||||||
// console.log(product_30.value)
|
// console.log(product_30.value)
|
||||||
}
|
|
||||||
|
|
||||||
// const data2 = ref<IFooItem>()
|
|
||||||
// const postFoo = async () => {
|
|
||||||
// const res = await postFooAPI('菲鸽2')
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const { loading, error, data, run } = useRequest<IFooItem>(() => getProductAPI(30), {
|
|
||||||
// immediate: true,
|
|
||||||
// initialData,
|
|
||||||
// })
|
|
||||||
|
|
||||||
//轮播图
|
|
||||||
const swiperList = [
|
|
||||||
{
|
|
||||||
name: '三江区街道',
|
|
||||||
title:
|
|
||||||
'因举办古韵悠然的传统民俗文化节热度飙升,在这里,你能感受到乡村文化的深厚底蕴和无穷魅力。',
|
|
||||||
url: 'https://img.shetu66.com/2023/07/04/1688453333865029.png',
|
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: '农资供应',
|
|
||||||
title:
|
|
||||||
'因举办古韵悠然的传统民俗文化节热度飙升,在这里,你能感受到乡村文化的深厚底蕴和无穷魅力。',
|
|
||||||
url: 'https://www.keaitupian.cn/cjpic/frombd/2/253/1659552792/3869332496.jpg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '土地流转',
|
|
||||||
title:
|
|
||||||
'因举办古韵悠然的传统民俗文化节热度飙升,在这里,你能感受到乡村文化的深厚底蕴和无穷魅力。',
|
|
||||||
url: 'https://img-baofun.zhhainiao.com/pcwallpaper_ugc/static/a6bba9bd1de44293b8d08a64d94775e4.jpg',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
const current = ref(1)
|
|
||||||
|
|
||||||
function onChange(e) {
|
onChange(e) {
|
||||||
// console.log(e)
|
|
||||||
current.value = e.current
|
|
||||||
}
|
|
||||||
|
|
||||||
const currentTab = ref(1)
|
|
||||||
function changeTab(e) {
|
|
||||||
console.log(e)
|
console.log(e)
|
||||||
currentTab.value = e.id
|
this.city = this.swiperList[e.current].city
|
||||||
}
|
this.title = this.swiperList[e.current].title
|
||||||
|
},
|
||||||
|
|
||||||
function moreVillage() {
|
changeTab(e) {
|
||||||
|
console.log(e)
|
||||||
|
// this.currentTab = e.id
|
||||||
|
},
|
||||||
|
// async submitGroup() {
|
||||||
|
// const res = await setGroupAPI(this.addressinfo)
|
||||||
|
// this.show = false
|
||||||
|
// },
|
||||||
|
|
||||||
|
moreVillage() {
|
||||||
console.log('查看乡村')
|
console.log('查看乡村')
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages-village-sub/home/index',
|
url: '/pages-village-sub/home/index',
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
|
||||||
function moreTourism() {
|
moreTourism() {
|
||||||
console.log('查看旅游')
|
console.log('查看旅游')
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages-tourism-sub/home/index',
|
url: '/pages-tourism-sub/home/index',
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
// more(item) {
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: `/pages/web_view/index?target=${item.url}&title=${item.name}`,
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
|
||||||
|
more(item) {
|
||||||
|
console.log(item)
|
||||||
|
if (item.type == 1) {
|
||||||
|
getUrl(item.url)
|
||||||
|
} else if (item.type == 2) {
|
||||||
|
getWebUrl(item.url)
|
||||||
}
|
}
|
||||||
function more(item) {
|
},
|
||||||
uni.navigateTo({
|
},
|
||||||
url: `/pages/web_view/index?target=${item.url}&title=${item.name}`,
|
|
||||||
})
|
})
|
||||||
}
|
|
||||||
// function more() {
|
// const swiperList = [
|
||||||
|
// {
|
||||||
|
// city: '三江区街道',
|
||||||
|
// title:
|
||||||
|
// '因举办古韵悠然的传统民俗文化节热度飙升,在这里,你能感受到乡村文化的深厚底蕴和无穷魅力。',
|
||||||
|
// url: 'https://img.shetu66.com/2023/07/04/1688453333865029.png',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// city: '农资供应',
|
||||||
|
// title:
|
||||||
|
// '因举办古韵悠然的传统民俗文化节热度飙升,在这里,你能感受到乡村文化的深厚底蕴和无穷魅力。',
|
||||||
|
// url: 'https://www.keaitupian.cn/cjpic/frombd/2/253/1659552792/3869332496.jpg',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// city: '土地流转',
|
||||||
|
// title:
|
||||||
|
// '因举办古韵悠然的传统民俗文化节热度飙升,在这里,你能感受到乡村文化的深厚底蕴和无穷魅力。',
|
||||||
|
// url: 'https://img-baofun.zhhainiao.com/pcwallpaper_ugc/static/a6bba9bd1de44293b8d08a64d94775e4.jpg',
|
||||||
|
// },
|
||||||
|
// ]
|
||||||
|
|
||||||
|
// function more {
|
||||||
// console.log('数字乡村详情')
|
// console.log('数字乡村详情')
|
||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
// url: '/pages/index/detail',
|
// url: '/pages/index/detail',
|
||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
function goToShop() {
|
// function more {
|
||||||
// if (this.isLogin) {
|
// // if (this.isLogin) {
|
||||||
// const target = encodeURIComponent('/pages/goods_cate/goods_cate')
|
// // const target = encodeURIComponent('/pages/goods_cate/goods_cate')
|
||||||
const target = '/pages/goods_cate/goods_cate'
|
// const target = '/pages/goods_cate/goods_cate'
|
||||||
// let urls = 'https://test.shop.lihaink.cn/pages/user/login'
|
// // let urls = 'https://test.shop.lihaink.cn/pages/user/login'
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url: `/pages/web_view/index?target=${target}&title=区域特产`,
|
// url: `/pages/web_view/index?target=${target}&title=区域特产`,
|
||||||
})
|
// })
|
||||||
// } else {
|
// // } else {
|
||||||
// this.openAuto()
|
// // this.openAuto()
|
||||||
|
// // }
|
||||||
|
// }
|
||||||
|
// // 打开授权
|
||||||
|
// function openAuto() {
|
||||||
|
// toLogin()
|
||||||
// }
|
// }
|
||||||
}
|
|
||||||
// 打开授权
|
|
||||||
function openAuto() {
|
|
||||||
toLogin()
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '我的订单',
|
name: '我的订单',
|
||||||
url: '/pages/users/user_money/index',
|
url: '/pages/users/order_list/index?status=-1',
|
||||||
type: 2,
|
type: 2,
|
||||||
icon: '/static/icons/village_service.png',
|
icon: '/static/icons/village_service.png',
|
||||||
color: 'green',
|
color: 'green',
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</CustomNavbar> -->
|
</CustomNavbar> -->
|
||||||
<!-- <view class="content"> -->
|
<!-- <view class="content"> -->
|
||||||
|
<fly-login v-model="show" />
|
||||||
<web-view class="web-view" :webview-styles="webviewStyles" :src="local_url"></web-view>
|
<web-view class="web-view" :webview-styles="webviewStyles" :src="local_url"></web-view>
|
||||||
<!-- </view> -->
|
<!-- </view> -->
|
||||||
</template>
|
</template>
|
||||||
@ -23,6 +24,8 @@ import { defineComponent, computed } from 'vue'
|
|||||||
import CustomNavbar from '@/components/CustomNavbar.vue'
|
import CustomNavbar from '@/components/CustomNavbar.vue'
|
||||||
import { getUrlCrmebLogin } from '@/utils'
|
import { getUrlCrmebLogin } from '@/utils'
|
||||||
import { isMpWeixin } from '@/utils/platform'
|
import { isMpWeixin } from '@/utils/platform'
|
||||||
|
//检查是否授权
|
||||||
|
const hasLogin = computed(() => userStore.userInfo?.id)
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -44,6 +47,10 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
if (hasLogin) {
|
||||||
|
this.show = true
|
||||||
|
return
|
||||||
|
}
|
||||||
// this.local_url = decodeURIComponent(getUrlCrmebLogin() + option.target)
|
// this.local_url = decodeURIComponent(getUrlCrmebLogin() + option.target)
|
||||||
console.log(getUrlCrmebLogin())
|
console.log(getUrlCrmebLogin())
|
||||||
// const target = encodeURIComponent(option.target)
|
// const target = encodeURIComponent(option.target)
|
||||||
|
@ -27,6 +27,7 @@ export interface IFooItem {
|
|||||||
export function getProductAPI(cate_pid: string) {
|
export function getProductAPI(cate_pid: string) {
|
||||||
return http.get<IFooItem>(getUrlCrmebProxy() + '/api/product/spu/lst', { cate_pid })
|
return http.get<IFooItem>(getUrlCrmebProxy() + '/api/product/spu/lst', { cate_pid })
|
||||||
}
|
}
|
||||||
|
// 用户中心
|
||||||
export function getInfoAPI() {
|
export function getInfoAPI() {
|
||||||
return http.post('/api/user/info', {})
|
return http.post('/api/user/info', {})
|
||||||
}
|
}
|
||||||
@ -52,9 +53,25 @@ export function getDistrictAPI() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getStreetAPI(code: string) {
|
export function getStreetAPI(code: string) {
|
||||||
return http.get('/api/location/getStreet', { code })
|
return http.get('/api/location/getStreet', { code: code })
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getVillageAPI(code: string) {
|
export function getVillageAPI(code: string) {
|
||||||
return http.get('/api/location/getVillage', { code })
|
return http.get('/api/location/getVillage', { code: code })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 首页
|
||||||
|
export function getBannerAPI(data: any) {
|
||||||
|
return http.post('/api/banner/index', data)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getArticleCategoryAPI(data: any) {
|
||||||
|
return http.get('/api/article/category', data)
|
||||||
|
}
|
||||||
|
export function getArticleIndexAPI(data: any) {
|
||||||
|
return http.get('/api/article/index', data)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getArticleDetailAPI(data: any) {
|
||||||
|
return http.get('/api/article/detail', data)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user