第一次提交

This commit is contained in:
gxwebsoft
2023-08-04 13:14:48 +08:00
commit 1b923e5cff
1030 changed files with 128016 additions and 0 deletions

View File

@@ -0,0 +1,103 @@
<template>
<view>
<view class="user-list">
<u-list @scrolltolower="scrolltolower">
<u-list-item v-for="(item, index) in list" :key="index">
<u-cell :title="`${item.nickname}`" value="移除" isLink>
<u-avatar slot="icon" shape="square" size="45" :src="item.avatar"
customStyle="margin: -3px 5px -3px 0"></u-avatar>
</u-cell>
</u-list-item>
</u-list>
<view class="bottom"></view>
</view>
<empty v-if="!list.length" tips="暂无数据" />
</view>
</template>
<script>
import * as Api from '@/api/user-referee.js'
import Empty from '@/components/empty'
export default {
components: {
// Search,
Empty
},
data() {
return {
list: []
}
},
onLoad(option) {
this.getUserReferee()
},
onShow(){},
methods: {
getUserReferee(){
const userId = uni.getStorageSync('userId')
Api.listUserReferee({userId}).then(res => {
this.list = res.data
})
},
onRemove(id){
Api.removeUserReferee(id).then(()=>{
this.$toast('移除成功')
this.getUserReferee()
})
}
}
}
</script>
<style lang="scss" scoped>
.user-list{
width: 750rpx;
margin: auto;
display: flex;
flex-direction: column;
background-color: #ffffff;
.item{
border-bottom: 1rpx solid #eeeeee;
display: flex;
justify-content: space-between;
align-items: center;
padding: 10rpx 0;
.info{
.food{
color: #ff0000;
.goods-name{
padding-right: 10rpx;
}
}
.is-buy{
color: #ff0000;
}
.no-buy{
color: #0000ff;
}
.order-ok{
color: #51b2aa;
}
}
.time{
color: #c2c2c2;
}
.remove{
padding: 0 30rpx;
}
}
.bottom{
height: 50rpx;
}
.custom-style {
margin: 10rpx 0;
width: 220rpx;
}
.custom-active-style {
margin: 10rpx 0;
width: 220rpx;
color: #ffffff;
background-color: #51b2aa;
}
}
</style>

View File

@@ -0,0 +1,81 @@
<template>
<view class="container">
<view class="main" style="padding-top: 150rpx;">
<u-grid :border="false" col="2" align="center" @click="onGrid">
<u-grid-item v-for="(item,index) in list" :key="index">
<view class="demo-layout bg-purple-light" :style="`background-color: ${item.background};`">
<image class="icon" :src="item.icon"></image>
<text>{{ item.title }}</text>
</view>
</u-grid-item>
</u-grid>
</view>
</view>
</template>
<script>
const list = [{
name: 'lock',
title: '代他人取餐',
path: 'pages/order/delivery/others',
background: 'abd5f8',
icon: '../../../static/icon/05.svg'
}, {
name: 'lock',
title: '取消代餐',
path: 'pages/order/delivery/cancel',
background: '#bee9d3',
icon: '../../../static/icon/04.svg'
}];
export default {
data() {
return {
list,
isLogin: false
}
},
onLoad() {},
onShow() {},
methods: {
onGrid(index) {
this.$navTo(this.list[index].path)
}
}
}
</script>
<style lang="scss" scoped>
.container {
height: calc(100vh - var(--window-top) - 9vh);
// background: #fff;
background: url('https://file.wsdns.cn/20230417/3d70ff20e2044977a872f867cfe7e570.png');
background-position: bottom;
}
.main {
width: 600rpx;
margin: auto;
.demo-layout {
background-color: #ffffff;
margin: 15rpx auto;
width: 220rpx;
color: #4c4c4c;
padding: 27rpx;
border-radius: 15rpx;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-size: 36rpx;
.icon {
width: 80rpx;
height: 80rpx;
margin-bottom: 15rpx;
}
}
}
</style>

View File

