页面
Some checks are pending
Auto Merge Main to Other Branches / Merge main into i18n (push) Waiting to run
Auto Merge Main to Other Branches / Merge main into base-sard-ui (push) Waiting to run

This commit is contained in:
sjeam 2025-09-07 17:42:20 +08:00
parent 92e8fea1f5
commit 5926a843e2
7 changed files with 170 additions and 79 deletions

1
env/.env vendored
View File

@ -10,6 +10,7 @@ VITE_APP_PUBLIC_BASE=/
# 登录页面
VITE_LOGIN_URL = '/pages/login/index'
# 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'

View File

@ -82,7 +82,7 @@
"type": "page",
"layout": "default",
"style": {
"navigationStyle": "custom"
"navigationBarTitleText": "店铺街"
}
},
{
@ -121,7 +121,7 @@
"path": "pages/my/uploadProduct",
"type": "page",
"style": {
"navigationBarTitleText": "上传商品"
"navigationBarTitleText": "委托销售"
}
},
{

View File

@ -1,9 +1,7 @@
<route lang="json5" type="page">
{
layout: 'default',
style: {
navigationStyle: 'custom',
},
style: { navigationBarTitleText: '店铺街' },
}
</route>
<style>
@ -12,6 +10,7 @@
background-color: rgba(0, 0, 0, 0) !important;
}
.wd-tabs__nav {
background-color: none;
background: rgba(0, 0, 0, 0) !important;
background-color: rgba(0, 0, 0, 0) !important;
}
@ -19,18 +18,27 @@
<template>
<view>
<view class="background_home">
<wd-navbar
<!-- <wd-navbar
title=""
left-text=""
left-arrow
:bordered="false"
@click-left="handleBack"
custom-style="background: rgba(0, 0, 0, 0) !important;--wot-navbar-color:white;--wot-font-gray-1:white;position: fixed"
></wd-navbar>
<view class="p-6"></view>
></wd-navbar> -->
<!-- 顶部搜索栏 -->
<wd-search hide-cancel placeholder-left placeholder="请输入内容"></wd-search>
<view class="p-2">
<view class="px-2">
<wd-search
v-model="param.keyword"
hide-cancel
placeholder-left
placeholder="请输入内容"
@change="change"
></wd-search>
</view>
<!-- <view class="p-2">
<wd-tabs
v-model="currentTab"
@change="handleChange"
@ -45,6 +53,8 @@
{ 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' },
]"
:key="index"
:title="`${item.name}`"
@ -52,72 +62,146 @@
setActive="item.name"
></wd-tab>
</wd-tabs>
</view>
</view> -->
</view>
<view class="pt-2" style="" @click="more">
<wd-card custom-class=" ">
<view class="relative pt-2" style="height: 280rpx">
<wd-img
radius="20rpx"
:width="'100%'"
:height="'100%'"
src="https://img95.699pic.com/photo/50384/2866.jpg_wh860.jpg"
/>
</view>
<view class="content" style="align-items:">
<view style="width: 100rpx; height: 100rpx">
<wd-img
:width="'100%'"
:height="'100%'"
round
src="https://img11.360buyimg.com/imagetools/jfs/t1/143248/37/5695/265818/5f3a8546E98d998a4/745897ca9c9e474b.jpg"
alt="joy"
/>
<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=" ">
<view class="relative" style="height: 280rpx">
<wd-img radius="20rpx" :width="'100%'" :height="'100%'" :src="item.mer_banner" />
</view>
<view class="ps-2 flex-content-column">
<view class="ps-2">
<view class="p-1 font-size-4 font-bold color-black">
泸州市江阳区分水岭董允坝村
<wd-rate :modelValue="5" readonly />
</view>
<view class="p-1">
<wd-tag custom-class="space me-2" mark>景区服务</wd-tag>
<wd-tag custom-class="space me-2" type="primary" mark>景区服务</wd-tag>
<wd-tag custom-class="space me-2" type="danger" mark>标签</wd-tag>
<wd-tag custom-class="space me-2" type="warning" mark>标签</wd-tag>
<wd-tag custom-class="space me-2" type="success" mark>标签</wd-tag>
</view>
<view class="p-1 font-size-3">
<wd-icon name="location" size="24rpx" />
泸州市江阳区分水岭镇董允坝村1队2号
<view class="content px-2" style="align-items:">
<view style="width: 100rpx; height: 100rpx">
<wd-img :width="'100%'" :height="'100%'" round :src="item.mer_avatar" alt="joy" />
</view>
<view class="p-2 flex-content-column">
<view class="px-2">
<view class="p-1 font-size-4 font-bold color-black">
{{ item.mer_name }}
<wd-tag v-if="item.is_trader" custom-class="space me-2" type="danger" mark>
自营
</wd-tag>
</view>
<view class="p-1 font-size-3 color-gary">
<!-- <wd-icon name="location" size="24rpx" /> -->
{{
item.care_count < 10000
? item.care_count
: (item.care_count / 10000).toFixed(2) + '万'
}}人关注
</view>
</view>
</view>
</view>
</view>
</wd-card>
</wd-card>
</view>
</view>
<view class="p-1" />
</view>
</template>
<!-- getMerchantAPI -->
<script lang="ts" setup>
const currentTab = ref<number>(0)
function handleChange(e) {
console.log(e)
// currentTab.value = e.id
}
function handleBack() {
uni.navigateBack({})
}
<script lang="ts">
import { defineComponent } from 'vue'
import { getMerchantAPI } from '@/service/crmeb/product.ts'
import { getUrl, getWebUrl, getShopWebUrl, hasLogin } from '@/utils'
export default defineComponent({
data() {
return {
currentTab: 0,
param: {
limit: 100,
page: 1,
keyword: '',
},
merchant: {},
function handleBackHome() {
uni.reLaunch({ url: '/pages/index/index' })
}
function more() {
console.log('查看更多')
uni.navigateTo({
url: '/pages/index/list',
})
}
// 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
},
// toLogin() {
// uni.navigateTo({
// url: '/pages/login/login',
// })
// },
// uni.navigateTo({
// url: `/pages/store/home/index?id=${id}`
// })
// url: '/pages/columnGoods/goods_list/index?id=38&title=',
more(item) {
this.islogin = hasLogin()
if (this.islogin === false) {
uni.navigateTo({
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>

View File

@ -51,7 +51,7 @@
<view class="p-2">
<wd-card>
<wd-grid :gutter="2" :column="4">
<wd-grid :gutter="2" :column="5">
<view
@click="more(item)"
v-for="item in [
@ -70,8 +70,8 @@
color: 'blue',
},
{
name: '滞销产品',
url: '/pages/columnGoods/goods_list/index?id=30&title=滞销产品',
name: '助农产品',
url: '/pages/columnGoods/goods_list/index?id=30&title=助农产品',
icon: '/static/icons/home3.png',
type: 2,
color: 'orange',
@ -83,15 +83,15 @@
type: 2,
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>
<view class="p-2">
<wd-img radius="20rpx" :width="'60rpx'" :height="'60rpx'" :src="item.icon" />
@ -527,7 +527,8 @@ export default defineComponent({
})
},
more(item) {
const islogin = hasLogin()
// const islogin = hasLogin()
const islogin = true
if (islogin === false) {
uni.navigateTo({
url: '/pages/login/login',

View File

@ -83,7 +83,7 @@
},
{
name: '上传商品',
name: '委托销售',
url: '/pages/my/uploadProduct',
type: 1,
icon: '/static/icons/my5.png',

View File

@ -1,6 +1,6 @@
<route lang="json5">
{
style: { navigationBarTitleText: '上传商品' },
style: { navigationBarTitleText: '委托销售' },
}
</route>

View File

@ -86,6 +86,11 @@ export function getUplaodImageAPI(data: any) {
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