|
@@ -334,9 +334,9 @@
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
that = this
|
|
that = this
|
|
console.log(options)
|
|
console.log(options)
|
|
|
|
+ this.id = options.id.indexOf(",") ? options.id.split(",")[0] : options.id
|
|
if (uni.getStorageSync("userInfo").phone) {
|
|
if (uni.getStorageSync("userInfo").phone) {
|
|
this.userInfo = uni.getStorageSync("userInfo")
|
|
this.userInfo = uni.getStorageSync("userInfo")
|
|
- this.id = options.id.indexOf(",") ? options.id.split(",")[0] : options.id
|
|
|
|
// this.commonId = options.id.indexOf(",") ? options.id.split(",")[1] : ''
|
|
// this.commonId = options.id.indexOf(",") ? options.id.split(",")[1] : ''
|
|
|
|
|
|
this.getList()
|
|
this.getList()
|
|
@@ -392,38 +392,51 @@
|
|
});
|
|
});
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- uni.showLoading({
|
|
|
|
- title: '数据加载中',
|
|
|
|
- mask: true
|
|
|
|
- })
|
|
|
|
- this.$request.baseRequest('admin.unimall.cardHolderInfo', 'add', {
|
|
|
|
- cardHolderInfo: JSON.stringify({
|
|
|
|
- cardId: this.cardInfo.id,
|
|
|
|
- remark: this.cardInfo.remark,
|
|
|
|
- cardCommonId: this.commonId,
|
|
|
|
- myCardId: this.cardInfo.myCardId,
|
|
|
|
- commonId: uni.getStorageSync("userInfo").id,
|
|
|
|
- classify: this.cardInfo.classify
|
|
|
|
- })
|
|
|
|
|
|
+ this.$request.baseRequest('admin.unimall.cardHolderInfo', 'getAdded', {
|
|
|
|
+ commonId: uni.getStorageSync("userInfo").id,
|
|
|
|
+ cardId: this.cardInfo.id,
|
|
}, failres => {
|
|
}, failres => {
|
|
|
|
+ console.log('res+++++', failres.errmsg)
|
|
uni.showToast({
|
|
uni.showToast({
|
|
icon: "none",
|
|
icon: "none",
|
|
title: failres.errmsg,
|
|
title: failres.errmsg,
|
|
duration: 3000
|
|
duration: 3000
|
|
});
|
|
});
|
|
- uni.hideLoading()
|
|
|
|
- }).then(res => {
|
|
|
|
- uni.showToast({
|
|
|
|
- icon: "success",
|
|
|
|
- title: '保存成功!',
|
|
|
|
- duration: 2000
|
|
|
|
- });
|
|
|
|
- uni.setStorageSync("scanAddCardToIndex",1)
|
|
|
|
- uni.switchTab({
|
|
|
|
- url: "/pages/cardHolder/cardHolder"
|
|
|
|
-
|
|
|
|
|
|
+ }).then(res1 => {
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '数据加载中',
|
|
|
|
+ mask: true
|
|
|
|
+ })
|
|
|
|
+ this.$request.baseRequest('admin.unimall.cardHolderInfo', 'add', {
|
|
|
|
+ cardHolderInfo: JSON.stringify({
|
|
|
|
+ cardId: this.cardInfo.id,
|
|
|
|
+ remark: this.cardInfo.remark,
|
|
|
|
+ cardCommonId: this.commonId,
|
|
|
|
+ myCardId: this.cardInfo.myCardId,
|
|
|
|
+ commonId: uni.getStorageSync("userInfo").id,
|
|
|
|
+ classify: this.cardInfo.classify
|
|
|
|
+ })
|
|
|
|
+ }, failres => {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon: "none",
|
|
|
|
+ title: failres.errmsg,
|
|
|
|
+ duration: 3000
|
|
|
|
+ });
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ }).then(res => {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon: "success",
|
|
|
|
+ title: '保存成功!',
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
|
|
+ uni.setStorageSync("scanAddCardToIndex",1)
|
|
|
|
+ uni.switchTab({
|
|
|
|
+ url: "/pages/cardHolder/cardHolder"
|
|
|
|
+
|
|
|
|
+ })
|
|
})
|
|
})
|
|
})
|
|
})
|
|
|
|
+
|
|
},
|
|
},
|
|
cancel() {
|
|
cancel() {
|
|
uni.switchTab({
|
|
uni.switchTab({
|