Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun
commit
ae29f70a14
@ -1,7 +1,10 @@
|
||||
class Wechats::JsSdkSignaturesController < ApplicationController
|
||||
def create
|
||||
signature = Util::Wechat.js_sdk_signature(params[:url], params[:noncestr], params[:timestamp])
|
||||
render_ok(signature: signature)
|
||||
timestamp = (Time.now.to_f * 1000).to_i
|
||||
noncestr = ('A'..'z').to_a.sample(8).join
|
||||
signature = Util::Wechat.js_sdk_signature(params[:url], noncestr, timestamp)
|
||||
|
||||
render_ok(appid: Util::Wechat.appid, timestamp: timestamp, noncestr: noncestr, signature: signature)
|
||||
rescue Util::Wechat::Error => ex
|
||||
render_error(ex.message)
|
||||
end
|
||||
|
@ -1,3 +1,6 @@
|
||||
export function isDev() {
|
||||
return window.location.port === "3007";
|
||||
}
|
||||
|
||||
// const isMobile
|
||||
export const isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
|
Loading…
Reference in new issue