|
@@ -39,8 +39,8 @@
|
|
<u-button text="置顶" @click="topMarking(item)" throttle-time='1000'></u-button>
|
|
<u-button text="置顶" @click="topMarking(item)" throttle-time='1000'></u-button>
|
|
<!-- <button @click="$u.debounce(topMarking, 500)">置顶</button> -->
|
|
<!-- <button @click="$u.debounce(topMarking, 500)">置顶</button> -->
|
|
<!-- <button @click="$u.debounce(topMarking(item), 500)">置顶</button> -->
|
|
<!-- <button @click="$u.debounce(topMarking(item), 500)">置顶</button> -->
|
|
- <button>删除</button>
|
|
|
|
- <button>编辑</button>
|
|
|
|
|
|
+ <u-button text="删除" @click="del(item.id)" throttle-time='1000'></u-button>
|
|
|
|
+ <button @click="toEditCard(item)">编辑</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -50,6 +50,24 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<u-toast ref="uToast"></u-toast>
|
|
<u-toast ref="uToast"></u-toast>
|
|
|
|
+ <u-popup :show="isShowDel" @close="isShowDel=false" mode="center">
|
|
|
|
+ <view>
|
|
|
|
+ <text>删除名片自动退出关联得圈子,确定删除?</text>
|
|
|
|
+ <u-radio-group v-model="radiovalue" placement="column">
|
|
|
|
+ <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist" :key="index"
|
|
|
|
+ :label="item.name" :name="item.name" @change="radioChange">
|
|
|
|
+ </u-radio>
|
|
|
|
+ </u-radio-group>
|
|
|
|
+ <view class="flex">
|
|
|
|
+ <view class="">
|
|
|
|
+ 取消
|
|
|
|
+ </view>
|
|
|
|
+ <view class="" @click="delCard">
|
|
|
|
+ 删除
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </u-popup>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -58,6 +76,18 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ id: '',
|
|
|
|
+ radiovalue: '仅从自己名片列表删除',
|
|
|
|
+ radiolist: [{
|
|
|
|
+ name: '仅从自己名片列表删除',
|
|
|
|
+ disabled: false
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '从所有拥有此名片用户列表删除',
|
|
|
|
+ disabled: false
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ isShowDel: false,
|
|
cardList: []
|
|
cardList: []
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -69,6 +99,9 @@
|
|
this.init()
|
|
this.init()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ radioChange(n) {
|
|
|
|
+ console.log('radioChange', n);
|
|
|
|
+ },
|
|
init() {
|
|
init() {
|
|
this.$request.baseRequest('admin.unimall.cardManagementInfo', 'list', {
|
|
this.$request.baseRequest('admin.unimall.cardManagementInfo', 'list', {
|
|
commonId: this.userInfo.id
|
|
commonId: this.userInfo.id
|
|
@@ -82,6 +115,43 @@
|
|
this.cardList = res.data.items
|
|
this.cardList = res.data.items
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ toEditCard(val) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: "/pages/mySet/editCard?itemVal="+JSON.stringify(val)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ delCard() {
|
|
|
|
+ let _data = {}
|
|
|
|
+ if (this.radiovalue == '仅从自己名片列表删除') {
|
|
|
|
+ _data = {
|
|
|
|
+ id: this.id
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ _data = {
|
|
|
|
+ id: this.id,
|
|
|
|
+ deleteCondition: 1
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ that.$request.baseRequest('admin.unimall.cardManagementInfo', 'delete', _data, failres => {
|
|
|
|
+ this.$refs.uToast.show({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: failres.errmsg,
|
|
|
|
+ })
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ }).then(res => {
|
|
|
|
+ this.isShowDel = false
|
|
|
|
+ this.$refs.uToast.show({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: '删除成功!',
|
|
|
|
+ })
|
|
|
|
+ this.init()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ del(val) {
|
|
|
|
+ this.id = val
|
|
|
|
+ this.isShowDel = true
|
|
|
|
+
|
|
|
|
+ },
|
|
addCard() {
|
|
addCard() {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: "/pages/mySet/newCard"
|
|
url: "/pages/mySet/newCard"
|
|
@@ -89,7 +159,9 @@
|
|
},
|
|
},
|
|
topMarking(val) {
|
|
topMarking(val) {
|
|
that.$request.baseRequest('admin.unimall.cardManagementInfo', 'top', {
|
|
that.$request.baseRequest('admin.unimall.cardManagementInfo', 'top', {
|
|
- cardManagementInfo: JSON.stringify({id:val.id})
|
|
|
|
|
|
+ cardManagementInfo: JSON.stringify({
|
|
|
|
+ id: val.id
|
|
|
|
+ })
|
|
}, failres => {
|
|
}, failres => {
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|
|
type: 'error',
|
|
type: 'error',
|
|
@@ -101,7 +173,7 @@
|
|
type: 'success',
|
|
type: 'success',
|
|
message: '置顶成功!',
|
|
message: '置顶成功!',
|
|
})
|
|
})
|
|
- this.init()
|
|
|
|
|
|
+ this.init()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|