|
|
@@ -14,7 +14,7 @@
|
|
|
<view class="flex-row justify-center">
|
|
|
<image class="dataNullImage" src="/static/zhanwu.png"></image>
|
|
|
</view>
|
|
|
- <text class="roleName1">{{roleList[confirmRoleIndex].name}}<text class="roleHint">角色没有拓客规则,点击下方“添加规则”按钮可添加拓客规则</text></text>
|
|
|
+ <text v-if="roleList[confirmRoleIndex]" class="roleName1">{{roleList[confirmRoleIndex].name}}<text class="roleHint">角色没有拓客规则,点击下方“添加规则”按钮可添加拓客规则</text></text>
|
|
|
</view>
|
|
|
|
|
|
<view v-else class="scroll-Y">
|
|
|
@@ -177,7 +177,7 @@
|
|
|
roleNoBindRuleList:[], //角色没有绑定的规则
|
|
|
roleBindRuleParam:{},
|
|
|
value: 1,
|
|
|
- qrcodeUrl:this.$tkUrl+'?roleId={roleId}&parentId={parentId}',
|
|
|
+ qrcodeUrl:this.$tkUrl+'?roleId={roleId}&parentId={parentId}×tamp={timestamp}',
|
|
|
options: {
|
|
|
// 指定二维码前景,一般可在中间放logo
|
|
|
foregroundImagePadding:2,
|
|
|
@@ -193,13 +193,28 @@
|
|
|
methods: {
|
|
|
|
|
|
deleteRule(item){
|
|
|
- this.$api.service.cancelRoleBindRule({
|
|
|
- roleId:this.roleList[this.confirmRoleIndex].id,
|
|
|
- ruleIds:[item.id]
|
|
|
- }).then(res=>{
|
|
|
- this.getRuleByRoleId(this.roleList[this.confirmRoleIndex].id)
|
|
|
- this.getNewRules(this.roleList[this.confirmRoleIndex].id)
|
|
|
- })
|
|
|
+
|
|
|
+ let that =this
|
|
|
+ uni.showModal({
|
|
|
+ title: '温馨提示',
|
|
|
+ content: '是否确认删除该规则!',
|
|
|
+ success: function (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ console.log('用户点击确定');
|
|
|
+ that.$api.service.cancelRoleBindRule({
|
|
|
+ roleId:that.roleList[that.confirmRoleIndex].id,
|
|
|
+ ruleIds:[item.id]
|
|
|
+ }).then(res=>{
|
|
|
+ that.getRuleByRoleId(that.roleList[that.confirmRoleIndex].id)
|
|
|
+ that.getNewRules(that.roleList[that.confirmRoleIndex].id)
|
|
|
+ })
|
|
|
+ } else if (res.cancel) {
|
|
|
+ console.log('用户点击取消');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
|
|
|
selectRule(item,index){
|
|
|
@@ -266,7 +281,8 @@
|
|
|
|
|
|
let data = {
|
|
|
roleId:this.roleList[this.confirmRoleIndex].id,
|
|
|
- parentId:this.userInfo.id
|
|
|
+ parentId:this.userInfo.id,
|
|
|
+ timestamp:new Date().getTime() + (5 * 60 * 1000)
|
|
|
};
|
|
|
for (let key in data) {
|
|
|
let regexp = new RegExp("{" + key + "}"); // 构造正则表达式
|