This commit is contained in:
weipengfei 2024-04-28 18:08:57 +08:00
parent 20e5ed1895
commit 27f95b331c
67 changed files with 1235 additions and 918 deletions

23
App.vue
View File

@ -18,7 +18,28 @@
page{ page{
font-size: 26rpx; font-size: 26rpx;
background-color: #eee; background-color: #f6f6f6;
} }
.fiexd-btn-box {
position: fixed;
bottom: 0;
left: 0;
height: 120rpx;
height: calc(constant(safe-area-inset-bottom) + 120rpx);
/* 适用于iOS设备 */
height: calc(env(safe-area-inset-bottom) + 120rpx);
/* 适用于Android设备 */
width: 100%;
box-sizing: border-box;
background-color: #fff;
padding: 20rpx;
padding-bottom: calc(constant(safe-area-inset-bottom) + 20rpx);
/* 适用于iOS设备 */
padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
/* 适用于Android设备 */
display: flex;
justify-content: space-between;
align-items: center;
}
</style> </style>

21
api/cart.js Normal file
View File

@ -0,0 +1,21 @@
import request from '@/utils/request';
//添加购物车数量
export const cartCreateApi = (data)=>{
return request.post('/order/cart/create', data);
}
//购物车-调整数量
export const cartChangeApi = (data)=>{
return request.post('/order/cart/change', data);
}
//购物车-清空
export const cartDeleteApi = (data)=>{
return request.post('/order/cart/delete', data);
}
//购物车-零售列表
export const cartListApi = (data)=>{
return request.get('/order/RetailOrder/checkOrder', data);
}

View File

@ -1,5 +1,9 @@
import request from '@/utils/request'; import request from '@/utils/request';
export const goodListApi = (data)=>{ export const goodListApi = (data)=>{
return request.get('/good/list', data); return request.get('/goods/goods/lists', data);
}
export const goodClassListApi = (data)=>{
return request.get('/goods/goodsclass/lists', data);
} }

32
api/user.js Normal file
View File

@ -0,0 +1,32 @@
import request from '@/utils/request';
// 密码登录
export const userLoginApi = (data)=>{
return request.post('/login/account', data);
}
// 添加地址
export const addressCreateApi = (data)=>{
return request.post('/user/address/create', data);
}
// 修改地址
export const addressEditApi = (data)=>{
return request.post('/user/address/edit', data);
}
// 删除地址
export const addressDeleteApi = (data)=>{
return request.post('/user/address/delete', data);
}
// 地址列表
export const addressListsApi = (data)=>{
return request.post('/user/address/lists', data);
}
// 地址详情
export const addressDetailApi = (data)=>{
return request.post('/user/address/detail', data);
}

View File

@ -94,7 +94,7 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding-bottom: 20rpx; padding-bottom: 20rpx;
border-bottom: 1rpx solid #eee; border-bottom: 1rpx solid #f6f6f6;
margin-bottom: 20rpx; margin-bottom: 20rpx;
&:last-child { &:last-child {

View File

@ -1,9 +1,9 @@
<template> <template>
<up-popup :show="show" round="10" @close="close" mode="center"> <up-popup :show="show" round="10" @close="close" mode="center" :safeAreaInsetBottom="false">
<view class="modal-popup"> <view class="m-modal-popup">
<view class="head-title">{{title}}</view> <view class="head-title-modal">{{title}}</view>
<view class="content">{{content}}</view> <view class="content-modal">{{content}}</view>
<view class="btn-box"> <view class="btn-box-modal">
<view style="width: 230rpx;"><up-button @click="close" plain color="#999">{{cancleText}}</up-button></view> <view style="width: 230rpx;"><up-button @click="close" plain color="#999">{{cancleText}}</up-button></view>
<view style="width: 230rpx;"><up-button @click="change" color="#20B128">{{confirmText}}</up-button></view> <view style="width: 230rpx;"><up-button @click="change" color="#20B128">{{confirmText}}</up-button></view>
</view> </view>
@ -48,20 +48,20 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.modal-popup{ .m-modal-popup{
width: 500rpx; width: 500rpx;
padding: 40rpx; padding: 40rpx;
.head-title{ .head-title-modal{
font-size: 32rpx; font-size: 32rpx;
text-align: center; text-align: center;
} }
.content{ .content-modal{
font-size: 26rpx; font-size: 26rpx;
color: #999; color: #999;
text-align: center; text-align: center;
padding: 40rpx 0; padding: 40rpx 0;
} }
.btn-box{ .btn-box-modal{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }

View File

@ -79,7 +79,7 @@
height: 80rpx; height: 80rpx;
background-color: #fff; background-color: #fff;
border-radius: 0 0 28rpx 28rpx; border-radius: 0 0 28rpx 28rpx;
border-top: 1rpx solid #eee; border-top: 1rpx solid #f6f6f6;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;

View File

@ -1,18 +1,17 @@
let BASE_URL let BASE_URL
import store from "@/store/index.js" import store from "@/store/user.js"
// 环境 // 环境
let env = "dev" let env = "dev"
// let env = "prod" // let env = "prod"
switch(env){
case 'prod': BASE_URL = '';break;
default: BASE_URL = 'http://192.168.1.9:8787';
}
let HTTP_REQUEST_URL let HTTP_REQUEST_URL
let HEADER let HEADER
if (env == 'dev') {
BASE_URL = 'https://ceshi-suyuan-breed.lihaink.cn/'
// BASE_URL = 'http://192.168.1.24:8084/'
} else if (env = 'prod') {
BASE_URL = 'https://suyuan-breed.lihaink.cn/'
}
let config = { let config = {
HTTP_REQUEST_URL: BASE_URL, HTTP_REQUEST_URL: BASE_URL,
HEADER: { HEADER: {
@ -24,8 +23,8 @@ let config = {
'Form-type': 'app', 'Form-type': 'app',
//#endif //#endif
'TOKEN': '' 'TOKEN': ''
},
} ENV: env,
} }
export { export {

View File

@ -21,7 +21,9 @@
"path": "pages/login/login", "path": "pages/login/login",
"style": { "style": {
"navigationBarTitleText": "登录", "navigationBarTitleText": "登录",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"navigationStyle": "custom"
} }
}, },
{ {
@ -76,6 +78,14 @@
"navigationBarTitleText" : "", "navigationBarTitleText" : "",
"enablePullDownRefresh" : false "enablePullDownRefresh" : false
} }
},
{
"path" : "settle/settle",
"style" :
{
"navigationBarTitleText" : "确认订单",
"enablePullDownRefresh" : false
}
} }
] ]
} }

View File

