Browse Source

修改样式

hfll
longjieli 3 months ago
parent
commit
5c5a0ab6bb
22 changed files with 445 additions and 548 deletions
  1. +7
    -7
      api/api.js
  2. +7
    -7
      api/http.js
  3. +6
    -1
      components/couponPopup/couponPopup.vue
  4. +90
    -52
      components/product/productItem.vue
  5. +0
    -195
      components/user/couponList.vue
  6. +3
    -0
      pages.json
  7. +7
    -12
      pages/index/category.vue
  8. +9
    -7
      pages/index/center.vue
  9. +8
    -1
      pages/index/index.vue
  10. +61
    -65
      pages/index/order.vue
  11. +1
    -3
      pages_order/auth/wxLogin.vue
  12. +1
    -1
      pages_order/auth/wxUserInfo.vue
  13. +1
    -1
      pages_order/mine/memberCenter.vue
  14. +1
    -1
      pages_order/mine/moreCommodity.vue
  15. +6
    -6
      pages_order/mine/partner.vue
  16. +2
    -2
      pages_order/mine/recruit.vue
  17. +232
    -184
      pages_order/mine/withdraw.vue
  18. +2
    -2
      pages_order/order/createOrder.vue
  19. BIN
      static/image/cart/1.png
  20. BIN
      static/image/cart/2.png
  21. BIN
      static/image/center/head-img.png
  22. +1
    -1
      uni_modules/uv-ui-tools/libs/css/color.scss

+ 7
- 7
api/api.js View File