@@ -0,0 +1,355 @@
<template>
<view>
<!-- <view class="select-date">
<text @click="openCalendar">{{ deliveryTime }}<u-icon class="icon" name="calendar"></u-icon></text>
<u-calendar v-model="show" mode="date" :min-date="minDate" :max-date="maxDate" @change="changeDate"></u-calendar>
</view> -->
<view class="order">
<block>
<view class="title">
<text>我的取餐码</text>
<text class="desc">将此取餐码分享给微信好友即可帮你取餐<br>仅当日有效</text>
</view>
<view class="qrcode">
<image :src="qrcode"></image>
</view>
</block>
</view>
<!-- <view class="order">
<block>
<view class="title">
<text>物品档口</text>
</view>
<view class="fenqi">
<block v-for="(item,index) in entityGoods" :key="index">
<view class="item" v-if="item.totalNum > 0">
<image class="image" :src="item.imageUrl" mode="aspectFill"></image>
<view class="goods-info">
<view class="goods-name">
<text class="name">{{ item.goodsName }}</text>
<text class="selling-point">{{ item.comments }}</text>
</view>
<view class="goods-price">
<text class="price">{{ item.goodsPrice }}</text>
<text class="num"> x {{ item.totalNum }}</text>
</view>
</view>
</view>
</block>
</view>
</block>
</view> -->
<!-- <view class="submit">
<u-button type="warning" @click="generateQrCode">生成核销码</u-button>
</view> -->
<!-- <u-button @click="verificationQrCode">生成核销码</u-button> -->
<!-- <u-modal v-model="showQrCode" confirmText="取消" title="核销码">
<view><image :src="qrcode" class="qrcode"></image></view>
</u-modal> -->
</view>
</template>
<script>
import { getUser } from '@/api/user.js'
import { dateFormat } from '@/utils/util.js'
import store from '@/store'
import * as Config from '@/config.js'
import * as UserApi from '@/api/user.js'
export default {
components: {
// Search
},
data() {
return {
totalPrice: 0,
list: [],
form: {},
userId: 0,
canteenGoods: [],
entityGoods: [],
orderId: null,
orderNo: null,
deliveryTime: null,
record: {},
minDate: dateFormat('YYYY-mm-dd',new Date()),
maxDate: '2030-01-01',
deliveryTime: dateFormat('YYYY-mm-dd',new Date()), // var startDate= new Date(new Date().toLocaleDateString());
show: false,
// 正在加载中
isLoading: true,
// 当前选择的设备ID
goodsId: null,
mode: 'range',
month: 6,
agree: true,
price: {
batteryRent: 300,
batteryDeposit: 300,
batteryInsurance: 0
},
customStyle: {
marginTop: '20px', // 注意驼峰命名,并且值必须用引号包括,因为这是对象
backgroundColor: '#51b2aa'
},
showQrCode: false,
qrcode: ''
}
},
onLoad(option) {
this.getUserInfo()
},
onShow(){
this.getMyQrCode()
},
methods: {
getUserInfo() {
const { form } = this
const app = this
getUser().then(res => {
if( res.code == 0 && res.data.username != 'www') {
console.log("获取用户信息: ",res.data);
app.form = res.data
app.userInfo = res.data
app.userId = res.data.userId
store.dispatch('setUserInfo',res.data)
app.isLogin = true
}else{
app.isLogin = false
app.handleLogout()
}
})
},
getMyQrCode(){
const app = this
const userId = uni.getStorageSync('userId')
UserApi.getMyQrCode({
codeContent: 'http://apps.gxwebsoft.com/baocan/#/pages/order/delivery/others?userId=' + userId,
}).then(res => {
app.showQrCode = true
app.qrcode = res.data
})
},
onClose(){
this.showQrCode = false
},
onChangeStepper({ value }) {
this.month = value
},
change(e) {
console.log(e);
},
openCalendar(){
this.show = true
},
changeDate(date){
this.deliveryTime = date.result
this.getMyOrder()
},
onInput(month) {
this.month = month
},
onAgree(){
this.agree = !this.agree
},
showXieyi(){
this.$navTo('pages/help/xieyi')
},
copyCode(text){
// #ifndef H5
console.log("text: ",text);
uni.setClipboardData({
text: text,
success: (result) => {
this.$success("复制成功")
}
})
// #endif
// #ifdef H5
let textarea = document.createElement("textarea")
textarea.value = text
textarea.readOnly = "readOnly"
document.body.appendChild(textarea)
textarea.select() // 选中文本内容
textarea.setSelectionRange(0, info.length)
uni.showToast({ //提示
title: '复制成功'
})
result = document.execCommand("copy")
textarea.remove()
// #endif
}
}
}
</script>
<style lang="scss" scoped>
// .goods-info {
// background-color: #ffffff;
// border-radius: 12rpx;
// width: 700rpx;
// margin: 20rpx auto;
// .goods {
// padding: 20rpx;
// display: flex;
// image {
// width: 220rpx;
// height: 220rpx;
// margin: 20rpx;
// }
// .info {
// display: flex;
// flex-direction: column;
// padding: 20rpx;
// .goods-name {
// font-size: 34rpx;
// margin-bottom: 10rpx;
// }
// .goods-desc {
// font-size: 28rpx;
// color: #999999;
// }
// .selling-point{
// padding: 5px 0;
// color: #e6760e;
// }
// }
// }
// .between-time {
// width: 500rpx;
// margin: auto;
// padding-bottom: 20rpx;
// text-align: center;
// .select-slider {
// line-height: 2em;
// color: #e6760e;
// }
// }
// }
.order {
background-color: #ffffff;
border-radius: 12rpx;
width: 700rpx;
margin: 20rpx auto;
padding: 10rpx 0;
.title {
text-align: center;
font-size: 38rpx;
padding: 20rpx;
display: flex;
flex-direction: column;
justify-content: center;
.desc{
font-weight: normal;
color: #999999;
font-size: 28rpx;
}
}
.xieyi {
padding: 20rpx;
font-size: 26rpx;
}
}
.submit {
border-radius: 12rpx;
width: 700rpx;
margin: 20rpx auto;
padding: 10rpx 0;
}
.xieyi-text{
color: #0000ff;
}
.fenqi{
padding: 30rpx;
border-top: 1px solid #eee;
.item{
display: flex;
padding: 20rpx 0;
.image{
width: 160rpx;
height: 120rpx;
}
.goods-info{
width: 460rpx;
margin-left: 10rpx;
display: flex;
justify-content: space-between;
.goods-name{
text-align: left;
display: flex;
flex-direction: column;
.name{
font-weight: 500;
max-width: 300rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden; //溢出内容隐藏
text-overflow: ellipsis; //文本溢出部分用省略号表示
display: -webkit-box; //特别显示模式
-webkit-line-clamp: 2; //行数
line-clamp: 2;
-webkit-box-orient: vertical; //盒子中内容竖直排列
}
.selling-point{
max-width: 300rpx;
color: #999999;
text-overflow: -o-ellipsis-lastline;
overflow: hidden; //溢出内容隐藏
text-overflow: ellipsis; //文本溢出部分用省略号表示
display: -webkit-box; //特别显示模式
-webkit-line-clamp: 1; //行数
line-clamp: 1;
-webkit-box-orient: vertical; //盒子中内容竖直排列
}
}
.goods-price{
display: flex;
flex-direction: column;
.price{
color: #999999;
}
.num{
text-align: right;
color: #cccccc;
}
}
}
}
}
.select-date {
text-align: center;
line-height: 2.4rem;
background-color: #ffffff;
.icon {
margin-left: 10rpx;
}
}
.on-buy{
background-color: #804002;
}
.qrcode{
padding-bottom: 40rpx;
margin: auto;
display: flex;
justify-content: center;
image{
width: 360rpx;
height: 360rpx;
}
}
</style>

