This commit is contained in:
zhangmanman
2021-11-30 15:09:57 +08:00
9 changed files with 1397 additions and 1326 deletions

View File

@@ -184,9 +184,12 @@ const managesAttestation = (id) => {
} }
// 商品溯源 // 商品溯源
const managesTracedTo = (id) => { const managesTracedTo = (id,page) => {
return request({ 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 { export {
managesGoodsIndex, managesGoodsIndex,
@@ -230,5 +239,6 @@ export {
managesAttestation, managesAttestation,
managesTracedTo, managesTracedTo,
checkmessage, checkmessage,
shopself shopself,
goodsExtendsCreate
} }

330
package-lock.json generated
View File

@@ -1,165 +1,165 @@
{ {
"name": "blockchainh5", "name": "blockchainh5",
"version": "1.0.0", "version": "1.0.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"ansi-styles": { "ansi-styles": {
"version": "4.3.0", "version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"requires": { "requires": {
"color-convert": "^2.0.1" "color-convert": "^2.0.1"
} }
}, },
"braces": { "braces": {
"version": "3.0.2", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"requires": { "requires": {
"fill-range": "^7.0.1" "fill-range": "^7.0.1"
} }
}, },
"chalk": { "chalk": {
"version": "4.1.2", "version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"requires": { "requires": {
"ansi-styles": "^4.1.0", "ansi-styles": "^4.1.0",
"supports-color": "^7.1.0" "supports-color": "^7.1.0"
} }
}, },
"color-convert": { "color-convert": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"requires": { "requires": {
"color-name": "~1.1.4" "color-name": "~1.1.4"
} }
}, },
"color-name": { "color-name": {
"version": "1.1.4", "version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
}, },
"enhanced-resolve": { "enhanced-resolve": {
"version": "5.8.3", "version": "5.8.3",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz",
"integrity": "sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA==", "integrity": "sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA==",
"requires": { "requires": {
"graceful-fs": "^4.2.4", "graceful-fs": "^4.2.4",
"tapable": "^2.2.0" "tapable": "^2.2.0"
} }
}, },
"fill-range": { "fill-range": {
"version": "7.0.1", "version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"requires": { "requires": {
"to-regex-range": "^5.0.1" "to-regex-range": "^5.0.1"
} }
}, },
"graceful-fs": { "graceful-fs": {
"version": "4.2.8", "version": "4.2.8",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz",
"integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg=="
}, },
"has-flag": { "has-flag": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
}, },
"is-number": { "is-number": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
}, },
"lru-cache": { "lru-cache": {
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"requires": { "requires": {
"yallist": "^4.0.0" "yallist": "^4.0.0"
} }
}, },
"micromatch": { "micromatch": {
"version": "4.0.4", "version": "4.0.4",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz",
"integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==",
"requires": { "requires": {
"braces": "^3.0.1", "braces": "^3.0.1",
"picomatch": "^2.2.3" "picomatch": "^2.2.3"
} }
}, },
"picomatch": { "picomatch": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz",
"integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw=="
}, },
"semver": { "semver": {
"version": "7.3.5", "version": "7.3.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
"requires": { "requires": {
"lru-cache": "^6.0.0" "lru-cache": "^6.0.0"
} }
}, },
"supports-color": { "supports-color": {
"version": "7.2.0", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"requires": { "requires": {
"has-flag": "^4.0.0" "has-flag": "^4.0.0"
} }
}, },
"tapable": { "tapable": {
"version": "2.2.1", "version": "2.2.1",
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
"integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==" "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ=="
}, },
"to-regex-range": { "to-regex-range": {
"version": "5.0.1", "version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"requires": { "requires": {
"is-number": "^7.0.0" "is-number": "^7.0.0"
} }
}, },
"ts-loader": { "ts-loader": {
"version": "9.2.6", "version": "9.2.6",
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.2.6.tgz", "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.2.6.tgz",
"integrity": "sha512-QMTC4UFzHmu9wU2VHZEmWWE9cUajjfcdcws+Gh7FhiO+Dy0RnR1bNz0YCHqhI0yRowCE9arVnNxYHqELOy9Hjw==", "integrity": "sha512-QMTC4UFzHmu9wU2VHZEmWWE9cUajjfcdcws+Gh7FhiO+Dy0RnR1bNz0YCHqhI0yRowCE9arVnNxYHqELOy9Hjw==",
"requires": { "requires": {
"chalk": "^4.1.0", "chalk": "^4.1.0",
"enhanced-resolve": "^5.0.0", "enhanced-resolve": "^5.0.0",
"micromatch": "^4.0.0", "micromatch": "^4.0.0",
"semver": "^7.3.4" "semver": "^7.3.4"
} }
}, },
"uni-read-pages": { "uni-read-pages": {
"version": "1.0.5", "version": "1.0.5",
"resolved": "https://registry.npmjs.org/uni-read-pages/-/uni-read-pages-1.0.5.tgz", "resolved": "https://registry.npmjs.org/uni-read-pages/-/uni-read-pages-1.0.5.tgz",
"integrity": "sha512-GkrrZ0LX0vn9R5k6RKEi0Ez3Q3e2vUpjXQ8Z6/K/d28KudI9ajqgt8WEjQFlG5EPm1K6uTArN8LlqmZTEixDUA==" "integrity": "sha512-GkrrZ0LX0vn9R5k6RKEi0Ez3Q3e2vUpjXQ8Z6/K/d28KudI9ajqgt8WEjQFlG5EPm1K6uTArN8LlqmZTEixDUA=="
}, },
"uni-simple-router": { "uni-simple-router": {
"version": "2.0.7", "version": "2.0.7",
"resolved": "https://registry.npmjs.org/uni-simple-router/-/uni-simple-router-2.0.7.tgz", "resolved": "https://registry.npmjs.org/uni-simple-router/-/uni-simple-router-2.0.7.tgz",
"integrity": "sha512-8FKv5dw7Eoonm0gkO8udprrxzin0fNUI0+AvIphFkFRH5ZmP5ZWJ2pvnWzb2NiiqQSECTSU5VSB7HhvOSwD5eA==" "integrity": "sha512-8FKv5dw7Eoonm0gkO8udprrxzin0fNUI0+AvIphFkFRH5ZmP5ZWJ2pvnWzb2NiiqQSECTSU5VSB7HhvOSwD5eA=="
}, },
"uview-ui": { "uview-ui": {
"version": "1.8.4", "version": "1.8.4",
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.8.4.tgz", "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.8.4.tgz",
"integrity": "sha512-Zr+D5dFdNy6CdHQLBEXeGq/w0LkjxzBtsgaaDwLl0P58g67H7fBBDvy6AzWK/k0c7dwPYMBiK7I4Tr9p92+0DA==" "integrity": "sha512-Zr+D5dFdNy6CdHQLBEXeGq/w0LkjxzBtsgaaDwLl0P58g67H7fBBDvy6AzWK/k0c7dwPYMBiK7I4Tr9p92+0DA=="
}, },
"vuex": { "vuex": {
"version": "3.6.2", "version": "3.6.2",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz", "resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",
"integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw==" "integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw=="
}, },
"yallist": { "yallist": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
} }
} }
} }

