Commit 804aa513 authored by 罗超's avatar 罗超

1

parent 4189281c
......@@ -801,6 +801,8 @@
"path": "goods"
},{
"path": "set"
},{
"path": "timeQuantum"
}
]
}
......
<template>
<view class="goodsItem flex-between">
<view class="imgbox">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/user.png"
mode="aspectFill"
class="img"
/>
</view>
<view class="goodsInfoBox">
<view class="goodsName"
>测试商品ssadfdsdddddddddddddddddddddddddddddddddddddddddddddddddd啛啛喳喳吃错错错错错错错错错错错dd</view
>
<view class="price">¥0.01</view>
<view class="flex-between surplus">
<text>库存:999</text>
<u-icon name="ellipsis" :size="40" @click="changeShow"></u-icon>
</view>
<view class="operationBox flex-between" v-if="showOperationBox">
<view class="btn">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/edit.png"
mode=""
style="width: 40rpx; height: 40rpx"
/>
编辑
</view>
<view class="btn">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/xiajia.png"
mode=""
style="width: 40rpx; height: 40rpx"
/>
下架
</view>
<view class="btn">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/delete.png"
mode=""
style="width: 40rpx; height: 40rpx"
/>
删除
</view>
<view class="sanjiaoxing"></view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
showOperationBox: false,
};
},
methods: {
changeShow() {
this.showOperationBox = !this.showOperationBox;
},
},
};
</script>
<style lang="scss" scoped>
.flex-between {
display: flex;
justify-content: space-between;
align-items: center;
}
.goodsItem {
width: 700rpx;
height: 200rpx;
margin: 10rpx auto;
box-sizing: border-box;
padding: 20rpx;
border-radius: 6rpx;
background-color: #fff;
.imgbox {
width: 150rpx;
height: 150rpx;
border-radius: 6rpx;
overflow: hidden;
margin-right: 20rpx;
box-shadow: 0rpx 0rpx 10rpx 0px rgba(36, 36, 36, 0.2);
.img {
width: 100%;
height: 100%;
border-radius: 10rpx;
}
}
.goodsInfoBox {
width: 490rpx;
font-size: 24rpx;
color: #333;
height: 150rpx;
position: relative;
.goodsName {
height: 50%;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
font-size: 28rpx;
word-break: break-all;
}
.price {
font-size: 28rpx;
color: #f00;
}
.surplus {
font-size: 24rpx;
}
.operationBox {
width: 260rpx;
height: 100rpx;
border-radius: 10rpx;
background-color: #404040;
position: absolute;
top: 0rpx;
right: 0rpx;
padding: 0 20rpx;
.btn {
width: 55rpx;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
font-size: 26rpx;
color: #fff;
}
}
.sanjiaoxing {
width: 0;
height: 0;
border-left: 10rpx solid transparent;
border-right: 10rpx solid transparent;
border-top: 10rpx solid #404040;
position: absolute;
top: 100rpx;
right: 16rpx;
}
}
}
</style>
\ No newline at end of file
......@@ -4,9 +4,7 @@
<text>订单号:20211018154423824347</text>
<text style="color: #446dfc">待退款</text>
</view>
<view class="flex-between remarks">
商家备注:20211018154423824347
</view>
<view class="flex-between remarks"> 商家备注:20211018154423824347 </view>
<view class="consigneeInfo">
<text style="margin-right: 40rpx">信息</text>
<text style="margin-right: 20rpx">13312341234</text>
......@@ -70,7 +68,7 @@ export default {
color: #333;
margin-bottom: 20rpx;
}
.remarks{
.remarks {
font-size: 26rpx;
color: #333;
margin-bottom: 20rpx;
......@@ -103,8 +101,8 @@ export default {
}
}
.goodsBox {
width: 480rpx;
height: 160rpx;
flex-grow: 1;
font-size: 24rpx;
color: #333;
.goodsName {
......@@ -114,6 +112,7 @@ export default {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
word-break: break-all;
}
.weight {
height: 35%;
......
......@@ -15,13 +15,33 @@
@change="change"
></u-tabs>
</view>
<view
style="
height: calc(100vh - 50px);
width: calc(100vw);
overflow: hidden;
padding-bottom: 20px;
"
>
<scroll-view
:scroll-y="true"
:enable-back-to-top="true"
:enable-flex="true"
@scrolltolower="lower"
:style="{ height: '100%' }"
>
<goodsItem />
</scroll-view>
</view>
<tabbar></tabbar>
</view>
</template>
<script>
import tabbar from "./components/tabbar.vue";
import goodsItem from "./components/goodsItem.vue";
export default {
components: {
goodsItem,
tabbar,
},
data() {
......@@ -36,12 +56,32 @@ export default {
},
],
current: 0,
msg: {
pageIndex: 1,
pageSize: 15,
OrderId: 0,
OrderType: 0,
DeliveryMethod: 0,
StartTime: "",
EndTime: "",
OrderStatus: 0,
OrderNo: "",
},
};
},
methods: {
change(index) {
this.current = index;
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.init();
} else {
this.status = "nomore";
}
},
},
onLoad() {
uni.setNavigationBarTitle({
......@@ -88,6 +128,6 @@ export default {
}
}
.tabbox {
height: 100rpx;
margin-bottom: 10rpx;
}
</style>
\ No newline at end of file
<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" />
<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" />
<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
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" />
<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" />
<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" />
<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" />
<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" />
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/user.png"
mode=""
class="imgicon"
/>
<view class="iconname">用户管理</view>
</view>
</view>
......@@ -47,10 +77,20 @@
<view class="conditionOfBusiness">
<view class="title">经营状况</view>
<view class="day flex-center">
<view class="dayitem choose">今日</view>
<view class="dayitem">昨日</view>
<view class="dayitem choose">7日</view>
<view class="dayitem">30日</view>
<!-- <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">
......@@ -77,39 +117,70 @@
<view class="handleItem">
<view class="handleItemNum">0</view>
<view class="handleItemName">待发货订单</view>
<view class="handleItemBtn">立即发货 <u-icon name="arrow"></u-icon>
<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 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 }}
<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 }}
<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 choose">7日</view>
<view class="dayitem">30日</view>
<!-- <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">
<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>
......@@ -117,17 +188,18 @@
</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 {
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
tabbar,
},
data() {
return {
array: [{
array: [
{
name: "支付金额",
key: 1,
},
......@@ -145,7 +217,8 @@
},
],
payType: "",
array1: [{
array1: [
{
name: "全部",
key: 1,
},
......@@ -163,6 +236,21 @@
},
],
payType1: "",
//加载
loading: false,
clickDate: "first",
dateStr: [], //日期
//查询数据
basicQMsg: {
Source: 0, //来源
StartDate: "", //开始时间
EndDate: "", //结束时间
SalesTimeType: 0, //默认今日
OrderBy: "",
UserType: -1, //0-普通用户,1-领队导游
},
basicData: {}, //基础数据
salesData: {}, //销售数据
};
},
methods: {
......@@ -221,7 +309,8 @@
extra: {
column: {
type: "group",
width: (_self.cWidth * _self.pixelRatio * 0.45) /
width:
(_self.cWidth * _self.pixelRatio * 0.45) /
chartData.categories.length,
},
},
......@@ -239,11 +328,67 @@
animation: true,
});
canvaColumn.showToolTip(e, {
format: function(item, category) {
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;
......@@ -251,39 +396,40 @@
uni.setNavigationBarTitle({
title: "商城管理",
});
this.getBasicData()
},
};
};
</script>
<style lang="scss" scoped>
.indexpage {
.indexpage {
min-height: 100vh;
background-color: #f7f7f7;
box-sizing: border-box;
padding-bottom: 100rpx;
}
}
.flex-center {
.flex-center {
display: flex;
justify-content: space-between;
align-items: center;
}
}
.topBox {
.topBox {
height: 350rpx;
position: relative;
margin-bottom: 20rpx;
}
}
.bg {
.bg {
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 0;
}
}
.topinfo {
.topinfo {
height: 130rpx;
box-sizing: border-box;
padding: 0 50rpx 0 20rpx;
......@@ -295,31 +441,31 @@
top: 0;
left: 0;
z-index: 1;
}
}
.headimg {
.headimg {
width: 70rpx;
height: 70rpx;
border-radius: 50%;
}
}
.name1 {
.name1 {
margin-left: 24rpx;
font-size: 40rpx;
color: #fff;
}
}
.ewmimg {
.ewmimg {
width: 50rpx;
height: 50rpx;
}
}
.name2 {
.name2 {
font-size: 24rpx;
color: #fff;
}
}
.msgBox {
.msgBox {
box-sizing: border-box;
width: 700rpx;
height: 200rpx;
......@@ -366,10 +512,10 @@
font-size: 24rpx;
}
}
}
}
.conditionOfBusiness,
.echartsBox {
.conditionOfBusiness,
.echartsBox {
height: 480rpx;
width: 700rpx;
margin: 0 auto;
......@@ -380,11 +526,12 @@
margin-bottom: 40rpx;
.day {
width: 590rpx;
width: 300rpx;
height: 50rpx;
border-radius: 25rpx;
border: 2rpx solid #667cb8;
overflow: hidden;
margin: 0 auto;
.dayitem {
width: 150rpx;
......@@ -422,14 +569,14 @@
}
}
}
}
}
.title {
.title {
font-size: 30rpx;
margin-bottom: 30rpx;
}
}
.fastHandle {
.fastHandle {
width: 700rpx;
// height: 300rpx;
margin: 0 auto;
......@@ -465,9 +612,9 @@
}
}
}
}
}
.echartsBox {
.echartsBox {
width: 700rpx;
height: auto;
margin: 0 auto;
......@@ -477,5 +624,5 @@
display: flex;
font-size: 30rpx;
}
}
}
</style>
<template>
<view>
<view class="setPage">
<view class="topBox">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/bg.png"
mode="widthFix"
class="bg"
/>
<view class="headImgBox"></view>
<view class="nameBox"
>饭粒汪
<u-icon
name="edit"
style="margin-left: 10rpx"
@click="showBox1 = true"
></u-icon>
</view>
<u-modal
v-model="showBox1"
:show-cancel-button="true"
title="修改商城名称"
contentSlot
@confirm="showBox1 = false"
>
<input type="text" v-model="username" class="nameInput" />
</u-modal>
</view>
<view class="boxGroup">
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/shop.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox">
<view class="name">营业状态</view>
<u-switch v-model="msg.business"></u-switch>
</view>
</view>
<view class="boxItem">
<view class="leftBox"></view>
<view
class="rightBox"
:style="businessKey == 1 ? 'border:none' : ''"
></view>
<u-radio-group
v-model="msg.businessTime"
@change="radioGroupChange"
class="radioGroup"
>
<u-radio
v-for="(item, index) in businessTimeList"
:key="index"
:name="item.key"
shape="circle"
>
{{ item.name }}
</u-radio>
</u-radio-group>
</view>
<view class="boxItem" v-if="businessKey == 2">
<view class="leftBox"></view>
<view class="rightBox" @click="showBox2 = true">
<view class="name">选择日期</view>
<view class="flex-center">
<view class="weeek">{{ weekStr }}</view>
<u-icon name="arrow" style="margin-left: 10rpx"></u-icon
></view>
</view>
</view>
<u-modal
v-model="showBox2"
:show-cancel-button="true"
title="选择日期"
contentSlot
@confirm="showBox2 = false"
>
<view class="modelBox2">
<view
v-for="(item, index) in weekArr"
:key="index"
class="modelBox2Item"
:class="item.choose ? 'modelBox2ItemActive' : ''"
@click="chooseWeek(item)"
>
{{ item.name }}
</view>
</view>
</u-modal>
<view class="boxItem" v-if="businessKey == 2">
<view class="leftBox"></view>
<view class="rightBox" style="border: none">
<view class="name">选择时间段</view>
<view class="flex-center">
<view class="weeek">{{ weekStr }}</view>
<u-icon name="arrow" style="margin-left: 10rpx"></u-icon
></view>
</view>
</view>
</view>
<tabbar></tabbar>
</view>
</template>
<script>
import tabbar from "./components/tabbar.vue";
export default {
components:{
tabbar
components: {
tabbar,
},
}
data() {
return {
showBox1: false,
username: "",
showBox2: false,
msg: {
business: false,
businessTime: 1,
},
businessTimeList: [
{
name: "全天24小时",
key: 1,
},
{
name: "自定义营业时间",
key: 2,
},
],
businessKey: 1,
weekArr: [
{
name: "周一",
key: 1,
choose: false,
},
{
name: "周二",
key: 2,
choose: false,
},
{
name: "周三",
key: 3,
choose: false,
},
{
name: "周四",
key: 4,
choose: false,
},
{
name: "周五",
key: 5,
choose: false,
},
{
name: "周六",
key: 6,
choose: false,
},
{
name: "周日",
key: 7,
choose: false,
},
],
weekStr: "",
};
},
methods: {
radioGroupChange(e) {
this.businessKey = e;
},
chooseWeek(e) {
e.choose = !e.choose;
this.weekStr = this.weekArr
.filter((item) => {
return item.choose;
})
.map((item) => item.name)
.join("、");
},
jumpPage(url){
uni.navigateTo({
url: url,
});
}
},
onLoad() {
uni.setNavigationBarTitle({
title: "商城设置",
});
},
};
</script>
<style lang="scss">
.flex-center{
<style lang="scss" scoped>
.flex-center {
display: flex;
justify-content: center;
align-items: center;
}
.setPage {
min-height: 100vh;
background-color: #f7f7f7;
box-sizing: border-box;
padding-bottom: 100rpx;
}
.topBox {
position: relative;
margin-bottom: 20rpx;
.bg {
width: 100%;
}
.headImgBox {
position: absolute;
top: 30rpx;
left: 50%;
transform: translateX(-50%);
z-index: 2;
width: 140rpx;
height: 140rpx;
border-radius: 50%;
border: 4rpx solid #fff;
overflow: hidden;
background-color: #f00;
}
.nameBox {
width: 700rpx;
height: 200rpx;
border-radius: 10rpx;
position: absolute;
top: 110rpx;
left: 50%;
transform: translateX(-50%);
z-index: 1;
background-color: #fff;
font-size: 28rpx;
display: flex;
justify-content: center;
align-items: center;
}
}
.boxGroup {
width: 700rpx;
padding: 0 30rpx;
margin: 10rpx auto;
background-color: #fff;
border-radius: 10rpx;
.boxItem {
height: 100rpx;
display: flex;
align-items: center;
position: relative;
.leftBox {
width: 50rpx;
margin-right: 20rpx;
}
.rightBox {
width: 560rpx;
height: 100rpx;
border-bottom: 2rpx solid #ccced5;
display: flex;
justify-content: space-between;
align-items: center;
.name {
font-size: 28rpx;
color: #606266;
}
}
.radioGroup {
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
}
}
}
/deep/.u-radio {
margin-right: 60rpx;
}
/deep/.u-radio__icon-wrap {
margin-right: 20rpx;
}
/deep/.u-model {
border-radius: 10rpx;
}
.weeek {
max-width: 300rpx;
white-space: nowrap;
overflow: hidden;
font-size: 28rpx;
color: #606266;
}
.nameInput {
width: 560rpx;
height: 70rpx;
border-radius: 10rpx;
margin: 20rpx auto;
box-sizing: border-box;
padding: 0 20rpx;
background-color: #f7f7f7;
}
.modelBox2 {
width: 560rpx;
border-radius: 10rpx;
margin: 20rpx auto;
box-sizing: border-box;
padding: 0 20rpx;
background-color: #fff;
display: flex;
flex-wrap: wrap;
.modelBox2Item {
width: 160rpx;
height: 60rpx;
border-radius: 30rpx;
border: 2rpx solid #dfdfdf;
font-size: 30rpx;
color: #a4a4a4;
display: flex;
justify-content: center;
align-items: center;
margin: 10rpx 20rpx 10rpx 0;
}
& .modelBox2Item:nth-child(3n) {
margin-right: 0;
}
.modelBox2ItemActive {
border-color: #111 !important;
color: #111;
}
}
</style>
\ No newline at end of file
<template>
<view class="timepage">
</view>
</template>
<script>
export default {
data() {
return {};
},
onLoad() {
uni.setNavigationBarTitle({
title: "设置时间段",
});
},
};
</script>
<style lang="scss" scoped>
.timepage{
min-height: 100vh;
background-color: #f7f7f7;
box-sizing: border-box;
padding-bottom: var(safe-area-inset-bottom);
}
</style>
\ No newline at end of file
......@@ -7,7 +7,7 @@ function calcContentHeight(chaliang) {
})
return contentHeight
}
function SystemInfo(){//获取屏幕宽高
function SystemInfo() {//获取屏幕宽高
let SystemInfo = {}
uni.getSystemInfo({
success(res) {
......@@ -17,22 +17,45 @@ function SystemInfo(){//获取屏幕宽高
})
return SystemInfo
}
function getRect(selector){//获取元素的信息
function getRect(selector) {//获取元素的信息
return new Promise((resolve) => {
let view = uni.createSelectorQuery().select(selector);
view.fields({
size: true,
rect: true,
scrollOffset:true
scrollOffset: true
}, (res) => {
resolve(res);
}).exec();
})
}
}
function AddDay(date, day) {
let myDate = "";
if (date) {
myDate = new Date(date);
} else {
myDate = new Date();
}
myDate = myDate.setDate(myDate.getDate() + day);
myDate = new Date(myDate);
const seperator1 = "-";
let year = myDate.getFullYear();
let month = myDate.getMonth() + 1;
let strDate = myDate.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
let currentdate = year + seperator1 + month + seperator1 + strDate;
return currentdate;
}
export default {
calcContentHeight,
SystemInfo,
getRect
getRect,
AddDay
}
\ No newline at end of file
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