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

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唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。
@@ -6,32 +5,34 @@
* moduleName: 商品
*/
import { request } from '../index'
import {
request
} from '../index'
// 商品管理-商品列表
const managesGoodsIndex = data => {
return request({
url: 'manages/goods/index',
data:data
data: data
})
}
// 商品管理-商品增发
const managesGoodsMint = data => {
return request({
url: 'manages/goods/'+data.id+'/mint',
data:data,
method:'POST'
url: 'manages/goods/' + data.id + '/mint',
data: data,
method: 'POST'
})
}
// 商品管理-商品燃烧
const managesGoodsBurn = data => {
return request({
url: 'manages/goods/'+data.id+'/burn',
data:data,
method:'POST'
url: 'manages/goods/' + data.id + '/burn',
data: data,
method: 'POST'
})
}
@@ -46,8 +47,8 @@ const managesGoodsCreateBefore = () => {
const managesGoodsCreate = (data) => {
return request({
url: 'manages/goods',
method:'POST',
data:data
method: 'POST',
data: data
})
}
@@ -70,7 +71,7 @@ const managesCreate = (data) => {
const managesGoodsAuth = (id, data) => {
return request({
url: 'manages/goods/' + id + '/extends',
method:'POST',
method: 'POST',
data
})
}
@@ -79,7 +80,7 @@ const managesGoodsAuth = (id, data) => {
const managesGoodsDelete = id => {
return request({
url: 'manages/goods/' + id,
method:'DELETE'
method: 'DELETE'
})
}
@@ -109,7 +110,7 @@ const managesGoodsExtends = id => {
// 领取优惠券
const managesCoupons = (id) => {
return request({
url: 'coupons/'+ id +'/grant',
url: 'coupons/' + id + '/grant',
method: 'POST'
})
}
@@ -129,16 +130,16 @@ const list = data => {
})
}
// 通证权益 搜索页面
const searchUrl = (apiUrl,data) => {
const searchUrl = (apiUrl, data) => {
return request({
url : apiUrl,
url: apiUrl,
data: data
})
}
// 企业行业分类
const companyCategory = () => {
return request({
url : 'companies/industry'
url: 'companies/industry'
})
}
// 商品分类搜索-默认关键字
@@ -157,7 +158,7 @@ const goods = id => {
// 商品分类
const goodsCategory = () => {
return request({
url : 'mall/categories'
url: 'mall/categories'
})
}
// 商品确认商品信息页面get 下单页 post

View File

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

View File

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

View File

@@ -17,7 +17,7 @@
<view class="sku">
<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>
</view>
</view>
@@ -91,14 +91,8 @@
<script>
import couponTemplate from "@/components/coupon-template/coupon-template-2"
import {
mallBuyGoods
} from '@/apis/interfaces/goods'
import {
wxPay,
aliPay,
ebPay
} from '@/apis/interfaces/order'
import { mallBuyGoods } from '@/apis/interfaces/goods'
import { wxPay, aliPay, ebPay } from '@/apis/interfaces/order'
export default {
name: 'OrderInfo',
components: {
@@ -106,23 +100,19 @@
},
data() {
return {
// box: {
// min: 1,
// max: 100
// },
amount: 0,
account: {},
total: 0,
shop: {}, // 店铺信息
info: {}, // 商品详情
showCouponList: false, // 默认false不显示优惠券弹窗列表
coupon_grant_id: '', // 默认没有选择任何一个优惠券
list: [], // 优惠券列表
params: {}, // 上个页面携带过来的参数
remark: '', // 备注
order_no: '', // 下单成功的id
selectTypeId: '2', // 微信支付2 支付宝支付3
coupon_price: '' // 代驾券显示金额,提货券显示什么呢
amount : 0,
account : {},
total : 0,
shop : {}, // 店铺信息
info : {}, // 商品详情
showCouponList : false, // 默认false不显示优惠券弹窗列表
coupon_grant_id : '', // 默认没有选择任何一个优惠券
list : [], // 优惠券列表
params : {}, // 上个页面携带过来的参数
remark : '', // 备注
order_no : '', // 下单成功的id
selectTypeId : '2', // 微信支付2 支付宝支付3
coupon_price : '' // 代驾券显示金额,提货券显示什么呢
};
},
@@ -150,10 +140,9 @@
this.nowPay()
}
}).catch(err => {
this.$refs.uToast.show({
uni.showToast({
title: err.message,
type: 'primary',
duration: 3000
icon : 'none'
})
})
},
@@ -268,8 +257,9 @@
if (this.info.is_change) {
this.selectTypeId = id
} else {
this.$refs.uToast.show({
title: '当前商品不支持EB支付'
uni.showToast({
title: '当前商品不支持EB支付',
icon : 'none'
})
}
} else if (id === '2') {

View File

@@ -6,7 +6,7 @@
<view class="content">
<view class="title nowrap">数字权证</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>
<view class="info">

View File

@@ -16,7 +16,7 @@
<view class="content">
<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.company.name}}</view>
<view class="text nowrap">供应商{{item.company.name}}</view>
<view class="text nowrap">转让用户{{item.user.nickname}}</view>
</view>
<view class="price">{{item.price}}/</view>

View File

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

View File

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