mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-29 13:52:07 +00:00
feature add privacy policy for guide
This commit is contained in:
@@ -1,31 +1,12 @@
|
||||
|
||||
var m_Region = '';
|
||||
|
||||
function OnInit()
|
||||
{
|
||||
TranslatePage();
|
||||
|
||||
SendPrivacySelect();
|
||||
}
|
||||
|
||||
|
||||
function SendPrivacySelect()
|
||||
{
|
||||
let nVal="refuse";
|
||||
if( $('#ChoosePrivacy').is(':checked') )
|
||||
nVal="agree";
|
||||
|
||||
var tSend={};
|
||||
tSend['sequence_id']=Math.round(new Date() / 1000);
|
||||
tSend['command']="user_private_choice";
|
||||
tSend['data']={};
|
||||
tSend['data']['action']=nVal;
|
||||
|
||||
SendWXMessage( JSON.stringify(tSend) );
|
||||
}
|
||||
|
||||
|
||||
function GotoNextPage()
|
||||
{
|
||||
RequestProfile();
|
||||
RequestProfile();
|
||||
}
|
||||
|
||||
function RequestProfile()
|
||||
@@ -40,41 +21,72 @@ function RequestProfile()
|
||||
function HandleStudio( pVal )
|
||||
{
|
||||
let strCmd=pVal['command'];
|
||||
//alert(strCmd);
|
||||
|
||||
if(strCmd=='response_userguide_profile')
|
||||
{
|
||||
HandleModelInfo(pVal['response']);
|
||||
|
||||
if(pVal['response'] && pVal['response']['region']) {
|
||||
m_Region = pVal['response']['region'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function HandleModelInfo( pVal )
|
||||
{
|
||||
let Modellist=pVal["model"];
|
||||
let nModel=Modellist.length;
|
||||
|
||||
if(nModel==1)
|
||||
{
|
||||
// let pModel=Modellist[0];
|
||||
//
|
||||
// var tSend={};
|
||||
// tSend['sequence_id']=Math.round(new Date() / 1000);
|
||||
// tSend['command']="save_userguide_models";
|
||||
// tSend['data']={};
|
||||
//
|
||||
// let ModelName=pModel['model'];
|
||||
//
|
||||
// tSend['data'][ModelName]={};
|
||||
// tSend['data'][ModelName]['model']=pModel['model'];
|
||||
// tSend['data'][ModelName]['nozzle_diameter']=pModel['nozzle_diameter'];
|
||||
// tSend['data'][ModelName]['vendor']=pModel['vendor'];
|
||||
//
|
||||
// SendWXMessage( JSON.stringify(tSend) );
|
||||
|
||||
window.location.href="../22/index.html";
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
window.location.href="../21/index.html";
|
||||
}
|
||||
function GotoBackPage()
|
||||
{
|
||||
window.location.href="../11/index.html";
|
||||
}
|
||||
|
||||
|
||||
function GotoNextPage()
|
||||
{
|
||||
|
||||
SendPrivacyChoice("agree");
|
||||
|
||||
|
||||
window.location.href="../21/index.html";
|
||||
}
|
||||
|
||||
|
||||
function GotoSkipPage()
|
||||
{
|
||||
|
||||
SendPrivacyChoice("refuse");
|
||||
|
||||
|
||||
window.location.href="../21/index.html";
|
||||
}
|
||||
|
||||
|
||||
function SendPrivacyChoice(action)
|
||||
{
|
||||
var tSend={};
|
||||
tSend['sequence_id']=Math.round(new Date() / 1000);
|
||||
tSend['command']="user_private_choice";
|
||||
tSend['data']={};
|
||||
tSend['data']['action']=action; // "agree" 或 "refuse"
|
||||
|
||||
SendWXMessage( JSON.stringify(tSend) );
|
||||
}
|
||||
|
||||
|
||||
function OpenPrivacyPolicy()
|
||||
{
|
||||
var privacyUrl = "";
|
||||
|
||||
|
||||
if(m_Region === "China") {
|
||||
privacyUrl = "https://www.snapmaker.cn/privacy-policy.html";
|
||||
} else {
|
||||
privacyUrl = "https://www.snapmaker.com/privacy-policy";
|
||||
}
|
||||
|
||||
|
||||
var tSend={};
|
||||
tSend['sequence_id']=Math.round(new Date() / 1000);
|
||||
tSend['command']="common_openurl";
|
||||
tSend['url']=privacyUrl;
|
||||
tSend['local']=m_Region
|
||||
|
||||
SendWXMessage( JSON.stringify(tSend) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user