| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <template>
- <view class="pages">
- <view class="empty_item" v-if="show">
- <image mode="widthFix" src="../../static/empty.jpg"></image>
- <view class="error-text">设备SN:{{sn}}</view>
- <view class="error-text">{{errorText}}</view>
- </view>
- </view>
- </template>
- <script setup>
- export default {
- data(){
- return {
- sn:this.api.getSn(),
- errorText:'系统异常',
- show:false,
- }
- },
- onShow(){
- this.getEquipmentInfo()
- },
- methods: {
- // 获取数据
- getEquipmentInfo() {
- this.loading = true
- let that = this,
- url = "app/api/getEquipmentInfo",
- params = {
- eqSn_equal: this.sn
- }
- that.api.request(url, params, "get").then((res) => {
- uni.redirectTo({
- url:"/pages/index/index"+res.factory.type
- })
-
- }).catch((res) => {
- console.log(res)
- this.show=true
- if(res.data && res.data.msg){
- that.errorText = res.data.msg
- }
- })
- // this.request({
- // pageSize: this.pageSize,
- // pageCurrent: pageCurrent,
- // value: value,
- // success: res => {
- // // console.log('data', res);
- // this.tableData = res.data
- // this.total = res.total
- // this.loading = false
- // }
- // })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .pages{
- background: #fff;
- text-align: center;
- min-height: 100vh;
- .empty_item{
- padding-top: 10%;
- }
- .error-text{
- font-size: 40rpx;
- line-height: 80rpx;
- }
- }
- </style>
|