Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
msjf-customized
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
刘旭
msjf-customized
Commits
1b84dc09
提交
1b84dc09
authored
9月 19, 2022
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新订单页面
上级
cc80daf0
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
115 行增加
和
35 行删除
+115
-35
my.vue
src/pages/customized/my.vue
+7
-6
order.vue
src/pages/customized/order.vue
+88
-15
queryRecord.vue
src/pages/customized/queryRecord.vue
+1
-1
uploadImageVideo.vue
src/pages/customized/uploadImageVideo.vue
+19
-13
没有找到文件。
src/pages/customized/my.vue
浏览文件 @
1b84dc09
...
...
@@ -100,17 +100,18 @@ let initHavePage = async () => {
title
:
'加载中...'
});
let
res
:
any
=
await
getHavePage
();
if
(
res
.
statusCode
==
200
)
{
console
.
log
(
res
,
'模板数据'
);
uni
.
hideLoading
()
currencyPage
.
value
=
res
.
data
.
currencyPage
;
uni
.
$emit
(
'previewData'
,
{
previewData
:
res
.
data
.
customPage
});
}
console
.
log
(
res
,
'模板数据'
);
uni
.
hideLoading
();
currencyPage
.
value
=
res
.
data
.
currencyPage
;
uni
.
$emit
(
'previewData'
,
{
previewData
:
res
.
data
.
customPage
});
};
initHavePage
();
</
script
>
<
style
lang=
"scss"
scoped
>
page
{
background-color
:
#f2f2f2
;
}
.status_bar
{
height
:
var
(
--
status-bar-height
);
width
:
100%
;
...
...
src/pages/customized/order.vue
浏览文件 @
1b84dc09
...
...
@@ -2,14 +2,14 @@
<view
class=
"order-container"
>
<view
class=
"status_bar"
>
<!-- 这里是状态栏 -->
</view>
<headerVue
:color=
"color"
/>
<view
v-for=
"(item1, i) in titleImg"
:key=
"i"
class=
"content"
>
<
!--
<
view
v-for=
"(item1, i) in titleImg"
:key=
"i"
class=
"content"
>
<image
:src=
"item1.imgUrl"
mode=
""
class=
"order-image"
></image>
<view
v-for=
"(item, i) in orderData"
:key=
"item.id"
class=
"order-content"
>
<view
class=
"order-left"
>
<
!--
<
checkbox-group
@
change=
"selected"
style=
"margin: 0 10rpx;"
>
<checkbox-group
@
change=
"selected"
style=
"margin: 0 10rpx;"
>
<label><checkbox
class=
"selected"
color=
"#555555"
:checked=
"checked"
/></label>
</checkbox-group>
-->
<image
:src=
"item.picUrl"
mode=
"
width
Fix"
class=
"order-left-image"
></image>
</checkbox-group>
<image
:src=
"item.picUrl"
mode=
"
height
Fix"
class=
"order-left-image"
></image>
</view>
<view
class=
"order-right"
>
<text
class=
"details-top"
>
{{
item
.
goodsName
}}
</text>
...
...
@@ -18,18 +18,36 @@
<text
style=
"color: #d50000; font-size: 34rpx"
>
¥
{{
item
.
price
}}
</text>
<text
style=
"font-size: 24rpx; color: #ccc; margin-left: 20rpx"
>
{{
item
.
number
+
'件'
}}
</text>
<
!--
<text
style=
"font-size: 24rpx; color: #ccc; margin-left: 20rpx"
>
瓶 10件起订
</text>
--
>
<
!--
<
view
class=
"details-sum"
>
<
text
style=
"font-size: 24rpx; color: #ccc; margin-left: 20rpx"
>
瓶 10件起订
</text
>
<view
class=
"details-sum"
>
<text
class=
"subtract"
@
click=
"reduce"
>
-
</text>
<text
class=
"num"
>
{{
num
}}
</text>
<text
class=
"add"
@
click=
"add"
>
+
</text>
</view>
-->
</view>
</view>
</view>
</view>
</view>
-->
<view
v-for=
"(item, index) in orderData"
class=
"or-content"
>
<view
class=
"or-top"
>
<text>
订单编号:
{{
item
.
orderSn
}}
</text>
<text>
合计:¥
{{
item
.
actualPrice
}}
</text>
</view>
<view
v-for=
"(item1, i) in item.goodsList"
class=
"or-bottom"
>
<view
class=
"or-left"
><image
:src=
"item1.picUrl"
class=
"or-left-image"
/></view>
<view
class=
"order-right"
>
<text
class=
"details-top"
>
{{
item1
.
goodsName
}}
</text>
<text
class=
"details-center"
>
{{
item1
.
specifications
[
0
]
}}
</text>
<view
class=
"details-bottom"
>
<text
style=
"color: #d50000; font-size: 34rpx"
>
¥
{{
item1
.
price
}}
</text>
<text
style=
"font-size: 24rpx; color: #ccc; margin-left: 20rpx"
>
{{
item1
.
number
+
'件'
}}
</text>
</view>
</view>
</view>
</view>
<
text
style=
"font-size: 24rpx; padding: 0 30rpx; color:#ccc"
>
订购 时间:2022.8.24
</text
>
<
!--
<text
style=
"font-size: 24rpx; padding: 0 30rpx; color:#ccc"
>
订购 时间:2022.8.24
</text>
--
>
<view
class=
"qr-code"
>
<text
style=
"margin-right: 60rpx;"
>
科 技 赋 能
</text>
<image
src=
"../../static/msjf-picture/msjf-13.png"
mode=
"widthFix"
style=
"width: 144rpx;"
></image>
...
...
@@ -80,7 +98,7 @@ let titleImg = ref([
// 获取订单数据
let
initOrderList
=
async
()
=>
{
let
res
:
any
=
await
getOrderList
();
if
(
res
.
data
.
errno
===
0
)
orderData
.
value
=
res
.
data
.
data
.
list
[
0
].
goodsList
;
if
(
res
.
data
.
errno
===
0
)
orderData
.
value
=
res
.
data
.
data
.
list
;
};
onLoad
(()
=>
{
...
...
@@ -89,11 +107,67 @@ onLoad(() => {
</
script
>
<
style
lang=
"scss"
scoped
>
page
{
background-color
:
#f2f2f2
;
}
.status_bar
{
height
:
var
(
--
status-bar-height
);
width
:
100%
;
}
.order-container
{
width
:
100%
;
height
:
100vh
;
.or-content
{
margin-top
:
30rpx
;
width
:
100%
;
background-color
:
#fff
;
.or-top
{
box-sizing
:
border-box
;
display
:
flex
;
justify-content
:
space-between
;
padding
:
0
20rpx
;
width
:
100%
;
height
:
60rpx
;
line-height
:
60rpx
;
font-size
:
14px
;
}
.or-bottom
{
padding
:
10rpx
30rpx
;
box-sizing
:
border-box
;
// display: flex;
// flex-direction: row;
// align-items: center;
// justify-content: space-around;
border-top
:
1px
solid
#f2f2f2
;
border-bottom
:
1px
solid
#f2f2f2
;
.or-left
{
float
:
left
;
margin-right
:
14%
;
.or-left-image
{
width
:
130rpx
;
height
:
160rpx
;
border-radius
:
10rpx
;
}
}
.order-right
{
display
:
flex
;
flex-direction
:
column
;
.details-top
{
margin-bottom
:
4%
;
}
.details-center
{
margin-bottom
:
3%
;
}
.details-bottom
{
display
:
flex
;
justify-content
:
space-between
;
}
}
}
}
.content
{
padding
:
30rpx
;
.order-image
{
...
...
@@ -105,15 +179,15 @@ onLoad(() => {
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
flex-start
;
justify-content
:
space-between
;
box-sizing
:
border-box
;
width
:
100%
;
min-height
:
180rpx
;
max-height
:
200rpx
;
height
:
100px
;
padding
:
10rpx
20rpx
;
border
:
1px
solid
#dfdfdf
;
border-radius
:
10rpx
;
margin-bottom
:
10rpx
;
background
:
#fff
!
important
;
.order-left
{
width
:
260rpx
;
height
:
100%
;
...
...
@@ -121,11 +195,10 @@ onLoad(() => {
align-items
:
center
;
margin-right
:
20rpx
;
.order-left-image
{
width
:
120rpx
;
//
width: 120rpx;
height
:
78px
;
border-radius
:
10rpx
;
margin-right
:
30rpx
;
background-color
:
#ccc
;
}
}
.order-right
{
...
...
@@ -182,7 +255,7 @@ onLoad(() => {
position
:
fixed
;
bottom
:
0
;
width
:
100%
;
height
:
120rpx
;
height
:
120rpx
;
}
.btn-image
{
position
:
fixed
;
...
...
src/pages/customized/queryRecord.vue
浏览文件 @
1b84dc09
...
...
@@ -77,7 +77,7 @@ let confirm = async (data: any) => {
<
style
lang=
"scss"
scoped
>
page
{
background-color
:
#
eceff6
;
background-color
:
#
f2f2f2
;
}
.status_bar
{
height
:
var
(
--
status-bar-height
);
...
...
src/pages/customized/uploadImageVideo.vue
浏览文件 @
1b84dc09
...
...
@@ -2,11 +2,13 @@
<view
class=
"upload-container"
>
<uni-section
title=
"定制"
type=
"line"
>
<view
class=
"choose-img"
>
<view
v-for=
"(item, index) in imageVideoData"
:key=
"index"
class=
"box-img"
>
<view
v-if=
"item.type == 'image/jpeg'"
style=
"width: 100%;"
><image
:src=
"item.path"
mode=
"widthFix"
class=
"img-list"
/></view>
<view
v-else
style=
"width: 100%;"
><video
:src=
"item.path"
object-fit=
"fill"
class=
"img-list"
/></view>
<view
class=
"iconfont icon-icons03 replace"
@
click=
"replaceImg(index)"
style=
"color: #007aff;"
></view>
<view
class=
"iconfont icon-shanchu delele"
@
click=
"deleteImg(index)"
style=
"color: #F56C6C;"
></view>
<view
v-for=
"(item, index) in imageVideoData"
:key=
"index"
:data=
"index"
class=
"box-img"
>
<view
style=
"width: 100%;"
>
<view
v-if=
"item.type == 'image/jpeg'"
style=
"width: 100%;"
><image
:src=
"item.path"
mode=
"widthFix"
class=
"img-list"
lazy-load
/></view>
<view
v-else
style=
"width: 100%;"
><video
:src=
"item.path"
object-fit=
"fill"
class=
"img-list"
/></view>
<view
class=
"iconfont icon-icons03 replace"
@
click=
"replaceImg(index)"
style=
"color: #007aff;"
></view>
<view
class=
"iconfont icon-shanchu delele"
@
click=
"deleteImg(index)"
style=
"color: #F56C6C;"
></view>
</view>
</view>
</view>
<view
type=
"primary"
@
click=
"upload"
style=
"margin-top: 40rpx;"
class=
"addImage"
><view
class=
"iconfont icon-jia"
></view></view>
...
...
@@ -16,9 +18,9 @@
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
watch
}
from
'vue'
;
import
{
ref
}
from
'vue'
;
import
{
onLoad
}
from
'@dcloudio/uni-app'
;
import
{
saveCustomPage
,
downLoad
}
from
'@/services/api'
;
import
{
saveCustomPage
}
from
'@/services/api'
;
import
{
baseURL
}
from
'@/services/request'
;
let
imageVideoData
=
ref
([]
as
any
);
...
...
@@ -45,6 +47,9 @@ onLoad((options: any) => {
}
});
}
setTimeout
(()
=>
{
console
.
log
(
imageVideoData
.
value
);
},
50
);
}
else
if
(
type
==
'edit'
)
{
// 编辑模板列表
let
pageData
=
JSON
.
parse
(
options
.
pageData
);
...
...
@@ -104,7 +109,7 @@ let uploadVideo = () => {
let
save
=
()
=>
{
if
(
templateId
)
{
let
idArr
=
[];
let
idArr
:
any
=
[];
for
(
let
key
in
imageVideoData
.
value
)
{
uni
.
uploadFile
({
url
:
baseURL
+
'/wx/customPage/upload'
,
...
...
@@ -118,7 +123,7 @@ let save = () => {
idArr
.
push
(
res
.
data
);
if
(
Number
(
key
)
==
imageVideoData
.
value
.
length
-
1
)
{
saveCustomPage
({
fileIds
:
idArr
,
id
:
templateId
.
value
}).
then
((
res
:
any
)
=>
{
if
(
res
.
statusCode
==
20
0
)
{
if
(
res
.
data
.
errno
==
0
)
{
uni
.
hideLoading
();
imageVideoData
.
value
=
[];
close
();
...
...
@@ -133,7 +138,7 @@ let save = () => {
});
}
}
else
{
let
idArr
=
[];
let
idArr
:
any
=
[];
for
(
let
key
in
imageVideoData
.
value
)
{
uni
.
uploadFile
({
url
:
baseURL
+
'/wx/customPage/upload'
,
...
...
@@ -223,9 +228,10 @@ let close = () => {
uni
.
navigateBack
({
delta
:
1
,
success
:
()
=>
{
var
pages
:
any
=
getCurrentPages
();
var
currPage
=
pages
[
pages
.
length
-
1
];
//当前页面
var
prePage
=
pages
[
pages
.
length
-
2
];
//上一个页面
let
pages
:
any
=
getCurrentPages
();
let
currPage
=
pages
[
pages
.
length
-
1
];
//当前页面
let
prePage
=
pages
[
pages
.
length
-
2
];
//上一个页面
console
.
log
(
'返回刷新'
);
prePage
.
$vm
.
initHavePage
();
}
});
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论