| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <template>
- <view>
- <view class="status_bar"></view>
- <view class="" style="position: relative;top: 64px;">
- <view style="position: fixed;z-index: 100;width: 100%;">
- <uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="sim卡详情"></uni-nav-bar>
- </view>
- <view class="sim_info">
- <view class="sim_info_title">
- <image :src="'http://static.yfpyx.com/bigdata_app'+'/image/cb/sim1.png'" mode=""></image>
- <p>sim卡查询</p>
- </view>
- <view class="sim_info_text">
- <p>运营商:{{siminfo.data.carrier}}</p>
- <p>ICCID:{{iccid}}</p>
- <p>状态:{{state[siminfo.data.account_status]}}</p>
- <p>套餐:{{siminfo.data.data_plan}}MB</p>
- <p>已用流量:{{siminfo.data.data_usage}}MB</p>
- <p>剩余流量:{{siminfo.data.data_balance}}MB</p>
- <p>到期时间:{{siminfo.data.outbound_date|timeFormat()}}</p>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- iccid: '',
- siminfo: {
- data: {
- carrier: "--",
- account_status: "--",
- data_plan: "--",
- data_usage: "--",
- data_balance: "--",
- outbound_date: ""
- }
- },
- state: ['未知', '测试期', '沉默期', '使用中', '停机', '停机保号', '预销号', '销号'],
- id: ''
- }
- },
- methods: {
- async simid(data) { //设备列表
- const res = await this.$myRequest({
- url: '/api/api_gateway?method=forecast.send_control.device_sim',
- data: {
- d_id: data,
- type: 'sim'
- }
- })
- if(res.length!=0){
- this.iccid = res[0].iccid
- this.simdata(this.iccid)
- }
-
- },
- async simdata(data) { //设备列表
- const res = await this.$myRequest({
- url: '/api/api_gateway?method=forecast.send_control.sim_query',
- data: {
- iccid: data
- }
- })
- // console.log(res.data)
- this.siminfo = res.data
- },
- clickLeft() {
- uni.navigateBack({
- delta: 1
- })
- }
- },
- onLoad(option) {
- console.log(option)
- this.id = option.id
- this.simid(this.id)
- }
- }
- </script>
- <style lang="scss">
- .sim_info {
- width: 90%;
- position: absolute;
- top: 54px;
- left: 5%;
- box-shadow: 0 0 10rpx #bcb9ca;
- padding: 30rpx 20rpx 50rpx;
- border-radius: 20rpx;
- box-sizing: border-box;
- .sim_info_title {
- width: 100%;
- display: flex;
- image {
- width: 24rpx;
- height: 32rpx;
- margin: 6rpx 20rpx 0 0;
- }
- p {
- font-weight: 700;
- }
- }
- .sim_info_text {
- width: 100%;
- padding-left: 44rpx;
- p {
- height: 30rpx;
- margin-top: 20rpx;
- font-size: 26rpx;
- }
- }
- }
- </style>
|