转让市场
This commit is contained in:
@@ -155,6 +155,22 @@ const managesCoupons = (id) => {
|
||||
})
|
||||
}
|
||||
|
||||
// 产品编辑
|
||||
const managesGoodsPut = (id, data) => {
|
||||
return request({
|
||||
url: 'manages/goods/' + id,
|
||||
method: 'PUT',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 产品附加信息
|
||||
const managesGoodsExtends = id => {
|
||||
return request({
|
||||
url: 'manages/goods/' + id + '/extends',
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
mall,
|
||||
list,
|
||||
@@ -174,5 +190,7 @@ export {
|
||||
managesChain,
|
||||
managesAttestation,
|
||||
managesTracedTo,
|
||||
managesCoupons
|
||||
managesCoupons,
|
||||
managesGoodsPut,
|
||||
managesGoodsExtends
|
||||
}
|
||||
|
||||
59
apis/interfaces/market.js
Normal file
59
apis/interfaces/market.js
Normal file
@@ -0,0 +1,59 @@
|
||||
|
||||
/**
|
||||
* Web唐明明
|
||||
* 匆匆数载恍如梦,岁月迢迢华发增。
|
||||
* 碌碌无为枉半生,一朝惊醒万事空。
|
||||
* moduleName: 转让市场
|
||||
*/
|
||||
|
||||
import { request } from '../index'
|
||||
|
||||
// 转让市场
|
||||
const markets = data => {
|
||||
return request({
|
||||
url: 'markets',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 转让市场记录
|
||||
const marketsLogs = data => {
|
||||
return request({
|
||||
url: 'markets/orders',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 转让详情
|
||||
const marketsInfo = id => {
|
||||
return request({
|
||||
url: 'markets/' + id
|
||||
})
|
||||
}
|
||||
|
||||
// 提交支付订单
|
||||
const marketsBuy = (id, data) => {
|
||||
return request({
|
||||
url: 'markets/' + id + '/create',
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 转让市场支付
|
||||
const marketsPay = (id, platform, data) => {
|
||||
return request({
|
||||
url: 'markets/pay/' + id + '/' + platform,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
export {
|
||||
markets,
|
||||
marketsLogs,
|
||||
marketsInfo,
|
||||
marketsBuy,
|
||||
marketsPay
|
||||
}
|
||||
13
pages.json
13
pages.json
@@ -205,7 +205,8 @@
|
||||
"path": "pages/market/logs",
|
||||
"name": "marketLogs",
|
||||
"style": {
|
||||
"navigationBarTitleText": "成交历史"
|
||||
"navigationBarTitleText": "成交历史",
|
||||
"navigationBarBackgroundColor":"#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/order/buy",
|
||||
@@ -414,8 +415,14 @@
|
||||
"navigationBarTitleText": "商品认证信息",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}
|
||||
],
|
||||
}, {
|
||||
"path" : "pages/market/details",
|
||||
"name" : "marketDetails",
|
||||
"style" : {
|
||||
"navigationBarTitleText": "转让详情"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tabBar": {
|
||||
"color": "#bababa",
|
||||
"selectedColor": "#e93340",
|
||||
|
||||
@@ -174,22 +174,24 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { managesGoodsCreate, managesCreate, managesGoodsEdit } from '@/apis/interfaces/goods'
|
||||
import { managesGoodsCreate, managesCreate, managesGoodsEdit, managesGoodsPut } from '@/apis/interfaces/goods'
|
||||
import { uploads } from '@/apis/interfaces/uploading'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
categoryId : '', // 一级分类
|
||||
categoryCid : '', // 二级分类
|
||||
name : '', // 标题
|
||||
pictures : [], // 轮播图
|
||||
content : [], // 详情图
|
||||
description : '', // 商品描述
|
||||
isPostSale : false, // 是否允许售后
|
||||
services : [], // 商品服务
|
||||
skus_cost : '0.00',// 市场价格
|
||||
skus_price : '0.00',// 销售价格
|
||||
skus_cost : '', // 市场价格
|
||||
skus_price : '', // 销售价格
|
||||
skus_number : 1, // 易货起购数量
|
||||
skus_unit : '件', // 规格文字
|
||||
skus_charge : '0.00',// 分销佣金
|
||||
skus_charge : '', // 分销佣金
|
||||
skus_stock : '', // 库存
|
||||
isChange : false, // 是否支持易货
|
||||
stores : [], // 关联店铺
|
||||
@@ -208,10 +210,49 @@
|
||||
};
|
||||
},
|
||||
created() {
|
||||
if(this.$Route.query.type === 'edit'){
|
||||
console.log('编辑')
|
||||
// 编辑状态信息
|
||||
if(this.$Route.query.type && this.$Route.query.type === 'edit'){
|
||||
managesGoodsEdit(this.$Route.query.id).then(res => {
|
||||
console.log(res)
|
||||
let services = [], stores = []
|
||||
let servicesArr = res.services.map(val => {
|
||||
let check = (res.data.services.findIndex(obj => obj.service_id === val.service_id)) >= 0
|
||||
if(check){
|
||||
services.push(val.service_id)
|
||||
}
|
||||
return{
|
||||
check,
|
||||
...val
|
||||
}
|
||||
})
|
||||
let storesArr = res.stores.map(val => {
|
||||
let check = (res.data.stores.findIndex(obj => obj.store_id === val.store_id)) >= 0
|
||||
if(check){
|
||||
stores.push(val.store_id)
|
||||
}
|
||||
return {
|
||||
check,
|
||||
...val
|
||||
}
|
||||
})
|
||||
this.categoryId = res.data.category.category_id
|
||||
this.categoryCid = res.data.category_sub.category_id
|
||||
this.name = res.data.name
|
||||
this.content = res.data.content
|
||||
this.description = res.data.description
|
||||
this.pictures = res.data.pictures
|
||||
this.skus_cost = res.data.skus[0].cost
|
||||
this.skus_price = res.data.skus[0].price
|
||||
this.skus_number = res.data.skus[0].number
|
||||
this.skus_unit = res.data.skus[0].unit
|
||||
this.skus_charge = res.data.skus[0].charge
|
||||
this.skus_stock = res.data.skus[0].stock
|
||||
this.isPostSale = res.data.is_post_sale == 0
|
||||
this.isChange = res.data.is_change == 0
|
||||
this.logisticType= this.logisticArr.findIndex(val => val.type === res.data.logistic_type)
|
||||
this.servicesArr = servicesArr
|
||||
this.storesArr = storesArr
|
||||
this.services = services
|
||||
this.stores = stores
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
@@ -220,6 +261,7 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
// 添加配置信息
|
||||
managesCreate({
|
||||
category_cid: this.$Route.query.cid
|
||||
}).then(res => {
|
||||
@@ -239,6 +281,8 @@
|
||||
this.tags = res.tags
|
||||
this.servicesArr= res.services
|
||||
this.type = res.type
|
||||
this.categoryId = this.$Route.query.id
|
||||
this.categoryCid= this.$Route.query.cid
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
@@ -315,8 +359,8 @@
|
||||
let submitData = {
|
||||
name : this.name,
|
||||
cover : this.pictures[0].path,
|
||||
category_id : this.$Route.query.id,
|
||||
category_cid : this.$Route.query.cid,
|
||||
category_id : this.categoryId,
|
||||
category_cid : this.categoryCid,
|
||||
pictures : pictures,
|
||||
content : content,
|
||||
description : this.description,
|
||||
@@ -333,7 +377,8 @@
|
||||
stores : this.stores,
|
||||
expiried_at : this.expiriedAt
|
||||
}
|
||||
let submitFund = managesGoodsCreate(submitData)
|
||||
|
||||
let submitFund = this.$Route.query.type === 'edit' ? managesGoodsPut(this.$Route.query.id, submitData) : managesGoodsCreate(submitData)
|
||||
submitFund.then(res => {
|
||||
if(this.type === 2){
|
||||
uni.showModal({
|
||||
@@ -342,13 +387,27 @@
|
||||
showCancel : false,
|
||||
success : res => {
|
||||
if(res.confirm){
|
||||
this.$Router.back()
|
||||
this.$Router.back(this.$Route.query.type === 'edit' ? 1 : 2)
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
this.$Router.push({name: 'goodsAuth', params: { id: res , type: 'goodsAdd'}})
|
||||
uni.showModal({
|
||||
title : '提示',
|
||||
content : this.$Route.query.type === 'edit' ? '商品权证已更新,是否立即补充产品附加信息认证?' : '商品权证已发布,是否立即补充产品附加信息认证?',
|
||||
cancelText : '稍后认证',
|
||||
confirmText : '立即认证',
|
||||
success : res => {
|
||||
if(res.cancel){
|
||||
this.$Router.back(this.$Route.query.type === 'edit' ? 1 : 2)
|
||||
}
|
||||
if(res.confirm){
|
||||
let goodsId = this.$Route.query.type === 'edit' ? this.$Route.query.id : res
|
||||
this.$Router.push({name: 'goodsAuth', params: { id: goodsId , type: 'goodsAdd', edit: this.$Route.query.type === 'edit'}})
|
||||
}
|
||||
}
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { managesGoodsAuth } from '@/apis/interfaces/goods'
|
||||
import { managesGoodsAuth, managesGoodsExtends } from '@/apis/interfaces/goods'
|
||||
import { uploads } from '@/apis/interfaces/uploading'
|
||||
export default {
|
||||
data() {
|
||||
@@ -77,7 +77,21 @@
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
if(this.$Route.query.edit == 'true'){
|
||||
managesGoodsExtends(this.$Route.query.id).then(res => {
|
||||
this.productedAt = res.producted_at
|
||||
this.expiriedAt = res.expiried_at
|
||||
this.lisence = res.lisence
|
||||
this.productName = res.product_name
|
||||
this.productAddress = res.product_address
|
||||
this.extendCover = [{...res.cover}]
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// picker选择
|
||||
@@ -134,7 +148,11 @@
|
||||
showCancel : false,
|
||||
success : res => {
|
||||
if(res.confirm){
|
||||
this.$Router.back(this.$Route.query.type == 'goodsAdd' ? 2 : 1)
|
||||
if(this.$Route.query.type == 'goodsAdd'){
|
||||
this.$Router.back(this.$Route.query.edit == 'true' ? 2 : 3)
|
||||
}else{
|
||||
this.$Router.back()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
314
pages/market/details.vue
Normal file
314
pages/market/details.vue
Normal file
@@ -0,0 +1,314 @@
|
||||
<template>
|
||||
<view v-if="!loding">
|
||||
<!-- 产品信息 -->
|
||||
<view class="goods">
|
||||
<image class="cover" :src="info.goods.cover" mode="aspectFill"></image>
|
||||
<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 nav-goods nowrap">查看锚定商品信息<uni-icons type="arrowright" size="12" color="#e93340"></uni-icons></view>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="info-item">
|
||||
<label>转让用户</label>
|
||||
{{info.user.username}}
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<label>转让单价</label>
|
||||
¥{{info.price}}
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<label>出售数量</label>
|
||||
{{info.stock}}
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<label>剩余转让数量</label>
|
||||
{{info.surplus}}
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<label>区块HASH</label>
|
||||
{{info.hash}}
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<label>转让时间</label>
|
||||
{{info.created_at}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button class="buy-btn" type="default" @click="openLay">我要购买</button>
|
||||
<!-- 购买弹窗 -->
|
||||
<uni-popup ref="buyLay" :safe-area="true" background-color="#ffffff">
|
||||
<view class="popup">
|
||||
<view class="title">我要购买</view>
|
||||
<view class="des">
|
||||
剩余转让数量
|
||||
<text>{{info.surplus}}</text>
|
||||
</view>
|
||||
<view class="des">
|
||||
数量
|
||||
<uni-number-box v-model='stock' :min="1" :max="info.surplus" @change="countPrice"></uni-number-box>
|
||||
</view>
|
||||
<view class="des">
|
||||
订单总价
|
||||
<text class="price">¥{{price}}</text>
|
||||
</view>
|
||||
<view class="btn" @click="buy">提交订单</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<!-- 支付方式 -->
|
||||
<uni-popup ref="payLay" :safe-area="true" background-color="#ffffff">
|
||||
<view class="popup">
|
||||
<view class="title">支付方式</view>
|
||||
<radio-group class="pay-group" @change="payType">
|
||||
<view class="item">
|
||||
<label>
|
||||
<radio class="pay-radio" value="eb" checked color="#e93340" />
|
||||
<view class="pay-title">易货额支付</view>
|
||||
<view class="pay-sub-title">可用10,冻结10</view>
|
||||
</label>
|
||||
</view>
|
||||
<view class="item">
|
||||
<label>
|
||||
<radio class="pay-radio" value="wechat" color="#e93340" />
|
||||
<view class="pay-title">微信支付</view>
|
||||
</label>
|
||||
</view>
|
||||
</radio-group>
|
||||
<view class="btn" @click="orderPay">立即支付</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { marketsInfo, marketsBuy, marketsPay } from '@/apis/interfaces/market'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
payValue: 'eb',
|
||||
orderNo : '',
|
||||
price : '0.00',
|
||||
stock : 1,
|
||||
loding : true,
|
||||
info : {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
marketsInfo(5).then(res =>{
|
||||
this.info = res
|
||||
this.price = res.price
|
||||
this.loding = false
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
// 选择购买方式
|
||||
payType(e){
|
||||
this.payValue = e.detail.value
|
||||
},
|
||||
// 购买弹窗
|
||||
openLay(){
|
||||
this.$refs.buyLay.open('bottom')
|
||||
},
|
||||
// 计算价格
|
||||
countPrice(e){
|
||||
this.price = (e * this.info.price).toFixed(2)
|
||||
},
|
||||
// 提交购买单
|
||||
buy(){
|
||||
marketsBuy(5, {
|
||||
qty: this.stock
|
||||
}).then(res => {
|
||||
this.orderNo = res.market_order_no
|
||||
this.$refs.buyLay.close()
|
||||
this.$refs.payLay.open('bottom')
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 支付
|
||||
orderPay(){
|
||||
let data = {}
|
||||
if(this.payValue === 'wechat'){
|
||||
data = {
|
||||
type : 'app',
|
||||
openid : ''
|
||||
}
|
||||
}
|
||||
marketsPay(this.info.market_id, this.payValue, {
|
||||
market_no: this.orderNo,
|
||||
...data
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 支付方式
|
||||
.pay-group{
|
||||
margin: 0 ($margin * 2);
|
||||
.item{
|
||||
position: relative;
|
||||
border-bottom: solid 1rpx $border-color;
|
||||
padding: $padding 0;
|
||||
&:last-child{
|
||||
border-bottom: none;
|
||||
}
|
||||
.pay-radio{
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
margin-top: -25rpx;
|
||||
}
|
||||
.pay-sub-title{
|
||||
font-size: $title-size-sm;
|
||||
color: $text-gray;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
.pay-title{
|
||||
font-weight: bold;
|
||||
line-height: 50rpx;
|
||||
color: $text-color;
|
||||
font-size: $title-size-lg;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 我要购买按钮
|
||||
.buy-btn{
|
||||
margin: 0 $margin;
|
||||
background: $text-price;
|
||||
color: white;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
padding: 0;
|
||||
border-radius: $radius/2;
|
||||
font-size: $title-size;
|
||||
font-weight: bold;
|
||||
&::after{
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
// 产品信息
|
||||
.goods{
|
||||
min-height: 168rpx;
|
||||
position: relative;
|
||||
background: white;
|
||||
border-radius: $radius/2;
|
||||
margin: $margin;
|
||||
padding: $padding;
|
||||
.cover{
|
||||
position: absolute;
|
||||
left: $padding;
|
||||
top: $padding;
|
||||
width: 168rpx;
|
||||
height: 168rpx;
|
||||
}
|
||||
.content{
|
||||
padding-left: calc(168rpx + #{$padding});
|
||||
.title{
|
||||
position: relative;
|
||||
font-size: $title-size-lg;
|
||||
color: $text-color;
|
||||
font-weight: bold;
|
||||
line-height: 52rpx;
|
||||
padding-right: 60rpx;
|
||||
text{
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 60rpx;
|
||||
text-align: right;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
.text{
|
||||
font-size: $title-size-sm;
|
||||
color: $text-gray;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
&.nav-goods{
|
||||
color: $text-price;
|
||||
}
|
||||
}
|
||||
}
|
||||
.info{
|
||||
margin-top: $margin;
|
||||
border-top: solid 1rpx $border-color;
|
||||
padding-top: $padding;
|
||||
.info-item{
|
||||
padding-left: 200rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
position: relative;
|
||||
text-align: right;
|
||||
font-size: $title-size-m;
|
||||
@extend .nowrap;
|
||||
label{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 200rpx;
|
||||
text-align: left;
|
||||
color: $text-gray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 购买产品
|
||||
.popup {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
padding-bottom: $padding;
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
text-align: center;
|
||||
padding: 50rpx 30rpx 30rpx 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.btn {
|
||||
background-color: $text-price;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
font-size: $title-size;
|
||||
margin: $padding * 2;
|
||||
border-radius: $radius/2;
|
||||
}
|
||||
.des {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: $padding $padding * 2;
|
||||
color: $text-gray;
|
||||
font-size: $title-size-lg;
|
||||
text{
|
||||
color: $text-color;
|
||||
}
|
||||
.price{
|
||||
color: $main-color;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -6,40 +6,57 @@
|
||||
价格
|
||||
<image
|
||||
class="icon"
|
||||
mode="widthFix" :src="require(marketType == 'low' ? '@/static/icons/market_icon_low.png': '@/static/icons/market_icon_high.png')"
|
||||
mode="widthFix" :src="require(marketType == 'asc' ? '@/static/icons/market_icon_low.png': '@/static/icons/market_icon_high.png')"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="lists">
|
||||
<view class="item" v-for="(item, index) in 10" :key="index">
|
||||
<image class="cover" src="@/static/dev/good_cover_00.jpg" mode="aspectFill"></image>
|
||||
<view class="item" v-for="(item, index) in marketArray" :key="index">
|
||||
<image class="cover" :src="item.goods.cover" mode="aspectFill"></image>
|
||||
<view class="content">
|
||||
<view class="title nowrap">易品新境权证<text>*1</text></view>
|
||||
<view class="text nowrap">谷风一木3层软抽面巾纸</view>
|
||||
<view class="text nowrap">转让方:温文尔雅的小阿玉</view>
|
||||
<view class="text nowrap">Hash:djsakljkljfl3213dsaHKLDJS82231csa</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.company.name}}</view>
|
||||
<view class="text nowrap">转让用户:{{item.user.nickname}}</view>
|
||||
</view>
|
||||
<view class="price">¥21000.00/个</view>
|
||||
<view class="price">¥{{item.price}}/个</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { markets } from '@/apis/interfaces/market'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tabIndex : 0,
|
||||
marketType : 'low',
|
||||
marketArray : []
|
||||
marketType : 'asc',
|
||||
marketArray : [],
|
||||
page : {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getMarkets()
|
||||
},
|
||||
methods:{
|
||||
// 筛选产品
|
||||
onTabs(e){
|
||||
let index = e.target.dataset.index
|
||||
if(index == 0 && index == this.tabIndex) return
|
||||
if(index == 1 && index == this.tabIndex) this.marketType = this.marketType == 'low' ? 'high': 'low'
|
||||
if(index == 1 && index == this.tabIndex) this.marketType = this.marketType == 'asc' ? 'desc': 'asc'
|
||||
this.tabIndex = index
|
||||
this.getMarkets()
|
||||
},
|
||||
// 获取转让市场
|
||||
getMarkets(){
|
||||
markets({
|
||||
sort: this.tabIndex == 1 ? this.marketType : ''
|
||||
}).then(res => {
|
||||
console.log(res.data)
|
||||
this.marketArray = res.data
|
||||
this.page = res.page
|
||||
})
|
||||
}
|
||||
},
|
||||
onNavigationBarButtonTap(){
|
||||
|
||||
@@ -1,19 +1,81 @@
|
||||
<template>
|
||||
<view>
|
||||
成交历史
|
||||
<block v-if="logs.length > 0">
|
||||
<view class="logs" v-for="(item, index) in logs" :key="index">
|
||||
<view class="logs-item">
|
||||
<label>交易权证</label>
|
||||
{{item.goods.goods_name}}
|
||||
</view>
|
||||
<view class="logs-item">
|
||||
<label>交易单价</label>
|
||||
¥{{item.price}}
|
||||
</view>
|
||||
<view class="logs-item">
|
||||
<label>交易数量</label>
|
||||
{{item.qty}}
|
||||
</view>
|
||||
<view class="logs-item">
|
||||
<label>转让用户</label>
|
||||
{{item.sellUser.nickname}}
|
||||
</view>
|
||||
<view class="logs-item">
|
||||
<label>购买用户</label>
|
||||
{{item.buyUser.nickname}}
|
||||
</view>
|
||||
<view class="logs-item">
|
||||
<label>交易时间</label>
|
||||
{{item.created_at}}
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { marketsLogs } from '@/apis/interfaces/market'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
logs: [],
|
||||
page: {}
|
||||
};
|
||||
},
|
||||
created(){
|
||||
marketsLogs().then(res => {
|
||||
console.log(res.data)
|
||||
this.logs = res.data
|
||||
this.page = res.page
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.logs{
|
||||
background: white;
|
||||
margin-top: $margin;
|
||||
padding: ($padding - 10) $padding;
|
||||
.logs-item{
|
||||
padding-left: 200rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
position: relative;
|
||||
text-align: right;
|
||||
font-size: $title-size-m;
|
||||
@extend .nowrap;
|
||||
label{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 200rpx;
|
||||
text-align: left;
|
||||
color: $text-gray;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because one or more lines are too long
2544
unpackage/dist/dev/app-plus/app-service.js
vendored
2544
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
1704
unpackage/dist/dev/app-plus/app-view.js
vendored
1704
unpackage/dist/dev/app-plus/app-view.js
vendored
File diff suppressed because one or more lines are too long
2
unpackage/dist/dev/app-plus/manifest.json
vendored
2
unpackage/dist/dev/app-plus/manifest.json
vendored
@@ -1 +1 @@
|
||||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__CD19AAD","name":"易品新境","version":{"name":"1.0.0","code":"100"},"description":"易品新境为商家提供营销引流工具","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"OAuth":{},"Payment":{},"Share":{},"Geolocation":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":false,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#f5f5f5"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"safearea":{"bottom":{"offset":"none"}},"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"androidStyle":"common"},"google":{"permissions":["<uses-feature android:name=\"android.hardware.camera\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{},"plugins":{"oauth":{"univerify":{},"weixin":{"appid":"wx222fbe58feee7819","appsecret":"3d24525a636d7573a8fae885097d5cf7","UniversalLinks":""}},"payment":{"weixin":{"__platform__":["android"],"appid":"wx222fbe58feee7819","UniversalLinks":""}},"share":{"weixin":{"appid":"wx222fbe58feee7819","UniversalLinks":""}},"maps":{},"ad":{},"geolocation":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"arguments":"{\"name\":\"\",\"path\":\"\",\"query\":\"\",\"id\":0}","allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"3.2.3","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#bababa","selectedColor":"#e93340","backgroundColor":"#FFFFFF","borderStyle":"rgba(255,255,255,0.4)","list":[{"pagePath":"pages/equity/index","text":"通证权易","iconPath":"static/tabBar/tabBar_icon_00.png","selectedIconPath":"static/tabBar/tabBar_show_00.png"},{"pagePath":"pages/market/index","text":"转让市场","iconPath":"static/tabBar/tabBar_icon_01.png","selectedIconPath":"static/tabBar/tabBar_show_01.png"},{"pagePath":"pages/store/index","text":"企业工具","iconPath":"static/tabBar/tabBar_icon_02.png","selectedIconPath":"static/tabBar/tabBar_show_02.png"},{"pagePath":"pages/property/index","text":"我的资产","iconPath":"static/tabBar/tabBar_icon_03.png","selectedIconPath":"static/tabBar/tabBar_show_03.png"}],"height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"}}
|
||||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__CD19AAD","name":"易品新境","version":{"name":"1.0.0","code":"100"},"description":"易品新境为商家提供营销引流工具","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"OAuth":{},"Payment":{},"Share":{},"Geolocation":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":false,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#f5f5f5"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"safearea":{"bottom":{"offset":"none"}},"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"androidStyle":"common"},"google":{"permissions":["\u003cuses-feature android:name\u003d\"android.hardware.camera\"/\u003e","\u003cuses-feature android:name\u003d\"android.hardware.camera.autofocus\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.ACCESS_NETWORK_STATE\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.ACCESS_WIFI_STATE\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.CAMERA\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.CHANGE_NETWORK_STATE\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.CHANGE_WIFI_STATE\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.FLASHLIGHT\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.MODIFY_AUDIO_SETTINGS\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.READ_LOGS\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.READ_PHONE_STATE\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.VIBRATE\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.WAKE_LOCK\"/\u003e","\u003cuses-permission android:name\u003d\"android.permission.WRITE_SETTINGS\"/\u003e"]},"apple":{},"plugins":{"oauth":{"univerify":{},"weixin":{"appid":"wx222fbe58feee7819","appsecret":"3d24525a636d7573a8fae885097d5cf7","UniversalLinks":""}},"payment":{"weixin":{"__platform__":["android"],"appid":"wx222fbe58feee7819","UniversalLinks":""}},"share":{"weixin":{"appid":"wx222fbe58feee7819","UniversalLinks":""}},"maps":{},"ad":{},"geolocation":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"3.2.3","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#bababa","selectedColor":"#e93340","backgroundColor":"#FFFFFF","borderStyle":"rgba(255,255,255,0.4)","list":[{"pagePath":"pages/equity/index","text":"通证权易","iconPath":"static/tabBar/tabBar_icon_00.png","selectedIconPath":"static/tabBar/tabBar_show_00.png"},{"pagePath":"pages/market/index","text":"转让市场","iconPath":"static/tabBar/tabBar_icon_01.png","selectedIconPath":"static/tabBar/tabBar_show_01.png"},{"pagePath":"pages/store/index","text":"企业工具","iconPath":"static/tabBar/tabBar_icon_02.png","selectedIconPath":"static/tabBar/tabBar_show_02.png"},{"pagePath":"pages/property/index","text":"我的资产","iconPath":"static/tabBar/tabBar_icon_03.png","selectedIconPath":"static/tabBar/tabBar_show_03.png"}],"height":"50px"},"launch_path":"__uniappview.html","arguments":"{\"pathName\":\"pages/market/details\",\"query\":\"\"}"}}
|
||||
Reference in New Issue
Block a user