This commit is contained in:
weipengfei 2024-05-11 16:45:40 +08:00
commit 65d74155b5
9 changed files with 1278 additions and 1020 deletions

View File

@ -27,7 +27,7 @@
</view>
</view>
</scroll-view>
<up-button color="#20B128" shape="circle" @click="submitAddress">确认自点</up-button>
<up-button color="#20B128" shape="circle" @click="submitAddress">确认提货点 </up-button>
</view>
</up-popup>
</template>

View File

@ -0,0 +1,15 @@
<template>
<view class="content">
<view class="head">
<!-- -->
</view>
</view>
</template>
<script>
</script>
<style>
</style>

View File

@ -0,0 +1,11 @@
<template>
<view class="">
明细
</view>
</template>
<script>
</script>
<style>
</style>

165
pageQuota/Balance/index.vue Normal file
View File

@ -0,0 +1,165 @@
<template>
<view class="content">
<view class="total">
<view class="">
账户总余额()
</view>
<view style="font-size: 36rpx;">
1860.00
</view>
</view>
<view class="action">
<view class="">
提现至
</view>
<view style="font-weight: bold;">
请选择提现账户
</view>
<view style="display: flex;align-items: center;color: #20B128;"
@click="navgo('/pageQuota/Balance/bindAccout')">
<text>绑定账户</text> <up-icon color="#20B128" name="arrow-right"></up-icon>
</view>
</view>
<view class="form">
<!-- 注意如果需要兼容微信小程序最好通过setRules方法设置rules规则 -->
<up-form labelPosition="left" borderBottom :label-style="{fontSize:'30rpx'}" :model="model1" :rules="rules"
ref="form1" labelWidth='70'>
<up-form-item label="银行卡" prop="userInfo.name" borderBottom ref="item1">
<template #right>
<view style="display: flex;align-items: center;">
<text style="color: #20B128;">选择银行</text> <up-icon color="#20B128"
name="arrow-right"></up-icon>
</view>
</template>
</up-form-item>
<up-form-item label="持卡人" prop="userInfo.name" borderBottom ref="item1">
<up-input style="border: none;" v-model="form.name" placeholder="请输入持卡人姓名" />
</up-form-item>
<up-form-item label="银行账户" prop="userInfo.name" borderBottom ref="item1">
<up-input style="border: none;" v-model="form.name" placeholder="请输入银行账户" />
</up-form-item>
<up-form-item label="开户网点" prop="userInfo.name" borderBottom ref="item1">
<up-input style="border: none;" v-model="form.name" placeholder="请输入开户网点" />
</up-form-item>
<up-form-item label="提现金额" prop="userInfo.name" borderBottom ref="item1">
<up-input style="border: none;" v-model="form.name" placeholder="请输入提现金额" />
</up-form-item>
</up-form>
</view>
<view class="submit-btn">
<up-button text="提现" shape="circle" color="#50C758"></up-button>
</view>
</view>
</template>
<script setup>
import {
ref,
reactive
} from 'vue';
const navgo = (url) => {
uni.navigateTo({
url
})
}
const form = reactive({
name: ""
})
// 使 reactive
const state = reactive({
showSex: false,
model1: {
userInfo: {
name: 'uview-plus UI',
sex: '',
},
},
actions: [{
name: '男'
},
{
name: '女'
},
{
name: '保密'
},
],
rules: {
'userInfo.name': {
type: 'string',
required: true,
message: '请填写姓名',
trigger: ['blur', 'change'],
},
'userInfo.sex': {
type: 'string',
max: 1,
required: true,
message: '请选择男或女',
trigger: ['blur', 'change'],
},
},
radio: '',
switchVal: false,
});
// 使 ref
const formRef = ref(null);
//
function sexSelect(e) {
state.model1.userInfo.sex = e.name;
if (formRef.value) {
formRef.value.validateField('userInfo.sex');
}
}
</script>
<style lang="scss">
.content {
padding: 20rpx;
.total {
background-color: #50C758;
border-radius: 16rpx 16rpx 16rpx 16rpx;
color: white;
display: flex;
justify-content: space-between;
padding: 42rpx 30rpx;
font-size: 30rpx;
margin-bottom: 30rpx;
}
.action {
background-color: white;
border-radius: 16rpx 16rpx 16rpx 16rpx;
padding: 30rpx;
display: flex;
justify-content: space-between;
margin-bottom: 30rpx;
}
.form {
padding: 28rpx 30rpx;
background-color: white;
border-radius: 20rpx;
}
}
.submit-btn {
position: fixed;
bottom: 146rpx;
width: 710rpx;
}
</style>

