|
@@ -1,4 +1,4 @@
|
|
|
-import {getOfficialAccounts} from "../../api/home"
|
|
|
+import {whetherFollowGzh} from "../../api/home"
|
|
|
Page({
|
|
|
data: {
|
|
|
iconSize: [20, 30, 40, 50, 60, 70],
|
|
@@ -7,16 +7,27 @@ Page({
|
|
|
],
|
|
|
iconType: [
|
|
|
'success', 'success_no_circle', 'info', 'warn', 'waiting', 'cancel', 'download', 'search', 'clear'
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ showOfficial:true
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function (options) {
|
|
|
var app = getApp();
|
|
|
- console.log(app)
|
|
|
- getOfficialAccounts({}).then((res)=>{
|
|
|
- console.log(res)
|
|
|
+ whetherFollowGzh({
|
|
|
+ unionId:app.globalData.unionId,
|
|
|
+ stationId:app.globalData.stationId,
|
|
|
+ }).then((res)=>{
|
|
|
+ // res.retCode
|
|
|
+ //-5 无信息
|
|
|
+ //-4 没关注
|
|
|
+ // 0 关注了
|
|
|
+ if(res.retCode === 0 ){
|
|
|
+ this.setData({
|
|
|
+ showOfficial:false
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
})
|