调整购物商品兑换,节点中心调整,权证转让管理增加筛选,调整交易市场

This commit is contained in:
唐明明
2021-11-11 16:40:19 +08:00
parent d3ca6422a0
commit 8dec48f748
9 changed files with 1144 additions and 997 deletions

View File

@@ -7,7 +7,8 @@
<view class="name ellipsis">{{ item.shop.name }}</view>
</view>
<view class="flexrow">
<view class="no ellipsis">区块链地址 {{item.account.addr}}</view> <span class="copy" @click="copy(item.account.addr)">复制</span>
<view class="no ellipsis">区块链地址 {{ item.account.addr }}</view>
<span class="copy" @click="copy(item.account.addr)">复制</span>
</view>
</view>
</view>
@@ -18,7 +19,10 @@
<view class="name1 ellipsis-2">{{ item.goods.goods_name }}</view>
<!-- <span>{{item.account.balance}}</span> -->
</view>
<view class="sku">权证个数 <span>x {{item.account.balance}}</span> </view>
<view class="sku">
权证个数
<span>x {{ item.account.balance }}</span>
</view>
</view>
</view>
</view>
@@ -26,11 +30,9 @@
<script>
export default {
name: "OrderTemplate",
name: 'OrderTemplate',
data() {
return {
};
return {};
},
props: {
item: Object,
@@ -40,26 +42,26 @@
}
},
onShow() {
console.log(this.item,'onshow,numtempa')
console.log(this.item, 'onshow,numtempa');
},
methods: {
// 跳转到商品详情页面
goDetail(id) {
uni.navigateTo({
url: '/pages/goods/details?id=' + id
})
});
},
// 复制
copy(e) {
uni.setClipboardData({
data: e,
success: res => {
console.log('res',res)
}
})
console.log('res', res);
}
});
}
}
};
</script>
<style lang="scss" scoped>
@@ -95,7 +97,6 @@
}
}
.no {
margin-top: 10rpx;
font-size: $title-size * 0.8;
@@ -139,7 +140,6 @@
.name1 {
// width: 340rpx;
}
span {
@@ -162,13 +162,17 @@
}
}
.flexrow {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
width: 100%;
position: relative;
padding-right: 200rpx;
line-height: 50rpx;
.no{
white-space:nowrap;
}
.copy {
line-height: 50rpx;
position: absolute;
right: 30rpx;
top: 0;
color: $mian-color;
font-size: $title-size * 0.8;
font-weight: 400;

View File

@@ -292,9 +292,17 @@
line-height: 90rpx;
font-size: $title-size;
}
textarea{
width: 100%;
padding: 20rpx 0;
line-height: 50rpx;
font-size: $title-size;
}
.picker-text {
position: relative;
padding-right: 90rpx;
line-height: 90rpx;
font-size: $title-size;
.picker-icon {
position: absolute;
right: 0;

View File

@@ -73,8 +73,7 @@
<scroll-view scroll-y="true" style="height: 1000rpx;" class="scrollView">
<view class="coupon-title">可用优惠券列表</view>
<view class="coupon-list-item" v-for="(item,index) in list" :key="index" v-if="list.length>0">
<u-icon v-if="coupon_grant_id!== item.coupon_grant_id" name="checkmark-circle" color="#cacaca"
size="50">
<u-icon v-if="coupon_grant_id !== item.coupon_grant_id" name="checkmark-circle" color="#cacaca" size="50">
</u-icon>
<u-icon v-else name="checkmark-circle-fill" color="#8b64fd" size="50"></u-icon>
<couponTemplate style="flex: 1;" :item="{...item}" :showUse='false' />
@@ -168,7 +167,6 @@
},
// 触发支付
nowPay() {
this.canPay = false
let apiUrl = ''
let data = {}
if (this.selectTypeId === '2') {
@@ -183,13 +181,26 @@
order_no: this.order_no,
type: 'app'
}
} else {
apiUrl = ebPay
data = {
order_no: this.order_no
}
}
apiUrl(data).then(res => {
// 不需要支付
console.log(res.canPay)
if(!res.canPay){
uni.showModal({
title : '提示',
content : '商品兑换成功',
showCancel : false,
success () {
uni.reLaunch({
url: '/pages/goods/payStatus?success=true'
})
}
})
return
}
// 微信支付
if (this.selectTypeId === '2') {
let payInfo = JSON.parse(res)
@@ -200,7 +211,6 @@
uni.reLaunch({
url: '/pages/goods/payStatus?success=true'
})
this.canPay = true
},
fail: (err) => {
uni.showToast({
@@ -220,7 +230,6 @@
uni.reLaunch({
url: '/pages/goods/payStatus?success=true'
})
this.canPay = true
},
fail: (err) => {
uni.showToast({
@@ -235,13 +244,9 @@
}).catch(err => {
uni.showToast({
title: err.message,
duration: 3000,
mask: true,
icon: 'none'
})
setTimeout(res => {
this.canPay = true
}, 2000)
})
},
@@ -249,10 +254,8 @@
selectCoupon(item) {
if (this.coupon_grant_id === item.coupon_grant_id) {
this.coupon_grant_id = ''
// this.coupon_price = ''
} else {
this.coupon_grant_id = item.coupon_grant_id
// this.coupon_price = item.price
}
this.mallBuyGoods(this.params, 'get')
this.showCouponList = false

View File

@@ -19,13 +19,9 @@
{{info.skusUnit}}
</view>
<view class="info-item">
<label>提供企业</label>
<label>供应商</label>
{{info.companyName}}
</view>
<view class="info-item">
<label>企业诚信</label>
{{info.integrity}}
</view>
<view class="info-item">
<label>权证销量</label>
{{info.sales}}

View File

@@ -1,5 +1,10 @@
<template>
<view class="NumberWeight">
<view class="header-tabs">
<view class="tabs-item" :class="{'show' : status === ''}" @click="onTabs('')">全部</view>
<view class="tabs-item" :class="{'show' : status === 1}" @click="onTabs(1)">转让中</view>
<view class="tabs-item" :class="{'show' : status === 2}" @click="onTabs(2)">已取消</view>
</view>
<!-- 有订单列表 -->
<view v-if="lists.length > 0">
<block v-for="(item, index) in lists" :key="index">
@@ -18,10 +23,10 @@
</view>
</view>
</block>
<uni-load-more :status="pageMore"></uni-load-more>
</view>
<!-- 没有订单列表 -->
<no-list v-if="lists.length === 0" name="no-order" txt="暂无数据~" />
<u-toast ref="uToast" />
</view>
</template>
@@ -32,44 +37,42 @@ export default {
return {
lists : [],
page : 1,
total: 0
status : '',
total : 0,
pageMore: 'more'
};
},
onLoad() {
this.getList();
},
onReachBottom() {
if (this.total > this.lists.length) {
if (this.pageMore) {
this.page = this.page + 1;
this.getList();
} else {
this.$refs.uToast.show({
title: '吼吼吼~我是有底的~',
type: 'error',
icon: false,
duration: 3000
});
}
},
methods: {
onTabs(status){
this.status = status
this.page = 1
this.getList()
},
getList() {
let data = {
perPage: 10,
if(this.page === 1){
this.lists = []
}
marketsMag({
status : this.status,
page : this.page
};
marketsMag(data)
.then(res => {
console.log(res.markets.data);
}).then(res => {
this.lists = this.lists.concat(res.markets.data);
this.total = res.markets.page.total;
})
.catch(err => {
this.$refs.uToast.show({
this.total = res.markets.page.current;
this.pageMore = res.markets.page.has_more ? 'more' : 'noMore';
}).catch(err => {
uni.showToast({
title: err.message,
type: 'error',
icon: false,
duration: 3000
});
icon : 'none'
})
});
},
// 取消转让
@@ -79,12 +82,20 @@ export default {
icon : 'none',
title: res
})
if(this.status === ''){
let statusObj = this.lists[index]
statusObj.status = {
value: 2,
text : '已取消',
}
this.$set(this.lists, index, statusObj)
return
}
if(this.status === 1 || this.status === 2){
this.lists.splice(index, 1)
}
}).catch(err => {
uni.showToast({
icon : 'none',
@@ -102,6 +113,29 @@ export default {
<style lang="scss" scoped>
.NumberWeight {
box-sizing: border-box;
padding-top: 90rpx;
.header-tabs{
position: fixed;
top: 0;
left: 0;
width: 100%;
line-height: 90rpx;
font-size: $title-size-lg;
height: 90rpx;
z-index: 99;
display: flex;
justify-content: space-around;
background: white;
.tabs-item{
color: $text-gray;
width: 33.33%;
text-align: center;
&.show{
color: $mian-color;
font-weight: bold;
}
}
}
// 订单列表
.order-item {
background-color: white;

View File

@@ -56,7 +56,7 @@
<view class="userVip" :class="{ animated: animatedShow }">
<view class="userVip-top">
<view class="userVip-top-name" v-if="userIdentity.right">
{{ userData.identity.id == 1 ? '开通' + userIdentity.right.name : '到期时间' + userIdentity.times.ended_at}}
{{ userData.identity.id == 1 ? '开通' + userIdentity.right.name : userIdentity.times.name + '会员'}}
</view>
<!-- v-if="userData.identity.id != 5" -->
<view class="userVip-top-btn" @click="openVip(userIdentity.right.identity_id)" >
@@ -172,6 +172,7 @@
</view>
</view>
<!-- 企业工具 -->
<block v-if="userData.identity.id > 1">
<view class="userPartner" v-if="userData.is_company">
<view class="partner-title">企业工具</view>
<view class="tool-list">
@@ -230,6 +231,7 @@
<!-- <view class="onOpen" v-else ></view> -->
</block>
</view>
</block>
<!-- 我的权证 -->
<view class="userPartner">
<view class="partner-title">
@@ -685,6 +687,7 @@
font-size: 30rpx;
flex: 1;
line-height: 24px;
font-weight: bold;
}
.userVip-top-btn {

View File

@@ -6,7 +6,7 @@
<view class="order-list" v-for="(item,index) in lists" :key="index">
<NumberWeightTemplate :item="item" />
<view class="actions">
<view @click="navMarkets(item.symbol)" class="nowPay">权证转让</view>
<view @click="navMarkets(item.symbol)" class="nowPay make">权证转让</view>
<view @click="nowTake(item.symbol)" class="nowPay">去提货</view>
</view>
</view>
@@ -163,6 +163,11 @@
margin-left: 20rpx;
margin-top: 20rpx;
background-color: $mian-color;
&.make{
background: white;
border:solid 1rpx $mian-color;
color: $mian-color;
}
}
.cancelOrder {

View File

@@ -3,8 +3,8 @@
<!-- 订单状态 -->
<view class="order-status">
<view class="info">
提货
<span>确认提货后快递会坐着火箭朝您飞来</span>
提货
<span>申请提货后商家将为您迅速处理</span>
</view>
<image src="/static/imgs/fire.png" mode="widthFix" />
</view>
@@ -306,7 +306,7 @@
.order-status {
width: 100%;
height: 300rpx;
background-image: linear-gradient(to bottom, $mian-color, $mian-color-light);
background-image: linear-gradient(to right, #7c52fc, #976dff);
color: #Fff;
font-size: 36rpx;
padding: 30rpx 50rpx;

File diff suppressed because one or more lines are too long