View File

@ -58,10 +58,17 @@
v-model="item.price"></up-input>
</view>
</view>
<view class="status-png" v-if="tabIndex==2">
<image :src="item.is_adopt?successPng:errPng" style="width: 108rpx; height: 84rpx;">
<!-- <view class="status-png" v-if="tabIndex==2">
<image v-if="is_storage==1 && is_adopt == 1" :src="waitPng"
style="width: 108rpx; height: 84rpx;">
</image>
</view>
<image v-else-if="is_storage==0 && is_adopt == 1" :src="waitPng"
style="width: 108rpx; height: 84rpx;">
</image>
<image v-else :src="waitPng" style="width: 108rpx; height: 84rpx;">
</image>
</view> -->
</view>
<view class="card-footer" v-if="item.nums && item.price">
{{item.nums}}{{item.unit_name}}&nbsp; &nbsp;合计:<text
@ -114,7 +121,15 @@
</view>
</view>
<view class="status-png" v-if="tabIndex==2">
<image :src="item.is_adopt?successPng:errPng" style="width: 108rpx; height: 84rpx;">
<!-- <image :src="item.is_adopt?successPng:errPng" style="width: 108rpx; height: 84rpx;">
</image> -->
<image v-if="is_storage==1 && is_adopt == 1" :src="successPng"
style="width: 108rpx; height: 84rpx;">
</image>
<image v-else-if="is_storage==0 && is_adopt == 1" :src="errPng"
style="width: 108rpx; height: 84rpx;">
</image>
<image v-else :src="waitPng" style="width: 108rpx; height: 84rpx;">
</image>
</view>
</view>
@ -160,6 +175,8 @@
// url
const successPng = ref('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/739c3202405071458553459.png')
const errPng = ref('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/04c2c202405071501462462.png')
const waitPng = ref('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/274ad202405111523222891.png')
// url

View File

@ -110,6 +110,26 @@
"navigationBarTitleText": "关于我们",
"enablePullDownRefresh": false
}
}, {
"path": "Balance/index",
"style": {
"navigationBarTitleText": "我的余额",
"enablePullDownRefresh": false
}
},
{
"path": "Balance/bindAccout",
"style": {
"navigationBarTitleText": "绑定账户",
"enablePullDownRefresh": false
}
},
{
"path": "Balance/detail",
"style": {
"navigationBarTitleText": "明细",
"enablePullDownRefresh": false
}
},
{
"path": "feedBack/index",

View File

@ -22,8 +22,8 @@
<view class='headScoll' ref='headscroll' :style="{height:isScroll?'0':'200rpx'}">
<scroll-view class="head-view" scroll-x>
<view class="list">
<view class="item" :class="{'item-active': topActive===item.id}" v-for="(item, index) in goodClassList"
:key="index" @click="changeOne(item, index)">
<view class="item" :class="{'item-active': topActive===item.id}"
v-for="(item, index) in goodClassList" :key="index" @click="changeOne(item, index)">
<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>
@ -42,8 +42,8 @@
<view class="head-title">全部分类</view>
<scroll-view scroll-y style="height: 600rpx;">
<view class="list">
<view class="item" :class="{'item-active': topActive===item.id}" v-for="(item, index) in goodClassList"
:key="index" @click="changeOne(item, index)">
<view class="item" :class="{'item-active': topActive===item.id}"
v-for="(item, index) in goodClassList" :key="index" @click="changeOne(item, index)">
<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>
@ -54,8 +54,8 @@
</viewPopup>
<view class="scroll-box">
<scroll-view class="left" scroll-y>
<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.name}}
<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.name}}
</view>
<view style="width: 100%;height: 450rpx;"></view>
</scroll-view>
@ -77,24 +77,28 @@
<view class="item" :class="{'order-active': where.order==''}" @click="changeOrder('')">综合</view>
<view class="item" :class="{'order-active': where.order=='desc'||where.order=='asc'}"
@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>
<viewPopup v-if="show===2" @close="show=0">
<view class="cateOne">
<scroll-view scroll-y style="height: 230rpx;">
<view class="classify-list">
<view class="classify-list-item u-line-1" :class="{'item-active': rightActive===item.id}"
v-for="(item, index) in goodClassThree" :key="index" @click="changeThree(item, index)">
<view class="classify-list-item u-line-1"
:class="{'item-active': rightActive===item.id}"
v-for="(item, index) in goodClassThree" :key="index"
@click="changeThree(item, index)">
{{item.name}}
</view>
</view>
</scroll-view>
</view>
</viewPopup>
<scroll-view class="list" id='drag_area' style="overscroll-behavior: none;" @scroll="hideHeadView" scroll-y
@scrolltolower="loadMoreGood">
<view class="shop-item" v-for="(item, index) in goodList" :key="item.id" @click="openGoodPopup(item)">
<scroll-view class="list" id='drag_area' style="overscroll-behavior: none;" @scroll="hideHeadView"
scroll-y @scrolltolower="loadMoreGood">
<view class="shop-item" v-for="(item, index) in goodList" :key="item.id"
@click="openGoodPopup(item)">
<view class="shop-img">
<up-image width="120rpx" height="120rpx" :src="item.imgs"></up-image>
</view>
@ -102,9 +106,10 @@
<view class="title">
<view class="name u-line-2">{{item.name}}</view>
<view class="tip u-line-1">
<text>{{item.brand_name}}|</text>
<text>{{item.class_name}}|</text>
<text>{{item.unit_name}}</text>
<text>{{item.spec}}</text>
<!-- <text>{{item.brand_name}}|</text> -->
<!-- <text>{{item.class_name}}|</text> -->
<!-- <text>{{item.unit_name}}</text> -->
</view>
</view>
<view class="price-btn">

