Commit 0d9b1840 authored by 李超鹏's avatar 李超鹏

修改组件位置,修改网络提示

parent 11b8aeeb
......@@ -19,7 +19,7 @@
</template>
<script>
import CellSeal from '@/pages/mine/components/cell-seal/index';
import CellSeal from './sell-cell.vue';
export default {
props: {
......
<template>
<view :style="{ '--border-color': borderColor }" :class="['cell-seal', { selected: info.selected }]"
:hover-class="isEdit ? '' : 'u-hover-class'">
<view class="content-view" @click="$u.throttle(handleCickCell, 500)">
<view class="left-view">
<view class="image-view">
<image :src="info.sealImg" mode="heightFix" />
</view>
<view class="info-view">
<view class="name-view" v-if="!isElectron">{{ info.name }}</view>
<view class="sign-view" v-if="info.isDefault">默认</view>
</view>
</view>
<view class="right-view" v-if="isEdit">
<view class="edit-view" @click.stop="$u.throttle(handleClickButton, 500)" hover-class="u-hover-class">
<image :src="editImage" class="edit-image"></image>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
customStyle: {
type: String,
default: ''
},
info: {
type: Object,
default() {
return {
type: {}
}
},
},
type: {
type: String,
default: 'normal'
}
},
data() {
return {}
},
computed: {
baseUrl() {
return process.uniEnv.qn_base_url
},
editImage() {
return this.baseUrl + 'bianjifuwufenlei@3x.png'
},
isEdit() {
return this.type == 'edit'
},
borderColor() {
return this.isEdit ? 'transparent' : '#DDDDDD'
},
isElectron() {
return this.info.type.code == 'ELECTRON'
}
},
created() { },
methods: {
handleClickButton() {
this.$emit('action', this.info)
},
handleCickCell() {
if (this.isEdit) {
this.$emit('action', this.info)
} else {
this.$emit('select', this.info.id)
}
}
},
}
</script>
<style scoped lang="scss">
.cell-seal {
padding: 20rpx 24rpx;
min-height: 160rpx;
border-radius: 16rpx;
background-color: #ffffff;
border: 2rpx solid var(--border-color);
&.selected {
border: 2rpx solid #02A074;
}
.content-view {
display: flex;
align-items: center;
justify-content: space-between;
.left-view {
display: flex;
align-items: center;
font-size: 28rpx;
font-weight: bold;
color: #333333;
.image-view {
min-width: 120rpx;
height: 120rpx;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
flex-shrink: 0;
margin-right: 24rpx;
}
.info-view {
display: flex;
align-items: flex-start;
.sign-view {
color: #02A074;
width: 48rpx;
height: 28rpx;
line-height: 28rpx;
text-align: center;
border-radius: 8rpx;
border: 2rpx solid #02A074;
flex-shrink: 0;
font-size: 16rpx;
margin-top: 8rpx;
}
.name-view {
margin-right: 18rpx;
flex: 1;
}
}
}
.right-view {
display: flex;
align-items: center;
justify-content: flex-end;
flex-shrink: 0;
margin-left: 24rpx;
.edit-view {
width: 80rpx;
height: 72rpx;
display: flex;
justify-content: center;
align-items: center;
.edit-image {
width: 32rpx;
height: 32rpx;
}
}
}
}
}
</style>
......@@ -2,22 +2,12 @@
<view class="input-view">
<NavbarNormal :title="info.title" titleColor="#191C27" :border-bottom="false" title-bold></NavbarNormal>
<view class="content-view">
<u-input
v-model="value"
type="textarea"
:height="info.height"
:placeholder="info.placeholder"
:placeholder-style="placeholderStyle"
focus
:border="false"
:custom-style="inputStyle"
:disabled="disabled"
:clearable="false"
:maxlength="9999"
@input="handleInput"
/>
<u-input v-model="value" type="textarea" :height="info.height" :placeholder="info.placeholder"
:placeholder-style="placeholderStyle" focus :border="false" :custom-style="inputStyle"
:disabled="disabled" :clearable="false" :maxlength="9999" @input="handleInput" />
<view v-if="!disabled" class="tip-view">{{ tipText }}</view>
<bottom-buttons cancelText="删除" :showCancel="id ? true : false" @cancel="handleDelete" @confirm="handleClick"></bottom-buttons>
<bottom-buttons cancelText="删除" :showCancel="id ? true : false" @cancel="handleDelete"
@confirm="handleClick"></bottom-buttons>
<!-- <view class="bottom-view">
<u-button :customStyle="buttonStyle" @click="handleClick"><view class="button-text">确定</view></u-button>
<u-button :customStyle="deleteStyle" @click="handleDelete" v-if="id"><view class="button-text delete-button">删除</view></u-button>
......@@ -76,7 +66,7 @@ export default {
title: '店铺名称',
type: 'text',
placeholder: '请输入店铺名称(15个字以内)',
maxlength: 20,
maxlength: 50,
height: 240
};
case 'address':
......@@ -331,6 +321,7 @@ export default {
font-weight: bold;
font-size: 32rpx;
}
.delete-button {
text-align: center;
color: #fc524d;
......
......@@ -78,10 +78,10 @@ function refreshTokenRequst() {
console.log("subscribers", subscribers)
console.log("登陆已过期")
console.log(err)
log.error("refreshTokenRequst=>params: " , header)
log.error("refreshTokenRequst=>err: " , err)
log.error("refreshTokenRequst=>params: ", header)
log.error("refreshTokenRequst=>err: ", err)
uni.navigateTo({
animationType:'pop-in',
animationType: 'pop-in',
url: "/pages/login/login",
})
setTimeout(() => {
......@@ -193,8 +193,7 @@ function request({
},
fail: error => {
uni.hideLoading()
showToast("REQUEST ERROR")
console.log("REQUEST ERROR")
showToast("当前网络不可用,请检查网络连接")
console.log(error)
reject(error)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment