‘通用图片处理’

This commit is contained in:
2021-09-25 14:08:24 +08:00
parent ed4c0492fb
commit 1a2ecf43c7
3 changed files with 15 additions and 10 deletions

View File

@@ -10,6 +10,7 @@ import store from '@/store'
// 基础配置 // 基础配置
const config = { const config = {
apiUrl : 'http://api.ahxh.shangkelian.cn/api/', apiUrl : 'http://api.ahxh.shangkelian.cn/api/',
apiUrls : 'http://api.ahxh.shangkelian.cn',
timeout : 60000 timeout : 60000
} }
@@ -154,5 +155,6 @@ const loginHint = () => {
export { export {
request, request,
uploading uploading,
config
} }

View File

@@ -1,13 +1,14 @@
<template> <template>
<view class="NOList"> <view class="NOList">
<view class="no-addr"> <view class="no-addr">
<image :src="`https://e-chain.cnskl.com/storage/imageresource/no-image/${name}.png`" mode="widthFix"></image> <image :src="`${webUrl}/storage/imageresource/no-image/${name}.png`" mode="widthFix" />
{{txt}} {{txt}}
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import {config} from '@/apis/index.js'
export default { export default {
name: "NOList", name: "NOList",
/** /**
@@ -36,13 +37,15 @@
*/ */
props: { props: {
name: String, name: String,
txt: String, txt: String
webUrl:'https://e-chain.cnskl.com/storage/imageresource/no-image'
}, },
data() { data() {
return { return {
webUrl:''
}; };
},
mounted() {
this.webUrl = config.apiUrls
} }
} }
</script> </script>
@@ -50,7 +53,7 @@
<style lang="scss" scoped> <style lang="scss" scoped>
// 无地址 // 无地址
.no-addr { .no-addr {
padding-top: $padding*6; padding-top: $padding*4;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
@@ -60,8 +63,8 @@
font-size: $title-size*0.9; font-size: $title-size*0.9;
image { image {
margin-bottom: $margin*4; margin-bottom: $margin*2;
margin-top: $margin*2; margin-top: $margin*1;
width: 400rpx; width: 400rpx;
opacity: .4; opacity: .4;
} }

View File

@@ -9,7 +9,7 @@
<view class="lists"> <view class="lists">
<view class="lists-header"> <view class="lists-header">
资产列表 资产列表
<uni-icons type="plus" size="24" color="#009b69"></uni-icons> <uni-icons type="plus" size="24" color="#aa55ff"></uni-icons>
</view> </view>
<view class="item" v-for="(item, index) in 2" :key="index" @click="propertyInfo(item)"> <view class="item" v-for="(item, index) in 2" :key="index" @click="propertyInfo(item)">
<view class="cost"> <view class="cost">