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
064c1a29
Commit
064c1a29
authored
Aug 12, 2024
by
石建新(贵阳日报)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善支付页面
parent
05249844
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
3 deletions
+29
-3
ConfirmOrder.vue
src/pages/assistingAgriculture/cart/ConfirmOrder.vue
+27
-1
loading.vue
src/pages/index/loading.vue
+2
-2
No files found.
src/pages/assistingAgriculture/cart/ConfirmOrder.vue
View file @
064c1a29
...
@@ -151,6 +151,7 @@ import {
...
@@ -151,6 +151,7 @@ import {
previewOrderBasketUpdate
,
previewOrderBasketUpdate
,
sgyOrderOrderInfo
,
sgyOrderOrderInfo
,
}
from
'@/api/assistingAgriculture/shop'
;
}
from
'@/api/assistingAgriculture/shop'
;
import
{
groupBuyConfirm
}
from
'@/api/confirmOrder'
;
const
imgUrl
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
imgUrl
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
textInputs
=
ref
(
''
);
const
textInputs
=
ref
(
''
);
const
basketIds
=
ref
([]);
const
basketIds
=
ref
([]);
...
@@ -159,17 +160,27 @@ const changeAddress = ref(false);
...
@@ -159,17 +160,27 @@ const changeAddress = ref(false);
const
addressParams
=
ref
({});
const
addressParams
=
ref
({});
const
showpopup
=
ref
(
false
);
const
showpopup
=
ref
(
false
);
const
outTradeNos
=
ref
(
null
);
const
outTradeNos
=
ref
(
null
);
const
prodIds
=
ref
(
null
);
const
skuIds
=
ref
(
null
);
const
types
=
ref
(
''
);
const
inputLength
=
computed
(()
=>
{
const
inputLength
=
computed
(()
=>
{
return
textInputs
.
value
.
length
;
return
textInputs
.
value
.
length
;
});
});
onLoad
((
options
)
=>
{
onLoad
((
options
)
=>
{
const
{
ids
}
=
options
;
const
{
ids
,
type
,
prodId
,
skuId
}
=
options
;
prodIds
.
value
=
prodId
;
skuIds
.
value
=
skuId
;
types
.
value
=
type
;
basketIds
.
value
=
ids
.
split
(
','
);
basketIds
.
value
=
ids
.
split
(
','
);
if
(
type
===
'qg'
)
{
groupBuyConfirmFn
(
prodId
,
skuId
);
}
else
{
sgyrddBasketConfirmFn
(
basketIds
.
value
).
then
(()
=>
{
sgyrddBasketConfirmFn
(
basketIds
.
value
).
then
(()
=>
{
useraddrDefaultUserAddrFn
().
then
(()
=>
{
useraddrDefaultUserAddrFn
().
then
(()
=>
{
groupBuyUpdateFn
();
groupBuyUpdateFn
();
});
});
});
});
}
});
});
onShow
(()
=>
{
onShow
(()
=>
{
if
(
changeAddress
.
value
)
{
if
(
changeAddress
.
value
)
{
...
@@ -211,6 +222,21 @@ onShow(() => {
...
@@ -211,6 +222,21 @@ onShow(() => {
}
}
});
});
function
groupBuyConfirmFn
(
prodId
,
skuId
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
groupBuyConfirm
({
prodId
,
skuId
}).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
res
.
data
.
orderItems
[
0
].
pic
=
imgUrl
+
res
.
data
.
orderItems
[
0
].
pic
;
orderInfo
.
value
=
res
.
data
;
resolve
(
res
.
data
.
shopId
);
}
else
{
wx
.
showToast
({
title
:
res
.
msg
,
});
}
});
});
}
const
orderInfo
=
ref
({});
const
orderInfo
=
ref
({});
const
sgyrddBasketConfirmFn
=
(
basketIds
)
=>
{
const
sgyrddBasketConfirmFn
=
(
basketIds
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
src/pages/index/loading.vue
View file @
064c1a29
...
@@ -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'
;
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
await
signIn
();
//
await signIn();
//
if (!getToken()) await signIn2();
if
(
!
getToken
())
await
signIn2
();
xma
.
reLaunch
({
url
:
'/pages/index/index'
});
xma
.
reLaunch
({
url
:
'/pages/index/index'
});
});
});
...
...
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