反馈修改
This commit is contained in:
@@ -42,7 +42,8 @@
|
||||
|
||||
<script>
|
||||
import list from '../../common/js/list'
|
||||
import { queryAllEnginner, csMarketDataAdd } from '@/common/api/engineering'
|
||||
import {queryAllEnginner, csMarketDataAdd, queryEngineering} from '@/common/api/engineering'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -107,7 +108,26 @@ export default {
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
onBackPress() {
|
||||
console.log('onBackPress')
|
||||
let engineering = uni.getStorageSync('engineering')
|
||||
queryEngineering().then(res => {
|
||||
if (res.data.length === 0) {
|
||||
uni.removeStorage({
|
||||
key: this.$cacheKey.engineering,
|
||||
})
|
||||
} else if (engineering && !res.data.some(item => item.id = engineering.id)) {
|
||||
uni.removeStorage({
|
||||
key: this.$cacheKey.engineering,
|
||||
})
|
||||
} else {
|
||||
uni.setStorage({
|
||||
key: this.$cacheKey.engineering,
|
||||
data: res.data[0],
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onLoad() {
|
||||
this.init()
|
||||
},
|
||||
@@ -120,14 +140,17 @@ export default {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&-left {
|
||||
flex: 1;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .uni-list-item__content {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.message-header {
|
||||
padding: 200rpx 34rpx 34rpx;
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user