Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
groupPurchase-miniapp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭佳妮(贵阳日报)
groupPurchase-miniapp
Commits
c038ddc7
Commit
c038ddc7
authored
Aug 20, 2024
by
彭佳妮(贵阳日报)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.platform.xinhuaapp.com/pengjiani/groupPurchase-miniapp
parents
f7898e5e
7626514e
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
87 additions
and
44 deletions
+87
-44
.env.development
.env.development
+2
-2
ShopCard.vue
src/Components/index/ShopCard.vue
+3
-0
building.vue
src/pages/assistingAgriculture/index/building.vue
+1
-5
index.vue
src/pages/assistingAgriculture/index/index.vue
+34
-4
presale.vue
src/pages/assistingAgriculture/index/presale.vue
+16
-15
listFood.vue
src/pages/index/listFood.vue
+25
-12
loading.vue
src/pages/index/loading.vue
+4
-4
detail.vue
src/pages/storeEntry/detail.vue
+0
-0
vite.config.ts
vite.config.ts
+2
-2
No files found.
.env.development
View file @
c038ddc7
...
@@ -5,7 +5,7 @@ VITE_APP_ENV = 'development'
...
@@ -5,7 +5,7 @@ VITE_APP_ENV = 'development'
VITE_APP_BASE_URL = '/api'
VITE_APP_BASE_URL = '/api'
# 照片url路径 (开发环境)
# 照片url路径 (开发环境)
#
VITE_APP_IMG_URL = 'http://file.rhhzkj.com:8080'
VITE_APP_IMG_URL = 'http://file.rhhzkj.com:8080'
# 照片url路径(正式环境)
# 照片url路径(正式环境)
VITE_APP_IMG_URL = 'https://file.rddyz.com'
#
VITE_APP_IMG_URL = 'https://file.rddyz.com'
src/Components/index/ShopCard.vue
View file @
c038ddc7
...
@@ -159,6 +159,7 @@ const topFoodDetails = (id) => {
...
@@ -159,6 +159,7 @@ const topFoodDetails = (id) => {
margin-top
:
10rpx
;
margin-top
:
10rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
flex-wrap
:
wrap
;
view
{
view
{
margin-right
:
8rpx
;
margin-right
:
8rpx
;
display
:
inline-block
;
display
:
inline-block
;
...
@@ -168,6 +169,8 @@ const topFoodDetails = (id) => {
...
@@ -168,6 +169,8 @@ const topFoodDetails = (id) => {
font-size
:
18rpx
;
font-size
:
18rpx
;
color
:
#767676
;
color
:
#767676
;
background
:
linear-gradient
(
90deg
,
#fcdbdb
0%
,
rgba
(
255
,
255
,
255
,
0
)
98%
);
background
:
linear-gradient
(
90deg
,
#fcdbdb
0%
,
rgba
(
255
,
255
,
255
,
0
)
98%
);
margin-bottom
:
5rpx
;
flex-shrink
:
0
;
}
}
}
}
}
}
...
...
src/pages/assistingAgriculture/index/building.vue
View file @
c038ddc7
...
@@ -258,7 +258,7 @@ const choice = (index, item) => {
...
@@ -258,7 +258,7 @@ const choice = (index, item) => {
// 跳转预售
// 跳转预售
const
toPresale
=
()
=>
{
const
toPresale
=
()
=>
{
xma
.
navigateTo
({
xma
.
navigateTo
({
url
:
`/pages/assistingAgriculture/index/presale?categoryId=
3273
`
,
url
:
`/pages/assistingAgriculture/index/presale?categoryId=
9
`
,
});
});
};
};
// 处理content
// 处理content
...
@@ -290,10 +290,6 @@ function toCart() {
...
@@ -290,10 +290,6 @@ function toCart() {
page
{
page
{
background
:
#f3f3f3
;
background
:
#f3f3f3
;
}
}
.container
{
position
:
relative
;
left
:
0rpx
;
}
.top
{
.top
{
width
:
750rpx
;
width
:
750rpx
;
height
:
128rpx
;
height
:
128rpx
;
...
...
src/pages/assistingAgriculture/index/index.vue
View file @
c038ddc7
...
@@ -34,9 +34,13 @@
...
@@ -34,9 +34,13 @@
height=
"220"
height=
"220"
imageMode=
"aspectFill"
imageMode=
"aspectFill"
></wd-swiper>
></wd-swiper>
<view
class=
"env"
>
<text
class=
"env-info"
>
贵阳市农业农村局 贵阳日报传媒集团联合打造
</text>
</view>
</view>
</view>
<view
class=
"sort"
>
<view
class=
"sort"
>
<view
style=
"display: flex; flex-direction: row"
>
<view
style=
"display: flex; flex-direction: row"
>
<scroll-view
class=
"box-red"
scroll-x=
"true"
@
scroll=
"scroll"
>
<view
<view
class=
"borderClass"
class=
"borderClass"
@
click=
"toBuilding(item)"
@
click=
"toBuilding(item)"
...
@@ -46,6 +50,7 @@
...
@@ -46,6 +50,7 @@
<image
mode=
"aspectFill"
:src=
"item.icon"
style=
"width: 96rpx; height: 96rpx"
/>
<image
mode=
"aspectFill"
:src=
"item.icon"
style=
"width: 96rpx; height: 96rpx"
/>
<view
class=
"sort-text"
>
{{
item
.
categoryName
}}
</view>
<view
class=
"sort-text"
>
{{
item
.
categoryName
}}
</view>
</view>
</view>
</scroll-view>
</view>
</view>
</view>
</view>
<view
class=
"product-page"
v-for=
"(item, index) in list"
:key=
"index"
>
<view
class=
"product-page"
v-for=
"(item, index) in list"
:key=
"index"
>
...
@@ -109,7 +114,7 @@ const getList = () => {
...
@@ -109,7 +114,7 @@ const getList = () => {
res
.
data
.
forEach
((
item
)
=>
{
res
.
data
.
forEach
((
item
)
=>
{
item
.
icon
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
pic
;
item
.
icon
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
pic
;
});
});
sortList
.
value
=
res
.
data
.
splice
(
0
,
4
)
;
sortList
.
value
=
res
.
data
;
});
});
};
};
// 筑农严选首页-分类预售商品列表
// 筑农严选首页-分类预售商品列表
...
@@ -145,12 +150,12 @@ const onChange = (e) => {
...
@@ -145,12 +150,12 @@ const onChange = (e) => {
// console.log(e);
// console.log(e);
};
};
const
toBuilding
=
(
item
)
=>
{
const
toBuilding
=
(
item
)
=>
{
if
(
item
.
category
Name
===
'筑农严选
'
)
{
if
(
item
.
category
Id
===
'10
'
)
{
// 跳转到筑农严选
// 跳转到筑农严选
xma
.
navigateTo
({
xma
.
navigateTo
({
url
:
`/pages/assistingAgriculture/index/building?categoryId=
${
item
.
categoryId
}
`
,
url
:
`/pages/assistingAgriculture/index/building?categoryId=
${
item
.
categoryId
}
`
,
});
});
}
else
if
(
item
.
category
Name
===
'乡村旅居
'
)
{
}
else
if
(
item
.
category
Id
===
'8
'
)
{
// 跳转到乡村旅居
// 跳转到乡村旅居
xma
.
navigateTo
({
xma
.
navigateTo
({
url
:
`/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=
${
item
.
categoryId
}
`
,
url
:
`/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=
${
item
.
categoryId
}
`
,
...
@@ -205,11 +210,23 @@ page {
...
@@ -205,11 +210,23 @@ page {
height
:
186rpx
;
height
:
186rpx
;
background
:
linear-gradient
(
180deg
,
#82ce8b
-39%
,
#ffffff
36%
);
background
:
linear-gradient
(
180deg
,
#82ce8b
-39%
,
#ffffff
36%
);
}
}
.box-red
{
white-space
:
nowrap
;
width
:
100%
;
::-webkit-scrollbar
{
display
:
none
;
width
:
0
;
height
:
0
;
color
:
transparent
;
}
background-color
:
transparent
;
}
.borderClass
{
.borderClass
{
width
:
96rpx
;
width
:
96rpx
;
height
:
96rpx
;
height
:
96rpx
;
margin
-left
:
75
rpx
;
margin
:
0
36
rpx
;
margin-top
:
22rpx
;
margin-top
:
22rpx
;
display
:
inline-block
;
}
}
.sort-text
{
.sort-text
{
font-size
:
24rpx
;
font-size
:
24rpx
;
...
@@ -315,4 +332,17 @@ page {
...
@@ -315,4 +332,17 @@ page {
color
:
#ffffff
;
color
:
#ffffff
;
}
}
}
}
.env
{
width
:
750rpx
;
height
:
48rpx
;
background
:
linear-gradient
(
94deg
,
#82ce8b
0%
,
rgba
(
255
,
255
,
255
,
0
)
97%
);
position
:
absolute
;
margin-top
:
-60rpx
;
z-index
:
999
;
.env-info
{
font-size
:
28rpx
;
color
:
#ffffff
;
margin-left
:
20rpx
;
}
}
</
style
>
</
style
>
src/pages/assistingAgriculture/index/presale.vue
View file @
c038ddc7
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<view
style=
"display: flex; flex-direction: row"
>
<view
style=
"display: flex; flex-direction: row"
>
<view
<view
class=
"borderClass"
class=
"borderClass"
@
tap=
"chooseTab(index, item.categoryId)"
@
tap=
"choose
B
Tab(index, item.categoryId)"
v-for=
"(item, index) in sortList"
v-for=
"(item, index) in sortList"
:key=
"index"
:key=
"index"
>
>
...
@@ -45,19 +45,19 @@
...
@@ -45,19 +45,19 @@
</view>
</view>
</view>
</view>
<view>
<view>
<
view
>
<
!--
<view>
--
>
<scroll-view
class=
"tabs"
show-scrollbar=
"false"
scroll-x
:scroll-with-animation=
"true"
>
<!--
<scroll-view
class=
"tabs"
show-scrollbar=
"false"
scroll-x
:scroll-with-animation=
"true"
>
--
>
<text
<!--
<text-->
@
tap=
"chooseBTab(index, item.categoryId)"
<!-- @tap="chooseBTab(index, item.categoryId)"-->
v-for=
"(item, index) in tabsData"
<!-- v-for="(item, index) in tabsData"-->
:key=
"index"
<!-- :key="index"-->
class=
"text"
<!-- class="text"-->
:class=
"light === index ? 'light' : ''"
<!-- :class="light === index ? 'light' : ''"-->
>
<!-- >--
>
{{
item
.
categoryName
}}
<!--
{{
item
.
categoryName
}}
-->
</text
>
<!--
</text>
--
>
</scroll-view
>
<!--
</scroll-view>
--
>
<
/view
>
<
!--
</view>
--
>
<view
class=
"tab-list"
v-for=
"(item, index) in buyList"
:key=
"index"
@
tap=
"toDetail(item)"
>
<view
class=
"tab-list"
v-for=
"(item, index) in buyList"
:key=
"index"
@
tap=
"toDetail(item)"
>
<img
<img
class=
"buy-list"
class=
"buy-list"
...
@@ -163,6 +163,7 @@ onMounted(async () => {
...
@@ -163,6 +163,7 @@ onMounted(async () => {
getPresale
();
getPresale
();
presaleSortList
();
presaleSortList
();
getshoppingCartListFn
();
getshoppingCartListFn
();
chooseBTab
(
0
,
'3444'
);
});
});
// 搜索
// 搜索
const
toSearch
=
()
=>
{
const
toSearch
=
()
=>
{
...
@@ -224,7 +225,7 @@ const chooseBTab = (index, categoryId) => {
...
@@ -224,7 +225,7 @@ const chooseBTab = (index, categoryId) => {
});
});
buyList
.
value
=
res
.
data
.
records
;
buyList
.
value
=
res
.
data
.
records
;
});
});
light
.
value
=
index
;
//
light.value = index;
};
};
// 筑农首页-分类查询商品列表
// 筑农首页-分类查询商品列表
...
...
src/pages/index/listFood.vue
View file @
c038ddc7
...
@@ -7,9 +7,9 @@
...
@@ -7,9 +7,9 @@
:title=
"title"
:title=
"title"
:showTitle=
"true"
:showTitle=
"true"
></search>
></search>
<
view
class=
"head"
>
<
!--
<view
class=
"head"
>
--
>
<view
class=
"top"
:style=
"
{ backgroundImage: topBg }">
</view>
<view
class=
"top"
:style=
"
{ backgroundImage: topBg }">
</view>
<view
class=
"bootom
"
>
<view
class=
"bootom"
:style=
"
{ top }
">
<view
class=
"bootom-top"
>
<view
class=
"bootom-top"
>
<view
class=
"option"
@
tap=
"locationFiltering(0)"
>
<view
class=
"option"
@
tap=
"locationFiltering(0)"
>
<text
:class=
"
{ rotate: rotate }">全部烧烤烤肉
</text>
<text
:class=
"
{ rotate: rotate }">全部烧烤烤肉
</text>
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
<!-- 排序筛选 -->
<!-- 排序筛选 -->
<Sort
v-show=
"rotate3"
@
sortParams=
"sortParams"
/>
<Sort
v-show=
"rotate3"
@
sortParams=
"sortParams"
/>
</view>
</view>
<
/view
>
<
!--
</view>
--
>
<FoodDetails
:cardData=
"cardData"
/>
<FoodDetails
:cardData=
"cardData"
/>
<wd-status-tip
image=
"content"
tip=
"暂无内容"
v-if=
"cardData.length === 0"
/>
<wd-status-tip
image=
"content"
tip=
"暂无内容"
v-if=
"cardData.length === 0"
/>
<view
<view
...
@@ -98,6 +98,7 @@ const cardData = ref([]);
...
@@ -98,6 +98,7 @@ const cardData = ref([]);
const
backgroundBox
=
ref
(
''
);
const
backgroundBox
=
ref
(
''
);
const
backIcon
=
ref
(
'white'
);
const
backIcon
=
ref
(
'white'
);
const
title
=
ref
(
''
);
const
title
=
ref
(
''
);
const
top
=
ref
(
null
);
let
total
;
let
total
;
const
paramsId
=
{
const
paramsId
=
{
parentId
:
null
,
parentId
:
null
,
...
@@ -116,11 +117,20 @@ onLoad((options) => {
...
@@ -116,11 +117,20 @@ onLoad((options) => {
const
{
categoryId
,
place
}
=
options
;
const
{
categoryId
,
place
}
=
options
;
paramsId
.
parentId
=
categoryId
;
paramsId
.
parentId
=
categoryId
;
getByParentIdData
();
getByParentIdData
();
getTop
();
getByType
({
place
}).
then
((
res
)
=>
{
getByType
({
place
}).
then
((
res
)
=>
{
topBg
.
value
=
`url(
${
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
res
.
data
[
0
].
imgUrl
}
)`
;
topBg
.
value
=
`url(
${
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
res
.
data
[
0
].
imgUrl
}
)`
;
});
});
});
});
// 获取位置板块贴合高度
const
getTop
=
()
=>
{
xma
.
xh
.
getMenuButtonBoundingClientRect
({
success
(
res
)
{
top
.
value
=
(
res
.
top
+
res
.
bottom
)
/
2
+
25
+
'px'
;
},
});
};
const
refresh
=
()
=>
{
const
refresh
=
()
=>
{
delete
listParams
.
distance
;
delete
listParams
.
distance
;
delete
listParams
.
area
;
delete
listParams
.
area
;
...
@@ -272,11 +282,11 @@ onPullDownRefresh(() => {
...
@@ -272,11 +282,11 @@ onPullDownRefresh(() => {
page
{
page
{
background
:
#f3f3f3
;
background
:
#f3f3f3
;
}
}
.head
{
//
.head {
width
:
100%
;
//
width: 100%;
margin-bottom
:
10rpx
;
//
margin-bottom: 10rpx;
// height: 480rpx;
// height: 480rpx;
.top
{
.top
{
height
:
356rpx
;
height
:
356rpx
;
// background: url('../../static/index/taste.png');
// background: url('../../static/index/taste.png');
background-size
:
100%
100%
;
background-size
:
100%
100%
;
...
@@ -286,8 +296,8 @@ page {
...
@@ -286,8 +296,8 @@ page {
margin-left
:
40rpx
;
margin-left
:
40rpx
;
color
:
white
;
color
:
white
;
}
}
}
}
.bootom
{
.bootom
{
// height: 124rpx;
// height: 124rpx;
height
:
80rpx
;
height
:
80rpx
;
display
:
flex
;
display
:
flex
;
...
@@ -295,7 +305,10 @@ page {
...
@@ -295,7 +305,10 @@ page {
justify-content
:
space-around
;
justify-content
:
space-around
;
border-radius
:
6rpx
;
border-radius
:
6rpx
;
background
:
#ffffff
;
background
:
#ffffff
;
position
:
relative
;
position
:
sticky
;
margin-bottom
:
10rpx
;
z-index
:
9999
;
// top: 100px;
.bootom-top
{
.bootom-top
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
@@ -341,6 +354,6 @@ page {
...
@@ -341,6 +354,6 @@ page {
background
:
#ffdcbb
;
background
:
#ffdcbb
;
}
}
}
}
}
}
}
// }
</
style
>
</
style
>
src/pages/index/loading.vue
View file @
c038ddc7
...
@@ -10,8 +10,8 @@ import { getTokenUser } from '../../api/index';
...
@@ -10,8 +10,8 @@ import { getTokenUser } from '../../api/index';
import
{
getToken
}
from
'../../utils/auth'
;
import
{
getToken
}
from
'../../utils/auth'
;
onLoad
(
async
(
options
)
=>
{
onLoad
(
async
(
options
)
=>
{
//
await signIn();
await
signIn
();
if
(
!
getToken
())
await
signIn2
();
//
if (!getToken()) await signIn2();
const
{
type
}
=
options
;
const
{
type
}
=
options
;
switch
(
type
)
{
switch
(
type
)
{
case
'0'
:
case
'0'
:
...
@@ -21,11 +21,11 @@ onLoad(async (options) => {
...
@@ -21,11 +21,11 @@ onLoad(async (options) => {
xma
.
reLaunch
({
url
:
'/pages/index/index'
});
xma
.
reLaunch
({
url
:
'/pages/index/index'
});
break
;
break
;
case
'2'
:
case
'2'
:
xma
.
reLaunch
({
url
:
'/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=
326
8'
});
xma
.
reLaunch
({
url
:
'/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=8'
});
break
;
break
;
case
'3'
:
case
'3'
:
xma
.
reLaunch
({
xma
.
reLaunch
({
url
:
'/pages/assistingAgriculture/index/building?categoryId=
3266
'
,
url
:
'/pages/assistingAgriculture/index/building?categoryId=
10
'
,
});
});
break
;
break
;
default
:
default
:
...
...
src/pages/storeEntry/detail.vue
View file @
c038ddc7
vite.config.ts
View file @
c038ddc7
...
@@ -41,8 +41,8 @@ export default defineConfig({
...
@@ -41,8 +41,8 @@ export default defineConfig({
// 代理配置
// 代理配置
proxy
:
{
proxy
:
{
'/api'
:
{
'/api'
:
{
//
target: 'http://test.rhhzkj.com:8080',
target
:
'http://test.rhhzkj.com:8080'
,
target
:
'https://api.rddyz.com'
,
//
target: 'https://api.rddyz.com',
changeOrigin
:
true
,
changeOrigin
:
true
,
rewrite
:
(
path
)
=>
path
.
replace
(
/^
\/
api/
,
''
),
rewrite
:
(
path
)
=>
path
.
replace
(
/^
\/
api/
,
''
),
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment