Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/barter-app
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 {
|
export {
|
||||||
mall,
|
mall,
|
||||||
list,
|
list,
|
||||||
@@ -174,5 +190,7 @@ export {
|
|||||||
managesChain,
|
managesChain,
|
||||||
managesAttestation,
|
managesAttestation,
|
||||||
managesTracedTo,
|
managesTracedTo,
|
||||||
managesCoupons
|
managesCoupons,
|
||||||
|
managesGoodsPut,
|
||||||
|
managesGoodsExtends
|
||||||
}
|
}
|
||||||
|
|||||||
58
apis/interfaces/market.js
Normal file
58
apis/interfaces/market.js
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* 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) => {
|
||||||
|
return request({
|
||||||
|
url: 'markets/pay/' + id + '/' + platform
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
export {
|
||||||
|
markets,
|
||||||
|
marketsLogs,
|
||||||
|
marketsInfo,
|
||||||
|
marketsBuy,
|
||||||
|
marketsPay
|
||||||
|
}
|
||||||
23
pages.json
23
pages.json
@@ -278,7 +278,8 @@
|
|||||||
"path": "pages/market/logs",
|
"path": "pages/market/logs",
|
||||||
"name": "marketLogs",
|
"name": "marketLogs",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "成交历史"
|
"navigationBarTitleText": "成交历史",
|
||||||
|
"navigationBarBackgroundColor":"#FFFFFF"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/order/buy",
|
"path": "pages/order/buy",
|
||||||
@@ -501,8 +502,24 @@
|
|||||||
"navigationBarTitleText": "商品认证信息",
|
"navigationBarTitleText": "商品认证信息",
|
||||||
"navigationBarBackgroundColor": "#FFFFFF"
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
}
|
}
|
||||||
}
|
}, {
|
||||||
],
|
"path" : "pages/market/details",
|
||||||
|
"name" : "marketDetails",
|
||||||
|
"style" : {
|
||||||
|
"navigationBarTitleText": "转让详情"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"path" : "pages/market/goods",
|
||||||
|
"name" : "marketGoods",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "锚定商品",
|
||||||
|
"titleNView": {
|
||||||
|
"backgroundColor": "#FFFFFF",
|
||||||
|
"type": "transparent"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
"color": "#bababa",
|
"color": "#bababa",
|
||||||
"selectedColor": "#e93340",
|
"selectedColor": "#e93340",
|
||||||
|
|||||||
@@ -174,22 +174,24 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { managesGoodsCreate, managesCreate, managesGoodsEdit } from '@/apis/interfaces/goods'
|
import { managesGoodsCreate, managesCreate, managesGoodsEdit, managesGoodsPut } from '@/apis/interfaces/goods'
|
||||||
import { uploads } from '@/apis/interfaces/uploading'
|
import { uploads } from '@/apis/interfaces/uploading'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
categoryId : '', // 一级分类
|
||||||
|
categoryCid : '', // 二级分类
|
||||||
name : '', // 标题
|
name : '', // 标题
|
||||||
pictures : [], // 轮播图
|
pictures : [], // 轮播图
|
||||||
content : [], // 详情图
|
content : [], // 详情图
|
||||||
description : '', // 商品描述
|
description : '', // 商品描述
|
||||||
isPostSale : false, // 是否允许售后
|
isPostSale : false, // 是否允许售后
|
||||||
services : [], // 商品服务
|
services : [], // 商品服务
|
||||||
skus_cost : '0.00',// 市场价格
|
skus_cost : '', // 市场价格
|
||||||
skus_price : '0.00',// 销售价格
|
skus_price : '', // 销售价格
|
||||||
skus_number : 1, // 易货起购数量
|
skus_number : 1, // 易货起购数量
|
||||||
skus_unit : '件', // 规格文字
|
skus_unit : '件', // 规格文字
|
||||||
skus_charge : '0.00',// 分销佣金
|
skus_charge : '', // 分销佣金
|
||||||
skus_stock : '', // 库存
|
skus_stock : '', // 库存
|
||||||
isChange : false, // 是否支持易货
|
isChange : false, // 是否支持易货
|
||||||
stores : [], // 关联店铺
|
stores : [], // 关联店铺
|
||||||
@@ -208,10 +210,49 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
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 => {
|
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 => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
@@ -220,6 +261,7 @@
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// 添加配置信息
|
||||||
managesCreate({
|
managesCreate({
|
||||||
category_cid: this.$Route.query.cid
|
category_cid: this.$Route.query.cid
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
@@ -239,6 +281,8 @@
|
|||||||
this.tags = res.tags
|
this.tags = res.tags
|
||||||
this.servicesArr= res.services
|
this.servicesArr= res.services
|
||||||
this.type = res.type
|
this.type = res.type
|
||||||
|
this.categoryId = this.$Route.query.id
|
||||||
|
this.categoryCid= this.$Route.query.cid
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
@@ -315,8 +359,8 @@
|
|||||||
let submitData = {
|
let submitData = {
|
||||||
name : this.name,
|
name : this.name,
|
||||||
cover : this.pictures[0].path,
|
cover : this.pictures[0].path,
|
||||||
category_id : this.$Route.query.id,
|
category_id : this.categoryId,
|
||||||
category_cid : this.$Route.query.cid,
|
category_cid : this.categoryCid,
|
||||||
pictures : pictures,
|
pictures : pictures,
|
||||||
content : content,
|
content : content,
|
||||||
description : this.description,
|
description : this.description,
|
||||||
@@ -333,7 +377,8 @@
|
|||||||
stores : this.stores,
|
stores : this.stores,
|
||||||
expiried_at : this.expiriedAt
|
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 => {
|
submitFund.then(res => {
|
||||||
if(this.type === 2){
|
if(this.type === 2){
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
@@ -342,13 +387,27 @@
|
|||||||
showCancel : false,
|
showCancel : false,
|
||||||
success : res => {
|
success : res => {
|
||||||
if(res.confirm){
|
if(res.confirm){
|
||||||
this.$Router.back()
|
this.$Router.back(this.$Route.query.type === 'edit' ? 1 : 2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return
|
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 => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { managesGoodsAuth } from '@/apis/interfaces/goods'
|
import { managesGoodsAuth, managesGoodsExtends } from '@/apis/interfaces/goods'
|
||||||
import { uploads } from '@/apis/interfaces/uploading'
|
import { uploads } from '@/apis/interfaces/uploading'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -77,7 +77,21 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
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: {
|
methods: {
|
||||||
// picker选择
|
// picker选择
|
||||||
@@ -134,7 +148,11 @@
|
|||||||
showCancel : false,
|
showCancel : false,
|
||||||
success : res => {
|
success : res => {
|
||||||
if(res.confirm){
|
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()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
338
pages/market/details.vue
Normal file
338
pages/market/details.vue
Normal file
@@ -0,0 +1,338 @@
|
|||||||
|
<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" @click="onGoods">查看锚定商品信息<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">可用{{account.eb}},冻结{{account.frozenEb}}</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 : {},
|
||||||
|
account : {
|
||||||
|
eb : '0.00',
|
||||||
|
frozenEb: '0.00'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
marketsInfo(this.$Route.query.marketId || 5).then(res =>{
|
||||||
|
this.info = res
|
||||||
|
this.price = res.price
|
||||||
|
this.loding = false
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
// 查看锚定产品
|
||||||
|
onGoods(){
|
||||||
|
this.$Router.push({name: 'marketGoods', params: { id: this.info.goods.goods_id }})
|
||||||
|
},
|
||||||
|
// 选择购买方式
|
||||||
|
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(this.info.market_id, {
|
||||||
|
qty: this.stock
|
||||||
|
}).then(res => {
|
||||||
|
this.account = res.account
|
||||||
|
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 = {}
|
||||||
|
marketsPay(this.orderNo, this.payValue).then(res => {
|
||||||
|
switch (this.payValue){
|
||||||
|
case 'eb':
|
||||||
|
console.log(res)
|
||||||
|
console.log('支付结果')
|
||||||
|
break
|
||||||
|
case 'wechat':
|
||||||
|
this.wxPay(JSON.parse(res))
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 微信支付
|
||||||
|
wxPay(payConfig){
|
||||||
|
uni.requestPayment({
|
||||||
|
provider : 'wxpay',
|
||||||
|
orderInfo : payConfig,
|
||||||
|
success : payRes => {
|
||||||
|
console.log(payRes)
|
||||||
|
},
|
||||||
|
fail : payErr => {
|
||||||
|
uni.showToast({
|
||||||
|
title: payErr.errMsg,
|
||||||
|
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>
|
||||||
116
pages/market/goods.vue
Normal file
116
pages/market/goods.vue
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="goods-cover">
|
||||||
|
<swiper class="swiper" circular indicator-dots indicator-active-color="#e93340">
|
||||||
|
<swiper-item v-for="(item, index) in cover" :key="index">
|
||||||
|
<view class="swiper-item">
|
||||||
|
<image class="swiper-cover" :src="item" mode="aspectFill" />
|
||||||
|
</view>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
</view>
|
||||||
|
<view class="info">
|
||||||
|
<view class="info-item">
|
||||||
|
<label>锚定商品</label>
|
||||||
|
{{info.name}}
|
||||||
|
</view>
|
||||||
|
<view class="info-item">
|
||||||
|
<label>商品规格</label>
|
||||||
|
{{info.skusUnit}}
|
||||||
|
</view>
|
||||||
|
<view class="info-item">
|
||||||
|
<label>提供企业</label>
|
||||||
|
{{info.companyName}}
|
||||||
|
</view>
|
||||||
|
<view class="info-item">
|
||||||
|
<label>企业诚信</label>
|
||||||
|
{{info.integrity}}
|
||||||
|
</view>
|
||||||
|
<view class="info-item">
|
||||||
|
<label>权证销量</label>
|
||||||
|
{{info.sales}}
|
||||||
|
</view>
|
||||||
|
<view class="info-item">
|
||||||
|
<label>发布时间</label>
|
||||||
|
{{info.createdAt}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { goods } from '@/apis/interfaces/goods'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
cover: [],
|
||||||
|
info : {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
goods(this.$Route.query.id).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
this.cover = res.pictures
|
||||||
|
this.info = {
|
||||||
|
name : res.name,
|
||||||
|
companyName : res.company.name,
|
||||||
|
createdAt : res.created_at,
|
||||||
|
sales : res.sales,
|
||||||
|
integrity : res.company.integrity,
|
||||||
|
skusUnit : res.skus[0].unit
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
// 数权
|
||||||
|
.goods-cover{
|
||||||
|
width: 100%;
|
||||||
|
padding-top: 100%;
|
||||||
|
position: relative;
|
||||||
|
background: #f5f5f5;
|
||||||
|
.swiper{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
.swiper-item{
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.swiper-cover{
|
||||||
|
@extend .swiper-item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 锚定商品详情
|
||||||
|
.info{
|
||||||
|
background: white;
|
||||||
|
padding: $padding;
|
||||||
|
.info-item{
|
||||||
|
padding-left: 200rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
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>
|
||||||
@@ -6,40 +6,57 @@
|
|||||||
价格
|
价格
|
||||||
<image
|
<image
|
||||||
class="icon"
|
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>
|
</view>
|
||||||
<view class="lists">
|
<view class="lists">
|
||||||
<view class="item" v-for="(item, index) in 10" :key="index">
|
<view class="item" v-for="(item, index) in marketArray" :key="index">
|
||||||
<image class="cover" src="@/static/dev/good_cover_00.jpg" mode="aspectFill"></image>
|
<image class="cover" :src="item.goods.cover" mode="aspectFill"></image>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="title nowrap">易品新境权证<text>*1</text></view>
|
<view class="title nowrap">数字权证<text>{{item.surplus}}/{{item.stock}}</text></view>
|
||||||
<view class="text nowrap">谷风一木3层软抽面巾纸</view>
|
<view class="text nowrap">锚定商品:{{item.goods.goods_name}}</view>
|
||||||
<view class="text nowrap">转让方:温文尔雅的小阿玉</view>
|
<view class="text nowrap">提供企业:{{item.company.name}}</view>
|
||||||
<view class="text nowrap">Hash:djsakljkljfl3213dsaHKLDJS82231csa</view>
|
<view class="text nowrap">转让用户:{{item.user.nickname}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="price">¥21000.00/个</view>
|
<view class="price">¥{{item.price}}/个</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { markets } from '@/apis/interfaces/market'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tabIndex : 0,
|
tabIndex : 0,
|
||||||
marketType : 'low',
|
marketType : 'asc',
|
||||||
marketArray : []
|
marketArray : [],
|
||||||
|
page : {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getMarkets()
|
||||||
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
// 筛选产品
|
||||||
onTabs(e){
|
onTabs(e){
|
||||||
let index = e.target.dataset.index
|
let index = e.target.dataset.index
|
||||||
if(index == 0 && index == this.tabIndex) return
|
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.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(){
|
onNavigationBarButtonTap(){
|
||||||
|
|||||||
@@ -1,19 +1,81 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { marketsLogs } from '@/apis/interfaces/market'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
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>
|
</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>
|
</style>
|
||||||
|
|||||||
8
unpackage/dist/dev/app-plus/app-config-service.js
vendored
Normal file
8
unpackage/dist/dev/app-plus/app-config-service.js
vendored
Normal file
File diff suppressed because one or more lines are too long
42393
unpackage/dist/dev/app-plus/app-service.js
vendored
Normal file
42393
unpackage/dist/dev/app-plus/app-service.js
vendored
Normal file
File diff suppressed because one or more lines are too long
39387
unpackage/dist/dev/app-plus/app-view.js
vendored
Normal file
39387
unpackage/dist/dev/app-plus/app-view.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/app-plus/manifest.json
vendored
Normal file
1
unpackage/dist/dev/app-plus/manifest.json
vendored
Normal file
@@ -0,0 +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"}}
|
||||||
Reference in New Issue
Block a user