123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- ;
- var operationPage = new Vue({
- el: "#operationPage",
- data: {
- loginLoading: false,
- userId: 0,
- addForm: {
- mobile: '',
- linkName: '',
- userId: '',
- clubId: '',
- configFlag: 2
- },
- rule: {
- name: '^[a-zA-Z\\u4e00-\\u9fa5]{2,}$',
- phone: '^\\d{6,12}$'
- }
- },
- computed: {
- },
- methods: {
- addConfirmFn:function(data){//添加运营人员
- var _self = this;
- var pass = verifyForm();
- if (_self.loginLoading) { return false; }
- if (!pass) {return false;}
- _self.loginLoading = true;
- UserApi.AddOperationUse(_self.addForm,function (response) {
- console.log(response);
- if(response.code == 0 ){ //删除成功
- CAIMEI.dialog('添加成功',true,function () {
- window.location.href='/user/operation/list.html';
- _self.loginLoading = false;
- });
- }else{
- console.log('222222222222222');
- CAIMEI.Alert(response.msg,'确定',false);
- _self.loginLoading = false;
- }
- })
- },
- blurHandle: function(event) { // 失去焦点校验
- var el = event.currentTarget;
- verifyHandle(el);
- }
- },
- mounted: function () {
- if(globalUserData){
- this.addForm.userId = globalUserData.userId;
- this.addForm.clubId = globalUserData.clubId;
- }
- $('.navLayout').find('.navList').removeClass("on").find('.con').hide().find('a').removeClass("on");
- $('.navLayout').find('.navList').eq(1).addClass("on").find('.con').show().find('a').eq(1).addClass("on");
- }
- });
|