1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <template>
- <view class="back">
- <view class="operatorList" v-for="item in operators" :key="item.number" @tap="showDetail"
- :data-code="item.code">
- <image class="image1" src="../../static/运营商管理/1@3x.png"></image>
- <text style="margin-top: 38rpx;margin-left: 30rpx; width: 500rpx;">{{item.name}}</text>
- <image class="image2" src="../../static/运营商管理/ico2@3x.png"></image>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- operators: [],
- }
- },
- onLoad(e) {
- this.list(e)
- uni.$on('flush', () => {
- this.list(e)
- })
- },
- methods: {
- async list(e) {
- let vm = this;
- let url = uni.$api.operator.list;
- let res = await uni.$http.get(url);
- console.log('form发生了submit事件')
- console.log(res);
- this.operators = res.data.data.operators;
- console.log(res.data.data.operators);
- },
- showDetail(e) {
- console.log(e);
- var code = e.currentTarget.dataset.code;
- uni.navigateTo({
- url: '/pages/operator/operatorInfo/operatorInfo?code=' + code,
- });
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .operatorList {
- display: flex;
- flex-direction: row;
- height: 125rpx;
- background-color: white;
- margin-top: 30rpx;
- width: 704rpx;
- margin-left: 23rpx;
- border-radius: 10rpx;
- }
- .image1 {
- width: 90rpx;
- height: 90rpx;
- margin-top: 20rpx;
- margin-left: 20rpx;
- }
- .image2 {
- width: 10px;
- height: 10px;
- margin-top: 50rpx;
- // margin-left: 400rpx;
- }
- .back {
- background-color: aliceblue;
- width: 100%;
- height: 100%;
- }
- </style>
|