页面
This commit is contained in:
parent
92e8fea1f5
commit
5926a843e2
1
env/.env
vendored
1
env/.env
vendored
@ -10,6 +10,7 @@ VITE_APP_PUBLIC_BASE=/
|
|||||||
# 登录页面
|
# 登录页面
|
||||||
VITE_LOGIN_URL = '/pages/login/index'
|
VITE_LOGIN_URL = '/pages/login/index'
|
||||||
|
|
||||||
|
# https://test.data-middle.lihaink.cn
|
||||||
# 数字乡村
|
# 数字乡村
|
||||||
VITE_SERVER_BASEURL = 'https://test.data-middle.lihaink.cn'
|
VITE_SERVER_BASEURL = 'https://test.data-middle.lihaink.cn'
|
||||||
VITE_UPLOAD_BASEURL = 'https://test.data-middle.lihaink.cn/api/upload/image'
|
VITE_UPLOAD_BASEURL = 'https://test.data-middle.lihaink.cn/api/upload/image'
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
"type": "page",
|
"type": "page",
|
||||||
"layout": "default",
|
"layout": "default",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationBarTitleText": "店铺街"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -121,7 +121,7 @@
|
|||||||
"path": "pages/my/uploadProduct",
|
"path": "pages/my/uploadProduct",
|
||||||
"type": "page",
|
"type": "page",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "上传商品"
|
"navigationBarTitleText": "委托销售"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
<route lang="json5" type="page">
|
<route lang="json5" type="page">
|
||||||
{
|
{
|
||||||
layout: 'default',
|
layout: 'default',
|
||||||
style: {
|
style: { navigationBarTitleText: '店铺街' },
|
||||||
navigationStyle: 'custom',
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
<style>
|
<style>
|
||||||
@ -12,6 +10,7 @@
|
|||||||
background-color: rgba(0, 0, 0, 0) !important;
|
background-color: rgba(0, 0, 0, 0) !important;
|
||||||
}
|
}
|
||||||
.wd-tabs__nav {
|
.wd-tabs__nav {
|
||||||
|
background-color: none;
|
||||||
background: rgba(0, 0, 0, 0) !important;
|
background: rgba(0, 0, 0, 0) !important;
|
||||||
background-color: rgba(0, 0, 0, 0) !important;
|
background-color: rgba(0, 0, 0, 0) !important;
|
||||||
}
|
}
|
||||||
@ -19,18 +18,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="background_home">
|
<view class="background_home">
|
||||||
<wd-navbar
|
<!-- <wd-navbar
|
||||||
title=""
|
title=""
|
||||||
left-text=""
|
left-text=""
|
||||||
left-arrow
|
left-arrow
|
||||||
:bordered="false"
|
:bordered="false"
|
||||||
@click-left="handleBack"
|
@click-left="handleBack"
|
||||||
custom-style="background: rgba(0, 0, 0, 0) !important;--wot-navbar-color:white;--wot-font-gray-1:white;position: fixed"
|
custom-style="background: rgba(0, 0, 0, 0) !important;--wot-navbar-color:white;--wot-font-gray-1:white;position: fixed"
|
||||||
></wd-navbar>
|
></wd-navbar> -->
|
||||||
<view class="p-6"></view>
|
|
||||||
<!-- 顶部搜索栏 -->
|
<!-- 顶部搜索栏 -->
|
||||||
<wd-search hide-cancel placeholder-left placeholder="请输入内容"></wd-search>
|
<view class="px-2">
|
||||||
<view class="p-2">
|
<wd-search
|
||||||
|
v-model="param.keyword"
|
||||||
|
hide-cancel
|
||||||
|
placeholder-left
|
||||||
|
placeholder="请输入内容"
|
||||||
|
@change="change"
|
||||||
|
></wd-search>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- <view class="p-2">
|
||||||
<wd-tabs
|
<wd-tabs
|
||||||
v-model="currentTab"
|
v-model="currentTab"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
@ -45,6 +53,8 @@
|
|||||||
{ name: '土地流转', icon: 'gift', color: 'orange' },
|
{ name: '土地流转', icon: 'gift', color: 'orange' },
|
||||||
{ name: '技术服务', icon: 'secured', color: 'red' },
|
{ name: '技术服务', icon: 'secured', color: 'red' },
|
||||||
{ name: '乡村旅游', icon: 'secured', color: 'red' },
|
{ name: '乡村旅游', icon: 'secured', color: 'red' },
|
||||||
|
{ name: '乡村旅游', icon: 'secured', color: 'red' },
|
||||||
|
{ name: '乡村旅游', icon: 'secured', color: 'red' },
|
||||||
]"
|
]"
|
||||||
:key="index"
|
:key="index"
|
||||||
:title="`${item.name}`"
|
:title="`${item.name}`"
|
||||||
@ -52,72 +62,146 @@
|
|||||||
setActive="item.name"
|
setActive="item.name"
|
||||||
></wd-tab>
|
></wd-tab>
|
||||||
</wd-tabs>
|
</wd-tabs>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="pt-2" style="" @click="more">
|
<view class="p-2" style="" v-for="item in merchant">
|
||||||
|
<view
|
||||||
|
@click="
|
||||||
|
more({
|
||||||
|
type: 2,
|
||||||
|
url: `/pages/store/home/index?id=${item.mer_id}`,
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
<wd-card custom-class=" ">
|
<wd-card custom-class=" ">
|
||||||
<view class="relative pt-2" style="height: 280rpx">
|
<view class="relative" style="height: 280rpx">
|
||||||
<wd-img
|
<wd-img radius="20rpx" :width="'100%'" :height="'100%'" :src="item.mer_banner" />
|
||||||
radius="20rpx"
|
|
||||||
:width="'100%'"
|
|
||||||
:height="'100%'"
|
|
||||||
src="https://img95.699pic.com/photo/50384/2866.jpg_wh860.jpg"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="content" style="align-items:">
|
<view class="content px-2" style="align-items:">
|
||||||
<view style="width: 100rpx; height: 100rpx">
|
<view style="width: 100rpx; height: 100rpx">
|
||||||
<wd-img
|
<wd-img :width="'100%'" :height="'100%'" round :src="item.mer_avatar" alt="joy" />
|
||||||
:width="'100%'"
|
|
||||||
:height="'100%'"
|
|
||||||
round
|
|
||||||
src="https://img11.360buyimg.com/imagetools/jfs/t1/143248/37/5695/265818/5f3a8546E98d998a4/745897ca9c9e474b.jpg"
|
|
||||||
alt="joy"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="ps-2 flex-content-column">
|
<view class="p-2 flex-content-column">
|
||||||
<view class="ps-2">
|
<view class="px-2">
|
||||||
<view class="p-1 font-size-4 font-bold color-black">
|
<view class="p-1 font-size-4 font-bold color-black">
|
||||||
泸州市江阳区分水岭董允坝村
|
{{ item.mer_name }}
|
||||||
<wd-rate :modelValue="5" readonly />
|
|
||||||
|
<wd-tag v-if="item.is_trader" custom-class="space me-2" type="danger" mark>
|
||||||
|
自营
|
||||||
|
</wd-tag>
|
||||||
</view>
|
</view>
|
||||||
<view class="p-1">
|
|
||||||
<wd-tag custom-class="space me-2" mark>景区服务</wd-tag>
|
<view class="p-1 font-size-3 color-gary">
|
||||||
<wd-tag custom-class="space me-2" type="primary" mark>景区服务</wd-tag>
|
<!-- <wd-icon name="location" size="24rpx" /> -->
|
||||||
<wd-tag custom-class="space me-2" type="danger" mark>标签</wd-tag>
|
{{
|
||||||
<wd-tag custom-class="space me-2" type="warning" mark>标签</wd-tag>
|
item.care_count < 10000
|
||||||
<wd-tag custom-class="space me-2" type="success" mark>标签</wd-tag>
|
? item.care_count
|
||||||
</view>
|
: (item.care_count / 10000).toFixed(2) + '万'
|
||||||
<view class="p-1 font-size-3">
|
}}人关注
|
||||||
<wd-icon name="location" size="24rpx" />
|
|
||||||
泸州市江阳区分水岭镇董允坝村1队2号
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</wd-card>
|
</wd-card>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
<view class="p-1" />
|
<view class="p-1" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
<!-- getMerchantAPI -->
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts">
|
||||||
const currentTab = ref<number>(0)
|
import { defineComponent } from 'vue'
|
||||||
function handleChange(e) {
|
import { getMerchantAPI } from '@/service/crmeb/product.ts'
|
||||||
console.log(e)
|
import { getUrl, getWebUrl, getShopWebUrl, hasLogin } from '@/utils'
|
||||||
|
export default defineComponent({
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
currentTab: 0,
|
||||||
|
param: {
|
||||||
|
limit: 100,
|
||||||
|
page: 1,
|
||||||
|
keyword: '',
|
||||||
|
},
|
||||||
|
merchant: {},
|
||||||
|
|
||||||
|
// isLogin: false,
|
||||||
|
// userIsLogin: false,
|
||||||
|
// show: false,
|
||||||
|
// userStore: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async onLoad(option) {
|
||||||
|
this.merchant = await this.getMerchant()
|
||||||
|
console.log('获取商户信息', this.merchant)
|
||||||
|
// this.userStore = useUserStore()
|
||||||
|
// this.userIsLogin = useUserStore().userInfo.id ? true : false
|
||||||
|
// console.log('获取用户信息', this.userIsLogin)
|
||||||
|
// console.log('获取用户信息', this.userStore.userInfo)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getMerchant() {
|
||||||
|
const res = await getMerchantAPI(this.param)
|
||||||
|
// 使用正确的 map 方法返回新数组
|
||||||
|
return res.data['list']
|
||||||
|
},
|
||||||
|
|
||||||
|
async change() {
|
||||||
|
this.merchant = await this.getMerchant()
|
||||||
|
},
|
||||||
|
handleChange(e) {
|
||||||
|
// console.log(e)
|
||||||
// currentTab.value = e.id
|
// currentTab.value = e.id
|
||||||
}
|
},
|
||||||
function handleBack() {
|
// toLogin() {
|
||||||
uni.navigateBack({})
|
// uni.navigateTo({
|
||||||
}
|
// url: '/pages/login/login',
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: `/pages/store/home/index?id=${id}`
|
||||||
|
// })
|
||||||
|
|
||||||
function handleBackHome() {
|
// url: '/pages/columnGoods/goods_list/index?id=38&title=名优特产',
|
||||||
uni.reLaunch({ url: '/pages/index/index' })
|
more(item) {
|
||||||
}
|
this.islogin = hasLogin()
|
||||||
function more() {
|
if (this.islogin === false) {
|
||||||
console.log('查看更多')
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/index/list',
|
url: '/pages/login/login',
|
||||||
})
|
})
|
||||||
}
|
return
|
||||||
|
}
|
||||||
|
if (this.islogin === true) {
|
||||||
|
// console.log(item)
|
||||||
|
if (item.type == 1) {
|
||||||
|
getUrl(item.url)
|
||||||
|
} else if (item.type == 2) {
|
||||||
|
getWebUrl(item.url)
|
||||||
|
} else if (item.type == 3) {
|
||||||
|
getShopWebUrl(item.url)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
// const currentTab = ref<number>(0)
|
||||||
|
// function handleChange(e) {
|
||||||
|
// console.log(e)
|
||||||
|
// // currentTab.value = e.id
|
||||||
|
// }
|
||||||
|
// function handleBack() {
|
||||||
|
// uni.navigateBack({})
|
||||||
|
// }
|
||||||
|
|
||||||
|
// function handleBackHome() {
|
||||||
|
// uni.reLaunch({ url: '/pages/index/index' })
|
||||||
|
// }
|
||||||
|
// function more() {
|
||||||
|
// console.log('查看更多')
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: '/pages/index/list',
|
||||||
|
// })
|
||||||
|
// }
|
||||||
</script>
|
</script>
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
<view class="p-2">
|
<view class="p-2">
|
||||||
<wd-card>
|
<wd-card>
|
||||||
<wd-grid :gutter="2" :column="4">
|
<wd-grid :gutter="2" :column="5">
|
||||||
<view
|
<view
|
||||||
@click="more(item)"
|
@click="more(item)"
|
||||||
v-for="item in [
|
v-for="item in [
|
||||||
@ -70,8 +70,8 @@
|
|||||||
color: 'blue',
|
color: 'blue',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '滞销产品',
|
name: '助农产品',
|
||||||
url: '/pages/columnGoods/goods_list/index?id=30&title=滞销产品',
|
url: '/pages/columnGoods/goods_list/index?id=30&title=助农产品',
|
||||||
icon: '/static/icons/home3.png',
|
icon: '/static/icons/home3.png',
|
||||||
type: 2,
|
type: 2,
|
||||||
color: 'orange',
|
color: 'orange',
|
||||||
@ -83,15 +83,15 @@
|
|||||||
type: 2,
|
type: 2,
|
||||||
color: 'red',
|
color: 'red',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: '店铺街',
|
||||||
|
url: '/pages/index/detail',
|
||||||
|
icon: '/static/icons/home5.png',
|
||||||
|
type: 1,
|
||||||
|
color: 'red',
|
||||||
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<!-- // {
|
|
||||||
// name: '景区景点',
|
|
||||||
// url: '/pages/about/index',
|
|
||||||
// icon: '/static/icons/home5.png',
|
|
||||||
// type: 1,
|
|
||||||
// color: 'red',
|
|
||||||
// }, -->
|
|
||||||
<wd-grid-item use-slot>
|
<wd-grid-item use-slot>
|
||||||
<view class="p-2">
|
<view class="p-2">
|
||||||
<wd-img radius="20rpx" :width="'60rpx'" :height="'60rpx'" :src="item.icon" />
|
<wd-img radius="20rpx" :width="'60rpx'" :height="'60rpx'" :src="item.icon" />
|
||||||
@ -527,7 +527,8 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
more(item) {
|
more(item) {
|
||||||
const islogin = hasLogin()
|
// const islogin = hasLogin()
|
||||||
|
const islogin = true
|
||||||
if (islogin === false) {
|
if (islogin === false) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/login/login',
|
url: '/pages/login/login',
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: '上传商品',
|
name: '委托销售',
|
||||||
url: '/pages/my/uploadProduct',
|
url: '/pages/my/uploadProduct',
|
||||||
type: 1,
|
type: 1,
|
||||||
icon: '/static/icons/my5.png',
|
icon: '/static/icons/my5.png',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<route lang="json5">
|
<route lang="json5">
|
||||||
{
|
{
|
||||||
style: { navigationBarTitleText: '上传商品' },
|
style: { navigationBarTitleText: '委托销售' },
|
||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
|
|
||||||
|
@ -86,6 +86,11 @@ export function getUplaodImageAPI(data: any) {
|
|||||||
return http.post('/api/upload/image', data)
|
return http.post('/api/upload/image', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** GET 请求 */
|
||||||
|
export function getMerchantAPI(data: any) {
|
||||||
|
return http.get<IFooItem>(getUrlCrmebProxy() + 'api/store/merchant/lst', data)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 打开导航
|
* 打开导航
|
||||||
* @param latitude 目标纬度
|
* @param latitude 目标纬度
|
||||||
|
Loading…
x
Reference in New Issue
Block a user