变更商品数量,调整字段错误,推荐关系页面调整

This commit is contained in:
唐明明
2021-11-12 16:23:35 +08:00
parent 1def6bcbfc
commit 24b23ac13c
9 changed files with 431 additions and 421 deletions

View File

@@ -1,4 +1,3 @@
/** /**
* Web唐明明 * Web唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。 * 匆匆数载恍如梦,岁月迢迢华发增。
@@ -6,7 +5,9 @@
* moduleName: 商品 * moduleName: 商品
*/ */
import { request } from '../index' import {
request
} from '../index'
// 商品管理-商品列表 // 商品管理-商品列表

View File

@@ -2,8 +2,8 @@
"name" : "链商星球", "name" : "链商星球",
"appid" : "__UNI__1F65101", "appid" : "__UNI__1F65101",
"description" : "安徽星煌,链商星球商家工具", "description" : "安徽星煌,链商星球商家工具",
"versionName" : "1.1.8", "versionName" : "1.1.9",
"versionCode" : 118, "versionCode" : 119,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@@ -160,7 +160,6 @@
"path": "pages/user/order/servicesOrder", "path": "pages/user/order/servicesOrder",
"name": "ServicesOrder", "name": "ServicesOrder",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarTitleText": "已使用服务类订单", "navigationBarTitleText": "已使用服务类订单",
"app-plus":{ "app-plus":{

View File

@@ -17,7 +17,7 @@
<view class="sku"> <view class="sku">
<span>数量</span> <span>数量</span>
<span> <span>
<u-number-box v-model="params.qty" :min='1' :max='1000' @change='numberBoxChange' /> <u-number-box v-model="params.qty" :min='1' :max='info.stock' @change='numberBoxChange' />
</span> </span>
</view> </view>
</view> </view>
@@ -91,14 +91,8 @@
<script> <script>
import couponTemplate from "@/components/coupon-template/coupon-template-2" import couponTemplate from "@/components/coupon-template/coupon-template-2"
import { import { mallBuyGoods } from '@/apis/interfaces/goods'
mallBuyGoods import { wxPay, aliPay, ebPay } from '@/apis/interfaces/order'
} from '@/apis/interfaces/goods'
import {
wxPay,
aliPay,
ebPay
} from '@/apis/interfaces/order'
export default { export default {
name: 'OrderInfo', name: 'OrderInfo',
components: { components: {
@@ -106,10 +100,6 @@
}, },
data() { data() {
return { return {
// box: {
// min: 1,
// max: 100
// },
amount : 0, amount : 0,
account : {}, account : {},
total : 0, total : 0,
@@ -150,10 +140,9 @@
this.nowPay() this.nowPay()
} }
}).catch(err => { }).catch(err => {
this.$refs.uToast.show({ uni.showToast({
title: err.message, title: err.message,
type: 'primary', icon : 'none'
duration: 3000
}) })
}) })
}, },
@@ -268,8 +257,9 @@
if (this.info.is_change) { if (this.info.is_change) {
this.selectTypeId = id this.selectTypeId = id
} else { } else {
this.$refs.uToast.show({ uni.showToast({
title: '当前商品不支持EB支付' title: '当前商品不支持EB支付',
icon : 'none'
}) })
} }
} else if (id === '2') { } else if (id === '2') {

View File

@@ -6,7 +6,7 @@
<view class="content"> <view class="content">
<view class="title nowrap">数字权证</view> <view class="title nowrap">数字权证</view>
<view class="text nowrap">锚定商品{{info.goods.goods_name}}</view> <view class="text nowrap">锚定商品{{info.goods.goods_name}}</view>
<view class="text nowrap">提供企业{{info.company.name}}</view> <view class="text nowrap">供应商{{info.company.name}}</view>
<view class="text nav-goods nowrap" @click="onGoods">查看锚定商品信息<uni-icons type="arrowright" size="12" color="#8b64fd"></uni-icons></view> <view class="text nav-goods nowrap" @click="onGoods">查看锚定商品信息<uni-icons type="arrowright" size="12" color="#8b64fd"></uni-icons></view>
</view> </view>
<view class="info"> <view class="info">

View File

@@ -16,7 +16,7 @@
<view class="content"> <view class="content">
<view class="title nowrap">数字权证<text>{{item.surplus}}/{{item.stock}}</text></view> <view class="title nowrap">数字权证<text>{{item.surplus}}/{{item.stock}}</text></view>
<view class="text nowrap">锚定商品{{item.goods.goods_name}}</view> <view class="text nowrap">锚定商品{{item.goods.goods_name}}</view>
<view class="text nowrap">提供企业{{item.company.name}}</view> <view class="text nowrap">供应商{{item.company.name}}</view>
<view class="text nowrap">转让用户{{item.user.nickname}}</view> <view class="text nowrap">转让用户{{item.user.nickname}}</view>
</view> </view>
<view class="price">{{item.price}}/</view> <view class="price">{{item.price}}/</view>

View File

@@ -2,37 +2,29 @@
<view class="NumberWeight"> <view class="NumberWeight">
<!-- 订单分类 --> <!-- 订单分类 -->
<view class="nav"> <view class="nav">
<view :class="['nav-item' ,selectNavId === item.id?'nav-item-selected':'']" v-for="(item,index) in navList" <view :class="['nav-item', selectNavId === item.id ? 'nav-item-selected' : '']" v-for="(item, index) in navList" :key="index" @click="selectNav(item.id)">
:key="index" @click="selectNav(item.id)"> {{ item.name }} {{ item.id === 'signed' && count.signed > 0 ? '(' + count.signed + ')' : '' }}
{{item.name}} {{ item.id === 'completed' && count.completed > 0 ? '(' + count.completed + ')' : '' }} {{ item.id === 'init' && count.init > 0 ? '(' + count.init + ')' : '' }}
{{item.id ==='signed' && count.signed >0 ? '('+count.signed + ')':''}}
{{item.id ==='completed' && count.completed >0 ?'('+count.completed + ')':''}}
{{item.id ==='init' && count.init >0 ?'('+count.init + ')':''}}
{{ item.id === 'delivered' && count.delivered > 0 ? '(' + count.delivered + ')' : '' }} {{ item.id === 'delivered' && count.delivered > 0 ? '(' + count.delivered + ')' : '' }}
</view> </view>
</view> </view>
<!-- 有订单列表 --> <!-- 有订单列表 -->
<block v-if="lists.length > 0"> <block v-if="lists.length > 0">
<!-- 订单列表 --> <!-- 订单列表 -->
<view class="order-list" v-for="(item, index) in lists" :key="index"> <view class="order-list" v-for="(item, index) in lists" :key="index">
<MallShipmentsTemplate :item="item" /> <MallShipmentsTemplate :item="item" />
<view class="actions"> <view class="actions"><view class="nowPay" @click="goDetail(item.shipment_no)">查看详情</view></view>
<view class="nowPay" @click="goDetail(item.shipment_no)" >查看详情</view>
</view>
</view> </view>
</block> </block>
<!-- 没有订单列表 --> <!-- 没有订单列表 -->
<no-list v-if="lists.length === 0" name='no-order' txt="暂无数据~" /> <no-list v-if="lists.length === 0" name="no-order" txt="暂无数据~" />
<!-- <u-toast ref="uToast" /> -->
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>
import MallShipmentsTemplate from '@/components/mall-shipments-template/mall-shipments-template' import MallShipmentsTemplate from '@/components/mall-shipments-template/mall-shipments-template';
import { mallShipmentsPostShop , mallShipmentsSign , mallShipmentsCancel } from '@/apis/interfaces/numberWeight' import { mallShipmentsPostShop, mallShipmentsSign, mallShipmentsCancel } from '@/apis/interfaces/numberWeight';
export default { export default {
components: { components: {
MallShipmentsTemplate MallShipmentsTemplate
@@ -45,7 +37,7 @@
navList : [], navList : [],
type : '', // post 快递单 空为自提单 type : '', // post 快递单 空为自提单
selectNavId : 'signed', selectNavId : 'signed',
count:{},// 订单数量 count : {} // 订单数量
}; };
}, },
onLoad(e) { onLoad(e) {
@@ -58,42 +50,42 @@
name: '已完成', name: '已完成',
id: 'completed' id: 'completed'
} }
] ];
this.selectNavId = 'signed' this.selectNavId = 'signed';
this.getList() this.getList();
}, },
onShow() { onShow() {
if (uni.getStorageSync('refresh')) { if (uni.getStorageSync('refresh')) {
this.reset() this.reset();
} }
}, },
onUnload() { onUnload() {
uni.setStorageSync('refresh',false) uni.setStorageSync('refresh', false);
}, },
onReachBottom() { onReachBottom() {
if (this.total > this.lists.length) { if (this.total > this.lists.length) {
this.page = this.page + 1 this.page = this.page + 1;
this.getList() this.getList();
} else { } else {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '吼吼吼~我是有底的~', title: '吼吼吼~我是有底的~',
duration: 3000 duration: 3000
}) });
} }
}, },
methods: { methods: {
reset() { reset() {
this.page =1 this.page = 1;
this.total = 0 this.total = 0;
this.lists = [] this.lists = [];
this.getList() this.getList();
uni.setStorageSync('refresh',false) uni.setStorageSync('refresh', false);
}, },
// 选择订单 // 选择订单
selectNav(id) { selectNav(id) {
if (this.selectNavId !== id) { if (this.selectNavId !== id) {
this.selectNavId = id this.selectNavId = id;
this.reset() this.reset();
} }
}, },
// 获取订单列表 // 获取订单列表
@@ -102,30 +94,32 @@
pageSize: 4, pageSize: 4,
page: this.page, page: this.page,
state: this.selectNavId state: this.selectNavId
} };
let apiUrl = '' let apiUrl = '';
apiUrl = 'mall/shipments/service' apiUrl = 'mall/shipments/service';
data.channel = 'app' data.channel = 'app';
mallShipmentsPostShop(apiUrl,data).then(res=>{ mallShipmentsPostShop(apiUrl, data)
this.count = res.count .then(res => {
this.lists = this.lists.concat(res.lists.data) this.count = res.count;
this.total = res.lists.page.total this.lists = this.lists.concat(res.lists.data);
}).catch(err=>{ this.total = res.lists.page.total;
})
.catch(err => {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: err.message, title: err.message,
duration: 3000 duration: 3000
}) });
}) });
}, },
// 查看详情 // 查看详情
goDetail(no) { goDetail(no) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/property/order/servicesOrderInfo?no=' + no url: '/pages/property/order/servicesOrderInfo?no=' + no
}) });
}
} }
} }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@@ -138,7 +132,7 @@
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
box-sizing: border-box; box-sizing: border-box;
background-color: #F7F7F7; background-color: #f7f7f7;
// 订单nav // 订单nav
.nav { .nav {
@@ -187,7 +181,7 @@
flex: 1; flex: 1;
font-size: 28rpx; font-size: 28rpx;
color: #fff; color: #fff;
border-top: solid 1rpx #EFF4F2; border-top: solid 1rpx #eff4f2;
.nowPay { .nowPay {
padding: 4rpx 20rpx; padding: 4rpx 20rpx;
border-radius: 40rpx; border-radius: 40rpx;
@@ -203,7 +197,7 @@
border-radius: 40rpx; border-radius: 40rpx;
margin-left: 20rpx; margin-left: 20rpx;
margin-top: 20rpx; margin-top: 20rpx;
background-color: #DD524D; background-color: #dd524d;
} }
.logistics { .logistics {
@@ -215,7 +209,7 @@
} }
.sign { .sign {
background-color: #DD524D; background-color: #dd524d;
padding: 10rpx 30rpx; padding: 10rpx 30rpx;
border-radius: 40rpx; border-radius: 40rpx;
margin-left: 20rpx; margin-left: 20rpx;

View File

@@ -12,17 +12,14 @@
<image class="partner-avatar" :src="item.avatar ? item.avatar : '/static/user/user-portrait.png'" mode="aspectFill"></image> <image class="partner-avatar" :src="item.avatar ? item.avatar : '/static/user/user-portrait.png'" mode="aspectFill"></image>
<view class="partner-cont"> <view class="partner-cont">
<view class="partner-name"> <view class="partner-name">
<view class="partner-nickname"> <view class="partner-nickname">{{item.nickname}}</view>
{{item.nickname}}
</view>
<image v-if="item.identity" class="partner-identity" :src="item.identity.cover" mode="widthFix"></image> <image v-if="item.identity" class="partner-identity" :src="item.identity.cover" mode="widthFix"></image>
</view> </view>
<view class="partner-tel"> <view class="partner-tel">{{item.username}}</view>
{{item.username}}
</view>
</view> </view>
</view> </view>
</view> </view>
<uni-load-more :status="pageMore"></uni-load-more>
</block> </block>
<block v-else> <block v-else>
<view class="list-null"> <view class="list-null">
@@ -40,7 +37,8 @@
return { return {
larer : '', larer : '',
lists : [], lists : [],
pages : {} pageMore : 'more',
page : 1
}; };
}, },
onShow() { onShow() {
@@ -48,20 +46,31 @@
// 获取伙伴列表 // 获取伙伴列表
this.getPartner() this.getPartner()
}, },
onReachBottom(){
if(this.pageMore === 'more'){
this.pageMore = 'loading'
this.page++
this.getPartner()
}
},
methods: { methods: {
// 伙伴列表 // 伙伴列表
getPartner() { getPartner() {
userPartne({ userPartne({
larer: this.larer larer: this.larer,
page : this.page
}).then(res => { }).then(res => {
this.lists = res.users if(this.page === 1) this.lists = []
this.lists = this.lists.concat(res.users.data)
this.page = res.users.page.current
this.pageMore = res.users.page.has_more ? 'more': 'noMore'
}) })
}, },
// tabs // tabs
onTabs(value){ onTabs(value){
if(value == this.larer) return if(value == this.larer) return
this.lists = [] this.page = 1
this.larer = value this.larer = value
this.getPartner() this.getPartner()
} }
@@ -118,6 +127,7 @@
padding: 15rpx 0; padding: 15rpx 0;
font-size: $title-size-lg; font-size: $title-size-lg;
color: $text-gray; color: $text-gray;
box-shadow: 0 0 5rpx 5rpx rgba($color: $border-color, $alpha: .2);
.item{ .item{
height: 60rpx; height: 60rpx;
line-height: 60rpx; line-height: 60rpx;
@@ -130,43 +140,30 @@
// 列表 // 列表
.partner-list{ .partner-list{
margin: calc(#{$padding} - 10rpx);
display: flex;
flex-wrap: wrap;
background-color: #FFFFFF;
.partner-label { .partner-label {
padding: 20rpx; padding: ($padding - 10) $padding;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
border-radius: 4rpx; border-radius: $radius;
width: 100%; margin: $margin;
&::after { background-color: white;
position: absolute;
content: '';
left: 0;
bottom: 0;
width: 100%;
height: 1rpx;
background-color: #f8f8f8;
}
&:last-child::after {
display: none;
}
.partner-avatar { .partner-avatar {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
border-radius: 50%; border-radius: 50%;
vertical-align: top;
} }
.partner-cont { .partner-cont {
position: absolute; position: absolute;
width: 100%; width: 100%;
left: 0; left: 0;
top: 0; top: 0;
padding: 22rpx 20rpx 20rpx 150rpx; padding: ($padding - 10) $padding ($padding - 10) 150rpx;
box-sizing: border-box; box-sizing: border-box;
.partner-name { .partner-name {
padding-top: 10rpx;
display: flex; display: flex;
margin-bottom: 15rpx; line-height: 40rpx;
.partner-nickname { .partner-nickname {
font-size: 30rpx; font-size: 30rpx;
font-weight: 600; font-weight: 600;
@@ -174,9 +171,15 @@
} }
.partner-identity { .partner-identity {
width: 84rpx; width: 84rpx;
margin-top: 4rpx; margin-top: 5rpx;
margin-left: 5rpx;
vertical-align: middle;
} }
} }
.partner-tel{
line-height: 40rpx;
color: $text-gray;
}
} }
} }
} }

File diff suppressed because one or more lines are too long