@ -46,13 +46,13 @@ export function api(key, data, callback, loadingTitle) {
}
//必须登录
if (req.auth) {
if (!uni.getStorageSync('token')) {
utils.toLogin()
console.error('需要登录')
return
}
}
// if (req.auth) {
// if (!uni.getStorageSync('token')) {
// utils.toLogin()
// console.error('需要登录')
// return
// }
// }
// 接口防抖
if(req.debounce){


+ 7
- 7
api/http.js View File

@ -25,13 +25,13 @@ function http(uri, data, callback, method = 'GET', showLoading, title) {
uni.hideLoading();
}
if(res.statusCode == 401 ||
res.data.message == '操作失败,token非法无效!' ||
res.data.message == '操作失败,用户不存在!'){
uni.removeStorageSync('token')
console.error('登录过期');
utils.toLogin()
}
// if(res.statusCode == 401 ||
// res.data.message == '操作失败,token非法无效!' ||
// res.data.message == '操作失败,用户不存在!'){
// uni.removeStorageSync('token')
// console.error('登录过期');
// utils.toLogin()
// }
if(res.statusCode == 200 && res.data.code != 200
&& res.data.code != 902){


+ 6
- 1
components/couponPopup/couponPopup.vue View File

@ -19,7 +19,7 @@
class="register-success"></image>
<view class="shopping">购物即可抵扣</view>
</view>
<image src="@/pages_order/static/coupon/examine.png" mode="widthFix" class="examine"></image>
<image @click="examineCoupon" src="@/pages_order/static/coupon/examine.png" mode="widthFix" class="examine"></image>
</view>
</view>
</uv-overlay>
@ -36,6 +36,11 @@
//
closeCouponPopup() {
this.show = false;
},
//
examineCoupon() {
this.$emit("examine")
}
},
computed: {


+ 90
- 52
components/product/productItem.vue View File

@ -1,39 +1,49 @@
<template>
<view class="item" @click="$emit('click')"
:style="{width}">
<view class="item" @click="$emit('click')">
<!-- 商品图片 -->
<view class="item-image">
<image :src="item.image &&
item.image.split(',')[0]" mode="aspectFill">
</image>
</view>
<!-- 商品信息 -->
<view class="info">
<view class="title"
:style="{width : titleWidth}">
<!-- 商品标题 -->
<view class="title">
{{ item.title }}
</view>
<view class="desc">
{{ item.sku }}
</view>
<view class="price"
v-if="[2].includes(item.type)">
<view class="">
会员价<text>{{ item.vipPrice }}</text>
<!-- 价格 -->
<view class="price">
<view class="money">
<text>{{ item.vipPrice }}/元每件</text>
</view>
<view class="">
零售价<text>{{ item.price }}</text>
<view class="price-imgs">
<image src="@/static/image/category/gold-card-price.png" mode="widthFix" class="price-img"></image>
<image v-if="false" src="@/static/image/category/silver-card-price.png" mode="widthFix"
class="price-img"></image>
<image v-if="false" src="@/static/image/category/diamond-price.png" mode="widthFix"
class="price-img"></image>
</view>
</view>
<view class="price"
v-else>
<view class="">
价格<text>{{ item.price }}</text>
<!-- 销量 -->
<view class="sales-volume">
<view class="sales-volume-imgbox">
<image src="@/static/image/category/sales-volume-icon.png" mode="widthFix" class="sales-volume-img">
</image>
</view>
<view class="">
原价<text>{{ item.oldPrice }}</text>
<view class="sales-volume-number">
已售出32490+
</view>
</view>
<!-- 购买按钮 -->
<view class="buy-btn">
购买
</view>
</view>
</view>
</template>
@ -43,13 +53,7 @@
props: {
item: {
default: {}
},
width : {
default : '100%',
},
titleWidth : {
default : '100px'
},
}
},
data() {
return {
@ -64,6 +68,7 @@
<style scoped lang="scss">
.item {
width: 100%;
padding: 10rpx 20rpx;
align-items: center;
margin-bottom: 20rpx;
@ -71,11 +76,12 @@
box-sizing: border-box;
border-bottom: 1rpx solid #00000012;
background: white;
border-radius: 20rpx;
//
.item-image {
width: 140rpx;
height: 140rpx;
flex-shrink: 0;
width: 180rpx;
height: 180rpx;
image {
height: 100%;
@ -84,42 +90,74 @@
}
}
//
.info {
padding: 20rpx;
color: #555;
flex: 1;
width: calc(100% - 180rpx);
box-sizing: border-box;
overflow: hidden;
//
.title {
width: 300rpx;
width: 100%;
font-size: 28rpx;
font-weight: 900;
overflow:hidden; //
text-overflow:ellipsis; //
white-space:nowrap; //
}
.desc {
font-size: 22rpx;
color: #777;
margin-top: 10rpx;
font-weight: bold;
overflow: hidden; //
text-overflow: ellipsis; //
// white-space: nowrap; //
}
//
.price {
text-align: right;
display: flex;
align-items: center;
color: #f40;
font-size: 26rpx;
text{
.money {
font-size: 30rpx;
font-weight: 900;
}
&>view:nth-child(2){
font-size: 22rpx;
color: #777;
text{
font-size: 26rpx;
font-weight: 900;
.price-imgs {
display: flex;
flex-wrap: wrap;
.price-img {
width: 80rpx;
margin-left: 10rpx;
}
}
}
//
.sales-volume {
display: flex;
align-items: center;
flex-wrap: wrap;
.sales-volume-imgbox {
width: 20rpx;
.sales-volume-img {
width: 100%;
}
}
.sales-volume-number {
color: #B8B8B8;
font-size: 26rpx;
padding-left: 10rpx;
}
}
//
.buy-btn {
background: $uni-color;
color: white;
display: inline-block;
padding: 10rpx 20rpx;
border-radius: 10rpx;
}
}
}

+ 0
- 195
components/user/couponList.vue View File

@ -1,195 +0,0 @@
<template>
<scroll-view
scroll-y="true"
:style="{height: height}"
@scrolltolower="loadMoreData">
<view class="list">
<view class="item"
v-for="(item,index) in list"
@click="select(item)"
:key="index">
<view class="price">
<view class="num">
<view class="icon">
</view>
{{ item.price }}
</view>
<view class="tiao">
{{ item.useType_dictText }}{{ item.conditionPrice }}可用
</view>
</view>
<view class="date">
<view>
有效期{{ item.endTime || '不限' }}
</view>
<view>
{{ item.type_dictText }}使用
</view>
</view>
<view class="status">
<!-- 使 -->
<!-- 使 -->
{{ item.status_dictText }}
</view>
<view class="del"
v-if="isSelect(item)">
</view>
</view>
</view>
<uv-empty
v-if="list.length == 0"
text="空空如也"
textSize="30rpx"
iconSize="200rpx"
icon="list"></uv-empty>
</scroll-view>
</template>
<script>
import mixinList from '@/mixins/list.js'
export default {
name:"couponList",
mixins : [mixinList],
props : {
height : {
default : 'auto'
// default : 'calc(90vh - 180rpx)'
},
//
depositPrice : {
},
washPrice: {//
},
rentPrice: {//
},
},
data() {
return {
mixinsListApi : 'couponPage'
};
},
methods : {
select(item){
if(this.isSelect(item)){
return
}
this.$emit('select', item)
},
isSelect(item){
if(!this.depositPrice && !this.rentPrice && !this.washPrice){
return false
}
//
if(this.depositPrice &&
item.useType == 0 &&
this.depositPrice >= item.conditionPrice){
return false
}
//
if(this.rentPrice &&
item.useType == 1 &&
this.rentPrice >= item.conditionPrice){
return false
}
//
if(this.washPrice &&
item.useType == 2 &&
this.washPrice >= item.conditionPrice){
return false
}
return true
},
}
}
</script>
<style scoped lang="scss">
.list{
.item{
color: #4FD3BC;
position: relative;
width: calc(100% - 40rpx);
height: 220rpx;
background: url(../../static/image/coupon/c.png);
background-size: 100% 100%;
margin: 20rpx;
box-sizing: border-box;
padding: 30rpx;
.status{
position: absolute;
right: 20rpx;
top: 20rpx;
height: calc(100% - 40rpx);
width: 60rpx;
writing-mode:vertical-rl;
box-sizing: border-box;
padding: 20rpx;
background-color: #fff;
border-radius: 60rpx;
font-size: 26rpx;
display: flex;
justify-content: center;
align-items: center;
}
.price{
display: flex;
align-items: center;
.num{
color: #4FD3BC;
font-weight: 900;
font-size: 70rpx;
display: flex;
align-items: flex-end;
.icon{
color: #fff;
background-color: #4FD3BC;
width: 30rpx;
height: 30rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 20rpx;
border-radius: 14rpx;
margin-bottom: 14rpx;
margin-right: 10rpx;
}
}
.tiao{
padding: 10rpx 20rpx;
background-color: #9ee3d1;
color: #25a28c;
font-size: 22rpx;
margin-left: 20rpx;
border-radius: 10rpx;
}
}
.date{
display: flex;
font-size: 24rpx;
view{
margin-right: 20rpx;
}
}
}
.del{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #ffffff99;
z-index: 99;
}
}
</style>

+ 3
- 0
pages.json View File

@ -128,6 +128,9 @@
},
{
"path": "mine/moreCommodity"
},
{
"path": "mine/coupon"
}
]
}],


+ 7
- 12
pages/index/category.vue View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<!-- 导航栏 -->
<navbar title="商品列表" leftClick @leftClick="$utils.navigateBack" />
<navbar title="商品列表" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
<!-- 搜索栏 -->
<view class="search">
@ -11,18 +11,13 @@
<!-- 分类商品列表 -->
<view class="category">
<uv-vtabs :list="category" keyName="title" :barItemBadgeStyle="{right:'20px',top:'12px'}" @change="change">
<uv-vtabs-item>
<!-- <view class="list">
<uv-vtabs :list="category" keyName="title" @change="change">
<view class="list">
<uv-vtabs-item>
<productItem v-for="(item, index) in list" :key="index" :item="item"
titleWidth="350rpx"
@click="$utils.navigateTo('/pages_order/product/productDetail?id=' + item.id)" />
</view> -->
<view class="list">
<productItem v-for="(item, index) in list" :key="index" :item="item" titleWidth="350rpx"
@click="$utils.navigateTo('/pages_order/mine/moreCommodity')" />
</view>
</uv-vtabs-item>
</uv-vtabs-item>
</view>
</uv-vtabs>
</view>
@ -114,7 +109,7 @@
color: #333;
.list {
margin: 0 auto;
width: 100%;
padding: 0rpx 20rpx;
box-sizing: border-box;
}


+ 9
- 7
pages/index/center.vue View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<navbar title="个人中心" />
<!-- 导航栏 -->
<navbar title="个人中心" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
<!-- 头部 -->
<view class="head">
@ -41,7 +41,7 @@
</view>
<!-- 会员卡片 -->
<view class="earnings">
<view @click="$utils.navigateTo({url : '/pages_order/mine/memberCenter' })" class="earnings">
<view v-if="index==1" v-for="(item,index) in memberList" :key="item.id" class="member-item">
<image :src="item.memberBg" mode="widthFix" class="member-image"></image>
@ -129,7 +129,7 @@
<div v-if="showAdvertising" class="ad">
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="true" :interval="2000"
:duration="duration">
<swiper-item v-for="item in 10">
<swiper-item v-for="item in 10" :key="item">
<view class="swiper-main">
<view @click="closeAdvertising" class="close">
<image src="@/static/image/center/close.png" mode="widthFix" class="close-img"></image>
@ -209,18 +209,20 @@
.head {
display: flex;
align-items: center;
padding: 110rpx 20rpx;
padding: 60rpx 20rpx 120rpx 20rpx;
background: $uni-color;
.headImage {
width: 130rpx;
height: 130rpx;
background-image: url(/static/image/center/head-img.png);
background-repeat: no-repeat;
background-position: 50%, 50%;
background-size: 100%;
overflow: hidden;
border-radius: 50%;
margin-right: 40rpx;
image {
width: 100%;
height: 100%;
@ -299,7 +301,7 @@
.earnings {
padding: 20rpx;
box-sizing: border-box;
margin-top: -20%;
margin-top: -22%;
.member-item {
position: relative;


+ 8
- 1
pages/index/index.vue View File

@ -91,7 +91,7 @@
<tabber select="home" />
<!-- 优惠券弹窗 -->
<couponPopup v-model="showCouponPopup"></couponPopup>
<couponPopup v-model="showCouponPopup" @examine="toCoupon"></couponPopup>
</view>
</template>
@ -240,6 +240,13 @@
scroll: function(e) {
},
//
toCoupon() {
uni.navigateTo({
url: "/pages_order/mine/withdraw"
})
}
},
}
</script>


+ 61
- 65
pages/index/order.vue View File

@ -1,27 +1,18 @@
<template>
<view class="page">
<navbar
title="订单中心"
leftClick
@leftClick="$utils.navigateBack"
/>
<uv-tabs :list="tabs"
:activeStyle="{color : '#E3441A', fontWeight : 600}"
lineColor="#E3441A"
lineHeight="8rpx"
lineWidth="50rpx"
:current="current"
:scrollable="false"
@click="clickTabs"></uv-tabs>
<!-- 导航栏 -->
<navbar title="订单中心" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
<!-- 订单筛选 -->
<view class="tabs">
<uv-tabs :list="tabs" :activeStyle="{color : '#fff', fontWeight : 600}" lineColor="#fff"
:inactiveStyle="{color: 'rgba(255,255,255,.8)'}" lineHeight="8rpx" lineWidth="50rpx" :current="current"
:scrollable="false" @click="clickTabs"></uv-tabs>
</view>
<view class="list">
<view class="item"
v-for="(item, index) in list"
@click="toOrderDetail(item.id)"
:key="index">
<view class="item" v-for="(item, index) in list" @click="toOrderDetail(item.id)" :key="index">
<view class="top">
<view class="service">
<!-- <text>{{item.projectId_dictText}}</text>
@ -31,16 +22,13 @@
<text> {{ tabs[Number(item.state) + 1].name }}</text>
</view>
</view>
<view class="content"
:key="index"
v-for="(good, index) in item.commonOrderSkuList">
<view class="content" :key="index" v-for="(good, index) in item.commonOrderSkuList">
<view class="left">
<image mode="aspectFill"
:src="good.image && good.image.split(',')[0]"></image>
<image mode="aspectFill" :src="good.image && good.image.split(',')[0]"></image>
</view>
<view class="right">
<view class="text-hidden-1">
商品{{good.title}}
@ -54,51 +42,49 @@
<!-- <view class="text-hidden-1">
总计时间{{item.useTime}}分钟
</view> -->
</view>
</view>
<view class="bottom">
<view class="price">
实付款<text class="num">{{item.price}}</text>
</view>
<!-- <view class="b1">
查看物流
</view> -->
<view @click.stop="toPayOrder(item)" class="b2"
v-if="item.state == 0">
<view @click.stop="toPayOrder(item)" class="b2" v-if="item.state == 0">
立即付款
</view>
<view class="b2"
@click.stop="confirmOrder(item)"
v-if="item.state == 2">
<view class="b2" @click.stop="confirmOrder(item)" v-if="item.state == 2">
确认收货
</view>
</view>
</view>
</view>
<tabber select="order" />
</view>
</template>
<script>
import { mapGetters } from 'vuex'
import {
mapGetters
} from 'vuex'
import mixinsList from '@/mixins/list.js'
import mixinsOrder from '@/mixins/order.js'
import tabber from '@/components/base/tabbar.vue'
export default {
mixins : [mixinsList, mixinsOrder],
components : {
mixins: [mixinsList, mixinsOrder],
components: {
tabber,
},
computed : {
},
computed: {},
data() {
return {
tabs: [{
@ -117,19 +103,22 @@
name: '已完成'
}
],
current : 0,
mixinsListApi : 'getOrderPageList',
current: 0,
mixinsListApi: 'getOrderPageList',
}
},
onLoad(args) {
this.current = args.type || 0
this.clickTabs({index : this.current})
},
onShow() {
this.clickTabs({
index: this.current
})
},
onShow() {},
methods: {
//tab
clickTabs({index}) {
clickTabs({
index
}) {
console.log(index);
if (index == 0) {
delete this.queryParams.state
@ -149,8 +138,12 @@
</script>
<style scoped lang="scss">
.page{
.page {}
.tabs {
background: $uni-color;
}
.list {
.item {
width: calc(100% - 40rpx);
@ -159,37 +152,37 @@
box-sizing: border-box;
border-radius: 16rpx;
padding: 30rpx;
.top {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 30rpx;
.service {}
.status {
font-size: 26rpx;
font-weight: 600;
}
}
.content {
display: flex;
margin: 10rpx 0;
.left {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
image {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
}
}
.right {
width: calc(100% - 160rpx);
color: #777;
@ -199,24 +192,27 @@
background-color: #F8F8F8;
}
}
.bottom {
display: flex;
justify-content: space-between;
font-size: 25rpx;
.price {
font-weight: 900;
text {
color: #ff780099;
font-size: 30rpx;
}
}
.b1 {
border: 1px solid #777;
color: #777;
box-sizing: border-box;
}
.b2 {
background: $uni-color;
color: #fff;
@ -224,7 +220,7 @@
align-items: center;
justify-content: center;
}
view {
margin: 12rpx;
border-radius: 28rpx;
@ -234,4 +230,4 @@
}
}
}
</style>
</style>

+ 1
- 3
pages_order/auth/wxLogin.vue View File

@ -3,6 +3,7 @@
<view class="logo">
<image :src="configList.logo_image" mode=""></image>
</view>
<view class="title">
欢迎使用{{ configList.logo_name }}
</view>
@ -22,8 +23,6 @@
取消登录
</view>
<view class="config">
<uv-checkbox-group
v-model="checkboxValue"
@ -31,7 +30,6 @@
<view class="content">
<view
style="display: flex;">
<uv-checkbox
size="40rpx"
icon-size="30rpx"


+ 1
- 1
pages_order/auth/wxUserInfo.vue View File

@ -4,7 +4,7 @@
<image :src="configList.logo_image" mode=""></image>
</view> -->
<view class="title">
特易招
陌美人
</view>
<view class="title">
申请获取你的头像昵称


+ 1
- 1
pages_order/mine/memberCenter.vue View File

@ -2,7 +2,7 @@
<template>
<view class="member-center">
<!-- 导航栏 -->
<navbar title="会员中心" leftClick @leftClick="$utils.navigateBack" />
<navbar title="会员中心" leftClick @leftClick="$utils.navigateBack" bgColor="#fff" color="#000" />
<!-- 会员卡片 -->
<swiper :slides-per-view="3" :space-between="50" @swiper="onSwiper" @slideChange="onSlideChange">


+ 1
- 1
pages_order/mine/moreCommodity.vue View File

@ -2,7 +2,7 @@
<template>
<view class="more-commodity">
<!-- 导航栏 -->
<navbar title="商品" leftClick @leftClick="$utils.navigateBack" />
<navbar title="商品" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
<view class="more-commodity-header">
<!-- 搜索栏 -->


+ 6
- 6
pages_order/mine/partner.vue View File

@ -2,7 +2,7 @@
<template>
<view class="partner">
<!-- 导航栏 -->
<navbar title="合伙人" leftClick @leftClick="$utils.navigateBack" />
<navbar title="合伙人" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
<!-- 合伙人信息 -->
<view class="partner-info-bg">
@ -37,7 +37,7 @@
</view>
<view class="tabs">
<uv-tabs :list="tabList" @click="click"></uv-tabs>
<uv-tabs :activeStyle="{ color : '#DC2828' }" lineColor="#DC2828" :list="tabList" @click="click"></uv-tabs>
</view>
<!-- 佣金列表 -->
@ -102,7 +102,7 @@
border-radius: 20rpx;
box-sizing: border-box;
padding: 20rpx;
width: 90%;
width: calc(100% - 40rpx);
margin: 0rpx auto;
.profile-photo {
@ -165,7 +165,7 @@
font-size: 45rpx;
color: $uni-color;
font-weight: bold;
.unit {
font-size: 32rpx;
}
@ -230,14 +230,14 @@
width: calc(100% - 100rpx);
padding: 0rpx 20rpx;
box-sizing: border-box;
.name {
font-size: 32rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.time {
color: #999999;
font-size: 26rpx;


+ 2
- 2
pages_order/mine/recruit.vue View File

@ -1,8 +1,8 @@
<!-- 合伙人招募令页面 -->
<!-- 合伙人页面 -->
<template>
<view class="recruit">
<!-- 导航栏 -->
<navbar title="合伙人" leftClick @leftClick="$utils.navigateBack" />
<navbar title="合伙人" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
<view class="b-relative" style="width: 710rpx;margin: 20rpx;">
<image src="@/pages_order/static/recruit/bg.png" style="width: 710rpx;height: 310rpx;"></image>


+ 232
- 184
pages_order/mine/withdraw.vue View File

@ -1,236 +1,284 @@
<template>
<view class="page">
<navbar title="提现"
bgColor="#A3D250"
color="#fff"
leftClick
@leftClick="$utils.navigateBack" />
<view class="bg"/>
<view class="price">
<!-- <view class="title">
请输入提现金额
</view> -->
<view class="input-box">
<view class="input">
<input type="number" v-model="form.money"
placeholder="请输入提现金额"/>
</view>
<view class=""
@click="selectAll">
全部提现
</view>
<!-- 导航栏 -->
<navbar title="提现" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
<!-- 佣金信息 -->
<view class="b-relative center font-m">
<image src="@/pages_order/static/withdraw/cz.png" />
<view class="user-money">
<view class="title">总佣金</view>
<view class="money">999999</view>
</view>
<view class="input-box">
<view class="input">
<input type="text" v-model="form.bankName"
placeholder="请输入开户行"/>
<view class="operation">
<view class="operation-item">
余额记录
</view>
</view>
<view class="input-box">
<view class="input">
<input type="text" v-model="form.bankNo"
placeholder="请输入银行卡号"/>
|
<view class="operation-item">
提现记录
</view>
|
<view class="operation-item">
佣金记录
</view>
</view>
<view class="num">
可提现金额{{ riceInfo.canWithdraw || 0 }}
</view>
</view>
<view class="cell">
<view class="cell-top">提现说明</view>
<view style="padding: 0 20rpx;">
<uv-parse :content="configList.withdrawal_instructions"></uv-parse>
<!-- 我要提现 -->
<view class="from-body">
<view>我要提现</view>
<view class="money">
<van-cell-group inset>
<van-field type="number" v-model="form.price" placeholder="请输入提现金额"
style="background-color: #F5F5F5; margin: 10rpx 0px; border-radius: 20px;" />
<van-field v-model="form.bank" placeholder="请输入开户行"
style="background-color: #F5F5F5; margin: 10rpx 0px; border-radius: 20px;" />
<van-field v-model="form.card" placeholder="请输入卡号"
style="background-color: #F5F5F5; margin: 10rpx 0px; border-radius: 20px;" />
</van-cell-group>
</view>
<view v-html="withdrawalStatement" class="withdrawal-statement"></view>
</view>
<view class="uni-color-btn"
@click="submit">
提现
</view>
<view class="cell">
<view class="cell-top">提现记录</view>
<view class="cell-box"
:key="index"
v-for="(item,index) in list">
<uv-cell-group>
<uv-cell
:title="item.title"
:label="item.createTime"
:center="true">
<template #value>
<view class="cell-text">
<view class="price-text"
v-if="item.type">{{ type[item.type] }}{{ item.money }}</view>
<view class="price-text add"
v-else>{{ type[item.type] }}{{ item.money }}</view>
<view class="tips">{{ state[item.state] }}</view>
</view>
</template>
</uv-cell>
</uv-cell-group>
<view class="recharge">
<view @click="withdraw" class="btn">
立即提现
</view>
</view>
</view>
</template>
<script>
import mixinsList from '@/mixins/list.js'
import { mapState } from 'vuex'
import {
mapState
} from 'vuex'
export default {
mixins : [mixinsList],
mixins: [mixinsList],
data() {
return {
mixinsListApi : 'getWaterPageList',
list : [],
type : ['+', '-'],
state : ['未到账', '已到账'],
form : {
money : '',
bankNo : '',
bankName : '',
mixinsListApi: 'getWaterPageList',
list: [],
type: ['+', '-'],
state: ['未到账', '已到账'],
form: {
money: '',
bankNo: '',
bankName: '',
},
}
},
computed: {
...mapState(['userInfo', 'riceInfo']),
},
data() {
return {
withdrawalStatement: '', //
form: {
type: 1,
price: undefined,
bank: '',
card: ''
},
}
},
onShow() {
this.$store.commit('getUserInfo')
this.$store.commit('getRiceInfo')
this.getConfig()
this.getUserInfo()
this.getTenRealName()
},
methods: {
selectAll(){
this.form.money = this.riceInfo.canWithdraw
getConfig() { //
this.$api('getConfig', {}, res => {
if (res.code == 200) {
res.result.forEach(item => {
if (item.keyValue === 'withdraw') {
this.withdrawalStatement = item.content
}
})
}
})
},
submit(){
if(this.$utils.verificationAll(this.form, {
money : '请输入金额',
bankName : '请输入开户行',
bankNo : 'bankNo',
})){
return
}
if(this.form.money <= 0){
uni.showToast({
title: '输入金额必须大于0',
withdraw() { //
let isOk = this.parameterVerification();
if (isOk && !isOk.auth) {
return uni.showToast({
title: isOk.title,
icon: 'none'
})
return
}
this.$api('withdraw', this.form, res => {
if(res.code == 200){
this.$api('recharge', this.form, res => {
if (res.code == 200) {
uni.showToast({
title: '提现成功',
icon : 'none'
icon: 'none'
})
this.form.money = ''
this.$store.commit('getUserInfo')
this.$store.commit('getRiceInfo')
this.getData()
this.getUserInfo()
}
})
},
},
getTenRealName() { //
this.$api('getTenRealName', {}, res => {
if (res.code == 200) {
let result = res.result;
if (result && result.bank && result.card) {
this.form.bank = result.bank
this.form.card = result.card
}
}
})
},
parameterVerification() { //
let {
price,
bank,
card
} = this.form
if (!price) {
return {
title: '请填写提现金额',
auth: false
}
} else if (price <= 0) {
return {
title: '提现金额必须大于0',
auth: false
}
} else if (price > this.userInfo.price) {
return {
title: '提现金额大于余额',
auth: false
}
} else if (bank.trim() == '') {
return {
title: '请填写开户行',
auth: false
}
} else if (card.trim() == '') {
return {
title: '请填写卡号',
auth: false
}
}
return {
title: '验证通过',
auth: true
}
}
}
}
</script>
<style scoped lang="scss">
.page{
.bg{
background-color: $uni-color;
height: 640rpx;
position: absolute;
left: 0;
width: 100%;
z-index: -1;
border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 30rpx;
}
.price{
color: #FFFFFF;
padding: 40rpx;
.title{
color: #eee;
font-size: 28rpx;
.page {
//
.center {
position: relative;
width: 710rpx;
height: 316rpx;
margin: 20rpx auto;
}
.input-box{
background-color: #FFFFFF;
color: $uni-color;
.center image {
position: absolute;
left: 0;
top: 0;
width: 710rpx;
height: 316rpx;
border-radius: 12rpx;
}
.center .user-money {
position: absolute;
top: 50%;
transform: translateY(-50%);
z-index: 9;
color: white;
padding-left: 50rpx;
box-sizing: border-box;
.title {
font-size: 36rpx;
}
.money {
font-size: 40rpx;
}
}
.operation {
position: absolute;
bottom: 20rpx;
left: 0rpx;
width: 100%;
display: flex;
justify-content: center;
border-radius: 30rpx;
align-items: center;
padding: 10rpx;
margin: 20rpx 0;
.input{
color: #000;
// font-size: 40rpx;
// font-weight: 900;
display: flex;
flex: 1;
input{
flex: 1;
padding: 14rpx 20rpx;
}
color: white;
.operation-item {
margin: 0rpx 20rpx;
}
}
.num{
font-size: 30rpx;
font-weight: 900;
margin-top: 10rpx;
//
.from-body {
padding: 40rpx 20rpx;
font-size: 28rpx;
text-align: left;
color: #333333;
}
}
.cell {
margin: 20rpx;
background-color: #FFFFFF;
border-radius: 16rpx;
.cell-top {
padding: 40rpx 34rpx;
color: #474747;
font-size: 34rpx;
font-weight: 600;
position: relative;
&::after{
content: '';
display: block;
position: absolute;
left: 55rpx;
bottom: 38rpx;
height: 10rpx;
width: 120rpx;
background: linear-gradient(to right, #fff, $uni-color);
}
.money {
margin: 20rpx 0rpx;
}
.cell-text{
text-align: right;
.price-text{
font-size: 32rpx;
font-weight: 900;
}
.add{
color: #f40;
}
.tips{
font-size: 22rpx;
color: #aaa;
margin-top: 10rpx;
.money .van-cell-group--inset {
margin: 0;
}
.money .van-field {
padding: auto 0rpx;
margin-bottom: 30rpx !important;
}
.recharge {
position: fixed;
display: flex;
justify-content: center;
align-items: center;
left: 0;
bottom: 0;
width: 750rpx;
height: 100rpx;
background: white;
}
.recharge .btn {
width: 85%;
height: 80rpx;
border-radius: 40rpx;
color: white;
text-align: center;
line-height: 80rpx;
font-size: 28rpx;
background: $uni-color;
}
@media all and (min-width: 961px) {
.recharge {
left: 50% !important;
transform: translateX(-50%);
}
}
}
}
</style>
</style>

+ 2
- 2
pages_order/order/createOrder.vue View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<!-- 导航栏 -->
<navbar title="确认订单" leftClick @leftClick="$utils.navigateBack" />
<navbar title="确认订单" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
<view class="bac"></view>
@ -30,7 +30,7 @@
</view>
<!-- 地址 -->
<view class="cell-item">
<view @click="openAddress" class="cell-item">
<view class="cell-item-left">
<image src="@/pages_order/static/createOrder/address.png" mode="widthFix" class="cell-icon"></image>
<view class="user-name">李满和</view>


BIN
static/image/cart/1.png View File

Before After
Width: 36  |  Height: 36  |  Size: 1.9 KiB

BIN
static/image/cart/2.png View File

Before After
Width: 72  |  Height: 72  |  Size: 5.4 KiB

BIN
static/image/center/head-img.png View File

Before After
Width: 60  |  Height: 60  |  Size: 2.9 KiB Width: 60  |  Height: 60  |  Size: 2.4 KiB

+ 1
- 1
uni_modules/uv-ui-tools/libs/css/color.scss View File

@ -6,7 +6,7 @@ $uv-border-color: #dadbde !default;
$uv-bg-color: #f3f4f6 !default;
$uv-disabled-color: #c8c9cc !default;
$uv-primary: #3c9cff !default;
$uv-primary: #E3441A !default;
$uv-primary-dark: #398ade !default;
$uv-primary-disabled: #9acafc !default;
$uv-primary-light: #ecf5ff !default;


Loading…
Cancel
Save