Commit 721e47e5 authored by 黄奎's avatar 黄奎

页面修改

parent 804aa513
<template> <template>
<view class="indexpage"> <view class="indexpage">
<view class="topBox"> <view class="topBox">
<image <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/bg.png" mode="widthFix" class="bg" />
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/bg.png"
mode="widthFix"
class="bg"
/>
<view class="topinfo"> <view class="topinfo">
<view class="flex-center"> <view class="flex-center">
<image <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cash.png" class="headimg" />
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cash.png"
class="headimg"
/>
<view class="name1">饭粒汪</view> <view class="name1">饭粒汪</view>
</view> </view>
<view <view style="
style="
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: center; justify-content: center;
width: 100rpx; width: 100rpx;
" ">
> <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/qr_code.png" class="ewmimg"
<image mode="aspectFill" />
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/qr_code.png"
class="ewmimg"
mode="aspectFill"
/>
<view class="name2">收款码</view> <view class="name2">收款码</view>
</view> </view>
</view> </view>
<view class="msgBox flex-center"> <view class="msgBox flex-center">
<view class="itemBox"> <view class="itemBox">
<image <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/order.png" mode="" class="imgicon" />
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/order.png"
mode=""
class="imgicon"
/>
<view class="iconname">订单消息</view> <view class="iconname">订单消息</view>
<view class="tipNum">1</view> <view class="tipNum">1</view>
</view> </view>
<view class="itemBox"> <view class="itemBox">
<image <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/msg.png" mode="" class="imgicon" />
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/msg.png"
mode=""
class="imgicon"
/>
<view class="iconname">审核消息</view> <view class="iconname">审核消息</view>
</view> </view>
<view class="itemBox"> <view class="itemBox">
<image <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cash.png" mode="" class="imgicon" />
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cash.png"
mode=""
class="imgicon"
/>
<view class="iconname">提现申请</view> <view class="iconname">提现申请</view>
</view> </view>
<view class="itemBox"> <view class="itemBox">
<image <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/comment.png" mode="" class="imgicon" />
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/comment.png"
mode=""
class="imgicon"
/>
<view class="iconname">评论管理</view> <view class="iconname">评论管理</view>
</view> </view>
<view class="itemBox"> <view class="itemBox">
<image <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/user.png" mode="" class="imgicon" />
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/user.png"
mode=""
class="imgicon"
/>
<view class="iconname">用户管理</view> <view class="iconname">用户管理</view>
</view> </view>
</view> </view>
...@@ -79,18 +47,8 @@ ...@@ -79,18 +47,8 @@
<view class="day flex-center"> <view class="day flex-center">
<!-- <view class="dayitem choose">今日</view> <!-- <view class="dayitem choose">今日</view>
<view class="dayitem">昨日</view> --> <view class="dayitem">昨日</view> -->
<view <view class="dayitem" @click="handleClickDate('first')" :class="{ choose: clickDate == 'first' }">7日</view>
class="dayitem" <view class="dayitem" @click="handleClickDate('second')" :class="{ choose: clickDate == 'second' }">30日</view>
@click="handleClickDate('first')"
:class="{ choose: clickDate == 'first' }"
>7日</view
>
<view
class="dayitem"
@click="handleClickDate('second')"
:class="{ choose: clickDate == 'second' }"
>30日</view
>
</view> </view>
<view class="BusinessData"> <view class="BusinessData">
<view class="dataitem"> <view class="dataitem">
...@@ -117,40 +75,26 @@ ...@@ -117,40 +75,26 @@
<view class="handleItem"> <view class="handleItem">
<view class="handleItemNum">0</view> <view class="handleItemNum">0</view>
<view class="handleItemName">待发货订单</view> <view class="handleItemName">待发货订单</view>
<view class="handleItemBtn" <view class="handleItemBtn">立即发货 <u-icon name="arrow"></u-icon>
>立即发货 <u-icon name="arrow"></u-icon>
</view> </view>
</view> </view>
<view class="handleItem"> <view class="handleItem">
<view class="handleItemNum">0</view> <view class="handleItemNum">0</view>
<view class="handleItemName">维权订单</view> <view class="handleItemName">维权订单</view>
<view class="handleItemBtn" <view class="handleItemBtn">立即处理 <u-icon name="arrow"></u-icon>
>立即处理 <u-icon name="arrow"></u-icon>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="echartsBox"> <view class="echartsBox">
<view class="title flex-center"> <view class="title flex-center">
<picker <picker @change="bindPickerChange" :value="key" :range="array" range-key="name">
@change="bindPickerChange" <view class="payType">{{ payType }}
:value="key"
:range="array"
range-key="name"
>
<view class="payType"
>{{ payType }}
<u-icon name="arrow-down"></u-icon> <u-icon name="arrow-down"></u-icon>
</view> </view>
</picker> </picker>
<picker <picker @change="bindPickerChange1" :value="key" :range="array1" range-key="name">
@change="bindPickerChange1" <view class="payType">{{ payType1 }}
:value="key"
:range="array1"
range-key="name"
>
<view class="payType"
>{{ payType1 }}
<u-icon name="arrow-down"></u-icon> <u-icon name="arrow-down"></u-icon>
</view> </view>
</picker> </picker>
...@@ -158,29 +102,12 @@ ...@@ -158,29 +102,12 @@
<view class="day flex-center"> <view class="day flex-center">
<!-- <view class="dayitem choose">今日</view> <!-- <view class="dayitem choose">今日</view>
<view class="dayitem">昨日</view> --> <view class="dayitem">昨日</view> -->
<view <view class="dayitem" @click="handleClickDate('first')" :class="{ choose: clickDate == 'first' }">7日</view>
class="dayitem" <view class="dayitem" @click="handleClickDate('second')" :class="{ choose: clickDate == 'second' }">30日</view>
@click="handleClickDate('first')"
:class="{ choose: clickDate == 'first' }"
>7日</view
>
<view
class="dayitem"
@click="handleClickDate('second')"
:class="{ choose: clickDate == 'second' }"
>30日</view
>
</view> </view>
<view style="height: 100rpx"></view> <view style="height: 100rpx"></view>
<canvas <canvas canvas-id="canvasColumn" id="canvasColumn" class="charts" disable-scroll="true" @touchstart="touchColumn"
canvas-id="canvasColumn" @touchmove="moveColumn" @touchend="touchEndColumn">
id="canvasColumn"
class="charts"
disable-scroll="true"
@touchstart="touchColumn"
@touchmove="moveColumn"
@touchend="touchEndColumn"
>
</canvas> </canvas>
</view> </view>
<tabbar></tabbar> <tabbar></tabbar>
...@@ -188,18 +115,17 @@ ...@@ -188,18 +115,17 @@
</template> </template>
<script> <script>
import uCharts from "../school/components/u-charts/u-charts.min.js"; import uCharts from "../school/components/u-charts/u-charts.min.js";
import tabbar from "./components/tabbar.vue"; import tabbar from "./components/tabbar.vue";
var canvaColumn = null; var canvaColumn = null;
var _self; var _self;
export default { export default {
components: { components: {
tabbar, tabbar,
}, },
data() { data() {
return { return {
array: [ array: [{
{
name: "支付金额", name: "支付金额",
key: 1, key: 1,
}, },
...@@ -217,8 +143,7 @@ export default { ...@@ -217,8 +143,7 @@ export default {
}, },
], ],
payType: "", payType: "",
array1: [ array1: [{
{
name: "全部", name: "全部",
key: 1, key: 1,
}, },
...@@ -309,8 +234,7 @@ export default { ...@@ -309,8 +234,7 @@ export default {
extra: { extra: {
column: { column: {
type: "group", type: "group",
width: width: (_self.cWidth * _self.pixelRatio * 0.45) /
(_self.cWidth * _self.pixelRatio * 0.45) /
chartData.categories.length, chartData.categories.length,
}, },
}, },
...@@ -328,7 +252,7 @@ export default { ...@@ -328,7 +252,7 @@ export default {
animation: true, animation: true,
}); });
canvaColumn.showToolTip(e, { canvaColumn.showToolTip(e, {
format: function (item, category) { format: function(item, category) {
return category + " " + item.name + ":" + item.data + "元"; return category + " " + item.name + ":" + item.data + "元";
}, },
}); });
...@@ -351,6 +275,7 @@ export default { ...@@ -351,6 +275,7 @@ export default {
//获取基础数据 //获取基础数据
getBasicData() { getBasicData() {
this.loading = true; this.loading = true;
console.log("adsfasdasf")
if (this.dateStr && this.dateStr.length > 0) { if (this.dateStr && this.dateStr.length > 0) {
this.basicQMsg.StartDate = this.dateStr[0]; this.basicQMsg.StartDate = this.dateStr[0];
this.basicQMsg.EndDate = this.dateStr[1]; this.basicQMsg.EndDate = this.dateStr[1];
...@@ -358,8 +283,9 @@ export default { ...@@ -358,8 +283,9 @@ export default {
this.basicQMsg.StartDate = ""; this.basicQMsg.StartDate = "";
this.basicQMsg.EndDate = ""; this.basicQMsg.EndDate = "";
} }
this.apipost("/api/Tenant/MallIndexStatistics", this.basicQMsg, (res) => { this.requestAdmin("/api/Tenant/MallIndexStatistics", this.basicQMsg, (res) => {
this.loading = false; console.log("11111")
//this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
//基础数据统计 //基础数据统计
this.basicData = res.data.data.basicData; this.basicData = res.data.data.basicData;
...@@ -398,38 +324,38 @@ export default { ...@@ -398,38 +324,38 @@ export default {
}); });
this.getBasicData() this.getBasicData()
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.indexpage { .indexpage {
min-height: 100vh; min-height: 100vh;
background-color: #f7f7f7; background-color: #f7f7f7;
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 100rpx; padding-bottom: 100rpx;
} }
.flex-center { .flex-center {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.topBox { .topBox {
height: 350rpx; height: 350rpx;
position: relative; position: relative;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.bg { .bg {
width: 100%; width: 100%;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
z-index: 0; z-index: 0;
} }
.topinfo { .topinfo {
height: 130rpx; height: 130rpx;
box-sizing: border-box; box-sizing: border-box;
padding: 0 50rpx 0 20rpx; padding: 0 50rpx 0 20rpx;
...@@ -441,31 +367,31 @@ export default { ...@@ -441,31 +367,31 @@ export default {
top: 0; top: 0;
left: 0; left: 0;
z-index: 1; z-index: 1;
} }
.headimg { .headimg {
width: 70rpx; width: 70rpx;
height: 70rpx; height: 70rpx;
border-radius: 50%; border-radius: 50%;
} }
.name1 { .name1 {
margin-left: 24rpx; margin-left: 24rpx;
font-size: 40rpx; font-size: 40rpx;
color: #fff; color: #fff;
} }
.ewmimg { .ewmimg {
width: 50rpx; width: 50rpx;
height: 50rpx; height: 50rpx;
} }
.name2 { .name2 {
font-size: 24rpx; font-size: 24rpx;
color: #fff; color: #fff;
} }
.msgBox { .msgBox {
box-sizing: border-box; box-sizing: border-box;
width: 700rpx; width: 700rpx;
height: 200rpx; height: 200rpx;
...@@ -512,10 +438,10 @@ export default { ...@@ -512,10 +438,10 @@ export default {
font-size: 24rpx; font-size: 24rpx;
} }
} }
} }
.conditionOfBusiness, .conditionOfBusiness,
.echartsBox { .echartsBox {
height: 480rpx; height: 480rpx;
width: 700rpx; width: 700rpx;
margin: 0 auto; margin: 0 auto;
...@@ -569,14 +495,14 @@ export default { ...@@ -569,14 +495,14 @@ export default {
} }
} }
} }
} }
.title { .title {
font-size: 30rpx; font-size: 30rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.fastHandle { .fastHandle {
width: 700rpx; width: 700rpx;
// height: 300rpx; // height: 300rpx;
margin: 0 auto; margin: 0 auto;
...@@ -612,9 +538,9 @@ export default { ...@@ -612,9 +538,9 @@ export default {
} }
} }
} }
} }
.echartsBox { .echartsBox {
width: 700rpx; width: 700rpx;
height: auto; height: auto;
margin: 0 auto; margin: 0 auto;
...@@ -624,5 +550,5 @@ export default { ...@@ -624,5 +550,5 @@ export default {
display: flex; display: flex;
font-size: 30rpx; font-size: 30rpx;
} }
} }
</style> </style>
export default { export default {
install(Vue, options) { install(Vue, options) {
Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285" 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://localhost:5000"
Vue.prototype.host2 = "http://192.168.20.6:8088" //Vue.prototype.host2 = "https://mallApi.oytour.com"
// Vue.prototype.host2 = "http://192.168.20.24:8200"
// Vue.prototype.host2 = "http://192.168.20.17:8014" Vue.prototype.UploadConfig = function() { //本地上传配置
// Vue.prototype.host2 = "http://192.168.20.17:8014"
// Vue.prototype.host2 = "http://testmall.oytour.com/"
Vue.prototype.UploadConfig = function() {//本地上传配置
return { return {
UploadUrl:this.host2.indexOf('mallApi')!=-1 ? "https://upload.oytour.com/Upload/AppUpload":"http://192.168.20.214:8120/Upload/AppUpload", 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", ImageUrl: this.host2.indexOf('mallApi') != -1 ? "https://imgfile.oytour.com" : "http://192.168.20.214:8130",
} }
} }
//微宝阁请求
Vue.prototype.request = function(param, success, failed) { Vue.prototype.request = function(param, success, failed) {
//网络请求 //网络请求
uni.request({ uni.request({
...@@ -36,8 +34,8 @@ export default { ...@@ -36,8 +34,8 @@ export default {
} }
}); });
} }
//小程序常规请求
Vue.prototype.request2 = function(param, success, failed) { Vue.prototype.request2 = function(param, success, failed) {
//网络请求
uni.request({ uni.request({
url: this.host2 + param.url, url: this.host2 + param.url,
method: param.method || "Post", method: param.method || "Post",
...@@ -59,7 +57,6 @@ export default { ...@@ -59,7 +57,6 @@ export default {
let u = uni.getStorageSync("mall_UserInfo"); let u = uni.getStorageSync("mall_UserInfo");
if (u) { if (u) {
this.getLogin_t(u) this.getLogin_t(u)
// typeof failed == "function" && failed(res.data);
} }
} else if (res.data.resultCode != 1) { } else if (res.data.resultCode != 1) {
if (res.data.message != '') { if (res.data.message != '') {
...@@ -82,6 +79,50 @@ export default { ...@@ -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失效再次登录接口 // token失效再次登录接口
Vue.prototype.getLogin_t = function(obj) { Vue.prototype.getLogin_t = function(obj) {
let pid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0; let pid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
...@@ -120,7 +161,7 @@ export default { ...@@ -120,7 +161,7 @@ export default {
// 获取小程序APPID // 获取小程序APPID
Vue.prototype.GetMiniAppId = function() { Vue.prototype.GetMiniAppId = function() {
let appObj = {}; let appObj = {};
let appType = 1; let appType = 3;
switch (appType) { switch (appType) {
case 1: //赞羊 case 1: //赞羊
appObj = { appObj = {
...@@ -165,42 +206,42 @@ export default { ...@@ -165,42 +206,42 @@ export default {
}; };
break; break;
case 7: case 7:
appObj = {//韩国馆 appObj = { //韩国馆
AppId: 'wxbb033190e0ffa5db', AppId: 'wxbb033190e0ffa5db',
TenantId: 18, TenantId: 18,
MallBaseId: 8, MallBaseId: 8,
}; };
break; break;
case 8: case 8:
appObj = {//恋爱星球 appObj = { //恋爱星球
AppId: 'wx681f8ad58e6c48e4', AppId: 'wx681f8ad58e6c48e4',
TenantId: 21, TenantId: 21,
MallBaseId: 11, MallBaseId: 11,
}; };
break; break;
case 9: case 9:
appObj = {//罗演的杂货铺 appObj = { //罗演的杂货铺
AppId: 'wx67a8fb290ec58af4', AppId: 'wx67a8fb290ec58af4',
TenantId: 20, TenantId: 20,
MallBaseId: 10, MallBaseId: 10,
}; };
break; break;
case 10: case 10:
appObj = {//梅玲 appObj = { //梅玲
AppId: 'wx350f244458e5ba01', AppId: 'wx350f244458e5ba01',
TenantId: 22, TenantId: 22,
MallBaseId: 12, MallBaseId: 12,
}; };
break; break;
case 11: case 11:
appObj = {//星之旅 appObj = { //星之旅
AppId: 'wxa2c92313ece345f5', AppId: 'wxa2c92313ece345f5',
TenantId: 23, TenantId: 23,
MallBaseId: 13, MallBaseId: 13,
}; };
break; break;
case 12: case 12:
appObj = {//橙孀 appObj = { //橙孀
AppId: 'wx442f2a74b09d5f89', AppId: 'wx442f2a74b09d5f89',
TenantId: 24, TenantId: 24,
MallBaseId: 14, MallBaseId: 14,
...@@ -217,6 +258,7 @@ export default { ...@@ -217,6 +258,7 @@ export default {
UserId: 0, UserId: 0,
token: '', token: '',
SmallShopsId: 0, SmallShopsId: 0,
AdminToken: "", //后台Token
} }
if (mall_userinfo) { if (mall_userinfo) {
if (mall_userinfo.OpenId) { if (mall_userinfo.OpenId) {
...@@ -224,6 +266,7 @@ export default { ...@@ -224,6 +266,7 @@ export default {
obj.UserId = mall_userinfo.UserId; obj.UserId = mall_userinfo.UserId;
obj.token = mall_userinfo.Token; obj.token = mall_userinfo.Token;
obj.SmallShopsId = mall_userinfo.UserSmallShopId; obj.SmallShopsId = mall_userinfo.UserSmallShopId;
obj.AdminToken = mall_userinfo.AdminToken;
} }
} }
return obj return obj
...@@ -245,7 +288,6 @@ export default { ...@@ -245,7 +288,6 @@ export default {
val = Number(val).toFixed(2); val = Number(val).toFixed(2);
return val return val
} }
Vue.prototype.apiheader = function() { Vue.prototype.apiheader = function() {
return { return {
'X-Access-Token': '_4Y_WpUZ4a6SI5uJgsZ4Lb7t9mvqJTyr', 'X-Access-Token': '_4Y_WpUZ4a6SI5uJgsZ4Lb7t9mvqJTyr',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment