Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
Project
Project
Details
Activity
Releases
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
viitto
mallapp
Commits
721e47e5
Commit
721e47e5
authored
Oct 22, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
804aa513
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
578 additions
and
610 deletions
+578
-610
index.vue
pages/MallMange/index.vue
+511
-585
api.js
plugin/api.js
+67
-25
No files found.
pages/MallMange/index.vue
View file @
721e47e5
<
template
>
<view
class=
"indexpage"
>
<view
class=
"topBox"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/bg.png"
mode=
"widthFix"
class=
"bg"
/>
<view
class=
"topinfo"
>
<view
class=
"flex-center"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cash.png"
class=
"headimg"
/>
<view
class=
"name1"
>
饭粒汪
</view>
</view>
<view
style=
"
<view
class=
"indexpage"
>
<view
class=
"topBox"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/bg.png"
mode=
"widthFix"
class=
"bg"
/>
<view
class=
"topinfo"
>
<view
class=
"flex-center"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cash.png"
class=
"headimg"
/>
<view
class=
"name1"
>
饭粒汪
</view>
</view>
<view
style=
"
display: flex;
flex-wrap: wrap;
justify-content: center;
width: 100rpx;
"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/qr_code.png"
class=
"ewmimg"
mode=
"aspectFill"
/>
<view
class=
"name2"
>
收款码
</view>
</view>
</view>
<view
class=
"msgBox flex-center"
>
<view
class=
"itemBox"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/order.png"
mode=
""
class=
"imgicon"
/>
<view
class=
"iconname"
>
订单消息
</view>
<view
class=
"tipNum"
>
1
</view>
</view>
<view
class=
"itemBox"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/msg.png"
mode=
""
class=
"imgicon"
/>
<view
class=
"iconname"
>
审核消息
</view>
</view>
<view
class=
"itemBox"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cash.png"
mode=
""
class=
"imgicon"
/>
<view
class=
"iconname"
>
提现申请
</view>
</view>
<view
class=
"itemBox"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/comment.png"
mode=
""
class=
"imgicon"
/>
<view
class=
"iconname"
>
评论管理
</view>
</view>
<view
class=
"itemBox"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/user.png"
mode=
""
class=
"imgicon"
/>
<view
class=
"iconname"
>
用户管理
</view>
</view>
</view>
</view>
<view
class=
"conditionOfBusiness"
>
<view
class=
"title"
>
经营状况
</view>
<view
class=
"day flex-center"
>
<!--
<view
class=
"dayitem choose"
>
今日
</view>
"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/qr_code.png"
class=
"ewmimg"
mode=
"aspectFill"
/>
<view
class=
"name2"
>
收款码
</view>
</view>
</view>
<view
class=
"msgBox flex-center"
>
<view
class=
"itemBox"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/order.png"
mode=
""
class=
"imgicon"
/>
<view
class=
"iconname"
>
订单消息
</view>
<view
class=
"tipNum"
>
1
</view>
</view>
<view
class=
"itemBox"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/msg.png"
mode=
""
class=
"imgicon"
/>
<view
class=
"iconname"
>
审核消息
</view>
</view>
<view
class=
"itemBox"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cash.png"
mode=
""
class=
"imgicon"
/>
<view
class=
"iconname"
>
提现申请
</view>
</view>
<view
class=
"itemBox"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/comment.png"
mode=
""
class=
"imgicon"
/>
<view
class=
"iconname"
>
评论管理
</view>
</view>
<view
class=
"itemBox"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/user.png"
mode=
""
class=
"imgicon"
/>
<view
class=
"iconname"
>
用户管理
</view>
</view>
</view>
</view>
<view
class=
"conditionOfBusiness"
>
<view
class=
"title"
>
经营状况
</view>
<view
class=
"day flex-center"
>
<!--
<view
class=
"dayitem choose"
>
今日
</view>
<view
class=
"dayitem"
>
昨日
</view>
-->
<view
class=
"dayitem"
@
click=
"handleClickDate('first')"
:class=
"
{ choose: clickDate == 'first' }"
>7日
</view
>
<view
class=
"dayitem"
@
click=
"handleClickDate('second')"
:class=
"
{ choose: clickDate == 'second' }"
>30日
</view
>
</view>
<view
class=
"BusinessData"
>
<view
class=
"dataitem"
>
<view
class=
"dataNum"
>
0
</view>
<view
class=
"dataName"
>
支付订单数
</view>
</view>
<view
class=
"dataitem"
>
<view
class=
"dataNum"
>
0.00
</view>
<view
class=
"dataName"
>
支付金额(元)
</view>
</view>
<view
class=
"dataitem"
>
<view
class=
"dataNum"
>
2
</view>
<view
class=
"dataName"
>
访客数
</view>
</view>
<view
class=
"dataitem"
>
<view
class=
"dataNum"
>
116
</view>
<view
class=
"dataName"
>
访问量
</view>
</view>
</view>
</view>
<view
class=
"fastHandle"
>
<view
class=
"title"
>
快速处理
</view>
<view
class=
"flex-center HandleBox"
>
<view
class=
"handleItem"
>
<view
class=
"handleItemNum"
>
0
</view>
<view
class=
"handleItemName"
>
待发货订单
</view>
<view
class=
"handleItemBtn"
>
立即发货
<u-icon
name=
"arrow"
></u-icon>
</view>
</view>
<view
class=
"handleItem"
>
<view
class=
"handleItemNum"
>
0
</view>
<view
class=
"handleItemName"
>
维权订单
</view>
<view
class=
"handleItemBtn"
>
立即处理
<u-icon
name=
"arrow"
></u-icon>
</view>
</view>
</view>
</view>
<view
class=
"echartsBox"
>
<view
class=
"title flex-center"
>
<picker
@
change=
"bindPickerChange"
:value=
"key"
:range=
"array"
range-key=
"name"
>
<view
class=
"payType"
>
{{
payType
}}
<u-icon
name=
"arrow-down"
></u-icon>
</view>
</picker>
<picker
@
change=
"bindPickerChange1"
:value=
"key"
:range=
"array1"
range-key=
"name"
>
<view
class=
"payType"
>
{{
payType1
}}
<u-icon
name=
"arrow-down"
></u-icon>
</view>
</picker>
</view>
<view
class=
"day flex-center"
>
<!--
<view
class=
"dayitem choose"
>
今日
</view>
<view
class=
"dayitem"
@
click=
"handleClickDate('first')"
:class=
"
{ choose: clickDate == 'first' }">7日
</view>
<view
class=
"dayitem"
@
click=
"handleClickDate('second')"
:class=
"
{ choose: clickDate == 'second' }">30日
</view>
</view>
<view
class=
"BusinessData"
>
<view
class=
"dataitem"
>
<view
class=
"dataNum"
>
0
</view>
<view
class=
"dataName"
>
支付订单数
</view>
</view>
<view
class=
"dataitem"
>
<view
class=
"dataNum"
>
0.00
</view>
<view
class=
"dataName"
>
支付金额(元)
</view>
</view>
<view
class=
"dataitem"
>
<view
class=
"dataNum"
>
2
</view>
<view
class=
"dataName"
>
访客数
</view>
</view>
<view
class=
"dataitem"
>
<view
class=
"dataNum"
>
116
</view>
<view
class=
"dataName"
>
访问量
</view>
</view>
</view>
</view>
<view
class=
"fastHandle"
>
<view
class=
"title"
>
快速处理
</view>
<view
class=
"flex-center HandleBox"
>
<view
class=
"handleItem"
>
<view
class=
"handleItemNum"
>
0
</view>
<view
class=
"handleItemName"
>
待发货订单
</view>
<view
class=
"handleItemBtn"
>
立即发货
<u-icon
name=
"arrow"
></u-icon>
</view>
</view>
<view
class=
"handleItem"
>
<view
class=
"handleItemNum"
>
0
</view>
<view
class=
"handleItemName"
>
维权订单
</view>
<view
class=
"handleItemBtn"
>
立即处理
<u-icon
name=
"arrow"
></u-icon>
</view>
</view>
</view>
</view>
<view
class=
"echartsBox"
>
<view
class=
"title flex-center"
>
<picker
@
change=
"bindPickerChange"
:value=
"key"
:range=
"array"
range-key=
"name"
>
<view
class=
"payType"
>
{{
payType
}}
<u-icon
name=
"arrow-down"
></u-icon>
</view>
</picker>
<picker
@
change=
"bindPickerChange1"
:value=
"key"
:range=
"array1"
range-key=
"name"
>
<view
class=
"payType"
>
{{
payType1
}}
<u-icon
name=
"arrow-down"
></u-icon>
</view>
</picker>
</view>
<view
class=
"day flex-center"
>
<!--
<view
class=
"dayitem choose"
>
今日
</view>
<view
class=
"dayitem"
>
昨日
</view>
-->
<view
class=
"dayitem"
@
click=
"handleClickDate('first')"
:class=
"
{ choose: clickDate == 'first' }"
>7日
</view
>
<view
class=
"dayitem"
@
click=
"handleClickDate('second')"
:class=
"
{ choose: clickDate == 'second' }"
>30日
</view
>
</view>
<view
style=
"height: 100rpx"
></view>
<canvas
canvas-id=
"canvasColumn"
id=
"canvasColumn"
class=
"charts"
disable-scroll=
"true"
@
touchstart=
"touchColumn"
@
touchmove=
"moveColumn"
@
touchend=
"touchEndColumn"
>
</canvas>
</view>
<tabbar></tabbar>
</view>
<view
class=
"dayitem"
@
click=
"handleClickDate('first')"
:class=
"
{ choose: clickDate == 'first' }">7日
</view>
<view
class=
"dayitem"
@
click=
"handleClickDate('second')"
:class=
"
{ choose: clickDate == 'second' }">30日
</view>
</view>
<view
style=
"height: 100rpx"
></view>
<canvas
canvas-id=
"canvasColumn"
id=
"canvasColumn"
class=
"charts"
disable-scroll=
"true"
@
touchstart=
"touchColumn"
@
touchmove=
"moveColumn"
@
touchend=
"touchEndColumn"
>
</canvas>
</view>
<tabbar></tabbar>
</view>
</
template
>
<
script
>
import
uCharts
from
"../school/components/u-charts/u-charts.min.js"
;
import
tabbar
from
"./components/tabbar.vue"
;
var
canvaColumn
=
null
;
var
_self
;
export
default
{
components
:
{
tabbar
,
},
data
()
{
return
{
array
:
[
{
name
:
"支付金额"
,
key
:
1
,
},
{
name
:
"支付订单数"
,
key
:
2
,
},
{
name
:
"支付人数"
,
key
:
3
,
},
{
name
:
"支付件数"
,
key
:
4
,
},
],
payType
:
""
,
array1
:
[
{
name
:
"全部"
,
key
:
1
,
},
{
name
:
"商城"
,
key
:
2
,
},
{
name
:
"拼团"
,
key
:
3
,
},
{
name
:
"积分"
,
key
:
4
,
},
],
payType1
:
""
,
//加载
loading
:
false
,
clickDate
:
"first"
,
dateStr
:
[],
//日期
//查询数据
basicQMsg
:
{
Source
:
0
,
//来源
StartDate
:
""
,
//开始时间
EndDate
:
""
,
//结束时间
SalesTimeType
:
0
,
//默认今日
OrderBy
:
""
,
UserType
:
-
1
,
//0-普通用户,1-领队导游
},
basicData
:
{},
//基础数据
salesData
:
{},
//销售数据
};
},
methods
:
{
bindPickerChange
(
e
)
{
this
.
payType
=
this
.
array
[
e
.
detail
.
value
].
name
;
},
bindPickerChange1
(
e
)
{
this
.
payType1
=
this
.
array1
[
e
.
detail
.
value
].
name
;
},
showColumn
(
canvasId
,
chartData
)
{
canvaColumn
=
new
uCharts
({
$this
:
_self
,
canvasId
:
canvasId
,
type
:
"column"
,
fontSize
:
11
,
padding
:
[
5
,
15
,
15
,
15
],
legend
:
{
show
:
true
,
position
:
"top"
,
float
:
"center"
,
itemGap
:
30
,
padding
:
5
,
margin
:
5
,
//backgroundColor:'rgba(41,198,90,0.2)',
//borderColor :'rgba(41,198,90,0.5)',
borderWidth
:
1
,
},
dataLabel
:
true
,
dataPointShape
:
true
,
background
:
"#FFFFFF"
,
pixelRatio
:
_self
.
pixelRatio
,
categories
:
chartData
.
categories
,
series
:
chartData
.
series
,
animation
:
true
,
enableScroll
:
true
,
xAxis
:
{
disableGrid
:
false
,
type
:
"grid"
,
gridType
:
"dash"
,
itemCount
:
4
,
scrollShow
:
true
,
scrollAlign
:
"right"
,
},
yAxis
:
{
//disabled:true
gridType
:
"dash"
,
splitNumber
:
4
,
min
:
10
,
max
:
180
,
format
:
(
val
)
=>
{
return
val
.
toFixed
(
0
)
+
"元"
;
},
//如不写此方法,Y轴刻度默认保留两位小数
},
width
:
_self
.
cWidth
*
_self
.
pixelRatio
,
height
:
_self
.
cHeight
*
_self
.
pixelRatio
,
extra
:
{
column
:
{
type
:
"group"
,
width
:
(
_self
.
cWidth
*
_self
.
pixelRatio
*
0.45
)
/
chartData
.
categories
.
length
,
},
},
});
},
touchColumn
(
e
)
{
canvaColumn
.
scrollStart
(
e
);
},
moveColumn
(
e
)
{
canvaColumn
.
scroll
(
e
);
},
touchEndColumn
(
e
)
{
canvaColumn
.
scrollEnd
(
e
);
canvaColumn
.
touchLegend
(
e
,
{
animation
:
true
,
});
canvaColumn
.
showToolTip
(
e
,
{
format
:
function
(
item
,
category
)
{
return
category
+
" "
+
item
.
name
+
":"
+
item
.
data
+
"元"
;
},
});
},
//基础数据日期切换
handleClickDate
(
name
)
{
this
.
clickDate
=
name
;
this
.
dateStr
=
[];
//7日
if
(
name
==
"first"
)
{
this
.
dateStr
.
push
(
this
.
$utils
.
AddDay
(
""
,
-
7
));
}
//30日
else
if
(
name
==
"second"
)
{
this
.
dateStr
.
push
(
this
.
$utils
.
AddDay
(
""
,
-
30
));
}
this
.
dateStr
.
push
(
this
.
$utils
.
AddDay
(
""
,
-
0
));
this
.
getBasicData
();
},
//获取基础数据
getBasicData
()
{
this
.
loading
=
true
;
if
(
this
.
dateStr
&&
this
.
dateStr
.
length
>
0
)
{
this
.
basicQMsg
.
StartDate
=
this
.
dateStr
[
0
];
this
.
basicQMsg
.
EndDate
=
this
.
dateStr
[
1
];
}
else
{
this
.
basicQMsg
.
StartDate
=
""
;
this
.
basicQMsg
.
EndDate
=
""
;
}
this
.
apipost
(
"/api/Tenant/MallIndexStatistics"
,
this
.
basicQMsg
,
(
res
)
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
//基础数据统计
this
.
basicData
=
res
.
data
.
data
.
basicData
;
//销售情况统计
this
.
salesData
=
res
.
data
.
data
.
salesData
;
// //商品购买力TOP排行
// var saleGoodsArray = res.data.data.saleIncomeData;
// if (saleGoodsArray) {
// if (saleGoodsArray.length
<=
2
)
{
// this.saleIncomeData = saleGoodsArray;
// } else {
// this.saleIncomeData = saleGoodsArray.slice(0, 15);
// }
// }
// //用户购买力TOP排行
// var saleUserArray = res.data.data.saleUserData;
// if (saleUserArray) {
// if (saleUserArray.length
<=
2
)
{
// this.saleUserData = saleUserArray;
// } else {
// this.saleUserData = saleUserArray.slice(0, 15);
// }
// }
// this.initMap();
}
else
{
// this.Info(res.data.message);
}
});
},
},
onLoad
()
{
this
.
payType
=
this
.
array
[
0
].
name
;
this
.
payType1
=
this
.
array1
[
0
].
name
;
uni
.
setNavigationBarTitle
({
title
:
"商城管理"
,
});
this
.
getBasicData
()
},
};
import
uCharts
from
"../school/components/u-charts/u-charts.min.js"
;
import
tabbar
from
"./components/tabbar.vue"
;
var
canvaColumn
=
null
;
var
_self
;
export
default
{
components
:
{
tabbar
,
},
data
()
{
return
{
array
:
[{
name
:
"支付金额"
,
key
:
1
,
},
{
name
:
"支付订单数"
,
key
:
2
,
},
{
name
:
"支付人数"
,
key
:
3
,
},
{
name
:
"支付件数"
,
key
:
4
,
},
],
payType
:
""
,
array1
:
[{
name
:
"全部"
,
key
:
1
,
},
{
name
:
"商城"
,
key
:
2
,
},
{
name
:
"拼团"
,
key
:
3
,
},
{
name
:
"积分"
,
key
:
4
,
},
],
payType1
:
""
,
//加载
loading
:
false
,
clickDate
:
"first"
,
dateStr
:
[],
//日期
//查询数据
basicQMsg
:
{
Source
:
0
,
//来源
StartDate
:
""
,
//开始时间
EndDate
:
""
,
//结束时间
SalesTimeType
:
0
,
//默认今日
OrderBy
:
""
,
UserType
:
-
1
,
//0-普通用户,1-领队导游
},
basicData
:
{},
//基础数据
salesData
:
{},
//销售数据
};
},
methods
:
{
bindPickerChange
(
e
)
{
this
.
payType
=
this
.
array
[
e
.
detail
.
value
].
name
;
},
bindPickerChange1
(
e
)
{
this
.
payType1
=
this
.
array1
[
e
.
detail
.
value
].
name
;
},
showColumn
(
canvasId
,
chartData
)
{
canvaColumn
=
new
uCharts
({
$this
:
_self
,
canvasId
:
canvasId
,
type
:
"column"
,
fontSize
:
11
,
padding
:
[
5
,
15
,
15
,
15
],
legend
:
{
show
:
true
,
position
:
"top"
,
float
:
"center"
,
itemGap
:
30
,
padding
:
5
,
margin
:
5
,
//backgroundColor:'rgba(41,198,90,0.2)',
//borderColor :'rgba(41,198,90,0.5)',
borderWidth
:
1
,
},
dataLabel
:
true
,
dataPointShape
:
true
,
background
:
"#FFFFFF"
,
pixelRatio
:
_self
.
pixelRatio
,
categories
:
chartData
.
categories
,
series
:
chartData
.
series
,
animation
:
true
,
enableScroll
:
true
,
xAxis
:
{
disableGrid
:
false
,
type
:
"grid"
,
gridType
:
"dash"
,
itemCount
:
4
,
scrollShow
:
true
,
scrollAlign
:
"right"
,
},
yAxis
:
{
//disabled:true
gridType
:
"dash"
,
splitNumber
:
4
,
min
:
10
,
max
:
180
,
format
:
(
val
)
=>
{
return
val
.
toFixed
(
0
)
+
"元"
;
},
//如不写此方法,Y轴刻度默认保留两位小数
},
width
:
_self
.
cWidth
*
_self
.
pixelRatio
,
height
:
_self
.
cHeight
*
_self
.
pixelRatio
,
extra
:
{
column
:
{
type
:
"group"
,
width
:
(
_self
.
cWidth
*
_self
.
pixelRatio
*
0.45
)
/
chartData
.
categories
.
length
,
},
},
});
},
touchColumn
(
e
)
{
canvaColumn
.
scrollStart
(
e
);
},
moveColumn
(
e
)
{
canvaColumn
.
scroll
(
e
);
},
touchEndColumn
(
e
)
{
canvaColumn
.
scrollEnd
(
e
);
canvaColumn
.
touchLegend
(
e
,
{
animation
:
true
,
});
canvaColumn
.
showToolTip
(
e
,
{
format
:
function
(
item
,
category
)
{
return
category
+
" "
+
item
.
name
+
":"
+
item
.
data
+
"元"
;
},
});
},
//基础数据日期切换
handleClickDate
(
name
)
{
this
.
clickDate
=
name
;
this
.
dateStr
=
[];
//7日
if
(
name
==
"first"
)
{
this
.
dateStr
.
push
(
this
.
$utils
.
AddDay
(
""
,
-
7
));
}
//30日
else
if
(
name
==
"second"
)
{
this
.
dateStr
.
push
(
this
.
$utils
.
AddDay
(
""
,
-
30
));
}
this
.
dateStr
.
push
(
this
.
$utils
.
AddDay
(
""
,
-
0
));
this
.
getBasicData
();
},
//获取基础数据
getBasicData
()
{
this
.
loading
=
true
;
console
.
log
(
"adsfasdasf"
)
if
(
this
.
dateStr
&&
this
.
dateStr
.
length
>
0
)
{
this
.
basicQMsg
.
StartDate
=
this
.
dateStr
[
0
];
this
.
basicQMsg
.
EndDate
=
this
.
dateStr
[
1
];
}
else
{
this
.
basicQMsg
.
StartDate
=
""
;
this
.
basicQMsg
.
EndDate
=
""
;
}
this
.
requestAdmin
(
"/api/Tenant/MallIndexStatistics"
,
this
.
basicQMsg
,
(
res
)
=>
{
console
.
log
(
"11111"
)
//this.loading = false;
if
(
res
.
data
.
resultCode
==
1
)
{
//基础数据统计
this
.
basicData
=
res
.
data
.
data
.
basicData
;
//销售情况统计
this
.
salesData
=
res
.
data
.
data
.
salesData
;
// //商品购买力TOP排行
// var saleGoodsArray = res.data.data.saleIncomeData;
// if (saleGoodsArray) {
// if (saleGoodsArray.length
<=
2
)
{
// this.saleIncomeData = saleGoodsArray;
// } else {
// this.saleIncomeData = saleGoodsArray.slice(0, 15);
// }
// }
// //用户购买力TOP排行
// var saleUserArray = res.data.data.saleUserData;
// if (saleUserArray) {
// if (saleUserArray.length
<=
2
)
{
// this.saleUserData = saleUserArray;
// } else {
// this.saleUserData = saleUserArray.slice(0, 15);
// }
// }
// this.initMap();
}
else
{
// this.Info(res.data.message);
}
});
},
},
onLoad
()
{
this
.
payType
=
this
.
array
[
0
].
name
;
this
.
payType1
=
this
.
array1
[
0
].
name
;
uni
.
setNavigationBarTitle
({
title
:
"商城管理"
,
});
this
.
getBasicData
()
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.indexpage
{
min-height
:
100vh
;
background-color
:
#f7f7f7
;
box-sizing
:
border-box
;
padding-bottom
:
100rpx
;
}
.indexpage
{
min-height
:
100vh
;
background-color
:
#f7f7f7
;
box-sizing
:
border-box
;
padding-bottom
:
100rpx
;
}
.flex-center
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
.flex-center
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
.topBox
{
height
:
350rpx
;
position
:
relative
;
margin-bottom
:
20rpx
;
}
.topBox
{
height
:
350rpx
;
position
:
relative
;
margin-bottom
:
20rpx
;
}
.bg
{
width
:
100%
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
0
;
}
.bg
{
width
:
100%
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
0
;
}
.topinfo
{
height
:
130rpx
;
box-sizing
:
border-box
;
padding
:
0
50rpx
0
20rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
width
:
100%
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
1
;
}
.topinfo
{
height
:
130rpx
;
box-sizing
:
border-box
;
padding
:
0
50rpx
0
20rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
width
:
100%
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
1
;
}
.headimg
{
width
:
70rpx
;
height
:
70rpx
;
border-radius
:
50%
;
}
.headimg
{
width
:
70rpx
;
height
:
70rpx
;
border-radius
:
50%
;
}
.name1
{
margin-left
:
24rpx
;
font-size
:
40rpx
;
color
:
#fff
;
}
.name1
{
margin-left
:
24rpx
;
font-size
:
40rpx
;
color
:
#fff
;
}
.ewmimg
{
width
:
50rpx
;
height
:
50rpx
;
}
.ewmimg
{
width
:
50rpx
;
height
:
50rpx
;
}
.name2
{
font-size
:
24rpx
;
color
:
#fff
;
}
.name2
{
font-size
:
24rpx
;
color
:
#fff
;
}
.msgBox
{
box-sizing
:
border-box
;
width
:
700rpx
;
height
:
200rpx
;
border-radius
:
12rpx
;
background-color
:
#fff
;
z-index
:
5
;
position
:
absolute
;
top
:
130rpx
;
left
:
50%
;
transform
:
translateX
(
-50%
);
z-index
:
1
;
padding
:
0
30rpx
;
.msgBox
{
box-sizing
:
border-box
;
width
:
700rpx
;
height
:
200rpx
;
border-radius
:
12rpx
;
background-color
:
#fff
;
z-index
:
5
;
position
:
absolute
;
top
:
130rpx
;
left
:
50%
;
transform
:
translateX
(
-50%
);
z-index
:
1
;
padding
:
0
30rpx
;
.itemBox
{
width
:
100rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
center
;
position
:
relative
;
.itemBox
{
width
:
100rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
center
;
position
:
relative
;
.imgicon
{
width
:
90rpx
;
height
:
90rpx
;
border-radius
:
50%
;
margin-bottom
:
20rpx
;
}
.imgicon
{
width
:
90rpx
;
height
:
90rpx
;
border-radius
:
50%
;
margin-bottom
:
20rpx
;
}
.tipNum
{
position
:
absolute
;
top
:
0
;
right
:
0
;
z-index
:
2
;
width
:
30rpx
;
height
:
30rpx
;
border-radius
:
50%
;
background-color
:
#f00
;
text-align
:
center
;
line-height
:
28rpx
;
color
:
#fff
;
font-size
:
20rpx
;
}
.tipNum
{
position
:
absolute
;
top
:
0
;
right
:
0
;
z-index
:
2
;
width
:
30rpx
;
height
:
30rpx
;
border-radius
:
50%
;
background-color
:
#f00
;
text-align
:
center
;
line-height
:
28rpx
;
color
:
#fff
;
font-size
:
20rpx
;
}
.iconname
{
font-size
:
24rpx
;
}
}
}
.iconname
{
font-size
:
24rpx
;
}
}
}
.conditionOfBusiness
,
.echartsBox
{
height
:
480rpx
;
width
:
700rpx
;
margin
:
0
auto
;
border-radius
:
12rpx
;
background-color
:
#fff
;
box-sizing
:
border-box
;
padding
:
30rpx
50rpx
;
margin-bottom
:
40rpx
;
.conditionOfBusiness
,
.echartsBox
{
height
:
480rpx
;
width
:
700rpx
;
margin
:
0
auto
;
border-radius
:
12rpx
;
background-color
:
#fff
;
box-sizing
:
border-box
;
padding
:
30rpx
50rpx
;
margin-bottom
:
40rpx
;
.day
{
width
:
300rpx
;
height
:
50rpx
;
border-radius
:
25rpx
;
border
:
2rpx
solid
#667cb8
;
overflow
:
hidden
;
margin
:
0
auto
;
.day
{
width
:
300rpx
;
height
:
50rpx
;
border-radius
:
25rpx
;
border
:
2rpx
solid
#667cb8
;
overflow
:
hidden
;
margin
:
0
auto
;
.dayitem
{
width
:
150rpx
;
height
:
100%
;
font-size
:
24rpx
;
text-align
:
center
;
line-height
:
48rpx
;
}
}
.dayitem
{
width
:
150rpx
;
height
:
100%
;
font-size
:
24rpx
;
text-align
:
center
;
line-height
:
48rpx
;
}
}
.choose
{
background-color
:
#446dfc
;
}
.choose
{
background-color
:
#446dfc
;
}
.BusinessData
{
width
:
590rpx
;
height
:
280rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
.BusinessData
{
width
:
590rpx
;
height
:
280rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
.dataitem
{
width
:
50%
;
height
:
50%
;
padding-top
:
50rpx
;
padding-left
:
30rpx
;
.dataitem
{
width
:
50%
;
height
:
50%
;
padding-top
:
50rpx
;
padding-left
:
30rpx
;
.dataNum
{
font-size
:
40rpx
;
color
:
#446dfc
;
margin-bottom
:
2rpx
;
}
.dataNum
{
font-size
:
40rpx
;
color
:
#446dfc
;
margin-bottom
:
2rpx
;
}
.dataName
{
font-size
:
24rpx
;
}
}
}
}
.dataName
{
font-size
:
24rpx
;
}
}
}
}
.title
{
font-size
:
30rpx
;
margin-bottom
:
30rpx
;
}
.title
{
font-size
:
30rpx
;
margin-bottom
:
30rpx
;
}
.fastHandle
{
width
:
700rpx
;
// height: 300rpx;
margin
:
0
auto
;
margin-bottom
:
40rpx
;
border-radius
:
12rpx
;
background-color
:
#fff
;
padding
:
40rpx
;
.fastHandle
{
width
:
700rpx
;
// height: 300rpx;
margin
:
0
auto
;
margin-bottom
:
40rpx
;
border-radius
:
12rpx
;
background-color
:
#fff
;
padding
:
40rpx
;
.HandleBox
{
.handleItem
{
width
:
300rpx
;
height
:
180rpx
;
border-radius
:
12rpx
;
box-shadow
:
0rpx
0rpx
10rpx
0px
rgba
(
36
,
36
,
36
,
0
.2
);
padding
:
10rpx
20rpx
;
.HandleBox
{
.handleItem
{
width
:
300rpx
;
height
:
180rpx
;
border-radius
:
12rpx
;
box-shadow
:
0rpx
0rpx
10rpx
0px
rgba
(
36
,
36
,
36
,
0
.2
);
padding
:
10rpx
20rpx
;
.handleItemNum
{
font-size
:
40rpx
;
margin-bottom
:
10rpx
;
}
.handleItemNum
{
font-size
:
40rpx
;
margin-bottom
:
10rpx
;
}
.handleItemName
{
font-size
:
26rpx
;
margin-bottom
:
15rpx
;
color
:
#9b9b9b
;
}
.handleItemName
{
font-size
:
26rpx
;
margin-bottom
:
15rpx
;
color
:
#9b9b9b
;
}
.handleItemBtn
{
font-size
:
26rpx
;
color
:
#9b9b9b
;
display
:
flex
;
align-items
:
center
;
}
}
}
}
.handleItemBtn
{
font-size
:
26rpx
;
color
:
#9b9b9b
;
display
:
flex
;
align-items
:
center
;
}
}
}
}
.echartsBox
{
width
:
700rpx
;
height
:
auto
;
margin
:
0
auto
;
margin-bottom
:
40rpx
;
.echartsBox
{
width
:
700rpx
;
height
:
auto
;
margin
:
0
auto
;
margin-bottom
:
40rpx
;
.payType
{
display
:
flex
;
font-size
:
30rpx
;
}
}
.payType
{
display
:
flex
;
font-size
:
30rpx
;
}
}
</
style
>
plugin/api.js
View file @
721e47e5
export
default
{
install
(
Vue
,
options
)
{
Vue
.
prototype
.
host
=
"https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
// Vue.prototype.host2 = "http://192.168.0.110:8200"
// Vue.prototype.host2 = "https://mallApi.oytour.com"
Vue
.
prototype
.
host2
=
"http://192.168.20.6:8088"
// Vue.prototype.host2 = "http://192.168.20.24:8200"
// Vue.prototype.host2 = "http://192.168.20.17:8014"
// Vue.prototype.host2 = "http://192.168.20.17:8014"
// Vue.prototype.host2 = "http://testmall.oytour.com/"
Vue
.
prototype
.
UploadConfig
=
function
()
{
//本地上传配置
Vue
.
prototype
.
host2
=
"http://localhost:5000"
//Vue.prototype.host2 = "https://mallApi.oytour.com"
Vue
.
prototype
.
UploadConfig
=
function
()
{
//本地上传配置
return
{
UploadUrl
:
this
.
host2
.
indexOf
(
'mallApi'
)
!=-
1
?
"https://upload.oytour.com/Upload/AppUpload"
:
"http://192.168.20.214:8120/Upload/AppUpload"
,
ImageUrl
:
this
.
host2
.
indexOf
(
'mallApi'
)
!=-
1
?
"https://imgfile.oytour.com"
:
"http://192.168.20.214:8130"
,
}
}
UploadUrl
:
this
.
host2
.
indexOf
(
'mallApi'
)
!=
-
1
?
"https://upload.oytour.com/Upload/AppUpload"
:
"http://192.168.20.214:8120/Upload/AppUpload"
,
ImageUrl
:
this
.
host2
.
indexOf
(
'mallApi'
)
!=
-
1
?
"https://imgfile.oytour.com"
:
"http://192.168.20.214:8130"
,
}
}
//微宝阁请求
Vue
.
prototype
.
request
=
function
(
param
,
success
,
failed
)
{
//网络请求
uni
.
request
({
...
...
@@ -36,8 +34,8 @@ export default {
}
});
}
//小程序常规请求
Vue
.
prototype
.
request2
=
function
(
param
,
success
,
failed
)
{
//网络请求
uni
.
request
({
url
:
this
.
host2
+
param
.
url
,
method
:
param
.
method
||
"Post"
,
...
...
@@ -59,7 +57,6 @@ export default {
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
u
)
{
this
.
getLogin_t
(
u
)
// typeof failed == "function" && failed(res.data);
}
}
else
if
(
res
.
data
.
resultCode
!=
1
)
{
if
(
res
.
data
.
message
!=
''
)
{
...
...
@@ -82,6 +79,50 @@ export default {
}
});
}
//后台接口请求
Vue
.
prototype
.
requestAdmin
=
function
(
cmd
,
postMsg
,
success
,
failed
)
{
uni
.
request
({
url
:
this
.
host2
+
cmd
,
method
:
"Post"
,
header
:
{
'content-type'
:
"application/json"
},
data
:
{
MallBaseId
:
this
.
GetMiniAppId
().
MallBaseId
,
TenantId
:
this
.
GetMiniAppId
().
TenantId
,
msg
:
postMsg
,
token
:
this
.
GetOpenId
().
AdminToken
},
success
:
res
=>
{
if
(
res
.
data
.
resultCode
==
10000
)
{
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
u
)
{
this
.
getLogin_t
(
u
)
}
}
else
if
(
res
.
data
.
resultCode
!=
1
)
{
if
(
res
.
data
.
message
!=
''
)
{
uni
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
"none"
,
});
}
typeof
failed
==
"function"
&&
failed
(
res
.
data
);
}
else
{
typeof
success
==
"function"
&&
success
(
res
.
data
);
}
},
fail
:
(
e
)
=>
{
console
.
log
(
"网络请求fail:"
+
JSON
.
stringify
(
e
));
uni
.
showModal
({
content
:
""
+
res
.
errMsg
});
typeof
failed
==
"function"
&&
failed
(
res
.
data
);
}
});
}
// token失效再次登录接口
Vue
.
prototype
.
getLogin_t
=
function
(
obj
)
{
let
pid
=
uni
.
getStorageSync
(
"pid"
)
?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
;
...
...
@@ -120,7 +161,7 @@ export default {
// 获取小程序APPID
Vue
.
prototype
.
GetMiniAppId
=
function
()
{
let
appObj
=
{};
let
appType
=
1
;
let
appType
=
3
;
switch
(
appType
)
{
case
1
:
//赞羊
appObj
=
{
...
...
@@ -165,47 +206,47 @@ export default {
};
break
;
case
7
:
appObj
=
{
//韩国馆
appObj
=
{
//韩国馆
AppId
:
'wxbb033190e0ffa5db'
,
TenantId
:
18
,
MallBaseId
:
8
,
};
break
;
case
8
:
appObj
=
{
//恋爱星球
appObj
=
{
//恋爱星球
AppId
:
'wx681f8ad58e6c48e4'
,
TenantId
:
21
,
MallBaseId
:
11
,
};
break
;
case
9
:
appObj
=
{
//罗演的杂货铺
appObj
=
{
//罗演的杂货铺
AppId
:
'wx67a8fb290ec58af4'
,
TenantId
:
20
,
MallBaseId
:
10
,
};
break
;
case
10
:
appObj
=
{
//梅玲
appObj
=
{
//梅玲
AppId
:
'wx350f244458e5ba01'
,
TenantId
:
22
,
MallBaseId
:
12
,
};
break
;
break
;
case
11
:
appObj
=
{
//星之旅
appObj
=
{
//星之旅
AppId
:
'wxa2c92313ece345f5'
,
TenantId
:
23
,
MallBaseId
:
13
,
};
break
;
break
;
case
12
:
appObj
=
{
//橙孀
appObj
=
{
//橙孀
AppId
:
'wx442f2a74b09d5f89'
,
TenantId
:
24
,
MallBaseId
:
14
,
};
break
;
break
;
}
return
appObj
;
}
...
...
@@ -217,6 +258,7 @@ export default {
UserId
:
0
,
token
:
''
,
SmallShopsId
:
0
,
AdminToken
:
""
,
//后台Token
}
if
(
mall_userinfo
)
{
if
(
mall_userinfo
.
OpenId
)
{
...
...
@@ -224,6 +266,7 @@ export default {
obj
.
UserId
=
mall_userinfo
.
UserId
;
obj
.
token
=
mall_userinfo
.
Token
;
obj
.
SmallShopsId
=
mall_userinfo
.
UserSmallShopId
;
obj
.
AdminToken
=
mall_userinfo
.
AdminToken
;
}
}
return
obj
...
...
@@ -245,7 +288,6 @@ export default {
val
=
Number
(
val
).
toFixed
(
2
);
return
val
}
Vue
.
prototype
.
apiheader
=
function
()
{
return
{
'X-Access-Token'
:
'_4Y_WpUZ4a6SI5uJgsZ4Lb7t9mvqJTyr'
,
...
...
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