Browse Source

上传

master
前端-胡立永 3 months ago
parent
commit
5617119dd2
7 changed files with 70 additions and 19 deletions
  1. +0
    -3
      api/api.js
  2. +1
    -1
      config.js
  3. +2
    -2
      pages/index/center.vue
  4. +18
    -0
      pages/index/index.vue
  5. +4
    -0
      pages/index/order.vue
  6. +1
    -1
      pages_order/components/product/submitUnitSelect.vue
  7. +44
    -12
      pages_order/order/createWash.vue

+ 0
- 3
api/api.js View File

@ -31,20 +31,17 @@ const config = {
bannerList: {
url: '/banner/list',
method: 'GET',
showLoading: true,
},
// 公告列表
noticeList: {
url: '/notice/list',
method: 'GET',
showLoading: true,
},
// 公告详情
noticeOne: {
url: '/notice/one',
method: 'GET',
showLoading: true,
},


+ 1
- 1
config.js View File

@ -7,7 +7,7 @@ import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI);
// 当前环境
const type = 'prod'
const type = 'dev'
// 环境配置


+ 2
- 2
pages/index/center.vue View File

@ -83,7 +83,7 @@
<image src="/static/image/center/1.png" mode=""></image>
</view>
<view class="">
余额 {{ userInfo.balance || 0 }}
余额 {{ userInfo.wallet.balance || 0 }}
</view>
</view>
<view class="item">
@ -91,7 +91,7 @@
<image src="/static/image/center/4.png" mode=""></image>
</view>
<view class="">
押金{{ userInfo.deposit || 0 }}
押金{{ userInfo.wallet.deposit || 0 }}
</view>
</view>
</view>


+ 18
- 0
pages/index/index.vue View File

@ -50,6 +50,7 @@
<view class="list">
<view class="item"
v-for="(item, index) in statisticsKey"
@click="toUrl(index)"
:key="index">
<view class="">
<view class="">
@ -203,6 +204,23 @@
...mapState(['bindShop', 'statistics']),
},
methods: {
toUrl(index){
if(index == 0){
}else if(index == 1){
uni.reLaunch({
url: '/pages/index/order?current=2'
})
}else if(index == 2){
uni.reLaunch({
url: '/pages/index/order?current=4'
})
}else{
uni.reLaunch({
url: '/pages/index/order?current=3'
})
}
},
banner(){
this.$api('bannerList', res => {
if(res.code == 200){


+ 4
- 0
pages/index/order.vue View File

@ -12,6 +12,7 @@
lineColor="#FD5100"
lineHeight="8rpx"
lineWidth="50rpx"
:current="current"
@click="clickTabs"></uv-tabs>
<view v-if="orderList.records.length > 0" class="list">
@ -278,10 +279,12 @@
type : -1,
uid : 0,
orderId : 0,
current : 0,
}
},
onLoad(args) {
this.uid = args.uid || 0
this.current = args.current || 0
},
onShow() {
this.getData()
@ -322,6 +325,7 @@
},
//tab
clickTabs({ index, name }) {
this.current = index
if (index == 0) {
this.type = -1;
} else {


+ 1
- 1
pages_order/components/product/submitUnitSelect.vue View File

@ -278,7 +278,7 @@
this.$api('tablecloth', form, res => {
if (res.code == 200) {
uni.redirectTo({
url: '/pages/index/order'
url: '/pages_order/order/createWash?id=1'
})
}
})


+ 44
- 12
pages_order/order/createWash.vue View File

@ -4,8 +4,13 @@
<view class="tabs">
<uv-tabs :list="tabs" :activeStyle="{color : '#FD5100', fontWeight : 600}" lineColor="#FD5100" lineHeight="8rpx"
lineWidth="50rpx" :scrollable="false" @click="clickTabs"></uv-tabs>
<uv-tabs :list="tabs"
:activeStyle="{color : '#FD5100', fontWeight : 600}"
lineColor="#FD5100" lineHeight="8rpx"
lineWidth="50rpx"
:current="current"
:scrollable="false"
@click="clickTabs"></uv-tabs>
</view>
<!-- 选择租赁物品 -->
@ -28,8 +33,8 @@
<view class="info">
<view class="title">
<view>{{ item.goodsName }}</view>
<view>
<view class="text-ellipsis">{{ item.goodsName }}</view>
<view style="flex-shrink: 0;">
数量{{ item.num }}
</view>
</view>
@ -48,7 +53,12 @@
</view>
<view class="" v-if="item.washPrice">
水洗费
<text>{{ item.washPrice }}</text>
<text>
{{
((item.washUnitPrice || 0) * item.selectNum)
.toFixed(2)
}}
</text>
</view>
</view>
@ -83,7 +93,8 @@
</view>
<view class="text">
<!-- {{ checkboxValue.length }}已享受更低优惠 -->
含租金{{zujin}}水洗费{{washPrice}}
含租金{{ zujin && zujin.toFixed(2) }}
水洗费{{ washPrice && washPrice.toFixed(2) }}
</view>
</view>
<view class="btn2" @click="goCleaning">结算</view>
@ -112,7 +123,7 @@
data() {
return {
checkboxValue : [],
statusText : ['正常', '换货中', '退货中'],
// statusText : ['', '', '退'],
tabs: [{
name: '选择租赁物品'
},
@ -120,13 +131,17 @@
name: '选择我的物品'
},
],
type: 1,
current : 0,//
mixinsListApi : 'getLeasePage',
}
},
computed : {
price(){
return this.washPrice + this.zujin
let price = parseFloat(this.washPrice) + parseFloat(this.zujin)
if(price){
return (this.washPrice + this.zujin).toFixed(2)
}
return 0
},
washPrice(){
if(this.checkboxValue.length == 0){
@ -137,7 +152,7 @@
this.list.forEach(n => {
if(this.checkboxValue.includes(n.id)){
price += n.washPrice || 0
price += (n.washUnitPrice || 0) * n.selectNum
}
})
return price
@ -146,6 +161,9 @@
// if(this.checkboxValue.length == 0){
// return 0
// }
if(this.list.length == 0){
return 0
}
let price = 0
@ -157,6 +175,12 @@
return price
},
},
onLoad(args) {
if(args.id){
// this.checkboxValue = [args.id]
this.current = 1
}
},
onShow() {
this.getData()
},
@ -166,7 +190,7 @@
index,
name
}) {
this.type = index ? 0 : 1;
this.current = index
this.queryParams.pageSize = 10
this.checkboxValue = []
// this.mixinsListApi = ['orderPage', 'orderPage'][index]
@ -176,7 +200,7 @@
beforeGetData(){
let data = {}
data.leaseFlag = this.type
data.leaseFlag = this.current ? 0 : 1;
return data
},
@ -213,6 +237,7 @@
leaseId: records[i].id, //id
addressId, //id
type : 1,
num : records[i].selectNum
})
}
}
@ -318,6 +343,7 @@
display: flex;
justify-content: center;
align-items: center;
flex-shrink: 0;
}
.image {
@ -333,6 +359,12 @@
display: flex;
padding: 6rpx 20rpx;
justify-content: space-between;
.text-ellipsis{
width: 280rpx;
overflow: hidden; //
text-overflow: ellipsis; //
white-space: nowrap; //
}
}
.unit {


Loading…
Cancel
Save