@ -90,7 +90,7 @@
<image v-else src="@/static/icon/check.png"></image> <image v-else src="@/static/icon/check.png"></image>
<text style="font-size: 24rpx;">全选</text> <text style="font-size: 24rpx;">全选</text>
</view> </view>
<view v-if="true" class="btn-box"> <view v-if="true" class="btn-boxs">
<view class="all-price"> <view class="all-price">
<view style="width: 80rpx;">合计:</view> <view style="width: 80rpx;">合计:</view>
<view class="price"> <view class="price">
@ -101,7 +101,7 @@
</view> </view>
<up-button color="#20b128" shape="circle" :disabled="false" @click="settleAccounts">去结算<text>(2)</text></up-button> <up-button color="#20b128" shape="circle" :disabled="false" @click="settleAccounts">去结算<text>(2)</text></up-button>
</view> </view>
<view v-else class="btn-box"> <view v-else class="btn-boxs">
<!-- <view style="width: 100px;margin-right: 20rpx;"><up-button size="small" plain color="#989898" shape="circle">移入收藏夹</up-button></view> --> <!-- <view style="width: 100px;margin-right: 20rpx;"><up-button size="small" plain color="#989898" shape="circle">移入收藏夹</up-button></view> -->
<view style="width: 80px;"><up-button size="small" plain color="#989898" shape="circle">删除</up-button></view> <view style="width: 80px;"><up-button size="small" plain color="#989898" shape="circle">删除</up-button></view>
</view> </view>
@ -112,6 +112,7 @@
<script setup> <script setup>
import { ref } from 'vue'; import { ref } from 'vue';
import { cartListApi } from "@/api/cart.js"
// //
const list = ref(['购物车', '常买']); const list = ref(['购物车', '常买']);
@ -130,8 +131,18 @@
// //
const settleAccounts = ()=>{ const settleAccounts = ()=>{
uni.navigateTo({
url: '/pagesOrder/settle/settle'
})
} }
const cartList = ref([]);
const getcartList = ()=>{
cartListApi().then(res=>{
console.log(res);
})
}
getcartList()
</script> </script>
<style lang="scss"> <style lang="scss">
@ -171,7 +182,7 @@
top: var(--window-top); top: var(--window-top);
left: 0; left: 0;
right: 0; right: 0;
background-color: #eee; background-color: #f6f6f6;
z-index: 100; z-index: 100;
height: 60rpx; height: 60rpx;
line-height: 60rpx; line-height: 60rpx;
@ -186,7 +197,7 @@
.shop-item { .shop-item {
padding: 20rpx; padding: 20rpx;
border-bottom: 1rpx solid #eee; border-bottom: 1rpx solid #f6f6f6;
background-color: #fff; background-color: #fff;
display: flex; display: flex;
@ -277,7 +288,7 @@
} }
} }
.btn-box { .btn-boxs {
display: flex; display: flex;
.all-price { .all-price {

View File

@ -3,7 +3,8 @@
<up-navbar placeholder style="z-index: 10080;"> <up-navbar placeholder style="z-index: 10080;">
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<template #left> <template #left>
<view style="width: 500rpx;"><up-search placeholder="请输入商品" @search="searchKeyword" v-model="keyword" :showAction="false"></up-search> <view style="width: 500rpx;"><up-search placeholder="请输入商品" @search="searchKeyword" v-model="keyword"
:showAction="false"></up-search>
</view> </view>
</template> </template>
<!-- #endif --> <!-- #endif -->
@ -12,7 +13,8 @@
<view></view> <view></view>
</template> </template>
<template #center> <template #center>
<view style="width: 700rpx;"><up-search placeholder="请输入商品" @search="searchKeyword" v-model="keyword" :showAction="false"></up-search> <view style="width: 700rpx;"><up-search placeholder="请输入商品" @search="searchKeyword" v-model="keyword"
:showAction="false"></up-search>
</view> </view>
</template> </template>
<!-- #endif --> <!-- #endif -->
@ -20,9 +22,10 @@
<view style="position: relative;overflow: hidden;"> <view style="position: relative;overflow: hidden;">
<scroll-view class="head-view" scroll-x> <scroll-view class="head-view" scroll-x>
<view class="list"> <view class="list">
<view class="item" :class="{'item-active': topActive==index}" v-for="(item, index) in 10" :key="index" @click="changeOne(item, index)"> <view class="item" :class="{'item-active': topActive==item.id}" v-for="(item, index) in goodClassList"
<image class="c-img" src="https://cdn.uviewui.com/uview/album/1.jpg"></image> :key="index" @click="changeOne(item, index)">
<view class="c-text u-line-1">惠农生活{{item}}</view> <view class="c-img"><up-image height="100rpx" width="100rpx" :src="item.pic"></up-image></view>
<view class="c-text u-line-1">{{item.name}}</view>
</view> </view>
<view class="item" style="width: 80rpx;height: 20rpx;"> <view class="item" style="width: 80rpx;height: 20rpx;">
</view> </view>
@ -39,9 +42,10 @@
<view class="head-title">全部分类</view> <view class="head-title">全部分类</view>
<scroll-view scroll-y style="height: 600rpx;"> <scroll-view scroll-y style="height: 600rpx;">
<view class="list"> <view class="list">
<view class="item" :class="{'item-active': topActive==index}" v-for="(item, index) in 10" :key="index" @click="changeOne(item, index)"> <view class="item" :class="{'item-active': topActive==item.id}" v-for="(item, index) in goodClassList"
<image class="c-img" src="https://cdn.uviewui.com/uview/album/1.jpg"></image> :key="index" @click="changeOne(item, index)">
<view class="c-text u-line-1">惠农生活{{item}}</view> <view class="c-img"><up-image height="100rpx" width="100rpx" :src="item.pic"></up-image></view>
<view class="c-text u-line-1">{{item.name}}</view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@ -49,17 +53,17 @@
</viewPopup> </viewPopup>
<view class="scroll-box"> <view class="scroll-box">
<scroll-view class="left" scroll-y> <scroll-view class="left" scroll-y>
<view class="item u-line-1" :class="{'item-active': leftActive==index}" v-for="(item, index) in 20" <view class="item u-line-1" :class="{'item-active': leftActive==item.id}" v-for="(item, index) in goodClassTow"
:key="index" @click="changeTwo(item, index)">惠农生活{{item}}</view> :key="index" @click="changeTwo(item, index)">{{item.name}}</view>
<view style="width: 100%;height: 200rpx;"></view> <view style="width: 100%;height: 200rpx;"></view>
</scroll-view> </scroll-view>
<view class="right"> <view class="right">
<view class="classify"> <view class="classify">
<scroll-view style="height: 90rpx;" scroll-x> <scroll-view style="height: 90rpx;" scroll-x>
<view class="classify-list"> <view class="classify-list">
<view class="classify-list-item u-line-1" :class="{'item-active': rightActive==index}" <view class="classify-list-item u-line-1" :class="{'item-active': rightActive==item.id}"
v-for="(item, index) in 6" :key="index" @click="changeThree(item, index)"> v-for="(item, index) in goodClassThree" :key="index" @click="changeThree(item, index)">
牛肉 {{item.name}}
</view> </view>
<view style="width: 70rpx;flex-shrink: 0;"></view> <view style="width: 70rpx;flex-shrink: 0;"></view>
</view> </view>
@ -69,7 +73,7 @@
</view> </view>
<view class="order-by"> <view class="order-by">
<view class="item" :class="{'order-active': where.order==''}" @click="changeOrder('')">综合</view> <view class="item" :class="{'order-active': where.order==''}" @click="changeOrder('')">综合</view>
<view class="item" :class="{'order-active': where.order=='desc'||where.order=='asc'}" <view class="item" :class="{'order-active': where.order=='desc'||where.order=='asc'}"
@click="changeOrder(where.order=='asc'?'desc':'asc')">价格</view> @click="changeOrder(where.order=='asc'?'desc':'asc')">价格</view>
<view class="item" :class="{'order-active': where.order=='sales'}" @click="changeOrder('sales')">销量</view> <view class="item" :class="{'order-active': where.order=='sales'}" @click="changeOrder('sales')">销量</view>
</view> </view>
@ -78,28 +82,37 @@
<view class="cateOne"> <view class="cateOne">
<scroll-view scroll-y style="height: 230rpx;"> <scroll-view scroll-y style="height: 230rpx;">
<view class="classify-list"> <view class="classify-list">
<view class="classify-list-item u-line-1" :class="{'item-active': rightActive==index}" <view class="classify-list-item u-line-1" :class="{'item-active': rightActive==item.id}"
v-for="(item, index) in 6" :key="index" @click="changeThree(item, index)"> v-for="(item, index) in goodClassThree" :key="index" @click="changeThree(item, index)">
牛肉 {{item.name}}
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
</viewPopup> </viewPopup>
<scroll-view class="list" scroll-y> <scroll-view class="list" scroll-y @scrolltolower="loadMoreGood">
<view class="shop-item" v-for="(item, index) in 20" :key="index"> <view class="shop-item" v-for="(item, index) in goodList" :key="item.id">
<image class="shop-img" src="https://cdn.uviewui.com/uview/album/1.jpg"></image> <view class="shop-img">
<up-image width="160rpx" height="160rpx" :src="item.imgs"></up-image>
</view>
<view class="shop-content"> <view class="shop-content">
<view class="title"> <view class="title">
<view class="name u-line-2">好吃的瓜果{{item}}</view> <view class="name u-line-2">{{item.name}}</view>
<view class="tip u-line-1">香味辛辣|葱香味浓|调味增香香味辛辣|葱香味浓|调味增香</view> <view class="tip u-line-1">
<text>{{item.brand_name}}|</text>
<text>{{item.class_name}}|</text>
<text>{{item.unit_name}}</text>
</view>
</view> </view>
<view class="price-btn"> <view class="price-btn">
<view class="price">12.00</view> <view class="price">{{item.sell}}</view>
<view class="btn"> <view class="btn">
<u--icon name="minus-circle-fill" size="20" color="#20b128"></u--icon> <up-transition :show="cartList.get(item.id)>0"><u--icon name="minus-circle-fill" size="20"
<view class="num">{{1}}</view> color="#20b128" @click="removeCart(item.id)"></u--icon></up-transition>
<u--icon name="plus-circle-fill" size="20" color="#20b128"></u--icon> <up-transition :show="cartList.get(item.id)>0">
<view class="num">{{cartList.get(item.id)}}</view>
</up-transition>
<u--icon name="plus-circle-fill" size="20" color="#20b128" @click="addCart(item.id)"></u--icon>
</view> </view>
</view> </view>
</view> </view>
@ -108,66 +121,119 @@
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script setup> <script setup>
import { onLoad } from "@dcloudio/uni-app" import { onLoad } from "@dcloudio/uni-app"
import { ref } from "vue" import { reactive, ref } from "vue"
import { goodListApi, goodClassListApi } from "@/api/good.js"
import { cartCreateApi, cartChangeApi } from "@/api/cart.js"
import viewPopup from "@/components/viewPopup.vue" import viewPopup from "@/components/viewPopup.vue"
const show = ref(0); const show = ref(0);
const topActive = ref(0); const topActive = ref(0);
const changeOne = (item, index)=>{ const changeOne = (item, index) => {
console.log('选择', item, index); console.log('选择', item, index);
topActive.value = index; topActive.value = item.id;
show.value = 0;
goodClassTow.value = item?.children||[];
goodClassThree.value = goodClassTow.value[0]?.children||[];
leftActive.value = goodClassTow.value[0]?.id;
rightActive.value = goodClassThree.value[0]?.id;
}
const leftActive = ref(0);
const changeTwo = (item, index) => {
console.log('选择', item, index);
leftActive.value = item.id;
show.value = 0;
goodClassThree.value = item?.children||[];
rightActive.value = goodClassThree.value[0]?.id;
}
const rightActive = ref(0);
const changeThree = (item, index) => {
console.log('选择', item, index);
rightActive.value = item.id;
show.value = 0; show.value = 0;
} }
const leftActive = ref(2); const cartList = reactive(new Map());
const changeTwo = (item, index)=>{ const addCart = (id) => { //
console.log('选择', item, index); cartCreateApi({
leftActive.value = index; cart_num: 1,
show.value = 0; is_new: 0, // 01
goods_id: id
}).then(res => {
console.log(res);
let now = cartList.get(id) || 0;
cartList.set(id, now + 1);
})
} }
const removeCart = (id) => {
const rightActive = ref(1); let num = cartList.get(id) || 0;
const changeThree = (item, index)=>{ if (num == 0) return;
console.log('选择', item, index); cartChangeApi({
rightActive.value = index; goods_id: id,
show.value = 0; cart_num: num--
}).then(res => {
console.log(res);
cartList.set(id, num)
})
} }
const keyword = ref(''); const keyword = ref('');
const searchKeyword = ()=>{ const searchKeyword = () => {
console.log('搜索', keyword.value); console.log('搜索', keyword.value);
where.value = keyword.value; where.value = keyword.value;
} }
const changeOrder = (order)=>{ const changeOrder = (order) => {
console.log('排序', order); console.log('排序', order);
where.value.order = order; where.value.order = order;
} }
const where = ref({ const where = ref({
page: 1, page: 1,
pageSize: 15, pageSize: 25,
keyword: '', keyword: '',
order: '' order: ''
}) })
const loading = ref(true); const loading = ref(true);
const getGoodList = ()=>{ const goodList = ref([]);
const getGoodList = () => {
loading.value = true; loading.value = true;
setTimeout(()=>{ goodListApi(where.value).then(res => {
loading.value = false; goodList.value = [...goodList.value, ...res.data.lists];
},3000) })
} }
onLoad(()=>{ //
const loadMoreGood = () => {
console.log('触底了');
}
const goodClassList = ref([]); //
const goodClassTow = ref([]); //
const goodClassThree = ref([]); //
const getgoodClassList = () => {
goodClassListApi().then(res => {
goodClassList.value = res.data?.lists||[];
goodClassTow.value = goodClassList.value[0]?.children||[];
goodClassThree.value = goodClassTow.value[0]?.children||[];
topActive.value = goodClassList.value[0]?.id;
leftActive.value = goodClassTow.value[0]?.id;
rightActive.value = goodClassThree.value[0]?.id;
})
}
onLoad(() => {
getgoodClassList();
getGoodList(); getGoodList();
}) })
</script> </script>
@ -203,6 +269,7 @@
flex-shrink: 0; flex-shrink: 0;
border-radius: 50%; border-radius: 50%;
border: 2px solid transparent; border: 2px solid transparent;
overflow: hidden;
} }
.c-text { .c-text {
@ -255,15 +322,16 @@
} }
.list { .list {
padding: 20rpx 0; padding: 20rpx 20rpx;
font-size: 22rpx; font-size: 22rpx;
display: grid; display: grid;
grid-template-columns: auto auto auto auto auto; grid-template-columns: repeat(5, 1fr);
justify-content: center; justify-content: center;
grid-gap: 20rpx; grid-gap: 20rpx;
.item { .item {
width: 120rpx; width: 120rpx;
margin: 0 auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
@ -274,6 +342,7 @@
flex-shrink: 0; flex-shrink: 0;
border-radius: 50%; border-radius: 50%;
border: 2px solid transparent; border: 2px solid transparent;
overflow: hidden;
} }
.c-text { .c-text {
@ -299,10 +368,10 @@
} }
.classify-list { .classify-list {
padding: 20rpx 0; padding: 20rpx 30rpx;
font-size: 22rpx; font-size: 22rpx;
display: grid; display: grid;
grid-template-columns: auto auto auto; grid-template-columns: repeat(3, 1fr);
justify-content: center; justify-content: center;
grid-gap: 20rpx; grid-gap: 20rpx;
@ -336,7 +405,7 @@
/* #endif */ /* #endif */
width: 170rpx; width: 170rpx;
box-sizing: border-box; box-sizing: border-box;
background-color: #eee; background-color: #f6f6f6;
font-size: 24rpx; font-size: 24rpx;
.item { .item {
@ -377,7 +446,7 @@
.classify { .classify {
height: 150rpx; height: 150rpx;
background-color: #fff; background-color: #fff;
border-bottom: 1rpx solid #eee; border-bottom: 1rpx solid #f6f6f6;
position: relative; position: relative;
font-size: 24rpx; font-size: 24rpx;
@ -424,7 +493,8 @@
.item { .item {
padding-right: 20rpx; padding-right: 20rpx;
} }
.order-active{
.order-active {
color: #20b128; color: #20b128;
} }
} }
@ -434,10 +504,11 @@
height: calc(100vh - var(--window-top) - var(--window-bottom) - 180rpx - 150rpx); height: calc(100vh - var(--window-top) - var(--window-bottom) - 180rpx - 150rpx);
/* #ifdef H5 */ /* #ifdef H5 */
height: calc(100vh - 96px - 180rpx); height: calc(100vh - 96px - 180rpx);
/* #endif */ /* #endif */
.shop-item { .shop-item {
padding: 20rpx; padding: 20rpx;
border-bottom: 1rpx solid #eee; border-bottom: 1rpx solid #f6f6f6;
background-color: #fff; background-color: #fff;
display: flex; display: flex;
@ -446,6 +517,7 @@
width: 160rpx; width: 160rpx;
margin-right: 20rpx; margin-right: 20rpx;
border-radius: 14rpx; border-radius: 14rpx;
overflow: hidden;
} }
.shop-content { .shop-content {

View File

@ -1,81 +1,227 @@
<template> <template>
<view> <view>
<view class="login-box"> <up-navbar
title="登录"
@leftClick="navBack"
:autoBack="false"
placeholder
bgColor="rgba(0,0,0,0)"
>
</up-navbar>
<view class="login-box">
<image class="logo" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/35adb202404271727457954.png"></image> <image class="logo" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/35adb202404271727457954.png"></image>
<view class="tips">欢迎登录里海商户采购平台</view> <view class="tips">欢迎登录里海商户采购平台</view>
<block v-if="true"> <block v-if="showWeixin">
<view class="btn"> <up-transition :show="showWeixin">
<up-button color="#20B128" size="large"><up-icon name="weixin-fill" color="#fff" size="28"></up-icon></up-button> <view class="btn">
</view> <up-button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" color="#20B128" size="large"><up-icon
<view class="btn"> name="weixin-fill" color="#fff" size="28"></up-icon></up-button>
<up-button color="#ECFFEE" size="large"><text style="color: #20B128;">使用短信验证登录</text></up-button> </view>
</view> <view class="btn">
<up-button color="#ECFFEE" @click="showWeixin=false" size="large"><text style="color: #20B128;">使用短信验证登录</text></up-button>
</view>
</up-transition>
</block>
<block v-else>
<up-transition :show="!showWeixin">
<view class="form">
<view class="input">
<up-input :customStyle="{height: '100%'}" v-model="loginForm.phone" placeholderClass="place" border="none" placeholder="请输入手机号" type="number">
<template #prefix>
<image style="height: 40rpx;width: 40rpx;margin-top: 6rpx;"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/48491202404281006484208.png"></image>
</template>
</up-input>
</view>
<view class="input">
<up-input :customStyle="{height: '100%'}" v-model="loginForm.code" :maxlength="4" placeholderClass="place" border="none" placeholder="请输入验证码" type="number">
<template #prefix>
<image style="height: 40rpx;width: 40rpx;margin-top: 6rpx;"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/3a42f202404281007454918.png"></image>
</template>
<template #suffix>
<up-code :seconds="seconds" ref="uCodeRef"
@change="codeChange"></up-code>
<view style="color: #20B128;" @click="getCode">{{tips}}</view>
</template>
</up-input>
</view>
</view>
<view class="btn">
<up-button color="#20B128" size="large" @click="codeLogin">登录</up-button>
</view>
</up-transition>
</block> </block>
<view class="agreement"> <view class="agreement">
<image v-if="true" src="@/static/icon/n-check.png"></image> <image v-if="!isAgree" @click="isAgree=true" src="@/static/icon/n-check.png"></image>
<image v-else src="@/static/icon/check.png"></image> <image v-else @click="isAgree=false" src="@/static/icon/check.png"></image>
<view> <view>
我已同意<text>用户协议</text><text>隐私政策</text> 我已同意<text>用户协议</text><text>隐私政策</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script setup> <script setup>
import useUserStore from "@/store/user.js" import { onBackPress } from "@dcloudio/uni-app"
import { ref } from "vue"
import { userLoginApi } from "@/api/user.js";
import useUserStore from "@/store/user.js"
const userStore = useUserStore(); //使pinia const userStore = useUserStore(); //使pinia
const showWeixin = ref(true); //
const isAgree = ref(false); //
const weixinLogin = () => {
if (!isAgree.value) return uni.$u.toast('请先阅读并同意协议')
uni.login({
provider: 'weixin',
success: (res) => {
console.log(res);
}
})
}
const getPhoneNumber = (e) => {
console.log(e);
}
const loginForm = ref({
phone: '15366662222',
code: ''
})
const isPhone = ()=>{ //
loginForm.value.phone = loginForm.value.phone.replace(/\s*/g,""); //
return !/^1[3456789]\d{9}$/.test(loginForm.value.phone);
}
const codeLogin = ()=>{
if (!isAgree.value) return uni.$u.toast('请先阅读并同意协议');
//
if(isPhone()) return uni.$u.toast('请输入正确的手机号码');
console.log('登录');
userLoginApi({
account: '17811111111',
password: '1111',
terminal: 3,
scene: 1
}).then(res=>{
console.log(res);
})
}
const tips = ref('');
const seconds = ref(60);
const uCodeRef = ref(null);
const codeChange = (text) => {
tips.value = text;
};
const getCode = () => {
if (!isAgree.value) return uni.$u.toast('请先阅读并同意协议');
if (uCodeRef.value.canGetCode) {
if(isPhone()) return uni.$u.toast('请输入正确的手机号码');
//
uni.showLoading({
title: '正在获取验证码',
});
setTimeout(() => {
uni.hideLoading();
// start()
uni.$u.toast('验证码已发送');
//
uCodeRef.value.start();
}, 2000);
} else {
uni.$u.toast('倒计时结束后再发送');
}
};
// 使
const navBack = ()=>{
if(showWeixin.value==false) {
showWeixin.value = true;
return true;
}
else uni.navigateBack();
}
</script> </script>
<style lang="scss"> <style lang="scss">
page{ page {
background-color: #fff; background-color: #fff;
}
.login-box{
width: 700rpx;
height: 88vh;
margin: 0 auto;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
padding-top: 10vh;
position: relative;
.logo{
height: 152rpx;
width: 152rpx;
} }
.tips{ .login-box {
color: #444444; width: 700rpx;
font-size: 28rpx; height: 88vh;
margin: 30rpx 0; margin: 0 auto;
} box-sizing: border-box;
.btn{
width: 600rpx;
margin-top: 40rpx;
font-size: 32rpx !important;
}
.agreement{
position: absolute;
bottom: 0;
left: 0;
width: 100%;
display: flex; display: flex;
justify-content: center; flex-direction: column;
color: #444; align-items: center;
image{ padding-top: 10vh;
width: 40rpx; position: relative;
height: 40rpx;
margin-right: 10rpx; .logo {
height: 152rpx;
width: 152rpx;
}
.tips {
color: #444444;
font-size: 28rpx;
margin: 30rpx 0;
}
.btn {
width: 600rpx;
margin-top: 40rpx;
font-size: 32rpx !important;
}
.form {
.input {
background-color: #ECFFEE;
width: 600rpx;
height: 90rpx;
box-sizing: border-box;
padding: 0 20rpx;
margin-bottom: 40rpx;
.place{
color: #333;
}
.customStyle{
color: red;
}
}
}
.agreement {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
display: flex;
justify-content: center;
color: #444;
image {
width: 40rpx;
height: 40rpx;
margin-right: 10rpx;
}
text {
color: #20B128;
}
} }
} }
} </style>
</style>

View File

@ -51,7 +51,7 @@
<up-cell-group> <up-cell-group>
<up-cell title="意见反馈" :isLink="true"></up-cell> <up-cell title="意见反馈" :isLink="true"></up-cell>
<up-cell title="关于我们" :isLink="true"></up-cell> <up-cell title="关于我们" :isLink="true"></up-cell>
<up-cell title="设置" :isLink="true" url="/pages/login/login"></up-cell> <up-cell title="退出登录" :isLink="true" url="/pages/login/login"></up-cell>
</up-cell-group> </up-cell-group>
</view> </view>
</view> </view>

View File

@ -2,15 +2,15 @@
<view class=""> <view class="">
<view class="card"> <view class="card">
<up-form labelPosition="left" :model="formData" :rules="rules" ref="uForm" labelWidth="100"> <up-form labelPosition="left" :model="formData" :rules="rules" ref="uForm" labelWidth="100">
<up-form-item label="收货人" prop="name" borderBottom> <up-form-item label="收货人" prop="real_name" borderBottom>
<up-input v-model="formData.name" disabledColor="#ffffff" border="none" placeholder="请填写收货人姓名"></up-input> <up-input v-model="formData.real_name" disabledColor="#ffffff" border="none" placeholder="请填写收货人姓名"></up-input>
</up-form-item> </up-form-item>
<up-form-item label="联系电话" prop="phone" borderBottom> <up-form-item label="联系电话" prop="phone" borderBottom>
<up-input v-model="formData.phone" disabledColor="#ffffff" type="number" placeholder="请填写联系电话" <up-input v-model="formData.phone" disabledColor="#ffffff" type="number" placeholder="请填写联系电话"
border="none"></up-input> border="none"></up-input>
</up-form-item> </up-form-item>
<up-form-item label="详细地址" prop="address" borderBottom> <up-form-item label="详细地址" prop="detail" borderBottom>
<up-input v-model="formData.address" disabledColor="#ffffff" placeholder="请填写详细地址" border="none"></up-input> <up-input v-model="formData.detail" disabledColor="#ffffff" placeholder="请填写详细地址" border="none"></up-input>
</up-form-item> </up-form-item>
</up-form> </up-form>
</view> </view>
@ -29,24 +29,40 @@
<script setup> <script setup>
import { onLoad } from "@dcloudio/uni-app" import { onLoad } from "@dcloudio/uni-app"
import { ref } from "vue" import { ref } from "vue"
import { addressCreateApi, addressEditApi } from "@/api/user.js"
const mode = ref('add'); const mode = ref('add');
const formData = ref({ const formData = ref({
name: '', real_name: '',
phone: '', phone: '',
address: '', detail: '',
isDefault: false isDefault: false
}) })
const rules = ref({ const rules = ref({
name: [{ required: true, message: '请输入姓名', trigger: ['blur'] }], real_name: [{ required: true, message: '请输入姓名', trigger: ['blur'] }],
phone: [{ required: true, message: '请输入手机号', trigger: ['blur'] }], phone: [{ required: true, message: '请输入手机号', trigger: ['blur'] }],
address: [{ required: true, message: '请输入地址', trigger: ['blur'] }] detail: [{ required: true, message: '请输入地址', trigger: ['blur'] }]
}) })
const uForm = ref(null); const uForm = ref(null);
const submit = () => { const submit = () => {
uForm.value.validate().then(() => { uForm.value.validate().then(() => {
console.log('验证通过'); console.log('验证通过');
if(mode.value=='add'){
addressCreateApi(formData.value).then(res=>{
uni.$u.toast(res.msg);
uni.$u.sleep(800).then(res=>{
uni.navigateBack();
})
})
} else {
addressEditApi(formData.value).then(res=>{
uni.$u.toast(res.msg);
uni.$u.sleep(800).then(res=>{
uni.navigateBack();
})
})
}
}).catch(() => { }).catch(() => {
console.log('验证失败'); console.log('验证失败');
}) })

View File

@ -1,13 +1,13 @@
<template> <template>
<view class="list"> <view class="list">
<view class="address-card" v-for="(item, index) in 3" :key="index"> <view class="address-card" v-for="(item, index) in addressList" :key="index">
<view class="address-info"> <view class="address-info">
<view class="top"> <view class="top">
<view class="name">收货人小李</view> <view class="name">收货人{{item.real_name}}</view>
<view class="phone">14566666666</view> <view class="phone">{{item.phone}}</view>
</view> </view>
<view class="bottom"> <view class="bottom">
四川泸州市龙马潭区莲花池街道商业街1号 {{item.detail}}
</view> </view>
</view> </view>
<view class="btn-box"> <view class="btn-box">
@ -39,6 +39,7 @@
<script setup> <script setup>
import { ref } from "vue" import { ref } from "vue"
import modal from "@/components/modal.vue"; import modal from "@/components/modal.vue";
import { addressListsApi } from "@/api/user.js"
const navTo = (url)=>{ const navTo = (url)=>{
uni.navigateTo({ uni.navigateTo({
@ -58,6 +59,16 @@ const deleteAddress = ()=>{
show.value = false; show.value = false;
} }
const addressList = ref([]);
const getAddressLists = ()=>{
addressListsApi().then(res=>{
addressList.value = res.data.lists;
console.log(addressList);
})
}
getAddressLists();
</script> </script>
<style lang="scss"> <style lang="scss">
@ -71,7 +82,7 @@ const deleteAddress = ()=>{
.address-info { .address-info {
padding-bottom: 20rpx; padding-bottom: 20rpx;
border-bottom: 1rpx solid #eee; border-bottom: 1rpx solid #f6f6f6;
margin-bottom: 20rpx; margin-bottom: 20rpx;
.top { .top {

View File

@ -70,7 +70,7 @@
</view> </view>
<view style="width: 100%;height: 200rpx;"></view> <view style="width: 100%;height: 200rpx;"></view>
<view class="btn-box"> <view class="fiexd-btn-box">
<view style="color: #777777;" @click="showCancel=true">取消订单</view> <view style="color: #777777;" @click="showCancel=true">取消订单</view>
<view style="width: 450rpx;"> <view style="width: 450rpx;">
<up-button color="#20B128" shape="circle">立即支付 ¥50.00</up-button> <up-button color="#20B128" shape="circle">立即支付 ¥50.00</up-button>
@ -245,28 +245,6 @@
} }
} }
.btn-box {
position: fixed;
bottom: 0;
left: 0;
height: 120rpx;
height: calc(constant(safe-area-inset-bottom) + 120rpx);
/* 适用于iOS设备 */
height: calc(env(safe-area-inset-bottom) + 120rpx);
/* 适用于Android设备 */
width: 100%;
box-sizing: border-box;
background-color: #fff;
padding: 20rpx;
padding-bottom: calc(constant(safe-area-inset-bottom) + 20rpx);
/* 适用于iOS设备 */
padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
/* 适用于Android设备 */
display: flex;
justify-content: space-between;
align-items: center;
}
.cancel-popup { .cancel-popup {
padding: 30rpx; padding: 30rpx;

View File

@ -0,0 +1,282 @@
<template>
<view class="">
<view v-if="!isAddress" class="m-card row">
<up-cell-group>
<up-cell title="我的地址" :isLink="true" :border="false" @click="showAddress=true"></up-cell>
</up-cell-group>
</view>
<view v-else class="m-card m-address">
<view class="address-info">
<view class="top">
<up-icon name="map"></up-icon>
<view class="t-name">小王</view>
<view>155****9999</view>
</view>
<view class="bottom u-line-2">
四川泸州市龙马潭区莲花池街道商业街1号
</view>
</view>
<view class="address-btn">
<view style="width: 80px;"><up-button @click="showAddress = true" size="small" shape="circle" color="#f6f6f6"
:customStyle="{color:'#666666'}">修改</up-button></view>
</view>
</view>
<view class="m-card row">
<up-cell-group>
<up-cell title="请添加自提点" :isLink="true" :border="false"></up-cell>
</up-cell-group>
</view>
<view class="m-card m-good">
<image class="image" src="../../static/logo.png"></image>
<view class="body-content">
<view>
<view class="title">
<view>黄牛肉20kg</view>
<view>¥10.00</view>
</view>
<view class="tips">
<view>我不吃牛肉</view>
<view>x5</view>
</view>
</view>
<view class="time">
预计48小时发货
</view>
</view>
</view>
<view class="m-card good-info">
<view class="head-title">价格明细</view>
<view class="row">
<view>商品总价 <text>共计5件商品</text></view>
<view><text>¥</text>50<text>.00</text></view>
</view>
<view class="row">
<view>运费</view>
<view><text>¥</text>0<text>.00</text></view>
</view>
</view>
<view class="m-card good-info">
<view class="head-title">支付方式</view>
<view class="row">
<view class="icon-text"><up-icon name="weixin-circle-fill" color="#20b128" size="22"
style="margin-right: 10rpx;"></up-icon> </view>
<view class="icon">
<image v-if="true" src="@/static/icon/check.png"></image>
<image v-else src="@/static/icon/n-check.png"></image>
</view>
</view>
</view>
<view class="m-card order-remark">
<view class="head-title">
<text>订单备注</text>
<text>0/200</text>
</view>
<up-textarea style="background-color: #F6F6F6;" v-model="formData.remark" placeholder="暂无备注内容"
:height="100"></up-textarea>
</view>
<view class="fiexd-btn-box">
<view class="tips">
<view style="margin-right: 20rpx;">80共500件</view>
<view class="all">
<text style="color: #000;">合计: </text>
<text></text>
<text style="font-size: 32rpx;font-weight: bold;">5620</text>
<text>.26</text>
</view>
</view>
<view style="width: 200rpx;">
<up-button color="#20B128" shape="circle" @click="submitOrder">提交订单</up-button>
</view>
</view>
<addressPopup :show="showAddress" @close="showAddress=false" @change="changeAddress" />
<modal title="尚未设置收货地址" content="您还没有添加收货地址,请点击添加" cancleText="添加地址" confirmText="继续支付" :show="toastAddressShow"
@close="addAddress" @change="goPay" />
</view>
</template>
<script setup>
import { nextTick, ref } from "vue"
import addressPopup from "@/components/addressPopup.vue";
import modal from "@/components/modal.vue"
const formData = ref({
remark: ""
})
const isAddress = ref(false);
const toastAddressShow = ref(false);
//
const showAddress = ref(false);
const changeAddress = (e) => {
showAddress.value = false;
isAddress.value = true;
console.log(e);
}
//
const addAddress = () => {
toastAddressShow.value = false;
nextTick(()=>{
showAddress.value = true;
})
}
//
const goPay = ()=>{
toastAddressShow.value = false;
isAddress.value = true;
submitOrder();
}
//
const submitOrder = () => {
if (!isAddress.value) return toastAddressShow.value = true;
uni.$u.toast('支付成功')
}
</script>
<style lang="scss">
.m-card {
margin: 20rpx;
border-radius: 14rpx;
background-color: #fff;
padding: 20rpx;
}
.row {
padding: 0;
overflow: hidden;
}
.m-address {
margin-bottom: 20rpx;
display: flex;
justify-content: space-between;
color: #999999;
.address-info {
width: 510rpx;
.top {
display: flex;
font-size: 28rpx;
.t-name {
color: #444;
margin: 0 10rpx;
}
}
.bottom {
font-size: 24rpx;
}
}
}
.m-good {
display: flex;
justify-content: space-between;
margin-bottom: 20rpx;
.image {
width: 160rpx;
height: 160rpx;
margin-right: 20rpx;
}
.body-content {
width: 490rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
color: #989898;
.title {
display: flex;
justify-content: space-between;
font-size: 28rpx;
color: #444;
}
.tips {
display: flex;
justify-content: space-between;
font-size: 24rpx;
margin-top: 10rpx;
}
.time {
background-color: #F6F6F6;
padding: 5rpx 10rpx;
font-size: 26rpx;
color: #444;
border-radius: 10rpx;
}
}
}
.good-info {
margin-bottom: 20rpx;
.head-title {
margin-bottom: 18rpx;
color: #000;
font-weight: bold;
}
.row {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 18rpx;
.red {
color: #F55726;
}
.icon-text {
display: flex;
}
.icon {
image {
width: 40rpx;
height: 40rpx;
}
}
}
.row-need {
display: flex;
justify-content: flex-end;
color: #F55726;
}
text {
font-size: 22rpx;
}
}
.order-remark {
.head-title {
margin-bottom: 18rpx;
display: flex;
justify-content: space-between;
}
}
.tips {
font-size: 28rpx;
color: #999;
display: flex;
justify-content: flex-end;
align-items: center;
flex: 1;
margin-right: 20rpx;
.all {
color: #F55726;
}
}
</style>

View File

@ -13,11 +13,19 @@ const useUserStore = defineStore("user", () => {
uni.setStorageSync('userInfo', data) uni.setStorageSync('userInfo', data)
} }
userInfo.value = {
"nickname": "哈哈",
"mobile": "17685151643",
"avatar": "https://lihaiim.oss-cn-chengdu.aliyuncs.com/image/admin/avatar.png",
"token": "a8670fe7f1014c0f5125f6ca0c3b9cb3"
}
const token = ref(uni.getStorageSync('token')||''); const token = ref(uni.getStorageSync('token')||'');
const setToken = (data) => { const setToken = (data) => {
token.value = data; token.value = data;
uni.setStorageSync('token', data) uni.setStorageSync('token', data)
} }
token.value = "a8670fe7f1014c0f5125f6ca0c3b9cb3"
return { userInfo, setToken, token, setToken } return { userInfo, setToken, token, setToken }
}) })

View File

@ -234,7 +234,7 @@
@import "../../libs/css/components.scss"; @import "../../libs/css/components.scss";
.u-wrap { .u-wrap {
background-color: #eee; background-color: #f6f6f6;
overflow: hidden; overflow: hidden;
} }

View File

@ -67,7 +67,7 @@ import { addStyle, addUnit, sleep } from '../../libs/function/index';
* @property {String} mode 模式选择mode=button为按钮形式mode=subsection时为分段模式默认 'button' * @property {String} mode 模式选择mode=button为按钮形式mode=subsection时为分段模式默认 'button'
* @property {String Number} fontSize 字体大小单位px默认 12 * @property {String Number} fontSize 字体大小单位px默认 12
* @property {Boolean} bold 激活选项的字体是否加粗默认 true * @property {Boolean} bold 激活选项的字体是否加粗默认 true
* @property {String} bgColor 组件背景颜色mode为button时有效默认 '#eeeeef' * @property {String} bgColor 组件背景颜色mode为button时有效默认 '#f6f6f6eef'
* @property {Object} customStyle 定义需要用到的外部样式 * @property {Object} customStyle 定义需要用到的外部样式
* @property {String} keyName `list`元素对象中读取的键名默认 'name' * @property {String} keyName `list`元素对象中读取的键名默认 'name'
* *

View File

@ -59,7 +59,7 @@
* @property {Object} customStyle 定义需要用到的外部样式 * @property {Object} customStyle 定义需要用到的外部样式
* *
* @event {Function} change 在switch打开或关闭时触发 * @event {Function} change 在switch打开或关闭时触发
* @example <u-switch v-model="checked" active-color="red" inactive-color="#eee"></u-switch> * @example <u-switch v-model="checked" active-color="red" inactive-color="#f6f6f6"></u-switch>
*/ */
export default { export default {
name: "u-switch", name: "u-switch",

View File

@ -17,7 +17,7 @@ export default {
mode: 'button', mode: 'button',
fontSize: 12, fontSize: 12,
bold: true, bold: true,
bgColor: '#eeeeef', bgColor: '#f6f6f6eef',
keyName: 'name' keyName: 'name'
} }
} }

View File

@ -38,7 +38,7 @@ declare interface SubsectionProps {
bold?: boolean bold?: boolean
/** /**
* `mode``button` * `mode``button`
* @default "#eeeeef" * @default "#f6f6f6eef"
*/ */
bgColor?: string bgColor?: string
/** /**

View File

@ -126,6 +126,7 @@ if (!Math) {
"./pagesOrder/detail/detail.js"; "./pagesOrder/detail/detail.js";
"./pagesOrder/addressList/addressList.js"; "./pagesOrder/addressList/addressList.js";
"./pagesOrder/addressEdit/addressEdit.js"; "./pagesOrder/addressEdit/addressEdit.js";
"./pagesOrder/settle/settle.js";
} }
const _sfc_main = { const _sfc_main = {
onLaunch: function() { onLaunch: function() {

View File

@ -12,7 +12,8 @@
"order/order", "order/order",
"detail/detail", "detail/detail",
"addressList/addressList", "addressList/addressList",
"addressEdit/addressEdit" "addressEdit/addressEdit",
"settle/settle"
] ]
} }
], ],

View File

@ -3059,5 +3059,26 @@
} }
page { page {
font-size: 26rpx; font-size: 26rpx;
background-color: #eee; background-color: #f6f6f6;
}
.fiexd-btn-box {
position: fixed;
bottom: 0;
left: 0;
height: 120rpx;
height: calc(constant(safe-area-inset-bottom) + 120rpx);
/* 适用于iOS设备 */
height: calc(env(safe-area-inset-bottom) + 120rpx);
/* 适用于Android设备 */
width: 100%;
box-sizing: border-box;
background-color: #fff;
padding: 20rpx;
padding-bottom: calc(constant(safe-area-inset-bottom) + 20rpx);
/* 适用于iOS设备 */
padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
/* 适用于Android设备 */
display: flex;
justify-content: space-between;
align-items: center;
}page{--status-bar-height:25px;--top-window-height:0px;--window-top:0px;--window-bottom:0px;--window-left:0px;--window-right:0px;--window-magin:0px}[data-c-h="true"]{display: none !important;} }page{--status-bar-height:25px;--top-window-height:0px;--window-top:0px;--window-bottom:0px;--window-left:0px;--window-right:0px;--window-magin:0px}[data-c-h="true"]{display: none !important;}

View File

@ -7710,6 +7710,7 @@ exports.nextTick$1 = nextTick$1;
exports.o = o; exports.o = o;
exports.onLoad = onLoad; exports.onLoad = onLoad;
exports.p = p; exports.p = p;
exports.reactive = reactive;
exports.ref = ref; exports.ref = ref;
exports.resolveComponent = resolveComponent; exports.resolveComponent = resolveComponent;
exports.s = s; exports.s = s;

View File

@ -55,7 +55,7 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding-bottom: 20rpx; padding-bottom: 20rpx;
border-bottom: 1rpx solid #eee; border-bottom: 1rpx solid #f6f6f6;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.address-popup .row.data-v-dc6b9753:last-child { .address-popup .row.data-v-dc6b9753:last-child {

View File

@ -62,7 +62,8 @@ const _sfc_main = {
j: common_vendor.p({ j: common_vendor.p({
show: __props.show, show: __props.show,
round: "10", round: "10",
mode: "center" mode: "center",
safeAreaInsetBottom: false
}) })
}; };
}; };

View File

@ -1 +1 @@
<up-popup wx:if="{{j}}" class="data-v-b2596e17" u-s="{{['d']}}" bindclose="{{i}}" u-i="b2596e17-0" bind:__l="__l" u-p="{{j}}"><view class="modal-popup data-v-b2596e17"><view class="head-title data-v-b2596e17">{{a}}</view><view class="content data-v-b2596e17">{{b}}</view><view class="btn-box data-v-b2596e17"><view class="data-v-b2596e17" style="width:230rpx"><up-button wx:if="{{e}}" class="data-v-b2596e17" u-s="{{['d']}}" bindclick="{{d}}" u-i="b2596e17-1,b2596e17-0" bind:__l="__l" u-p="{{e}}">{{c}}</up-button></view><view class="data-v-b2596e17" style="width:230rpx"><up-button wx:if="{{h}}" class="data-v-b2596e17" u-s="{{['d']}}" bindclick="{{g}}" u-i="b2596e17-2,b2596e17-0" bind:__l="__l" u-p="{{h}}">{{f}}</up-button></view></view></view></up-popup> <up-popup wx:if="{{j}}" class="data-v-b2596e17" u-s="{{['d']}}" bindclose="{{i}}" u-i="b2596e17-0" bind:__l="__l" u-p="{{j}}"><view class="m-modal-popup data-v-b2596e17"><view class="head-title-modal data-v-b2596e17">{{a}}</view><view class="content-modal data-v-b2596e17">{{b}}</view><view class="btn-box-modal data-v-b2596e17"><view class="data-v-b2596e17" style="width:230rpx"><up-button wx:if="{{e}}" class="data-v-b2596e17" u-s="{{['d']}}" bindclick="{{d}}" u-i="b2596e17-1,b2596e17-0" bind:__l="__l" u-p="{{e}}">{{c}}</up-button></view><view class="data-v-b2596e17" style="width:230rpx"><up-button wx:if="{{h}}" class="data-v-b2596e17" u-s="{{['d']}}" bindclick="{{g}}" u-i="b2596e17-2,b2596e17-0" bind:__l="__l" u-p="{{h}}">{{f}}</up-button></view></view></view></up-popup>

View File

@ -23,21 +23,21 @@
/* 垂直间距 */ /* 垂直间距 */
/* 透明度 */ /* 透明度 */
/* 文章场景相关 */ /* 文章场景相关 */
.modal-popup.data-v-b2596e17 { .m-modal-popup.data-v-b2596e17 {
width: 500rpx; width: 500rpx;
padding: 40rpx; padding: 40rpx;
} }
.modal-popup .head-title.data-v-b2596e17 { .m-modal-popup .head-title-modal.data-v-b2596e17 {
font-size: 32rpx; font-size: 32rpx;
text-align: center; text-align: center;
} }
.modal-popup .content.data-v-b2596e17 { .m-modal-popup .content-modal.data-v-b2596e17 {
font-size: 26rpx; font-size: 26rpx;
color: #999; color: #999;
text-align: center; text-align: center;
padding: 40rpx 0; padding: 40rpx 0;
} }
.modal-popup .btn-box.data-v-b2596e17 { .m-modal-popup .btn-box-modal.data-v-b2596e17 {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }

View File

@ -40,7 +40,7 @@
height: 80rpx; height: 80rpx;
background-color: #fff; background-color: #fff;
border-radius: 0 0 28rpx 28rpx; border-radius: 0 0 28rpx 28rpx;
border-top: 1rpx solid #eee; border-top: 1rpx solid #f6f6f6;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;

View File

@ -1,6 +1,10 @@
"use strict"; "use strict";
const common_vendor = require("../../common/vendor.js"); const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js"); const common_assets = require("../../common/assets.js");
const api_cart = require("../../api/cart.js");
require("../../utils/request.js");
require("../../config/app.js");
require("../../store/user.js");
if (!Array) { if (!Array) {
const _easycom_up_navbar2 = common_vendor.resolveComponent("up-navbar"); const _easycom_up_navbar2 = common_vendor.resolveComponent("up-navbar");
const _easycom_u__icon2 = common_vendor.resolveComponent("u--icon"); const _easycom_u__icon2 = common_vendor.resolveComponent("u--icon");
@ -32,7 +36,17 @@ const _sfc_main = {
tabsActive.value = current; tabsActive.value = current;
}; };
const settleAccounts = () => { const settleAccounts = () => {
common_vendor.index.navigateTo({
url: "/pagesOrder/settle/settle"
});
}; };
common_vendor.ref([]);
const getcartList = () => {
api_cart.cartListApi().then((res) => {
console.log(res);
});
};
getcartList();
return (_ctx, _cache) => { return (_ctx, _cache) => {
return common_vendor.e({ return common_vendor.e({
a: common_vendor.f(list.value, (item, index, i0) => { a: common_vendor.f(list.value, (item, index, i0) => {

View File

@ -1 +1 @@
<view><up-navbar wx:if="{{b}}" u-s="{{['left']}}" u-i="da603134-0" bind:__l="__l" u-p="{{b}}"><view style="display:flex" slot="left"><view wx:for="{{a}}" wx:for-item="item" wx:key="c" class="{{['tabs', item.b && 'tabs-active']}}" bindtap="{{item.d}}">{{item.a}}</view></view></up-navbar><swiper class="swiper-box" current="{{k}}" bindanimationfinish="{{l}}"><swiper-item class="swiper-item"><scroll-view scroll-y style="height:100%;width:100%"><view class="page-box1"><view class="total"><view>共计<text style="color:#20B128">3</text>件</view><view wx:if="{{true}}">管理</view><view wx:else>完成</view></view><view wx:if="{{true}}" class="list" style="margin-top:80rpx"><view wx:for="{{c}}" wx:for-item="item" wx:key="f" class="shop-item"><view class="shop-check"><image wx:if="{{item.a}}" src="{{item.b}}"></image><image wx:else src="{{item.c}}"></image></view><image class="shop-img" src="https://cdn.uviewui.com/uview/album/1.jpg"></image><view class="shop-content"><view class="title"><view class="name u-line-2">好吃的瓜果</view><view class="tip u-line-1">香味辛辣|葱香味浓|调味增香香味辛辣|葱香味浓|调味增香</view></view><view class="price-btn"><view class="price">¥12.00</view><view class="btn"><u--icon wx:if="{{d}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{d}}"></u--icon><view class="num">{{e}}</view><u--icon wx:if="{{f}}" u-i="{{item.e}}" bind:__l="__l" u-p="{{f}}"></u--icon></view></view></view></view></view><view wx:else style="margin-top:100rpx"><up-empty wx:if="{{g}}" u-i="da603134-3" bind:__l="__l" u-p="{{g}}"></up-empty></view><view style="width:100%;height:200rpx"></view></view></scroll-view></swiper-item><swiper-item class="swiper-item"><scroll-view scroll-y style="height:100%;width:100%"><view class="page-box1"><view wx:if="{{true}}" class="list"><view wx:for="{{h}}" wx:for-item="item" wx:key="b" class="shop-item"><image class="shop-img" src="https://cdn.uviewui.com/uview/album/1.jpg"></image><view class="shop-content" style="width:490rpx"><view class="title"><view class="name u-line-2">好吃的瓜果</view><view class="tip u-line-1">香味辛辣|葱香味浓|调味增香香味辛辣|葱香味浓|调味增香</view></view><view class="price-btn"><view class="price">¥12.00</view><view class="btn"><up-button wx:if="{{i}}" u-s="{{['d']}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{i}}">加入购物车</up-button></view></view></view></view></view><view wx:else style="margin-top:100rpx"><up-empty wx:if="{{j}}" u-i="da603134-5" bind:__l="__l" u-p="{{j}}"></up-empty></view><view style="width:100%;height:200rpx"></view></view></scroll-view></swiper-item></swiper><up-transition wx:if="{{r}}" u-s="{{['d']}}" u-i="da603134-6" bind:__l="__l" u-p="{{r}}"><view class="cart-btn"><view class="cart-check"><image wx:if="{{false}}" src="{{m}}"></image><image wx:else src="{{n}}"></image><text style="font-size:24rpx">全选</text></view><view wx:if="{{true}}" class="btn-box"><view class="all-price"><view style="width:80rpx">合计:</view><view class="price"><text style="font-size:24rpx">¥</text><text style="font-size:34rpx">20</text><text style="font-size:24rpx">.30</text></view></view><up-button wx:if="{{p}}" u-s="{{['d']}}" bindclick="{{o}}" u-i="da603134-7,da603134-6" bind:__l="__l" u-p="{{p}}">去结算<text>(2)</text></up-button></view><view wx:else class="btn-box"><view style="width:80px"><up-button wx:if="{{q}}" u-s="{{['d']}}" u-i="da603134-8,da603134-6" bind:__l="__l" u-p="{{q}}">删除</up-button></view></view></view></up-transition></view> <view><up-navbar wx:if="{{b}}" u-s="{{['left']}}" u-i="da603134-0" bind:__l="__l" u-p="{{b}}"><view style="display:flex" slot="left"><view wx:for="{{a}}" wx:for-item="item" wx:key="c" class="{{['tabs', item.b && 'tabs-active']}}" bindtap="{{item.d}}">{{item.a}}</view></view></up-navbar><swiper class="swiper-box" current="{{k}}" bindanimationfinish="{{l}}"><swiper-item class="swiper-item"><scroll-view scroll-y style="height:100%;width:100%"><view class="page-box1"><view class="total"><view>共计<text style="color:#20B128">3</text>件</view><view wx:if="{{true}}">管理</view><view wx:else>完成</view></view><view wx:if="{{true}}" class="list" style="margin-top:80rpx"><view wx:for="{{c}}" wx:for-item="item" wx:key="f" class="shop-item"><view class="shop-check"><image wx:if="{{item.a}}" src="{{item.b}}"></image><image wx:else src="{{item.c}}"></image></view><image class="shop-img" src="https://cdn.uviewui.com/uview/album/1.jpg"></image><view class="shop-content"><view class="title"><view class="name u-line-2">好吃的瓜果</view><view class="tip u-line-1">香味辛辣|葱香味浓|调味增香香味辛辣|葱香味浓|调味增香</view></view><view class="price-btn"><view class="price">¥12.00</view><view class="btn"><u--icon wx:if="{{d}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{d}}"></u--icon><view class="num">{{e}}</view><u--icon wx:if="{{f}}" u-i="{{item.e}}" bind:__l="__l" u-p="{{f}}"></u--icon></view></view></view></view></view><view wx:else style="margin-top:100rpx"><up-empty wx:if="{{g}}" u-i="da603134-3" bind:__l="__l" u-p="{{g}}"></up-empty></view><view style="width:100%;height:200rpx"></view></view></scroll-view></swiper-item><swiper-item class="swiper-item"><scroll-view scroll-y style="height:100%;width:100%"><view class="page-box1"><view wx:if="{{true}}" class="list"><view wx:for="{{h}}" wx:for-item="item" wx:key="b" class="shop-item"><image class="shop-img" src="https://cdn.uviewui.com/uview/album/1.jpg"></image><view class="shop-content" style="width:490rpx"><view class="title"><view class="name u-line-2">好吃的瓜果</view><view class="tip u-line-1">香味辛辣|葱香味浓|调味增香香味辛辣|葱香味浓|调味增香</view></view><view class="price-btn"><view class="price">¥12.00</view><view class="btn"><up-button wx:if="{{i}}" u-s="{{['d']}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{i}}">加入购物车</up-button></view></view></view></view></view><view wx:else style="margin-top:100rpx"><up-empty wx:if="{{j}}" u-i="da603134-5" bind:__l="__l" u-p="{{j}}"></up-empty></view><view style="width:100%;height:200rpx"></view></view></scroll-view></swiper-item></swiper><up-transition wx:if="{{r}}" u-s="{{['d']}}" u-i="da603134-6" bind:__l="__l" u-p="{{r}}"><view class="cart-btn"><view class="cart-check"><image wx:if="{{false}}" src="{{m}}"></image><image wx:else src="{{n}}"></image><text style="font-size:24rpx">全选</text></view><view wx:if="{{true}}" class="btn-boxs"><view class="all-price"><view style="width:80rpx">合计:</view><view class="price"><text style="font-size:24rpx">¥</text><text style="font-size:34rpx">20</text><text style="font-size:24rpx">.30</text></view></view><up-button wx:if="{{p}}" u-s="{{['d']}}" bindclick="{{o}}" u-i="da603134-7,da603134-6" bind:__l="__l" u-p="{{p}}">去结算<text>(2)</text></up-button></view><view wx:else class="btn-boxs"><view style="width:80px"><up-button wx:if="{{q}}" u-s="{{['d']}}" u-i="da603134-8,da603134-6" bind:__l="__l" u-p="{{q}}">删除</up-button></view></view></view></up-transition></view>

View File

@ -51,7 +51,7 @@
top: var(--window-top); top: var(--window-top);
left: 0; left: 0;
right: 0; right: 0;
background-color: #eee; background-color: #f6f6f6;
z-index: 100; z-index: 100;
height: 60rpx; height: 60rpx;
line-height: 60rpx; line-height: 60rpx;
@ -65,7 +65,7 @@
} }
.page-box1 .list .shop-item { .page-box1 .list .shop-item {
padding: 20rpx; padding: 20rpx;
border-bottom: 1rpx solid #eee; border-bottom: 1rpx solid #f6f6f6;
background-color: #fff; background-color: #fff;
display: flex; display: flex;
} }
@ -139,15 +139,15 @@
height: 40rpx; height: 40rpx;
margin: 0 10rpx; margin: 0 10rpx;
} }
.cart-btn .btn-box { .cart-btn .btn-boxs {
display: flex; display: flex;
} }
.cart-btn .btn-box .all-price { .cart-btn .btn-boxs .all-price {
display: flex; display: flex;
align-items: center; align-items: center;
margin-right: 20rpx; margin-right: 20rpx;
} }
.cart-btn .btn-box .all-price .price { .cart-btn .btn-boxs .all-price .price {
color: #20B128; color: #20B128;
display: table-cell; display: table-cell;
vertical-align: bottom; vertical-align: bottom;

View File

@ -1,18 +1,27 @@
"use strict"; "use strict";
const common_vendor = require("../../common/vendor.js"); const common_vendor = require("../../common/vendor.js");
const api_good = require("../../api/good.js");
const api_cart = require("../../api/cart.js");
require("../../utils/request.js");
require("../../config/app.js");
require("../../store/user.js");
if (!Array) { if (!Array) {
const _easycom_up_search2 = common_vendor.resolveComponent("up-search"); const _easycom_up_search2 = common_vendor.resolveComponent("up-search");
const _easycom_up_navbar2 = common_vendor.resolveComponent("up-navbar"); const _easycom_up_navbar2 = common_vendor.resolveComponent("up-navbar");
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon"); const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
const _easycom_u__icon2 = common_vendor.resolveComponent("u--icon"); const _easycom_u__icon2 = common_vendor.resolveComponent("u--icon");
(_easycom_up_search2 + _easycom_up_navbar2 + _easycom_up_icon2 + _easycom_u__icon2)(); const _easycom_up_transition2 = common_vendor.resolveComponent("up-transition");
(_easycom_up_search2 + _easycom_up_navbar2 + _easycom_up_image2 + _easycom_up_icon2 + _easycom_u__icon2 + _easycom_up_transition2)();
} }
const _easycom_up_search = () => "../../uni_modules/uview-plus/components/u-search/u-search.js"; const _easycom_up_search = () => "../../uni_modules/uview-plus/components/u-search/u-search.js";
const _easycom_up_navbar = () => "../../uni_modules/uview-plus/components/u-navbar/u-navbar.js"; const _easycom_up_navbar = () => "../../uni_modules/uview-plus/components/u-navbar/u-navbar.js";
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js"; const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
const _easycom_u__icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js"; const _easycom_u__icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
const _easycom_up_transition = () => "../../uni_modules/uview-plus/components/u-transition/u-transition.js";
if (!Math) { if (!Math) {
(_easycom_up_search + _easycom_up_navbar + _easycom_up_icon + viewPopup + _easycom_u__icon)(); (_easycom_up_search + _easycom_up_navbar + _easycom_up_image + _easycom_up_icon + viewPopup + _easycom_u__icon + _easycom_up_transition)();
} }
const viewPopup = () => "../../components/viewPopup.js"; const viewPopup = () => "../../components/viewPopup.js";
const _sfc_main = { const _sfc_main = {
@ -21,22 +30,55 @@ const _sfc_main = {
const show = common_vendor.ref(0); const show = common_vendor.ref(0);
const topActive = common_vendor.ref(0); const topActive = common_vendor.ref(0);
const changeOne = (item, index) => { const changeOne = (item, index) => {
var _a, _b, _c;
console.log("选择", item, index); console.log("选择", item, index);
topActive.value = index; topActive.value = item.id;
show.value = 0; show.value = 0;
goodClassTow.value = (item == null ? void 0 : item.children) || [];
goodClassThree.value = ((_a = goodClassTow.value[0]) == null ? void 0 : _a.children) || [];
leftActive.value = (_b = goodClassTow.value[0]) == null ? void 0 : _b.id;
rightActive.value = (_c = goodClassThree.value[0]) == null ? void 0 : _c.id;
}; };
const leftActive = common_vendor.ref(2); const leftActive = common_vendor.ref(0);
const changeTwo = (item, index) => { const changeTwo = (item, index) => {
var _a;
console.log("选择", item, index); console.log("选择", item, index);
leftActive.value = index; leftActive.value = item.id;
show.value = 0; show.value = 0;
goodClassThree.value = (item == null ? void 0 : item.children) || [];
rightActive.value = (_a = goodClassThree.value[0]) == null ? void 0 : _a.id;
}; };
const rightActive = common_vendor.ref(1); const rightActive = common_vendor.ref(0);
const changeThree = (item, index) => { const changeThree = (item, index) => {
console.log("选择", item, index); console.log("选择", item, index);
rightActive.value = index; rightActive.value = item.id;
show.value = 0; show.value = 0;
}; };
const cartList = common_vendor.reactive(/* @__PURE__ */ new Map());
const addCart = (id) => {
api_cart.cartCreateApi({
cart_num: 1,
is_new: 0,
// 是否直接购买0否1是
goods_id: id
}).then((res) => {
console.log(res);
let now = cartList.get(id) || 0;
cartList.set(id, now + 1);
});
};
const removeCart = (id) => {
let num = cartList.get(id) || 0;
if (num == 0)
return;
api_cart.cartChangeApi({
goods_id: id,
cart_num: num--
}).then((res) => {
console.log(res);
cartList.set(id, num);
});
};
const keyword = common_vendor.ref(""); const keyword = common_vendor.ref("");
const searchKeyword = () => { const searchKeyword = () => {
console.log("搜索", keyword.value); console.log("搜索", keyword.value);
@ -48,18 +90,37 @@ const _sfc_main = {
}; };
const where = common_vendor.ref({ const where = common_vendor.ref({
page: 1, page: 1,
pageSize: 15, pageSize: 25,
keyword: "", keyword: "",
order: "" order: ""
}); });
const loading = common_vendor.ref(true); const loading = common_vendor.ref(true);
const goodList = common_vendor.ref([]);
const getGoodList = () => { const getGoodList = () => {
loading.value = true; loading.value = true;
setTimeout(() => { api_good.goodListApi(where.value).then((res) => {
loading.value = false; goodList.value = [...goodList.value, ...res.data.lists];
}, 3e3); });
};
const loadMoreGood = () => {
console.log("触底了");
};
const goodClassList = common_vendor.ref([]);
const goodClassTow = common_vendor.ref([]);
const goodClassThree = common_vendor.ref([]);
const getgoodClassList = () => {
api_good.goodClassListApi().then((res) => {
var _a, _b, _c, _d, _e, _f;
goodClassList.value = ((_a = res.data) == null ? void 0 : _a.lists) || [];
goodClassTow.value = ((_b = goodClassList.value[0]) == null ? void 0 : _b.children) || [];
goodClassThree.value = ((_c = goodClassTow.value[0]) == null ? void 0 : _c.children) || [];
topActive.value = (_d = goodClassList.value[0]) == null ? void 0 : _d.id;
leftActive.value = (_e = goodClassTow.value[0]) == null ? void 0 : _e.id;
rightActive.value = (_f = goodClassThree.value[0]) == null ? void 0 : _f.id;
});
}; };
common_vendor.onLoad(() => { common_vendor.onLoad(() => {
getgoodClassList();
getGoodList(); getGoodList();
}); });
return (_ctx, _cache) => { return (_ctx, _cache) => {
@ -74,12 +135,18 @@ const _sfc_main = {
d: common_vendor.p({ d: common_vendor.p({
placeholder: true placeholder: true
}), }),
e: common_vendor.f(10, (item, index, i0) => { e: common_vendor.f(goodClassList.value, (item, index, i0) => {
return { return {
a: common_vendor.t(item), a: "1ba6254c-2-" + i0,
b: topActive.value == index ? 1 : "", b: common_vendor.p({
c: index, height: "100rpx",
d: common_vendor.o(($event) => changeOne(item, index), index) width: "100rpx",
src: item.pic
}),
c: common_vendor.t(item.name),
d: topActive.value == item.id ? 1 : "",
e: index,
f: common_vendor.o(($event) => changeOne(item, index), index)
}; };
}), }),
f: common_vendor.p({ f: common_vendor.p({
@ -88,12 +155,18 @@ const _sfc_main = {
g: common_vendor.o(($event) => show.value = 1), g: common_vendor.o(($event) => show.value = 1),
h: show.value === 1 h: show.value === 1
}, show.value === 1 ? { }, show.value === 1 ? {
i: common_vendor.f(10, (item, index, i0) => { i: common_vendor.f(goodClassList.value, (item, index, i0) => {
return { return {
a: common_vendor.t(item), a: "1ba6254c-5-" + i0 + ",1ba6254c-4",
b: topActive.value == index ? 1 : "", b: common_vendor.p({
c: index, height: "100rpx",
d: common_vendor.o(($event) => changeOne(item, index), index) width: "100rpx",
src: item.pic
}),
c: common_vendor.t(item.name),
d: topActive.value == item.id ? 1 : "",
e: index,
f: common_vendor.o(($event) => changeOne(item, index), index)
}; };
}), }),
j: common_vendor.o(($event) => show.value = 0), j: common_vendor.o(($event) => show.value = 0),
@ -101,19 +174,20 @@ const _sfc_main = {
nav: true nav: true
}) })
} : {}, { } : {}, {
l: common_vendor.f(20, (item, index, i0) => { l: common_vendor.f(goodClassTow.value, (item, index, i0) => {
return { return {
a: common_vendor.t(item), a: common_vendor.t(item.name),
b: leftActive.value == index ? 1 : "", b: leftActive.value == item.id ? 1 : "",
c: index, c: index,
d: common_vendor.o(($event) => changeTwo(item, index), index) d: common_vendor.o(($event) => changeTwo(item, index), index)
}; };
}), }),
m: common_vendor.f(6, (item, index, i0) => { m: common_vendor.f(goodClassThree.value, (item, index, i0) => {
return { return {
a: rightActive.value == index ? 1 : "", a: common_vendor.t(item.name),
b: index, b: rightActive.value == item.id ? 1 : "",
c: common_vendor.o(($event) => changeThree(item, index), index) c: index,
d: common_vendor.o(($event) => changeThree(item, index), index)
}; };
}), }),
n: common_vendor.p({ n: common_vendor.p({
@ -128,21 +202,43 @@ const _sfc_main = {
v: common_vendor.o(($event) => changeOrder("sales")), v: common_vendor.o(($event) => changeOrder("sales")),
w: show.value === 2 w: show.value === 2
}, show.value === 2 ? { }, show.value === 2 ? {
x: common_vendor.f(6, (item, index, i0) => { x: common_vendor.f(goodClassThree.value, (item, index, i0) => {
return { return {
a: rightActive.value == index ? 1 : "", a: common_vendor.t(item.name),
b: index, b: rightActive.value == item.id ? 1 : "",
c: common_vendor.o(($event) => changeThree(item, index), index) c: index,
d: common_vendor.o(($event) => changeThree(item, index), index)
}; };
}), }),
y: common_vendor.o(($event) => show.value = 0) y: common_vendor.o(($event) => show.value = 0)
} : {}, { } : {}, {
z: common_vendor.f(20, (item, index, i0) => { z: common_vendor.f(goodList.value, (item, index, i0) => {
return { return {
a: common_vendor.t(item), a: "1ba6254c-8-" + i0,
b: "1ba6254c-6-" + i0, b: common_vendor.p({
c: "1ba6254c-7-" + i0, width: "160rpx",
d: index height: "160rpx",
src: item.imgs
}),
c: common_vendor.t(item.name),
d: common_vendor.t(item.brand_name),
e: common_vendor.t(item.class_name),
f: common_vendor.t(item.unit_name),
g: common_vendor.t(item.sell),
h: common_vendor.o(($event) => removeCart(item.id), item.id),
i: "1ba6254c-10-" + i0 + "," + ("1ba6254c-9-" + i0),
j: "1ba6254c-9-" + i0,
k: common_vendor.p({
show: cartList.get(item.id) > 0
}),
l: common_vendor.t(cartList.get(item.id)),
m: "1ba6254c-11-" + i0,
n: common_vendor.p({
show: cartList.get(item.id) > 0
}),
o: common_vendor.o(($event) => addCart(item.id), item.id),
p: "1ba6254c-12-" + i0,
q: item.id
}; };
}), }),
A: common_vendor.p({ A: common_vendor.p({
@ -150,12 +246,12 @@ const _sfc_main = {
size: "20", size: "20",
color: "#20b128" color: "#20b128"
}), }),
B: common_vendor.t(1), B: common_vendor.p({
C: common_vendor.p({
name: "plus-circle-fill", name: "plus-circle-fill",
size: "20", size: "20",
color: "#20b128" color: "#20b128"
}) }),
C: common_vendor.o(loadMoreGood)
}); });
}; };
} }

View File

@ -5,8 +5,10 @@
"usingComponents": { "usingComponents": {
"up-search": "../../uni_modules/uview-plus/components/u-search/u-search", "up-search": "../../uni_modules/uview-plus/components/u-search/u-search",
"up-navbar": "../../uni_modules/uview-plus/components/u-navbar/u-navbar", "up-navbar": "../../uni_modules/uview-plus/components/u-navbar/u-navbar",
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image",
"up-icon": "../../uni_modules/uview-plus/components/u-icon/u-icon", "up-icon": "../../uni_modules/uview-plus/components/u-icon/u-icon",
"u--icon": "../../uni_modules/uview-plus/components/u-icon/u-icon", "u--icon": "../../uni_modules/uview-plus/components/u-icon/u-icon",
"up-transition": "../../uni_modules/uview-plus/components/u-transition/u-transition",
"view-popup": "../../components/viewPopup" "view-popup": "../../components/viewPopup"
} }
} }

View File

@ -1 +1 @@
<view class="content"><up-navbar wx:if="{{d}}" u-s="{{['left']}}" style="z-index:10080" u-i="1ba6254c-0" bind:__l="__l" u-p="{{d}}"><view style="width:500rpx" slot="left"><up-search wx:if="{{c}}" bindsearch="{{a}}" u-i="1ba6254c-1,1ba6254c-0" bind:__l="__l" bindupdateModelValue="{{b}}" u-p="{{c}}"></up-search></view></up-navbar><view style="position:relative;overflow:hidden"><scroll-view class="head-view" scroll-x><view class="list"><view wx:for="{{e}}" wx:for-item="item" wx:key="c" class="{{['item', item.b && 'item-active']}}" bindtap="{{item.d}}"><image class="c-img" src="https://cdn.uviewui.com/uview/album/1.jpg"></image><view class="c-text u-line-1">惠农生活{{item.a}}</view></view><view class="item" style="width:80rpx;height:20rpx"></view></view></scroll-view><view class="r-btn" bindtap="{{g}}"><view>全</view><view>部</view><up-icon wx:if="{{f}}" u-i="1ba6254c-2" bind:__l="__l" u-p="{{f}}"></up-icon></view></view><view-popup wx:if="{{h}}" u-s="{{['d']}}" bindclose="{{j}}" u-i="1ba6254c-3" bind:__l="__l" u-p="{{k}}"><view class="cateOne"><view class="head-title">全部分类</view><scroll-view scroll-y style="height:600rpx"><view class="list"><view wx:for="{{i}}" wx:for-item="item" wx:key="c" class="{{['item', item.b && 'item-active']}}" bindtap="{{item.d}}"><image class="c-img" src="https://cdn.uviewui.com/uview/album/1.jpg"></image><view class="c-text u-line-1">惠农生活{{item.a}}</view></view></view></scroll-view></view></view-popup><view class="scroll-box"><scroll-view class="left" scroll-y><view wx:for="{{l}}" wx:for-item="item" wx:key="c" class="{{['item', 'u-line-1', item.b && 'item-active']}}" bindtap="{{item.d}}">惠农生活{{item.a}}</view><view style="width:100%;height:200rpx"></view></scroll-view><view class="right"><view class="classify"><scroll-view style="height:90rpx" scroll-x><view class="classify-list"><view wx:for="{{m}}" wx:for-item="item" wx:key="b" class="{{['classify-list-item', 'u-line-1', item.a && 'item-active']}}" bindtap="{{item.c}}"> 牛肉 </view><view style="width:70rpx;flex-shrink:0"></view></view></scroll-view><view class="done" bindtap="{{o}}"><up-icon wx:if="{{n}}" u-i="1ba6254c-4" bind:__l="__l" u-p="{{n}}"></up-icon></view><view class="order-by"><view class="{{['item', p && 'order-active']}}" bindtap="{{q}}">综合</view><view class="{{['item', r && 'order-active']}}" bindtap="{{s}}">价格</view><view class="{{['item', t && 'order-active']}}" bindtap="{{v}}">销量</view></view></view><view-popup wx:if="{{w}}" u-s="{{['d']}}" bindclose="{{y}}" u-i="1ba6254c-5" bind:__l="__l"><view class="cateOne"><scroll-view scroll-y style="height:230rpx"><view class="classify-list"><view wx:for="{{x}}" wx:for-item="item" wx:key="b" class="{{['classify-list-item', 'u-line-1', item.a && 'item-active']}}" bindtap="{{item.c}}"> 牛肉 </view></view></scroll-view></view></view-popup><scroll-view class="list" scroll-y><view wx:for="{{z}}" wx:for-item="item" wx:key="d" class="shop-item"><image class="shop-img" src="https://cdn.uviewui.com/uview/album/1.jpg"></image><view class="shop-content"><view class="title"><view class="name u-line-2">好吃的瓜果{{item.a}}</view><view class="tip u-line-1">香味辛辣|葱香味浓|调味增香香味辛辣|葱香味浓|调味增香</view></view><view class="price-btn"><view class="price">¥12.00</view><view class="btn"><u--icon wx:if="{{A}}" u-i="{{item.b}}" bind:__l="__l" u-p="{{A}}"></u--icon><view class="num">{{B}}</view><u--icon wx:if="{{C}}" u-i="{{item.c}}" bind:__l="__l" u-p="{{C}}"></u--icon></view></view></view></view><view style="width:100%;height:200rpx"></view></scroll-view></view></view></view> <view class="content"><up-navbar wx:if="{{d}}" u-s="{{['left']}}" style="z-index:10080" u-i="1ba6254c-0" bind:__l="__l" u-p="{{d}}"><view style="width:500rpx" slot="left"><up-search wx:if="{{c}}" bindsearch="{{a}}" u-i="1ba6254c-1,1ba6254c-0" bind:__l="__l" bindupdateModelValue="{{b}}" u-p="{{c}}"></up-search></view></up-navbar><view style="position:relative;overflow:hidden"><scroll-view class="head-view" scroll-x><view class="list"><view wx:for="{{e}}" wx:for-item="item" wx:key="e" class="{{['item', item.d && 'item-active']}}" bindtap="{{item.f}}"><view class="c-img"><up-image wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image></view><view class="c-text u-line-1">{{item.c}}</view></view><view class="item" style="width:80rpx;height:20rpx"></view></view></scroll-view><view class="r-btn" bindtap="{{g}}"><view>全</view><view>部</view><up-icon wx:if="{{f}}" u-i="1ba6254c-3" bind:__l="__l" u-p="{{f}}"></up-icon></view></view><view-popup wx:if="{{h}}" u-s="{{['d']}}" bindclose="{{j}}" u-i="1ba6254c-4" bind:__l="__l" u-p="{{k}}"><view class="cateOne"><view class="head-title">全部分类</view><scroll-view scroll-y style="height:600rpx"><view class="list"><view wx:for="{{i}}" wx:for-item="item" wx:key="e" class="{{['item', item.d && 'item-active']}}" bindtap="{{item.f}}"><view class="c-img"><up-image wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image></view><view class="c-text u-line-1">{{item.c}}</view></view></view></scroll-view></view></view-popup><view class="scroll-box"><scroll-view class="left" scroll-y><view wx:for="{{l}}" wx:for-item="item" wx:key="c" class="{{['item', 'u-line-1', item.b && 'item-active']}}" bindtap="{{item.d}}">{{item.a}}</view><view style="width:100%;height:200rpx"></view></scroll-view><view class="right"><view class="classify"><scroll-view style="height:90rpx" scroll-x><view class="classify-list"><view wx:for="{{m}}" wx:for-item="item" wx:key="c" class="{{['classify-list-item', 'u-line-1', item.b && 'item-active']}}" bindtap="{{item.d}}">{{item.a}}</view><view style="width:70rpx;flex-shrink:0"></view></view></scroll-view><view class="done" bindtap="{{o}}"><up-icon wx:if="{{n}}" u-i="1ba6254c-6" bind:__l="__l" u-p="{{n}}"></up-icon></view><view class="order-by"><view class="{{['item', p && 'order-active']}}" bindtap="{{q}}">综合</view><view class="{{['item', r && 'order-active']}}" bindtap="{{s}}">价格</view><view class="{{['item', t && 'order-active']}}" bindtap="{{v}}">销量</view></view></view><view-popup wx:if="{{w}}" u-s="{{['d']}}" bindclose="{{y}}" u-i="1ba6254c-7" bind:__l="__l"><view class="cateOne"><scroll-view scroll-y style="height:230rpx"><view class="classify-list"><view wx:for="{{x}}" wx:for-item="item" wx:key="c" class="{{['classify-list-item', 'u-line-1', item.b && 'item-active']}}" bindtap="{{item.d}}">{{item.a}}</view></view></scroll-view></view></view-popup><scroll-view class="list" scroll-y bindscrolltolower="{{C}}"><view wx:for="{{z}}" wx:for-item="item" wx:key="q" class="shop-item"><view class="shop-img"><up-image wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image></view><view class="shop-content"><view class="title"><view class="name u-line-2">{{item.c}}</view><view class="tip u-line-1"><text>{{item.d}}|</text><text>{{item.e}}|</text><text>{{item.f}}</text></view></view><view class="price-btn"><view class="price">¥{{item.g}}</view><view class="btn"><up-transition wx:if="{{item.k}}" u-s="{{['d']}}" u-i="{{item.j}}" bind:__l="__l" u-p="{{item.k}}"><u--icon wx:if="{{A}}" bindclick="{{item.h}}" u-i="{{item.i}}" bind:__l="__l" u-p="{{A}}"></u--icon></up-transition><up-transition wx:if="{{item.n}}" u-s="{{['d']}}" u-i="{{item.m}}" bind:__l="__l" u-p="{{item.n}}"><view class="num">{{item.l}}</view></up-transition><u--icon wx:if="{{B}}" bindclick="{{item.o}}" u-i="{{item.p}}" bind:__l="__l" u-p="{{B}}"></u--icon></view></view></view></view><view style="width:100%;height:200rpx"></view></scroll-view></view></view></view>

View File

@ -52,6 +52,7 @@
flex-shrink: 0; flex-shrink: 0;
border-radius: 50%; border-radius: 50%;
border: 2px solid transparent; border: 2px solid transparent;
overflow: hidden;
} }
.head-view .list .item .c-text { .head-view .list .item .c-text {
width: 100%; width: 100%;
@ -93,15 +94,16 @@
padding-left: 30rpx; padding-left: 30rpx;
} }
.cateOne .list { .cateOne .list {
padding: 20rpx 0; padding: 20rpx 20rpx;
font-size: 22rpx; font-size: 22rpx;
display: grid; display: grid;
grid-template-columns: auto auto auto auto auto; grid-template-columns: repeat(5, 1fr);
justify-content: center; justify-content: center;
grid-gap: 20rpx; grid-gap: 20rpx;
} }
.cateOne .list .item { .cateOne .list .item {
width: 120rpx; width: 120rpx;
margin: 0 auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
@ -112,6 +114,7 @@
flex-shrink: 0; flex-shrink: 0;
border-radius: 50%; border-radius: 50%;
border: 2px solid transparent; border: 2px solid transparent;
overflow: hidden;
} }
.cateOne .list .item .c-text { .cateOne .list .item .c-text {
width: 100%; width: 100%;
@ -129,10 +132,10 @@
color: #fff; color: #fff;
} }
.cateOne .classify-list { .cateOne .classify-list {
padding: 20rpx 0; padding: 20rpx 30rpx;
font-size: 22rpx; font-size: 22rpx;
display: grid; display: grid;
grid-template-columns: auto auto auto; grid-template-columns: repeat(3, 1fr);
justify-content: center; justify-content: center;
grid-gap: 20rpx; grid-gap: 20rpx;
} }
@ -158,7 +161,7 @@
height: calc(100vh - var(--window-top) - var(--window-bottom) - 180rpx); height: calc(100vh - var(--window-top) - var(--window-bottom) - 180rpx);
width: 170rpx; width: 170rpx;
box-sizing: border-box; box-sizing: border-box;
background-color: #eee; background-color: #f6f6f6;
font-size: 24rpx; font-size: 24rpx;
} }
.scroll-box .left .item { .scroll-box .left .item {
@ -192,7 +195,7 @@
.scroll-box .right .classify { .scroll-box .right .classify {
height: 150rpx; height: 150rpx;
background-color: #fff; background-color: #fff;
border-bottom: 1rpx solid #eee; border-bottom: 1rpx solid #f6f6f6;
position: relative; position: relative;
font-size: 24rpx; font-size: 24rpx;
} }
@ -243,7 +246,7 @@
} }
.scroll-box .right .list .shop-item { .scroll-box .right .list .shop-item {
padding: 20rpx; padding: 20rpx;
border-bottom: 1rpx solid #eee; border-bottom: 1rpx solid #f6f6f6;
background-color: #fff; background-color: #fff;
display: flex; display: flex;
} }
@ -252,6 +255,7 @@
width: 160rpx; width: 160rpx;
margin-right: 20rpx; margin-right: 20rpx;
border-radius: 14rpx; border-radius: 14rpx;
overflow: hidden;
} }
.scroll-box .right .list .shop-item .shop-content { .scroll-box .right .list .shop-item .shop-content {
width: 380rpx; width: 380rpx;

View File

@ -1,38 +1,170 @@
"use strict"; "use strict";
const common_vendor = require("../../common/vendor.js"); const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js"); const common_assets = require("../../common/assets.js");
const api_user = require("../../api/user.js");
const store_user = require("../../store/user.js"); const store_user = require("../../store/user.js");
require("../../utils/request.js");
require("../../config/app.js");
if (!Array) { if (!Array) {
const _easycom_up_navbar2 = common_vendor.resolveComponent("up-navbar");
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon"); const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
const _easycom_up_button2 = common_vendor.resolveComponent("up-button"); const _easycom_up_button2 = common_vendor.resolveComponent("up-button");
(_easycom_up_icon2 + _easycom_up_button2)(); const _easycom_up_transition2 = common_vendor.resolveComponent("up-transition");
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
const _easycom_up_code2 = common_vendor.resolveComponent("up-code");
(_easycom_up_navbar2 + _easycom_up_icon2 + _easycom_up_button2 + _easycom_up_transition2 + _easycom_up_input2 + _easycom_up_code2)();
} }
const _easycom_up_navbar = () => "../../uni_modules/uview-plus/components/u-navbar/u-navbar.js";
const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js"; const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
const _easycom_up_button = () => "../../uni_modules/uview-plus/components/u-button/u-button.js"; const _easycom_up_button = () => "../../uni_modules/uview-plus/components/u-button/u-button.js";
const _easycom_up_transition = () => "../../uni_modules/uview-plus/components/u-transition/u-transition.js";
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
const _easycom_up_code = () => "../../uni_modules/uview-plus/components/u-code/u-code.js";
if (!Math) { if (!Math) {
(_easycom_up_icon + _easycom_up_button)(); (_easycom_up_navbar + _easycom_up_icon + _easycom_up_button + _easycom_up_transition + _easycom_up_input + _easycom_up_code)();
} }
const _sfc_main = { const _sfc_main = {
__name: "login", __name: "login",
setup(__props) { setup(__props) {
store_user.useUserStore(); store_user.useUserStore();
const showWeixin = common_vendor.ref(true);
const isAgree = common_vendor.ref(false);
const getPhoneNumber = (e) => {
console.log(e);
};
const loginForm = common_vendor.ref({
phone: "15366662222",
code: ""
});
const isPhone = () => {
loginForm.value.phone = loginForm.value.phone.replace(/\s*/g, "");
return !/^1[3456789]\d{9}$/.test(loginForm.value.phone);
};
const codeLogin = () => {
if (!isAgree.value)
return common_vendor.index.$u.toast("请先阅读并同意协议");
if (isPhone())
return common_vendor.index.$u.toast("请输入正确的手机号码");
console.log("登录");
api_user.userLoginApi({
account: "17811111111",
password: "1111",
terminal: 3,
scene: 1
}).then((res) => {
console.log(res);
});
};
const tips = common_vendor.ref("");
const seconds = common_vendor.ref(60);
const uCodeRef = common_vendor.ref(null);
const codeChange = (text) => {
tips.value = text;
};
const getCode = () => {
if (!isAgree.value)
return common_vendor.index.$u.toast("请先阅读并同意协议");
if (uCodeRef.value.canGetCode) {
if (isPhone())
return common_vendor.index.$u.toast("请输入正确的手机号码");
common_vendor.index.showLoading({
title: "正在获取验证码"
});
setTimeout(() => {
common_vendor.index.hideLoading();
common_vendor.index.$u.toast("验证码已发送");
uCodeRef.value.start();
}, 2e3);
} else {
common_vendor.index.$u.toast("倒计时结束后再发送");
}
};
const navBack = () => {
if (showWeixin.value == false) {
showWeixin.value = true;
return true;
} else
common_vendor.index.navigateBack();
};
return (_ctx, _cache) => { return (_ctx, _cache) => {
return common_vendor.e({ return common_vendor.e({
a: common_vendor.p({ a: common_vendor.o(navBack),
b: common_vendor.p({
title: "登录",
autoBack: false,
placeholder: true,
bgColor: "rgba(0,0,0,0)"
}),
c: showWeixin.value
}, showWeixin.value ? {
d: common_vendor.p({
name: "weixin-fill", name: "weixin-fill",
color: "#fff", color: "#fff",
size: "28" size: "28"
}), }),
b: common_vendor.p({ e: common_vendor.o(getPhoneNumber),
f: common_vendor.p({
["open-type"]: "getPhoneNumber",
color: "#20B128", color: "#20B128",
size: "large" size: "large"
}), }),
c: common_vendor.p({ g: common_vendor.o(($event) => showWeixin.value = false),
h: common_vendor.p({
color: "#ECFFEE", color: "#ECFFEE",
size: "large" size: "large"
}),
i: common_vendor.p({
show: showWeixin.value
})
} : {
j: common_vendor.o(($event) => loginForm.value.phone = $event),
k: common_vendor.p({
customStyle: {
height: "100%"
},
placeholderClass: "place",
border: "none",
placeholder: "请输入手机号",
type: "number",
modelValue: loginForm.value.phone
}),
l: common_vendor.sr(uCodeRef, "23c3038c-8,23c3038c-7", {
"k": "uCodeRef"
}),
m: common_vendor.o(codeChange),
n: common_vendor.p({
seconds: seconds.value
}),
o: common_vendor.t(tips.value),
p: common_vendor.o(getCode),
q: common_vendor.o(($event) => loginForm.value.code = $event),
r: common_vendor.p({
customStyle: {
height: "100%"
},
maxlength: 4,
placeholderClass: "place",
border: "none",
placeholder: "请输入验证码",
type: "number",
modelValue: loginForm.value.code
}),
s: common_vendor.o(codeLogin),
t: common_vendor.p({
color: "#20B128",
size: "large"
}),
v: common_vendor.p({
show: !showWeixin.value
}) })
}, { }, {
d: common_assets._imports_1 w: !isAgree.value
}, !isAgree.value ? {
x: common_vendor.o(($event) => isAgree.value = true),
y: common_assets._imports_1
} : {
z: common_vendor.o(($event) => isAgree.value = false),
A: common_assets._imports_0
}); });
}; };
} }

View File

@ -1,8 +1,13 @@
{ {
"navigationBarTitleText": "登录", "navigationBarTitleText": "登录",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom",
"usingComponents": { "usingComponents": {
"up-navbar": "../../uni_modules/uview-plus/components/u-navbar/u-navbar",
"up-icon": "../../uni_modules/uview-plus/components/u-icon/u-icon", "up-icon": "../../uni_modules/uview-plus/components/u-icon/u-icon",
"up-button": "../../uni_modules/uview-plus/components/u-button/u-button" "up-button": "../../uni_modules/uview-plus/components/u-button/u-button",
"up-transition": "../../uni_modules/uview-plus/components/u-transition/u-transition",
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input",
"up-code": "../../uni_modules/uview-plus/components/u-code/u-code"
} }
} }

View File

@ -1 +1 @@
<view><view class="login-box"><image class="logo" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/35adb202404271727457954.png"></image><view class="tips">欢迎登录里海商户采购平台</view><block wx:if="{{true}}"><view class="btn"><up-button wx:if="{{b}}" u-s="{{['d']}}" u-i="23c3038c-0" bind:__l="__l" u-p="{{b}}"><up-icon wx:if="{{a}}" u-i="23c3038c-1,23c3038c-0" bind:__l="__l" u-p="{{a}}"></up-icon>微信登录</up-button></view><view class="btn"><up-button wx:if="{{c}}" u-s="{{['d']}}" u-i="23c3038c-2" bind:__l="__l" u-p="{{c}}"><text style="color:#20B128">使用短信验证登录</text></up-button></view></block><view class="agreement"><image wx:if="{{true}}" src="{{d}}"></image><image wx:else src="{{e}}"></image><view> 我已同意<text>《用户协议》</text>与<text>《隐私政策》</text></view></view></view></view> <view><up-navbar wx:if="{{b}}" bindleftClick="{{a}}" u-i="23c3038c-0" bind:__l="__l" u-p="{{b}}"></up-navbar><view class="login-box"><image class="logo" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/35adb202404271727457954.png"></image><view class="tips">欢迎登录里海商户采购平台</view><block wx:if="{{c}}"><up-transition wx:if="{{i}}" u-s="{{['d']}}" u-i="23c3038c-1" bind:__l="__l" u-p="{{i}}"><view class="btn"><up-button wx:if="{{f}}" u-s="{{['d']}}" bindgetphonenumber="{{e}}" u-i="23c3038c-2,23c3038c-1" bind:__l="__l" u-p="{{f}}"><up-icon wx:if="{{d}}" u-i="23c3038c-3,23c3038c-2" bind:__l="__l" u-p="{{d}}"></up-icon>微信授权手机号登录</up-button></view><view class="btn"><up-button wx:if="{{h}}" u-s="{{['d']}}" bindclick="{{g}}" u-i="23c3038c-4,23c3038c-1" bind:__l="__l" u-p="{{h}}"><text style="color:#20B128">使用短信验证登录</text></up-button></view></up-transition></block><block wx:else><up-transition wx:if="{{v}}" u-s="{{['d']}}" u-i="23c3038c-5" bind:__l="__l" u-p="{{v}}"><view class="form"><view class="input"><up-input wx:if="{{k}}" u-s="{{['prefix']}}" u-i="23c3038c-6,23c3038c-5" bind:__l="__l" bindupdateModelValue="{{j}}" u-p="{{k}}"><image style="height:40rpx;width:40rpx;margin-top:6rpx" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/48491202404281006484208.png" slot="prefix"></image></up-input></view><view class="input"><up-input wx:if="{{r}}" u-s="{{['prefix','suffix']}}" u-i="23c3038c-7,23c3038c-5" bind:__l="__l" bindupdateModelValue="{{q}}" u-p="{{r}}"><image style="height:40rpx;width:40rpx;margin-top:6rpx" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/3a42f202404281007454918.png" slot="prefix"></image><view slot="suffix"><up-code wx:if="{{n}}" class="r" u-r="uCodeRef" bindchange="{{m}}" u-i="23c3038c-8,23c3038c-7" bind:__l="__l" u-p="{{n}}"></up-code><view style="color:#20B128" bindtap="{{p}}">{{o}}</view></view></up-input></view></view><view class="btn"><up-button wx:if="{{t}}" u-s="{{['d']}}" bindclick="{{s}}" u-i="23c3038c-9,23c3038c-5" bind:__l="__l" u-p="{{t}}">登录</up-button></view></up-transition></block><view class="agreement"><image wx:if="{{w}}" bindtap="{{x}}" src="{{y}}"></image><image wx:else bindtap="{{z}}" src="{{A}}"></image><view> 我已同意<text>《用户协议》</text>与<text>《隐私政策》</text></view></view></view></view>

View File

@ -51,6 +51,20 @@ page {
margin-top: 40rpx; margin-top: 40rpx;
font-size: 32rpx !important; font-size: 32rpx !important;
} }
.login-box .form .input {
background-color: #ECFFEE;
width: 600rpx;
height: 90rpx;
box-sizing: border-box;
padding: 0 20rpx;
margin-bottom: 40rpx;
}
.login-box .form .input .place {
color: #333;
}
.login-box .form .input .customStyle {
color: red;
}
.login-box .agreement { .login-box .agreement {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
@ -64,4 +78,7 @@ page {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
margin-right: 10rpx; margin-right: 10rpx;
}
.login-box .agreement text {
color: #20B128;
} }

View File

@ -49,7 +49,7 @@ const _sfc_main = {
isLink: true isLink: true
}), }),
i: common_vendor.p({ i: common_vendor.p({
title: "设置", title: "退出登录",
isLink: true, isLink: true,
url: "/pages/login/login" url: "/pages/login/login"
}) })

View File

@ -1,5 +1,9 @@
"use strict"; "use strict";
const common_vendor = require("../../common/vendor.js"); const common_vendor = require("../../common/vendor.js");
const api_user = require("../../api/user.js");
require("../../utils/request.js");
require("../../config/app.js");
require("../../store/user.js");
if (!Array) { if (!Array) {
const _easycom_up_input2 = common_vendor.resolveComponent("up-input"); const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
const _easycom_up_form_item2 = common_vendor.resolveComponent("up-form-item"); const _easycom_up_form_item2 = common_vendor.resolveComponent("up-form-item");
@ -21,20 +25,35 @@ const _sfc_main = {
setup(__props) { setup(__props) {
const mode = common_vendor.ref("add"); const mode = common_vendor.ref("add");
const formData = common_vendor.ref({ const formData = common_vendor.ref({
name: "", real_name: "",
phone: "", phone: "",
address: "", detail: "",
isDefault: false isDefault: false
}); });
const rules = common_vendor.ref({ const rules = common_vendor.ref({
name: [{ required: true, message: "请输入姓名", trigger: ["blur"] }], real_name: [{ required: true, message: "请输入姓名", trigger: ["blur"] }],
phone: [{ required: true, message: "请输入手机号", trigger: ["blur"] }], phone: [{ required: true, message: "请输入手机号", trigger: ["blur"] }],
address: [{ required: true, message: "请输入地址", trigger: ["blur"] }] detail: [{ required: true, message: "请输入地址", trigger: ["blur"] }]
}); });
const uForm = common_vendor.ref(null); const uForm = common_vendor.ref(null);
const submit = () => { const submit = () => {
uForm.value.validate().then(() => { uForm.value.validate().then(() => {
console.log("验证通过"); console.log("验证通过");
if (mode.value == "add") {
api_user.addressCreateApi(formData.value).then((res) => {
common_vendor.index.$u.toast(res.msg);
common_vendor.index.$u.sleep(800).then((res2) => {
common_vendor.index.navigateBack();
});
});
} else {
api_user.addressEditApi(formData.value).then((res) => {
common_vendor.index.$u.toast(res.msg);
common_vendor.index.$u.sleep(800).then((res2) => {
common_vendor.index.navigateBack();
});
});
}
}).catch(() => { }).catch(() => {
console.log("验证失败"); console.log("验证失败");
}); });
@ -52,16 +71,16 @@ const _sfc_main = {
}); });
return (_ctx, _cache) => { return (_ctx, _cache) => {
return { return {
a: common_vendor.o(($event) => formData.value.name = $event), a: common_vendor.o(($event) => formData.value.real_name = $event),
b: common_vendor.p({ b: common_vendor.p({
disabledColor: "#ffffff", disabledColor: "#ffffff",
border: "none", border: "none",
placeholder: "请填写收货人姓名", placeholder: "请填写收货人姓名",
modelValue: formData.value.name modelValue: formData.value.real_name
}), }),
c: common_vendor.p({ c: common_vendor.p({
label: "收货人", label: "收货人",
prop: "name", prop: "real_name",
borderBottom: true borderBottom: true
}), }),
d: common_vendor.o(($event) => formData.value.phone = $event), d: common_vendor.o(($event) => formData.value.phone = $event),
@ -77,16 +96,16 @@ const _sfc_main = {
prop: "phone", prop: "phone",
borderBottom: true borderBottom: true
}), }),
g: common_vendor.o(($event) => formData.value.address = $event), g: common_vendor.o(($event) => formData.value.detail = $event),
h: common_vendor.p({ h: common_vendor.p({
disabledColor: "#ffffff", disabledColor: "#ffffff",
placeholder: "请填写详细地址", placeholder: "请填写详细地址",
border: "none", border: "none",
modelValue: formData.value.address modelValue: formData.value.detail
}), }),
i: common_vendor.p({ i: common_vendor.p({
label: "详细地址", label: "详细地址",
prop: "address", prop: "detail",
borderBottom: true borderBottom: true
}), }),
j: common_vendor.sr(uForm, "663ade36-0", { j: common_vendor.sr(uForm, "663ade36-0", {

View File

@ -1,6 +1,10 @@
"use strict"; "use strict";
const common_vendor = require("../../common/vendor.js"); const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js"); const common_assets = require("../../common/assets.js");
const api_user = require("../../api/user.js");
require("../../utils/request.js");
require("../../config/app.js");
require("../../store/user.js");
if (!Array) { if (!Array) {
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon"); const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
const _easycom_up_button2 = common_vendor.resolveComponent("up-button"); const _easycom_up_button2 = common_vendor.resolveComponent("up-button");
@ -30,17 +34,29 @@ const _sfc_main = {
console.log(deleteInfo.value); console.log(deleteInfo.value);
show.value = false; show.value = false;
}; };
const addressList = common_vendor.ref([]);
const getAddressLists = () => {
api_user.addressListsApi().then((res) => {
addressList.value = res.data.lists;
console.log(addressList);
});
};
getAddressLists();
return (_ctx, _cache) => { return (_ctx, _cache) => {
return { return {
a: common_vendor.f(3, (item, index, i0) => { a: common_vendor.f(addressList.value, (item, index, i0) => {
return common_vendor.e({ return common_vendor.e({
b: common_assets._imports_1 a: common_vendor.t(item.real_name),
b: common_vendor.t(item.phone),
c: common_vendor.t(item.detail)
}, { }, {
c: "5e66515e-0-" + i0, e: common_assets._imports_1
d: common_vendor.o(($event) => showDelete(item), index), }, {
e: "5e66515e-1-" + i0, f: "5e66515e-0-" + i0,
f: common_vendor.o(($event) => navTo("/pagesOrder/addressEdit/addressEdit?mode=edit"), index), g: common_vendor.o(($event) => showDelete(item), index),
g: index h: "5e66515e-1-" + i0,
i: common_vendor.o(($event) => navTo("/pagesOrder/addressEdit/addressEdit?mode=edit"), index),
j: index
}); });
}), }),
b: common_vendor.p({ b: common_vendor.p({

View File

@ -1 +1 @@
<view class="list"><view wx:for="{{a}}" wx:for-item="item" wx:key="g" class="address-card"><view class="address-info"><view class="top"><view class="name">收货人:小李</view><view class="phone">14566666666</view></view><view class="bottom"> 四川泸州市龙马潭区莲花池街道商业街1号 </view></view><view class="btn-box"><view class="left"><image wx:if="{{false}}" src="{{item.a}}"></image><image wx:else src="{{item.b}}"></image><view>设为默认</view></view><view class="right"><view class="btn" bindtap="{{item.d}}"><up-icon wx:if="{{b}}" u-i="{{item.c}}" bind:__l="__l" u-p="{{b}}"></up-icon> 删除 </view><view class="btn" bindtap="{{item.f}}"><up-icon wx:if="{{c}}" u-i="{{item.e}}" bind:__l="__l" u-p="{{c}}"></up-icon> 编辑 </view></view></view></view><view style="width:100%;height:150rpx"></view><view class="bottom-fixed"><up-button wx:if="{{e}}" u-s="{{['d']}}" bindclick="{{d}}" u-i="5e66515e-2" bind:__l="__l" u-p="{{e}}">新增地址</up-button></view><modal wx:if="{{h}}" bindclose="{{f}}" bindchange="{{g}}" u-i="5e66515e-3" bind:__l="__l" u-p="{{h}}"></modal></view> <view class="list"><view wx:for="{{a}}" wx:for-item="item" wx:key="j" class="address-card"><view class="address-info"><view class="top"><view class="name">收货人:{{item.a}}</view><view class="phone">{{item.b}}</view></view><view class="bottom">{{item.c}}</view></view><view class="btn-box"><view class="left"><image wx:if="{{false}}" src="{{item.d}}"></image><image wx:else src="{{item.e}}"></image><view>设为默认</view></view><view class="right"><view class="btn" bindtap="{{item.g}}"><up-icon wx:if="{{b}}" u-i="{{item.f}}" bind:__l="__l" u-p="{{b}}"></up-icon> 删除 </view><view class="btn" bindtap="{{item.i}}"><up-icon wx:if="{{c}}" u-i="{{item.h}}" bind:__l="__l" u-p="{{c}}"></up-icon> 编辑 </view></view></view></view><view style="width:100%;height:150rpx"></view><view class="bottom-fixed"><up-button wx:if="{{e}}" u-s="{{['d']}}" bindclick="{{d}}" u-i="5e66515e-2" bind:__l="__l" u-p="{{e}}">新增地址</up-button></view><modal wx:if="{{h}}" bindclose="{{f}}" bindchange="{{g}}" u-i="5e66515e-3" bind:__l="__l" u-p="{{h}}"></modal></view>

View File

@ -33,7 +33,7 @@
} }
.address-card .address-info { .address-card .address-info {
padding-bottom: 20rpx; padding-bottom: 20rpx;
border-bottom: 1rpx solid #eee; border-bottom: 1rpx solid #f6f6f6;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.address-card .address-info .top { .address-card .address-info .top {

View File

@ -1 +1 @@
<view class=""><view class="count_down"> 还剩<text>00:28:36</text>订单自动取消 </view><view class="m-card m-address"><view class="address-info"><view class="top"><up-icon wx:if="{{a}}" u-i="666b5ad0-0" bind:__l="__l" u-p="{{a}}"></up-icon><view class="t-name">小王</view><view>155****9999</view></view><view class="bottom u-line-2"> 四川泸州市龙马潭区莲花池街道商业街1号 </view></view><view class="address-btn"><view style="width:80px"><up-button wx:if="{{c}}" u-s="{{['d']}}" bindclick="{{b}}" u-i="666b5ad0-1" bind:__l="__l" u-p="{{c}}">修改</up-button></view></view></view><view class="m-card m-good"><image class="image" src="/static/logo.png"></image><view class="body-content"><view><view class="title"><view>黄牛肉20kg</view><view>¥10.00</view></view><view class="tips"><view>我不吃牛肉</view><view>x5</view></view></view><view class="time"> 预计48小时发货 </view></view></view><view class="m-card good-info"><view class="row"><view>商品总价 <text>共计5件商品</text></view><view><text>¥</text>50<text>.00</text></view></view><view class="row"><view>运费</view><view><text>¥</text>0<text>.00</text></view></view><view class="row-need"><view style="margin-right:10rpx">需付款</view><view><text>¥</text>50<text>.00</text></view></view></view><view class="m-card good-info"><view class="head-title">订单信息</view><view class="row"><view>订单编号</view><up-copy wx:if="{{d}}" u-s="{{['d']}}" u-i="666b5ad0-2" bind:__l="__l" u-p="{{d}}"><text>wxo13546486484784555 | 复制</text></up-copy></view><view class="row"><view>下单时间</view><view>2024-04-25 15:00:00</view></view><view class="row" style="margin-bottom:0"><view>支付状态</view><view class="red">待支付</view></view></view><view style="width:100%;height:200rpx"></view><view class="btn-box"><view style="color:#777777" bindtap="{{e}}">取消订单</view><view style="width:450rpx"><up-button wx:if="{{f}}" u-s="{{['d']}}" u-i="666b5ad0-3" bind:__l="__l" u-p="{{f}}">立即支付 ¥50.00</up-button></view></view><up-popup wx:if="{{k}}" u-s="{{['d']}}" bindclose="{{j}}" u-i="666b5ad0-4" bind:__l="__l" u-p="{{k}}"><view class="cancel-popup"><view class="head-title">订单取消</view><view wx:for="{{g}}" wx:for-item="item" wx:key="e" class="row" bindtap="{{item.f}}"><view>{{item.a}}</view><image wx:if="{{item.b}}" src="{{item.c}}"></image><image wx:else src="{{item.d}}"></image></view><up-button wx:if="{{i}}" u-s="{{['d']}}" bindclick="{{h}}" u-i="666b5ad0-5,666b5ad0-4" bind:__l="__l" u-p="{{i}}">提交</up-button></view></up-popup><address-popup wx:if="{{n}}" bindclose="{{l}}" bindchange="{{m}}" u-i="666b5ad0-6" bind:__l="__l" u-p="{{n}}"></address-popup><modal wx:if="{{o}}" u-i="666b5ad0-7" bind:__l="__l" u-p="{{o}}"></modal></view> <view class=""><view class="count_down"> 还剩<text>00:28:36</text>订单自动取消 </view><view class="m-card m-address"><view class="address-info"><view class="top"><up-icon wx:if="{{a}}" u-i="666b5ad0-0" bind:__l="__l" u-p="{{a}}"></up-icon><view class="t-name">小王</view><view>155****9999</view></view><view class="bottom u-line-2"> 四川泸州市龙马潭区莲花池街道商业街1号 </view></view><view class="address-btn"><view style="width:80px"><up-button wx:if="{{c}}" u-s="{{['d']}}" bindclick="{{b}}" u-i="666b5ad0-1" bind:__l="__l" u-p="{{c}}">修改</up-button></view></view></view><view class="m-card m-good"><image class="image" src="/static/logo.png"></image><view class="body-content"><view><view class="title"><view>黄牛肉20kg</view><view>¥10.00</view></view><view class="tips"><view>我不吃牛肉</view><view>x5</view></view></view><view class="time"> 预计48小时发货 </view></view></view><view class="m-card good-info"><view class="row"><view>商品总价 <text>共计5件商品</text></view><view><text>¥</text>50<text>.00</text></view></view><view class="row"><view>运费</view><view><text>¥</text>0<text>.00</text></view></view><view class="row-need"><view style="margin-right:10rpx">需付款</view><view><text>¥</text>50<text>.00</text></view></view></view><view class="m-card good-info"><view class="head-title">订单信息</view><view class="row"><view>订单编号</view><up-copy wx:if="{{d}}" u-s="{{['d']}}" u-i="666b5ad0-2" bind:__l="__l" u-p="{{d}}"><text>wxo13546486484784555 | 复制</text></up-copy></view><view class="row"><view>下单时间</view><view>2024-04-25 15:00:00</view></view><view class="row" style="margin-bottom:0"><view>支付状态</view><view class="red">待支付</view></view></view><view style="width:100%;height:200rpx"></view><view class="fiexd-btn-box"><view style="color:#777777" bindtap="{{e}}">取消订单</view><view style="width:450rpx"><up-button wx:if="{{f}}" u-s="{{['d']}}" u-i="666b5ad0-3" bind:__l="__l" u-p="{{f}}">立即支付 ¥50.00</up-button></view></view><up-popup wx:if="{{k}}" u-s="{{['d']}}" bindclose="{{j}}" u-i="666b5ad0-4" bind:__l="__l" u-p="{{k}}"><view class="cancel-popup"><view class="head-title">订单取消</view><view wx:for="{{g}}" wx:for-item="item" wx:key="e" class="row" bindtap="{{item.f}}"><view>{{item.a}}</view><image wx:if="{{item.b}}" src="{{item.c}}"></image><image wx:else src="{{item.d}}"></image></view><up-button wx:if="{{i}}" u-s="{{['d']}}" bindclick="{{h}}" u-i="666b5ad0-5,666b5ad0-4" bind:__l="__l" u-p="{{i}}">提交</up-button></view></up-popup><address-popup wx:if="{{n}}" bindclose="{{l}}" bindchange="{{m}}" u-i="666b5ad0-6" bind:__l="__l" u-p="{{n}}"></address-popup><modal wx:if="{{o}}" u-i="666b5ad0-7" bind:__l="__l" u-p="{{o}}"></modal></view>

View File

@ -121,27 +121,6 @@
.good-info text { .good-info text {
font-size: 22rpx; font-size: 22rpx;
} }
.btn-box {
position: fixed;
bottom: 0;
left: 0;
height: 120rpx;
height: calc(constant(safe-area-inset-bottom) + 120rpx);
/* 适用于iOS设备 */
height: calc(env(safe-area-inset-bottom) + 120rpx);
/* 适用于Android设备 */
width: 100%;
box-sizing: border-box;
background-color: #fff;
padding: 20rpx;
padding-bottom: calc(constant(safe-area-inset-bottom) + 20rpx);
/* 适用于iOS设备 */
padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
/* 适用于Android设备 */
display: flex;
justify-content: space-between;
align-items: center;
}
.cancel-popup { .cancel-popup {
padding: 30rpx; padding: 30rpx;
} }

View File

@ -9,7 +9,7 @@
"list": [ "list": [
{ {
"name": "", "name": "",
"pathName": "pages/login/login", "pathName": "pagesOrder/settle/settle",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null

View File

@ -2,11 +2,18 @@
const common_vendor = require("../common/vendor.js"); const common_vendor = require("../common/vendor.js");
const useUserStore = common_vendor.defineStore("user", () => { const useUserStore = common_vendor.defineStore("user", () => {
const userInfo = common_vendor.ref(common_vendor.index.getStorageSync("userInfo") || {}); const userInfo = common_vendor.ref(common_vendor.index.getStorageSync("userInfo") || {});
userInfo.value = {
"nickname": "哈哈",
"mobile": "17685151643",
"avatar": "https://lihaiim.oss-cn-chengdu.aliyuncs.com/image/admin/avatar.png",
"token": "a8670fe7f1014c0f5125f6ca0c3b9cb3"
};
const token = common_vendor.ref(common_vendor.index.getStorageSync("token") || ""); const token = common_vendor.ref(common_vendor.index.getStorageSync("token") || "");
const setToken = (data) => { const setToken = (data) => {
token.value = data; token.value = data;
common_vendor.index.setStorageSync("token", data); common_vendor.index.setStorageSync("token", data);
}; };
token.value = "a8670fe7f1014c0f5125f6ca0c3b9cb3";
return { userInfo, setToken, token, setToken }; return { userInfo, setToken, token, setToken };
}); });
exports.useUserStore = useUserStore; exports.useUserStore = useUserStore;

View File

@ -1,158 +0,0 @@
"use strict";
const uni_modules_uviewPlus_components_uForm_props = require("../u-form/props.js");
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
const common_vendor = require("../../../../common/vendor.js");
require("../../libs/config/props.js");
require("../../libs/config/config.js");
require("../../libs/config/props/actionSheet.js");
require("../../libs/config/props/album.js");
require("../../libs/config/props/alert.js");
require("../../libs/config/props/avatar.js");
require("../../libs/config/props/avatarGroup.js");
require("../../libs/config/props/backtop.js");
require("../../libs/config/props/badge.js");
require("../../libs/config/props/button.js");
require("../../libs/config/props/calendar.js");
require("../../libs/config/props/carKeyboard.js");
require("../../libs/config/props/cell.js");
require("../../libs/config/props/cellGroup.js");
require("../../libs/config/props/checkbox.js");
require("../../libs/config/props/checkboxGroup.js");
require("../../libs/config/props/circleProgress.js");
require("../../libs/config/props/code.js");
require("../../libs/config/props/codeInput.js");
require("../../libs/config/props/col.js");
require("../../libs/config/props/collapse.js");
require("../../libs/config/props/collapseItem.js");
require("../../libs/config/props/columnNotice.js");
require("../../libs/config/props/countDown.js");
require("../../libs/config/props/countTo.js");
require("../../libs/config/props/datetimePicker.js");
require("../../libs/config/props/divider.js");
require("../../libs/config/props/empty.js");
require("../../libs/config/props/form.js");
require("../../libs/config/props/formItem.js");
require("../../libs/config/props/gap.js");
require("../../libs/config/props/grid.js");
require("../../libs/config/props/gridItem.js");
require("../../libs/config/props/icon.js");
require("../../libs/config/props/image.js");
require("../../libs/config/props/indexAnchor.js");
require("../../libs/config/props/indexList.js");
require("../../libs/config/props/input.js");
require("../../libs/config/props/keyboard.js");
require("../../libs/config/props/line.js");
require("../../libs/config/props/lineProgress.js");
require("../../libs/config/props/link.js");
require("../../libs/config/props/list.js");
require("../../libs/config/props/listItem.js");
require("../../libs/config/props/loadingIcon.js");
require("../../libs/config/props/loadingPage.js");
require("../../libs/config/props/loadmore.js");
require("../../libs/config/props/modal.js");
require("../../libs/config/props/navbar.js");
require("../../libs/config/color.js");
require("../../libs/config/props/noNetwork.js");
require("../../libs/config/props/noticeBar.js");
require("../../libs/config/props/notify.js");
require("../../libs/config/props/numberBox.js");
require("../../libs/config/props/numberKeyboard.js");
require("../../libs/config/props/overlay.js");
require("../../libs/config/props/parse.js");
require("../../libs/config/props/picker.js");
require("../../libs/config/props/popup.js");
require("../../libs/config/props/radio.js");
require("../../libs/config/props/radioGroup.js");
require("../../libs/config/props/rate.js");
require("../../libs/config/props/readMore.js");
require("../../libs/config/props/row.js");
require("../../libs/config/props/rowNotice.js");
require("../../libs/config/props/scrollList.js");
require("../../libs/config/props/search.js");
require("../../libs/config/props/section.js");
require("../../libs/config/props/skeleton.js");
require("../../libs/config/props/slider.js");
require("../../libs/config/props/statusBar.js");
require("../../libs/config/props/steps.js");
require("../../libs/config/props/stepsItem.js");
require("../../libs/config/props/sticky.js");
require("../../libs/config/props/subsection.js");
require("../../libs/config/props/swipeAction.js");
require("../../libs/config/props/swipeActionItem.js");
require("../../libs/config/props/swiper.js");
require("../../libs/config/props/swipterIndicator.js");
require("../../libs/config/props/switch.js");
require("../../libs/config/props/tabbar.js");
require("../../libs/config/props/tabbarItem.js");
require("../../libs/config/props/tabs.js");
require("../../libs/config/props/tag.js");
require("../../libs/config/props/text.js");
require("../../libs/config/props/textarea.js");
require("../../libs/config/props/toast.js");
require("../../libs/config/props/toolbar.js");
require("../../libs/config/props/tooltip.js");
require("../../libs/config/props/transition.js");
require("../../libs/config/props/upload.js");
require("../../libs/function/index.js");
require("../../libs/function/test.js");
require("../../libs/function/digit.js");
require("../../libs/util/route.js");
const uvForm = () => "../u-form/u-form.js";
const _sfc_main = {
name: "u-form",
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_components_uForm_props.props, uni_modules_uviewPlus_libs_mixin_mixin.mixin],
components: {
uvForm
},
created() {
this.children = [];
},
methods: {
// 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
setRules(rules) {
this.$refs.uForm.setRules(rules);
},
validate() {
this.setMpData();
return this.$refs.uForm.validate();
},
validateField(value, callback) {
this.setMpData();
return this.$refs.uForm.validateField(value, callback);
},
resetFields() {
this.setMpData();
return this.$refs.uForm.resetFields();
},
clearValidate(props) {
this.setMpData();
return this.$refs.uForm.clearValidate(props);
},
setMpData() {
this.$refs.uForm.children = this.children;
}
}
};
if (!Array) {
const _component_uvForm = common_vendor.resolveComponent("uvForm");
_component_uvForm();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.sr("uForm", "3baec837-0"),
b: common_vendor.p({
model: _ctx.model,
rules: _ctx.rules,
errorType: _ctx.errorType,
borderBottom: _ctx.borderBottom,
labelPosition: _ctx.labelPosition,
labelWidth: _ctx.labelWidth,
labelAlign: _ctx.labelAlign,
labelStyle: _ctx.labelStyle,
customStyle: _ctx.customStyle
})
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/里海数字乡村/purchase-let/uni_modules/uview-plus/components/u--form/u--form.vue"]]);
wx.createComponent(Component);

View File

@ -1,6 +0,0 @@
{
"component": true,
"usingComponents": {
"uv-form": "../u-form/u-form"
}
}

View File

@ -1 +0,0 @@
<uv-form wx:if="{{b}}" class="r" u-s="{{['d']}}" u-r="uForm" u-i="3baec837-0" bind:__l="__l" u-p="{{b}}"><slot/></uv-form>

View File

@ -1,157 +0,0 @@
"use strict";
const uni_modules_uviewPlus_components_uInput_props = require("../u-input/props.js");
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
const common_vendor = require("../../../../common/vendor.js");
require("../../libs/config/props.js");
require("../../libs/config/config.js");
require("../../libs/config/props/actionSheet.js");
require("../../libs/config/props/album.js");
require("../../libs/config/props/alert.js");
require("../../libs/config/props/avatar.js");
require("../../libs/config/props/avatarGroup.js");
require("../../libs/config/props/backtop.js");
require("../../libs/config/props/badge.js");
require("../../libs/config/props/button.js");
require("../../libs/config/props/calendar.js");
require("../../libs/config/props/carKeyboard.js");
require("../../libs/config/props/cell.js");
require("../../libs/config/props/cellGroup.js");
require("../../libs/config/props/checkbox.js");
require("../../libs/config/props/checkboxGroup.js");
require("../../libs/config/props/circleProgress.js");
require("../../libs/config/props/code.js");
require("../../libs/config/props/codeInput.js");
require("../../libs/config/props/col.js");
require("../../libs/config/props/collapse.js");
require("../../libs/config/props/collapseItem.js");
require("../../libs/config/props/columnNotice.js");
require("../../libs/config/props/countDown.js");
require("../../libs/config/props/countTo.js");
require("../../libs/config/props/datetimePicker.js");
require("../../libs/config/props/divider.js");
require("../../libs/config/props/empty.js");
require("../../libs/config/props/form.js");
require("../../libs/config/props/formItem.js");
require("../../libs/config/props/gap.js");
require("../../libs/config/props/grid.js");
require("../../libs/config/props/gridItem.js");
require("../../libs/config/props/icon.js");
require("../../libs/config/props/image.js");
require("../../libs/config/props/indexAnchor.js");
require("../../libs/config/props/indexList.js");
require("../../libs/config/props/input.js");
require("../../libs/config/props/keyboard.js");
require("../../libs/config/props/line.js");
require("../../libs/config/props/lineProgress.js");
require("../../libs/config/props/link.js");
require("../../libs/config/props/list.js");
require("../../libs/config/props/listItem.js");
require("../../libs/config/props/loadingIcon.js");
require("../../libs/config/props/loadingPage.js");
require("../../libs/config/props/loadmore.js");
require("../../libs/config/props/modal.js");
require("../../libs/config/props/navbar.js");
require("../../libs/config/color.js");
require("../../libs/config/props/noNetwork.js");
require("../../libs/config/props/noticeBar.js");
require("../../libs/config/props/notify.js");
require("../../libs/config/props/numberBox.js");
require("../../libs/config/props/numberKeyboard.js");
require("../../libs/config/props/overlay.js");
require("../../libs/config/props/parse.js");
require("../../libs/config/props/picker.js");
require("../../libs/config/props/popup.js");
require("../../libs/config/props/radio.js");
require("../../libs/config/props/radioGroup.js");
require("../../libs/config/props/rate.js");
require("../../libs/config/props/readMore.js");
require("../../libs/config/props/row.js");
require("../../libs/config/props/rowNotice.js");
require("../../libs/config/props/scrollList.js");
require("../../libs/config/props/search.js");
require("../../libs/config/props/section.js");
require("../../libs/config/props/skeleton.js");
require("../../libs/config/props/slider.js");
require("../../libs/config/props/statusBar.js");
require("../../libs/config/props/steps.js");
require("../../libs/config/props/stepsItem.js");
require("../../libs/config/props/sticky.js");
require("../../libs/config/props/subsection.js");
require("../../libs/config/props/swipeAction.js");
require("../../libs/config/props/swipeActionItem.js");
require("../../libs/config/props/swiper.js");
require("../../libs/config/props/swipterIndicator.js");
require("../../libs/config/props/switch.js");
require("../../libs/config/props/tabbar.js");
require("../../libs/config/props/tabbarItem.js");
require("../../libs/config/props/tabs.js");
require("../../libs/config/props/tag.js");
require("../../libs/config/props/text.js");
require("../../libs/config/props/textarea.js");
require("../../libs/config/props/toast.js");
require("../../libs/config/props/toolbar.js");
require("../../libs/config/props/tooltip.js");
require("../../libs/config/props/transition.js");
require("../../libs/config/props/upload.js");
require("../../libs/function/index.js");
require("../../libs/function/test.js");
require("../../libs/function/digit.js");
require("../../libs/util/route.js");
const uvInput = () => "../u-input/u-input.js";
const _sfc_main = {
name: "u--input",
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_components_uInput_props.props, uni_modules_uviewPlus_libs_mixin_mixin.mixin],
components: {
uvInput
}
};
if (!Array) {
const _component_uvInput = common_vendor.resolveComponent("uvInput");
_component_uvInput();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.o((e) => _ctx.$emit("update:modelValue", e)),
b: common_vendor.p({
modelValue: _ctx.modelValue,
type: _ctx.type,
fixed: _ctx.fixed,
disabled: _ctx.disabled,
disabledColor: _ctx.disabledColor,
clearable: _ctx.clearable,
password: _ctx.password,
maxlength: _ctx.maxlength,
placeholder: _ctx.placeholder,
placeholderClass: _ctx.placeholderClass,
placeholderStyle: _ctx.placeholderStyle,
showWordLimit: _ctx.showWordLimit,
confirmType: _ctx.confirmType,
confirmHold: _ctx.confirmHold,
holdKeyboard: _ctx.holdKeyboard,
focus: _ctx.focus,
autoBlur: _ctx.autoBlur,
disableDefaultPadding: _ctx.disableDefaultPadding,
cursor: _ctx.cursor,
cursorSpacing: _ctx.cursorSpacing,
selectionStart: _ctx.selectionStart,
selectionEnd: _ctx.selectionEnd,
adjustPosition: _ctx.adjustPosition,
inputAlign: _ctx.inputAlign,
fontSize: _ctx.fontSize,
color: _ctx.color,
prefixIcon: _ctx.prefixIcon,
suffixIcon: _ctx.suffixIcon,
suffixIconStyle: _ctx.suffixIconStyle,
prefixIconStyle: _ctx.prefixIconStyle,
border: _ctx.border,
readonly: _ctx.readonly,
shape: _ctx.shape,
customStyle: _ctx.customStyle,
formatter: _ctx.formatter,
ignoreCompositionEvent: _ctx.ignoreCompositionEvent
})
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/里海数字乡村/purchase-let/uni_modules/uview-plus/components/u--input/u--input.vue"]]);
wx.createComponent(Component);

View File

@ -1,6 +0,0 @@
{
"component": true,
"usingComponents": {
"uv-input": "../u-input/u-input"
}
}

View File

@ -1 +0,0 @@
<uv-input wx:if="{{b}}" u-s="{{['d']}}" bindupdateModelValue="{{a}}" u-i="fe1fac3a-0" bind:__l="__l" u-p="{{b}}"><slot name="prefix"></slot><slot name="suffix"></slot></uv-input>

View File

@ -1,52 +0,0 @@
"use strict";
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
const props = {
props: {
// 提示内容
loadingText: {
type: [String, Number],
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingPage.loadingText
},
// 文字上方用于替换loading动画的图片
image: {
type: String,
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingPage.image
},
// 加载动画的模式circle-圆形spinner-花朵形semicircle-半圆形
loadingMode: {
type: String,
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingPage.loadingMode
},
// 是否加载中
loading: {
type: Boolean,
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingPage.loading
},
// 背景色
bgColor: {
type: String,
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingPage.bgColor
},
// 文字颜色
color: {
type: String,
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingPage.color
},
// 文字大小
fontSize: {
type: [String, Number],
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingPage.fontSize
},
// 图标大小
iconSize: {
type: [String, Number],
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingPage.fontSize
},
// 加载中图标的颜色只能rgb或者十六进制颜色值
loadingColor: {
type: String,
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingPage.loadingColor
}
}
};
exports.props = props;

View File

@ -1,153 +0,0 @@
"use strict";
const uni_modules_uviewPlus_components_uLoadingPage_props = require("./props.js");
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
const common_vendor = require("../../../../common/vendor.js");
require("../../libs/config/props.js");
require("../../libs/config/config.js");
require("../../libs/config/props/actionSheet.js");
require("../../libs/config/props/album.js");
require("../../libs/config/props/alert.js");
require("../../libs/config/props/avatar.js");
require("../../libs/config/props/avatarGroup.js");
require("../../libs/config/props/backtop.js");
require("../../libs/config/props/badge.js");
require("../../libs/config/props/button.js");
require("../../libs/config/props/calendar.js");
require("../../libs/config/props/carKeyboard.js");
require("../../libs/config/props/cell.js");
require("../../libs/config/props/cellGroup.js");
require("../../libs/config/props/checkbox.js");
require("../../libs/config/props/checkboxGroup.js");
require("../../libs/config/props/circleProgress.js");
require("../../libs/config/props/code.js");
require("../../libs/config/props/codeInput.js");
require("../../libs/config/props/col.js");
require("../../libs/config/props/collapse.js");
require("../../libs/config/props/collapseItem.js");
require("../../libs/config/props/columnNotice.js");
require("../../libs/config/props/countDown.js");
require("../../libs/config/props/countTo.js");
require("../../libs/config/props/datetimePicker.js");
require("../../libs/config/props/divider.js");
require("../../libs/config/props/empty.js");
require("../../libs/config/props/form.js");
require("../../libs/config/props/formItem.js");
require("../../libs/config/props/gap.js");
require("../../libs/config/props/grid.js");
require("../../libs/config/props/gridItem.js");
require("../../libs/config/props/icon.js");
require("../../libs/config/props/image.js");
require("../../libs/config/props/indexAnchor.js");
require("../../libs/config/props/indexList.js");
require("../../libs/config/props/input.js");
require("../../libs/config/props/keyboard.js");
require("../../libs/config/props/line.js");
require("../../libs/config/props/lineProgress.js");
require("../../libs/config/props/link.js");
require("../../libs/config/props/list.js");
require("../../libs/config/props/listItem.js");
require("../../libs/config/props/loadingIcon.js");
require("../../libs/config/props/loadingPage.js");
require("../../libs/config/props/loadmore.js");
require("../../libs/config/props/modal.js");
require("../../libs/config/props/navbar.js");
require("../../libs/config/color.js");
require("../../libs/config/props/noNetwork.js");
require("../../libs/config/props/noticeBar.js");
require("../../libs/config/props/notify.js");
require("../../libs/config/props/numberBox.js");
require("../../libs/config/props/numberKeyboard.js");
require("../../libs/config/props/overlay.js");
require("../../libs/config/props/parse.js");
require("../../libs/config/props/picker.js");
require("../../libs/config/props/popup.js");
require("../../libs/config/props/radio.js");
require("../../libs/config/props/radioGroup.js");
require("../../libs/config/props/rate.js");
require("../../libs/config/props/readMore.js");
require("../../libs/config/props/row.js");
require("../../libs/config/props/rowNotice.js");
require("../../libs/config/props/scrollList.js");
require("../../libs/config/props/search.js");
require("../../libs/config/props/section.js");
require("../../libs/config/props/skeleton.js");
require("../../libs/config/props/slider.js");
require("../../libs/config/props/statusBar.js");
require("../../libs/config/props/steps.js");
require("../../libs/config/props/stepsItem.js");
require("../../libs/config/props/sticky.js");
require("../../libs/config/props/subsection.js");
require("../../libs/config/props/swipeAction.js");
require("../../libs/config/props/swipeActionItem.js");
require("../../libs/config/props/swiper.js");
require("../../libs/config/props/swipterIndicator.js");
require("../../libs/config/props/switch.js");
require("../../libs/config/props/tabbar.js");
require("../../libs/config/props/tabbarItem.js");
require("../../libs/config/props/tabs.js");
require("../../libs/config/props/tag.js");
require("../../libs/config/props/text.js");
require("../../libs/config/props/textarea.js");
require("../../libs/config/props/toast.js");
require("../../libs/config/props/toolbar.js");
require("../../libs/config/props/tooltip.js");
require("../../libs/config/props/transition.js");
require("../../libs/config/props/upload.js");
require("../../libs/function/test.js");
require("../../libs/util/route.js");
require("../../libs/function/digit.js");
const _sfc_main = {
name: "u-loading-page",
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uLoadingPage_props.props],
data() {
return {};
},
methods: {
addUnit: uni_modules_uviewPlus_libs_function_index.addUnit
}
};
if (!Array) {
const _easycom_u_loading_icon2 = common_vendor.resolveComponent("u-loading-icon");
const _easycom_u_transition2 = common_vendor.resolveComponent("u-transition");
(_easycom_u_loading_icon2 + _easycom_u_transition2)();
}
const _easycom_u_loading_icon = () => "../u-loading-icon/u-loading-icon.js";
const _easycom_u_transition = () => "../u-transition/u-transition.js";
if (!Math) {
(_easycom_u_loading_icon + _easycom_u_transition)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: _ctx.image
}, _ctx.image ? {
b: _ctx.image,
c: $options.addUnit(_ctx.iconSize),
d: $options.addUnit(_ctx.iconSize)
} : {
e: common_vendor.p({
mode: _ctx.loadingMode,
size: $options.addUnit(_ctx.iconSize),
color: _ctx.loadingColor
})
}, {
f: common_vendor.t(_ctx.loadingText),
g: $options.addUnit(_ctx.fontSize),
h: _ctx.color,
i: common_vendor.p({
show: _ctx.loading,
["custom-style"]: {
position: "fixed",
top: 0,
left: 0,
right: 0,
bottom: 0,
backgroundColor: _ctx.bgColor,
display: "flex"
}
})
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9c9e88a3"], ["__file", "D:/里海数字乡村/purchase-let/uni_modules/uview-plus/components/u-loading-page/u-loading-page.vue"]]);
wx.createComponent(Component);

View File

@ -1,7 +0,0 @@
{
"component": true,
"usingComponents": {
"u-loading-icon": "../u-loading-icon/u-loading-icon",
"u-transition": "../u-transition/u-transition"
}
}

View File

@ -1 +0,0 @@
<u-transition wx:if="{{i}}" class="data-v-9c9e88a3" u-s="{{['d']}}" u-i="9c9e88a3-0" bind:__l="__l" u-p="{{i}}"><view class="u-loading-page data-v-9c9e88a3"><view class="u-loading-page__warpper data-v-9c9e88a3"><view class="u-loading-page__warpper__loading-icon data-v-9c9e88a3"><image wx:if="{{a}}" src="{{b}}" class="u-loading-page__warpper__loading-icon__img data-v-9c9e88a3" mode="widthFit" style="{{'width:' + c + ';' + ('height:' + d)}}"></image><u-loading-icon wx:else class="data-v-9c9e88a3" u-i="9c9e88a3-1,9c9e88a3-0" bind:__l="__l" u-p="{{e||''}}"></u-loading-icon></view><block wx:if="{{$slots.d}}"><slot></slot></block><block wx:else><text class="u-loading-page__warpper__text data-v-9c9e88a3" style="{{'font-size:' + g + ';' + ('color:' + h)}}">{{f}}</text></block></view></view></u-transition>

View File

@ -1,68 +0,0 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.u-empty.data-v-9c9e88a3,
.u-empty__wrap.data-v-9c9e88a3,
.u-tabs.data-v-9c9e88a3,
.u-tabs__wrapper.data-v-9c9e88a3,
.u-tabs__wrapper__scroll-view-wrapper.data-v-9c9e88a3,
.u-tabs__wrapper__scroll-view.data-v-9c9e88a3,
.u-tabs__wrapper__nav.data-v-9c9e88a3,
.u-tabs__wrapper__nav__line.data-v-9c9e88a3 {
display: flex;
flex-direction: column;
flex-shrink: 0;
flex-grow: 0;
flex-basis: auto;
align-items: stretch;
align-content: flex-start;
}
.u-loading-page.data-v-9c9e88a3 {
display: flex;
flex-direction: column;
flex: 1;
align-items: center;
justify-content: center;
}
.u-loading-page__warpper.data-v-9c9e88a3 {
margin-top: -150px;
justify-content: center;
align-items: center;
color: #c8c8c8;
font-size: 19px;
display: flex;
flex-direction: column;
}
.u-loading-page__warpper__loading-icon.data-v-9c9e88a3 {
margin-bottom: 10px;
}
.u-loading-page__warpper__loading-icon__img.data-v-9c9e88a3 {
width: 40px;
height: 40px;
}
.u-loading-page__warpper__text.data-v-9c9e88a3 {
font-size: 19px;
color: #c8c8c8;
}

View File

@ -9,7 +9,7 @@ const Subsection = {
mode: "button", mode: "button",
fontSize: 12, fontSize: 12,
bold: true, bold: true,
bgColor: "#eeeeef", bgColor: "#f6f6f6eef",
keyName: "name" keyName: "name"
} }
}; };

View File

@ -19,7 +19,7 @@ function baseRequest(url, method, data, {
return new Promise((reslove, reject) => { return new Promise((reslove, reject) => {
uni.request({ uni.request({
url: Url + 'api' + url, url: Url + '/api' + url,
method: method || 'GET', method: method || 'GET',
header: { header: {
...header ...header