1775
pages.json

File diff suppressed because it is too large Load Diff

View File

@@ -11,8 +11,10 @@
export default { export default {
data() { data() {
return { return {
}; };
},
mounted() {
let i = "dsadsa"
} }
} }
</script> </script>

View File

@@ -1,104 +1,59 @@
<template> <template>
<view class="GoodsAuthentication"> <view class="GoodsAuthentication" v-if="loaded">
<view class="authenticationTop">区块链溯源码{{info.token}}</view> <view class="authenticationTop">商品认证溯源码{{token}}</view>
<!-- 商品认证 商品和服务 --> <!-- 商品认证 商品和服务 -->
<view class="authenticationItem"> <view class="authenticationItem" v-if="goods.length>0">
<view class="authenticationItemTitle">权证认证</view> <view class="authenticationItemTitle">权证认证</view>
<view class="authenticationItemcontent" v-if="info.goods"> <view class="authenticationItemcontent">
<view class="authenticationItemcontentItem" v-if="info.goods.name"> <block v-for="(item,index) in goods" :key='index'>
<view class="title">{{info.goods.type ===1 ? '权证名称':'项目名称'}}: </view> <view class="authenticationItemcontentItem" >
<view class="content">{{info.goods.name || '暂无数据'}}</view> <view class="title">{{item.title}}</view>
</view> <view class="content" v-if="item.type !== 2">{{item.value || '暂无数据~'}}</view>
<view class="authenticationItemcontentItem" v-if="info.goods.type ===1 && info.goods.batch"> <block v-if="item.type === 2">
<view class="title">生产批次</view> <image class="img" v-if="item.value" :src="item.value" @click="priveImg(item.value)" mode="aspectFill" />
<view class="content">{{info.goods.batch || '暂无数据'}}</view> <view class="content" v-else>暂无数据~</view>
</view> </block>
<view class="authenticationItemcontentItem" v-if="info.goods.type ===2 && info.goods.category"> </view>
<view class="title">项目分类</view> </block>
<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> </view>
</view> </view>
<!-- 企业认证 商品和服务通用 --> <!-- 企业认证 商品和服务通用 -->
<view class="authenticationItem"> <view class="authenticationItem">
<view class="authenticationItemTitle">企业认证</view> <view class="authenticationItemTitle">企业认证</view>
<view class="authenticationItemcontent" v-if="info.certification"> <view class="authenticationItemcontent" v-if="certification">
<view class="authenticationItemcontentItem" v-if="info.certification.name "> <view class="authenticationItemcontentItem" v-if="certification.name ">
<view class="title">企业名称</view> <view class="title">企业名称</view>
<view class="content">{{info.certification.name || '暂无数据'}}</view> <view class="content">{{certification.name || '暂无数据'}}</view>
</view> </view>
<view class="authenticationItemcontentItem" v-if="info.certification.address" > <view class="authenticationItemcontentItem" v-if="certification.address" >
<view class="title">企业地址</view> <view class="title">企业地址</view>
<view class="content">{{info.certification.address || '暂无数据'}}</view> <view class="content">{{certification.address || '暂无数据'}}</view>
</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="title">统一信用代码</view>
<view class="content">{{info.certification.certification.code || '暂无数据'}}</view> <view class="content">{{certification.certification.code || '暂无数据'}}</view>
</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="title">行业</view>
<view class="content">{{info.certification.industry.title || '暂无数据'}}</view> <view class="content">{{certification.industry.title || '暂无数据'}}</view>
</view> </view>
<view class="authenticationItemcontentItem" v-if="info.certification.range"> <view class="authenticationItemcontentItem" v-if="certification.range">
<view class="title">经营范围</view> <view class="title">经营范围</view>
<view class="content">{{info.certification.range || '暂无数据'}}</view> <view class="content">{{certification.range || '暂无数据'}}</view>
</view> </view>
<view class="authenticationItemcontentItem" v-if="info.certification.contack"> <view class="authenticationItemcontentItem" v-if="certification.contack">
<view class="title">联系电话</view> <view class="title">联系电话</view>
<u-icon name="phone-fill" v-if='info.certification.contack' <u-icon name="phone-fill" v-if='certification.contack'
@click="call(info.certification.contact)" color="#2979ff" label-color="#2979ff" label-size="26" @click="call(certification.contact)" color="#2979ff" label-color="#2979ff" label-size="26"
:label='info.certification.contact' /> :label='certification.contact' />
<view class="content" v-else> 暂无数据 </view> <view class="content" v-else> 暂无数据 </view>
</view> </view>
<view class="authenticationItemcontentItem" v-if="info.certification.certification.license"> <view class="authenticationItemcontentItem" v-if="certification.certification.license">
<view class="title">营业执照</view> <view class="title">营业执照</view>
<image class="img" v-if='info.certification.certification.license' <image class="img" v-if='certification.certification.license'
:src="info.certification.certification.license" :src="certification.certification.license"
@click="priveImg(info.certification.certification.license)" mode="aspectFill" /> @click="priveImg(certification.certification.license)" mode="aspectFill" />
<view class="content" v-else>暂无数据</view> <view class="content" v-else>暂无数据</view>
</view> </view>
</view> </view>
@@ -116,18 +71,28 @@
export default { export default {
data() { data() {
return { return {
info: '' token:"",
certification: {},
goods:[],
loaded:false
} }
}, },
created() { created() {
managesAttestation(this.$Route.query.id).then(res => { 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: { methods: {
priveImg(img) { priveImg(img) {
uni.previewImage({ uni.previewImage({
current: img, // 当前显示图片的http链接 longPressActions: {
itemList: []
},
urls: [img] // 需要预览的图片http链接列表 urls: [img] // 需要预览的图片http链接列表
}) })
}, },

View File

@@ -14,11 +14,12 @@
<view class="goods-content"> <view class="goods-content">
<view class="header"> <view class="header">
<view class="flex-box"> <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> --> <!-- <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>
<view class="coupon" v-if="couponSee.length > 0" @click="couponsOpne"> <view class="coupon" v-if="couponSee.length > 0" @click="couponsOpne">
<view class="coupon-list" v-for="(item, index) in couponSee" :key="index"> <view class="coupon-list" v-for="(item, index) in couponSee" :key="index">
@@ -413,7 +414,9 @@
font-weight: bold; font-weight: bold;
color: $text-price; color: $text-price;
font-size: $title-size + 14; font-size: $title-size + 14;
.shuijing{
font-size: 26rpx;color: #999;font-weight: normal;padding-left: 20rpx;
}
text { text {
font-size: 70%; font-size: 70%;
} }

View File

@@ -1,56 +1,40 @@
<template> <template>
<view class="content"> <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-block">
<view class="form-box picker-flex"> <block v-for="item in createInfo" :key='item.id'>
<label class="form-label">生产日期</label> <!-- text -->
<picker mode="date" :value="productedAt" @change="pickerChange($event, 'productedAt')"> <view class="form-box inputs-flex" v-if="item.type === 1">
<view class="picker-text"> <label class="form-label"><span v-if='item.required'>*</span>{{item.title}}</label>
{{productedAt || '选择商品生产日期'}} <input type="text" @input='inputT(item.name,$event)' v-model="createAddInfo[item.name]" :placeholder="`请输入${item.title}`" />
<uni-icons class="picker-icon" type="arrowright" color="#999"></uni-icons> </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>
</picker> </view>
</view>
<view class="form-box picker-flex"> <!-- date -->
<label class="form-label">过期时间</label> <view class="form-box picker-flex" v-if="item.type === 3">
<picker mode="date" :value="expiriedAt" @change="pickerChange($event, 'expiriedAt')"> <label class="form-label"><span v-if='item.required'>*</span>{{item.title}}</label>
<view class="picker-text"> <picker mode="date" :value="createAddInfo[item.name]" @change="pickerChange($event, item.name)">
{{expiriedAt || '选择商品过期时间'}} <view class="picker-text">
<uni-icons class="picker-icon" type="arrowright" color="#999"></uni-icons> {{createAddInfo[item.name] || `选择${item.title}`}}
</view> <uni-icons class="picker-icon" type="arrowright" color="#999"></uni-icons>
</picker> </view>
</view> </picker>
<view class="form-box inputs-flex"> </view>
<label class="form-label">生产商名称</label>
<input type="text" v-model="productName" placeholder="输入商品生产商名称"/> </block>
</view>
<view class="form-box inputs-flex">
<label class="form-label">生产许可证号</label>
<input type="text" v-model="lisence" placeholder="输入商品生产许可证号"/>
</view>
<view class="form-box inputs-flex">
<label class="form-label">生产商地址</label>
<input type="text" v-model="productAddress" placeholder="输入商品生产商地址"/>
</view>
</view> </view>
<!-- 安全区 --> <!-- 安全区 -->
<view class="ios-bottom"></view> <view class="ios-bottom"></view>
@@ -63,95 +47,120 @@
</template> </template>
<script> <script>
import { managesGoodsAuth, managesGoodsExtends } from '@/apis/interfaces/goods' import {
import { uploads } from '@/apis/interfaces/uploading' managesGoodsAuth,
managesGoodsExtends,
goodsExtendsCreate
} from '@/apis/interfaces/goods'
import {
uploads
} from '@/apis/interfaces/uploading'
export default { export default {
data() { data() {
return { return {
productedAt : '', // 生产日期 createAddInfo: {}, // suoyou
expiriedAt : '', // 过期时间 createInfo: [], // 认证信息可以活的
lisence : '', // 生产许可证号
productName : '', // 生产商名称
productAddress : '', // 生产商地址
extendCover : [] // 实物图片
}; };
}, },
created() { created() {
if(this.$Route.query.edit === 'true' || this.$Route.query.edit ){ goodsExtendsCreate(this.$Route.query.id).then(res => {
managesGoodsExtends(this.$Route.query.id).then(res => { this.createInfo = res.length > 0 ? res : []
this.productedAt = res.producted_at res.filter(item => {
this.expiriedAt = res.expiried_at if (item.type === 2) {
this.lisence = res.lisence this.$set(this.createAddInfo, item.name, {
this.productName = res.product_name path: '',
this.productAddress = res.product_address showpath: ''
this.extendCover = [{...res.cover}] })
}).catch(err => { } else {
uni.showToast({ this.$set(this.createAddInfo, item.name, '')
title: err.message, }
icon : 'none'
})
}) })
} 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: { methods: {
// 输入框txt 分别赋值给text
inputT(key, e) {
this.$set(this.createAddInfo, key, e.detail.value)
},
// picker选择 // picker选择
pickerChange(e, key){ pickerChange(e, key) {
this[key] = e.detail.value this.$set(this.createAddInfo, key, e.detail.value)
}, },
// 图片预览 // 图片预览
openImg(){ openImg(key) {
let paths = this.extendCover.map(val => { console.log(key)
return val.showpath
})
uni.previewImage({ uni.previewImage({
urls : paths, urls: [this.createAddInfo[key].showpath],
current : 0, current: 0,
indicator: 'number' indicator: 'number'
}) })
}, },
delImg(key){
this.$set(this.createAddInfo, key, {
path: '',
showpath:''
})
},
// 上传图片 // 上传图片
updCover(){ updCover(key) {
uni.chooseImage({ uni.chooseImage({
count : 1, count: 1,
success : res => { success: res => {
uploads([{ uploads([{
uri : res.tempFilePaths[0] uri: res.tempFilePaths[0]
}]).then(updRes => { }]).then(updRes => {
this.extendCover.push({ this.$nextTick(() => {
path : updRes.path[0], this.$set(this.createAddInfo, key, {
showpath: updRes.url[0] path: updRes.path[0],
showpath: updRes.url[0]
})
}) })
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
icon : 'none' icon: 'none'
}) })
}) })
} }
}) })
}, },
// 发布产品 // 发布产品
submitAdd(){ submitAdd() {
let submitData = { let submitData = this.createAddInfo
producted_at : this.productedAt, this.createInfo.filter(item => {
expiried_at : this.expiriedAt, if (item.type === 2) {
lisence : this.lisence, submitData[item.name] = this.createAddInfo[item.name].path
product_name : this.productName, }
product_address : this.productAddress, })
extend_cover : this.extendCover[0].path
}
let submitFund = managesGoodsAuth(this.$Route.query.id, submitData) let submitFund = managesGoodsAuth(this.$Route.query.id, submitData)
submitFund.then(res => { submitFund.then(res => {
uni.setStorageSync('refresh',true) uni.setStorageSync('refresh', true)
uni.showModal({ uni.showModal({
title : '提示', title: '提示',
content : '商品权证认证信息已提交,请耐心等待平台审核', content: '商品权证认证信息已提交,请耐心等待平台审核',
showCancel : false, showCancel: false,
success : res => { success: res => {
if(res.confirm){ if (res.confirm) {
if(this.$Route.query.type == 'goodsAdd'){ if (this.$Route.query.type == 'goodsAdd') {
this.$Router.back(this.$Route.query.edit == 'true' ? 2 : 3) this.$Router.back(this.$Route.query.edit == 'true' ? 2 : 3)
}else{ } else {
this.$Router.back() this.$Router.back()
} }
} }
@@ -160,7 +169,7 @@
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
icon : 'none' icon: 'none'
}) })
}) })
} }
@@ -169,20 +178,23 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content{ .content {
padding-bottom: 150rpx; padding-bottom: 150rpx;
} }
// 表单 // 表单
.form-block{ .form-block {
background: white; background: white;
margin-top: $margin - 10; margin-top: $margin - 10;
.form-box{
.form-box {
position: relative; position: relative;
padding-left: 240rpx; padding-left: 240rpx;
padding-right: $padding; padding-right: $padding;
font-size: $title-size-lg; font-size: $title-size-lg;
min-height: 80rpx; min-height: 80rpx;
&::after{
&::after {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: $margin; left: $margin;
@@ -191,26 +203,35 @@
content: " "; content: " ";
background: $border-color; background: $border-color;
} }
&:last-child::after{
&:last-child::after {
display: none; display: none;
} }
.form-label{
.form-label {
position: absolute; position: absolute;
left: $margin; left: $margin;
line-height: 80rpx; line-height: 80rpx;
top: 0; top: 0;
width: calc(240rpx - #{$margin}); width: calc(240rpx - #{$margin});
span{
color: #f00;
padding-right: $padding * .2;
}
} }
} }
.inputs-flex{
input{ .inputs-flex {
input {
height: 80rpx; height: 80rpx;
line-height: 80rpx; line-height: 80rpx;
} }
} }
.input-unit{
.input-unit {
padding-right: 200rpx; padding-right: 200rpx;
.units{
.units {
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
@@ -222,49 +243,61 @@
box-sizing: border-box; box-sizing: border-box;
} }
} }
.picker-flex{
.picker-text{ .picker-flex {
.picker-text {
position: relative; position: relative;
line-height: 80rpx; line-height: 80rpx;
min-height: 80rpx; min-height: 80rpx;
padding-right: 80rpx; padding-right: 80rpx;
@extend .nowrap; @extend .nowrap;
.picker-icon{
.picker-icon {
right: 0; right: 0;
position: absolute; position: absolute;
} }
} }
.picker-switch{
.picker-switch {
line-height: 80rpx; line-height: 80rpx;
min-height: 80rpx; min-height: 80rpx;
text-align: right; text-align: right;
margin-right: -15rpx; 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; font-size: $title-size-lg;
line-height: 80rpx; line-height: 80rpx;
padding: 0 $padding; padding: 0 $padding;
text{ span{
color: #f00;
padding-right: $padding * .2;
}
text {
font-size: 80%; font-size: 80%;
color: $text-gray; color: $text-gray;
} }
} }
.form-imgs{
.form-imgs {
margin-top: -($margin/3); margin-top: -($margin/3);
padding: 0 20rpx 20rpx; padding: 0 20rpx 20rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.item{
.item {
width: calc(20% - 14rpx); width: calc(20% - 14rpx);
padding-top: calc(20% - 14rpx); padding-top: calc(20% - 14rpx);
margin: 7rpx; margin: 7rpx;
position: relative; position: relative;
.item-cover{
.item-cover {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
@@ -272,10 +305,12 @@
height: 100%; height: 100%;
} }
} }
.item-add{
.item-add {
border: dashed 2rpx $border-color; border: dashed 2rpx $border-color;
box-sizing: border-box; box-sizing: border-box;
.item-cover{
.item-cover {
top: calc(15% - 2rpx); top: calc(15% - 2rpx);
left: calc(15% - 2rpx); left: calc(15% - 2rpx);
width: 70%; width: 70%;
@@ -285,8 +320,9 @@
} }
} }
} }
// 发布 // 发布
.footer{ .footer {
background: white; background: white;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
@@ -295,7 +331,8 @@
padding: 20rpx $padding; padding: 20rpx $padding;
box-shadow: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .02); box-shadow: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .02);
z-index: 9; z-index: 9;
.footer-btn{
.footer-btn {
border: none; border: none;
border-radius: 0; border-radius: 0;
background: $text-price; background: $text-price;
@@ -304,62 +341,75 @@
font-weight: bold; font-weight: bold;
font-size: $title-size; font-size: $title-size;
color: white; color: white;
&::after{
&::after {
border: none; border: none;
} }
} }
} }
// 可选服务 // 可选服务
.category-popup{ .category-popup {
background: #F5F5F5; background: #F5F5F5;
padding: 0 $padding * 2 $padding * 2 $padding * 2; padding: 0 $padding * 2 $padding * 2 $padding * 2;
.header{
.header {
padding: $padding*2 0; padding: $padding*2 0;
box-sizing: border-box; box-sizing: border-box;
@extend .vertical; @extend .vertical;
.title{
.title {
text-align: center; text-align: center;
font-size: $title-size + 14; font-size: $title-size + 14;
font-weight: bold; font-weight: bold;
line-height: 90rpx; line-height: 90rpx;
} }
.subtitle{
.subtitle {
font-size: $title-size-m; font-size: $title-size-m;
color: $text-gray; color: $text-gray;
text-align: center; text-align: center;
} }
} }
.category-flex{
.category-flex {
max-height: 50vh; max-height: 50vh;
overflow-y: scroll; overflow-y: scroll;
.category-flex-item{
.category-flex-item {
margin-bottom: $margin; margin-bottom: $margin;
padding: $padding; padding: $padding;
background: white; background: white;
border:solid 1rpx white; border: solid 1rpx white;
box-sizing: border-box; box-sizing: border-box;
.category-name{
.category-name {
padding-bottom: $padding/2; padding-bottom: $padding/2;
font-weight: bold; font-weight: bold;
font-size: $title-size-lg; font-size: $title-size-lg;
} }
.category-content{
.category-content {
font-size: $title-size-sm; font-size: $title-size-sm;
color: $text-gray; color: $text-gray;
@extend .ellipsis; @extend .ellipsis;
} }
&.show{
&.show {
color: $text-price; color: $text-price;
border:solid 1rpx $text-price; border: solid 1rpx $text-price;
} }
&:last-child{
&:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
} }
} }
.btns{
.btns {
padding-top: $padding * 2; padding-top: $padding * 2;
button{
button {
background: $text-price; background: $text-price;
border-radius: 0; border-radius: 0;
height: 90rpx; height: 90rpx;
@@ -367,7 +417,8 @@
font-size: $title-size; font-size: $title-size;
color: white; color: white;
font-weight: bold; font-weight: bold;
&::after{
&::after {
border: none; border: none;
} }
} }

View File

@@ -194,18 +194,28 @@
// 移出删除商品 // 移出删除商品
goodsRemove(id){ goodsRemove(id){
let index = this.goods.findIndex(val => val.goods_id == id) let index = this.goods.findIndex(val => val.goods_id == id)
managesGoodsDelete(id).then(res => { uni.showModal({
this.goods.splice(index,1) title : '温馨提示',
if(this.goods.length === 0) this.getList() content : '是否确认删除该商品权证,删除后无法恢复',
uni.showToast({ confirmText : '确认',
title: '商品权证已删除', cancelText : '再想想',
icon : 'none' success : res => {
}) if(res.confirm){
}).catch(err => { managesGoodsDelete(id).then(res => {
uni.showToast({ this.goods.splice(index,1)
title: err.message, if(this.goods.length === 0) this.getList()
icon: 'none' uni.showToast({
}) title: '商品权证已删除',
icon : 'none'
})
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
}
}
}) })
} }
}, },

View File

@@ -1,10 +1,10 @@
<template> <template>
<view class="GoodsAuthentication"> <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 v-if='list.length>0' class='timeAxis'>
<view class="box-top" v-for="(item,index) in list" :key="index"> <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)}"> <view class="line" :class="{active:true,none:index==(list.length-1)}">
<!-- 中线 --> <!-- 中线 -->
@@ -24,18 +24,26 @@
<view class="content">{{item.goods.skus.unit}}</view> <view class="content">{{item.goods.skus.unit}}</view>
</view> </view>
<view class="authenticationItemcontentItem"> <view class="authenticationItemcontentItem">
<view class="title">{{index === list.length - 1?'初始发行量':'交易数量'}}</view> <view class="title">{{item.type}}数量</view>
<view class="content">{{item.amount}}</view> <view class="content">{{item.amount}}</view>
</view> </view>
<view class="authenticationItemcontentItem"> <view class="authenticationItemcontentItem">
<view class="title">区块链高度:</view> <view class="title">区块链高度:</view>
<view class="content">{{item.height}}</view> <view class="content">{{item.height}}</view>
</view> </view>
<view class="authenticationItemcontentItem"> <view class="authenticationItemcontentItem" v-if="item.from_user.nickname">
<view class="title">交易哈希</view> <view class="title">HashFrom</view>
<view class="content">{{item.hash}}</view> <view class="content"><image :src="item.from_user.avatar" mode="widthFix"/> {{item.from_user.nickname}}</view>
</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> </view>
</view> </view>
@@ -50,29 +58,39 @@
<script> <script>
import { import {
managesTracedTo, managesTracedTo
checkmessage
} from '@/apis/interfaces/goods' } from '@/apis/interfaces/goods'
export default { export default {
data() { data() {
return { return {
list: '', list: [],
info: '' info: {},
has_more:true,
page:1
} }
}, },
created() { created() {
managesTracedTo(this.$Route.query.id).then(res1 => { this.getList()
console.log(res1) },
this.list= res1.list onReachBottom(){
this.info = res1 if(this.has_more){
checkmessage(this.$Route.query.id).then(res => { this.getList()
this.list.push(res) }else{
uni.showToast({
title:'没有更多',
icon:'none',
mask:true
}) })
}
})
}, },
methods: { 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) { priveImg(img) {
uni.previewImage({ uni.previewImage({
current: img, // 当前显示图片的http链接 current: img, // 当前显示图片的http链接
@@ -207,11 +225,24 @@
.title { .title {
width: 160rpx; width: 160rpx;
} }
.hash{
.content {
text-overflow: ellipsis;
width: calc(100% - 180rpx); 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 { .img {