Commit 11d64810 by mingyuan

supor docker

parent 13590ba2
import * as dd from 'dingtalk-jsapi'
module Dingtalk
class BaseController < ApplicationController
end
end
module Dingtalk
class HomeController < ApplicationController
def index
end
end
end
<div id="dingding">test1</div>
<script>
alert('sss')
</script>
import * as dd from 'dingtalk-jsapi'
alert('dddd')
dd.ready(() => {
dd.runtime.permission.requestAuthCode({
corpId: 'ding9f5ed2cec249700e35c2f4657eb6378f',
onSuccess(info) {
const div = document.getElementById('dingding')
div.innerText = info.code
console.log(info)
alert(info.code)
}
})
dd.device.notification.alert({
message: "测试",
title: "提示",//可传空
buttonName: "收到",
onSuccess : function() {
//onSuccess将在点击button之后回调
/*回调*/
},
onFail : function(err) {}
})
})
<!DOCTYPE html>
<html lang="<%= I18n.locale %>">
<head>
<% if content_for?(:title) %>
<title><%= yield(:title) %></title>
<% else %>
<title><%= current_title %></title>
<% end %>
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
<meta name="turbo-cache-control" content="no-preview">
<%= stylesheet_vite_tag 'phone', media: 'all', 'data-turbo-track': 'reload' %>
<%= css_load suffix: 'phone', media: 'all', 'data-turbo-track': 'reload' %>
<%= javascript_vite_tag 'phone', 'data-turbo-track': 'reload' %>
<%= js_load suffix: 'phone', 'data-turbo-track': 'reload' %>
<% if content_for?(:wechat_js) %>
<%= yield(:wechat_js) %>
<% end %>
<%= csrf_meta_tags %>
<%= action_cable_meta_tag %>
<%= csp_meta_tag %>
</head>
<body>
<%= yield %>
</body>
</html>
...@@ -4,6 +4,10 @@ Rails.application.routes.draw do ...@@ -4,6 +4,10 @@ Rails.application.routes.draw do
namespace :admin, defaults: { namespace: 'admin' } do namespace :admin, defaults: { namespace: 'admin' } do
resources :apps resources :apps
end end
controller :home do
get :index
end
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment