Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
occloud-server
Overview
Overview
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
yangjiarong
occloud-server
Commits
90486b11
Commit
90486b11
authored
Jul 19, 2022
by
liuliufashi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
bbc53a2a
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
108 additions
and
69 deletions
+108
-69
.env.dev
web-vue-admin/.env.dev
+3
-1
.env.prod
web-vue-admin/.env.prod
+3
-1
package.json
web-vue-admin/package.json
+1
-1
safari-pinned-tab.svg
web-vue-admin/public/img/icons/safari-pinned-tab.svg
+2
-2
index.ts
web-vue-admin/src/api/index.ts
+13
-3
request.ts
web-vue-admin/src/utils/request.ts
+1
-1
index.vue
...-admin/src/views/goods-cabinet/components/goods/index.vue
+4
-4
index.vue
...min/src/views/goods-cabinet/components/goodsubs/index.vue
+2
-12
index.vue
web-vue-admin/src/views/goods-cabinet/index.vue
+7
-8
index.vue
...e-admin/src/views/pay-list/components/createpay/index.vue
+4
-4
index.vue
web-vue-admin/src/views/pay-list/index.vue
+58
-31
vue.config.js
web-vue-admin/vue.config.js
+10
-1
No files found.
web-vue-admin/.env.dev
View file @
90486b11
VUE_APP_MODE = 'dev'
NODE_ENV = 'development'
VUE_APP_BASE_URL = 'http://47.102.211.197:8092'
VUE_APP_BASE_URL = '/iships/'
VUE_APP_MODE = 'http://47.102.211.197:8092'
VUE_APP_TEXT = '测试环境'
\ No newline at end of file
web-vue-admin/.env.prod
View file @
90486b11
VUE_APP_MODE = 'prod'
NODE_ENV = 'production'
VUE_APP_BASE_URL = 'http://47.102.211.197:8092'
VUE_APP_BASE_URL = '/iships/'
VUE_APP_MODE = 'http://47.102.211.197:8092'
VUE_APP_TEXT = '生产环境'
\ No newline at end of file
web-vue-admin/package.json
View file @
90486b11
...
...
@@ -4,7 +4,7 @@
"private"
:
true
,
"scripts"
:
{
"serve"
:
"vue-cli-service serve"
,
"build"
:
"vue-cli-service build"
,
"build"
:
"vue-cli-service build
--mode prod
"
,
"lint"
:
"vue-cli-service lint"
,
"dev"
:
"vue-cli-service serve --mode dev --open"
,
"prod"
:
"vue-cli-service serve --mode prod --open"
,
...
...
web-vue-admin/public/img/icons/safari-pinned-tab.svg
View file @
90486b11
<svg
width=
"16"
height=
"16"
viewBox=
"0 0 16 16"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<
!-- <
svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.00251 14.9297L0 1.07422H6.14651L8.00251 4.27503L9.84583 1.07422H16L8.00251 14.9297Z" fill="black"/>
</svg>
</svg>
-->
web-vue-admin/src/api/index.ts
View file @
90486b11
...
...
@@ -158,8 +158,18 @@ export const onUpdateGoods = async(data:any)=>{
export
const
onUpdateGoodsPay
=
async
(
data
:
any
)
=>
{
return
await
request
({
url
:
`/goods/updategoodspay
2
`
,
url
:
`/goods/updategoodspay`
,
method
:
'post'
,
data
});
}
\ No newline at end of file
}
export
const
onDelectgoodpay
=
async
(
data
:
any
)
=>
{
console
.
log
(
data
,
'data'
);
return
await
request
({
url
:
`/goods/delectgoodpay?goodspayid=
${
data
.
goodsid
}
&uid=
${
data
.
uid
}
`
,
method
:
'post'
,
});
}
// /goods/delectgoodpay
\ No newline at end of file
web-vue-admin/src/utils/request.ts
View file @
90486b11
...
...
@@ -4,7 +4,7 @@ import { getToken } from "./token";
// 创建axios实例
const
instance
=
axios
.
create
({
baseURL
:
process
.
env
.
VUE_APP_
BASE_URL
,
baseURL
:
process
.
env
.
VUE_APP_
MODE
,
// 设置相应的时间
timeout
:
5000
,
headers
:
{
...
...
web-vue-admin/src/views/goods-cabinet/components/goods/index.vue
View file @
90486b11
...
...
@@ -165,16 +165,16 @@ const plainOptions = [
const
props
=
defineProps
();
const
emit
=
defineEmits
([
'onBack'
]);
let
content
=
ref
(
""
);
const
myQuillEditor
=
ref
(
null
);
const
myQuillEditor
=
ref
<
any
>
(
null
);
const
crossedPrice
=
ref
<
Number
>
(
1
);
const
sellingPrice
=
ref
<
Number
>
(
1
);
const
value
=
ref
<
number
>
(
1
);
const
previewVisible
=
ref
(
false
);
const
previewImage
=
ref
(
""
);
const
previewTitle
=
ref
(
""
);
const
fileList
=
ref
<
UploadProps
[
"fileList"
]
>
([
const
fileList
=
ref
<
any
>
([
]);
let
isEditfileList
=
ref
<
UploadProps
[
"fileList"
]
>
([
let
isEditfileList
=
ref
<
any
>
([
]);
const
optionsEdit
=
reactive
({
modules
:
{
...
...
@@ -362,7 +362,7 @@ const onSubmit = () => {
};
watch
(
isEditfileList
,
(
newVal
,
old
)
=>
{
watch
(
isEditfileList
,
(
newVal
:
any
,
old
)
=>
{
if
(
newVal
[
0
])
{
const
str
=
myQuillEditor
.
value
.
getHTML
()
+
`<img src=
${
newVal
[
0
].
response
.
data
}
>`
myQuillEditor
.
value
.
setHTML
(
str
)
...
...
web-vue-admin/src/views/goods-cabinet/components/goodsubs/index.vue
View file @
90486b11
...
...
@@ -136,7 +136,7 @@ const plainOptions = [
const
props
=
defineProps
();
const
emit
=
defineEmits
([
'onBack'
]);
let
content
=
ref
(
""
);
const
myQuillEditor
=
ref
(
null
);
const
myQuillEditor
=
ref
<
any
>
(
null
);
const
crossedPrice
=
ref
<
Number
>
(
1
);
const
sellingPrice
=
ref
<
Number
>
(
1
);
const
value
=
ref
<
number
>
(
1
);
...
...
@@ -157,16 +157,6 @@ const fileList = ref<UploadProps["fileList"]>([
[{
color
:
[]
},
{
background
:
[]
}],
[{
align
:
[]
}],
],
handlers
:
{
image
:
function
(
value
:
any
)
{
if
(
value
)
{
// 调用element图片上传
// document.querySelector(".editor-img-uploader>.el-upload").click();
}
else
{
Quill
.
format
(
"image"
,
true
);
}
},
},
},
history
:
{
delay
:
1000
,
...
...
@@ -361,7 +351,7 @@ const onBeforeUpload: UploadProps['beforeUpload'] = file => {
return
Upload
.
LIST_IGNORE
;
}
};
watch
(
isEditfileList
,
(
newVal
,
old
)
=>
{
watch
(
isEditfileList
,
(
newVal
:
any
)
=>
{
if
(
newVal
[
0
])
{
const
str
=
myQuillEditor
.
value
.
getHTML
()
+
`<img src=
${
newVal
[
0
].
response
.
data
}
>`
myQuillEditor
.
value
.
setHTML
(
str
)
...
...
web-vue-admin/src/views/goods-cabinet/index.vue
View file @
90486b11
...
...
@@ -20,7 +20,7 @@
<template
#
bodyCell=
"
{ column, record }">
<template
v-if=
"column.key === 'tags'"
>
<a-button
type=
"primary"
@
click=
"onEdit(record)"
>
编辑
</a-button>
<
a-button
type=
"primary"
style=
"margin-left: 20px"
>
统计
</a-button
>
<
!--
<a-button
type=
"primary"
style=
"margin-left: 20px"
>
统计
</a-button>
--
>
<a-popconfirm
title=
"确定删除这条数据"
ok-text=
"确定"
cancel-text=
"取消"
@
confirm=
"onDel(record)"
>
<a-button
type=
"primary"
style=
"margin-left: 20px"
>
删除
</a-button>
</a-popconfirm>
...
...
@@ -142,14 +142,14 @@
</div>
</template>
<
script
lang=
"ts"
setup
>
import
{
ref
,
reactive
,
defineExpose
,
onMounted
,
watch
}
from
"vue"
;
import
{
ref
,
reactive
,
defineExpose
,
onMounted
,
watch
,
toRaw
}
from
"vue"
;
import
{
LeftOutlined
}
from
"@ant-design/icons-vue"
;
import
GoodsBags
from
"./components/goods/index.vue"
;
import
GoodsBagSubs
from
"./components/goodsubs/index.vue"
;
import
{
onSelectGoods
,
onfindby
,
onUpdateGoods
}
from
"@/api/index"
;
import
{
getUid
}
from
"@/utils/userInfo"
;
import
{
Form
,
message
,
Upload
}
from
'ant-design-vue'
;
import
{
QuillEditor
}
from
'@vueup/vue-quill'
import
{
Form
,
message
,
Upload
,
UploadProps
}
from
'ant-design-vue'
;
import
{
Quill
,
Quill
Editor
}
from
'@vueup/vue-quill'
import
'@vueup/vue-quill/dist/vue-quill.snow.css'
;
const
useForm
=
Form
.
useForm
;
...
...
@@ -241,9 +241,9 @@ let modelRef = ref<any>({});
const
propsData
=
reactive
<
props
>
({
isCad
:
0
,
});
let
isEditfileList
=
ref
<
UploadProps
[
"fileList"
]
>
([
let
isEditfileList
=
ref
<
any
>
([
]);
const
fileList
=
ref
<
UploadProps
[
"fileList"
]
>
([
const
fileList
=
ref
<
any
>
([
{
uid
:
'-1'
,
name
:
'image.png'
,
...
...
@@ -278,8 +278,7 @@ const handleOk = async () => {
free
:
modelRef
.
value
.
sellingmodel
,
sub
:
[
0
]
}
const
data
=
await
onUpdateGoods
(
prarms
);
console
.
log
(
data
);
const
data
:
any
=
await
onUpdateGoods
(
prarms
);
if
(
data
.
state
===
1
)
{
visible
.
value
=
false
;
modelRef
.
value
=
{}
...
...
web-vue-admin/src/views/pay-list/components/createpay/index.vue
View file @
90486b11
...
...
@@ -9,7 +9,7 @@
<a-select
v-model:value=
"formState.subject"
style=
"width: 100%"
:options=
"optionss.map((item
,index
) => (
{ value: item.goodsid, label: item.subject,index:index }))"
:options=
"optionss.map((item
:any,index:number
) => (
{ value: item.goodsid, label: item.subject,index:index }))"
@change="onSelectss"
>
...
...
@@ -116,7 +116,7 @@ interface FormState {
}
const
visible
=
ref
<
boolean
>
(
false
);
const
list
=
ref
([])
const
optionss
=
ref
([])
const
optionss
=
ref
<
any
>
([])
let
goodspayditch
=
ref
([{}])
const
props
=
defineProps
();
const
dateFormat
=
'YYYY/MM/DD'
;
...
...
@@ -175,7 +175,7 @@ const onSubmit = () => {
const
uid
=
getUid
()
const
starttime
=
(
moment
(
toRaw
(
formState
).
starttime
.
$d
).
format
(
'YYYY-MM-DD'
))
+
(
moment
(
startvalue
.
value
.
$d
).
format
(
'THH:mm:[00][Z]'
))
const
expireendtime
=
(
moment
(
toRaw
(
formState
).
expireendtime
.
$d
).
format
(
'YYYY-MM-DD'
))
+
(
moment
(
endvalue
.
value
.
$d
).
format
(
'THH:mm:[00][Z]'
))
goodspayditch
.
value
.
map
((
item
)
=>
{
return
item
.
goodsid
=
toRaw
(
formState
).
subject
.
value
})
goodspayditch
.
value
.
map
((
item
:
any
)
=>
{
return
item
.
goodsid
=
toRaw
(
formState
).
subject
.
value
})
const
prarms
=
{
subject
:
toRaw
(
formState
).
subject
.
label
,
shortname
:
toRaw
(
formState
).
shortname
,
...
...
@@ -249,7 +249,7 @@ onMounted(async () => {
optionss
.
value
=
data
.
data
return
optionss
})
watch
(
formState
,(
newVal
,
oldVal
)
=>
{
watch
(
formState
,(
newVal
:
any
)
=>
{
if
(
newVal
.
paymentmodel
==
'0'
){
price
.
value
=
optionss
.
value
[
newVal
.
subject
.
index
].
price
}
...
...
web-vue-admin/src/views/pay-list/index.vue
View file @
90486b11
...
...
@@ -37,7 +37,7 @@
<div
v-if=
"column.key == 'tags'"
>
<a-button
type=
"primary"
@
click=
"onEdit(record)"
>
编辑
</a-button>
<a-button
type=
"primary"
style=
"margin-left: 20px;"
@
click=
"onCopy(record)"
>
支付链接
</a-button>
<
a-button
type=
"primary"
style=
"margin-left: 20px;"
>
统计
</a-button
>
<
!--
<a-button
type=
"primary"
style=
"margin-left: 20px;"
>
统计
</a-button>
--
>
<a-popconfirm
title=
"确定下架这条数据"
ok-text=
"确定"
cancel-text=
"取消"
@
confirm=
"onDel(record)"
>
<a-button
type=
"primary"
style=
"margin-left: 20px"
>
删除
</a-button>
</a-popconfirm>
...
...
@@ -61,7 +61,7 @@
<a-form-item
label=
"选择商品"
name=
"subject"
:label-col=
"{ span: 2 }"
labelAlign=
"left"
>
<div
style=
"width:100%;display: flex;align-items: center;"
>
<a-select
v-model:value=
"formState.subject"
style=
"width: 120px"
:options=
"listArray.map((item
, index
) => ({ value: item.goodsid, label: item.subject, index: index }))"
@
change=
"onSelect"
>
:options=
"listArray.map((item
:any, index:number
) => ({ value: item.goodsid, label: item.subject, index: index }))"
@
change=
"onSelect"
>
</a-select>
</div>
</a-form-item>
...
...
@@ -104,16 +104,16 @@
</a-form-item>
<a-form-item
label=
"开始时间"
name=
"price"
:label-col=
"{ span: 2 }"
labelAlign=
"left"
>
<div
style=
"display:flex"
>
<
!-- <a-date-picker v-model:value="formState.starttime
" :format="dateFormat"
:disabledDate="disabledDate" />
-->
<a-time-picker
v-model:value=
"
formState.startvalue
"
format=
"HH:mm"
/>
<
a-date-picker
v-model:value=
"value2
"
:format=
"dateFormat"
:disabledDate=
"disabledDate"
/>
<a-time-picker
v-model:value=
"
value3
"
format=
"HH:mm"
/>
</div>
</a-form-item>
<a-form-item
label=
"结束时间"
name=
"price"
:label-col=
"{ span: 2 }"
labelAlign=
"left"
>
<div
style=
"display:flex"
>
<
!-- <a-date-picker v-model:value="formState.expireendtime
" :format="dateFormat"
:disabledDate="disabledDate" />
-->
<a-time-picker
v-model:value=
"
formState.endvalue
"
format=
"HH:mm"
/>
<
a-date-picker
v-model:value=
"value4
"
:format=
"dateFormat"
:disabledDate=
"disabledDate"
/>
<a-time-picker
v-model:value=
"
value5
"
format=
"HH:mm"
/>
</div>
</a-form-item>
<a-form-item
label=
"信息备注"
name=
"price"
:label-col=
"{ span: 2 }"
labelAlign=
"left"
>
...
...
@@ -131,10 +131,9 @@ import { ref, defineExpose, onMounted, } from 'vue';
import
{
SelectProps
,
message
}
from
'ant-design-vue'
;
import
{
getUid
}
from
'@/utils/userInfo'
import
moment
from
'moment'
;
import
{
onUpdateGoodsPay
,
onfindby
,
onSelectGoods
,
onfindWX
,
onfindAli
}
from
'@/api/index'
import
{
onUpdateGoodsPay
,
onfindby
,
onSelectGoods
,
onfindWX
,
onfindAli
,
onDelectgoodpay
}
from
'@/api/index'
import
CreatePay
from
'./components/createpay/index.vue'
import
dayjs
,
{
Dayjs
}
from
'dayjs'
;
import
locale
from
'ant-design-vue/es/date-picker/locale/zh_CN'
;
import
useClipboard
from
'vue-clipboard3'
import
{
LeftOutlined
}
from
"@ant-design/icons-vue"
;
const
dateFormat
=
'YYYY/MM/DD'
;
...
...
@@ -200,30 +199,55 @@ const columns = [
},
]
const
visible
=
ref
<
boolean
>
(
false
);
const
value2
=
ref
<
any
>
(
dayjs
(
'2015/01/01'
,
dateFormat
))
const
value3
=
ref
<
any
>
()
const
value4
=
ref
<
any
>
(
dayjs
(
'2015/01/01'
,
dateFormat
))
const
value5
=
ref
<
any
>
()
const
showModal
=
()
=>
{
visible
.
value
=
true
;
};
const
handleOk
=
async
(
e
:
MouseEvent
)
=>
{
const
starttime
=
(
moment
(
value2
.
value
.
$d
).
format
(
'YYYY-MM-DD'
))
+
(
moment
(
value3
.
value
.
$d
).
format
(
'THH:mm:[00][Z]'
))
const
expireendtime
=
(
moment
(
value4
.
value
.
$d
).
format
(
'YYYY-MM-DD'
))
+
(
moment
(
value5
.
value
.
$d
).
format
(
'THH:mm:[00][Z]'
))
const
uid
=
getUid
()
const
params
=
{
...
formState
.
value
,
uid
,
goodsid
:
formState
.
value
.
goodspayditch
[
0
].
goodsid
id
:
formState
.
value
.
id
,
goodsid
:
formState
.
value
.
goodspayditch
[
0
].
goodsid
,
paymentmodel
:
formState
.
value
.
paymentmodel
,
payment
:
formState
.
value
.
payment
,
fullphone
:
formState
.
value
.
fullphone
,
expiremodel
:
formState
.
value
.
expiremodel
,
expireendtime
:
expireendtime
,
expiremillisecond
:
formState
.
value
.
expiremillisecond
,
starttime
:
starttime
,
subject
:
formState
.
value
.
subject
,
uid
:
uid
,
status
:
formState
.
value
.
status
,
shortname
:
formState
.
value
.
shortname
,
remark
:
formState
.
value
.
remark
,
goodspayditch
:
formState
.
value
.
goodspayditch
.
map
((
item
:
any
)
=>
{
return
{
id
:
item
.
id
,
payname
:
item
.
payname
,
optpay
:
item
.
optpay
,
random
:
item
.
random
,
appointpay
:
item
.
appointpay
}
})
}
const
data
:
any
=
await
onUpdateGoodsPay
(
params
)
if
(
data
.
state
==
1
){
visible
.
value
=
false
;
onSearch
()
}
const
data
=
await
onUpdateGoodsPay
(
params
)
console
.
log
(
data
,
'data'
);
// console.log(e);
// visible.value = false;
};
const
onEdit
=
(
e
:
any
)
=>
{
console
.
log
(
e
,
'e'
);
formState
.
value
=
e
formState
.
value
=
e
value2
.
value
=
dayjs
(
moment
(
formState
.
value
.
starttime
).
format
((
'YYYY/MM/DD'
)),
dateFormat
)
value3
.
value
=
dayjs
(
moment
(
formState
.
value
.
starttime
).
format
((
'HH:mm'
)),
'HH:mm'
)
value4
.
value
=
dayjs
(
moment
(
formState
.
value
.
expireendtime
).
format
((
'YYYY-MM-DD'
)),
dateFormat
)
value5
.
value
=
dayjs
(
moment
(
formState
.
value
.
expireendtime
).
format
((
'HH:mm'
)),
'HH:mm'
)
showModal
()
}
const
onSearch
=
async
()
=>
{
...
...
@@ -264,13 +288,13 @@ const onSet = async(index:string)=>{
list
.
value
=
data
.
data
;
}
const
onDel
=
async
(
e
:
any
)
=>
{
e
.
status
=
'1'
e
.
uid
=
getUid
()
e
.
goodsid
=
e
.
goodspayditch
[
0
].
goods
id
e
.
expiremodel
=
'0'
const
data
:
any
=
await
on
UpdateGoodsPay
(
e
)
const
prarms
=
{
uid
:
getUid
(),
goodsid
:
e
.
id
}
const
data
:
any
=
await
on
Delectgoodpay
(
prarms
)
if
(
data
.
state
==
1
){
await
init
()
await
onSearch
()
}
}
const
onFinish
=
(
values
:
any
)
=>
{
...
...
@@ -307,11 +331,14 @@ defineExpose({
checkboxValue
,
optionsWithDisabled
,
dateFormat
,
locale
,
startvalue
,
endvalue
,
listValue
,
list
,
value2
,
value3
,
value4
,
value5
,
onSet
,
onSearch
,
columns
,
...
...
web-vue-admin/vue.config.js
View file @
90486b11
module
.
exports
=
{
transpileDependencies
:
true
,
lintOnSave
:
false
,
pwa
:
{
iconPaths
:
{
favicon32
:
'favicon.ico'
,
favicon16
:
'favicon.ico'
,
appleTouchIcon
:
'favicon.ico'
,
maskIcon
:
'favicon.ico'
,
msTileImage
:
'favicon.ico'
}
},
css
:
{
loaderOptions
:
{
less
:
{
...
...
@@ -29,7 +38,7 @@ module.exports = {
devServer
:
{
proxy
:
{
'/api'
:
{
target
:
process
.
env
.
VUE_APP_
BASE_URL
,
target
:
process
.
env
.
VUE_APP_
MODE
,
ws
:
true
,
//代理websocked
changeOrigin
:
true
,
secure
:
false
,
//target是否为https接口
...
...
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