Compare commits
2 Commits
03c9a8e845
...
a4a81a5873
Author | SHA1 | Date | |
---|---|---|---|
a4a81a5873 | |||
f3c73df905 |
2
env/.env
vendored
@ -6,6 +6,7 @@ VITE_APP_ENV=development
|
|||||||
|
|
||||||
# 接口地址
|
# 接口地址
|
||||||
VITE_API_BASE_URL=http://www.caipu.com:8545
|
VITE_API_BASE_URL=http://www.caipu.com:8545
|
||||||
|
# VITE_API_BASE_URL=http://ceshi-recipeapi.lihaink.cn/
|
||||||
|
|
||||||
# 端口号
|
# 端口号
|
||||||
VITE_APP_PORT=9527
|
VITE_APP_PORT=9527
|
||||||
@ -15,6 +16,7 @@ VITE_APP_PROXY=true
|
|||||||
|
|
||||||
# API代理前缀
|
# API代理前缀
|
||||||
VITE_API_PREFIX= http://www.caipu.com:8545
|
VITE_API_PREFIX= http://www.caipu.com:8545
|
||||||
|
# VITE_API_PREFIX= http://ceshi-recipeapi.lihaink.cn/
|
||||||
|
|
||||||
# 删除console
|
# 删除console
|
||||||
VITE_DROP_CONSOLE=false
|
VITE_DROP_CONSOLE=false
|
||||||
|
2
env/.env.development
vendored
@ -2,7 +2,7 @@
|
|||||||
VITE_APP_ENV=development
|
VITE_APP_ENV=development
|
||||||
|
|
||||||
# 接口地址
|
# 接口地址
|
||||||
VITE_API_BASE_URL=http://www.caipu.com:8545
|
VITE_API_BASE_URL=http://ceshi-recipeapi.lihaink.cn
|
||||||
|
|
||||||
# 删除console
|
# 删除console
|
||||||
VITE_DROP_CONSOLE=false
|
VITE_DROP_CONSOLE=false
|
||||||
|
2
env/.env.production
vendored
@ -2,7 +2,7 @@
|
|||||||
VITE_APP_ENV=production
|
VITE_APP_ENV=production
|
||||||
|
|
||||||
# 接口地址
|
# 接口地址
|
||||||
VITE_API_BASE_URL=http://www.caipu.com:8545
|
VITE_API_BASE_URL=http://ceshi-recipeapi.lihaink.cn
|
||||||
|
|
||||||
# 删除console
|
# 删除console
|
||||||
VITE_DROP_CONSOLE=true
|
VITE_DROP_CONSOLE=true
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
"desc" : "获取您的位置"
|
"desc" : "获取您的位置"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"requiredPrivateInfos" : [ "getLocation", "chooseAddress" , "chooseLocation" ]
|
"requiredPrivateInfos" : ["login" ,"getLocation", "chooseAddress" , "chooseLocation" ]
|
||||||
},
|
},
|
||||||
"mp-alipay" : {
|
"mp-alipay" : {
|
||||||
"usingComponents" : true
|
"usingComponents" : true
|
||||||
@ -81,7 +81,7 @@
|
|||||||
"h5" : {
|
"h5" : {
|
||||||
"router" : {
|
"router" : {
|
||||||
"mode" : "hash",
|
"mode" : "hash",
|
||||||
"base" : "/uniapp-vue3-template/"
|
"base" : "/caipu_uni/"
|
||||||
},
|
},
|
||||||
"sdkConfigs" : {
|
"sdkConfigs" : {
|
||||||
"maps" : {
|
"maps" : {
|
||||||
|
@ -62,28 +62,32 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "菜谱详情",
|
"navigationBarTitleText": "菜谱详情",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
},
|
||||||
|
"needLogin": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "goods/pay_order",
|
"path": "goods/pay_order",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "订单详情",
|
"navigationBarTitleText": "订单详情",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
},
|
||||||
|
"needLogin": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "goods/order",
|
"path": "goods/order",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "订单详情",
|
"navigationBarTitleText": "订单详情",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
},
|
||||||
|
"needLogin": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "goods/order_detail",
|
"path": "goods/order_detail",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "订单详情",
|
"navigationBarTitleText": "订单详情",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
},
|
||||||
|
"needLogin": true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -102,20 +106,20 @@
|
|||||||
"borderStyle": "black",
|
"borderStyle": "black",
|
||||||
"backgroundColor": "#ffffff",
|
"backgroundColor": "#ffffff",
|
||||||
"list": [{
|
"list": [{
|
||||||
"iconPath": "static/images/tabbar/icon_home.png",
|
"iconPath": "static/images/tabbar/shouye.png",
|
||||||
"selectedIconPath": "static/images/tabbar/icon_home_selected.png",
|
"selectedIconPath": "static/images/tabbar/shouye_selected.png",
|
||||||
"pagePath": "pages/tab/home/index",
|
"pagePath": "pages/tab/home/index",
|
||||||
"text": "菜单分类"
|
"text": "菜单分类"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"iconPath": "static/images/tabbar/icon_list.png",
|
"iconPath": "static/images/tabbar/bofang.png",
|
||||||
"selectedIconPath": "static/images/tabbar/icon_list_selected.png",
|
"selectedIconPath": "static/images/tabbar/bofang_selected.png",
|
||||||
"pagePath": "pages/tab/list/index",
|
"pagePath": "pages/tab/list/index",
|
||||||
"text": "食谱清单"
|
"text": "食谱清单"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"iconPath": "static/images/tabbar/icon_me.png",
|
"iconPath": "static/images/tabbar/wode.png",
|
||||||
"selectedIconPath": "static/images/tabbar/icon_me_selected.png",
|
"selectedIconPath": "static/images/tabbar/wode_selected.png",
|
||||||
"pagePath": "pages/tab/user/index",
|
"pagePath": "pages/tab/user/index",
|
||||||
"text": "我的"
|
"text": "我的"
|
||||||
}]
|
}]
|
||||||
|
@ -1,240 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view >
|
|
||||||
<view class="address-window popup-main bg-f" :class="address.address==true?'on':''">
|
|
||||||
<view class='title font-500'>选择地址<text class='iconfont icon-ic_close popup-close' @tap='close'></text></view>
|
|
||||||
<scroll-view scroll-y="true" class='list'>
|
|
||||||
<view class='item acea-row row-between-wrapper' :class='active==index?"t-color":""' v-for="(item,index) in addressList"
|
|
||||||
@tap='tapAddress(index,item.address_id)' :key='index'>
|
|
||||||
<text class='iconfont icon-ic_location5' :class='active==index?"t-color":""'></text>
|
|
||||||
<view class='address'>
|
|
||||||
<view class='name font-bold' :class='active==index?"t-color":""'>{{item.real_name}}<text class='phone'>{{item.phone}}</text></view>
|
|
||||||
<view class='line1'>{{item.province}}{{item.city}}{{item.district}}{{item.street || ''}}{{item.detail}}</view>
|
|
||||||
</view>
|
|
||||||
<text class='iconfont icon-complete' :class='active==index?"t-color":""'></text>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
<!-- 无地址 -->
|
|
||||||
<view class='pictrue' v-if="!is_loading && !addressList.length">
|
|
||||||
<image :src="`${domain}/static/images/noAddress.png`"></image>
|
|
||||||
<view>暂无地址</view>
|
|
||||||
</view>
|
|
||||||
<view class='addressBnt' @tap='goAddressPages'>添加新地址</view>
|
|
||||||
</view>
|
|
||||||
<view class='mask' catchtouchmove='true' :hidden='address.address==false' @tap='close'></view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// import { getAddressList } from '@/api/user.js';
|
|
||||||
// import {
|
|
||||||
// orderAddressLst,
|
|
||||||
// }from "@/api/order";
|
|
||||||
// import { mapGetters } from "vuex";
|
|
||||||
// import { HTTP_REQUEST_URL } from '@/config/app';
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
pagesUrl: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
uid: {
|
|
||||||
type: Number,
|
|
||||||
default: 0,
|
|
||||||
},
|
|
||||||
tourist_unique_key: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
address: {
|
|
||||||
type: Object,
|
|
||||||
default: function() {
|
|
||||||
return {
|
|
||||||
address: true,
|
|
||||||
addressId: 0,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
isLog: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// computed: mapGetters(['viewColor']),
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
domain: '',
|
|
||||||
active: 0,
|
|
||||||
//地址列表
|
|
||||||
addressList: [
|
|
||||||
{
|
|
||||||
province: '广东省',
|
|
||||||
city: '广州市',
|
|
||||||
district: '天河区',
|
|
||||||
street: '东风路',
|
|
||||||
detail: '123号',
|
|
||||||
real_name: '张三',
|
|
||||||
phone: '13811111111',
|
|
||||||
address_id: 1,
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
province: '广东省',
|
|
||||||
city: '广州市',
|
|
||||||
district: '天河区',
|
|
||||||
street: '东风路',
|
|
||||||
detail: '123号',
|
|
||||||
real_name: '张三',
|
|
||||||
phone: '13811111111',
|
|
||||||
address_id: 1,
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
province: '广东省',
|
|
||||||
city: '广州市',
|
|
||||||
district: '天河区',
|
|
||||||
street: '东风路',
|
|
||||||
detail: '123号',
|
|
||||||
real_name: '张三',
|
|
||||||
phone: '13811111111',
|
|
||||||
address_id: 1,
|
|
||||||
|
|
||||||
}
|
|
||||||
],
|
|
||||||
is_loading: true
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
tapAddress: function(index, addressid) {
|
|
||||||
this.active = index;
|
|
||||||
this.$emit('OnChangeAddress', addressid);
|
|
||||||
},
|
|
||||||
close: function() {
|
|
||||||
this.$emit('changeClose');
|
|
||||||
// this.$emit('changeTextareaStatus');
|
|
||||||
},
|
|
||||||
goAddressPages: function() {
|
|
||||||
this.$emit('changeClose');
|
|
||||||
// this.$emit('changeTextareaStatus');
|
|
||||||
uni.navigateTo({
|
|
||||||
url: this.pagesUrl
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getAddressList: function() {
|
|
||||||
let that = this;
|
|
||||||
// orderAddressLst({
|
|
||||||
// page: 1,
|
|
||||||
// limit: 5,
|
|
||||||
// uid: that.uid,
|
|
||||||
// tourist_unique_key: that.tourist_unique_key,
|
|
||||||
// }).then(res => {
|
|
||||||
// let addressList = res.data.list;
|
|
||||||
// //处理默认选中项
|
|
||||||
// for (let i = 0; i < res.data.list.length; i++) {
|
|
||||||
// if (addressList[i].address_id == that.address.addressId) {
|
|
||||||
// that.active = i;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// that.$set(that, 'addressList', addressList);
|
|
||||||
// that.is_loading = false;
|
|
||||||
// })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
/* #ifndef APP-NVUE */
|
|
||||||
// 由于uView是基于nvue环境进行开发的,此环境中普通元素默认为flex-direction: column;
|
|
||||||
// 所以在非nvue中,需要对元素进行重置为flex-direction: column; 否则可能会表现异常
|
|
||||||
view, scroll-view, swiper-item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
flex-shrink: 0;
|
|
||||||
flex-grow: 0;
|
|
||||||
flex-basis: auto;
|
|
||||||
align-items: stretch;
|
|
||||||
align-content: flex-start;
|
|
||||||
}
|
|
||||||
/* #endif */
|
|
||||||
|
|
||||||
// 隐藏scroll-view的滚动条
|
|
||||||
::-webkit-scrollbar {
|
|
||||||
display: none;
|
|
||||||
width: 0 !important;
|
|
||||||
height: 0 !important;
|
|
||||||
-webkit-appearance: none;
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
.address-window .title {
|
|
||||||
height: 123rpx;
|
|
||||||
line-height: 123rpx;
|
|
||||||
}
|
|
||||||
.address-window .title .iconfont {
|
|
||||||
position: absolute;
|
|
||||||
right: 28rpx;
|
|
||||||
top: 30rpx;
|
|
||||||
}
|
|
||||||
.address-window .list{
|
|
||||||
max-height: 650rpx;
|
|
||||||
}
|
|
||||||
.address-window .list .item {
|
|
||||||
margin-left: 30rpx;
|
|
||||||
padding-right: 30rpx;
|
|
||||||
border-bottom: 1px solid #f5f5f5;
|
|
||||||
height: 129rpx;
|
|
||||||
font-size: 25rpx;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
.address-window .list .item .iconfont {
|
|
||||||
font-size: 37rpx;
|
|
||||||
color: #2c2c2c;
|
|
||||||
}
|
|
||||||
.address-window .list .item .iconfont.icon-complete {
|
|
||||||
font-size: 30rpx;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
.address-window .list .item .address {
|
|
||||||
width: 560rpx;
|
|
||||||
}
|
|
||||||
.address-window .list .item .address .name {
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #282828;
|
|
||||||
margin-bottom: 4rpx;
|
|
||||||
}
|
|
||||||
.address-window .list .item .address .name .phone {
|
|
||||||
margin-left: 18rpx;
|
|
||||||
}
|
|
||||||
.address-window .addressBnt {
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #fff;
|
|
||||||
width: 690rpx;
|
|
||||||
height: 88rpx;
|
|
||||||
border-radius: 50rpx;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 88rpx;
|
|
||||||
margin: 85rpx auto;
|
|
||||||
background-color: var(--view-theme);
|
|
||||||
}
|
|
||||||
.address-window .pictrue {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.address-window .pictrue image,.address-window .pictrue uni-image {
|
|
||||||
width: 414rpx;
|
|
||||||
height: 305rpx;
|
|
||||||
}
|
|
||||||
.address-window .pictrue view{
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
.t-color {
|
|
||||||
color: var(--view-theme)!important;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -58,16 +58,19 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex box-border flex-sub-cart" @click="addCart" v-if="is_add">
|
|
||||||
<u-icon custom-style="margin: 20rpx;" size="80rpx" slot="right" color="#59CB56"
|
|
||||||
name="shopping-cart-fill"></u-icon>
|
|
||||||
<u-text class=""
|
|
||||||
custom-style="width: calc(100vw - 220rpx);text-align:center;display: flex; justify-content: center; align-items: center;height: 70rpx;border: 2px solid #59cb56;border-radius: 40rpx;background-color: #5acb5617;margin: 0rpx 20rpx!important;"
|
|
||||||
color="#59CB56" size="26rpx" :text="'加入食谱清单'" :flex1="true" align="center" wordWrap="normal"
|
|
||||||
:show="true" iconStyle="26rpx" decoration="none">
|
|
||||||
</u-text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
<view class="flex box-border flex-sub-cart" @click="addCart" v-if="is_add">
|
||||||
|
<!-- <u-icon custom-style="margin: 20rpx;" size="80rpx" slot="right" color="#59CB56"
|
||||||
|
name="shopping-cart-fill"></u-icon> -->
|
||||||
|
|
||||||
|
<view style="margin: 20rpx;">
|
||||||
|
<u-text class=""
|
||||||
|
custom-style="width: calc(100vw - 120rpx);text-align:center;display: flex; justify-content: center; align-items: center;height: 70rpx;border: 2px solid #59cb56;border-radius: 40rpx;background-color: #5acb5617;margin: 0rpx 20rpx!important;"
|
||||||
|
color="#59CB56" size="26rpx" :text="'加入食谱清单'" :flex1="true" align="center" wordWrap="normal"
|
||||||
|
:show="true" iconStyle="26rpx" decoration="none">
|
||||||
|
</u-text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -19,14 +19,14 @@
|
|||||||
height="80rpx" leftIconSize="38rpx" leftIconColor="#303133" :safeAreaInsetTop="true" :placeholder="true"
|
height="80rpx" leftIconSize="38rpx" leftIconColor="#303133" :safeAreaInsetTop="true" :placeholder="true"
|
||||||
:fixed="true"></up-navbar>
|
:fixed="true"></up-navbar>
|
||||||
<up-search v-model="search_sp.keyword" class="flex,flex-row p-1" style="" shape="round" bgColor="#f2f2f2"
|
<up-search v-model="search_sp.keyword" class="flex,flex-row p-1" style="" shape="round" bgColor="#f2f2f2"
|
||||||
placeholder="输入食谱" :clearabled="true" :showAction="false" inputAlign="left" borderColor="transparent"
|
placeholder="输入订单编号" :clearabled="true" :showAction="false" inputAlign="left" borderColor="transparent"
|
||||||
searchIconColor="#909399" color="#606266" placeholderColor="#909399" searchIcon="search" margin="10rpx"
|
searchIconColor="#909399" color="#606266" placeholderColor="#909399" searchIcon="search" margin="10rpx"
|
||||||
maxlength="-1" height="60rpx" @change="searchSP()">
|
maxlength="-1" height="60rpx" @change="searchSP()">
|
||||||
</up-search>
|
</up-search>
|
||||||
|
|
||||||
<z-paging :fixed="false" height="calc(100vh - 320rpx)" width="calc(100vw - 50rpx)"
|
<z-paging :fixed="false" height="calc(100vh - 320rpx)" width="calc(100vw - 50rpx)"
|
||||||
:paging-style="{ 'background-color': '#FFFFFFFF', 'padding': '20rpx' }" ref="pagingRefSP"
|
:paging-style="{ 'background-color': '#FFFFFFFF', 'padding': '20rpx' }" ref="pagingRefSP"
|
||||||
v-model="matchedItems_sp" @query="changeSP()" class="fv-page flex-col ">
|
v-model="matchedItems_sp" @query="changeSP" class="fv-page flex-col ">
|
||||||
<view v-for="(item, index) in matchedItems_sp" :key="index">
|
<view v-for="(item, index) in matchedItems_sp" :key="index">
|
||||||
<view class="address_box">
|
<view class="address_box">
|
||||||
<view class=" pt-2 pb-2 ps-2 pe-2" style="">
|
<view class=" pt-2 pb-2 ps-2 pe-2" style="">
|
||||||
@ -54,9 +54,9 @@
|
|||||||
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
||||||
decoration="none">
|
decoration="none">
|
||||||
</up-text>
|
</up-text>
|
||||||
<view @click.stop="getopenLocation(item)">
|
<!-- <view @click.stop="getopenLocation(item)">
|
||||||
<u-icon slot="right" label="查看地图" name="map"></u-icon>
|
<u-icon slot="right" label="查看地图" name="map"></u-icon>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="h-50 flex">
|
<view class="h-50 flex">
|
||||||
@ -128,7 +128,11 @@ export default defineComponent({
|
|||||||
this.$refs.pagingRefSP?.reload();
|
this.$refs.pagingRefSP?.reload();
|
||||||
},
|
},
|
||||||
//列表分页
|
//列表分页
|
||||||
changeSP () {
|
changeSP (pageNo: number) {
|
||||||
|
|
||||||
|
console.log('列表分页',pageNo);
|
||||||
|
this.search_sp.page = pageNo;
|
||||||
|
console.log('列表分页',this.search_sp);
|
||||||
CommonApi.commonGet('/api/order/list', this.search_sp).catch((res) => {
|
CommonApi.commonGet('/api/order/list', this.search_sp).catch((res) => {
|
||||||
if (res.code === 1) {
|
if (res.code === 1) {
|
||||||
this.$refs.pagingRefSP?.complete(res.data);
|
this.$refs.pagingRefSP?.complete(res.data);
|
||||||
|
@ -24,33 +24,41 @@
|
|||||||
leftIconColor="#303133" :safeAreaInsetTop="true" :placeholder="true" :fixed="true"></up-navbar>
|
leftIconColor="#303133" :safeAreaInsetTop="true" :placeholder="true" :fixed="true"></up-navbar>
|
||||||
<view class="address_box">
|
<view class="address_box">
|
||||||
<view class=" pt-2 pb-2 ps-2 pe-2" style="">
|
<view class=" pt-2 pb-2 ps-2 pe-2" style="">
|
||||||
<u-cell class="" style="line-height: 60rpx;" :border="false" >
|
<u-cell class="" style="line-height: 60rpx;" :border="false">
|
||||||
<template #title>
|
<template #title>
|
||||||
<view class="h-50 flex">
|
<view class="h-50 flex">
|
||||||
<up-text class="" size="28rpx" color="#59CB56"
|
<up-text class="" size="28rpx" color="#59CB56"
|
||||||
:text="` 配送时间:${matchedItems_sc.delivery_date} ${matchedItems_sc.delivery_time} `" :flex1="true" align="left"
|
:text="` 配送时间:${matchedItems_sc.delivery_date} ${matchedItems_sc.delivery_time} `"
|
||||||
prefixIcon="clock" wordWrap="normal" :show="true"
|
:flex1="true" align="left" prefixIcon="clock" wordWrap="normal" :show="true"
|
||||||
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
||||||
decoration="none">
|
decoration="none">
|
||||||
</up-text>
|
</up-text>
|
||||||
</view>
|
</view>
|
||||||
<view class="h-50 flex">
|
<view class="h-50 flex">
|
||||||
<up-text class="" size="28rpx"
|
<!-- <up-text class="" size="28rpx"
|
||||||
:text="`${matchedItems_sc.customer_name} ${matchedItems_sc.phone} `" :flex1="true" align="left"
|
:text="`${matchedItems_sc.customer_name} ${matchedItems_sc.phone} `" :flex1="true"
|
||||||
wordWrap="normal" :show="true" prefixIcon="map"
|
align="left" wordWrap="normal" :show="true" prefixIcon="map"
|
||||||
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
||||||
decoration="none">
|
decoration="none">
|
||||||
</up-text>
|
</up-text> -->
|
||||||
|
<u-icon customStyle="margin: 40rpx;" :name="matchedItems_sc.customer_name" slot="left" icon
|
||||||
|
labelSize="28rpx" size="28rpx" :label="matchedItems_sc.phone"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="h-50 flex">
|
<view class="flex" style="margin: 10rpx;">
|
||||||
<up-text class="" size="28rpx" :text="matchedItems_sc.address" margin="40rpx" :flex1="true"
|
<!-- <text style="margin-left:40rpx;">
|
||||||
|
{{ matchedItems_sc.address }}
|
||||||
|
</text> -->
|
||||||
|
|
||||||
|
<u-icon customStyle="margin: 12rpx;" slot="left"
|
||||||
|
labelSize="28rpx" :label="`${matchedItems_sc.address}`"></u-icon>
|
||||||
|
<!-- <up-text class="" size="28rpx" :text="matchedItems_sc.address" margin="40rpx" :flex1="true"
|
||||||
align="left" wordWrap="normal" :show="true" prefixIcon=""
|
align="left" wordWrap="normal" :show="true" prefixIcon=""
|
||||||
iconStyle="font-size:28rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
iconStyle="font-size:28rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
||||||
decoration="none">
|
decoration="none">
|
||||||
</up-text>
|
</up-text> -->
|
||||||
<view @click="getopenLocation(matchedItems_sc)">
|
<!-- <view @click="getopenLocation(matchedItems_sc)">
|
||||||
<u-icon slot="right" label="查看地图" name="map" color="#59CB56" labelColor="#59CB56"></u-icon>
|
<u-icon slot="right" label="查看地图" name="map" color="#59CB56" labelColor="#59CB56"></u-icon>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="h-50 flex">
|
<view class="h-50 flex">
|
||||||
@ -59,8 +67,8 @@
|
|||||||
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
||||||
decoration="none">
|
decoration="none">
|
||||||
</up-text> -->
|
</up-text> -->
|
||||||
<u-icon customStyle="margin: 16rpx;" slot="left" label="订单编号:"></u-icon>
|
<u-icon customStyle="margin: 16rpx;" slot="left" label="订单编号:"></u-icon>
|
||||||
<u-icon slot="right" :label="matchedItems_sc.order_sn" ></u-icon>
|
<u-icon slot="right" labelSize="28rpx" :label="matchedItems_sc.order_sn"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="h-50 flex">
|
<view class="h-50 flex">
|
||||||
@ -69,8 +77,8 @@
|
|||||||
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
||||||
decoration="none">
|
decoration="none">
|
||||||
</up-text> -->
|
</up-text> -->
|
||||||
<u-icon customStyle="margin: 16rpx;" slot="left" label="创建时间:"></u-icon>
|
<u-icon customStyle="margin: 16rpx;" slot="left" label="创建时间:"></u-icon>
|
||||||
<u-icon slot="right" :label="matchedItems_sc.create_time" ></u-icon>
|
<u-icon slot="right" labelSize="28rpx" :label="matchedItems_sc.create_time"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="h-50 flex">
|
<view class="h-50 flex">
|
||||||
<!-- <up-text class="" size="28rpx" :text="`付款金额:¥${matchedItems_sc.pay_amount}`" margin="40rpx"
|
<!-- <up-text class="" size="28rpx" :text="`付款金额:¥${matchedItems_sc.pay_amount}`" margin="40rpx"
|
||||||
@ -78,12 +86,12 @@
|
|||||||
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
||||||
decoration="none">
|
decoration="none">
|
||||||
</up-text> -->
|
</up-text> -->
|
||||||
<u-icon customStyle="margin: 16rpx;" slot="left" label="应付金额:"></u-icon>
|
<u-icon customStyle="margin: 16rpx;" slot="left" label="应付金额:"></u-icon>
|
||||||
<u-icon slot="right" :label="`¥${matchedItems_sc.pay_amount}`" ></u-icon>
|
<u-icon slot="right" labelSize="28rpx" :label="`¥${matchedItems_sc.pay_amount}`"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="h-50 flex">
|
<view class="h-50 flex">
|
||||||
<u-icon customStyle="margin: 16rpx;" slot="left" label="实付金额:"></u-icon>
|
<u-icon customStyle="margin: 16rpx;" slot="left" label="实付金额:"></u-icon>
|
||||||
<u-icon slot="right" :label="`¥${matchedItems_sc.pay_amount}`" ></u-icon>
|
<u-icon slot="right" labelSize="28rpx" :label="`¥${matchedItems_sc.pay_amount}`"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
@ -92,7 +100,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<view class="detail_box">
|
<view class="detail_box">
|
||||||
<!-- <up-cell class=" " style="" :title="matchedItems_sc.name" :label="matchedItems_sc.intro">
|
<!-- <up-cell class=" " style="" :title="matchedItems_sc.name" labelSize="28rpx" :label="matchedItems_sc.intro">
|
||||||
</up-cell> -->
|
</up-cell> -->
|
||||||
<view class="p-2">
|
<view class="p-2">
|
||||||
<view class="flex box-border flex-row pb-2 ps-2 pe-2" style="" @click="changeTab">
|
<view class="flex box-border flex-row pb-2 ps-2 pe-2" style="" @click="changeTab">
|
||||||
@ -100,40 +108,68 @@
|
|||||||
line-color="#18C936" line-width="40rpx" line-height="6rpx" line-bg-size="cover"
|
line-color="#18C936" line-width="40rpx" line-height="6rpx" line-bg-size="cover"
|
||||||
:scrollable="true" />
|
:scrollable="true" />
|
||||||
</view>
|
</view>
|
||||||
<z-paging v-if="!currentTab" :fixed="false" height="calc(100vh - 700rpx)" width="calc(100vw - 50rpx)"
|
<view class="flex" style="padding: 0rpx 40rpx;width: calc(100vw - 140rpx);">
|
||||||
:paging-style="{ 'background-color': '#FFFFFFFF', 'padding': '20rpx' }" class="fv-page flex-col ">
|
<up-text class="" size="28rpx" color="#9b9b9b" text="菜谱" :flex1="true" align="left"
|
||||||
|
wordWrap="normal" :show="true" lines="1" decoration="none">
|
||||||
|
</up-text>
|
||||||
|
<up-text class="" color="#9b9b9b" size="24rpx" text="数量" :flex1="true" align="right"
|
||||||
|
wordWrap="normal" :show="true"
|
||||||
|
iconStyle="font-size: 28rpx;font-weight: bold;margin-right:10rpx;color: #59CB56;"
|
||||||
|
decoration="none">
|
||||||
|
</up-text>
|
||||||
|
<up-text class="" color="#9b9b9b" size="24rpx" text="价格" :flex1="true" align="right"
|
||||||
|
wordWrap="normal" :show="true"
|
||||||
|
iconStyle="font-size: 28rpx;font-weight: bold;margin-right:10rpx;color: #59CB56;"
|
||||||
|
decoration="none">
|
||||||
|
</up-text>
|
||||||
|
</view>
|
||||||
|
<z-paging v-if="!currentTab" :fixed="false" height="calc(100vh - 800rpx)" width="calc(100vw - 100rpx)"
|
||||||
|
:paging-style="{ 'background-color': '#FFFFFFFF', 'padding': '0rpx 20rpx' }"
|
||||||
|
class="fv-page flex-col ">
|
||||||
<view class="flex" style="padding:20rpx" v-for="(item, index) in matchedItems_sc.orderDishes"
|
<view class="flex" style="padding:20rpx" v-for="(item, index) in matchedItems_sc.orderDishes"
|
||||||
:key="index">
|
:key="index">
|
||||||
<up-text class="" size="28rpx" color="#9b9b9b" :text="item.dishes_info.name" :flex1="true"
|
<up-text class="" size="28rpx" color="#9b9b9b" :text="item.dishes_info.name" :flex1="true"
|
||||||
align="left" wordWrap="normal" :show="true" lines="1" decoration="none">
|
align="left" wordWrap="normal" :show="true" lines="1" decoration="none">
|
||||||
</up-text>
|
</up-text>
|
||||||
<up-text class="" color="#9b9b9b" size="24rpx" :text="`${item.num}/份 ¥${item.price}`"
|
<up-text class="" color="#9b9b9b" size="24rpx" :text="` x${item.num}`" :flex1="true"
|
||||||
:flex1="true" align="right" wordWrap="normal" :show="true"
|
align="right" wordWrap="normal" :show="true"
|
||||||
|
iconStyle="font-size: 28rpx;font-weight: bold;margin-right:10rpx;color: #59CB56;"
|
||||||
|
decoration="none">
|
||||||
|
</up-text>
|
||||||
|
<up-text class="" color="#9b9b9b" size="24rpx" :text="`¥${item.price}`" :flex1="true"
|
||||||
|
align="right" wordWrap="normal" :show="true"
|
||||||
iconStyle="font-size: 28rpx;font-weight: bold;margin-right:10rpx;color: #59CB56;"
|
iconStyle="font-size: 28rpx;font-weight: bold;margin-right:10rpx;color: #59CB56;"
|
||||||
decoration="none">
|
decoration="none">
|
||||||
</up-text>
|
</up-text>
|
||||||
</view>
|
</view>
|
||||||
</z-paging>
|
</z-paging>
|
||||||
<z-paging v-if="currentTab" :fixed="false" height="calc(100vh - 700rpx)" width="calc(100vw - 50rpx)"
|
<z-paging v-if="currentTab" :fixed="false" height="calc(100vh - 800rpx)" width="calc(100vw - 100rpx)"
|
||||||
:paging-style="{ 'background-color': '#FFFFFFFF', 'padding': '20rpx' }" class="fv-page flex-col ">
|
:paging-style="{ 'background-color': '#FFFFFFFF', 'padding': '0rpx 20rpx' }"
|
||||||
|
class="fv-page flex-col ">
|
||||||
<view class="flex" style="padding:20rpx" v-for="(item, index) in matchedItems_sc.orderProduct"
|
<view class="flex" style="padding:20rpx" v-for="(item, index) in matchedItems_sc.orderProduct"
|
||||||
:key="index">
|
:key="index">
|
||||||
<up-text class="" size="28rpx" color="#9b9b9b" :text="item.product_info.name" :flex1="true"
|
<up-text class="" size="28rpx" color="#9b9b9b" :text="item.product_info.name" :flex1="true"
|
||||||
align="left" wordWrap="normal" :show="true" lines="1" decoration="none">
|
align="left" wordWrap="normal" :show="true" lines="1" decoration="none">
|
||||||
</up-text>
|
</up-text>
|
||||||
<up-text class="" color="#9b9b9b" size="24rpx" :text="`${item.num}/份 ¥${item.price}`"
|
<up-text class="" color="#9b9b9b" size="24rpx" :text="` x${item.num}`" :flex1="true"
|
||||||
:flex1="true" align="right" wordWrap="normal" :show="true"
|
align="right" wordWrap="normal" :show="true"
|
||||||
iconStyle="font-size: 28rpx;font-weight: bold;margin-right:10rpx;color: #59CB56;"
|
iconStyle="font-size: 28rpx;font-weight: bold;margin-right:10rpx;color: #59CB56;"
|
||||||
decoration="none">
|
decoration="none">
|
||||||
</up-text>
|
</up-text>
|
||||||
|
<up-text class="" color="#9b9b9b" size="24rpx" :text="`¥${item.price}`" :flex1="true"
|
||||||
|
align="right" wordWrap="normal" :show="true"
|
||||||
|
iconStyle="font-size: 28rpx;font-weight: bold;margin-right:10rpx;color: #59CB56;"
|
||||||
|
decoration="none">
|
||||||
|
</up-text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</z-paging>
|
</z-paging>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex box-border flex-sub-cart">
|
<view class="flex box-border flex-sub-cart">
|
||||||
<!-- <view>
|
<!-- <view>
|
||||||
<u-icon custom-style="margin: 20rpx;" slot="right" :label="`总数:¥${matchedItems_sc.total_num} `" name="map" color="#59CB56"></u-icon>
|
<u-icon custom-style="margin: 20rpx;" slot="right" labelSize="28rpx" :label="`总数:¥${matchedItems_sc.total_num} `" name="map" color="#59CB56"></u-icon>
|
||||||
<u-icon custom-style="margin: 20rpx;" slot="right" :label="`总数:¥${matchedItems_sc.total_amount} `" name="map" color="#59CB56"></u-icon>
|
<u-icon custom-style="margin: 20rpx;" slot="right" labelSize="28rpx" :label="`总数:¥${matchedItems_sc.total_amount} `" name="map" color="#59CB56"></u-icon>
|
||||||
</view> -->
|
</view> -->
|
||||||
<!-- <u-text class=""
|
<!-- <u-text class=""
|
||||||
custom-style="width: calc(100vw - 220rpx);text-align:center;display: flex; justify-content: center; align-items: center;height: 160rpx;border: 2px solid #59cb56;border-radius: 40rpx;background-color: #5acb5617;margin: 0rpx 20rpx!important;"
|
custom-style="width: calc(100vw - 220rpx);text-align:center;display: flex; justify-content: center; align-items: center;height: 160rpx;border: 2px solid #59cb56;border-radius: 40rpx;background-color: #5acb5617;margin: 0rpx 20rpx!important;"
|
||||||
@ -199,7 +235,7 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
// 打开地图
|
// 打开地图
|
||||||
getopenLocation (res) {
|
getopenLocation (res) {
|
||||||
useLocation().openLocation(res.latitude, res.longitude,res.address,res.address)
|
useLocation().openLocation(res.latitude, res.longitude, res.address, res.address)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -44,20 +44,23 @@
|
|||||||
type="tips"></up-text>
|
type="tips"></up-text>
|
||||||
</template>
|
</template>
|
||||||
</up-input>
|
</up-input>
|
||||||
<up-input placeholder="请选择地址" v-model="addFrom_address" @click="getopenLocation(0)">
|
|
||||||
<template #prefix>
|
|
||||||
<up-text align="left" customStyle="width:120rpx" text="所在地区" margin="0 8px 0 0"
|
|
||||||
type="tips"></up-text>
|
|
||||||
</template>
|
|
||||||
<template #suffix>
|
|
||||||
|
|
||||||
<!-- <up-button @tap="getCode" text="2312312" type="success" size="mini"></up-button> -->
|
<view @click="getopenLocation(0)">
|
||||||
<up-text class="" color="#59CB56" size="24rpx" text="定位" :flex1="true"
|
<up-input placeholder="请选择地址" v-model="addFrom_address">
|
||||||
prefix-icon="map" align="left" word-wrap="normal" :show="true"
|
<template #prefix>
|
||||||
icon-style="font-size: 36rpx;font-weight: bold;color:#59CB56;"
|
<up-text align="left" customStyle="width:120rpx" text="所在地区"
|
||||||
decoration="none" @click.stop="getopenLocation(1)" />
|
margin="0 8px 0 0" type="tips"></up-text>
|
||||||
</template>
|
</template>
|
||||||
</up-input>
|
<template #suffix>
|
||||||
|
|
||||||
|
<!-- <up-button @tap="getCode" text="2312312" type="success" size="mini"></up-button> -->
|
||||||
|
<up-text class="" color="#59CB56" size="24rpx" text="定位" :flex1="true"
|
||||||
|
prefix-icon="map" align="left" word-wrap="normal" :show="true"
|
||||||
|
icon-style="font-size: 36rpx;font-weight: bold;color:#59CB56;"
|
||||||
|
decoration="none" @click.stop="getopenLocation(1)" />
|
||||||
|
</template>
|
||||||
|
</up-input>
|
||||||
|
</view>
|
||||||
<up-input placeholder="请输入详细地址" v-model="addFrom.detail">
|
<up-input placeholder="请输入详细地址" v-model="addFrom.detail">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<up-text align="left" customStyle="width:120rpx" text="详细地址" margin="0 8px 0 0"
|
<up-text align="left" customStyle="width:120rpx" text="详细地址" margin="0 8px 0 0"
|
||||||
@ -96,13 +99,15 @@
|
|||||||
<view style="padding: 20rpx;">
|
<view style="padding: 20rpx;">
|
||||||
<u-cell class="" style="line-height: 60rpx;" :border="true">
|
<u-cell class="" style="line-height: 60rpx;" :border="true">
|
||||||
<template #title>
|
<template #title>
|
||||||
<view class="h-50 flex" @click="closeProp">
|
<view class="h-50 flex">
|
||||||
<text class="ellipsis" style="font-size: 26rpx;font-weight: bold;">
|
<text class="ellipsis" style="font-size: 26rpx;font-weight: bold;">
|
||||||
选择地址
|
选择地址
|
||||||
</text>
|
</text>
|
||||||
<up-text class="pe-2" size="22rpx" text="收起" :flex1="true" suffix-icon="arrow-up"
|
<view @click="closeProp">
|
||||||
align="right" word-wrap="normal" :show="true" type="#59CB56"
|
<up-text class="pe-2" size="22rpx" text="收起" :flex1="true" suffix-icon="arrow-up"
|
||||||
icon-style="font-size: 22rpx; " decoration="none" />
|
align="right" word-wrap="normal" :show="true" type="#59CB56"
|
||||||
|
icon-style="font-size: 22rpx; " decoration="none" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
@ -118,8 +123,8 @@
|
|||||||
:iconStyle="item.id === createOrderData.address_id ? 'color:#59CB56;font-size:32rpx;margin-right:10rpx;' : '' + 'font-size:32rpx;margin-right:10rpx;'"
|
:iconStyle="item.id === createOrderData.address_id ? 'color:#59CB56;font-size:32rpx;margin-right:10rpx;' : '' + 'font-size:32rpx;margin-right:10rpx;'"
|
||||||
lines="1" decoration="none">
|
lines="1" decoration="none">
|
||||||
</u-text>
|
</u-text>
|
||||||
<view @click.stop="editAddress(item)"> <u-icon slot="right"
|
<view @click.stop="editAddress(item)"> <u-icon size="38rpx" slot="right"
|
||||||
name="edit-pen" label="修改" ></u-icon> </view>
|
name="edit-pen" label=" "></u-icon> </view>
|
||||||
|
|
||||||
<!-- <u-text class="" size="26rpx" :text="item.phone" :flex1="true" align="left"
|
<!-- <u-text class="" size="26rpx" :text="item.phone" :flex1="true" align="left"
|
||||||
wordWrap="normal" :show="true"
|
wordWrap="normal" :show="true"
|
||||||
@ -133,8 +138,8 @@
|
|||||||
:color="item.id === createOrderData.address_id ? '#59CB56' : ''"
|
:color="item.id === createOrderData.address_id ? '#59CB56' : ''"
|
||||||
decoration="none">
|
decoration="none">
|
||||||
</up-text>
|
</up-text>
|
||||||
<view @click.stop="deleteAddress(item.id)"> <u-icon slot="right"
|
<view @click.stop="deleteAddress(item.id)"> <u-icon size="38rpx" slot="right"
|
||||||
name="trash" label="删除"></u-icon></view>
|
name="trash" label=" "></u-icon></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@ -149,9 +154,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
|
||||||
<u-datetime-picker ref="datetimePicker" @close="cancelDelivery" :show="showDelivery" v-model="time_value"
|
<u-datetime-picker title="配送时间" confirmColor="#59CB56" closeOnClickOverlay="true" ref="datetimePicker"
|
||||||
:formatter="formatter" mode="datetime" @confirm="confirmDelivery"
|
@close="cancelDelivery" :show="showDelivery" v-model="time_value" :formatter="formatter" mode="datetime"
|
||||||
@cancel="cancelDelivery"></u-datetime-picker>
|
@confirm="confirmDelivery" @cancel="cancelDelivery"></u-datetime-picker>
|
||||||
|
|
||||||
<up-navbar class=" " :autoBack="true" style="font-weight: bold;" leftIcon="arrow-left" title="提交订单"
|
<up-navbar class=" " :autoBack="true" style="font-weight: bold;" leftIcon="arrow-left" title="提交订单"
|
||||||
titleColor="#303133" bgColor="#FFFFFFFF" titleWidth="600rpx" height="80rpx" leftIconSize="40rpx"
|
titleColor="#303133" bgColor="#FFFFFFFF" titleWidth="600rpx" height="80rpx" leftIconSize="40rpx"
|
||||||
@ -206,22 +211,27 @@
|
|||||||
</up-image>
|
</up-image>
|
||||||
</template>
|
</template>
|
||||||
<template #title>
|
<template #title>
|
||||||
<view class="h-60 flex">
|
<view class="h-50 flex">
|
||||||
<text class="ellipsis" style="font-size: 28rpx;">
|
<text class="ellipsis" style="font-size: 28rpx;">
|
||||||
{{ item.cartDishes.name }}
|
{{ item.cartDishes.name }}
|
||||||
</text>
|
</text>
|
||||||
<up-text class="text-black" size="24rpx" :text="` ${item.cartDishes.people}人份`"
|
<up-text class="text-black" size="24rpx" :text="` ${item.people_number}人份`" :flex1="true"
|
||||||
:flex1="true" suffix-icon="" align="right" word-wrap="normal" :show="true"
|
suffix-icon="" align="right" word-wrap="normal" :show="true" type="#59CB56"
|
||||||
type="#59CB56" icon-style="font-size: 36rpx;font-weight: bold;" decoration="none" />
|
icon-style="font-size: 36rpx;font-weight: bold;" decoration="none" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template #label>
|
<template #label>
|
||||||
<view class="h-60 flex">
|
<view class="h-100 flex">
|
||||||
<text class=" text-gray ellipsis" style="font-size: 22rpx;"> 主料:{{ item.cartDishes.intro
|
<up-text color="#767676" size="24rpx" :text="`${item.cartDishes.intro}`" :flex1="true"
|
||||||
|
align="left" wordWrap="normal" :show="true" prefixIcon=""
|
||||||
|
iconStyle="font-size:26rpx;color:#59CB56;margin-right:10rpx;" lines="2"
|
||||||
|
decoration="none">
|
||||||
|
</up-text>
|
||||||
|
<!-- <text class=" text-gray ellipsis" style="font-size: 22rpx;"> {{ item.cartDishes.intro
|
||||||
}}</text>
|
}}</text>
|
||||||
<up-text class="text-black" size="24rpx" :text="`销量:${item.cartDishes.sale_num} `"
|
<up-text class="text-black" size="24rpx" :text="`销量:${item.cartDishes.sale_num} `"
|
||||||
:flex1="true" suffix-icon="" align="right" word-wrap="normal" :show="true"
|
:flex1="true" suffix-icon="" align="right" word-wrap="normal" :show="true"
|
||||||
type="#59CB56" icon-style="font-size: 36rpx;font-weight: bold;" decoration="none" />
|
type="#59CB56" icon-style="font-size: 36rpx;font-weight: bold;" decoration="none" /> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
@ -229,12 +239,15 @@
|
|||||||
</view>
|
</view>
|
||||||
</z-paging>
|
</z-paging>
|
||||||
<view class="flex box-border flex-sub" style=" bottom: 20rpx;">
|
<view class="flex box-border flex-sub" style=" bottom: 20rpx;">
|
||||||
<u-text class="" style="margin: 0rpx 0rpx 0rpx 20rpx;" color="#59CB56" size="26rpx"
|
|
||||||
:text="'共计' + cartNUM + '件'" :flex1="true" align="left" wordWrap="normal" :show="true" iconStyle="26rpx"
|
<view style="margin: 0rpx 0rpx 0rpx 20rpx;">
|
||||||
decoration="none">
|
<u-text class="" style="margin: 0rpx 0rpx 0rpx 20rpx;" color="#59CB56" size="26rpx"
|
||||||
</u-text>
|
:text="'共计' + cartNUM + '件'" :flex1="true" align="left" wordWrap="normal" :show="true"
|
||||||
|
iconStyle="26rpx" decoration="none">
|
||||||
|
</u-text>
|
||||||
|
</view>
|
||||||
<up-button class="" style="" text="提交订单" type="primary" color="#59CB56" shape="circle" size="normal"
|
<up-button class="" style="" text="提交订单" type="primary" color="#59CB56" shape="circle" size="normal"
|
||||||
custom-style="width:200rpx" @click="handleSubmit">
|
custom-style="width:200rpx;float:right;margin-right:0rpx;" @click="handleSubmit">
|
||||||
</up-button>
|
</up-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -464,7 +477,7 @@ export default defineComponent({
|
|||||||
that.addFrom.city = res.data.address_component.city
|
that.addFrom.city = res.data.address_component.city
|
||||||
that.addFrom.district = res.data.address_component.district
|
that.addFrom.district = res.data.address_component.district
|
||||||
that.addFrom.latitude = res.data.location.lat
|
that.addFrom.latitude = res.data.location.lat
|
||||||
that.addFrom.longitude = res.data.location.long
|
that.addFrom.longitude = res.data.location.lng
|
||||||
// that.addFrom.detail = res.data.address_component.street
|
// that.addFrom.detail = res.data.address_component.street
|
||||||
} else {
|
} else {
|
||||||
uni.$u.toast(res.msg);
|
uni.$u.toast(res.msg);
|
||||||
@ -527,14 +540,31 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
|
|
||||||
deleteAddress (id) {
|
deleteAddress (id) {
|
||||||
CommonApi.commonPost('/api/user/deleteAddress',{id:id}).catch((res) => {
|
|
||||||
if (res.code === 1) {
|
useModal().showModal('success', {
|
||||||
// this.propShowAddress = false;
|
title: '删除提示',
|
||||||
this.getAddressInfoListData();
|
content: '确定删除当前地址吗?',
|
||||||
} else {
|
showCancel: true,
|
||||||
uni.$u.toast(res.msg);
|
confirmText: '确定',
|
||||||
}
|
cancelText: '取消',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
CommonApi.commonPost('/api/user/deleteAddress', { id: id }).catch((res) => {
|
||||||
|
if (res.code === 1) {
|
||||||
|
// this.propShowAddress = false;
|
||||||
|
this.getAddressInfoListData();
|
||||||
|
} else {
|
||||||
|
uni.$u.toast(res.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if (res.cancel) {
|
||||||
|
// console.log('用户点击取消');
|
||||||
|
}
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
//修改地址
|
//修改地址
|
||||||
editAddress (itme) {
|
editAddress (itme) {
|
||||||
|
@ -2,40 +2,42 @@
|
|||||||
<view>
|
<view>
|
||||||
<view class="login-form-wrap">
|
<view class="login-form-wrap">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
欢迎登录
|
<u-icon size="35" label="欢迎登录" name="weixin-fill" color="#59CB56" labelColor="#59CB56" />
|
||||||
</view>
|
</view>
|
||||||
<!-- <input v-model="account" class="u-border-bottom" type="number" placeholder="请输入手机号"> -->
|
<view style="height: 300rpx;">
|
||||||
<u--input v-model="account" placeholder="请输入手机号" type="number" />
|
<view v-if="isWechat">
|
||||||
<view v-if="loginType" class="u-border-bottom my-40rpx flex">
|
<u--input v-model="account" placeholder="请输入手机号" type="number" />
|
||||||
<!-- <input v-model="code" class="flex-1" type="number" placeholder="请输入验证码"> -->
|
<view v-if="loginType" class="u-border-bottom my-40rpx flex">
|
||||||
<u--input v-model="code" placeholder="请输入验证码" type="number" />
|
<u--input v-model="code" placeholder="请输入验证码" type="number" />
|
||||||
<view>
|
<view>
|
||||||
<u-code ref="uCodeRef" @change="codeChange" />
|
<u-code ref="uCodeRef" @change="codeChange" />
|
||||||
<u-button :text="tips" type="success" size="mini" @click="getCode" />
|
<u-button :text="tips" type="success" size="mini" @click="getCode" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="!loginType" class="u-border-bottom my-40rpx flex">
|
||||||
|
<u--input v-model="password" placeholder="请输密码" type="password" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="!loginType" class="u-border-bottom my-40rpx flex">
|
|
||||||
<u--input v-model="password" placeholder="请输密码" type="password" />
|
|
||||||
<!-- <input v-model="password" class="flex-1" type="password" placeholder="请输密码"> -->
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<button class="login-btn" :style="[inputStyle]" @tap="submit">
|
<button class="login-btn" :style="[inputStyle]" @tap="wechatLogin">
|
||||||
登录 <text class="i-mdi-login" />
|
授权登录 <text class="i-mdi-login" />
|
||||||
</button>
|
</button>
|
||||||
<view class="alternative">
|
|
||||||
|
<view class="alternative" v-if="isWechat">
|
||||||
<view v-if="loginType" class="password" @click="changLoginType(0)">
|
<view v-if="loginType" class="password" @click="changLoginType(0)">
|
||||||
密码登录
|
密码登录
|
||||||
</view>
|
</view>
|
||||||
<view v-if="!loginType" class="password" @click="changLoginType(1)">
|
<view v-if="!loginType" class="password" @click="changLoginType(1)">
|
||||||
验证码登录
|
验证码登录
|
||||||
</view>
|
</view>
|
||||||
|
<!--
|
||||||
<view class="issue flex items-center">
|
<view class="issue flex items-center">
|
||||||
遇到问题 <text class="i-mdi-help" />
|
遇到问题 <text class="i-mdi-help" />
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="login-type-wrap">
|
<!-- <view class="login-type-wrap">
|
||||||
<view class="item wechat">
|
<view class="item wechat">
|
||||||
<view class="icon">
|
<view class="icon">
|
||||||
<u-icon size="35" name="weixin-fill" color="rgb(83,194,64)" />
|
<u-icon size="35" name="weixin-fill" color="rgb(83,194,64)" />
|
||||||
@ -48,14 +50,17 @@
|
|||||||
</view>
|
</view>
|
||||||
QQ
|
QQ
|
||||||
</view>
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<view class=" box-border flex" style="margin-top: 50rpx;">
|
||||||
|
<view class="hint">
|
||||||
|
登录代表同意
|
||||||
|
<text class="link">
|
||||||
|
用户协议、隐私政策,
|
||||||
|
</text>
|
||||||
|
并授权使用您的账号信息(如昵称、头像、收获地址)以便您统一管理
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="hint">
|
|
||||||
登录代表同意
|
|
||||||
<text class="link">
|
|
||||||
用户协议、隐私政策,
|
|
||||||
</text>
|
|
||||||
并授权使用您的账号信息(如昵称、头像、收获地址)以便您统一管理
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -63,10 +68,15 @@
|
|||||||
import type { CSSProperties } from 'vue';
|
import type { CSSProperties } from 'vue';
|
||||||
import { HOME_PATH, isTabBarPath, LOGIN_PATH, removeQueryString } from '@/router';
|
import { HOME_PATH, isTabBarPath, LOGIN_PATH, removeQueryString } from '@/router';
|
||||||
import { useUserStore } from '@/store';
|
import { useUserStore } from '@/store';
|
||||||
import { setToken ,getToken , isLogin } from '@/utils/auth';
|
import { setToken, getToken, isLogin } from '@/utils/auth';
|
||||||
import uCode from 'uview-plus/components/u-code/u-code.vue';
|
import uCode from 'uview-plus/components/u-code/u-code.vue';
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
const isWechat = ref(false);
|
||||||
|
// #ifdef H5
|
||||||
|
isWechat.value = true;
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
const loginType = ref(0);
|
const loginType = ref(0);
|
||||||
const account = ref<string>('18181941463');
|
const account = ref<string>('18181941463');
|
||||||
@ -81,20 +91,20 @@ const inputStyle = computed<CSSProperties>(() => {
|
|||||||
const style = {} as CSSProperties;
|
const style = {} as CSSProperties;
|
||||||
if (account.value && code.value) {
|
if (account.value && code.value) {
|
||||||
style.color = '#fff';
|
style.color = '#fff';
|
||||||
style.backgroundColor = uni.$u.color.warning;
|
style.backgroundColor = uni.$u.color.success;
|
||||||
}
|
}
|
||||||
return style;
|
return style;
|
||||||
});
|
});
|
||||||
|
|
||||||
function codeChange(text: string) {
|
function codeChange (text: string) {
|
||||||
tips.value = text;
|
tips.value = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
function changLoginType(text: number) {
|
function changLoginType (text: number) {
|
||||||
loginType.value = text;
|
loginType.value = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCode() {
|
function getCode () {
|
||||||
if (uCodeRef.value?.canGetCode) {
|
if (uCodeRef.value?.canGetCode) {
|
||||||
// 模拟向后端请求验证码
|
// 模拟向后端请求验证码
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
@ -111,7 +121,53 @@ function getCode() {
|
|||||||
uni.$u.toast('倒计时结束后再发送');
|
uni.$u.toast('倒计时结束后再发送');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function submit() {
|
|
||||||
|
|
||||||
|
|
||||||
|
async function wechatLogin () {
|
||||||
|
|
||||||
|
if (!isWechat.value) {
|
||||||
|
|
||||||
|
uni.login({
|
||||||
|
provider: 'weixin',
|
||||||
|
// onlyAuthorize: true,// 微信登录仅请求授权认证
|
||||||
|
success: function (event) {
|
||||||
|
console.log('微信登录', event);
|
||||||
|
// const { code } = event
|
||||||
|
//客户端成功获取授权临时票据(code),向业务服务器发起登录请求。
|
||||||
|
// uni.request({
|
||||||
|
// url: 'https://www.example.com/loginByWeixin', //仅为示例,并非真实接口地址。
|
||||||
|
// data: {
|
||||||
|
// code: event.code
|
||||||
|
// },
|
||||||
|
// success: (res) => {
|
||||||
|
// //获得token完成登录
|
||||||
|
// uni.setStorageSync('token', res.token)
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
userStore.login({ account: account.value, code: event.code }).catch(() => {
|
||||||
|
if (res.code === 1) {
|
||||||
|
// const token = res.data.token;
|
||||||
|
// if (token) {
|
||||||
|
// setToken(token.token_type+' '+token.token);
|
||||||
|
// }
|
||||||
|
uni.$u.toast('登录成功');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
uni.$u.toast(`登录失败,${res.message}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
fail: function (err) {
|
||||||
|
// 登录授权失败
|
||||||
|
// err.code是错误码
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!uni.$u.test.mobile(Number(account.value))) {
|
if (!uni.$u.test.mobile(Number(account.value))) {
|
||||||
uni.$u.toast('请输入正确的手机号');
|
uni.$u.toast('请输入正确的手机号');
|
||||||
return;
|
return;
|
||||||
@ -124,11 +180,11 @@ async function submit() {
|
|||||||
await userStore.passwordLogin({ account: account.value, password: password.value }).catch((res) => {
|
await userStore.passwordLogin({ account: account.value, password: password.value }).catch((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.code === 1) {
|
if (res.code === 1) {
|
||||||
// const token = res.data.token;
|
// const token = res.data.token;
|
||||||
// if (token) {
|
// if (token) {
|
||||||
// setToken(token.token_type+' '+token.token);
|
// setToken(token.token_type+' '+token.token);
|
||||||
// }
|
// }
|
||||||
uni.$u.toast('登录成功');
|
uni.$u.toast('登录成功');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
uni.$u.toast(`登录失败,${res.message}`);
|
uni.$u.toast(`登录失败,${res.message}`);
|
||||||
@ -142,10 +198,10 @@ async function submit() {
|
|||||||
}
|
}
|
||||||
await userStore.login({ account: account.value, code: password.value }).catch(() => {
|
await userStore.login({ account: account.value, code: password.value }).catch(() => {
|
||||||
if (res.code === 1) {
|
if (res.code === 1) {
|
||||||
// const token = res.data.token;
|
// const token = res.data.token;
|
||||||
// if (token) {
|
// if (token) {
|
||||||
// setToken(token.token_type+' '+token.token);
|
// setToken(token.token_type+' '+token.token);
|
||||||
// }
|
// }
|
||||||
uni.$u.toast('登录成功');
|
uni.$u.toast('登录成功');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -153,7 +209,7 @@ async function submit() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if(isLogin()){
|
if (isLogin()) {
|
||||||
// await userStore.info()
|
// await userStore.info()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.$u.route({
|
uni.$u.route({
|
||||||
@ -161,8 +217,8 @@ async function submit() {
|
|||||||
url: redirect,
|
url: redirect,
|
||||||
});
|
});
|
||||||
}, 800);
|
}, 800);
|
||||||
}else{
|
} else {
|
||||||
uni.$u.toast('登录失败,请重新登录 ');
|
uni.$u.toast('登录失败,请重新登录 ');
|
||||||
setToken('');
|
setToken('');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,7 +245,7 @@ body {
|
|||||||
@apply mt-80rpx mx-auto mb-0 w-600rpx;
|
@apply mt-80rpx mx-auto mb-0 w-600rpx;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
@apply mb-100rpx text-60rpx text-left font-500;
|
@apply mb-200rpx text-60rpx text-left font-500;
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
|
@ -25,16 +25,20 @@
|
|||||||
:lazy-load="true" duration="500" bg-color="#f3f4f6NaN" :show-menu-by-longpress="true" />
|
:lazy-load="true" duration="500" bg-color="#f3f4f6NaN" :show-menu-by-longpress="true" />
|
||||||
</template>
|
</template>
|
||||||
<template #label>
|
<template #label>
|
||||||
<view class="h-50">
|
<view class="h-100 flex">
|
||||||
<text class="ellipsis text-gray" style="font-size: 22rpx;">
|
<!-- <text class="ellipsis text-gray" style="font-size: 22rpx;">
|
||||||
主料:{{ goods_info.dishes_name }}
|
主料:{{ goods_info.dishes_name }} 附近登陆放假啦放假啦付款就拉萨附近洛杉矶发拉法兰三级分类看见发生盎司附近
|
||||||
</text>
|
</text> -->
|
||||||
|
<up-text color="#767676" size="24rpx" :text="`${goods_info.dishes_name}`" :flex1="true" align="left"
|
||||||
|
wordWrap="normal" :show="true" prefixIcon=""
|
||||||
|
iconStyle="font-size:26rpx;color:#59CB56;margin-right:10rpx;" lines="2" decoration="none">
|
||||||
|
</up-text>
|
||||||
</view>
|
</view>
|
||||||
<view class="h-50 flex">
|
<!-- <view class="h-50 flex">
|
||||||
<text class="ellipsis text-gray" style="font-size: 22rpx;">
|
<text class="ellipsis text-gray" style="font-size: 22rpx;">
|
||||||
营养:{{ goods_info.dishes_name }}
|
营养:{{ goods_info.dishes_name }}
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view> -->
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
|
|
||||||
@ -106,8 +110,8 @@
|
|||||||
:paging-style="{ 'background-color': '#FFFFFFFF', 'padding': '20rpx' }" v-if="!currentTab" ref="pagingRefSP"
|
:paging-style="{ 'background-color': '#FFFFFFFF', 'padding': '20rpx' }" v-if="!currentTab" ref="pagingRefSP"
|
||||||
v-model="matchedItems_sp" class="fv-page flex-col " @query="changeSP">
|
v-model="matchedItems_sp" class="fv-page flex-col " @query="changeSP">
|
||||||
<up-checkbox-group v-model="checkboxValue" placement="column" @change="checkboxChange">
|
<up-checkbox-group v-model="checkboxValue" placement="column" @change="checkboxChange">
|
||||||
<up-cell-group class=" " style="" :border="true">
|
<up-cell-group :border="false">
|
||||||
<view v-for="(item, index) in matchedItems_sp" :key="index">
|
<view class="detail-box" v-for="(item, index) in matchedItems_sp" :key="index">
|
||||||
<u-cell :border="false" @click="goodsDetail(item.dishes_id)">
|
<u-cell :border="false" @click="goodsDetail(item.dishes_id)">
|
||||||
<template #title>
|
<template #title>
|
||||||
<view class="h-50 flex">
|
<view class="h-50 flex">
|
||||||
@ -115,6 +119,11 @@
|
|||||||
:show="true" prefixIcon="" iconStyle="font-size:26rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
:show="true" prefixIcon="" iconStyle="font-size:26rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
||||||
decoration="none">
|
decoration="none">
|
||||||
</up-text>
|
</up-text>
|
||||||
|
<view>
|
||||||
|
<u-icon labelPos="left" slot="right" :label="`x ${item.people_number}人份`" labelSize="28rpx"
|
||||||
|
size="28rpx" name=" "></u-icon>
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -126,26 +135,22 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #label>
|
<template #label>
|
||||||
<view class="h-50 flex">
|
<!-- <view class="h-50 flex">
|
||||||
<!-- <text class="ellipsis text-gray" style="font-size: 22rpx;">
|
|
||||||
主料: <span v-for="(product, index) in item.cartProduct"> {{ product.product_name }}{{ index ===
|
|
||||||
item.cartProduct.length - 1 ? '' : '、' }} </span>
|
|
||||||
</text> -->
|
|
||||||
<up-text color="#767676" size="24rpx" :text="`营养:${item.dishes_name}`" :flex1="true" align="left"
|
<up-text color="#767676" size="24rpx" :text="`营养:${item.dishes_name}`" :flex1="true" align="left"
|
||||||
wordWrap="normal" :show="true" prefixIcon=""
|
wordWrap="normal" :show="true" prefixIcon=""
|
||||||
iconStyle="font-size:26rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
|
iconStyle="font-size:26rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
|
||||||
</up-text>
|
</up-text>
|
||||||
|
|
||||||
</view>
|
</view> -->
|
||||||
<view class="h-50 flex">
|
<view class="h-100 flex">
|
||||||
|
<up-text color="#767676" size="24rpx" :text="`${item.dishes_name}`" :flex1="true" align="left"
|
||||||
<up-text color="#767676" size="24rpx" :text="`营养:${item.dishes_name}`" :flex1="true" align="left"
|
|
||||||
wordWrap="normal" :show="true" prefixIcon=""
|
wordWrap="normal" :show="true" prefixIcon=""
|
||||||
iconStyle="font-size:26rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
|
iconStyle="font-size:26rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
|
||||||
</up-text>
|
</up-text>
|
||||||
<view @click.stop="handleClickPropSC(item.id)">
|
<view @click.stop="handleClickPropSC(item.id)">
|
||||||
<u-icon labelPos="left" slot="right" label="食材配置" size="28rpx" name="arrow-right" color="#59CB56"
|
<u-icon labelPos="left" slot="right" label="食材配置" labelSize="28rpx" size="28rpx" name="arrow-right"
|
||||||
labelColor="#59CB56"></u-icon>
|
color="#59CB56" labelColor="#59CB56"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@ -159,46 +164,50 @@
|
|||||||
<z-paging :fixed="false" height="calc(100vh - 400rpx)" width="calc(100vw - 50rpx)"
|
<z-paging :fixed="false" height="calc(100vh - 400rpx)" width="calc(100vw - 50rpx)"
|
||||||
:paging-style="{ 'background-color': '#FFFFFFFF', 'padding': '20rpx' }" v-if="currentTab" ref="pagingRefSC"
|
:paging-style="{ 'background-color': '#FFFFFFFF', 'padding': '20rpx' }" v-if="currentTab" ref="pagingRefSC"
|
||||||
v-model="matchedItems_sc" class="fv-page flex-col " @query="changeSC">
|
v-model="matchedItems_sc" class="fv-page flex-col " @query="changeSC">
|
||||||
<view v-for="(item, index) in matchedItems_sc" :key="index">
|
<up-cell-group :border="false">
|
||||||
<u-cell :border="false">
|
<view class="detail-box" v-for="(item, index) in matchedItems_sc" :key="index">
|
||||||
<template #icon>
|
<u-cell :border="false">
|
||||||
<up-image class="flex flex-row" style="border:1px solid #59CB56;border-radius: 100%;" :src="item.image"
|
<template #icon>
|
||||||
mode="aspectFill" width="120rpx" height="120rpx" shape="circle" :lazy-load="true" duration="500"
|
<up-image class="flex flex-row" style="border:1px solid #59CB56;border-radius: 100%;" :src="item.image"
|
||||||
bg-color="#f3f4f6NaN" :show-menu-by-longpress="true" />
|
mode="aspectFill" width="120rpx" height="120rpx" shape="circle" :lazy-load="true" duration="500"
|
||||||
</template>
|
bg-color="#f3f4f6NaN" :show-menu-by-longpress="true" />
|
||||||
<template #title>
|
</template>
|
||||||
<view class="h-60 flex">
|
<template #title>
|
||||||
<up-text size="28rpx" :text="item.product_name" :flex1="true" align="left" wordWrap="normal" :show="true"
|
<view class="h-60 flex">
|
||||||
prefixIcon="" iconStyle="font-size:28rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
|
<up-text size="28rpx" :text="item.product_name" :flex1="true" align="left" wordWrap="normal"
|
||||||
</up-text>
|
:show="true" prefixIcon="" iconStyle="font-size:28rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
||||||
<view>
|
decoration="none">
|
||||||
<u-icon slot="right"
|
</up-text>
|
||||||
:label="`${item.nums * item.cart_num}${item.unit_name}/${item.cart_num}人份`"></u-icon>
|
<view>
|
||||||
|
<u-icon slot="right"
|
||||||
|
:label="`${item.nums * item.people_number}${item.unit_name}/${item.people_number}份`"></u-icon>
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
</template>
|
||||||
|
<template #label>
|
||||||
|
<view class="h-60 flex">
|
||||||
|
|
||||||
</view>
|
<up-text color="#767676" size="24rpx" :text="`菜谱:${item.dishes_name}`" :flex1="true" align="left"
|
||||||
</template>
|
wordWrap="normal" :show="true" prefixIcon=""
|
||||||
<template #label>
|
iconStyle="font-size:26rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
|
||||||
<view class="h-60 flex">
|
</up-text>
|
||||||
|
<u-number-box @change="editNum" v-model="item.people_number" input-width="80rpx" :name="item.id" />
|
||||||
|
|
||||||
<up-text color="#767676" size="24rpx" :text="`菜谱:${item.dishes_name}`" :flex1="true" align="left"
|
</view>
|
||||||
wordWrap="normal" :show="true" prefixIcon=""
|
</template>
|
||||||
iconStyle="font-size:26rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
|
</u-cell>
|
||||||
</up-text>
|
</view>
|
||||||
<u-number-box @change="editNum" v-model="item.cart_num" input-width="80rpx" :name="item.product_id" />
|
</up-cell-group>
|
||||||
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
</u-cell>
|
|
||||||
</view>
|
|
||||||
</z-paging>
|
</z-paging>
|
||||||
|
|
||||||
<view class="flex-sub box-border flex">
|
<view class="flex-sub box-border flex">
|
||||||
<u-text class="" style="margin: 0rpx 0rpx 0rpx 20rpx;" color="#59CB56" size="26rpx"
|
<view style="margin: 0rpx 0rpx 0rpx 20rpx;">
|
||||||
:text="`购物车菜谱${cartNUM}个`" :flex1="true" align="left" word-wrap="normal" :show="true"
|
<u-text class="" color="#59CB56" size="26rpx" :text="`购物车菜谱${cartNUM}个`" :flex1="true" align="left"
|
||||||
icon-style="26rpx" decoration="none" />
|
word-wrap="normal" :show="true" icon-style="26rpx" decoration="none" />
|
||||||
|
</view>
|
||||||
<up-button class="" style="" text="提交订单" type="primary" color="#59CB56" shape="circle" size="normal"
|
<up-button class="" style="" text="提交订单" type="primary" color="#59CB56" shape="circle" size="normal"
|
||||||
custom-style="width:200rpx" @click="handleSubmit" />
|
custom-style="width:200rpx;float:right;margin-right:0rpx;" @click="handleSubmit" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -242,6 +251,7 @@ export default defineComponent({
|
|||||||
onShow () {
|
onShow () {
|
||||||
//进入页面时刷新数据--避免加入购物车不显示
|
//进入页面时刷新数据--避免加入购物车不显示
|
||||||
this.searchSP();
|
this.searchSP();
|
||||||
|
this.searchSC();
|
||||||
},
|
},
|
||||||
onLoad () {
|
onLoad () {
|
||||||
// if (isLogin()) {
|
// if (isLogin()) {
|
||||||
@ -370,7 +380,7 @@ export default defineComponent({
|
|||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
console.log(that.aloneChecked);
|
console.log(that.aloneChecked);
|
||||||
//删除购物车菜品
|
//删除购物车菜品
|
||||||
CommonApi.commonPost('/api/cart/delete', { id: this.checkboxValue }).catch((res) => {
|
CommonApi.commonPost('/api/cart/delete', { ids: this.checkboxValue }).catch((res) => {
|
||||||
if (res.code === 1) {
|
if (res.code === 1) {
|
||||||
that.aloneChecked = false;
|
that.aloneChecked = false;
|
||||||
this.aloneCheckedValue = []
|
this.aloneCheckedValue = []
|
||||||
@ -400,10 +410,10 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
//修改商品数量
|
//修改商品数量
|
||||||
changeProductNumber (e) {
|
changeProductNumber (e) {
|
||||||
// console.log(e);
|
console.log(e);
|
||||||
this.goods_sc = this.matchedItems_sc.find(item => item.product_id === e.name);
|
this.goods_sc = this.matchedItems_sc.find(item => item.product_id === e.name);
|
||||||
// console.log(this.goods_sc);
|
// console.log(this.goods_sc);
|
||||||
CommonApi.commonPost('/api/cart/changeNumber', { id: e.name, nums: (this.goods_sc.nums * this.goods_sc.cart_num) }).catch((res) => {
|
CommonApi.commonPost('/api/cart/changeNumber', { id: e.name, people_number: e.value }).catch((res) => {
|
||||||
if (res.code === 1) {
|
if (res.code === 1) {
|
||||||
} else {
|
} else {
|
||||||
uni.$u.toast(res.msg);
|
uni.$u.toast(res.msg);
|
||||||
@ -412,10 +422,10 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
//修改人数
|
//修改人数
|
||||||
changePeopleNumber (e) {
|
changePeopleNumber (e) {
|
||||||
CommonApi.commonPost('/api/cart/changePeopleNumber', { totalNum: this.totalNum }).catch((res) => {
|
CommonApi.commonPost('/api/cart/changePeopleNumber', { people_number: this.totalNum }).catch((res) => {
|
||||||
if (res.code === 1) {
|
if (res.code === 1) {
|
||||||
this.matchedItems_sc.forEach((item, index) => {
|
this.matchedItems_sc.forEach((item, index) => {
|
||||||
this.matchedItems_sc[index].cart_num = e.value;
|
this.matchedItems_sc[index].people_number = e.value;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
uni.$u.toast(res.msg);
|
uni.$u.toast(res.msg);
|
||||||
@ -432,6 +442,10 @@ export default defineComponent({
|
|||||||
CommonApi.commonPost('/api/cart/count').catch((res) => {
|
CommonApi.commonPost('/api/cart/count').catch((res) => {
|
||||||
if (res.code === 1) {
|
if (res.code === 1) {
|
||||||
this.cartNUM = res.data.count;
|
this.cartNUM = res.data.count;
|
||||||
|
if (this.totalNum == 1) {
|
||||||
|
this.totalNum = res.data.peopleNumber
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<view class="page-wrap p-2">
|
<view class="page-wrap p-2">
|
||||||
<view class="detail-box flex bg-white p-4">
|
<view class="detail-box flex bg-white p-4">
|
||||||
<view class="mr-10rpx">
|
<view class="mr-10rpx">
|
||||||
<u-avatar :src="userStore.user.avatar " size="70" />
|
<u-avatar :src="userStore.user.avatar" size="70" />
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1">
|
<view class="flex-1">
|
||||||
<view class="pb-20rpx font-size-36rpx">
|
<view class="pb-20rpx font-size-36rpx">
|
||||||
@ -12,43 +12,33 @@
|
|||||||
{{ userStore.user.phone }}
|
{{ userStore.user.phone }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ml-10rpx p-10rpx">
|
<!-- <view class="ml-10rpx p-10rpx">
|
||||||
<u-icon name="scan" color="#969799" />
|
<u-icon name="scan" color="#969799" />
|
||||||
</view>
|
</view>
|
||||||
<view class="ml-10rpx p-10rpx">
|
<view class="ml-10rpx p-10rpx">
|
||||||
<u-icon name="arrow-right" color="#969799" />
|
<u-icon name="arrow-right" color="#969799" />
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="detail-box bg-white">
|
<view class="detail-box bg-white">
|
||||||
<u-cell
|
<u-cell icon="" title="昵称" is-link right-icon="lock" :value="userStore.user.nickname" :border="false" size="large"
|
||||||
icon="" title="昵称" is-link right-icon="lock" :value="userStore.user.nickname" :border="false" size="large"
|
custom-style="padding:20rpx;font-size:28rpx" />
|
||||||
custom-style="padding:20rpx;font-size:28rpx"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<u-cell
|
<u-cell icon="" title="ID" is-link right-icon="lock" :value="userStore.user.id" :border="false" size="large"
|
||||||
icon="" title="ID" is-link right-icon="lock" :value="userStore.user.id" :border="false" size="large"
|
custom-style="padding:20rpx;font-size:28rpx" />
|
||||||
custom-style="padding:20rpx;font-size:28rpx"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<u-cell
|
<u-cell icon="" title="微信号" is-link right-icon="lock" :value="userStore.user.code" :border="false" size="large"
|
||||||
icon="" title="微信号" is-link right-icon="lock" :value="userStore.user.code" :border="false" size="large"
|
custom-style="padding:20rpx;font-size:28rpx" />
|
||||||
custom-style="padding:20rpx;font-size:28rpx"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<u-cell
|
<u-cell icon="order" title="订单详情" is-link value="" :border="false" size="large"
|
||||||
icon="order" title="订单详情" is-link value="" :border="false" size="large"
|
custom-style="padding:20rpx;font-size:28rpx" @click="orderList" />
|
||||||
custom-style="padding:20rpx;font-size:28rpx"
|
|
||||||
@click="orderList"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="bg-white p-2">
|
<view class="bg-white p-2">
|
||||||
<u-button
|
<u-button class="p-2" size="large" text="退出登录" type="primary" color="#59CB56" shape="circle"
|
||||||
class="p-2" size="large" text="退出登录" type="primary" color="#59CB56" shape="circle"
|
custom-style="width:100%;" @click="loginOut" />
|
||||||
custom-style="width:100%;" @click="loginOut"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -76,7 +66,7 @@ const toCopy = async () => {
|
|||||||
console.log('[ data ] >', data);
|
console.log('[ data ] >', data);
|
||||||
};
|
};
|
||||||
|
|
||||||
function loginOut() {
|
function loginOut () {
|
||||||
showModal('success', {
|
showModal('success', {
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确定退出登录?',
|
content: '确定退出登录?',
|
||||||
@ -87,23 +77,23 @@ function loginOut() {
|
|||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
// 退出请求
|
// 退出请求
|
||||||
// loginOuts();
|
// loginOuts();
|
||||||
setToken('');
|
setToken('');
|
||||||
uni.$u.route({
|
uni.$u.route({
|
||||||
type: isTabBarPath(redirect) ? 'switchTab' : 'redirectTo',
|
type: isTabBarPath(redirect) ? 'switchTab' : 'redirectTo',
|
||||||
url: redirect,
|
url: redirect,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function orderList() {
|
function orderList () {
|
||||||
uni.$u.route({
|
uni.$u.route({
|
||||||
type: 'navigateTo',
|
type: 'navigateTo',
|
||||||
url: '/pages/common/goods/order',
|
url: '/pages/common/goods/order',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loginOuts() {
|
async function loginOuts () {
|
||||||
// 退出请求
|
// 退出请求
|
||||||
await userStore.logout().catch(() => {
|
await userStore.logout().catch(() => {
|
||||||
setToken('');
|
setToken('');
|
||||||
@ -121,17 +111,3 @@ onShow(async () => {
|
|||||||
console.log(hasPermission ? '已登录' : '未登录,拦截跳转');
|
console.log(hasPermission ? '已登录' : '未登录,拦截跳转');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.detail-box {
|
|
||||||
margin: 20rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
border: 1rpx solid #dfdfdf;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
html,
|
|
||||||
body {
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
BIN
src/static/images/tabbar/bofang.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
src/static/images/tabbar/bofang_selected.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
src/static/images/tabbar/shezhi.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
src/static/images/tabbar/shouye.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
src/static/images/tabbar/shouye_selected.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
src/static/images/tabbar/wode.png
Normal file
After Width: | Height: | Size: 6.9 KiB |
BIN
src/static/images/tabbar/wode_selected.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
@ -3,6 +3,27 @@ page {
|
|||||||
color: $u-main-color;
|
color: $u-main-color;
|
||||||
background-color: $u-bg-color;
|
background-color: $u-bg-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.detail-box {
|
||||||
|
margin: 10rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1rpx solid #dfdfdf;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
.tab-bar{
|
||||||
|
display: flex; position: fixed; left: 0px;right: 0px; bottom: 0rpx;
|
||||||
|
}
|
||||||
// .category-item {
|
// .category-item {
|
||||||
// display: inline-flex;
|
// display: inline-flex;
|
||||||
// flex-direction: column;
|
// flex-direction: column;
|
||||||
|
@ -3,7 +3,7 @@ import type { HttpRequestConfig, HttpResponse } from 'uview-plus/libs/luch-reque
|
|||||||
import type { IResponse } from './types';
|
import type { IResponse } from './types';
|
||||||
import Request from 'uview-plus/libs/luch-request/index';
|
import Request from 'uview-plus/libs/luch-request/index';
|
||||||
import { requestInterceptors, responseInterceptors } from './interceptors';
|
import { requestInterceptors, responseInterceptors } from './interceptors';
|
||||||
|
import { useClipboard, useModal, usePermission } from '@/hooks';
|
||||||
const http = new Request();
|
const http = new Request();
|
||||||
|
|
||||||
// 引入拦截器配置
|
// 引入拦截器配置
|
||||||
@ -28,9 +28,15 @@ export function request<T = any>(config: HttpRequestConfig): Promise<T> {
|
|||||||
console.log('[ res ] >', res);
|
console.log('[ res ] >', res);
|
||||||
const { result } = res.data;
|
const { result } = res.data;
|
||||||
resolve(result as T);
|
resolve(result as T);
|
||||||
}).catch((err: any) => {
|
}).catch((res: any) => {
|
||||||
|
if(res.data.code==401){
|
||||||
|
//未登录拦截跳转
|
||||||
|
uni.$u.toast(res.data.msg);
|
||||||
|
usePermission();
|
||||||
|
return;
|
||||||
|
}
|
||||||
// console.error('[ err ] >', err);
|
// console.error('[ err ] >', err);
|
||||||
reject(err);
|
reject(res);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|