浏览代码

添加绑定公众号界面

xiaohaizhao 2 年之前
父节点
当前提交
9992b9f690

+ 2 - 1
app.json

@@ -25,7 +25,8 @@
         "pages/group/select",
         "pages/tags/index",
         "pages/tabbar/workbench/index",
-        "pages/mediaLibrary/index"
+        "pages/mediaLibrary/index",
+        "pages/tabbar/mine/webView"
     ],
     "subpackages": [
         {

+ 6 - 1
pages/tabbar/mine/index.js

@@ -155,5 +155,10 @@ Page({
             }
         })
     },
-    onShareAppMessage() {}
+    /* 前去查询 */
+    bindingOfficialAccounts() {
+      wx.navigateTo({
+        url: './webView',
+      })
+    }
 })

+ 11 - 0
pages/tabbar/mine/index.wxml

@@ -50,6 +50,17 @@
             </view>
         </view>
     </navigator>
+    <navigator class="item" url="#" bindtap="bindingOfficialAccounts">
+        <view class="con">
+            <view class="label">
+                <text class="iconfont icon-a-wodebangdingweixin" style="color: var(--success);" />
+                消息通知
+            </view>
+            <view class="item-right">
+                <van-icon size='30rpx' name="arrow" />
+            </view>
+        </view>
+    </navigator>
 </My_card>
 <view style="width: 100vw;text-align: center;margin-top: 200rpx;">
     <van-button custom-class='out-login' color="#CCC" bindtap="outLogin" plain>退出登录</van-button>

+ 11 - 0
pages/tabbar/mine/webView.js

@@ -0,0 +1,11 @@
+Page({
+    data: {
+
+    },
+    onLoad(options) {
+        this.setData({
+            url: `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxfe6432513507d553&redirect_uri=http://oms.idcgroup.com.cn/wechattool/index.html&response_type=code&scope=snsapi_base&state=${JSON.stringify({accesstoken:wx.getStorageSync('userMsg').token,
+            "systemclient": "wservice"})}#wechat_redirect`
+        })
+    },
+})

+ 3 - 0
pages/tabbar/mine/webView.json

@@ -0,0 +1,3 @@
+{
+    "usingComponents": {}
+}

+ 0 - 0
pages/tabbar/mine/webView.scss


+ 1 - 0
pages/tabbar/mine/webView.wxml

@@ -0,0 +1 @@
+<web-view src="{{url}}"/>

+ 2 - 2
utils/Http.js

@@ -1,6 +1,6 @@
-// const baseUrl = "http://61.164.207.46:8000/yos/rest/index";
+const baseUrl = "http://61.164.207.46:8000/yos/rest/index";
 // const baseUrl = "http://192.168.3.13:8080/yos/rest/index";
-const baseUrl = "https://oms.idcgroup.com.cn:8079/yos/rest/index";
+// const baseUrl = "https://oms.idcgroup.com.cn:8079/yos/rest/index";
 
 let count = null;
 class HTTP {