web/bundles/topxiaadmin/js/controller/operation/mobile.js

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

 define(function(require, exports, module) {

    var Notify = require('common/bootstrap-notify');
    var WebUploader = require('edusoho.webuploader');
    require('es-ckeditor');

    exports.run = function() {

        var $form = $("#mobile-form");

        var uploader1 = new WebUploader({
          element: '#mobile-banner1-upload'
        });

        uploader1.on('uploadSuccess', function(file, response ) {
          var url = $("#mobile-banner1-upload").data('url');
          $.post(url, response, function (data) {
            var responseData = $.parseJSON(data);
            $("#mobile-banner1-container").html('<img src="' + responseData.url + '">');
            $form.find('[name=banner1]').val(responseData.path);
            $("#mobile-banner1-remove").show();
            $form.find('div[role="banner1-setting"]').show();
            Notify.success(Translator.trans('admin.operation.upload_carousel_one_success_hint'));
          });

        });

        $("[data-role='selectBannerCourse']").find('[data-role="selectCourse"]').click(function(){
            $('[data-status="active"]').attr("data-status", "none");
            $(this).attr("data-status","active");
        });


        $("input[role='bannerClick1']").on('click', function(){
            if($(this).val()==1) {
                $("#bannerUrl1").show();
                $("#selectBannerCourse1").hide();
            }else if($(this).val()==2){
                $("#selectBannerCourse1").show();
                $("#bannerUrl1").hide();
            }else{
                $("#bannerUrl1").hide();
                $("#selectBannerCourse1").hide();
            }
        })


        $("input[role='bannerClick2']").on('click', function(){
            if($(this).val()==1) {
                $("#bannerUrl2").show();
                $("#selectBannerCourse2").hide();
            }else if($(this).val()==2){
                $("#selectBannerCourse2").show();
                $("#bannerUrl2").hide();
            }else{
                $("#bannerUrl2").hide();
                $("#selectBannerCourse2").hide();
            }
        })

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。