123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- ;
- jqMultipleShow("click", ".navList", ".tab", ".con");
- var helpSuggestion = new Vue({
- el: "#suggestion",
- mixins: [cmSysVitaMixins],
- data: {
- btnLoading: false,
- userId: 0,
- suggestion: {
- type: 1,
- title: "",
- content: "",
- name: "",
- phone: ""
- },
- rule:{
- name: '^[a-zA-Z\\u4e00-\\u9fa5]{2,}$',
- phone: '^\\d{6,12}$'
- }
- },
- methods: {
- blurHandle: function(event) { // 失去焦点校验
- var el = event.currentTarget;
- verifyHandle(el);
- },
- postSuggestion: function () { // 账号登录
- var _self = this;
- var pass = verifyForm();
- if (this.btnLoading) {
- return false;
- }
- this.$nextTick(function () {
- if (!pass) {
- return false;
- }
- _self.btnLoading = true;
- var params = {
- suggestionTypeID: _self.suggestion.type,
- userID: _self.userId,
- title: _self.suggestion.title,
- content: _self.suggestion.content,
- linkMan: _self.suggestion.name,
- mobile: _self.suggestion.phone
- };
- console.log(JSON.stringify(params));
- $.post("/help/suggestion", params, function(res){
- alertInfo(res.msg);
- _self.btnLoading = false;
- });
- });
- }
- },
- mounted: function () {
- if(globalUserData){
- this.userId = globalUserData.userId;
- }
- }
- });
|