I am making a Mini Program who gives the corresponding result according to the name entered by the user. He has changed the user"s name into a number. How can I display the corresponding data in wxml? Does
need wx:for and wx:if to be used together?
array:
human: [{goods: "candlelight"},
{ goods: ""},
{ goods: ""},
{goods: ""},
{goods: ""},
{goods: ""},
{goods: ""},
{goods: ""},
{goods: ""},
{goods: ""},
{goods: ""},]
:
//seed
Math.seed = this.data.words;
Math.seededRandom = function(max, min) {
max = max || 0;
min = min || 10;
Math.seed = (Math.seed * 9301 + 49297) % 233280;
var rnd = Math.seed / 233280.0;
return min + rnd * (max - min);
};
for (var i = 0; i < 10; iPP) {
console.log(Math.seededRandom());
}
//last
this.setData({
last: Math.seededRandom()
});
//lastss
this.setData({
ss: parseInt(this.data.last)
});
sswxml