Commit 24f55c42 by hank

修改ui

parent 0dba328e
......@@ -25,14 +25,15 @@ $axios.interceptors.request.use((config: any) => {
if (!noToken) {
// 默认添加token
const tokne = token.getToken()
if (!tokne) {
config.cancelToken = new CancelToken(cancel => {
console.warn(`token 为空取消请求~`)
cancel(TOKEN_REPEAT)
})
return config
}
config.headers.visualToken = token.getToken()
// if (!tokne) {
// config.cancelToken = new CancelToken(cancel => {
// console.warn(`token 为空取消请求~`)
// cancel(TOKEN_REPEAT)
// })
// return config
// }
config.headers.visualToken = tokne
// return config
} else {
delete config.headers.noToken
}
......
......@@ -35,8 +35,9 @@ class App extends Component {
*/
config: Config = {
pages: [
'pages/login/index',
'pages/home/device/index',
'pages/login/index',
// 'pages/home/device/index',
'pages/home/tempaltes/index',
'pages/home/film/index',
'pages/agreement/index',
......
export enum SHOWTYPE {
export enum SHOWTYPE { // 横屏竖屏的枚举
HORIZONTAL = '横屏',
VERTICAL = '竖屏',
OTHER = '异形屏'
......
// tslint:disable:no-invalid-this
// tslint:disable-next-line:only-arrow-functions
const EventBus = (function() {
// 非父子组件的通讯 当时用于解决模板详情页 对于模板列表页面的消息通知
function EventBusClass() {
this.msgQueues = {}
}
......
......@@ -4,9 +4,9 @@ class Token {
private initDone = false
// private token = '676191a8b17442cfb06d31fdc936db6e-APP'
private token = ''
// constructor() {
// this.getStorageToken()
// }
constructor() {
this.getStorageToken()
}
init() {
if (!this.initDone) {
......
......@@ -13,10 +13,11 @@
text-align: center;
position: relative;
border-radius: 6px;
box-sizing: border-box;
.films-item-img-bg {
width: 261px;
height: 261px;
// height: 261px;
position: absolute;
z-index: -1;
filter: blur(10px);
......@@ -24,7 +25,7 @@
.films-item-img {
width: 100%;
height: 158px;
height: 150px;
border-radius: 6px;
}
......@@ -49,7 +50,7 @@
margin-bottom: 13px;
font-weight: bold;
overflow: hidden;
height: 40px;
// height: 40px;
word-break: break-all;
text-overflow: ellipsis;
white-space: nowrap;
......@@ -57,7 +58,7 @@
}
&-detail {
height: 65px;
height: 55px;
overflow: hidden;
font-size: 22px;
color: #666;
......
......@@ -57,12 +57,12 @@ class FilmListItem extends Component {
/>
</View>
<View className="films-item-info">
<Text className="films-item-info-name" onClick={() => onClick && onClick()}>
<View className="films-item-info-name" onClick={() => onClick && onClick()}>
{filmName}
</Text>
<Text className="films-item-info-detail" onClick={() => onClick && onClick()}>
</View>
<View className="films-item-info-detail" onClick={() => onClick && onClick()}>
{filmDescribe ? filmDescribe : '无'}
</Text>
</View>
<View className="films-item-info-time">
<Text className="films-item-info-count">{updateTime}</Text>
{isChoose ? null : (
......
......@@ -5,12 +5,12 @@
display: flex;
flex-direction: row;
width: 100%;
padding: 20px;
padding: 36px 24px 10px 24px;
&-img-box {
width: 260px;
height: 195px;
padding: 4.5px 8px;
// padding: 4.5px 8px;
// border-radius: 8px;
// border: 1px solid $border-color;
......@@ -24,24 +24,37 @@
&-info {
// flex: ;
width: 190px;
width: 210px;
display: flex;
padding-left: 40px;
flex-direction: column;
padding-bottom: 10px;
&-name {
font-size: 32px;
color: #333;
font-weight: bold;
padding-top: 10px;
margin-bottom: 7px;
overflow: hidden;
// height: 40px;
word-break: break-all;
text-overflow: ellipsis;
white-space: nowrap;
}
&-intro {
font-size: 22px;
font-size: 24px;
color: #666;
height: 75px;
overflow: hidden;
height: 65px;
display: inline-block;
/* postcss-pxtransform rn eject enable */
overflow: hidden;
white-space: nowrap;
// display: -webkit-box;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
// margin-bottom: 38px;
}
......
......@@ -48,13 +48,13 @@ class DeviceItem extends Component {
return (
<View className="device-item">
<View className="device-item-img-box" onClick={() => this.goDetail(equipmentShopId)}>
<Image className="device-item-img" src={url} />
<Image className="device-item-img" mode="aspectFit" src={url} />
</View>
<View className="device-item-info">
<Text className="device-item-info-name">{String(equipmentName).slice(0, 7)}</Text>
<Text className="device-item-info-intro">{equipmentIntro}</Text>
<Text className="device-item-info-price">
¥<Text className="num">{equipmentPrice}</Text>
¥ <Text className="num">{equipmentPrice}</Text>
</Text>
</View>
<View className="device-item-btn">
......
......@@ -142,7 +142,7 @@ class MyDevice extends Component {
showMyToast({ title: '删除成功~' })
} catch (error) {
console.error(error)
showMyToast({ result: error, title: '失败成功~' })
showMyToast({ result: error, title: '删除失败~' })
}
}
})
......
......@@ -126,7 +126,7 @@ class DeviceGroup extends Component {
showMyToast({ title: '删除成功~' })
} catch (error) {
console.error(error)
showMyToast({ result: error, title: '失败成功~' })
showMyToast({ result: error, title: '删除失败~' })
}
}
})
......
......@@ -52,10 +52,17 @@ class Device extends Component {
title: '理想屏'
}
}
componentDidMount() {
Taro.setNavigationBarTitle({
title: '设备'
})
}
componentDidShow() {
Taro.setNavigationBarTitle({
title: '设备'
})
const id = Taro.getStorageSync('isAdd')
console.log(id, this.$router.params.id, 'isAdd')
this.setState({
id: this.$router.params.id || id
})
......
......@@ -111,7 +111,7 @@ class MyDevice extends Component {
showMyToast({ title: '删除成功~' })
} catch (error) {
console.error(error)
showMyToast({ result: error, title: '失败成功~' })
showMyToast({ result: error, title: '删除失败~' })
}
}
})
......
......@@ -119,7 +119,7 @@ class Films extends Component {
showMyToast({ title: '删除成功~' })
} catch (error) {
console.error(error)
showMyToast({ title: '失败成功~' })
showMyToast({ title: '删除失败~' })
}
}
})
......
......@@ -13,7 +13,8 @@
&-title {
display: flex;
justify-content: space-between;
padding: 0 20px;
// padding: 0 20px;
padding-left: 0;
padding-bottom: 20px;
font-size: 20px;
}
......@@ -27,6 +28,15 @@
.btn-all {
font-size: 28px;
color: #ff9110;
display: flex;
align-items: center;
}
.right-icon {
margin-left: 8px;
margin-top: 3px;
width: 12px;
height: 20px;
}
&-list {
......
// import { ITempItem } from '../..'
import { ComponentClass } from 'react'
import Taro, { Component } from '@tarojs/taro'
import { View, Text, ScrollView } from '@tarojs/components'
import { View, Text, ScrollView, Image } from '@tarojs/components'
import TempItem from '../temp_item'
import './index.scss'
......@@ -41,10 +41,14 @@ class HomeItem extends Component {
<View className="home-item">
<ScrollView scrollY>
<View className="home-item-title">
<Text className="title-name">{typeName ? typeName : ''}</Text>
<Text className="btn-all" onClick={this.goAll}>
更多>
</Text>
<View className="title-name">{typeName ? typeName : ''}</View>
<View className="btn-all" onClick={this.goAll}>
更多
<Image
className="right-icon"
src="http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/arrow-right.png"
/>
</View>
</View>
<View className="home-item-list">
{templateInfo.map(item => {
......
......@@ -18,13 +18,14 @@
}
.type-item {
padding: 20px;
padding: 24px;
padding-right: 10px;
&-title {
padding-top: 54px;
font-size: 38px;
color: #000;
font-weight: bold;
}
.type-item-btn {
......@@ -37,7 +38,7 @@
padding: 0;
background: #f3f3f5;
// box-shadow: 0 7px 12px 0 rgba(159, 87, 2, 0.17);
border-radius: 3px;
border-radius: 6px;
color: #666;
border: none;
line-height: 56px;
......
......@@ -32,7 +32,7 @@
padding: 0;
box-shadow: none;
// box-shadow: 0 7px 12px 0 rgba(159, 87, 2, 0.17);
border-radius: 3px;
border-radius: 6px;
&::after {
display: none;
......@@ -69,6 +69,7 @@
color: #999;
padding: 0 20px 0 20px;
margin: 22px;
margin-left: 0;
height: 80px;
line-height: 80px;
font-weight: bold;
......
......@@ -9,10 +9,10 @@
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: 40px;
height: 373px;
// margin-bottom: 40px;
height: 417px;
box-sizing: border-box;
padding: 100px 0 70px 40px;
padding: 120px 0 70px 40px;
background: url('https://visual-clouds.oss-cn-beijing.aliyuncs.com/js/card.png') no-repeat center;
background-size: 100%;
......@@ -49,7 +49,7 @@
&-vip {
// padding-left: 20px;
margin-top: 10px;
background: rgba(254, 74, 26, 1);
background: rgba(254, 74, 26, 0.5);
border-radius: 22px;
display: inline-block;
// padding-top: 20px;
......@@ -61,6 +61,7 @@
font-weight: 400;
color: rgba(255, 255, 255, 1);
letter-spacing: 0.43px;
// opacity: 0.5;
}
}
......
......@@ -12,7 +12,7 @@
background-size: cover;
&-step1 {
padding-top: 200px;
padding-top: 290px;
.login-register {
width: 550px;
......@@ -160,6 +160,10 @@
margin-bottom: 103px;
width: 550px;
height: 86px;
// line-height: 1;
// font-weight: 550;
letter-spacing: 1px;
box-sizing: content-box;
border-radius: 54px;
background: none;
border: 2px solid rgba(255, 255, 255, 1);
......
......@@ -65,6 +65,7 @@ class WifiList extends Component {
protected advertisData = ''
protected bluetoothCode = ''
protected initLoading = true
protected timer: any = null
protected activeWLAN: IWifiListItem
constructor(props: any) {
super(props)
......@@ -286,8 +287,19 @@ class WifiList extends Component {
this.cancelModal()
try {
Taro.showLoading({ title: '连接中...' })
await Ble.postWifiPassword(id, password, deviceId)
this.timer = setTimeout(() => {
if (!this.deviceToken) {
Taro.hideLoading()
Taro.showToast({
title: '请重新扫码连接!',
icon: 'none'
})
Taro.navigateBack()
}
clearTimeout(this.timer)
}, 30000)
await Ble.postWifiPassword(id, password, deviceId)
if (mode && mode === 'OWNRESET') {
setTimeout(() => {
// Taro.navigateBack()
......@@ -317,6 +329,8 @@ class WifiList extends Component {
componentWillUnmount() {
Ble.closeBluetoothAdapter()
clearTimeout(this.timer)
this.timer = null
}
render() {
......
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 sign in to comment