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
ef342cab
Commit
ef342cab
authored
Aug 14, 2024
by
陈宗胤(贵阳日报)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.platform.xinhuaapp.com/pengjiani/groupPurchase-miniapp
parents
e41840ac
8fb02fda
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
309 additions
and
115 deletions
+309
-115
DepartureDate.vue
src/Components/assistingAgriculture/index/DepartureDate.vue
+4
-0
ScenicSpots.vue
src/Components/assistingAgriculture/index/ScenicSpots.vue
+23
-7
Screen.vue
src/Components/assistingAgriculture/index/Screen.vue
+33
-11
Sort.vue
src/Components/assistingAgriculture/index/Sort.vue
+4
-0
fab.vue
src/Components/fab/fab.vue
+0
-4
specialOfferZoneList.js
src/api/assistingAgriculture/specialOfferZoneList.js
+1
-1
village.js
src/api/assistingAgriculture/village.js
+1
-1
storeEntry.js
src/api/storeEntry.js
+8
-0
manifest.json
src/manifest.json
+1
-1
addressEdit.vue
src/pages/address/addressEdit.vue
+1
-1
RuralTravel.vue
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
+80
-39
specialOfferZoneList.vue
...assistingAgriculture/RuralTravel/specialOfferZoneList.vue
+20
-9
ConfirmOrder.vue
src/pages/assistingAgriculture/cart/ConfirmOrder.vue
+1
-1
cart.vue
src/pages/assistingAgriculture/cart/cart.vue
+6
-5
detail.vue
src/pages/assistingAgriculture/detail/detail.vue
+7
-2
building.vue
src/pages/assistingAgriculture/index/building.vue
+11
-9
index.vue
src/pages/assistingAgriculture/index/index.vue
+5
-1
presale.vue
src/pages/assistingAgriculture/index/presale.vue
+1
-1
searchPage.vue
src/pages/assistingAgriculture/searchPage/searchPage.vue
+33
-10
index.vue
src/pages/assistingAgriculture/shop/index.vue
+2
-6
detail.vue
src/pages/storeEntry/detail.vue
+32
-3
index.vue
src/pages/storeEntry/index.vue
+35
-3
No files found.
src/Components/assistingAgriculture/index/DepartureDate.vue
View file @
ef342cab
...
...
@@ -64,6 +64,10 @@ function timestampToDateBasic(timestamp) {
const
day
=
date
.
getDate
().
toString
().
padStart
(
2
,
'0'
);
return
`
${
year
}
/
${
month
}
/
${
day
}
`
;
}
const
reset
=
()
=>
{
selectedItem
.
value
=
null
;
};
defineExpose
({
reset
});
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/Components/assistingAgriculture/index/ScenicSpots.vue
View file @
ef342cab
...
...
@@ -4,8 +4,8 @@
<li
v-for=
"(item, index) in placeList"
:key=
"index"
:class=
"
{ active: selectedItem
=== index
}"
@
tap
="selectItem(index, item)"
:class=
"
{ active: selectedItem
.includes(index)
}"
@
click
="selectItem(index, item)"
>
{{
item
.
attractionName
}}
</li>
...
...
@@ -14,30 +14,46 @@
</
template
>
<
script
setup
>
import
{
defineProps
,
onMounted
}
from
'vue'
;
import
{
ref
,
defineProps
,
defineEmits
,
onMounted
}
from
'vue'
;
import
{
getTour
}
from
'@/api/assistingAgriculture/village'
;
const
placeList
=
ref
([]);
const
emit
=
defineEmits
([
'placeParams'
]);
const
selectedItem
=
ref
(
null
);
const
selectedItem
=
ref
(
[]
);
const
props
=
defineProps
({
width
:
{
type
:
String
,
default
:
'100%'
,
},
});
onMounted
(
async
()
=>
{
getTourList
();
});
const
selectItem
=
(
index
,
item
)
=>
{
selectedItem
.
value
=
index
;
emit
(
'placeParams'
,
item
);
const
itemIndex
=
selectedItem
.
value
.
indexOf
(
index
);
if
(
itemIndex
===
-
1
)
{
selectedItem
.
value
.
push
(
index
);
}
else
{
selectedItem
.
value
.
splice
(
itemIndex
,
1
);
}
emit
(
'placeParams'
,
placeList
.
value
.
filter
((
_
,
i
)
=>
selectedItem
.
value
.
includes
(
i
)),
);
};
// 查询景点
const
getTourList
=
()
=>
{
getTour
().
then
((
res
)
=>
{
placeList
.
value
=
res
.
data
;
});
};
const
reset
=
()
=>
{
selectedItem
.
value
=
[];
};
defineExpose
({
reset
});
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/Components/assistingAgriculture/index/Screen.vue
View file @
ef342cab
...
...
@@ -5,7 +5,7 @@
<li
v-for=
"(item, index) in screenList"
:key=
"index"
:class=
"
{ active: selectedItem
=== index
}"
:class=
"
{ active: selectedItem
.includes(index)
}"
@tap="selectItem(index, item, 'screen')"
>
{{
item
.
tripCity
}}
...
...
@@ -16,7 +16,7 @@
<li
v-for=
"(item, index) in serveList"
:key=
"index"
:class=
"
{ active: selectedItem1
=== index
}"
:class=
"
{ active: selectedItem1
.includes(index)
}"
@tap="selectItem(index, item, 'serve')"
>
{{
item
.
labelName
}}
...
...
@@ -27,7 +27,7 @@
<li
v-for=
"(item, index) in peopleList"
:key=
"index"
:class=
"
{ active: selectedItem2
=== index
}"
:class=
"
{ active: selectedItem2
.includes(index)
}"
@tap="selectItem(index, item, 'people')"
>
{{
item
.
labelName
}}
...
...
@@ -40,9 +40,9 @@
import
{
defineProps
,
onMounted
,
ref
}
from
'vue'
;
import
{
screeningConditions
}
from
'@/api/assistingAgriculture/village'
;
const
emit
=
defineEmits
([
'screenParams'
]);
const
selectedItem
=
ref
(
null
);
const
selectedItem1
=
ref
(
null
);
const
selectedItem2
=
ref
(
null
);
const
selectedItem
=
ref
(
[]
);
const
selectedItem1
=
ref
(
[]
);
const
selectedItem2
=
ref
(
[]
);
const
screenList
=
ref
([]);
const
serveList
=
ref
([]);
const
peopleList
=
ref
([]);
...
...
@@ -56,16 +56,32 @@ onMounted(async () => {
getScreeningConditions
();
});
const
selectItem
=
(
index
,
item
,
type
)
=>
{
let
selectedRef
,
itemList
;
if
(
type
===
'screen'
)
{
selectedItem
.
value
=
index
;
selectedRef
=
selectedItem
;
itemList
=
screenList
.
value
;
}
else
if
(
type
===
'serve'
)
{
selectedItem1
.
value
=
index
;
selectedRef
=
selectedItem1
;
itemList
=
serveList
.
value
;
}
else
if
(
type
===
'people'
)
{
selectedItem2
.
value
=
index
;
selectedRef
=
selectedItem2
;
itemList
=
peopleList
.
value
;
}
emit
(
'screenParams'
,
item
,
type
);
const
position
=
selectedRef
.
value
.
indexOf
(
index
);
if
(
position
>
-
1
)
{
selectedRef
.
value
.
splice
(
position
,
1
);
}
else
{
selectedRef
.
value
.
push
(
index
);
}
// 使用map创建一个新数组,从itemList中根据索引获取正确的item
emit
(
'screenParams'
,
selectedRef
.
value
.
map
((
i
)
=>
({
...
itemList
[
i
],
index
:
i
})),
type
,
);
};
// 查询出发日期
const
getScreeningConditions
=
()
=>
{
screeningConditions
().
then
((
res
)
=>
{
screenList
.
value
=
res
.
data
.
startCityList
;
...
...
@@ -73,6 +89,12 @@ const getScreeningConditions = () => {
peopleList
.
value
=
res
.
data
.
forPeopleList
;
});
};
const
reset
=
()
=>
{
selectedItem
.
value
=
[];
selectedItem1
.
value
=
[];
selectedItem2
.
value
=
[];
};
defineExpose
({
reset
});
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/Components/assistingAgriculture/index/Sort.vue
View file @
ef342cab
...
...
@@ -34,6 +34,10 @@ const selectItem = (index, item) => {
selectedItem
.
value
=
index
;
emit
(
'sortParams'
,
item
);
};
const
reset
=
()
=>
{
selectedItem
.
value
=
null
;
};
defineExpose
({
reset
});
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/Components/fab/fab.vue
View file @
ef342cab
...
...
@@ -7,10 +7,6 @@
:draggable=
"true"
inactiveIcon=
"a-controlplatform"
>
<view
class=
"custom-button"
@
click=
"go('/pages/assistingAgriculture/index/index')"
>
<image
class=
"fab-icon"
src=
"../../static/index/order.png"
></image>
<text
class=
"fab-text"
>
助农
</text>
</view>
<view
class=
"custom-button"
@
click=
"go('/pages/ticket/ticket')"
>
<image
class=
"fab-icon"
src=
"../../static/index/coupon.png"
></image>
<text
class=
"fab-text"
>
优惠券
</text>
...
...
src/api/assistingAgriculture/specialOfferZoneList.js
View file @
ef342cab
...
...
@@ -4,7 +4,7 @@ import { request } from '../../utils/request';
export
function
queryOfferProdList
(
data
)
{
return
request
({
url
:
`/sgyrdd/prod/queryOfferProdList`
,
method
:
'
GE
T'
,
method
:
'
POS
T'
,
data
,
});
}
src/api/assistingAgriculture/village.js
View file @
ef342cab
...
...
@@ -20,7 +20,7 @@ export function getPopularList(data) {
export
function
getProdList
(
data
)
{
return
request
({
url
:
`/sgyrdd/prod/prodList`
,
method
:
'
GE
T'
,
method
:
'
POS
T'
,
data
,
});
}
...
...
src/api/storeEntry.js
View file @
ef342cab
...
...
@@ -16,3 +16,11 @@ export function applyShop(data) {
data
,
});
}
export
function
deleteShopInfoById
(
data
)
{
return
request
({
url
:
`/sgyrdd/shop/delByShopId`
,
method
:
'GET'
,
data
,
});
}
src/manifest.json
View file @
ef342cab
...
...
@@ -82,7 +82,7 @@
"sdkConfigs"
:
{
"maps"
:
{
"qqmap"
:
{
"key"
:
"
MN4BZ-7JXKW-2RYRD-32QGF-AHONV-PAFUN
"
"key"
:
"
B7VBZ-PT5RB-WRHUT-J2EEQ-3WTUE-APFX4
"
}
}
}
...
...
src/pages/address/addressEdit.vue
View file @
ef342cab
...
...
@@ -145,7 +145,7 @@ async function changeLocation() {
uni
.
request
({
url
:
'/ws/geocoder/v1/'
,
data
:
{
key
:
'
MN4BZ-7JXKW-2RYRD-32QGF-AHONV-PAFUN
'
,
key
:
'
B7VBZ-PT5RB-WRHUT-J2EEQ-3WTUE-APFX4
'
,
location
:
`
${
res
.
latitude
}
,
${
res
.
longitude
}
`
,
},
success
:
function
(
res
)
{
...
...
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
View file @
ef342cab
...
...
@@ -8,7 +8,6 @@
iconSrc=
"/static/assistingAgriculture/assets/left.png"
placeholderText=
"请输入要搜索的关键词"
@
search=
"toSearch"
v-model=
"keyword"
></Search>
</view>
<view
class=
"bac-img"
>
...
...
@@ -124,10 +123,10 @@
<wd-icon
size=
"24rpx"
class=
"icons"
></wd-icon>
</view>
</view>
<Sort
v-show=
"rotate"
@
sortParams=
"sortParams"
/>
<DepartureDate
v-show=
"rotate2"
@
dataParams=
"dataParams"
/>
<ScenicSpots
v-show=
"rotate3"
@
placeParams=
"placeParams"
/>
<Screen
v-show=
"rotate4"
@
screenParams=
"screenParams"
/>
<Sort
v-show=
"rotate"
ref=
"sortRef"
@
sortParams=
"sortParams"
/>
<DepartureDate
v-show=
"rotate2"
ref=
"departureDateRef"
@
dataParams=
"dataParams"
/>
<ScenicSpots
v-show=
"rotate3"
ref=
"scenicSpotsRef"
@
placeParams=
"placeParams"
/>
<Screen
v-show=
"rotate4"
ref=
"screenRef"
@
screenParams=
"screenParams"
/>
</view>
<view
class=
"list-card"
>
<view
...
...
@@ -163,6 +162,7 @@
</view>
</view>
</view>
<fab
/>
</view>
</
template
>
...
...
@@ -175,6 +175,7 @@ import Screen from '../../../components/assistingAgriculture/index/Screen.vue';
import
{
getPopularList
,
getProdList
,
getTour
}
from
'@/api/assistingAgriculture/village'
;
import
{
getPresaleList
}
from
'@/api/assistingAgriculture/building'
;
import
{
onMounted
}
from
'vue'
;
import
fab
from
'../../../components/fab/fab.vue'
;
onMounted
(
async
()
=>
{
getProd
();
getPopular
();
...
...
@@ -186,13 +187,17 @@ const rotate4 = ref(false);
const
cardList
=
ref
([]);
const
popularRouterData
=
ref
([]);
const
sortType
=
ref
(
null
);
const
attractionId
=
ref
(
null
);
const
startCity
=
ref
(
null
);
const
attractionId
List
=
ref
([]
);
const
startCity
List
=
ref
([]
);
const
dateType
=
ref
(
null
);
const
allocateDate
=
ref
(
null
);
const
service
Commitment
=
ref
(
null
);
const
service
List
=
ref
([]
);
const
keyword
=
ref
(
''
);
const
labelId
=
ref
(
null
);
const
forPeopleList
=
ref
([]);
const
sortRef
=
ref
(
null
);
const
departureDateRef
=
ref
(
null
);
const
scenicSpotsRef
=
ref
(
null
);
const
screenRef
=
ref
(
null
);
const
locationFiltering
=
(
index
)
=>
{
switch
(
index
)
{
case
0
:
...
...
@@ -222,11 +227,11 @@ const locationFiltering = (index) => {
}
if
(
index
===
0
)
{
sortType
.
value
=
null
;
attractionId
.
value
=
null
;
attractionId
List
.
value
=
[]
;
dateType
.
value
=
null
;
startCity
.
value
=
null
;
service
Commitment
.
value
=
null
;
labelId
.
value
=
null
;
startCity
List
.
value
=
[]
;
service
List
.
value
=
[]
;
forPeopleList
.
value
=
[]
;
}
};
onPullDownRefresh
(()
=>
{
...
...
@@ -256,35 +261,48 @@ const dataParams = (item, datePart) => {
dateType
.
value
=
item
.
key
;
getProd
();
}
else
if
(
item
===
undefined
)
{
console
.
log
(
item
,
3333333
);
dateType
.
value
=
8
;
allocateDate
.
value
=
datePart
;
getProd
();
}
};
// 景点
const
placeParams
=
(
id
)
=>
{
attractionId
.
value
=
id
;
// const placeParams = (item) => {
// console.log(item, 222);
// attractionIdList.value = item.id;
// getProd();
// };
const
placeParams
=
(
item
)
=>
{
const
ids
=
item
.
map
((
i
)
=>
i
.
id
);
const
arr
=
ids
.
join
(
','
);
attractionIdList
.
value
=
arr
.
split
(
','
).
map
(
Number
);
getProd
();
};
// 筛选
const
screenParams
=
(
item
,
type
)
=>
{
console
.
log
(
item
,
type
,
111
);
const
screenParams
=
(
selectedItems
,
type
)
=>
{
console
.
log
(
selectedItems
,
type
,
111
);
if
(
type
===
'screen'
)
{
startCity
.
value
=
item
.
tripCity
;
const
ids
=
selectedItems
.
map
((
i
)
=>
i
.
tripCityId
);
const
arr
=
ids
.
join
(
','
);
startCityList
.
value
=
arr
.
split
(
','
).
map
(
String
);
getProd
();
}
else
if
(
type
===
'serve'
)
{
serviceCommitment
.
value
=
item
.
labelName
;
const
ids
=
selectedItems
.
map
((
i
)
=>
i
.
labelId
);
const
arr
=
ids
.
join
(
','
);
serviceList
.
value
=
arr
.
split
(
','
).
map
(
String
);
getProd
();
}
else
if
(
type
===
'people'
)
{
labelId
.
value
=
item
.
labelName
;
const
ids
=
selectedItems
.
map
((
i
)
=>
i
.
labelId
);
const
arr
=
ids
.
join
(
','
);
forPeopleList
.
value
=
arr
.
split
(
','
).
map
(
String
);
getProd
();
}
};
// 搜索
const
toSearch
=
(
data
)
=>
{
keyword
.
value
=
data
.
detail
.
value
;
getProd
(
keyword
.
value
);
// 搜索
const
toSearch
=
()
=>
{
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/searchPage/searchPage?prodTypes=10'
}
);
};
// 查询列表
...
...
@@ -292,12 +310,20 @@ const getProd = (searchKeyword = '') => {
const
params
=
{
current
:
1
,
size
:
10
,
...(
sortType
.
value
!==
null
&&
{
sortType
:
sortType
.
value
.
sortMode
}),
...(
attractionId
.
value
!==
null
&&
{
attractionId
:
attractionId
.
value
.
id
}),
...(
dateType
.
value
!==
null
&&
{
dateType
:
dateType
.
value
}),
...(
startCity
.
value
!==
null
&&
{
startCity
:
startCity
.
value
}),
...(
serviceCommitment
.
value
!==
null
&&
{
serviceCommitment
:
serviceCommitment
.
value
}),
...(
labelId
.
value
!==
null
&&
{
labelId
:
labelId
.
value
}),
...(
sortType
.
value
&&
{
sortType
:
sortType
.
value
.
sortMode
}),
...(
attractionIdList
.
value
&&
attractionIdList
.
value
.
length
>
0
&&
attractionIdList
.
value
[
0
]
!==
0
&&
{
attractionIdList
:
attractionIdList
.
value
}),
...(
dateType
.
value
&&
{
dateType
:
dateType
.
value
}),
...(
startCityList
.
value
&&
startCityList
.
value
.
length
>
0
&&
{
startCityList
:
startCityList
.
value
}),
...(
serviceList
.
value
&&
serviceList
.
value
.
length
>
0
&&
{
serviceList
:
serviceList
.
value
}),
...(
forPeopleList
.
value
&&
forPeopleList
.
value
.
length
>
0
&&
{
forPeopleList
:
forPeopleList
.
value
}),
// ...(startCityList.value && { startCityList: startCityList.value.split(',') }),
// ...(serviceList.value && { serviceList: serviceList.value.split(',') }),
// ...(forPeopleList.value && { forPeopleList: forPeopleList.value.split(',') }),
...(
dateType
.
value
===
8
&&
{
allocateDate
:
allocateDate
.
value
}),
...(
searchKeyword
&&
{
keyword
:
searchKeyword
}),
};
...
...
@@ -309,17 +335,32 @@ const getProd = (searchKeyword = '') => {
cardList
.
value
=
res
.
data
.
records
;
});
};
const
resetParams
=
()
=>
{
sortType
.
value
=
null
;
attractionId
.
value
=
null
;
dateType
.
value
=
null
;
startCity
.
value
=
null
;
serviceCommitment
.
value
=
null
;
labelId
.
value
=
null
;
allocateDate
.
value
=
null
;
getProd
();
if
(
sortRef
.
value
||
departureDateRef
.
value
||
scenicSpotsRef
.
value
||
screenRef
.
value
)
{
sortType
.
value
=
null
;
dateType
.
value
=
null
;
allocateDate
.
value
=
null
;
attractionIdList
.
value
=
[];
startCityList
.
value
=
[];
serviceList
.
value
=
[];
forPeopleList
.
value
=
[];
sortRef
.
value
.
reset
();
departureDateRef
.
value
.
reset
();
scenicSpotsRef
.
value
.
reset
();
screenRef
.
value
.
reset
();
getProd
();
}
};
// const resetParams = () => {
// sortType.value = null;
// attractionIdList.value = [];
// dateType.value = null;
// startCityList.value = [];
// serviceList.value = [];
// forPeopleList.value = [];
// allocateDate.value = null;
// getProd();
// };
function
toRouteDetails
(
item
)
{
console
.
log
(
item
,
22222
);
// TODO: 跳转到线路详情
...
...
src/pages/assistingAgriculture/RuralTravel/specialOfferZoneList.vue
View file @
ef342cab
...
...
@@ -113,6 +113,7 @@
</template>
<
script
setup
>
import
{
getPresaleList
}
from
'@/api/assistingAgriculture/building'
;
import
{
queryOfferProdList
}
from
'@/api/assistingAgriculture/specialOfferZoneList'
;
import
Sort
from
'../../../components/assistingAgriculture/index/Sort.vue'
;
import
DepartureDate
from
'../../../components/assistingAgriculture/index/Date.vue'
;
...
...
@@ -130,11 +131,7 @@ const params = ref({
size
:
15
,
isEnd
:
false
,
});
const
shopSwiperList
=
ref
([
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/redpanda.jpg'
,
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/capybara.jpg'
,
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/panda.jpg'
,
]);
const
shopSwiperList
=
ref
([]);
const
locationFiltering
=
(
index
)
=>
{
const
rotates
=
[
rotate
,
rotate2
,
rotate3
,
rotate4
];
rotates
.
forEach
((
rotate
,
i
)
=>
{
...
...
@@ -144,6 +141,12 @@ const locationFiltering = (index) => {
onMounted
(()
=>
{
queryOfferProdListFn
();
getPresaleList
({
place
:
'sojourn'
}).
then
((
res
)
=>
{
shopSwiperList
.
value
=
res
.
data
.
map
((
item
)
=>
{
item
.
imgUrl
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
imgUrl
;
return
item
.
imgUrl
;
});
});
});
function
handleClick
(
e
)
{
console
.
log
(
e
);
...
...
@@ -183,18 +186,26 @@ const dataParams = (item, datePart) => {
};
// 景点
const
placeParams
=
(
info
)
=>
{
params
.
value
.
attractionIdList
=
[
info
.
id
];
params
.
value
.
attractionIdList
=
info
.
map
((
item
)
=>
{
return
item
.
id
;
});
refresh
().
then
(()
=>
{
queryOfferProdListFn
();
});
};
// 筛选
const
screenParams
=
(
item
,
type
)
=>
{
if
(
type
===
'screen'
)
{
params
.
value
.
startCityList
=
[
item
.
tripCity
];
params
.
value
.
startCityList
=
item
.
map
((
item
)
=>
{
return
item
.
tripCity
;
});
}
else
if
(
type
===
'serve'
)
{
params
.
value
.
serviceList
=
[
item
.
labelName
];
params
.
value
.
serviceList
=
item
.
map
((
item
)
=>
{
return
item
.
labelId
;
});
}
else
if
(
type
===
'people'
)
{
params
.
value
.
forPeopleList
=
[
item
.
labelName
];
params
.
value
.
forPeopleList
=
item
.
map
((
item
)
=>
{
return
item
.
labelId
;
});
}
refresh
().
then
(()
=>
{
queryOfferProdListFn
();
...
...
src/pages/assistingAgriculture/cart/ConfirmOrder.vue
View file @
ef342cab
...
...
@@ -229,7 +229,7 @@ onShow(() => {
success
()
{
setTimeout
(()
=>
{
xma
.
redirectTo
({
url
:
`/pages/
assistingAgriculture/order/detail?orderNumber=
${
outTradeNos
.
value
}
`
,
url
:
`/pages/
order/order?status=not_pay
`
,
});
},
1500
);
},
...
...
src/pages/assistingAgriculture/cart/cart.vue
View file @
ef342cab
...
...
@@ -14,7 +14,7 @@
<wd-icon
name=
"arrow-right"
size=
"32rpx"
style=
"margin-left: -15rpx"
></wd-icon>
</div>
<div
class=
"commodity-list"
>
<div
class=
"commodity-item flex-align-center"
v-for=
"(item, j) in s
econdaryList
"
:key=
"j"
>
<div
class=
"commodity-item flex-align-center"
v-for=
"(item, j) in s
hop.prodInfos
"
:key=
"j"
>
<div
class=
"check"
:class=
"
{ 'is-checked': item.isChecked }"
...
...
@@ -61,6 +61,7 @@ import { ref, computed, onMounted } from 'vue';
import
{
getshoppingCartList
}
from
'../../../api/packageDetail'
;
import
{
categoryPresaleList
}
from
'../../../api/assistingAgriculture/building'
;
import
{
quantity
}
from
'../../../api/assistingAgriculture/shop'
;
// 计算是否全选
const
checkedAll
=
computed
(()
=>
{
return
cartList
.
value
.
every
((
item
)
=>
item
.
isChecked
);
...
...
@@ -103,18 +104,18 @@ const changeCheckedAll = () => {
});
};
// 购物车列表
const
presaleSortList
=
(
index
)
=>
{
const
presaleSortList
=
()
=>
{
getshoppingCartList
({}).
then
((
res
)
=>
{
cartList
.
value
=
res
.
data
;
cartList
.
value
.
forEach
((
shop
)
=>
{
secondaryList
.
value
=
shop
.
prodInfos
;
secondaryList
.
value
.
forEach
((
item
)
=>
{
shop
.
prodInfos
.
forEach
((
item
)
=>
{
item
.
count
=
item
.
basket
.
basketCount
;
item
.
imgUrl
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
pic
;
});
});
});
};
// 购物车数量修改
const
changeQuantity
=
async
(
item
)
=>
{
const
res
=
await
quantity
({
...
...
@@ -146,7 +147,7 @@ function toSettle() {
return
;
}
const
shopIds
=
selected
.
map
((
item
)
=>
item
.
shopId
)
.
map
((
item
)
=>
item
.
basket
.
shopId
)
.
filter
((
value
,
index
,
self
)
=>
self
.
indexOf
(
value
)
===
index
);
if
(
shopIds
.
length
>
1
)
{
xma
.
showToast
({
...
...
src/pages/assistingAgriculture/detail/detail.vue
View file @
ef342cab
...
...
@@ -35,7 +35,7 @@
</view>
-->
</view>
<view
class=
"evaluate"
>
<view
class=
"evaluate-num"
>
<view
class=
"evaluate-num"
@
click=
"jumpPjPgae"
>
<text
class=
"env"
>
评价(
{{
commentData
.
count
}}
)
</text>
<text
class=
"num"
>
好评率(
{{
commentData
.
high
}}
%)
</text>
<wd-icon
name=
"arrow-right"
size=
"32rpx"
style=
"margin-top: 2rpx"
></wd-icon>
...
...
@@ -143,6 +143,11 @@ onLoad((options) => {
function
handleClick
(
e
)
{
console
.
log
(
e
);
}
function
jumpPjPgae
()
{
xma
.
navigateTo
({
url
:
`/pages/assistingAgriculture/detail/comment?shopId=
${
dataDetails
.
value
.
prod
.
shopId
}
`
,
});
}
function
onChange
(
e
)
{
console
.
log
(
e
);
}
...
...
@@ -211,7 +216,7 @@ const share = () => {
function
toStore
()
{
// TODO: 跳转到筑农严选
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/shop/index'
,
url
:
`/pages/assistingAgriculture/shop/index?shopId=
${
dataDetails
.
value
.
prod
.
shopId
}
`
,
});
}
function
toCart
()
{
...
...
src/pages/assistingAgriculture/index/building.vue
View file @
ef342cab
...
...
@@ -56,14 +56,14 @@
<view
class=
"hot-sale"
>
<view
class=
"top-title"
>
<text
class=
"left-title"
>
好货热卖
</text>
<text
class=
"right-title"
@
tap=
"toPresale"
>
更多
</text>
<text
class=
"right-title"
@
tap=
"toPresale"
>
更多
>
</text>
</view>
<
wd-icon
name=
"arrow-right"
size=
"25rpx"
color=
"#ABAAAA"
style=
"position: relative; float: right; top: -42rpx"
></wd-icon
>
<
!--
<wd-icon-->
<!-- name="arrow-right"-->
<!-- size="25rpx"-->
<!-- color="#ABAAAA"-->
<!-- style="position: relative; float: right; top: -42rpx"-->
<!-- >
</wd-icon>
--
>
<view
class=
"buy-img"
>
<view
class=
"hot-img"
v-for=
"(item, index) in hotImgList"
:key=
"index"
>
<img
...
...
@@ -125,11 +125,13 @@
/>
</wd-badge>
</view>
<fab
/>
</view>
</
template
>
<
script
setup
>
import
Search
from
'../../../components/assistingAgriculture/index/Search.vue'
;
import
fab
from
'../../../components/fab/fab.vue'
;
import
{
getGoodSaleProdList
,
getPlatformProdList
,
...
...
@@ -174,7 +176,7 @@ onMounted(async () => {
// 搜索
const
toSearch
=
()
=>
{
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/searchPage/searchPage'
});
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/searchPage/searchPage
?prodTypes=7
'
});
};
// 获取购物车列表
const
getshoppingCartListFn
=
()
=>
{
...
...
@@ -282,7 +284,7 @@ page {
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
padding-bottom
:
1
0rpx
;
padding-bottom
:
3
0rpx
;
}
.left-title
{
font-family
:
Source
Han
Sans
;
...
...
src/pages/assistingAgriculture/index/index.vue
View file @
ef342cab
...
...
@@ -6,6 +6,7 @@
backIcon=
"black"
iconSrc=
"/static/assistingAgriculture/assets/return.png"
placeholderText=
"请输入要搜索的内容"
@
search=
"toSearch"
></Search>
<view>
<wd-swiper
...
...
@@ -117,7 +118,10 @@ const getPresale = () => {
});
});
};
// 搜索
const
toSearch
=
()
=>
{
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/searchPage/searchPage?prodTypes=7,10'
});
};
const
onChange
=
(
e
)
=>
{
// console.log(e);
};
...
...
src/pages/assistingAgriculture/index/presale.vue
View file @
ef342cab
...
...
@@ -161,7 +161,7 @@ onMounted(async () => {
});
// 搜索
const
toSearch
=
()
=>
{
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/searchPage/searchPage'
});
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/searchPage/searchPage
?prodTypes=7
'
});
};
// 获取购物车列表
const
getshoppingCartListFn
=
()
=>
{
...
...
src/pages/assistingAgriculture/searchPage/searchPage.vue
View file @
ef342cab
...
...
@@ -28,7 +28,12 @@
<block
v-for=
"(item, index) in tabs"
:key=
"index"
>
<wd-tab
:title=
"item"
>
<view
class=
"content1"
v-show=
"tab === 0"
>
<view
class=
"shopitem"
v-for=
"(item, index) in commoditys"
:key=
"index"
>
<view
class=
"shopitem"
v-for=
"(item, index) in commoditys"
:key=
"index"
@
tap=
"toDetail(item)"
>
<image
class=
"img"
:src=
"item.imgUrl"
mode=
"aspectFill"
/>
<view
class=
"middle"
>
<text
class=
"text"
>
{{
item
.
prodName
}}
</text>
...
...
@@ -61,9 +66,10 @@
</
template
>
<
script
setup
>
import
{
useRoute
}
from
'vue-router'
;
import
{
searchCommodity
,
searchBusiness
}
from
'@/api/assistingAgriculture/search'
;
const
tab
=
ref
(
0
);
const
tabs
=
ref
([
'商品'
,
'店铺'
]);
const
tabs
=
ref
([
'商品'
]);
const
value
=
ref
(
5
);
const
commoditys
=
ref
([]);
const
shops
=
ref
([]);
...
...
@@ -76,12 +82,15 @@ const back = () => {
delta
:
1
,
});
};
const
router
=
useRoute
();
// 搜索
const
toSearch
=
(
data
)
=>
{
const
keyword
=
data
.
detail
.
value
;
const
params
=
{
current
:
1
,
size
:
100
,
prodTypes
:
router
.
query
.
prodTypes
.
split
(
','
),
};
const
params2
=
{
current
:
1
,
...
...
@@ -96,15 +105,29 @@ const toSearch = (data) => {
});
commoditys
.
value
=
res
.
data
.
data
;
});
// 店铺搜索
params2
.
keyword
=
keyword
;
searchBusiness
(
params2
).
then
((
res
)
=>
{
res
.
data
.
content
.
forEach
((
item
)
=>
{
item
.
shopLogo
=
baseImgurl
+
item
.
shopLogo
;
});
shops
.
value
=
res
.
data
.
content
;
});
//
//
店铺搜索
//
params2.keyword = keyword;
//
searchBusiness(params2).then((res) => {
//
res.data.content.forEach((item) => {
//
item.shopLogo = baseImgurl + item.shopLogo;
//
});
//
shops.value = res.data.content;
//
});
};
// 跳转详情
function
toDetail
(
item
)
{
if
(
item
.
prodType
===
'7'
)
{
// TODO: 跳转到筑农详情页
xma
.
navigateTo
({
url
:
`/pages/assistingAgriculture/detail/detail?prodId=
${
item
.
prodId
}
`
,
});
}
else
if
(
item
.
prodType
===
'10'
)
{
// TODO: 跳转到旅居详情页
xma
.
navigateTo
({
url
:
`/pages/assistingAgriculture/RouteDetails/RouteDetails?shopId=
${
item
.
shopId
}
&prodId=
${
item
.
prodId
}
`
,
});
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/pages/assistingAgriculture/shop/index.vue
View file @
ef342cab
...
...
@@ -185,12 +185,9 @@ function toCart() {
url
:
'/pages/assistingAgriculture/cart/cart'
,
});
}
const
addPurchase
=
ref
(
0
);
const
sgyBasketlistFn
=
()
=>
{
const
query
=
{
shopId
:
currentShopId
.
value
,
shopType
:
'3'
,
};
sgyBasketlist
(
query
).
then
((
res
)
=>
{
sgyBasketlist
().
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
res
.
data
.
forEach
((
shop
)
=>
{
addPurchase
.
value
+=
shop
.
prodInfos
.
length
;
...
...
@@ -208,7 +205,6 @@ function clearFn() {
});
}
const
addPurchase
=
ref
(
0
);
const
addShoppingCart
=
(
item
)
=>
{
const
params
=
{
shopId
:
item
.
shopId
,
...
...
src/pages/storeEntry/detail.vue
View file @
ef342cab
...
...
@@ -464,6 +464,11 @@ const getShopInfoByIdFun = async (data) => {
qualifications
:
item
.
qualifications
,
});
});
try
{
xma
.
setStorageSync
(
'storage_choosedShopInfo'
,
JSON
.
stringify
(
choosedShopInfo
.
value
));
}
catch
(
e
)
{
console
.
log
(
e
);
}
testFileList
.
value
=
choosedShopInfo
.
value
.
reduce
((
obj
,
item
)
=>
{
if
(
item
.
qualifications
===
''
)
{
obj
[
item
.
areaId
]
=
[];
...
...
@@ -487,7 +492,14 @@ const show = ref(false);
// 关闭店铺分类弹出层
const
handleClose
=
()
=>
{
show
.
value
=
false
;
try
{
const
value
=
xma
.
getStorageSync
(
'storage_choosedShopInfo'
);
if
(
value
)
{
choosedShopInfo
.
value
=
JSON
.
parse
(
value
);
}
}
catch
(
e
)
{
// error
}
setTimeout
(()
=>
{
testFileList
.
value
=
choosedShopInfo
.
value
.
reduce
((
obj
,
item
)
=>
{
if
(
item
.
qualifications
===
''
)
{
...
...
@@ -508,7 +520,11 @@ const originChooseCategoryLength = 0;
// 根据choosedShopInfo,更新categoryShopsList的值
const
chooseCategory
=
()
=>
{
show
.
value
=
false
;
try
{
xma
.
setStorageSync
(
'storage_choosedShopInfo'
,
JSON
.
stringify
(
choosedShopInfo
.
value
));
}
catch
(
e
)
{
console
.
log
(
e
);
}
testFileList
.
value
=
choosedShopInfo
.
value
.
reduce
((
obj
,
item
)
=>
{
if
(
item
.
qualifications
===
''
)
{
obj
[
item
.
areaId
]
=
[];
...
...
@@ -661,6 +677,19 @@ const submitData = () => {
categoryShops
:
dealCategoryData
.
value
,
});
}
try
{
xma
.
setStorageSync
(
'storage_choosedShopInfo'
,
{});
xma
.
showToast
({
title
:
'修改成功'
,
icon
:
'success'
,
duration
:
3000
,
success
:
(
res
)
=>
{
xma
.
redirectTo
({
url
:
'/pages/storeEntry/index'
});
},
});
}
catch
(
e
)
{
console
.
log
(
e
);
}
}
})
.
catch
((
error
)
=>
{
...
...
@@ -680,7 +709,7 @@ async function changeLocation() {
uni
.
request
({
url
:
'/ws/geocoder/v1/'
,
data
:
{
key
:
'
MN4BZ-7JXKW-2RYRD-32QGF-AHONV-PAFUN
'
,
key
:
'
B7VBZ-PT5RB-WRHUT-J2EEQ-3WTUE-APFX4
'
,
location
:
`
${
res
.
latitude
}
,
${
res
.
longitude
}
`
,
},
success
:
function
(
res
)
{
...
...
src/pages/storeEntry/index.vue
View file @
ef342cab
...
...
@@ -10,6 +10,7 @@
v-for=
"item in list"
:key=
"item.shopId"
@
click=
"item.shopStatus != [1, 2, 3] ? shopGto(item.shopId) : ''"
@
longpress=
"deleteShop(item.shopId)"
>
<!-- 列表头部 -->
<view
class=
"titlecon"
>
...
...
@@ -41,7 +42,7 @@
</view>
</view>
</view>
<view
class=
"shbox"
v-if=
"list.length > 0"
>
审核被拒可点击修改重新提交
</view>
<view
class=
"shbox"
v-if=
"list.length > 0"
>
审核被拒可点击修改重新提交
,长按可删除店铺
</view>
<wd-status-tip
image=
"content"
tip=
"暂无内容"
v-else
/>
</view>
<view
class=
"butCon"
><button
class=
"butXz"
@
click=
"shopGto()"
>
申请入驻
</button></view>
...
...
@@ -50,7 +51,7 @@
<
script
setup
>
import
Header
from
'@/pages/order/components/Header/index.vue'
;
import
{
shopList
}
from
'@/api/storeEntry'
;
import
{
shopList
,
deleteShopInfoById
}
from
'@/api/storeEntry'
;
const
itemUrl
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
shopStatus
=
reactive
({
0
:
'停业中'
,
...
...
@@ -79,7 +80,38 @@ const shopGto = (item) => {
},
});
};
getList
();
onLoad
(()
=>
{
getList
();
});
const
deleteShop
=
(
shopId
)
=>
{
xma
.
showModal
({
title
:
'删除提示'
,
content
:
'确定删除店铺吗?'
,
success
:
async
(
res
)
=>
{
if
(
res
.
confirm
)
{
const
msg
=
''
;
const
res
=
await
deleteShopInfoById
({
shopId
});
if
(
res
.
code
===
0
)
{
xma
.
showToast
({
title
:
'删除成功'
,
duration
:
3000
,
success
:
(
res
)
=>
{
getList
();
},
});
}
else
{
xma
.
showToast
({
title
:
'删除失败,请稍后再试'
,
duration
:
3000
,
});
}
}
},
});
};
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
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