Compare commits
11 Commits
a5a6b924a2
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c02632e452 | ||
|
|
8454a0db23 | ||
| 0fa0f4ae3d | |||
|
|
faa6c23826 | ||
|
|
1e474cb82f | ||
| b22df1d58d | |||
| 86ef1ed56a | |||
| 47667b9177 | |||
|
|
4f2b502ce8 | ||
|
|
842332ef6b | ||
| c85f1bccc0 |
@@ -184,9 +184,12 @@ const managesAttestation = (id) => {
|
||||
}
|
||||
|
||||
// 商品溯源
|
||||
const managesTracedTo = (id) => {
|
||||
const managesTracedTo = (id,page) => {
|
||||
return request({
|
||||
url: 'mall/goods/' + id + '/trace'
|
||||
url: 'mall/goods/' + id + '/trace',
|
||||
data:{
|
||||
page: page
|
||||
}
|
||||
})
|
||||
}
|
||||
// 商品第一条溯源
|
||||
@@ -203,6 +206,12 @@ const shopself = () => {
|
||||
})
|
||||
}
|
||||
|
||||
// 商品服务类型调整
|
||||
const goodsExtendsCreate = (id) => {
|
||||
return request({
|
||||
url: 'manages/goods/' + id + '/extends/create'
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
managesGoodsIndex,
|
||||
@@ -230,5 +239,6 @@ export {
|
||||
managesAttestation,
|
||||
managesTracedTo,
|
||||
checkmessage,
|
||||
shopself
|
||||
shopself,
|
||||
goodsExtendsCreate
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"name" : "链商星球",
|
||||
"appid" : "__UNI__1F65101",
|
||||
"description" : "安徽星煌,链商星球商家工具",
|
||||
"versionName" : "1.2.1",
|
||||
"versionCode" : 121,
|
||||
"versionName" : "1.2.2",
|
||||
"versionCode" : 122,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
"color": "#fff"
|
||||
}]
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}, {
|
||||
|
||||
@@ -11,8 +11,10 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let i = "dsadsa"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -66,8 +66,8 @@
|
||||
<view class="task-title">{{item.title}}</view>
|
||||
<view class="task-subtitle">{{item.sub_title}}</view>
|
||||
<view class="task-label" :class="{'active' : item.is_finish}">
|
||||
<image v-if="!item.is_finish" class="task-label-img" src="/static/icons/crystal-icon.png" mode="widthFix" />
|
||||
{{item.is_finish ? '已完成' : item.tips}}
|
||||
{{ !item.is_finish ? '+' : ''}}<image v-if="!item.is_finish" class="task-label-img" src="/static/icons/crystal-icon.png" mode="widthFix" />
|
||||
{{ item.is_finish ? '已完成' : item.tips}}
|
||||
<block v-if="!item.is_finish">/人</block>
|
||||
<image @click.stop="showHelp(item.title, item.remark)" class="task-label-icon"
|
||||
src="@/static/imgs/user-crystalMark-grey.png"></image>
|
||||
|
||||
@@ -1,104 +1,59 @@
|
||||
<template>
|
||||
<view class="GoodsAuthentication">
|
||||
<view class="authenticationTop">区块链溯源码:{{info.token}}</view>
|
||||
<view class="GoodsAuthentication" v-if="loaded">
|
||||
<view class="authenticationTop">商品认证溯源码:{{token}}</view>
|
||||
<!-- 商品认证 商品和服务 -->
|
||||
<view class="authenticationItem">
|
||||
<view class="authenticationItem" v-if="goods.length>0">
|
||||
<view class="authenticationItemTitle">权证认证</view>
|
||||
<view class="authenticationItemcontent" v-if="info.goods">
|
||||
<view class="authenticationItemcontentItem" v-if="info.goods.name">
|
||||
<view class="title">{{info.goods.type ===1 ? '权证名称':'项目名称'}}: </view>
|
||||
<view class="content">{{info.goods.name || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.goods.type ===1 && info.goods.batch">
|
||||
<view class="title">生产批次:</view>
|
||||
<view class="content">{{info.goods.batch || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.goods.type ===2 && info.goods.category">
|
||||
<view class="title">项目分类:</view>
|
||||
<view class="content">{{info.goods.category || '暂无数据'}}</view>
|
||||
</view>
|
||||
|
||||
<view class="authenticationItemcontentItem" v-if="info.goods.type ===1 && info.goods.skus[0].unit">
|
||||
<view class="title">规格:</view>
|
||||
<view class="content">{{info.goods.skus[0].unit || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.goods.skus[0].stock">
|
||||
<view class="title">数量:</view>
|
||||
<view class="content">{{info.goods.skus[0].stock || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.goods.skus[0].price">
|
||||
<view class="title">售价:</view>
|
||||
<view class="content">{{info.goods.skus[0].price || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.goods.type ===1 && info.goods.producted_at">
|
||||
<view class="title">生产日期:</view>
|
||||
<view class="content">{{info.goods.producted_at || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.goods.expiried_at">
|
||||
<view class="title">{{info.goods.type ===1?'保质期':'有效期'}}:</view>
|
||||
<view class="content">{{info.goods.expiried_at || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.goods.type ===1 && info.goods.product_name">
|
||||
<view class="title">生产厂家:</view>
|
||||
<view class="content">{{info.goods.product_name || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.goods.type ===1 && info.goods.product_address">
|
||||
<view class="title">生产地:</view>
|
||||
<view class="content">{{info.goods.product_address || '暂无数据'}}</view>
|
||||
</view>
|
||||
<!-- <view class="authenticationItemcontentItem" v-if="info.goods.type ===2 && info.goods.product_name">
|
||||
<view class="title">供应商:</view>
|
||||
<view class="content">{{info.goods.product_name || '暂无数据'}}</view>
|
||||
</view> -->
|
||||
<view class="authenticationItemcontentItem" v-if="info.goods.lisence">
|
||||
<view class="title">经营许可证:</view>
|
||||
<view class="content">{{info.goods.lisence || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.goods.cover">
|
||||
<view class="title">实物照片:</view>
|
||||
<image class="img" v-if="info.goods.cover" :src="info.goods.cover"
|
||||
@click="priveImg(info.goods.cover)" mode="aspectFill" />
|
||||
<view class="content" v-else>暂无数据</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontent">
|
||||
<block v-for="(item,index) in goods" :key='index'>
|
||||
<view class="authenticationItemcontentItem" >
|
||||
<view class="title">{{item.title}}:</view>
|
||||
<view class="content" v-if="item.type !== 2">{{item.value || '暂无数据~'}}</view>
|
||||
<block v-if="item.type === 2">
|
||||
<image class="img" v-if="item.value" :src="item.value" @click="priveImg(item.value)" mode="aspectFill" />
|
||||
<view class="content" v-else>暂无数据~</view>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 企业认证 (商品和服务通用) -->
|
||||
<view class="authenticationItem">
|
||||
<view class="authenticationItemTitle">企业认证</view>
|
||||
<view class="authenticationItemcontent" v-if="info.certification">
|
||||
<view class="authenticationItemcontentItem" v-if="info.certification.name ">
|
||||
<view class="authenticationItemcontent" v-if="certification">
|
||||
<view class="authenticationItemcontentItem" v-if="certification.name ">
|
||||
<view class="title">企业名称:</view>
|
||||
<view class="content">{{info.certification.name || '暂无数据'}}</view>
|
||||
<view class="content">{{certification.name || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.certification.address" >
|
||||
<view class="authenticationItemcontentItem" v-if="certification.address" >
|
||||
<view class="title">企业地址:</view>
|
||||
<view class="content">{{info.certification.address || '暂无数据'}}</view>
|
||||
<view class="content">{{certification.address || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.certification.certification.code">
|
||||
<view class="authenticationItemcontentItem" v-if="certification.certification.code">
|
||||
<view class="title">统一信用代码:</view>
|
||||
<view class="content">{{info.certification.certification.code || '暂无数据'}}</view>
|
||||
<view class="content">{{certification.certification.code || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.certification.industry.title">
|
||||
<view class="authenticationItemcontentItem" v-if="certification.industry.title">
|
||||
<view class="title">行业:</view>
|
||||
<view class="content">{{info.certification.industry.title || '暂无数据'}}</view>
|
||||
<view class="content">{{certification.industry.title || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.certification.range">
|
||||
<view class="authenticationItemcontentItem" v-if="certification.range">
|
||||
<view class="title">经营范围:</view>
|
||||
<view class="content">{{info.certification.range || '暂无数据'}}</view>
|
||||
<view class="content">{{certification.range || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.certification.contack">
|
||||
<view class="authenticationItemcontentItem" v-if="certification.contack">
|
||||
<view class="title">联系电话:</view>
|
||||
<u-icon name="phone-fill" v-if='info.certification.contack'
|
||||
@click="call(info.certification.contact)" color="#2979ff" label-color="#2979ff" label-size="26"
|
||||
:label='info.certification.contact' />
|
||||
<u-icon name="phone-fill" v-if='certification.contack'
|
||||
@click="call(certification.contact)" color="#2979ff" label-color="#2979ff" label-size="26"
|
||||
:label='certification.contact' />
|
||||
<view class="content" v-else> 暂无数据 </view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.certification.certification.license">
|
||||
<view class="authenticationItemcontentItem" v-if="certification.certification.license">
|
||||
<view class="title">营业执照:</view>
|
||||
<image class="img" v-if='info.certification.certification.license'
|
||||
:src="info.certification.certification.license"
|
||||
@click="priveImg(info.certification.certification.license)" mode="aspectFill" />
|
||||
<image class="img" v-if='certification.certification.license'
|
||||
:src="certification.certification.license"
|
||||
@click="priveImg(certification.certification.license)" mode="aspectFill" />
|
||||
<view class="content" v-else>暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -116,18 +71,28 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
info: ''
|
||||
token:"",
|
||||
certification: {},
|
||||
goods:[],
|
||||
loaded:false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
managesAttestation(this.$Route.query.id).then(res => {
|
||||
this.info = res
|
||||
this.$nextTick(() => {
|
||||
this.certification = res.certification
|
||||
this.goods = res.goods
|
||||
this.token = res.token
|
||||
this.loaded = true
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
priveImg(img) {
|
||||
uni.previewImage({
|
||||
current: img, // 当前显示图片的http链接
|
||||
longPressActions: {
|
||||
itemList: []
|
||||
},
|
||||
urls: [img] // 需要预览的图片http链接列表
|
||||
})
|
||||
},
|
||||
|
||||
@@ -14,11 +14,12 @@
|
||||
<view class="goods-content">
|
||||
<view class="header">
|
||||
<view class="flex-box">
|
||||
<view class="price"><text>¥</text>{{goodsObj.price.show}}</view>
|
||||
<view class="price"><text>¥</text>{{goodsObj.price.show}}
|
||||
<span class='shuijing' v-if='goodsObj.price.pv>0'>
|
||||
+ <span> {{goodsObj.price.pv}} </span><image style="width: 20rpx;" src="/static/icons/crystal-icon.png" mode="widthFix" />
|
||||
</span>
|
||||
</view>
|
||||
<!-- <view class="sales">累计交易{{goodsObj.sales}}次</view> -->
|
||||
<span style='font-size: 26rpx;color: #999;font-weight: normal;padding-left: 20rpx;' v-if='goodsObj.price.pv>0'>
|
||||
贡献值:<span>{{goodsObj.price.pv}}</span><image style="width: 20rpx;" src="/static/icons/crystal-icon.png" mode="widthFix" />
|
||||
</span>
|
||||
</view>
|
||||
<view class="coupon" v-if="couponSee.length > 0" @click="couponsOpne">
|
||||
<view class="coupon-list" v-for="(item, index) in couponSee" :key="index">
|
||||
@@ -413,7 +414,9 @@
|
||||
font-weight: bold;
|
||||
color: $text-price;
|
||||
font-size: $title-size + 14;
|
||||
|
||||
.shuijing{
|
||||
font-size: 26rpx;color: #999;font-weight: normal;padding-left: 20rpx;
|
||||
}
|
||||
text {
|
||||
font-size: 70%;
|
||||
}
|
||||
|
||||
@@ -1,56 +1,40 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="form-block">
|
||||
<view class="form-upd">
|
||||
<view class="form-title">产品实物图片<text>(点击预览,长按删除)</text></view>
|
||||
<view class="form-imgs">
|
||||
<view
|
||||
class="item"
|
||||
v-if="extendCover.length > 0"
|
||||
@click="openImg"
|
||||
@longpress="extendCover = []"
|
||||
>
|
||||
<image class="item-cover" :src="extendCover[0].showpath" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="item item-add" v-else @click="updCover">
|
||||
<image class="item-cover" src="@/static/icons/add-icon.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 商品基本信息 -->
|
||||
<view class="form-block">
|
||||
<view class="form-box picker-flex">
|
||||
<label class="form-label">生产日期</label>
|
||||
<picker mode="date" :value="productedAt" @change="pickerChange($event, 'productedAt')">
|
||||
<view class="picker-text">
|
||||
{{productedAt || '选择商品生产日期'}}
|
||||
<uni-icons class="picker-icon" type="arrowright" color="#999"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-box picker-flex">
|
||||
<label class="form-label">过期时间</label>
|
||||
<picker mode="date" :value="expiriedAt" @change="pickerChange($event, 'expiriedAt')">
|
||||
<view class="picker-text">
|
||||
{{expiriedAt || '选择商品过期时间'}}
|
||||
<uni-icons class="picker-icon" type="arrowright" color="#999"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-box inputs-flex">
|
||||
<label class="form-label">生产商名称</label>
|
||||
<input type="text" v-model="productName" placeholder="输入商品生产商名称"/>
|
||||
</view>
|
||||
<view class="form-box inputs-flex">
|
||||
<label class="form-label">生产许可证号</label>
|
||||
<input type="text" v-model="lisence" placeholder="输入商品生产许可证号"/>
|
||||
</view>
|
||||
<block v-for="item in createInfo" :key='item.id'>
|
||||
<!-- text -->
|
||||
<view class="form-box inputs-flex" v-if="item.type === 1">
|
||||
<label class="form-label"><span v-if='item.required'>*</span>{{item.title}}</label>
|
||||
<input type="text" @input='inputT(item.name,$event)' v-model="createAddInfo[item.name]" :placeholder="`请输入${item.title}`" />
|
||||
</view>
|
||||
|
||||
<view class="form-box inputs-flex">
|
||||
<label class="form-label">生产商地址</label>
|
||||
<input type="text" v-model="productAddress" placeholder="输入商品生产商地址"/>
|
||||
</view>
|
||||
<!-- images -->
|
||||
<view class="form-upd" v-if="item.type === 2">
|
||||
<view class="form-title"><span v-if='item.required'>*</span>{{item.title}}<text>(点击预览,长按删除)</text></view>
|
||||
<view class="form-imgs">
|
||||
<view class="item" v-if="createAddInfo[item.name].showpath" @click="openImg(item.name)"
|
||||
@longpress="delImg(item.name)">
|
||||
<image class="item-cover" :src="createAddInfo[item.name].showpath" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="item item-add" v-else @click="updCover(item.name)">
|
||||
<image class="item-cover" src="@/static/icons/add-icon.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- date -->
|
||||
<view class="form-box picker-flex" v-if="item.type === 3">
|
||||
<label class="form-label"><span v-if='item.required'>*</span>{{item.title}}</label>
|
||||
<picker mode="date" :value="createAddInfo[item.name]" @change="pickerChange($event, item.name)">
|
||||
<view class="picker-text">
|
||||
{{createAddInfo[item.name] || `选择${item.title}`}}
|
||||
<uni-icons class="picker-icon" type="arrowright" color="#999"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
</view>
|
||||
<!-- 安全区 -->
|
||||
<view class="ios-bottom"></view>
|
||||
@@ -63,95 +47,120 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { managesGoodsAuth, managesGoodsExtends } from '@/apis/interfaces/goods'
|
||||
import { uploads } from '@/apis/interfaces/uploading'
|
||||
import {
|
||||
managesGoodsAuth,
|
||||
managesGoodsExtends,
|
||||
goodsExtendsCreate
|
||||
} from '@/apis/interfaces/goods'
|
||||
import {
|
||||
uploads
|
||||
} from '@/apis/interfaces/uploading'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
productedAt : '', // 生产日期
|
||||
expiriedAt : '', // 过期时间
|
||||
lisence : '', // 生产许可证号
|
||||
productName : '', // 生产商名称
|
||||
productAddress : '', // 生产商地址
|
||||
extendCover : [] // 实物图片
|
||||
createAddInfo: {}, // suoyou
|
||||
createInfo: [], // 认证信息可以活的
|
||||
};
|
||||
},
|
||||
created() {
|
||||
if(this.$Route.query.edit === 'true' || this.$Route.query.edit ){
|
||||
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'
|
||||
})
|
||||
goodsExtendsCreate(this.$Route.query.id).then(res => {
|
||||
this.createInfo = res.length > 0 ? res : []
|
||||
res.filter(item => {
|
||||
if (item.type === 2) {
|
||||
this.$set(this.createAddInfo, item.name, {
|
||||
path: '',
|
||||
showpath: ''
|
||||
})
|
||||
} else {
|
||||
this.$set(this.createAddInfo, item.name, '')
|
||||
}
|
||||
})
|
||||
}
|
||||
if (this.$Route.query.edit === 'true' || this.$Route.query.edit) {
|
||||
managesGoodsExtends(this.$Route.query.id).then(res => {
|
||||
console.log(res)
|
||||
this.createAddInfo = res
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 输入框txt 分别赋值给text
|
||||
inputT(key, e) {
|
||||
this.$set(this.createAddInfo, key, e.detail.value)
|
||||
},
|
||||
// picker选择
|
||||
pickerChange(e, key){
|
||||
this[key] = e.detail.value
|
||||
pickerChange(e, key) {
|
||||
this.$set(this.createAddInfo, key, e.detail.value)
|
||||
},
|
||||
// 图片预览
|
||||
openImg(){
|
||||
let paths = this.extendCover.map(val => {
|
||||
return val.showpath
|
||||
})
|
||||
openImg(key) {
|
||||
console.log(key)
|
||||
uni.previewImage({
|
||||
urls : paths,
|
||||
current : 0,
|
||||
urls: [this.createAddInfo[key].showpath],
|
||||
current: 0,
|
||||
indicator: 'number'
|
||||
})
|
||||
},
|
||||
delImg(key){
|
||||
this.$set(this.createAddInfo, key, {
|
||||
path: '',
|
||||
showpath:''
|
||||
})
|
||||
},
|
||||
// 上传图片
|
||||
updCover(){
|
||||
updCover(key) {
|
||||
uni.chooseImage({
|
||||
count : 1,
|
||||
success : res => {
|
||||
count: 1,
|
||||
success: res => {
|
||||
uploads([{
|
||||
uri : res.tempFilePaths[0]
|
||||
uri: res.tempFilePaths[0]
|
||||
}]).then(updRes => {
|
||||
this.extendCover.push({
|
||||
path : updRes.path[0],
|
||||
showpath: updRes.url[0]
|
||||
this.$nextTick(() => {
|
||||
this.$set(this.createAddInfo, key, {
|
||||
path: updRes.path[0],
|
||||
showpath: updRes.url[0]
|
||||
})
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 发布产品
|
||||
submitAdd(){
|
||||
let submitData = {
|
||||
producted_at : this.productedAt,
|
||||
expiried_at : this.expiriedAt,
|
||||
lisence : this.lisence,
|
||||
product_name : this.productName,
|
||||
product_address : this.productAddress,
|
||||
extend_cover : this.extendCover[0].path
|
||||
}
|
||||
submitAdd() {
|
||||
let submitData = this.createAddInfo
|
||||
this.createInfo.filter(item => {
|
||||
if (item.type === 2) {
|
||||
submitData[item.name] = this.createAddInfo[item.name].path
|
||||
}
|
||||
})
|
||||
let submitFund = managesGoodsAuth(this.$Route.query.id, submitData)
|
||||
submitFund.then(res => {
|
||||
uni.setStorageSync('refresh',true)
|
||||
uni.setStorageSync('refresh', true)
|
||||
uni.showModal({
|
||||
title : '提示',
|
||||
content : '商品权证认证信息已提交,请耐心等待平台审核',
|
||||
showCancel : false,
|
||||
success : res => {
|
||||
if(res.confirm){
|
||||
if(this.$Route.query.type == 'goodsAdd'){
|
||||
title: '提示',
|
||||
content: '商品权证认证信息已提交,请耐心等待平台审核',
|
||||
showCancel: false,
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
if (this.$Route.query.type == 'goodsAdd') {
|
||||
this.$Router.back(this.$Route.query.edit == 'true' ? 2 : 3)
|
||||
}else{
|
||||
} else {
|
||||
this.$Router.back()
|
||||
}
|
||||
}
|
||||
@@ -160,7 +169,7 @@
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -169,20 +178,23 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content{
|
||||
.content {
|
||||
padding-bottom: 150rpx;
|
||||
}
|
||||
|
||||
// 表单
|
||||
.form-block{
|
||||
.form-block {
|
||||
background: white;
|
||||
margin-top: $margin - 10;
|
||||
.form-box{
|
||||
|
||||
.form-box {
|
||||
position: relative;
|
||||
padding-left: 240rpx;
|
||||
padding-right: $padding;
|
||||
font-size: $title-size-lg;
|
||||
min-height: 80rpx;
|
||||
&::after{
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: $margin;
|
||||
@@ -191,26 +203,35 @@
|
||||
content: " ";
|
||||
background: $border-color;
|
||||
}
|
||||
&:last-child::after{
|
||||
|
||||
&:last-child::after {
|
||||
display: none;
|
||||
}
|
||||
.form-label{
|
||||
|
||||
.form-label {
|
||||
position: absolute;
|
||||
left: $margin;
|
||||
line-height: 80rpx;
|
||||
top: 0;
|
||||
width: calc(240rpx - #{$margin});
|
||||
span{
|
||||
color: #f00;
|
||||
padding-right: $padding * .2;
|
||||
}
|
||||
}
|
||||
}
|
||||
.inputs-flex{
|
||||
input{
|
||||
|
||||
.inputs-flex {
|
||||
input {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
}
|
||||
.input-unit{
|
||||
|
||||
.input-unit {
|
||||
padding-right: 200rpx;
|
||||
.units{
|
||||
|
||||
.units {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
@@ -222,49 +243,61 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
.picker-flex{
|
||||
.picker-text{
|
||||
|
||||
.picker-flex {
|
||||
.picker-text {
|
||||
position: relative;
|
||||
line-height: 80rpx;
|
||||
min-height: 80rpx;
|
||||
padding-right: 80rpx;
|
||||
@extend .nowrap;
|
||||
.picker-icon{
|
||||
|
||||
.picker-icon {
|
||||
right: 0;
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
.picker-switch{
|
||||
|
||||
.picker-switch {
|
||||
line-height: 80rpx;
|
||||
min-height: 80rpx;
|
||||
text-align: right;
|
||||
margin-right: -15rpx;
|
||||
switch{
|
||||
transform:scale(0.7)
|
||||
|
||||
switch {
|
||||
transform: scale(0.7)
|
||||
}
|
||||
}
|
||||
}
|
||||
.form-upd{
|
||||
.form-title{
|
||||
|
||||
.form-upd {
|
||||
.form-title {
|
||||
font-size: $title-size-lg;
|
||||
line-height: 80rpx;
|
||||
padding: 0 $padding;
|
||||
text{
|
||||
span{
|
||||
color: #f00;
|
||||
padding-right: $padding * .2;
|
||||
}
|
||||
text {
|
||||
font-size: 80%;
|
||||
color: $text-gray;
|
||||
}
|
||||
}
|
||||
.form-imgs{
|
||||
|
||||
.form-imgs {
|
||||
margin-top: -($margin/3);
|
||||
padding: 0 20rpx 20rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.item{
|
||||
|
||||
.item {
|
||||
width: calc(20% - 14rpx);
|
||||
padding-top: calc(20% - 14rpx);
|
||||
margin: 7rpx;
|
||||
position: relative;
|
||||
.item-cover{
|
||||
|
||||
.item-cover {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
@@ -272,10 +305,12 @@
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.item-add{
|
||||
|
||||
.item-add {
|
||||
border: dashed 2rpx $border-color;
|
||||
box-sizing: border-box;
|
||||
.item-cover{
|
||||
|
||||
.item-cover {
|
||||
top: calc(15% - 2rpx);
|
||||
left: calc(15% - 2rpx);
|
||||
width: 70%;
|
||||
@@ -285,8 +320,9 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 发布
|
||||
.footer{
|
||||
.footer {
|
||||
background: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
@@ -295,7 +331,8 @@
|
||||
padding: 20rpx $padding;
|
||||
box-shadow: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .02);
|
||||
z-index: 9;
|
||||
.footer-btn{
|
||||
|
||||
.footer-btn {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
background: $text-price;
|
||||
@@ -304,62 +341,75 @@
|
||||
font-weight: bold;
|
||||
font-size: $title-size;
|
||||
color: white;
|
||||
&::after{
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 可选服务
|
||||
.category-popup{
|
||||
.category-popup {
|
||||
background: #F5F5F5;
|
||||
padding: 0 $padding * 2 $padding * 2 $padding * 2;
|
||||
.header{
|
||||
|
||||
.header {
|
||||
padding: $padding*2 0;
|
||||
box-sizing: border-box;
|
||||
@extend .vertical;
|
||||
.title{
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: $title-size + 14;
|
||||
font-weight: bold;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
.subtitle{
|
||||
|
||||
.subtitle {
|
||||
font-size: $title-size-m;
|
||||
color: $text-gray;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.category-flex{
|
||||
|
||||
.category-flex {
|
||||
max-height: 50vh;
|
||||
overflow-y: scroll;
|
||||
.category-flex-item{
|
||||
|
||||
.category-flex-item {
|
||||
margin-bottom: $margin;
|
||||
padding: $padding;
|
||||
background: white;
|
||||
border:solid 1rpx white;
|
||||
border: solid 1rpx white;
|
||||
box-sizing: border-box;
|
||||
.category-name{
|
||||
|
||||
.category-name {
|
||||
padding-bottom: $padding/2;
|
||||
font-weight: bold;
|
||||
font-size: $title-size-lg;
|
||||
}
|
||||
.category-content{
|
||||
|
||||
.category-content {
|
||||
font-size: $title-size-sm;
|
||||
color: $text-gray;
|
||||
@extend .ellipsis;
|
||||
}
|
||||
&.show{
|
||||
|
||||
&.show {
|
||||
color: $text-price;
|
||||
border:solid 1rpx $text-price;
|
||||
border: solid 1rpx $text-price;
|
||||
}
|
||||
&:last-child{
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btns{
|
||||
|
||||
.btns {
|
||||
padding-top: $padding * 2;
|
||||
button{
|
||||
|
||||
button {
|
||||
background: $text-price;
|
||||
border-radius: 0;
|
||||
height: 90rpx;
|
||||
@@ -367,7 +417,8 @@
|
||||
font-size: $title-size;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
&::after{
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,18 +194,28 @@
|
||||
// 移出删除商品
|
||||
goodsRemove(id){
|
||||
let index = this.goods.findIndex(val => val.goods_id == id)
|
||||
managesGoodsDelete(id).then(res => {
|
||||
this.goods.splice(index,1)
|
||||
if(this.goods.length === 0) this.getList()
|
||||
uni.showToast({
|
||||
title: '商品权证已删除',
|
||||
icon : 'none'
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
})
|
||||
uni.showModal({
|
||||
title : '温馨提示',
|
||||
content : '是否确认删除该商品权证,删除后无法恢复',
|
||||
confirmText : '确认',
|
||||
cancelText : '再想想',
|
||||
success : res => {
|
||||
if(res.confirm){
|
||||
managesGoodsDelete(id).then(res => {
|
||||
this.goods.splice(index,1)
|
||||
if(this.goods.length === 0) this.getList()
|
||||
uni.showToast({
|
||||
title: '商品权证已删除',
|
||||
icon : 'none'
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<view class="GoodsAuthentication">
|
||||
<view class="authenticationTop" v-if='list.length>0'>区块链溯源码:{{info.token}}</view>
|
||||
<view class="authenticationTop" v-if='list.length>0'>权证溯源码:{{info.token}}</view>
|
||||
<!-- 进度条 -->
|
||||
<view v-if='list.length>0' class='timeAxis'>
|
||||
<view class="box-top" v-for="(item,index) in list" :key="index">
|
||||
<view class="left-box-top"><span>{{index === list.length - 1?item.note:'权证交易'}}</span>{{item.blockTime}}</view>
|
||||
<view class="left-box-top"><span>{{item.title}}</span>{{item.blocked_at}}</view>
|
||||
<!-- 左边 -->
|
||||
<view class="line" :class="{active:true,none:index==(list.length-1)}">
|
||||
<!-- 中线 -->
|
||||
@@ -24,18 +24,26 @@
|
||||
<view class="content">{{item.goods.skus.unit}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem">
|
||||
<view class="title">{{index === list.length - 1?'初始发行量':'交易数量'}}:</view>
|
||||
<view class="title">{{item.type}}数量:</view>
|
||||
<view class="content">{{item.amount}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem">
|
||||
<view class="title">区块链高度:</view>
|
||||
<view class="content">{{item.height}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem">
|
||||
<view class="title">交易哈希:</view>
|
||||
<view class="content">{{item.hash}}</view>
|
||||
<view class="authenticationItemcontentItem" v-if="item.from_user.nickname">
|
||||
<view class="title">HashFrom:</view>
|
||||
<view class="content"><image :src="item.from_user.avatar" mode="widthFix"/> {{item.from_user.nickname}}</view>
|
||||
</view>
|
||||
<view class="zhushi">注释:{{item.note}}</view>
|
||||
<view class="authenticationItemcontentItem">
|
||||
<view class="title">Hash:</view>
|
||||
<view class="content hash ellipsis">{{item.hash}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="item.to_user.nickname">
|
||||
<view class="title">HashTo:</view>
|
||||
<view class="content"><image :src="item.to_user.avatar" mode="widthFix"/>{{item.to_user.nickname}}</view>
|
||||
</view>
|
||||
<view class="zhushi">注释:{{item.remark}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -50,29 +58,39 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
managesTracedTo,
|
||||
checkmessage
|
||||
managesTracedTo
|
||||
} from '@/apis/interfaces/goods'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: '',
|
||||
info: ''
|
||||
list: [],
|
||||
info: {},
|
||||
has_more:true,
|
||||
page:1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
managesTracedTo(this.$Route.query.id).then(res1 => {
|
||||
console.log(res1)
|
||||
this.list= res1.list
|
||||
this.info = res1
|
||||
checkmessage(this.$Route.query.id).then(res => {
|
||||
this.list.push(res)
|
||||
this.getList()
|
||||
},
|
||||
onReachBottom(){
|
||||
if(this.has_more){
|
||||
this.getList()
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:'没有更多',
|
||||
icon:'none',
|
||||
mask:true
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getList(){
|
||||
managesTracedTo(this.$Route.query.id,this.page).then(res1 => {
|
||||
this.list= this.list.concat(res1.logs.data)
|
||||
this.info = res1
|
||||
this.has_more = res1.logs.page.has_more
|
||||
})
|
||||
},
|
||||
priveImg(img) {
|
||||
uni.previewImage({
|
||||
current: img, // 当前显示图片的http链接
|
||||
@@ -207,11 +225,24 @@
|
||||
.title {
|
||||
width: 160rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
text-overflow: ellipsis;
|
||||
.hash{
|
||||
width: calc(100% - 180rpx);
|
||||
word-wrap: break-word;
|
||||
word-break: break-word;
|
||||
}
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
color: #999;
|
||||
width: calc(100% - 180rpx);
|
||||
image{
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: $padding * .3;
|
||||
}
|
||||
}
|
||||
|
||||
.img {
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
<<<<<<< HEAD
|
||||
|
||||
config.appendPadding = [10, 30, 10, 15]
|
||||
const chart = new F2.Chart(config);
|
||||
chart.source(data, {
|
||||
date: {
|
||||
range: [0, 1],
|
||||
type: 'timeCat',
|
||||
mask: 'MM-DD'
|
||||
},
|
||||
value: {
|
||||
tickCount: 0
|
||||
}
|
||||
});
|
||||
chart.legend({
|
||||
position: 'bottom',
|
||||
offsetY: 0,
|
||||
offsetX: 30
|
||||
});
|
||||
chart.area()
|
||||
.position('date*value')
|
||||
.color('name', ['#5881d3', '#ca66e0'])
|
||||
.shape('smooth')
|
||||
chart.line()
|
||||
.position('date*value')
|
||||
.color('name', ['#5881d3', '#ca66e0'])
|
||||
.shape('smooth', name => {
|
||||
if (name === '预期收益率') {
|
||||
return 'line';
|
||||
}
|
||||
if (name === '实际收益率') {
|
||||
return 'line';
|
||||
}
|
||||
});
|
||||
=======
|
||||
|
||||
config.appendPadding = [10, 30, 10, 15]
|
||||
const chart = new F2.Chart(config);
|
||||
chart.source(data, {
|
||||
date: {
|
||||
range: [0, 1],
|
||||
type: 'timeCat',
|
||||
mask: 'MM-DD'
|
||||
},
|
||||
value: {
|
||||
tickCount: 0
|
||||
}
|
||||
});
|
||||
chart.legend({
|
||||
position: 'bottom',
|
||||
offsetY: 0,
|
||||
offsetX: 30
|
||||
});
|
||||
chart.area()
|
||||
.position('date*value')
|
||||
.color('name', ['#5881d3', '#ca66e0'])
|
||||
.shape('smooth')
|
||||
chart.line()
|
||||
.position('date*value')
|
||||
.color('name', ['#5881d3', '#ca66e0'])
|
||||
.shape('smooth', name => {
|
||||
if (name === '预期收益率') {
|
||||
return 'line';
|
||||
}
|
||||
if (name === '实际收益率') {
|
||||
return 'line';
|
||||
}
|
||||
});
|
||||
>>>>>>> eba5f5995696e08f67df615fb32054bffa94ae34
|
||||
chart.render();
|
||||
@@ -14,10 +14,7 @@
|
||||
<view class="item">
|
||||
<view style="flex: 1;">
|
||||
<view class="inputTxt">提现数量</view>
|
||||
<input class="input_num" ref='inputNumber' v-model="withdraw_input" @input='inputNum'
|
||||
:value="withdraw_input" type="number"
|
||||
placeholder-style="color:#999;font-weight:normal; font-size:34rpx;" placeholder="请输入提现数量"
|
||||
:disabled="balance===0" />
|
||||
<input class="input_num" ref='inputNumber' :value="withdraw_input" @input='inputNum' type="number" placeholder-style="color:#999;font-weight:normal; font-size:34rpx;" placeholder="请输入提现数量" :disabled="balance === 0" />
|
||||
</view>
|
||||
<view class="all" @click="all">全部提现</view>
|
||||
</view>
|
||||
|
||||
@@ -16,5 +16,6 @@ module.exports = {
|
||||
}, true)
|
||||
})
|
||||
]
|
||||
}
|
||||
},
|
||||
lintOnSave:false // 关闭语法检查
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user