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
769ba1c4
Commit
769ba1c4
authored
Aug 13, 2024
by
陈宗胤(贵阳日报)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.platform.xinhuaapp.com/pengjiani/groupPurchase-miniapp
parents
059fb2d3
2bf239f3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
104 additions
and
17 deletions
+104
-17
shop.js
src/api/shop.js
+10
-2
pages.json
src/pages.json
+2
-1
RouteDetails.vue
src/pages/assistingAgriculture/RouteDetails/RouteDetails.vue
+76
-4
RuralTravel.vue
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
+16
-7
ConfirmOrder.vue
src/pages/assistingAgriculture/cart/ConfirmOrder.vue
+0
-3
detail.vue
src/pages/storeEntry/detail.vue
+0
-0
No files found.
src/api/shop.js
View file @
769ba1c4
...
@@ -56,7 +56,7 @@ export function sgyrddShopPage(data) {
...
@@ -56,7 +56,7 @@ export function sgyrddShopPage(data) {
});
});
}
}
// 获取店铺入驻
类型
// 获取店铺入驻
分类(弹窗)
export
function
sgyrShopCategory
()
{
export
function
sgyrShopCategory
()
{
return
request
({
return
request
({
url
:
`/sgyrdd/category/tree`
,
url
:
`/sgyrdd/category/tree`
,
...
@@ -73,7 +73,7 @@ export function applyShop(data) {
...
@@ -73,7 +73,7 @@ export function applyShop(data) {
});
});
}
}
//
申请成为商家
//
更改申请信息
export
function
editShop
(
data
)
{
export
function
editShop
(
data
)
{
return
request
({
return
request
({
url
:
`/sgyrdd/shop/update`
,
url
:
`/sgyrdd/shop/update`
,
...
@@ -81,3 +81,11 @@ export function editShop(data) {
...
@@ -81,3 +81,11 @@ export function editShop(data) {
data
,
data
,
});
});
}
}
export
function
getShopInfoById
(
data
)
{
return
request
({
url
:
`/sgyrdd/shop/getShopById`
,
method
:
'GET'
,
data
,
});
}
src/pages.json
View file @
769ba1c4
...
@@ -208,7 +208,8 @@
...
@@ -208,7 +208,8 @@
{
{
"path"
:
"pages/assistingAgriculture/RuralTravel/RuralTravel"
,
"path"
:
"pages/assistingAgriculture/RuralTravel/RuralTravel"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"乡村旅居"
"navigationBarTitleText"
:
"乡村旅居"
,
"enablePullDownRefresh"
:
true
,
}
}
},
},
...
...
src/pages/assistingAgriculture/RouteDetails/RouteDetails.vue
View file @
769ba1c4
...
@@ -164,7 +164,7 @@
...
@@ -164,7 +164,7 @@
</div>
</div>
</div>
</div>
<wd-action-sheet
v-model=
"show"
title=
"
标题
"
@
close=
"show = false"
>
<wd-action-sheet
v-model=
"show"
title=
"
选择日期
"
@
close=
"show = false"
>
<view
style=
"padding: 15px 15px 15px 15px"
class=
"popout"
>
<view
style=
"padding: 15px 15px 15px 15px"
class=
"popout"
>
<div
<div
class=
"item"
class=
"item"
...
@@ -305,14 +305,16 @@
...
@@ -305,14 +305,16 @@
<wd-icon
v-else
color=
"red"
name=
"star-on"
></wd-icon>
<wd-icon
v-else
color=
"red"
name=
"star-on"
></wd-icon>
<p>
{{
shopInfo
.
privateIntFcount
||
0
}}
</p>
<p>
{{
shopInfo
.
privateIntFcount
||
0
}}
</p>
</div>
</div>
<button>
立即预定
</button>
<button
@
click=
"openZfType"
>
立即预定
</button>
</div>
</div>
<Payment
ref=
"PaymentRef"
@
payment=
"payNow"
></Payment>
</div>
</div>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
timeLine
from
'./timeLine.vue'
;
import
timeLine
from
'./timeLine.vue'
;
import
domain
from
'@/utils/domain'
;
import
domain
from
'@/utils/domain'
;
import
Payment
from
'@/pages/order/components/Payment/index.vue'
;
import
{
ref
,
computed
,
watch
}
from
'vue'
;
import
{
ref
,
computed
,
watch
}
from
'vue'
;
import
{
import
{
getProd
,
getProd
,
...
@@ -324,6 +326,7 @@ import {
...
@@ -324,6 +326,7 @@ import {
getItinerary
,
getItinerary
,
getStoreInformation
,
getStoreInformation
,
}
from
'@/api/assistingAgriculture/route'
;
}
from
'@/api/assistingAgriculture/route'
;
import
{
groupBuyConfirm
,
groupBuyUpdate
}
from
'@/api/confirmOrder'
;
import
{
getCollect
}
from
'@/api/packageDetail'
;
import
{
getCollect
}
from
'@/api/packageDetail'
;
const
swiperList
=
ref
([
const
swiperList
=
ref
([
...
@@ -339,7 +342,7 @@ const firstEvaluation = ref({});
...
@@ -339,7 +342,7 @@ const firstEvaluation = ref({});
const
photoList
=
ref
([]);
const
photoList
=
ref
([]);
// 套餐列表
// 套餐列表
const
mealList
=
ref
([]);
const
mealList
=
ref
([]);
const
activeMeal
=
ref
(
{}
);
const
activeMeal
=
ref
(
null
);
const
onActiveMeal
=
(
item
)
=>
{
const
onActiveMeal
=
(
item
)
=>
{
activeMeal
.
value
=
item
;
activeMeal
.
value
=
item
;
getPriceListFn
(
item
.
mealId
);
getPriceListFn
(
item
.
mealId
);
...
@@ -347,7 +350,7 @@ const onActiveMeal = (item) => {
...
@@ -347,7 +350,7 @@ const onActiveMeal = (item) => {
// 日历
// 日历
const
priceList
=
ref
([]);
const
priceList
=
ref
([]);
const
viewPriceList
=
ref
([]);
const
viewPriceList
=
ref
([]);
const
activePrice
=
ref
(
{}
);
const
activePrice
=
ref
(
null
);
const
show
=
ref
(
false
);
const
show
=
ref
(
false
);
const
shopIds
=
ref
(
''
);
const
shopIds
=
ref
(
''
);
watch
(
show
,
(
value
)
=>
{
watch
(
show
,
(
value
)
=>
{
...
@@ -367,6 +370,75 @@ const getPriceListFn = (mealId) => {
...
@@ -367,6 +370,75 @@ const getPriceListFn = (mealId) => {
viewPriceList
.
value
=
res
.
data
.
slice
(
0
,
4
);
viewPriceList
.
value
=
res
.
data
.
slice
(
0
,
4
);
});
});
};
};
function
groupBuyConfirmFn
(
prodId
,
skuId
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
groupBuyConfirm
({
prodId
,
skuId
}).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
orderInfo
.
value
=
res
.
data
;
resolve
(
res
.
data
.
shopId
);
}
else
{
wx
.
showToast
({
title
:
res
.
msg
,
});
}
});
});
}
const
PaymentRef
=
ref
(
null
);
const
openZfType
=
()
=>
{
if
(
!
activeMeal
.
value
)
{
xma
.
showToast
({
title
:
'请先选择套餐'
,
icon
:
'error'
,
});
}
else
if
(
!
activePrice
.
value
)
{
xma
.
showToast
({
title
:
'请先选择日期'
,
icon
:
'error'
,
});
}
else
{
PaymentRef
.
value
.
open
();
}
};
function
formatDate
(
inputDate
)
{
const
[
year
,
monthDay
]
=
inputDate
.
split
(
''
);
return
`
${
year
}
-
${
monthDay
}
`
;
}
const
payNow
=
async
(
data
)
=>
{
groupBuyConfirmFn
(
prodIds
.
value
,
skuIds
.
value
).
then
((
res
)
=>
{
groupBuyUpdateFnQg
();
});
params
.
value
.
id
=
orderInfo
.
value
.
key
;
params
.
value
.
tradeType
=
data
.
selectType
;
params
.
value
.
basketIds
=
basketIds
.
value
;
const
qgParams
=
{
id
:
orderInfo
.
value
.
key
,
placeOrderWay
:
'sgy'
,
payWayCode
:
5
,
tradeType
:
data
.
selectType
,
};
groupBuyCreate
(
qgParams
).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
openUrl
(
res
.
data
.
result
);
}
else
{
groupBuyConfirmFn
(
prodIds
.
value
,
skuIds
.
value
);
}
});
};
function
groupBuyUpdateFnQg
(
couponUserId
=
''
)
{
const
{
receiverName
,
receiverMobile
,
receiverAddress
}
=
addressParams
.
value
;
groupBuyUpdate
({
key
:
orderInfo
.
value
.
key
,
couponUserId
,
receiverTime
:
formatDate
(
activePrice
.
value
.
priceDay
),
}).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
orderInfo
.
value
=
res
.
data
;
}
});
}
const
shopInfo
=
ref
({});
const
shopInfo
=
ref
({});
// 获取店铺信息
// 获取店铺信息
const
getStoreInformationFn
=
(
id
)
=>
{
const
getStoreInformationFn
=
(
id
)
=>
{
...
...
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
View file @
769ba1c4
...
@@ -137,23 +137,23 @@
...
@@ -137,23 +137,23 @@
<img
class=
"card-img"
:src=
"item.img"
style=
"width: 248rpx; height: 240rpx"
/>
<img
class=
"card-img"
:src=
"item.img"
style=
"width: 248rpx; height: 240rpx"
/>
<view
class=
"detail-text"
>
<view
class=
"detail-text"
>
<text
class=
"detail-title"
>
{{
item
.
prodName
}}
</text>
<text
class=
"detail-title"
>
{{
item
.
prodName
}}
</text>
<text
class=
"give"
>
{{
item
.
prodName
}}
</text>
<text
class=
"give"
>
{{
item
.
brief
}}
</text>
<view
class=
"tag"
>
<view
class=
"tag"
>
<wd-tag
<wd-tag
bg-color=
"#EEEEEE"
bg-color=
"#EEEEEE"
round
round
v-for=
"(tag, tagIndex) in item.
tag
"
v-for=
"(tag, tagIndex) in item.
serveList
"
:key=
"tagIndex"
:key=
"tagIndex"
>
>
{{
tag
}}
{{
tag
.
labelName
}}
</wd-tag>
</wd-tag>
</view>
</view>
<view
class=
"detail-score"
>
<view
class=
"detail-score"
>
<text
class=
"score"
>
{{
item
.
deliveryAmount
}}
分
</text>
<text
class=
"score"
>
{{
item
.
score
}}
分
</text>
<text
class=
"num"
>
月销
{{
item
.
deliveryAmount
}}
</text>
<text
class=
"num"
>
月销
{{
item
.
monthSoldNum
}}
</text>
</view>
</view>
<view
class=
"venue"
>
<view
class=
"venue"
>
<text
class=
"place"
>
{{
item
.
prodName
}}
</text>
<text
class=
"place"
>
{{
item
.
tripArea
}}
出发
</text>
<text
class=
"price"
>
¥
{{
item
.
price
}}
</text>
<text
class=
"price"
>
¥
{{
item
.
price
}}
</text>
</view>
</view>
</view>
</view>
...
@@ -226,6 +226,13 @@ const locationFiltering = (index) => {
...
@@ -226,6 +226,13 @@ const locationFiltering = (index) => {
labelId
.
value
=
null
;
labelId
.
value
=
null
;
}
}
};
};
onPullDownRefresh
(()
=>
{
getProd
();
getPopular
();
setTimeout
(()
=>
{
uni
.
stopPullDownRefresh
();
},
1000
);
});
// 查询热门路线
// 查询热门路线
const
getPopular
=
()
=>
{
const
getPopular
=
()
=>
{
getPopularList
({
current
:
1
,
size
:
10
}).
then
((
res
)
=>
{
getPopularList
({
current
:
1
,
size
:
10
}).
then
((
res
)
=>
{
...
@@ -287,10 +294,12 @@ const getProd = () => {
...
@@ -287,10 +294,12 @@ const getProd = () => {
getProdList
(
params
).
then
((
res
)
=>
{
getProdList
(
params
).
then
((
res
)
=>
{
res
.
data
.
records
.
forEach
((
item
)
=>
{
res
.
data
.
records
.
forEach
((
item
)
=>
{
item
.
img
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
pic
;
item
.
img
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
pic
;
item
.
serveList
=
item
.
serviceList
.
slice
(
0
,
3
);
});
});
cardList
.
value
=
res
.
data
.
records
;
cardList
.
value
=
res
.
data
.
records
;
});
});
};
};
const
resetParams
=
()
=>
{
const
resetParams
=
()
=>
{
sortType
.
value
=
null
;
sortType
.
value
=
null
;
attractionId
.
value
=
null
;
attractionId
.
value
=
null
;
...
@@ -549,6 +558,6 @@ page {
...
@@ -549,6 +558,6 @@ page {
height
:
56rpx
;
height
:
56rpx
;
}
}
.detail-score
{
.detail-score
{
margin-top
:
9
0rpx
;
margin-top
:
3
0rpx
;
}
}
</
style
>
</
style
>
src/pages/assistingAgriculture/cart/ConfirmOrder.vue
View file @
769ba1c4
...
@@ -356,9 +356,6 @@ const params = ref({
...
@@ -356,9 +356,6 @@ const params = ref({
});
});
const
PaymentRef
=
ref
(
null
);
const
PaymentRef
=
ref
(
null
);
const
openZfType
=
()
=>
{
PaymentRef
.
value
.
open
();
};
const
payNow
=
async
(
data
)
=>
{
const
payNow
=
async
(
data
)
=>
{
params
.
value
.
id
=
orderInfo
.
value
.
key
;
params
.
value
.
id
=
orderInfo
.
value
.
key
;
params
.
value
.
tradeType
=
data
.
selectType
;
params
.
value
.
tradeType
=
data
.
selectType
;
...
...
src/pages/storeEntry/detail.vue
View file @
769ba1c4
This diff is collapsed.
Click to expand it.
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