二手车车源信息--求购页添加车源id
This commit is contained in:
@ -24,8 +24,8 @@ service.interceptors.request.use(
|
||||
config.data = qs.stringify(config.data, {arrayFormat: 'indices', allowDots: true})
|
||||
}
|
||||
config.headers['Content-Type'] = config.contentType || 'application/x-www-form-urlencoded'
|
||||
// let token = localStorage.getItem('token');
|
||||
let token='eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBTkNIQU5HIiwidXNlcklkIjo0NTY3MSwibmFtZSI6IuWuieeVhSIsInVzZXJOYW1lIjoiQU5DSEFORyIsInN1cHBsaWVySWQiOjExMjgsImlzWmQiOjAsImV4cCI6MTc1NTIzOTMyNH0.Zn1NaVKRIho6ncATghr74PDoMir6xaftK9b7RHg70Z8'
|
||||
let token = localStorage.getItem('token');
|
||||
// let token='eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBTkNIQU5HIiwidXNlcklkIjo0NTY3MSwibmFtZSI6IuWuieeVhSIsInVzZXJOYW1lIjoiQU5DSEFORyIsInN1cHBsaWVySWQiOjExMjgsImlzWmQiOjAsImV4cCI6MTc1NTQyMjUyNX0.xzDZhaANJFnbeViIHJA0SEtOyTv7Ja3rKmXqRKRuFkc'
|
||||
// let token='eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJTSEhQWEIiLCJ1c2VySWQiOjU0NzI2LCJuYW1lIjoiI-a1i-ivleWwj-eZveeZvSIsInVzZXJOYW1lIjoiU0hIUFhCIiwic3VwcGxpZXJJZCI6MTAwMDE2NSwiZXhwIjoxNzQ0NTEwNzkwfQ.JPk0OA7slYJN3FIi_uhW4Y0CiWRvl6R1dK8MRTbyhD8'
|
||||
if(!(reqUrl=='/supplier/supplierTraining/trainingTask' || reqUrl=='/supplier/supplierTraining/normalList' || reqUrl=='/supplier/supplierTraining/trainingList')){
|
||||
if(token) {
|
||||
|
@ -23,6 +23,12 @@
|
||||
</div>
|
||||
<div class="viewNum">{{detailInfo.attentionCount}}人想卖<span>{{detailInfo.browseCount}}人浏览</span></div>
|
||||
</div>
|
||||
<div class="priceWrap">
|
||||
<div class="commonColor" style="margin-top: 5px">
|
||||
车源ID: {{ detailInfo.code }}
|
||||
<img class="copyIcon" @click="copyHandler(detailInfo.code)" src="@/assets/copy.png" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detailInfoWrap wrapCommon">
|
||||
<div>
|
||||
@ -101,6 +107,16 @@ export default {
|
||||
this.getDuration(1)
|
||||
},
|
||||
methods:{
|
||||
copyHandler(copyText){
|
||||
let inputNode = document.createElement('input') // 创建input
|
||||
inputNode.value = copyText // 赋值给 input 值
|
||||
document.body.appendChild(inputNode) // 插入进去
|
||||
inputNode.select() // 选择对象
|
||||
document.execCommand('Copy') // 原生调用执行浏览器复制命令
|
||||
inputNode.className = 'oInput'
|
||||
inputNode.style.display = 'none' // 隐藏
|
||||
this.$toast('复制成功')
|
||||
},
|
||||
getDuration(type){
|
||||
const endTime = new Date();
|
||||
const duration = (endTime - this.startTime) / 1000; // 计算时长(秒)
|
||||
@ -290,4 +306,14 @@ export default {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.commonColor {
|
||||
color: #999999 !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.copyIcon {
|
||||
width: 35px;
|
||||
height: 15px;
|
||||
margin-left: 10px
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user