View File

@@ -0,0 +1,311 @@
<template>
<view class="bg">
<view class="qrcode-box">
<block>
<view class="title line-align">
<view :class="qrcodeType == 0 ? 'active' : ''" @click="onChange(0)">取餐码</view>
<view :class="qrcodeType == 1 ? 'active' : ''" @click="onChange(1)">邀请码</view>
</view>
<view class="qrcode">
<image :src="qrcode"></image>
</view>
<text v-if="qrcodeType == 0" class="desc line-align">将此取餐码分享给微信好友即可帮你取餐<br>仅当日有效</text>
<text v-if="qrcodeType == 1" class="desc line-align">长按分享此码收集代取餐人员</text>
</block>
<block>
<view class="title"> {{ userRefereeList.length }} </view>
<view class="user-list" v-if="qrcodeType == 1">
<view class="item" v-for="(item,index) in userRefereeList" :key="index">
<view class="info">
<view class="nick-name">{{ item.nickname }}</view>
<view class="time">{{ item.createTime }}</view>
</view>
<view class="action">
<u-button shape="circle" type="error" size="mini" plain @click="onRemove(item.id)">移除</u-button>
</view>
</view>
<view class="bottom"></view>
</view>
<view class="user-list" v-if="qrcodeType == 0">
<view class="title line-align" style="padding-top: 10rpx;">
<button :type="tongjiType == 0 ? 'primary' : ''" size="mini" @click="onChange2(0)">按人员统计</button>
<button :type="tongjiType == 1? 'primary' : ''" size="mini" @click="onChange2(1)">按菜品统计</button>
<!-- <u-button size="medium" plain @click="onChange2(1)" class="custom-style" :class="tongjiType == 1 ? 'custom-active-style' : ''">按菜品统计</u-button> -->
</view>
<view class="item" v-for="(item,index) in userOrderList" :key="index">
<view class="info">
<view class="nick-name">{{ item.nickname }}</view>
<!-- 按人员统计 -->
<block v-if="tongjiType == 0">
<span class="no-buy" v-if="item.order.length == 0">未报餐</span>
<span class="order-ok" v-else-if="item.order[0].orderStatus == 30">已取餐</span>
<span class="is-buy" v-else>已报餐</span>
</block>
<!-- 按菜品统计 -->
<block v-if="tongjiType == 1 && item.order.length > 0">
<block v-for="(goods,index) in item.order[0].goodsList">
<span class="food">{{ index > 0 ? '、': '' }}</span>
<span class="food" v-if="goods.deliveryStatus == 10">{{ goods.goodsName }}x{{ goods.totalNum }}</span>
<span class="line-through" v-else>{{ goods.goodsName }}x{{ goods.totalNum }}</span>
</block>
</block>
</view>
</view>
<view class="bottom"></view>
</view>
</block>
</view>
</view>
</template>
<script>
import store from '@/store/index.js'
import storage from '@/utils/storage'
import { ACCESS_TOKEN, USER_ID } from '@/store/mutation-types'
import { pageAgentUser } from '@/api/apps-bc-agent.js'
import { getSetting } from '@/api/setting.js'
import { checkLogin } from '@/core/app.js'
import * as UserRefereeApi from '@/api/user-referee.js'
import * as OrderApi from '@/api/order.js'
import * as UserApi from '@/api/user.js'
import Empty from '@/components/empty'
import { userId } from '@/config'
export default {
components: {
// Search,
Empty
},
data() {
return {
options: null,
title: '代他人取餐',
// 正在加载中
isLoading: false,
// 是否授权了定位权限
isAuthor: true,
// 当前选择的门店ID
selectedId: null,
// 订单列表数据
list: [],
userRefereeList: [],
userOrderList: [],
qrcodeType: 0, // 0邀请码 1取餐码
tongjiType: 0, // 统计类型 0按人员统计 1按菜品统计
qrcode: ''
}
},
onLoad(options) {
this.options = options
this.listUserReferee()
this.addUserByQrCode()
this.getOthersOrder()
this.getMyQrCode()
},
onShow() {
this.getUserInfo()
},
methods: {
navTo(merchantId) {
const navTo = uni.$u.route()
navTo('pages/merchant/detail', {
merchantId
})
},
getUserInfo(){
if(!uni.setStorageSync('userId')){
this.$error('请先登录',() => {
this.$navTo('pages/login/index')
})
}
},
getMyQrCode(){
const app = this
const { qrcodeType } = this
const userId = uni.getStorageSync('userId')
// 取餐码 二维码内容 dqc:代取餐人ID
if(qrcodeType == 0){
UserApi.getMyQrCode({
codeContent: 'dqc:' + userId
}).then(res => {
app.qrcode = res.data
})
}
// 邀请码 二维码内容 跳转到带有推荐人ID的网址完成绑定关系
if(qrcodeType == 1){
UserApi.getMyQrCode({
codeContent: 'http://apps.gxwebsoft.com/baocan/#/pages/order/delivery/others?userId=' + userId,
}).then(res => {
app.qrcode = res.data
})
}
},
// 切换类型
onChange(index){
this.qrcodeType = index
this.getMyQrCode()
this.getOthersOrder()
},
// 切换类型
onChange2(index){
this.tongjiType = index
this.getOthersOrder()
},
// 查询推荐关系列表
listUserReferee(){
const app = this
const dealerId = uni.getStorageSync('userId')
UserRefereeApi.listUserReferee({dealerId}).then(res => {
app.userRefereeList = res.data
})
},
// 查询代取餐人员的订单信息
getOthersOrder(){
OrderApi.getOthersOrder().then(resp => {
console.log("resp: ",resp);
this.userOrderList = resp.data
})
},
addUserByQrCode(){
const app = this
const { userId } = app.options
const dealerId = uni.getStorageSync('userId')
if(userId && userId != Number(dealerId)){
app.qrcodeType = 1
UserRefereeApi.addUserReferee({
dealerId,
userId
}).then(res => {
app.$toast(res.message)
app.listUserReferee()
})
}
},
onRemove(id){
const app = this
UserRefereeApi.removeUserReferee(id).then(()=>{
app.$toast('移除成功')
app.listUserReferee()
})
}
// onAgentBaocan(user){
// console.log("user收拾收拾: ",user);
// uni.setStorageSync('catererUser',user)
// this.$navTo('pages/order/get-food/get-food')
// },
// clearAgentBaocan(){
// uni.removeStorageSync('catererUser')
// this.$navTo('pages/order/get-food/get-food')
// }
}
}
</script>
<style lang="scss" scoped>
page{
background-color: #67e7dd;
}
.bg {
background-image: linear-gradient(#51b2aa, #67e7dd);
height: calc(100vh - var(--window-top));
padding: 70rpx 0;
}
.qrcode-box{
width: 660rpx;
margin: auto;
background-color: #ffffff;
border-radius: 20rpx;
.title{
padding: 12rpx 0;
display: flex;
justify-content: space-around;
line-height: 80rpx;
font-size: 34rpx;
color: #999999;
.active{
color: #51b2aa;
}
}
.line-align{
width: 580rpx;
margin: auto;
border-bottom: 1rpx solid #eeeeee;
}
.qrcode{
padding-bottom: 0rpx;
margin: auto;
display: flex;
justify-content: center;
image{
width: 360rpx;
height: 360rpx;
}
}
.desc{
color: blue;
display: flex;
text-align: center;
justify-content: center;
padding-bottom: 24rpx;
}
.user-list{
width: 580rpx;
margin: auto;
display: flex;
flex-direction: column;
.item{
border-bottom: 1rpx solid #eeeeee;
display: flex;
justify-content: space-between;
align-items: center;
padding: 10rpx 0;
.info{
.food{
color: #ff0000;
.goods-name{
padding-right: 10rpx;
}
}
.line-through{
text-decoration: line-through;
color: #666666;
.goods-name{
padding-right: 10rpx;
}
}
.is-buy{
color: #ff0000;
}
.no-buy{
color: #0000ff;
}
.order-ok{
color: #51b2aa;
}
}
.time{
color: #c2c2c2;
}
.remove{
padding: 0 30rpx;
}
}
.bottom{
height: 50rpx;
}
.custom-style {
margin: 10rpx 0;
width: 220rpx;
}
.custom-active-style {
margin: 10rpx 0;
width: 220rpx;
color: #ffffff;
background-color: #51b2aa;
}
}
}
</style>

View File

@@ -0,0 +1,451 @@
<template>
<view>
<view class="select-date">
<view class="caterer-user" v-if="order">取餐人{{ order.nickname }}</view>
<text>{{ deliveryTime }}</text>
</view>
<view class="order" v-if="canteenGoods.length > 0">
<block>
<view class="title">
<text>食堂档口</text>
</view>
<view class="fenqi">
<block v-for="(item,index) in canteenGoods" :key="index">
<view class="item" v-if="item.totalNum > 0">
<image class="image" :src="item.imageUrl" mode="aspectFill"></image>
<view class="goods-info">
<view class="goods-name">
<text class="name">{{ item.goodsName }}</text>
<text class="selling-point">{{ item.comments }}</text>
</view>
<view class="goods-price">
<text class="price">{{ item.goodsPrice }}</text>
<text class="num"> x {{ item.totalNum }}</text>
</view>
</view>
</view>
</block>
</view>
</block>
</view>
<view class="order" v-if="entityGoods.length > 0">
<block>
<view class="title">
<text>物品档口</text>
</view>
<view class="fenqi">
<block v-for="(item,index) in entityGoods" :key="index">
<view class="item" v-if="item.totalNum > 0">
<image class="image" :src="item.imageUrl" mode="aspectFill"></image>
<view class="goods-info">
<view class="goods-name">
<text class="name">{{ item.goodsName }}</text>
<text class="selling-point">{{ item.comments }}</text>
</view>
<view class="goods-price">
<text class="price">{{ item.goodsPrice }}</text>
<text class="num"> x {{ item.totalNum }}</text>
</view>
</view>
</view>
</block>
</view>
</block>
</view>
<!-- <empty v-if="canteenGoods.length == 0 && entityGoods.length == 0" tips="暂无信息" /> -->
<view class="submit" v-if="canteenGoods.length > 0 || entityGoods.length > 0">
<u-button type="success" :disabled="showQrCode" @click="verificationQrCode">确认核销</u-button>
</view>
<u-modal v-model="showQrCode" confirmText="取消" title="核销码">
<view>
<image :src="qrcode" class="qrcode"></image>
</view>
</u-modal>
<u-calendar v-model="show" mode="date" :min-date="minDate" :max-date="maxDate" @change="changeDate">
</u-calendar>
</view>
</template>
<script>
import {
dateFormat
} from '@/utils/util.js'
import store from '@/store';
// import Empty from '@/components/empty'
import * as UserApi from '@/api/user.js'
import * as OrderApi from '@/api/order.js'
import * as OrderGoodsApi from '@/api/order-goods.js'
export default {
components: {
// Empty
// Search
},
data() {
return {
totalPrice: 0,
list: [],
canteenGoods: [],
entityGoods: [],
order: null,
orderId: null,
orderNo: null,
deliveryTime: null,
record: {},
minDate: dateFormat('YYYY-mm-dd', new Date()),
maxDate: '2030-01-01',
deliveryTime: dateFormat('YYYY-mm-dd',new Date()), // var startDate= new Date(new Date().toLocaleDateString());
show: false,
// 正在加载中
isLoading: true,
verification: false,
// 当前选择的设备ID
goodsId: null,
agentUserId: null,
catererUserId: null,
catererUser: null,
mode: 'range',
month: 6,
agree: true,
price: {
batteryRent: 300,
batteryDeposit: 300,
batteryInsurance: 0
},
customStyle: {
marginTop: '20px', // 注意驼峰命名,并且值必须用引号包括,因为这是对象
backgroundColor: '#51b2aa'
},
showQrCode: false,
qrcode: ''
}
},
onLoad(options) {
this.options = options
this.userId = options.userId
this.dealerId = options.dealerId
this.getUserInfo()
this.getOrder()
},
onShow() {
// this.getCatererUser()
},
methods: {
// 跳转页面
navTo(url) {
uni.$u.route(url);
},
getUserInfo() {
const { form } = this
const app = this
UserApi.getUser().then(res => {
if( res.code == 0 && res.data.username != 'www') {
app.userInfo = res.data
res.data.roles.map(d => {
if(d.roleCode == 'verification'){
app.verification = true
}
})
}
})
},
getOrder() {
const app = this
const {
deliveryTime,
userId
} = this
// 核销订单查询
OrderApi.getReceiptOrder({
deliveryTime: dateFormat('YYYY-mm-dd', new Date()),
orderStatus: 10,
userId
}).then(res => {
if (res.data) {
if(res.code == 0 && res.data.length > 0){
const goodsList = res.data[0].goodsList
app.order = res.data[0]
app.orderId = res.data[0].orderId
app.orderNo = res.data[0].orderNo
app.canteenGoods = []
app.entityGoods = []
app.list = goodsList.map(d => {
if (d.gear == 10) {
app.canteenGoods.push(d)
}
if (d.gear == 20) {
app.entityGoods.push(d)
}
})
}
}
})
},
// 核销
verificationQrCode() {
const app = this
const { orderId, verification } = this
console.log("verification: ",verification);
if(verification == false){
app.$error("没有核销权限")
return false
}
OrderApi.verificationQrCode({
orderId
}).then(result => {
app.$success(result.message)
app.getOrder()
})
},
// getCatererUser() {
// const app = this
// const catererUser = uni.getStorageSync('catererUser')
// if (catererUser) {
// app.catererUser = catererUser
// app.catererUserId = catererUser.userId
// app.agentUserId = catererUser.userId
// app.getMyOrder()
// }
// },
onClose() {
this.showQrCode = false
},
onChangeStepper({
value
}) {
this.month = value
},
change(e) {
console.log(e);
},
openCalendar() {
this.show = true
},
changeDate(date) {
this.deliveryTime = date.result
this.getMyOrder()
},
onInput(month) {
this.month = month
},
onAgree() {
this.agree = !this.agree
},
showXieyi() {
this.$navTo('pages/help/xieyi')
},
copyCode(text) {
// #ifndef H5
console.log("text: ", text);
uni.setClipboardData({
text: text,
success: (result) => {
this.$success("复制成功")
}
})
// #endif
// #ifdef H5
let textarea = document.createElement("textarea")
textarea.value = text
textarea.readOnly = "readOnly"
document.body.appendChild(textarea)
textarea.select() // 选中文本内容
textarea.setSelectionRange(0, info.length)
uni.showToast({ //提示
title: '复制成功'
})
result = document.execCommand("copy")
textarea.remove()
// #endif
}
}
}
</script>
<style lang="scss" scoped>
// .goods-info {
// background-color: #ffffff;
// border-radius: 12rpx;
// width: 700rpx;
// margin: 20rpx auto;
// .goods {
// padding: 20rpx;
// display: flex;
// image {
// width: 220rpx;
// height: 220rpx;
// margin: 20rpx;
// }
// .info {
// display: flex;
// flex-direction: column;
// padding: 20rpx;
// .goods-name {
// font-size: 34rpx;
// margin-bottom: 10rpx;
// }
// .goods-desc {
// font-size: 28rpx;
// color: #999999;
// }
// .selling-point{
// padding: 5px 0;
// color: #e6760e;
// }
// }
// }
// .between-time {
// width: 500rpx;
// margin: auto;
// padding-bottom: 20rpx;
// text-align: center;
// .select-slider {
// line-height: 2em;
// color: #e6760e;
// }
// }
// }
.order {
background-color: #ffffff;
border-radius: 12rpx;
width: 700rpx;
margin: 20rpx auto;
padding: 10rpx 0;
.title {
font-weight: bold;
font-size: 30rpx;
padding: 20rpx;
display: flex;
justify-content: space-between;
}
.xieyi {
padding: 20rpx;
font-size: 26rpx;
}
}
.submit {
border-radius: 12rpx;
width: 700rpx;
margin: 20rpx auto;
padding: 10rpx 0;
}
.xieyi-text {
color: #0000ff;
}
.fenqi {
padding: 30rpx;
border-top: 1px solid #eee;
.item {
display: flex;
padding: 20rpx 0;
.image {
width: 160rpx;
height: 120rpx;
}
.goods-info {
width: 460rpx;
margin-left: 10rpx;
display: flex;
justify-content: space-between;
.goods-name {
text-align: left;
display: flex;
flex-direction: column;
.name {
font-weight: 500;
max-width: 300rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden; //溢出内容隐藏
text-overflow: ellipsis; //文本溢出部分用省略号表示
display: -webkit-box; //特别显示模式
-webkit-line-clamp: 2; //行数
line-clamp: 2;
-webkit-box-orient: vertical; //盒子中内容竖直排列
}
.selling-point {
max-width: 300rpx;
color: #999999;
text-overflow: -o-ellipsis-lastline;
overflow: hidden; //溢出内容隐藏
text-overflow: ellipsis; //文本溢出部分用省略号表示
display: -webkit-box; //特别显示模式
-webkit-line-clamp: 1; //行数
line-clamp: 1;
-webkit-box-orient: vertical; //盒子中内容竖直排列
}
}
.goods-price {
display: flex;
flex-direction: column;
.price {
color: #ff0000;
}
.num {
text-align: right;
color: #cccccc;
}
}
}
}
}
.select-date {
text-align: center;
line-height: 2.4rem;
background-color: #ffffff;
border-bottom: 15rpx solid #f3f3f3;
display: flex;
justify-content: space-around;
.caterer-user {
color: #ff0000;
}
.icon {
margin-left: 10rpx;
}
}
.on-buy {
background-color: #804002;
}
.qrcode {
margin: auto;
display: flex;
justify-content: center;
width: 360rpx;
height: 360rpx;
}
</style>