|
@@ -89,10 +89,11 @@
|
|
|
productName: '',
|
|
productName: '',
|
|
|
productList: [],
|
|
productList: [],
|
|
|
merchantId: '',
|
|
merchantId: '',
|
|
|
|
|
+ _isFirstShow: true,
|
|
|
api: {
|
|
api: {
|
|
|
- url: '/app/product/purveyor/list',
|
|
|
|
|
- method: 'GET'
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ url: '/app/product/purveyor/list',
|
|
|
|
|
+ method: 'GET'
|
|
|
|
|
+ },
|
|
|
initParams: {},
|
|
initParams: {},
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -189,27 +190,29 @@
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
-
|
|
|
|
|
- let that = this
|
|
|
|
|
- uni.getStorage({
|
|
|
|
|
- key: 'login_user_info',
|
|
|
|
|
- success: function(res) {
|
|
|
|
|
- that.merchantId = res.data.merchantId
|
|
|
|
|
- that.getProductList()
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if (this._isFirstShow) {
|
|
|
|
|
+ this._isFirstShow = false;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.getProductList();
|
|
|
|
|
+ }
|
|
|
uni.removeStorage({
|
|
uni.removeStorage({
|
|
|
key: 'smdate',
|
|
key: 'smdate',
|
|
|
});
|
|
});
|
|
|
uni.removeStorage({
|
|
uni.removeStorage({
|
|
|
key: 'group',
|
|
key: 'group',
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
|
- // 初始化列表
|
|
|
|
|
- this.getProductList();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ const userInfo = uni.getStorageSync('login_user_info');
|
|
|
|
|
+ if (userInfo) {
|
|
|
|
|
+ this.merchantId = userInfo.merchantId;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.initParams = {
|
|
|
|
|
+ merchantId: this.merchantId,
|
|
|
|
|
+ productStatus: this.productStatus,
|
|
|
|
|
+ productName: this.productName
|
|
|
|
|
+ };
|
|
|
|
|
+ }
|
|
|
// async onShow() {
|
|
// async onShow() {
|
|
|
// let that = this
|
|
// let that = this
|
|
|
// uni.getStorage({
|
|
// uni.getStorage({
|