|
|
@@ -19,9 +19,10 @@
|
|
|
<p>总流量:{{siminfo['data'].total}}M</p>
|
|
|
<p>状态:{{siminfo['data'].status}}</p>
|
|
|
<p>到期时间:{{siminfo['data'].expire}}</p>
|
|
|
+ <p v-if="myuser_type == 1">厂商名称:{{siminfo['data'].company}}</p>
|
|
|
<p class="infoDeclear">
|
|
|
- <span>已使用:{{siminfo['data'].used.toFixed(2)}}M/{{siminfo['data'].total}}M</span>
|
|
|
- <span>剩余:<span>{{siminfo['data'].total - siminfo['data'].used.toFixed(2)}}M</span></span>
|
|
|
+ <span>已使用:<span :class="[siminfo['data'].used/siminfo['data'].total < 1 ?'green':'red']">{{siminfo['data'].used.toFixed(2)}}M</span>/{{siminfo['data'].total}}M</span>
|
|
|
+ <span>剩余:<span :class="[siminfo['data'].used/siminfo['data'].total < 1 ?'green':'red']">{{siminfo['data'].total - siminfo['data'].used.toFixed(2)}}M</span></span>
|
|
|
</p>
|
|
|
<u-line-progress :percent="(siminfo['data'].used/siminfo['data'].total) * 100" height="12" :show-percent="false" :active-color="(siminfo['data'].used/siminfo['data'].total) < 1 ? '#14A478' : '#f56c6c'"></u-line-progress>
|
|
|
</view>
|
|
|
@@ -49,9 +50,10 @@
|
|
|
<p>总流量:{{siminfo['photo'].total}}M</p>
|
|
|
<p>状态:{{siminfo['photo'].status}}</p>
|
|
|
<p>到期时间:{{siminfo['photo'].expire}}</p>
|
|
|
+ <p v-if="myuser_type == 1">厂商名称:{{siminfo['photo'].company}}</p>
|
|
|
<p class="infoDeclear">
|
|
|
- <span>已使用:{{siminfo['photo'].used.toFixed(2)}}M/{{siminfo['photo'].total}}M</span>
|
|
|
- <span>剩余:<span>{{siminfo['photo'].total - siminfo['photo'].used.toFixed(2)}}M</span></span>
|
|
|
+ <span>已使用:<span :class="[siminfo['photo'].used/siminfo['photo'].total < 1 ?'green':'red']">{{siminfo['photo'].used.toFixed(2)}}M</span>/{{siminfo['photo'].total}}M</span>
|
|
|
+ <span>剩余:<span :class="[siminfo['photo'].used/siminfo['photo'].total < 1 ?'green':'red']">{{siminfo['photo'].total - siminfo['photo'].used.toFixed(2)}}M</span></span>
|
|
|
</p>
|
|
|
<u-line-progress :percent="(siminfo['photo'].used/siminfo['photo'].total) * 100" height="12" :show-percent="false" :active-color="(siminfo['photo'].used/siminfo['photo'].total) < 1 ? '#14A478' : '#f56c6c'"></u-line-progress>
|
|
|
</view>
|
|
|
@@ -78,6 +80,7 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ myuser_type:'',
|
|
|
iccid: '',
|
|
|
iccidObj: {
|
|
|
data_iccid: '',
|
|
|
@@ -89,14 +92,16 @@
|
|
|
iccid: "",
|
|
|
status: "",
|
|
|
total: 0,
|
|
|
- used: 0
|
|
|
+ used: 0,
|
|
|
+ company:''
|
|
|
},
|
|
|
photo: {
|
|
|
expire: "",
|
|
|
iccid: "",
|
|
|
status: "",
|
|
|
total: 0,
|
|
|
- used: 0
|
|
|
+ used: 0,
|
|
|
+ company:''
|
|
|
}
|
|
|
},
|
|
|
editSim:'',
|
|
|
@@ -214,7 +219,13 @@
|
|
|
console.log(option)
|
|
|
this.id = option.id ? option.id : option.d_id
|
|
|
this.loding = true
|
|
|
- this.simid(this.id)
|
|
|
+ this.simid(this.id);
|
|
|
+ uni.getStorage({
|
|
|
+ key:"myuser_type",
|
|
|
+ success:(res)=>{
|
|
|
+ this.myuser_type = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
@@ -223,6 +234,12 @@
|
|
|
.expireBox{
|
|
|
padding: 0 20rpx;
|
|
|
}
|
|
|
+ .green{
|
|
|
+ color: #14A478;
|
|
|
+ }
|
|
|
+ .red{
|
|
|
+ color: #f56c6c;
|
|
|
+ }
|
|
|
.sim_info {
|
|
|
position: relative;
|
|
|
width: 90%;
|