我一方面有这个控制器试图回答一个字符串,如
返回exits.success({fileCreated:'some-url'});
public class MainActivity extends AppCompatActivity {
String webAdress ="https://www.google.com/";
WebView webView;
FrameLayout frameLayout;
ProgressBar progressBar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main); // Add this line
webView = (WebView) findViewById(R.id.webView);
...
}
}
另一方面,我已经注册了此页面:
module.exports = {
friendlyName: 'Get results',
description: 'Display results page.',
inputs: {
eventId: {
required: true,
type: 'string'
}
},
exits: {
success: {
responseType: 'view',
viewTemplatePath: 'pages/event/download-survey-results',
description: 'Display results',
},
},
fn: async function (inputs, exits) {
someAwsServiceCall(params, function(err, data){
return exits.success({ fileCreated: 'some-url' });
});
}
在console.log('fileCreated')上我不确定
我还有其他类似的控制器/页面,它们都接收到从控制器发送来的参数,我不明白为什么这个控制器/页面没有
更新
我意识到parasails.registerPage('download-survey-results', {
data: {
info: '',
},
beforeMount: function (){
_.extend(this, window.SAILS_LOCALS);
console.log(this);
console.log('fileCreated', this.fileCreated);
},
mounted: async function() {
},
computed: {
},
methods: {
},
});
是未定义的,所以我需要知道如何填充
如果我删除“ window.SAILS_LOCALS
”,则在前端我会收到带有正确值的“ viewTemplatePath
”参数