页面
3
env/.env
vendored
@ -13,7 +13,8 @@ VITE_LOGIN_URL = '/pages/login/index'
|
|||||||
# 数字乡村
|
# 数字乡村
|
||||||
VITE_SERVER_BASEURL = 'http://test.data-middle.lihaink.cn'
|
VITE_SERVER_BASEURL = 'http://test.data-middle.lihaink.cn'
|
||||||
VITE_UPLOAD_BASEURL = 'http://test.data-middle.lihaink.cn/upload'
|
VITE_UPLOAD_BASEURL = 'http://test.data-middle.lihaink.cn/upload'
|
||||||
|
# 商城
|
||||||
|
VITE_SHOP_SERVER_BASEURL = 'https://shop.lihaink.cn'
|
||||||
|
|
||||||
# 村集体
|
# 村集体
|
||||||
VITE_CRMEB_SERVER_BASEURL = 'https://test.shop.lihaink.cn'
|
VITE_CRMEB_SERVER_BASEURL = 'https://test.shop.lihaink.cn'
|
||||||
|
@ -81,10 +81,10 @@ const httpInterceptor = {
|
|||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const { token } = userStore.userInfo as unknown as IUserInfo
|
const { token } = userStore.userInfo as unknown as IUserInfo
|
||||||
// console.log('token', token)
|
// console.log('token', token)
|
||||||
// if (token) {
|
if (token) {
|
||||||
// options.header.Authorization = `Bearer ${token.access_token}`
|
options.header.Authorization = `Bearer ${token.access_token}`
|
||||||
// }
|
}
|
||||||
options.header.Authorization = `Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3ZWJtYW4udGlueXdhbi5jbiIsImF1ZCI6IndlYm1hbi50aW55d2FuLmNuIiwiaWF0IjoxNzU2ODYzNDAwLCJuYmYiOjE3NTY4NjM0MDAsImV4cCI6MTc1Njg3MDYwMCwiZXh0ZW5kIjp7ImlkIjoyMX19.5jmRqytXC-mqeNZBvef6vo4fm4RE0T-QR_mGzjZaAYM`
|
// options.header.Authorization = `Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3ZWJtYW4udGlueXdhbi5jbiIsImF1ZCI6IndlYm1hbi50aW55d2FuLmNuIiwiaWF0IjoxNzU2ODYzNDAwLCJuYmYiOjE3NTY4NjM0MDAsImV4cCI6MTc1Njg3MDYwMCwiZXh0ZW5kIjp7ImlkIjoyMX19.5jmRqytXC-mqeNZBvef6vo4fm4RE0T-QR_mGzjZaAYM`
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
:list="swiperList"
|
:list="swiperList"
|
||||||
autoplay
|
autoplay
|
||||||
:indicator="{ type: 'dots-bar' }"
|
:indicator="{ type: 'dots-bar' }"
|
||||||
@change="onChange"
|
|
||||||
></wd-swiper>
|
></wd-swiper>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
@ -39,7 +38,7 @@
|
|||||||
{{ detail.description }}
|
{{ detail.description }}
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="p-1 font-size-3" style="align-items: end">
|
<view class="p-1 font-size-3" style="align-items: end" @click="location(detail)">
|
||||||
<text class="pe-2 font-size-3">
|
<text class="pe-2 font-size-3">
|
||||||
<wd-icon name="location" size="28rpx" color="#87d76b"></wd-icon>
|
<wd-icon name="location" size="28rpx" color="#87d76b"></wd-icon>
|
||||||
泸州市龙马潭区海吉星路
|
泸州市龙马潭区海吉星路
|
||||||
@ -64,7 +63,8 @@
|
|||||||
<wd-card custom-class="card-content m-2">
|
<wd-card custom-class="card-content m-2">
|
||||||
<view class="m-2 p-2 font-size-4 color-black">场所介绍</view>
|
<view class="m-2 p-2 font-size-4 color-black">场所介绍</view>
|
||||||
<view class="m-2 px-2" style="backdrop-filter: blur(2rpx); border-radius: 10rpx">
|
<view class="m-2 px-2" style="backdrop-filter: blur(2rpx); border-radius: 10rpx">
|
||||||
<wd-textarea v-html="detail.content" />
|
<!-- <wd-textarea v-html="detail.content" /> -->
|
||||||
|
<rich-text :nodes="detail.content"></rich-text>
|
||||||
</view>
|
</view>
|
||||||
</wd-card>
|
</wd-card>
|
||||||
</view>
|
</view>
|
||||||
@ -81,19 +81,15 @@
|
|||||||
</wd-card>
|
</wd-card>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<scroll-view scroll-x="true" class="scroll-view-container">
|
<scroll-view v-if="index_list.length > 0" scroll-x="true" class="scroll-view-container">
|
||||||
<view
|
<view class="p-2" style="" v-for="item in index_list">
|
||||||
class="p-2"
|
|
||||||
style=""
|
|
||||||
@click="more"
|
|
||||||
v-for="item in index_list"
|
|
||||||
v-if="item.id != detail.id"
|
|
||||||
>
|
|
||||||
<wd-card custom-class="card-content">
|
<wd-card custom-class="card-content">
|
||||||
<view class="content p-2" style="align-items: normal" @click="goPage(item)">
|
<view class="content p-2" style="align-items: normal" @click="goPage(item)">
|
||||||
<view class="px-2 flex-content-column">
|
<view class="ps-2 flex-content-column">
|
||||||
<view class="px-1 font-size-4 color-black">{{ item.author }}</view>
|
<view class="ps-1 font-size-4 font-bold color-black ellipsis-2">
|
||||||
<view class="px-1 font-size-3 ellipsis-2">{{ item.description }}</view>
|
{{ 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>
|
||||||
@ -121,14 +117,11 @@ import {
|
|||||||
getArticleCategoryAPI,
|
getArticleCategoryAPI,
|
||||||
getArticleIndexAPI,
|
getArticleIndexAPI,
|
||||||
getArticleDetailAPI,
|
getArticleDetailAPI,
|
||||||
|
openLocation,
|
||||||
} from '@/service/crmeb/product.ts'
|
} from '@/service/crmeb/product.ts'
|
||||||
import { useUserStore } from '@/store'
|
|
||||||
import { getUrl, getWebUrl } from '@/utils'
|
import { getUrl, getWebUrl } from '@/utils'
|
||||||
|
|
||||||
const userStore = useUserStore()
|
|
||||||
const hasLogin = computed(() => userStore.userInfo?.id)
|
|
||||||
import { defineComponent } from 'vue'
|
import { defineComponent } from 'vue'
|
||||||
|
import { http } from '@/utils/http'
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -164,6 +157,30 @@ export default defineComponent({
|
|||||||
goPage(item) {
|
goPage(item) {
|
||||||
getUrl('/pages/about/detail?id=' + item.id)
|
getUrl('/pages/about/detail?id=' + item.id)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 打开地图
|
||||||
|
location(res) {
|
||||||
|
// uni.getLocation({
|
||||||
|
// type: 'gcj02',
|
||||||
|
// success: function (res) {
|
||||||
|
// console.log(res)
|
||||||
|
// },
|
||||||
|
// })
|
||||||
|
// openLocation(res.latitude, res.longitude, res.address, res.address)
|
||||||
|
openLocation(28.910634, 105.436959)
|
||||||
|
// http
|
||||||
|
// .get(`https://test.shop.lihaink.cn/api/lbs/geocoder?location=${28.910634},${105.436959}`)
|
||||||
|
// .catch((res) => {
|
||||||
|
// console.log(res)
|
||||||
|
// // // that.addFrom_address = res.data.address
|
||||||
|
// // // that.addFrom.province = res.data.address_component.province
|
||||||
|
// // // that.addFrom.city = res.data.address_component.city
|
||||||
|
// // // that.addFrom.district = res.data.address_component.district
|
||||||
|
// // // that.addFrom.latitude = res.data.location.latitude
|
||||||
|
// // // that.addFrom.longitude = res.data.location.longitude
|
||||||
|
// // // // that.addFrom.detail = res.data.address_component.street
|
||||||
|
// })
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
@ -62,7 +62,9 @@
|
|||||||
<wd-card custom-class="card-content">
|
<wd-card custom-class="card-content">
|
||||||
<view class="content p-2" style="align-items: normal" @click="goPage(item)">
|
<view class="content p-2" style="align-items: normal" @click="goPage(item)">
|
||||||
<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">{{ item.author }}</view>
|
<view class="ps-1 font-size-4 font-bold color-black ellipsis-2">
|
||||||
|
{{ item.author }}
|
||||||
|
</view>
|
||||||
<view class="ps-1 font-size-3 ellipsis-2">{{ item.description }}</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">
|
||||||
|
@ -60,21 +60,30 @@
|
|||||||
name: '租赁服务',
|
name: '租赁服务',
|
||||||
url: '/pages/activity/lease/index',
|
url: '/pages/activity/lease/index',
|
||||||
icon: '/static/icons/village_service.png',
|
icon: '/static/icons/village_service.png',
|
||||||
|
type: 3,
|
||||||
color: 'green',
|
color: 'green',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '农事服务',
|
name: '农事服务',
|
||||||
url: '/pages/store/home/index?id=13',
|
url: '/pages/store/home/index?id=13',
|
||||||
icon: '/static/icons/agriculture_service.png',
|
icon: '/static/icons/agriculture_service.png',
|
||||||
|
type: 3,
|
||||||
color: 'blue',
|
color: 'blue',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '店铺街',
|
name: '店铺街',
|
||||||
url: '/pages/store/shopStreet/index',
|
url: '/pages/store/shopStreet/index',
|
||||||
icon: '/static/icons/agriculture_course.png',
|
icon: '/static/icons/agriculture_course.png',
|
||||||
|
type: 3,
|
||||||
color: 'orange',
|
color: 'orange',
|
||||||
},
|
},
|
||||||
{ name: '美丽乡村', icon: '/static/icons/rural_ecommerce.png', color: 'red' },
|
{
|
||||||
|
name: '村集体',
|
||||||
|
url: '',
|
||||||
|
icon: '/static/icons/rural_ecommerce.png',
|
||||||
|
type: 2,
|
||||||
|
color: 'red',
|
||||||
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<wd-grid-item use-slot>
|
<wd-grid-item use-slot>
|
||||||
@ -101,7 +110,16 @@
|
|||||||
好物上新季,特产抢先购
|
好物上新季,特产抢先购
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<wd-button type="primary" size="small">
|
<wd-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="
|
||||||
|
more({
|
||||||
|
type: 2,
|
||||||
|
url: '',
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
<wd-text text="更多" color="#ffffff" size="24rpx"></wd-text>
|
<wd-text text="更多" color="#ffffff" size="24rpx"></wd-text>
|
||||||
</wd-button>
|
</wd-button>
|
||||||
</view>
|
</view>
|
||||||
@ -116,7 +134,7 @@
|
|||||||
@click="
|
@click="
|
||||||
more({
|
more({
|
||||||
type: 2,
|
type: 2,
|
||||||
url: ' ',
|
url: `/pages/goods_details/index?id=${item.product_id} `,
|
||||||
})
|
})
|
||||||
"
|
"
|
||||||
v-for="item in product_30"
|
v-for="item in product_30"
|
||||||
@ -361,14 +379,14 @@
|
|||||||
// import { toLogin } from '@/libs/login.js'
|
// import { toLogin } from '@/libs/login.js'
|
||||||
import { getProductAPI, getBannerAPI } from '@/service/crmeb/product.ts'
|
import { getProductAPI, getBannerAPI } from '@/service/crmeb/product.ts'
|
||||||
import { useUserStore } from '@/store'
|
import { useUserStore } from '@/store'
|
||||||
import { getUrl, getWebUrl } from '@/utils'
|
import { getUrl, getWebUrl, getShopWebUrl } from '@/utils'
|
||||||
import {
|
import {
|
||||||
getArticleCategoryAPI,
|
getArticleCategoryAPI,
|
||||||
getArticleIndexAPI,
|
getArticleIndexAPI,
|
||||||
getArticleDetailAPI,
|
getArticleDetailAPI,
|
||||||
} from '@/service/crmeb/product.ts'
|
} from '@/service/crmeb/product.ts'
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const hasLogin = computed(() => userStore.userInfo?.id)
|
|
||||||
import { defineComponent } from 'vue'
|
import { defineComponent } from 'vue'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@ -376,7 +394,7 @@ export default defineComponent({
|
|||||||
return {
|
return {
|
||||||
show: false,
|
show: false,
|
||||||
product_30: {},
|
product_30: {},
|
||||||
swiperList: {},
|
swiperList: [],
|
||||||
index_eat: {},
|
index_eat: {},
|
||||||
index_live: {},
|
index_live: {},
|
||||||
index_play: {},
|
index_play: {},
|
||||||
@ -456,70 +474,30 @@ export default defineComponent({
|
|||||||
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}`,
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
switchTab(index) {
|
switchTab(index) {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/about/index?category_id=' + index,
|
url: '/pages/about/index?category_id=' + index,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
more(item) {
|
more(item) {
|
||||||
|
const hasLogin = userStore.userInfo['id'] ? true : false
|
||||||
|
if (!hasLogin) {
|
||||||
|
this.show = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
console.log(item)
|
console.log(item)
|
||||||
if (item.type == 1) {
|
if (item.type == 1) {
|
||||||
getUrl(item.url)
|
getUrl(item.url)
|
||||||
} else if (item.type == 2) {
|
} else if (item.type == 2) {
|
||||||
getWebUrl(item.url)
|
getWebUrl(item.url)
|
||||||
|
} else if (item.type == 3) {
|
||||||
|
getShopWebUrl(item.url)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// 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('数字乡村详情')
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: '/pages/index/detail',
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// function more {
|
|
||||||
// // if (this.isLogin) {
|
|
||||||
// // const target = encodeURIComponent('/pages/goods_cate/goods_cate')
|
|
||||||
// const target = '/pages/goods_cate/goods_cate'
|
|
||||||
// // let urls = 'https://test.shop.lihaink.cn/pages/user/login'
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: `/pages/web_view/index?target=${target}&title=区域特产`,
|
|
||||||
// })
|
|
||||||
// // } else {
|
|
||||||
// // this.openAuto()
|
|
||||||
// // }
|
|
||||||
// }
|
|
||||||
// // 打开授权
|
|
||||||
// function openAuto() {
|
|
||||||
// toLogin()
|
|
||||||
// }
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -7,14 +7,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="background_home">
|
<view class="background_home">
|
||||||
<view class=" " style="">
|
<view class=" " style="">
|
||||||
<wd-card custom-class="card-content">
|
|
||||||
<view class="relative h-50">
|
<view class="relative h-50">
|
||||||
<wd-img
|
<!-- <wd-img
|
||||||
radius="0px 0px 20rpx 20rpx "
|
radius="0px 0px 20rpx 20rpx "
|
||||||
:width="'100%'"
|
:width="'100%'"
|
||||||
:height="'100%'"
|
:height="'100%'"
|
||||||
src="https://img.shetu66.com/2023/06/14/1686734441937414.png"
|
src="https://img.shetu66.com/2023/06/14/1686734441937414.png"
|
||||||
/>
|
/> -->
|
||||||
<view
|
<view
|
||||||
class="m-4 absolute bottom-0 text-left left-0 right-0 text-white bg-black bg-opacity-0"
|
class="m-4 absolute bottom-0 text-left left-0 right-0 text-white bg-black bg-opacity-0"
|
||||||
style="backdrop-filter: blur(2rpx); border-radius: 10rpx"
|
style="backdrop-filter: blur(2rpx); border-radius: 10rpx"
|
||||||
@ -42,7 +41,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</wd-card>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="p-2">
|
<view class="p-2">
|
||||||
@ -55,28 +53,28 @@
|
|||||||
name: '我的钱包',
|
name: '我的钱包',
|
||||||
url: '/pages/users/user_money/index',
|
url: '/pages/users/user_money/index',
|
||||||
type: 2,
|
type: 2,
|
||||||
icon: '/static/icons/village_service.png',
|
icon: '/static/icons/my1.png',
|
||||||
color: 'green',
|
color: 'green',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '我的订单',
|
name: '我的订单',
|
||||||
url: '/pages/users/order_list/index?status=-1',
|
url: '/pages/users/order_list/index?status=-1',
|
||||||
type: 2,
|
type: 2,
|
||||||
icon: '/static/icons/village_service.png',
|
icon: '/static/icons/my2.png',
|
||||||
color: 'green',
|
color: 'green',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '我的收藏',
|
name: '我的收藏',
|
||||||
url: '/pages/users/user_goods_collection/index',
|
url: '/pages/users/user_goods_collection/index',
|
||||||
type: 2,
|
type: 2,
|
||||||
icon: '/static/icons/agriculture_service.png',
|
icon: '/static/icons/my3.png',
|
||||||
color: 'blue',
|
color: 'blue',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '浏览记录',
|
name: '浏览记录',
|
||||||
url: '/pages/users/browsingHistory/index',
|
url: '/pages/users/browsingHistory/index',
|
||||||
type: 2,
|
type: 2,
|
||||||
icon: '/static/icons/agriculture_service.png',
|
icon: '/static/icons/my4.png',
|
||||||
color: 'blue',
|
color: 'blue',
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -84,14 +82,14 @@
|
|||||||
name: '平台客服',
|
name: '平台客服',
|
||||||
url: '17309090670',
|
url: '17309090670',
|
||||||
type: 2,
|
type: 2,
|
||||||
icon: '/static/icons/rural_ecommerce.png',
|
icon: '/static/icons/my5.png',
|
||||||
color: 'red',
|
color: 'red',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '设置',
|
name: '设置',
|
||||||
url: '/pages/my/setting',
|
url: '/pages/my/setting',
|
||||||
type: 1,
|
type: 1,
|
||||||
icon: '/static/icons/rural_ecommerce.png',
|
icon: '/static/icons/my7.png',
|
||||||
color: 'red',
|
color: 'red',
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
@ -132,10 +130,10 @@ const logout = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function more(item) {
|
function more(item) {
|
||||||
if (hasLogin.value) {
|
// if (!hasLogin.value) {
|
||||||
show.value = true
|
// show.value = true
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
if (item.name == '平台客服') {
|
if (item.name == '平台客服') {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
@ -16,21 +16,24 @@
|
|||||||
</template>
|
</template>
|
||||||
</CustomNavbar>
|
</CustomNavbar>
|
||||||
<!-- <view class="content"> -->
|
<!-- <view class="content"> -->
|
||||||
<web-view class="web-view" :webview-styles="webviewStyles" :src="local_url"></web-view>
|
<fly-login v-model="show" />
|
||||||
|
<web-view class="web-view" :webview-styles="webviewStyles" :src="target"></web-view>
|
||||||
<!-- </view> -->
|
<!-- </view> -->
|
||||||
</template>
|
</template>
|
||||||
<!-- :style="{ width: windowW + 'px', height: windowH + 'px' }" -->
|
<!-- :style="{ width: windowW + 'px', height: windowH + 'px' }" -->
|
||||||
<script>
|
<script>
|
||||||
import { defineComponent, computed } from 'vue'
|
import { defineComponent, computed } from 'vue'
|
||||||
import CustomNavbar from '@/components/CustomNavbar.vue'
|
import CustomNavbar from '@/components/CustomNavbar.vue'
|
||||||
import { getUrlCrmebLogin } from '@/utils'
|
import { getUrlShop } from '@/utils'
|
||||||
|
//检查是否授权
|
||||||
|
const hasLogin = computed(() => userStore.userInfo?.id)
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
show: false,
|
||||||
windowH: 0,
|
windowH: 0,
|
||||||
windowW: 0,
|
windowW: 0,
|
||||||
local_url: '',
|
target: '',
|
||||||
title: '',
|
title: '',
|
||||||
webviewStyles: {
|
webviewStyles: {
|
||||||
progress: {
|
progress: {
|
||||||
@ -46,12 +49,17 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
// if (hasLogin) {
|
||||||
|
// this.show = true
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: '商城', // 运行时修改标题
|
title: '商城', // 运行时修改标题
|
||||||
})
|
})
|
||||||
|
|
||||||
this.local_url = decodeURIComponent(getUrlCrmebLogin() + option.local_url)
|
this.target = decodeURIComponent(getUrlShop() + option.target)
|
||||||
|
console.log('target:', this.target)
|
||||||
this.title = option.title || '商城首页'
|
this.title = option.title || '商城首页'
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -47,10 +47,10 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
if (hasLogin) {
|
// if (hasLogin) {
|
||||||
this.show = true
|
// this.show = true
|
||||||
return
|
// 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)
|
||||||
|
@ -75,3 +75,28 @@ export function getArticleIndexAPI(data: any) {
|
|||||||
export function getArticleDetailAPI(data: any) {
|
export function getArticleDetailAPI(data: any) {
|
||||||
return http.get('/api/article/detail', data)
|
return http.get('/api/article/detail', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打开导航
|
||||||
|
* @param latitude 目标纬度
|
||||||
|
* @param longitude 目标经度
|
||||||
|
* @param name 目标名称
|
||||||
|
* @param address 目标地址
|
||||||
|
*/
|
||||||
|
export function openLocation(
|
||||||
|
latitude: number,
|
||||||
|
longitude: number,
|
||||||
|
name: string = '',
|
||||||
|
address: string = '',
|
||||||
|
) {
|
||||||
|
return new Promise<void>((resolve, reject) => {
|
||||||
|
uni.openLocation({
|
||||||
|
latitude,
|
||||||
|
longitude,
|
||||||
|
name,
|
||||||
|
address,
|
||||||
|
success: () => resolve(),
|
||||||
|
fail: (err) => reject(err),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
BIN
src/static/icons/my1.png
Normal file
After Width: | Height: | Size: 745 B |
BIN
src/static/icons/my2.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
src/static/icons/my3.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
src/static/icons/my4.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
src/static/icons/my5.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
src/static/icons/my6.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
src/static/icons/my7.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
@ -174,6 +174,11 @@ export function getUrlCrmebLogin() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getUrlShop() {
|
||||||
|
// 请求基准地址
|
||||||
|
let baseUrl = import.meta.env.VITE_SHOP_SERVER_BASEURL
|
||||||
|
return baseUrl
|
||||||
|
}
|
||||||
export function getUrlCrmeb() {
|
export function getUrlCrmeb() {
|
||||||
// 请求基准地址
|
// 请求基准地址
|
||||||
let baseUrl = import.meta.env.VITE_CRMEB_SERVER_BASEURL
|
let baseUrl = import.meta.env.VITE_CRMEB_SERVER_BASEURL
|
||||||
@ -186,13 +191,6 @@ export function getUrlCrmebProxy() {
|
|||||||
return baseUrl
|
return baseUrl
|
||||||
}
|
}
|
||||||
|
|
||||||
// 代登录跳转
|
|
||||||
export function getWebUrl(url) {
|
|
||||||
console.log(url)
|
|
||||||
return uni.navigateTo({
|
|
||||||
url: `/pages/web_view/index?target=${url}`,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//模块跳转
|
//模块跳转
|
||||||
export function getUrl(url) {
|
export function getUrl(url) {
|
||||||
console.log(url)
|
console.log(url)
|
||||||
@ -200,3 +198,19 @@ export function getUrl(url) {
|
|||||||
url: url,
|
url: url,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 代登录跳转
|
||||||
|
export function getWebUrl(url) {
|
||||||
|
console.log(url)
|
||||||
|
return uni.navigateTo({
|
||||||
|
url: `/pages/web_view/index?target=${url}`,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 代登录跳转
|
||||||
|
export function getShopWebUrl(url) {
|
||||||
|
console.log(url)
|
||||||
|
return uni.navigateTo({
|
||||||
|
url: `/pages/web_view/h5?target=${url}`,
|
||||||
|
})
|
||||||
|
}
|
||||||
|