View File

@ -46,6 +46,7 @@
<view class="card">
<up-cell-group>
<up-cell title="我的地址" :isLink="true" url="/pagesOrder/addressList/addressList"></up-cell>
<up-cell title="我的余额" :isLink="true" url="/pageQuota/Balance/index"></up-cell>
</up-cell-group>
</view>

View File

@ -19,8 +19,9 @@
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="loadMoreGood">
<view class="page-box">
<view v-if="list.length>0" class="list">
<good v-for="(item, index) in list" :datas="item" :key="index" :type="k" @cancleOrder="cancleOrder"
@takeOrder="takeOrder" @rePay="rePay" @purchaseAgain="purchaseAgain"></good>
<good v-for="(item, index) in list" :datas="item" :key="index" :type="k"
@cancleOrder="cancleOrder" @takeOrder="takeOrder" @rePay="rePay"
@purchaseAgain="purchaseAgain"></good>
</view>
<view v-if="!where[k].loading&&list.length==0" style="padding-top: 100rpx;">
<up-empty text="订单空空如也"
@ -41,32 +42,55 @@
</swiper-item>
</swiper>
<orderCanclePopup :show="showCancel" @close="showCancel=false" @change="submitCancel" />
<modal :show="showTake" title="确认收货" content="请确认您已收到货" @close="showTake=false" @change="confirmReceipt"></modal>
<modal :show="showTake" title="确认收货" content="请确认您已收到货" @close="showTake=false" @change="confirmReceipt">
</modal>
</view>
</template>
<script setup>
import { onLoad, onUnload } from "@dcloudio/uni-app"
import { ref } from 'vue';
import {
onLoad,
onUnload
} from "@dcloudio/uni-app"
import {
ref
} from 'vue';
import good from "./component/good.vue";
import orderCanclePopup from "@/components/orderCanclePopup.vue"
import modal from "@/components/modal.vue"
import { cancelOrderApi, rePaymentApi, confirmReceiptApi, orderListApi, purchaseAgainApi } from "@/api/order.js"
import {
cancelOrderApi,
rePaymentApi,
confirmReceiptApi,
orderListApi,
purchaseAgainApi
} from "@/api/order.js"
const tabsActive = ref(0)
const changeTab = ({ index }) => {
const changeTab = ({
index
}) => {
tabsActive.value = index;
swiperCurrent.value = index;
}
const tablist = ref([
{ name: '全部' },
{ name: '待付款' },
{ name: '待收货' },
const tablist = ref([{
name: '全部'
},
{
name: '待付款'
},
{
name: '待收货'
},
// { name: '退/' },
]);
const swiperCurrent = ref(0);
const animationfinish = ({ detail: { current } }) => {
const animationfinish = ({
detail: {
current
}
}) => {
swiperCurrent.value = current;
tabsActive.value = current;
if (swiperCurrent.value == 0 && orderList.value[0].length == 0) getOrderList(0);
@ -270,6 +294,6 @@
.page-box {
margin: 20rpx;
.list {}
// .list {}
}
</style>