|
@@ -7,14 +7,21 @@
|
|
|
<view class="nothing" v-if="judge==true">
|
|
|
<u-empty mode="page" text="暂无数据"></u-empty>
|
|
|
</view>
|
|
|
- <view class="content" v-for="(item, index) in supplier_s" :key="index">
|
|
|
+ <view class="content" v-else v-for="(item, index) in supplier_s" :key="index">
|
|
|
<view class="content_s">
|
|
|
<view class="title">
|
|
|
<view></view>
|
|
|
- <h3>{{item.agentName}}</h3>
|
|
|
+ <h3>{{item.brand}}</h3>
|
|
|
</view>
|
|
|
<view class="information_E">
|
|
|
- <u-image width="250rpx" v-for="(item2, index) in item.brandList" :key="index" :src="item2" mode="widthFix"></u-image>
|
|
|
+ <u-form-item>
|
|
|
+ <u-icon name="manager-o" custom-prefix="van-icon"/>
|
|
|
+ <u-input v-model="item.agentName" />
|
|
|
+ </u-form-item>
|
|
|
+ <u-form-item>
|
|
|
+ <u-icon name="orders-o" custom-prefix="van-icon"/>
|
|
|
+ <u-input v-model="item.signCount" />
|
|
|
+ </u-form-item>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -40,27 +47,45 @@
|
|
|
},
|
|
|
methods: {
|
|
|
supplier() {
|
|
|
+ uni.getNetworkType({
|
|
|
+ success: function(res) {
|
|
|
+ let none = res.networkType
|
|
|
+ console.log(res.networkType);
|
|
|
+ if (none == 'none') {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '无网络,请连接网络后再试~',
|
|
|
+ position: "bottom"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
request({
|
|
|
- url: '/myapp/storeSelectAgent',
|
|
|
- method: 'Post',
|
|
|
- data: {
|
|
|
+ url: '/app/appAgent/getBrandAgent',
|
|
|
+ method: 'get',
|
|
|
+ params: {
|
|
|
storeId: this.$store.state.storeInfo.storeId,
|
|
|
- userId: this.$store.state.storeInfo.userId
|
|
|
+ // userId: this.$store.state.storeInfo.userId
|
|
|
}
|
|
|
}).then(res => {
|
|
|
- console.log(res.data.data)
|
|
|
- console.log(res)
|
|
|
- this.supplier_s = res.data.data
|
|
|
- console.log(this.supplier_s)
|
|
|
- if (this.supplier_s.length != 0) {
|
|
|
+ console.log(res.data.data.data)
|
|
|
+ if (res.data.code == 0) {
|
|
|
+ this.supplier_s = res.data.data.data
|
|
|
this.judge = false
|
|
|
+ }else if(res.data.code == 500){
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '出错了,请稍后再试',
|
|
|
+ position: "bottom"
|
|
|
+ })
|
|
|
}
|
|
|
- console.log(res.data.data[1].brandList[1])
|
|
|
}).catch(err => {
|
|
|
console.log(err)
|
|
|
- if (this.supplier_s.length != 0) {
|
|
|
- this.judge = false
|
|
|
- }
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '出错了,请稍后再试',
|
|
|
+ position: "bottom"
|
|
|
+ })
|
|
|
}).finally(() => {
|
|
|
// Loading.close()
|
|
|
})
|
|
@@ -118,7 +143,7 @@
|
|
|
}
|
|
|
|
|
|
.information_E {
|
|
|
- display: flex;
|
|
|
+ // display: flex;
|
|
|
width: 100%;
|
|
|
flex-flow: wrap;
|
|
|
justify-content: space-around;
|
|
@@ -140,4 +165,4 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|