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,10 +68,10 @@ export default {
color: #333;
margin-bottom: 20rpx;
}
.remarks{
font-size: 26rpx;
color: #333;
margin-bottom: 20rpx;
.remarks {
font-size: 26rpx;
color: #333;
margin-bottom: 20rpx;
}
.consigneeInfo {
width: 100%;
......@@ -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%;
......@@ -130,8 +129,8 @@ export default {
justify-content: flex-end;
align-items: center;
.btn {
// width: 90rpx;
// height: 50rpx;
// width: 90rpx;
// height: 50rpx;
border-radius: 30rpx;
border: 2rpx solid #f7f7f7;
margin: 0 0 0 30rpx;
......
......@@ -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
This diff is collapsed.
<template>
<view>
<tabbar></tabbar>
<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{
display: flex;
justify-content: center;
align-items: 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
function calcContentHeight(chaliang) {
let contentHeight = 0
uni.getSystemInfo({
success(res) {
contentHeight = res.windowHeight - 40 - chaliang
}
})
return contentHeight
let contentHeight = 0
uni.getSystemInfo({
success(res) {
contentHeight = res.windowHeight - 40 - chaliang
}
})
return contentHeight
}
function SystemInfo(){//获取屏幕宽高
function SystemInfo() {//获取屏幕宽高
let SystemInfo = {}
uni.getSystemInfo({
success(res) {
......@@ -17,22 +17,45 @@ function SystemInfo(){//获取屏幕宽高
})
return SystemInfo
}
function getRect(selector){//获取元素的信息
return new Promise((resolve) => {
let view = uni.createSelectorQuery().select(selector);
view.fields({
size: true,
rect: true,
scrollOffset:true
}, (res) => {
resolve(res);
}).exec();
})
}
function getRect(selector) {//获取元素的信息
return new Promise((resolve) => {
let view = uni.createSelectorQuery().select(selector);
view.fields({
size: true,
rect: 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,
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