Browse Source

企业帮

master
岳鹏龙 8 months ago
parent
commit
51266896e7
  1. 34
      src/api/shop.ts
  2. 16
      src/components/zh-scroll/zh-scroll.vue
  3. 14
      src/pages.json
  4. 4
      src/pages/index/ChatDialog.vue
  5. 5
      src/pages/index/index.vue
  6. 57
      src/pages/index/shoppage/financialAssistance.vue
  7. 11
      src/pages/index/shoppage/interactiveZone.vue
  8. 54
      src/pages/index/shoppage/mediaHelp.vue
  9. 168
      src/pages/index/shoppage/qyDetail.vue
  10. 371
      src/pages/index/shoppage/qyHelp.vue
  11. 147
      src/pages/index/shoppage/qyhelpDetail.vue
  12. 49
      src/pages/index/shoppage/shopHelp.vue
  13. BIN
      src/static/img/hdzq.png

34
src/api/shop.ts

@ -155,3 +155,37 @@ export function ReportDetail(id: any) {
}) })
} }
//企业帮分类列表
export function enterpriseCategory() {
return request.http({
url: '/api/huiqitong/enterprise/category',
method: 'GET'
})
}
//企业帮内容列表
export function enterpriseList(data:any) {
return request.http({
url: '/api/huiqitong/enterprise/list',
method: 'GET',
data
})
}
//企业帮内容详情
export function enterpriseInfo(data:any) {
return request.http({
url: '/api/huiqitong/enterprise/info',
method: 'GET',
data
})
}
//合同文库下载数增加
export function contractDownload(id:any) {
return request.http({
url: '/api/huiqitong/enterprise/contract/download/'+id,
method: 'GET',
})
}

16
src/components/zh-scroll/zh-scroll.vue

