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
5bab3427
Commit
5bab3427
authored
Aug 07, 2024
by
刘玉宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入驻
parent
e9af9364
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
30 deletions
+64
-30
remark.vue
src/pages/order/remark.vue
+43
-23
index.vue
src/pages/storeEntry/index.vue
+21
-7
No files found.
src/pages/order/remark.vue
View file @
5bab3427
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
<view
class=
"itemPicker"
>
<view
class=
"itemPicker"
>
<view
class=
"item01"
>
<view
class=
"item01"
>
<text
class=
"label"
>
评分
</text>
<text
class=
"label"
>
评分
</text>
<!-- 评分 -->
<wd-rate
<wd-rate
prop=
"merchantServices"
prop=
"merchantServices"
v-model=
"formdata.merchantServices"
v-model=
"formdata.merchantServices"
...
@@ -20,23 +21,25 @@
...
@@ -20,23 +21,25 @@
<text>
{{
merList
[
formdata
.
merchantServices
]
}}
</text>
<text>
{{
merList
[
formdata
.
merchantServices
]
}}
</text>
</view>
</view>
</view>
</view>
<!-- 内容描述 -->
<wd-textarea
<wd-textarea
prop=
"evaluation"
prop=
"evaluation"
v-model=
"formdata.evaluation"
v-model=
"formdata.evaluation"
placeholder=
"亲,分享您的看法,给其他人一个参考哦!"
placeholder=
"亲,分享您的看法,给其他人一个参考哦!"
/>
/>
<text
class=
"textarea"
>
上传图片/视频
</text>
<text
class=
"textarea"
>
上传图片/视频
</text>
<!-- 图片上传 -->
<view
class=
"wdUpload"
prop=
"images"
>
<view
class=
"wdUpload"
prop=
"images"
>
<wd-upload
<wd-upload
multiple
multiple
:action=
"action"
:action=
"action"
@
change=
"handleFile"
@
change=
"handleFile"
:file-list=
"f
ormdata.images
"
:file-list=
"f
List
"
:before-remove=
"beforeRemove"
:before-remove=
"beforeRemove"
:header=
"headers"
:header=
"headers"
></wd-upload>
></wd-upload>
</view>
</view>
<!-- 匿名评价 -->
<wd-cell
title=
"匿名评价"
prop=
"isAnonymous"
class=
"itemSwichval"
>
<wd-cell
title=
"匿名评价"
prop=
"isAnonymous"
class=
"itemSwichval"
>
<wd-switch
<wd-switch
size=
"48rpx"
size=
"48rpx"
...
@@ -63,7 +66,8 @@
...
@@ -63,7 +66,8 @@
import
Header
from
'./components/Header/index.vue'
;
import
Header
from
'./components/Header/index.vue'
;
import
{
getToken
}
from
'@/utils/auth'
;
import
{
getToken
}
from
'@/utils/auth'
;
import
{
evaluation
}
from
'@/api/order'
;
import
{
evaluation
}
from
'@/api/order'
;
import
{
useToast
}
from
'wot-design-uni'
;
const
uToast
=
useToast
();
const
form
=
ref
();
const
form
=
ref
();
const
token
=
getToken
();
const
token
=
getToken
();
// 上传图片地址
// 上传图片地址
...
@@ -74,7 +78,6 @@ const headers = ref();
...
@@ -74,7 +78,6 @@ const headers = ref();
*/
*/
const
shopname
=
ref
<
string
>
(
''
);
const
shopname
=
ref
<
string
>
(
''
);
onLoad
((
options
)
=>
{
onLoad
((
options
)
=>
{
console
.
log
(
options
);
shopname
.
value
=
options
?.
shopName
;
shopname
.
value
=
options
?.
shopName
;
formdata
.
orderNumber
=
options
?.
orderNumber
;
formdata
.
orderNumber
=
options
?.
orderNumber
;
headers
.
value
=
{
Authorization
:
'Bearer '
+
token
};
headers
.
value
=
{
Authorization
:
'Bearer '
+
token
};
...
@@ -83,18 +86,28 @@ onLoad((options) => {
...
@@ -83,18 +86,28 @@ onLoad((options) => {
const
formdata
=
reactive
<
{
const
formdata
=
reactive
<
{
orderNumber
:
string
;
orderNumber
:
string
;
evaluation
:
string
;
evaluation
:
string
;
images
:
string
;
images
:
string
[]
;
isAnonymous
:
number
;
isAnonymous
:
number
;
descriptionMatches
:
number
;
merchantServices
:
number
;
merchantServices
:
number
;
}
>
({
}
>
({
orderNumber
:
''
,
orderNumber
:
''
,
evaluation
:
''
,
evaluation
:
''
,
images
:
''
,
images
:
[]
,
isAnonymous
:
0
,
isAnonymous
:
0
,
descriptionMatches
:
0
,
merchantServices
:
0
,
merchantServices
:
0
,
});
});
const
rules
=
{};
/**
* 表单验证规则
*/
const
rules
=
{
images
:
{
required
:
true
,
message
:
'请上传图片'
},
evaluation
:
{
required
:
true
,
message
:
'请填写评价内容'
},
merchantServices
:
{
required
:
true
,
message
:
'请选择商家服务评分'
},
};
/**
/**
* 显示推荐菜
* 显示推荐菜
*/
*/
...
@@ -118,16 +131,15 @@ const handlemerchant = (item: { value: number }) => {
...
@@ -118,16 +131,15 @@ const handlemerchant = (item: { value: number }) => {
/**
/**
* 图片上传
* 图片上传
*/
*/
const
f
ile
List
=
ref
<
any
[]
>
([]);
const
fList
=
ref
<
any
[]
>
([]);
function
handleFile
({
fileList
:
files
})
{
function
handleFile
({
fileList
:
files
})
{
console
.
log
(
'fileList'
,
formdata
.
images
);
fList
.
value
=
files
;
fileList
.
value
=
files
;
}
}
/**
/**
* 图片地址处理
* 图片地址处理
*/
*/
const
proImage
=
()
=>
{
const
proImage
=
()
=>
{
const
data
=
f
ile
List
.
value
.
map
((
item
)
=>
{
const
data
=
fList
.
value
.
map
((
item
)
=>
{
return
JSON
.
parse
(
item
.
response
).
data
.
url
;
return
JSON
.
parse
(
item
.
response
).
data
.
url
;
});
});
return
data
.
join
(
','
);
return
data
.
join
(
','
);
...
@@ -135,33 +147,41 @@ const proImage = () => {
...
@@ -135,33 +147,41 @@ const proImage = () => {
const
overshow
=
ref
<
boolean
>
(
false
);
const
overshow
=
ref
<
boolean
>
(
false
);
const
resolves
=
ref
();
const
resolves
=
ref
();
const
beforeRemove
=
({
file
,
fileList
,
resolve
})
=>
{
const
beforeRemove
=
({
resolve
})
=>
{
overshow
.
value
=
true
;
overshow
.
value
=
true
;
resolves
.
value
=
resolve
;
resolves
.
value
=
resolve
;
};
};
const
deleteImg
=
()
=>
{
const
deleteImg
=
()
=>
{
console
.
log
(
resolves
.
value
(
true
)
);
resolves
.
value
(
true
);
overshow
.
value
=
false
;
overshow
.
value
=
false
;
};
};
/**
/**
* Release提交
* Release提交
*/
*/
const
hdSubmit
=
async
()
=>
{
const
handleSubmit
=
async
()
=>
{
await
evaluation
({
await
evaluation
({
...
formdata
,
...
formdata
,
// images: proImage(),
images
:
proImage
(),
});
xma
.
showToast
({
title
:
'评价成功'
,
duration
:
1000
,
icon
:
'none'
,
});
});
uToast
.
success
(
'评价成功'
);
xma
.
redirectTo
({
xma
.
redirectTo
({
url
:
`/pages/order/order?status=not_eval`
,
url
:
`/pages/order/order?status=not_eval`
,
});
});
};
console
.
log
(
formdata
);
const
handleSubmit
=
async
()
=>
{
console
.
log
(
form
.
value
.
validate
());
form
.
value
.
validate
()
.
then
(({
valid
,
errors
})
=>
{
console
.
log
(
'valid'
,
valid
);
if
(
valid
)
{
uToast
.
info
({
msg
:
'校验通过'
});
}
})
.
catch
((
error
:
any
)
=>
{
console
.
log
(
error
,
'error'
);
});
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/pages/storeEntry/index.vue
View file @
5bab3427
...
@@ -5,16 +5,21 @@
...
@@ -5,16 +5,21 @@
<view
class=
"content"
>
<view
class=
"content"
>
<!-- 列表 -->
<!-- 列表 -->
<view
class=
"listcon"
>
<view
class=
"listcon"
>
<view
class=
"pubList"
v-for=
"item in list"
:key=
"item.id"
>
<view
class=
"pubList"
v-for=
"item in list"
:key=
"item.shopId"
@
click=
"item.shopStatus != [1, 2, 3] ? shopGto(item.shopId) : ''"
>
<!-- 列表头部 -->
<!-- 列表头部 -->
<view
class=
"titlecon"
>
<view
class=
"titlecon"
>
<span>
{{
item
.
shopName
}}
</span>
<span>
{{
item
.
shopName
}}
</span>
<span>
{{
item
.
shopStatus
}}
</span>
<span>
{{
shopStatus
[
item
.
shopStatus
]
}}
</span>
</view>
</view>
<!-- 列表详细 -->
<!-- 列表详细 -->
<view
class=
"delbox"
>
<view
class=
"delbox"
>
<view
class=
"listPic"
>
<view
class=
"listPic"
>
<img
:src=
"item.shopLogo"
/>
<img
:src=
"item
Url + item
.shopLogo"
/>
</view>
</view>
<view
class=
"deltxt"
>
<view
class=
"deltxt"
>
...
@@ -38,13 +43,22 @@
...
@@ -38,13 +43,22 @@
</view>
</view>
<view
class=
"shbox"
v-if=
"list.length > 0"
>
审核被拒可点击修改重新提交
</view>
<view
class=
"shbox"
v-if=
"list.length > 0"
>
审核被拒可点击修改重新提交
</view>
</view>
</view>
<view
class=
"butCon"
><button
class=
"butXz"
@
click=
"shopGto"
>
申请入驻
</button></view>
<view
class=
"butCon"
><button
class=
"butXz"
@
click=
"shopGto
()
"
>
申请入驻
</button></view>
</view>
</view>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
Header
from
'@/pages/order/components/Header/index.vue'
;
import
Header
from
'@/pages/order/components/Header/index.vue'
;
import
{
shopList
}
from
'@/api/storeEntry'
;
import
{
shopList
}
from
'@/api/storeEntry'
;
const
itemUrl
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
shopStatus
=
reactive
({
0
:
'停业中'
,
1
:
'营业中'
,
2
:
'平台下线'
,
3
:
'平台下线待审核'
,
4
:
'开店申请中'
,
5
:
'开店申请待审核'
,
});
const
list
=
ref
([]);
const
list
=
ref
([]);
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
const
{
data
:
res
}
=
await
shopList
();
const
{
data
:
res
}
=
await
shopList
();
...
@@ -52,12 +66,12 @@ const getList = async () => {
...
@@ -52,12 +66,12 @@ const getList = async () => {
if
(
res
.
length
>
0
)
{
if
(
res
.
length
>
0
)
{
list
.
value
=
res
;
list
.
value
=
res
;
}
else
{
}
else
{
//
shopGto();
shopGto
();
}
}
};
};
const
shopGto
=
()
=>
{
const
shopGto
=
(
item
)
=>
{
xma
.
redirectTo
({
xma
.
redirectTo
({
url
:
`/pages/storeEntry/detail`
,
url
:
`/pages/storeEntry/detail
${
item
?
`?id=
${
item
}
`
:
''
}
`
,
});
});
};
};
getList
();
getList
();
...
...
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