We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab28aff commit 71c2f1dCopy full SHA for 71c2f1d
src/components/MainPage/FriendUrl.vue
@@ -141,7 +141,10 @@
141
},
142
//初始化友链列表
143
GetFriendUrlList:function () {
144
- var That = this;
+ var That = this,
145
+ mvpUrl = [],//记录有标记的数据
146
+ newArray;
147
+
148
this.SQFrontAjax({
149
Url:'/api/FriendUrlRead/foreend',
150
UploadData:{
@@ -151,8 +154,17 @@
151
154
}
152
155
153
156
Success:function (data) {
157
+ for(let i=0;i<data.length;i++){
158
+ if(data[i].order){
159
+ mvpUrl[data[i].order] = data[i];//根据数据order字段组成一个数组
160
+ data.splice(i,1);
161
+ }
162
163
164
+ newArray = mvpUrl.concat(data); //得到一个将有标记的值提前了的数组
165
166
That.FriendUrlPlaceholder = false;
- That.FriendsUrlList = data;
167
+ That.FriendsUrlList = newArray;
168
169
});
170
0 commit comments