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
1f53e0a8
Commit
1f53e0a8
authored
Aug 06, 2024
by
彭佳妮(贵阳日报)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.platform.xinhuaapp.com/pengjiani/groupPurchase-miniapp
parents
88dcf3d8
880987e5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
153 additions
and
73 deletions
+153
-73
order.js
src/api/order.js
+8
-1
pages.json
src/pages.json
+8
-12
foodClassification.vue
src/pages/index/foodClassification.vue
+20
-16
remark.vue
src/pages/order/remark.vue
+117
-44
No files found.
src/api/order.js
View file @
1f53e0a8
...
@@ -79,7 +79,14 @@ export function applyForARefundApi(data) {
...
@@ -79,7 +79,14 @@ export function applyForARefundApi(data) {
data
,
data
,
});
});
}
}
// 新增订单评价
export
function
evaluation
(
data
)
{
return
request
({
url
:
'/sgyrdd/evaluation/eval'
,
method
:
'post'
,
data
,
});
}
export
function
afterSale
(
data
)
{
export
function
afterSale
(
data
)
{
return
request
({
return
request
({
url
:
'/sgyrdd/sgyOrder/afterSales/getInfo'
,
url
:
'/sgyrdd/sgyOrder/afterSales/getInfo'
,
...
...
src/pages.json
View file @
1f53e0a8
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
"^wd-(.*)"
:
"wot-design-uni/components/wd-$1/wd-$1.vue"
"^wd-(.*)"
:
"wot-design-uni/components/wd-$1/wd-$1.vue"
}
}
},
},
"pages"
:
[
"pages"
:
[
{
{
"path"
:
"pages/index/index"
,
"path"
:
"pages/index/index"
,
"style"
:
{
"style"
:
{
...
@@ -23,7 +23,8 @@
...
@@ -23,7 +23,8 @@
{
{
"path"
:
"pages/index/foodClassification"
,
"path"
:
"pages/index/foodClassification"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
""
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
true
}
}
},
},
{
{
...
@@ -87,37 +88,32 @@
...
@@ -87,37 +88,32 @@
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"美食评论"
"navigationBarTitleText"
:
"美食评论"
}
}
}
},
,
{
{
"path"
:
"pages/order/refund"
,
"path"
:
"pages/order/refund"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"申请退款"
"navigationBarTitleText"
:
"申请退款"
}
}
}
},
,
{
{
"path"
:
"pages/index/coupon"
,
"path"
:
"pages/index/coupon"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"优惠券详情"
,
"navigationBarTitleText"
:
"优惠券详情"
,
"enablePullDownRefresh"
:
true
"enablePullDownRefresh"
:
true
}
}
}
},
,
{
{
"path"
:
"pages/storeEntry/index"
,
"path"
:
"pages/storeEntry/index"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"我的店铺"
"navigationBarTitleText"
:
"我的店铺"
}
}
}
},
,
{
{
"path"
:
"pages/storeEntry/detail"
,
"path"
:
"pages/storeEntry/detail"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"商家入驻"
"navigationBarTitleText"
:
"商家入驻"
}
}
}
},
,
{
{
"path"
:
"pages/order/afterSales"
,
"path"
:
"pages/order/afterSales"
,
"style"
:
{
"style"
:
{
...
...
src/pages/index/foodClassification.vue
View file @
1f53e0a8
...
@@ -129,8 +129,8 @@ const params = ref({
...
@@ -129,8 +129,8 @@ const params = ref({
size
:
15
,
size
:
15
,
// lon,
// lon,
// lat,
// lat,
lon
:
106.68650025025502
,
lon
:
''
,
lat
:
26.567192352601154
,
lat
:
''
,
isEnd
:
false
,
isEnd
:
false
,
});
});
const
pics
=
ref
(
null
);
const
pics
=
ref
(
null
);
...
@@ -221,6 +221,13 @@ function refresh() {
...
@@ -221,6 +221,13 @@ function refresh() {
resolve
();
resolve
();
});
});
}
}
onPullDownRefresh
(()
=>
{
refresh
().
then
(()
=>
{
getMerchantList
().
then
(()
=>
{
xma
.
stopPullDownRefresh
();
});
});
});
// 根据父级分类id查询子分类列表
// 根据父级分类id查询子分类列表
const
query
=
(
parentId
)
=>
{
const
query
=
(
parentId
)
=>
{
getByParentId
(
parentId
).
then
((
res
)
=>
{
getByParentId
(
parentId
).
then
((
res
)
=>
{
...
@@ -237,13 +244,15 @@ function jumpProductDetails(prodId) {
...
@@ -237,13 +244,15 @@ function jumpProductDetails(prodId) {
}
}
const
prodSpecialFn
=
()
=>
{
const
prodSpecialFn
=
()
=>
{
prodSpecial
({
categoryId
:
categoryId
.
value
}).
then
((
res
)
=>
{
prodSpecial
({
categoryId
:
categoryId
.
value
}).
then
((
res
)
=>
{
res
.
data
.
data
=
res
.
data
.
data
.
map
((
el
)
=>
{
if
(
res
.
data
.
data
)
{
if
(
el
.
labels
&&
el
.
labels
!==
''
)
{
res
.
data
.
data
=
res
.
data
.
data
.
map
((
el
)
=>
{
el
.
labels
=
el
.
labels
.
split
(
','
);
if
(
el
.
labels
&&
el
.
labels
!==
''
)
{
}
el
.
labels
=
el
.
labels
.
split
(
','
);
return
el
;
}
});
return
el
;
topDiscountedProducts
.
value
=
res
.
data
.
data
;
});
topDiscountedProducts
.
value
=
res
.
data
.
data
;
}
});
});
};
};
const
choice
=
(
index
)
=>
{
const
choice
=
(
index
)
=>
{
...
@@ -295,13 +304,8 @@ const getMerchantList = () => {
...
@@ -295,13 +304,8 @@ const getMerchantList = () => {
item
.
labels
=
item
.
labels
.
split
(
','
);
item
.
labels
=
item
.
labels
.
split
(
','
);
}
}
});
});
return
new
Promise
((
resolve
)
=>
{
cardData
.
value
=
cardData
.
value
.
concat
(
res
.
data
.
content
);
cardData
.
value
=
cardData
.
value
.
concat
(
res
.
data
.
content
);
xma
.
hideLoading
();
xma
.
hideLoading
();
setTimeout
(()
=>
{
resolve
();
},
500
);
});
});
});
};
};
function
getLocationFn
()
{
function
getLocationFn
()
{
...
...
src/pages/order/remark.vue
View file @
1f53e0a8
...
@@ -2,76 +2,132 @@
...
@@ -2,76 +2,132 @@
<view
class=
"container"
>
<view
class=
"container"
>
<Header
title=
"评论"
></Header>
<Header
title=
"评论"
></Header>
<view
class=
"content"
>
<view
class=
"content"
>
<wd-form
ref=
"form"
:model=
"
model
"
:rules=
"rules"
class=
"remake"
>
<wd-form
ref=
"form"
:model=
"
formdata
"
:rules=
"rules"
class=
"remake"
>
<text
class=
"textarea"
>
老凯里酸汤鱼
</text>
<text
class=
"textarea"
>
{{
shopname
}}
</text>
<view
class=
"itemPicker"
>
<view
class=
"itemPicker"
>
<view
class=
"item01"
>
<view
class=
"item01"
>
<text
class=
"label"
>
评分
</text>
<text
class=
"label"
>
评分
</text>
<wd-rate
v-model=
"pinfen"
active-color=
"#ff0000"
size=
"50rpx"
space=
"10px"
/>
<wd-rate
prop=
"merchantServices"
v-model=
"formdata.merchantServices"
active-color=
"#ff0000"
size=
"50rpx"
space=
"10px"
@
change=
"handlemerchant"
/>
</view>
</view>
<view
class=
"item02"
>
<view
class=
"item02"
>
<text>
非常满意
</text>
<text>
{{
merList
[
formdata
.
merchantServices
]
}}
</text>
</view>
</view>
</view>
</view>
<wd-textarea
v-model=
"pingjia"
placeholder=
"亲,分享您的看法,给其他人一个参考哦!"
/>
<wd-textarea
prop=
"evaluation"
v-model=
"formdata.evaluation"
placeholder=
"亲,分享您的看法,给其他人一个参考哦!"
:rules=
"[
{ required: true, message: '请填写你的评价' }]"
/>
<text
class=
"textarea"
>
上传图片/视频
</text>
<text
class=
"textarea"
>
上传图片/视频
</text>
<wd-upload
<wd-upload
class=
"wdUpload"
class=
"wdUpload"
accept=
"media"
accept=
"media"
multiple
multiple
:file-list=
"fileList"
:action=
"fileUPload"
:action=
"action"
@
change=
"handleFile"
@
change=
"handleChange"
></wd-upload>
></wd-upload>
<view
class=
"tuijian"
>
<view
class=
"tjTitle"
>
<text
class=
"textarea"
>
我要推荐菜
</text>
<text
class=
"textRight"
>
查看全部(30)
<i></i>
</text>
</view>
<view
class=
"itemtuijianList"
>
<wd-button
type=
"success"
plain
classPrefix=
"fish"
icon=
"kehuishouwu"
>
主要按钮
</wd-button>
</view>
</view>
<wd-cell
title=
"开启折扣"
title-width=
"100px"
prop=
"switchVal"
center
>
<!--
<view
class=
"tuijian"
v-if=
"show"
>
<view
style=
"text-align: left"
>
<view
class=
"tjTitle"
>
<wd-switch
v-model=
"mode.switchVal"
/>
<text
class=
"textarea"
>
我要推荐菜
</text>
</view>
<text
class=
"textRight"
>
查看全部(30)
<wd-icon
name=
"arrow-right"
></wd-icon>
</text>
</view>
<view
class=
"itemtuijianList"
>
<wd-checkbox-group
shape=
"button"
>
<wd-checkbox
modelValue=
"jingmai"
checked-color=
"#f00"
shape=
"button"
></wd-checkbox>
<wd-checkbox
modelValue=
"asd"
shape=
"button"
>
沃特
</wd-checkbox>
</wd-checkbox-group>
</view>
</view>
-->
<wd-cell
title=
"匿名评价"
prop=
"isAnonymous"
class=
"itemSwichval"
>
<wd-switch
size=
"48rpx"
active-color=
"#EC1B1B"
v-model=
"formdata.isAnonymous"
active-value=
"1"
inactive-value=
"0"
/>
</wd-cell>
</wd-cell>
</wd-form>
</wd-form>
<wd-button
type=
"error"
block
>
发布
</wd-button>
<wd-button
type=
"error"
block
@
click=
"handleSubmit"
>
发布
</wd-button>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
Header
from
'./components/Header/index.vue'
;
import
Header
from
'./components/Header/index.vue'
;
import
{
evaluation
}
from
'@/api/order'
;
const
form
=
ref
();
/**
* options
*/
const
shopname
=
ref
<
string
>
(
''
);
onLoad
((
options
)
=>
{
shopname
.
value
=
options
?.
shopName
;
formdata
.
orderNumber
=
options
?.
orderNumber
;
});
const
pinfen
=
ref
<
number
>
(
0
);
const
formdata
=
reactive
<
{
function
changeValue
({
pinfen
})
{
orderNumber
:
string
;
console
.
log
(
pinfen
);
evaluation
:
string
;
}
images
:
string
[];
const
pingjia
=
ref
<
string
>
(
''
);
isAnonymous
:
number
;
descriptionMatches
:
number
;
merchantServices
:
number
;
}
>
({
orderNumber
:
''
,
evaluation
:
''
,
images
:
[],
isAnonymous
:
0
,
descriptionMatches
:
0
,
merchantServices
:
0
,
});
const
action
=
ref
<
string
>
(
'/zhTuw2P8c29bc981a741931bdd86eb04dc1e8fd64865cb5/upload'
);
const
rules
=
{};
/**
* 显示推荐菜
*/
const
show
=
ref
<
boolean
>
(
false
);
/**
* 评分
*/
const
merchantServices
=
ref
<
number
>
(
0
);
const
merList
=
ref
({
1
:
'非常差'
,
2
:
'差'
,
3
:
'一般'
,
4
:
'好'
,
5
:
'非常好'
,
});
const
handlemerchant
=
(
e
)
=>
{
merchantServices
.
value
=
e
.
value
;
};
const
fileList
=
ref
([]);
/**
* 图片上传
*/
const
fileUPload
=
ref
<
string
>
(
'/'
);
function
handleChange
({
files
})
{
function
handleFile
({
files
})
{}
fileList
.
value
=
files
;
}
const
handleSubmit
=
async
()
=>
{
const
mode
=
reactive
<
{
const
res
=
await
evaluation
();
switchVal
:
boolean
;
console
.
log
(
formdata
);
}
>
({
};
switchVal
:
true
,
});
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.container
{
.container
{
...
@@ -141,15 +197,32 @@ const mode = reactive<{
...
@@ -141,15 +197,32 @@ const mode = reactive<{
.tuijian
{
.tuijian
{
margin-top
:
72rpx
;
margin-top
:
72rpx
;
.tjTitle
{
.tjTitle
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
;
align-items
:
center
;
margin-bottom
:
40rpx
;
margin-bottom
:
40rpx
;
.textRight
{
.textRight
{
font-size
:
24rpx
;
font-size
:
24rpx
;
}
}
}
}
}
}
.itemSwichval
{
width
:
auto
;
padding
:
0
;
margin-top
:
72rpx
;
:deep
(
.wd-cell__wrapper
)
{
padding
:
0
;
align-items
:
center
;
}
}
}
.wd-cel
{
--wot-size-side-padding
:
0px
;
}
}
</
style
>
</
style
>
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