Home > front end >  Brothers, let h5 and small programs with uniapp drop-down refresh can be false data, how to implemen
Brothers, let h5 and small programs with uniapp drop-down refresh can be false data, how to implemen

Time:12-03

<script>
Export the default {
Data () {
Return {
Title: 'Hello',
Info: [{
Img: Image1

}, {
Img: Image2
}, {
Img: Image3
},
Current: 0,
Mode: 'round',
IconfontArr: [
{
url:"../EmpireSupermarket EmpireSupermarket,
"Title: "empire" supermarket,
Icon: "iconPath icon - shangcheng"
},
{
url:"../contactUs/contactUs,
"Title: "contact us",
Icon: "iconPath icon - guanjiaowangtubiao10"
},
{
url:"../CommunityPictures CommunityPictures,
"Title: "community image,"
Icon: "iconPath icon - tupian"
},
{
url:"../LearningVideo LearningVideo,
"Title: "learning video,"
Icon: "iconPath icon - shipin"
},
],
FooterContentArr: [
{
Footer_imgUrl: "../../static/15. PNG,
"Price_true: RMB 3999,
Price_flase: RMB 6320,
Title: "HUAWEI HUAWEI P30 Pro super sensitive leica four 10 times taken mixed zoom kirin 980 chip + 256 gb aurora color screen in the fingerprint 8 gb netcom version of double 4 g phones"
},
{
Footer_imgUrl: "../../static/16. PNG,
"Price_true: RMB 3350,
Price_flase: RMB 5780,
Title: "[super hot style] HUAWEI HUAWEI P30 super sensitive leica three perturbation kirin 980 ai smart chip full screen version of the mobile phone screen in fingerprint 8 gb + 128 gb of sky netcom double 4 g phones"
},
{
Footer_imgUrl: "../../static/17. PNG,
"Price_true: RMB 7590,
Price_flase: RMB 9999,
Title: "HUAWEI HUAWEI P40 Pro + kirin 990 5 g SoC chip 100 times 50 million super perception leica five taken binocular zoom 8 gb + 256 gb black ceramic whole netcom 5 g"
}
]
}
},
OnLoad () {

},
OnPullDownRefresh () {
//the window. The location. Reload ();
//this. $router. Go (0);
//this. Info=[];
SetTimeout (function () {
Uni. StopPullDownRefresh ()
}, 2000)
},

}
</script>

CodePudding user response:

Use uniapp APP development, want to accomplish the drop-down refresh and drop-down load, need in the first pages. Open the drop-down in the json refresh

Found in the pages. The json need to open the page. Input in style
"EnablePullDownRefresh" : true,

After open the drop-down refresh, pull down the corresponding page will appear the drop-down animation, but the animation will not automatically shut down, so manually closing

OnPullDownRefresh () {
//close to refresh the animation
SetTimeout (function () {
Uni. StopPullDownRefresh ()
}, 1000)
},

CodePudding user response:

Animation is no problem is data refresh window.//not used location. Reload (); And//this. $router. Go (0); But the program does not recognise the sorrow to die