@ -11,12 +11,12 @@
@tap="handleMenuTap(item.id)" @tap="handleMenuTap(item.id)"
> >
<view class="changeicon" v-if="item.id == curCateId"></view> <view class="changeicon" v-if="item.id == curCateId"></view>
<text class="menutitle">{{ item.name }}</text> <text class="menutitle">{{ item.name||item.title }}</text>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<scroll-view class="goods" scroll-with-animation scroll-y :scroll-top="cateScrollTop" @scroll="handleGoodsScroll"> <scroll-view class="goods" scroll-with-animation scroll-y :scroll-top="cateScrollTop" @scroll="handleGoodsScroll">
<view class="wrapper"> <view class="wrapper" v-if="mote === 'one'">
<view class="list"> <view class="list">
<!-- category begin --> <!-- category begin -->
<view class="category" v-for="(item, index) in goods" :key="index" :id="`cate-${item.id}`"> <view class="category" v-for="(item, index) in goods" :key="index" :id="`cate-${item.id}`">
@ -45,6 +45,9 @@
<!-- category end --> <!-- category end -->
</view> </view>
</view> </view>
<view class="" v-if="mote === 'two'">
<slot></slot>
</view>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
@ -53,9 +56,12 @@
import { ref, nextTick, getCurrentInstance, watch } from 'vue' import { ref, nextTick, getCurrentInstance, watch } from 'vue'
import { ICateItem } from './interface' import { ICateItem } from './interface'
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/') const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/')
const emit = defineEmits(['tabId'])
const props = defineProps<{ const props = defineProps<{
scrollList: ICateItem[] scrollList: ICateItem[]
searchVal: string searchVal: string,
mote: string
}>() }>()
const instance = getCurrentInstance() const instance = getCurrentInstance()
const menuScrollIntoView = ref('') const menuScrollIntoView = ref('')
@ -87,7 +93,7 @@ function handleMenuTap(id: number) {
if (!sizeCalcState.value) { if (!sizeCalcState.value) {
calcSize() calcSize()
} }
emit('tabId',id)
curCateId.value = id curCateId.value = id
nextTick(() => { nextTick(() => {
@ -144,7 +150,7 @@ function calcSize() {
}, },
(data: any) => { (data: any) => {
item.top = h item.top = h
h += data.height h += data?.height
item.bottom = h item.bottom = h
} }
).exec() ).exec()

14
src/pages.json

@ -144,6 +144,20 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"path": "pages/index/shoppage/qyDetail",
"style": {
"navigationBarTitleText": "企业帮",
"navigationStyle": "custom"
}
},
{
"path": "pages/index/shoppage/qyhelpDetail",
"style": {
"navigationBarTitleText": "企业帮",
"navigationStyle": "custom"
}
},
// //
{ {
"path": "pages/learningCenter/detail", "path": "pages/learningCenter/detail",

4
src/pages/index/ChatDialog.vue

@ -9,9 +9,9 @@
mode="widthFix" mode="widthFix"
></image> ></image>
<view style="display: flex; align-items: center"> <view style="display: flex; align-items: center">
<view style="font-size: 50rpx; color: #007fff" @click="close">×</view> <view style="font-size: 70rpx; color: #007fff" @click="close">×</view>
<image <image
style="width: 40rpx; height: 40rpx; margin-left: 40rpx" style="width: 40rpx; height: 40rpx; margin-left: 40rpx;margin-top: 8rpx;"
@click="dxclick" @click="dxclick"
:src="isdx ? '/static/img/sx.png' : '/static/img/fd.png'" :src="isdx ? '/static/img/sx.png' : '/static/img/fd.png'"
mode="" mode=""

5
src/pages/index/index.vue

@ -775,7 +775,10 @@ onLoad(async () => {
left: -137rpx; left: -137rpx;
background-image: url(@/static/img/aiback.png); background-image: url(@/static/img/aiback.png);
background-size: 100% 100%; background-size: 100% 100%;
padding: 20rpx 10rpx; padding: 20rpx;
display: flex;
align-items: center;
justify-content: center;
.tit { .tit {
white-space: nowrap; white-space: nowrap;
color: #2563eb; color: #2563eb;

57
src/pages/index/shoppage/financialAssistance.vue

@ -1,32 +1,22 @@
<template> <template>
<u-navbar title="金融帮" placeholder="true" bg-color="#F1F3F9" :auto-back="true"></u-navbar> <u-navbar title="金融帮" placeholder="true" bg-color="#F1F3F9" :auto-back="true"></u-navbar>
<view class="container"> <view class="container">
<u-search <u-search @search="search" @clickIcon="clickIcon" @clear="clear" shape="square" placeholder="请输入搜索内容"
@search="search" placeholder-color="#A9D4FF" v-model="keyword" search-icon="/static/img/search.png" search-icon-size="14"
@clickIcon="clickIcon" :show-action="false" height="40" margin="40rpx 24rpx 24rpx 24rpx" bg-color="#FFFFFF"></u-search>
@clear="clear"
shape="square"
placeholder="请输入搜索内容"
placeholder-color="#A9D4FF"
v-model="keyword"
search-icon="/static/img/search.png"
search-icon-size="14"
:show-action="false"
height="40"
margin="40rpx 24rpx 24rpx 24rpx"
bg-color="#FFFFFF"
></u-search>
<view class="main"> <view class="main">
<scroll-view scroll-y="auto" class="hyonne" @scrolltolower="onloadmore"> <scroll-view scroll-y="auto" class="hyonne" @scrolltolower="onloadmore">
<view class="ztone" v-for="(item, index) in ztList" :key="index" @click="godetail(item.id)"> <view class="ztone" v-for="(item, index) in ztList" :key="index" @click="godetail(item.id)">
<image style="width: 150rpx; height: 150rpx; border-radius: 28rpx; flex: 1" :src="baseurl + item.index_pic" mode=""></image> <image style="width: 150rpx; height: 150rpx; border-radius: 28rpx; flex: 1"
:src="baseurl + item.index_pic" mode=""></image>
<view class="rightpart"> <view class="rightpart">
<view class="splace"> <view class="splace">
{{ item.bank }} {{ item.bank }}
</view> </view>
<view class="titlepart"> <view class="titlepart">
<text class="title">{{ item.name }}</text> <text class="title">{{ item.name }}</text>
<image style="width: 32rpx; height: 44rpx" src="@/static/img/Icon.png" mode="aspectFill"></image> <image style="width: 32rpx; height: 44rpx" src="@/static/img/Icon.png" mode="aspectFill">
</image>
</view> </view>
<view class="ms"> <view class="ms">
{{ item.branch }} {{ item.branch }}
@ -37,13 +27,22 @@
</view> </view>
</view> </view>
<liuDragButton :width-px="'145rpx'"> <liuDragButton :width-px="'145rpx'">
<image class="hdzq" src="@/static/img/hdzq.png" mode="" @click="gohdzq"></image> <view class="boxhd" @click="gohdzq">
<view class="txtt">
互动专区
</view>
<image class="hdzq" src="@/static/img/hdzq.png" mode="aspectFill"></image>
</view>
</liuDragButton> </liuDragButton>
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import {
import { financeList } from '@/api/shop' ref
} from 'vue'
import {
financeList
} from '@/api/shop'
import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue' import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue'
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/') const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/')
@ -81,7 +80,7 @@ const godetail = (id) => {
const gohdzq = () => { const gohdzq = () => {
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/shoppage/interactiveZone' url: '/pages/index/shoppage/interactiveZone?tabid='+1
}) })
} }
@ -119,10 +118,12 @@ onShow(async () => {
height: calc(100vh - 178rpx); height: calc(100vh - 178rpx);
width: 100%; width: 100%;
overflow-y: hidden; overflow-y: hidden;
.hyonne { .hyonne {
max-height: calc(100vh - 350rpx); max-height: calc(100vh - 350rpx);
overflow-y: auto; overflow-y: auto;
} }
.main { .main {
margin-top: 10rpx; margin-top: 10rpx;
width: 100%; width: 100%;
@ -192,6 +193,19 @@ onShow(async () => {
} }
} }
.boxhd {
.txtt {
margin-top: 42rpx;
position: absolute;
z-index: 1;
white-space: nowrap;
margin-left: -52rpx;
font-family: Source Han Sans;
font-size: 28rpx;
font-weight: 350;
color: #FFFFFF;
}
.hdzq { .hdzq {
width: 212rpx; width: 212rpx;
height: 86rpx; height: 86rpx;
@ -200,4 +214,5 @@ onShow(async () => {
top: 70%; top: 70%;
margin-right: -14rpx; margin-right: -14rpx;
} }
}
</style> </style>

11
src/pages/index/shoppage/interactiveZone.vue

@ -1,7 +1,7 @@
<template> <template>
<u-navbar :title="'互动专区'" placeholder="true" bg-color="#F1F3F9" :auto-back="true" /> <u-navbar :title="'互动专区'" placeholder="true" bg-color="#F1F3F9" :auto-back="true" />
<view class="container"> <view class="container">
<u-tabs :list="list1" @click="click"></u-tabs> <u-tabs :list="list1" @click="click" :current="current"></u-tabs>
<scroll-view class="cardbox" scroll-y="true" @scrolltolower="scrolltolower"> <scroll-view class="cardbox" scroll-y="true" @scrolltolower="scrolltolower">
<view class="dhone" v-for="(item, index) in datalist" :key="index"> <view class="dhone" v-for="(item, index) in datalist" :key="index">
<view class="head"> <view class="head">
@ -65,10 +65,12 @@ const userStore = useUserStore()
const url = ref(import.meta.env.VITE_APP_BASE_URL) const url = ref(import.meta.env.VITE_APP_BASE_URL)
const current = ref(0)
// //
const list1 = reactive([ const list1 = reactive([
{ {
name: '店帮', name: '店帮',
id: 1 id: 1
}, },
{ {
@ -168,6 +170,7 @@ const pldzClick = (postid, like, id) => {
} }
onLoad(async (e) => { onLoad(async (e) => {
current.value = e.tabid
page.value = 1 page.value = 1
datalist.value = [] datalist.value = []
await getpostsList() await getpostsList()
@ -178,12 +181,12 @@ onLoad(async (e) => {
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
background-color: #f1f3f9; background-color: #f1f3f9;
height: calc(100vh - 96px); height: calc(100vh - 192rpx);
overflow: hidden; overflow: hidden;
width: 100%; width: 100%;
.cardbox { .cardbox {
max-height: calc(100vh - 150px); max-height: calc(100vh - 300rpx);
.dhone { .dhone {
margin-top: 30rpx; margin-top: 30rpx;

54
src/pages/index/shoppage/mediaHelp.vue

@ -1,20 +1,9 @@
<template> <template>
<view class="container"> <view class="container">
<u-navbar title="媒体帮" placeholder="true" bg-color="#F1F3F9" :auto-back="true"></u-navbar> <u-navbar title="媒体帮" placeholder="true" bg-color="#F1F3F9" :auto-back="true"></u-navbar>
<u-search <u-search @search="search" @clickIcon="clickIcon" @clear="clear" shape="square" placeholder="请输入搜索内容"
@search="search" placeholder-color="#a4c7ff" v-model="keyword" search-icon="/static/img/search.png" search-icon-size="14"
@clickIcon="clickIcon" :show-action="false" height="40" margin="40rpx 24rpx 24rpx 24rpx"></u-search>
@clear="clear"
shape="square"
placeholder="请输入搜索内容"
placeholder-color="#a4c7ff"
v-model="keyword"
search-icon="/static/img/search.png"
search-icon-size="14"
:show-action="false"
height="40"
margin="40rpx 24rpx 24rpx 24rpx"
></u-search>
<scroll-view scroll-y="auto" class="mtlist" @scrolltolower="onloadmore"> <scroll-view scroll-y="auto" class="mtlist" @scrolltolower="onloadmore">
<view class="mtone" v-for="(item, index) in mtList" :key="index" @click="gomtbdetail(item.id)"> <view class="mtone" v-for="(item, index) in mtList" :key="index" @click="gomtbdetail(item.id)">
<view class="headpart"> <view class="headpart">
@ -26,7 +15,8 @@
</view> </view>
</view> </view>
</view> </view>
<image style="width: 100%; height: 400rpx; margin-top: 30rpx" :src="baseurl + item.publicize_pic" mode=""></image> <image style="width: 100%; height: 400rpx; margin-top: 30rpx" :src="baseurl + item.publicize_pic"
mode=""></image>
<view class="bottompart"> <view class="bottompart">
<view class="part"> <view class="part">
<image style="width: 22rpx; height: 24rpx" src="@/static/img/dh.png" mode=""></image> <image style="width: 22rpx; height: 24rpx" src="@/static/img/dh.png" mode=""></image>
@ -44,13 +34,22 @@
</view> </view>
</view> </view>
<liuDragButton :width-px="'145rpx'"> <liuDragButton :width-px="'145rpx'">
<image class="hdzq" src="@/static/img/hdzq.png" mode="" @click="gohdzq"></image> <view class="boxhd" @click="gohdzq">
<view class="txtt">
互动专区
</view>
<image class="hdzq" src="@/static/img/hdzq.png" mode="aspectFill"></image>
</view>
</liuDragButton> </liuDragButton>
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import {
import { mediumList } from '@/api/shop' ref
} from 'vue'
import {
mediumList
} from '@/api/shop'
import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue' import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue'
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/') const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/')
@ -80,7 +79,7 @@ const clear = async () => {
const gohdzq = () => { const gohdzq = () => {
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/shoppage/interactiveZone' url: '/pages/index/shoppage/interactiveZone?tabid='+2
}) })
} }
@ -131,6 +130,7 @@ onShow(async () => {
background: linear-gradient(0deg, #f1f3f9 72%, rgba(62, 146, 249, 0.2) 88%); background: linear-gradient(0deg, #f1f3f9 72%, rgba(62, 146, 249, 0.2) 88%);
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
.mtlist { .mtlist {
margin-top: 8rpx; margin-top: 8rpx;
padding: 0 24rpx; padding: 0 24rpx;
@ -158,6 +158,7 @@ onShow(async () => {
margin-left: 16rpx; margin-left: 16rpx;
display: grid; display: grid;
justify-items: baseline; justify-items: baseline;
.name { .name {
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 32rpx; font-size: 32rpx;
@ -169,6 +170,7 @@ onShow(async () => {
letter-spacing: normal; letter-spacing: normal;
color: #0c092a; color: #0c092a;
} }
.tab { .tab {
margin-top: 8rpx; margin-top: 8rpx;
padding: 6rpx 20rpx; padding: 6rpx 20rpx;
@ -212,6 +214,19 @@ onShow(async () => {
} }
} }
.boxhd {
.txtt {
margin-top: 42rpx;
position: absolute;
z-index: 1;
white-space: nowrap;
margin-left: -52rpx;
font-family: Source Han Sans;
font-size: 28rpx;
font-weight: 350;
color: #FFFFFF;
}
.hdzq { .hdzq {
width: 212rpx; width: 212rpx;
height: 86rpx; height: 86rpx;
@ -220,6 +235,7 @@ onShow(async () => {
top: 70%; top: 70%;
margin-right: -14rpx; margin-right: -14rpx;
} }
}
.fbxxbutton { .fbxxbutton {
width: 100%; width: 100%;

168
src/pages/index/shoppage/qyDetail.vue

@ -0,0 +1,168 @@
<template>
<u-navbar :title="'企业帮'" placeholder="true" bg-color="#F1F3F9" :auto-back="true" />
<view class="container">
<view class="main">
<view class="head">
<image class="toux" :src="baseurl + userData.head_pic" mode=""></image>
<view style="margin-left: 40rpx;display: grid;justify-items: flex-start;">
<text class="name">{{ userData.name }}</text>
<text class="type">{{ userData.enterprise }}</text>
</view>
</view>
<view class="content">
<view class="titlepart">
<view class="icon"></view>
<text class="title">个人介绍</text>
</view>
<u-parse v-if="userData.introduction" :content="userData.introduction"></u-parse>
<view class="titlepart">
<view class="icon"></view>
<text class="title">联系电话</text>
</view>
<view class="people">
<text class="text">{{ userData.mobile }}</text>
</view>
<view class="titlepart">
<view class="icon"></view>
<text class="title">微信二维码</text>
</view>
<image style="width: 338rpx; height: 338rpx; margin-top: 28rpx; margin-left: 24%"
:src="baseurl + userData.code_pic" mode=""></image>
</view>
</view>
</view>
</template>
<script setup>
import {
onLoad
} from '@dcloudio/uni-app'
import {
ref
} from 'vue'
import {
enterpriseInfo
} from '@/api/shop'
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/')
const userData = ref({})
onLoad(async (param) => {
await enterpriseInfo({id:param.id,category_id:param.current}).then((res) => {
if (res.code === 1) {
userData.value = res.data
}
})
})
</script>
<style scoped lang="scss">
.container {
background-color: #ffffff;
height: calc(100vh - 182rpx);
width: 100%;
.main {
width: 100%;
.head {
padding: 40rpx;
box-sizing: border-box;
width: 100%;
display: flex;
.toux {
width: 180rpx;
height: 180rpx;
box-sizing: border-box;
border-radius: 50%;
box-shadow: 0rpx 8rpx 40rpx 0rpx rgba(101, 101, 101, 0.15);
}
.name {
margin-top: 32rpx;
font-family: Inter;
font-size: 32rpx;
font-weight: 350;
color: #000000;
}
.type {
margin-top: 40rpx;
margin-top: 4rpx;
font-family: Inter;
font-size: 32rpx;
font-weight: 350;
color: #858494;
}
}
.content {
padding: 0 40rpx;
box-sizing: border-box;
padding-bottom: 100rpx;
}
}
.titlepart {
margin-top: 40rpx;
display: flex;
align-items: center;
.icon {
width: 12rpx;
height: 32rpx;
border-radius: 0rpx 32rpx 32rpx 0rpx;
/* 蓝色渐变 */
background: linear-gradient(0deg, #007fff 0%, #99ccff 100%);
}
.title {
margin-left: 18rpx;
font-family: Source Han Sans;
font-size: 30rpx;
font-weight: 350;
line-height: 32rpx;
text-align: justify;
/* 浏览器可能不支持 */
display: flex;
align-items: center;
letter-spacing: normal;
color: #0072ff;
}
}
.message {
margin-top: 36rpx;
font-family: Source Han Sans;
font-size: 32rpx;
font-weight: 300;
line-height: 60rpx;
text-align: justify;
/* 浏览器可能不支持 */
display: flex;
align-items: center;
letter-spacing: normal;
color: #3d3d3d;
}
.people {
margin-top: 28rpx;
display: flex;
.text {
font-family: Source Han Sans;
font-size: 32rpx;
font-weight: 300;
line-height: 60rpx;
text-align: justify;
/* 浏览器可能不支持 */
display: flex;
align-items: center;
letter-spacing: normal;
color: #3d3d3d;
}
}
}
</style>

371
src/pages/index/shoppage/qyHelp.vue

@ -1,57 +1,212 @@
<template> <template>
<u-navbar title="企业帮" placeholder="true" bg-color="#F1F3F9" :auto-back="true"></u-navbar> <u-navbar title="企业帮" placeholder="true" bg-color="#F1F3F9" :auto-back="true"></u-navbar>
<view class="container"> <view class="container">
<u-search <u-search @search="search" @clickIcon="clickIcon" shape="square" placeholder="请输入搜索内容"
@search="search" placeholder-color="#a4c7ff" v-model="keyword" search-icon="/static/img/search.png" search-icon-size="14"
@clickIcon="clickIcon" :show-action="false" height="40" margin="40rpx 24rpx 24rpx 24rpx"></u-search>
shape="square" <zh-scroll ref="zhscrollRel" :scroll-list="goods" :mote="'two'" :search-val="keyword" @tabId="lefttabId">
placeholder="请输入搜索内容" <scroll-view scroll-y class="reightpp" @scrolltolower="onloadmore" v-if="current === 1">
placeholder-color="#a4c7ff" <view class="ztone" v-for="(item, index) in rightData" :key="index" @click="godetail(item.id)">
v-model="keyword" <image style="width: 80rpx; height: 80rpx; flex: 1;border-radius: 16rpx;"
search-icon="/static/img/search.png" :src="baseurl+item.head_pic" mode="widthFix"></image>
search-icon-size="14" <view class="rightpart">
:show-action="false" <view class="splace">
height="40" {{ item.name }}
margin="40rpx 24rpx 24rpx 24rpx" </view>
></u-search> <text class="title">{{ item.enterprise }}</text>
<zh-scroll ref="zhscrollRel" :scroll-list="goods" :search-val="keyword"></zh-scroll> </view>
<image style="width: 32rpx; height: 44rpx" src="@/static/img/Icon.png" mode="aspectFill"></image>
</view>
</scroll-view>
<scroll-view scroll-y class="reightpp" v-else-if="current === 2">
<view class="wkbox">
<view class="wkone" v-for="(item, index) in rightData" :key="index">
<view class="tittt">
{{item.title}}
</view>
<view class="xzs">
下载人数
<view class="num">
{{item.download_num}}
</view>
</view>
<view class="ljxz" @click="downwk(item.id,baseurl+item.filepath)">
立即下载
</view>
</view>
</view>
</scroll-view>
<scroll-view scroll-y class="reightpp" v-else>
<view class="list">
<!-- category begin -->
<view class="category">
<view class="items">
<!-- 商品 begin -->
<view class="good" v-for="(good, key) in rightData" :key="key" @click="goqydetail(good.id)">
<slot name="custom">
<!-- <image :src="good.images" class="image"></image> -->
<!-- <view class="title"> -->
<!-- <image :src="baseurl+good.icon_path" class="icon"></image> -->
<text class="name">{{ good.title }}</text>
<!-- </view> -->
<image class="lefticon" src="@/static/img/icon2.png" mode=""></image>
<!-- <view class="right"> -->
<!-- <text class="tips">{{ good.content }}</text> -->
<!-- </view> -->
</slot>
</view>
<!-- 商品 end -->
</view>
</view>
<!-- category end -->
</view>
</scroll-view>
</zh-scroll>
</view> </view>
<liuDragButton :width-px="'145rpx'"> <liuDragButton :width-px="'145rpx'">
<image class="hdzq" src="@/static/img/hdzq.png" mode="aspectFill" @click="gohdzq"></image> <view class="boxhd" @click="gohdzq">
<view class="txtt">
互动专区
</view>
<image class="hdzq" src="@/static/img/hdzq.png" mode="aspectFill"></image>
</view>
</liuDragButton> </liuDragButton>
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import {
ref
} from 'vue'
import zhScroll from '@/components/zh-scroll/zh-scroll.vue' import zhScroll from '@/components/zh-scroll/zh-scroll.vue'
import { storeList } from '@/api/shop' import {
enterpriseCategory,
enterpriseList,
contractDownload
} from '@/api/shop'
import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue' import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue'
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/')
const zhscrollRel = ref(null) const zhscrollRel = ref(null)
const current = ref(1)
const page = ref(1)
const limit = ref(8)
// //
const keyword = ref('') const keyword = ref('')
const goods = ref([]) const goods = ref([])
const rightData = ref([])
const search = (val) => { const search = (val) => {
zhscrollRel.value.searchleMenuTap(keyword.value) page.value = 1
limit.value = 8
getRightdata()
} }
const clickIcon = () => { const clickIcon = () => {
zhscrollRel.value.searchleMenuTap(keyword.value) page.value = 1
limit.value = 8
getRightdata()
}
const onloadmore = async () => {
page.value++
let params = {
category_id: current.value,
title: keyword.value,
page: page.value,
limit: limit.value
}
await enterpriseList(params).then((res) => {
rightData.value = [...rightData.value, ...res.data.data]
})
} }
const gohdzq = () => { const gohdzq = () => {
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/shoppage/interactiveZone' url: '/pages/index/shoppage/interactiveZone?tabid=' + 3
})
}
const lefttabId = (id) => {
page.value = 1
limit.value = 8
current.value = id
getRightdata()
}
const getRightdata = async () => {
let param = {
category_id: current.value,
title: keyword.value,
page: page.value,
limit: limit.value
}
await enterpriseList(param).then((res) => {
rightData.value = res.data.data
})
}
const godetail = (id) => {
uni.navigateTo({
url: '/pages/index/shoppage/qyDetail?id=' + id + '&current=' + current.value
})
}
const goqydetail = (id) => {
uni.navigateTo({
url: '/pages/index/shoppage/qyhelpDetail?id=' + id + '&current=' + current.value
}) })
} }
onShow(async () => { const openDocument = (filePath) => {
await storeList({}).then((res) => { const allowedTypes = ['pdf', 'doc', 'xls', 'ppt', 'docx', 'xlsx', 'pptx'];
const fileExt = filePath.split('.').pop().toLowerCase();
if (!allowedTypes.includes(fileExt)) {
return uni.showToast({ title: '不支持的文件格式', icon: 'none' });
}
uni.openDocument({
filePath,
showMenu: true, //
success: () => {
// progressVisible.value = false;
}
});
};
const downwk = (id,url) => {
uni.showLoading({ title: '下载中...' });
uni.downloadFile({
url,
success: (res) => {
if (res.statusCode === 200) {
//
uni.saveFile({
tempFilePath: res.tempFilePath,
success: (saveRes) => {
uni.hideLoading();
uni.showToast({ title: '下载成功', icon: 'success' });
openDocument(saveRes.savedFilePath);
contractDownload(id)
}
});
}
},
fail: (err) => {
uni.hideLoading();
uni.showToast({ title: '下载失败', icon: 'none' });
}
});
}
onLoad(async () => {
await enterpriseCategory({}).then((res) => {
goods.value = res.data goods.value = res.data
}) })
await getRightdata()
}) })
</script> </script>
@ -66,6 +221,19 @@ onShow(async () => {
} }
} }
.boxhd {
.txtt {
margin-top: 42rpx;
position: absolute;
z-index: 1;
white-space: nowrap;
margin-left: -52rpx;
font-family: Source Han Sans;
font-size: 28rpx;
font-weight: 350;
color: #FFFFFF;
}
.hdzq { .hdzq {
width: 212rpx; width: 212rpx;
height: 86rpx; height: 86rpx;
@ -74,4 +242,163 @@ onShow(async () => {
top: 70%; top: 70%;
margin-right: -14rpx; margin-right: -14rpx;
} }
}
.reightpp {
width: 100%;
padding: 30rpx;
box-sizing: border-box;
gap: 20rpx;
.ztone {
display: flex;
align-items: center;
width: 100%;
padding: 20rpx;
border-radius: 8rpx;
background: #ffffff;
box-sizing: border-box;
border: 2rpx solid #F1F3F9;
.rightpart {
width: 100%;
margin-left: 20rpx;
flex: 3;
display: grid;
align-content: space-between;
.splace {
font-family: Source Han Sans;
font-size: 20rpx;
font-weight: 600;
color: #0C092A;
}
.title {
margin-top: 20rpx;
font-family: Source Han Sans;
font-size: 20rpx;
color: #666666;
}
}
}
.wkbox {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20rpx;
width: 100%;
.wkone {
background: #F1F3F9;
border-radius: 20rpx;
padding: 32rpx 24rpx 20rpx 24rpx;
box-sizing: border-box;
.tittt {
font-family: Source Han Sans;
font-size: 28rpx;
color: #444444;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
.xzs {
margin-top: 70rpx;
font-size: 19.4rpx;
color: #B0B0B5;
display: flex;
align-items: center;
.num {
margin-left: 6rpx;
font-size: 19.4rpx;
color: #2563EB
}
}
.ljxz {
margin-top: 24rpx;
padding: 8rpx 40rpx;
box-sizing: border-box;
border-radius: 40rpx;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(90deg, #007FFF 0%, #99CCFF 100%);
font-size: 20rpx;
color: #FFFFFF;
}
}
}
.list {
width: 100%;
font-size: 28rpx;
padding-bottom: 130rpx;
.category {
width: 100%;
.title {
padding: 10rpx 0;
display: flex;
align-items: center;
color: #0c092a;
.icon {
width: 38rpx;
height: 38rpx;
}
.fristtitle {
margin-left: 20rpx;
font-family: Source Han Sans;
font-size: 28rpx;
font-weight: 530;
line-height: 48rpx;
display: flex;
align-items: center;
letter-spacing: normal;
color: #0c092a;
}
}
}
.items {
display: flex;
flex-direction: column;
padding-bottom: -30rpx;
:deep(.good) {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 30rpx;
padding-left: 40rpx;
.name {
max-width: 100%;
margin-left: 10rpx;
font-family: Source Han Sans;
font-size: 28rpx;
font-weight: 300;
color: #606266;
overflow: hidden; /* 隐藏溢出内容 */
white-space: nowrap; /* 禁止换行 */
text-overflow: ellipsis; /* 显示省略号 */
}
.icon {
width: 38rpx;
height: 38rpx;
}
.lefticon {
width: 16rpx;
height: 28rpx;
margin-right: 6rpx;
}
}
}
}
}
</style> </style>

147
src/pages/index/shoppage/qyhelpDetail.vue

@ -0,0 +1,147 @@
<template>
<u-navbar :title="'开店帮'" placeholder="true" bg-color="#F1F3F9" :auto-back="true" />
<view class="container">
<text class="title">{{ xdbData.title }}</text>
<text class="fbr">发布人{{ xdbData.publisher }}</text>
<view class="readtime">
<text class="time">{{ xdbData.create_time }}</text>
<view class="readnum">
阅读量
<text class="num">{{ xdbData.count }}</text>
</view>
</view>
<view class="nrxq">
<view class="icon"></view>
<text class="nrtitle">内容详情</text>
</view>
<u-parse :content="xdbData.content"></u-parse>
</view>
</template>
<script setup>
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
import { enterpriseInfo } from '@/api/shop'
const xdbData = ref({})
onLoad(async (param) => {
await enterpriseInfo({id:param.id,category_id:param.current}).then((res) => {
if (res.code === 1) {
xdbData.value = res.data
}
})
})
</script>
<style scoped lang="scss">
.container {
background-color: #ffffff;
height: calc(100vh - 182rpx);
width: 100%;
padding: 60rpx 40rpx 0 40rpx;
box-sizing: border-box;
.title {
font-family: Source Han Sans;
font-size: 36rpx;
font-weight: normal;
line-height: 48rpx;
display: flex;
align-items: center;
letter-spacing: normal;
color: #0c092a;
}
.fbr {
margin-top: 28rpx;
font-family: Source Han Sans;
font-size: 28rpx;
font-weight: 350;
line-height: 48rpx;
display: flex;
align-items: center;
letter-spacing: normal;
color: #858494;
}
.readtime {
margin-top: 28rpx;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.time {
font-family: Source Han Sans;
font-size: 28rpx;
font-weight: 350;
line-height: 48rpx;
display: flex;
align-items: center;
letter-spacing: normal;
color: #858494;
}
.readnum {
display: flex;
font-family: Source Han Sans;
font-size: 28rpx;
font-weight: 350;
line-height: 48rpx;
text-align: right;
display: flex;
align-items: center;
letter-spacing: normal;
/* 阅读量: */
color: #858494;
.num {
font-family: Source Han Sans;
font-size: 28rpx;
font-weight: 350;
line-height: 48rpx;
text-align: right;
display: flex;
align-items: center;
letter-spacing: normal;
/* 2 */
color: #007fff;
}
}
}
.nrxq {
display: flex;
align-items: center;
margin-top: 60rpx;
margin-bottom: 40rpx;
.icon {
width: 12rpx;
height: 32rpx;
border-radius: 0rpx 32rpx 32rpx 0rpx;
/* 蓝色渐变 */
background: linear-gradient(0deg, #007fff 0%, #99ccff 100%);
}
.nrtitle {
margin-left: 20rpx;
font-family: Source Han Sans;
font-size: 30rpx;
font-weight: 350;
line-height: 32rpx;
text-align: justify;
/* 浏览器可能不支持 */
display: flex;
align-items: center;
letter-spacing: normal;
color: #0072ff;
}
}
.message {
margin-top: 40rpx;
}
}
</style>

49
src/pages/index/shoppage/shopHelp.vue

@ -1,30 +1,29 @@
<template> <template>
<u-navbar title="开店帮" placeholder="true" bg-color="#F1F3F9" :auto-back="true"></u-navbar> <u-navbar title="开店帮" placeholder="true" bg-color="#F1F3F9" :auto-back="true"></u-navbar>
<view class="container"> <view class="container">
<u-search <u-search @search="search" @clickIcon="clickIcon" shape="square" placeholder="请输入搜索内容"
@search="search" placeholder-color="#a4c7ff" v-model="keyword" search-icon="/static/img/search.png" search-icon-size="14"
@clickIcon="clickIcon" :show-action="false" height="40" margin="40rpx 24rpx 24rpx 24rpx"></u-search>
shape="square" <zh-scroll ref="zhscrollRel" :scroll-list="goods" :mote="'one'" :search-val="keyword"></zh-scroll>
placeholder="请输入搜索内容"
placeholder-color="#a4c7ff"
v-model="keyword"
search-icon="/static/img/search.png"
search-icon-size="14"
:show-action="false"
height="40"
margin="40rpx 24rpx 24rpx 24rpx"
></u-search>
<zh-scroll ref="zhscrollRel" :scroll-list="goods" :search-val="keyword"></zh-scroll>
</view> </view>
<liuDragButton :width-px="'145rpx'"> <liuDragButton :width-px="'145rpx'">
<image class="hdzq" src="@/static/img/hdzq.png" mode="aspectFill" @click="gohdzq"></image> <view class="boxhd" @click="gohdzq">
<view class="txtt">
互动专区
</view>
<image class="hdzq" src="@/static/img/hdzq.png" mode="aspectFill"></image>
</view>
</liuDragButton> </liuDragButton>
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import {
ref
} from 'vue'
import zhScroll from '@/components/zh-scroll/zh-scroll.vue' import zhScroll from '@/components/zh-scroll/zh-scroll.vue'
import { storeList } from '@/api/shop' import {
storeList
} from '@/api/shop'
import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue' import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue'
const zhscrollRel = ref(null) const zhscrollRel = ref(null)
@ -44,7 +43,7 @@ const clickIcon = () => {
const gohdzq = () => { const gohdzq = () => {
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/shoppage/interactiveZone' url: '/pages/index/shoppage/interactiveZone?tabid='+0
}) })
} }
@ -66,6 +65,19 @@ onShow(async () => {
} }
} }
.boxhd {
.txtt {
margin-top: 42rpx;
position: absolute;
z-index: 1;
white-space: nowrap;
margin-left: -52rpx;
font-family: Source Han Sans;
font-size: 28rpx;
font-weight: 350;
color: #FFFFFF;
}
.hdzq { .hdzq {
width: 212rpx; width: 212rpx;
height: 86rpx; height: 86rpx;
@ -74,4 +86,5 @@ onShow(async () => {
top: 70%; top: 70%;
margin-right: -14rpx; margin-right: -14rpx;
} }
}
</style> </style>

BIN
src/static/img/hdzq.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Loading…
Cancel
Save