Pārlūkot izejas kodu

添加跳转小程序页面

wangxl@jiinfo.cn 7 mēneši atpakaļ
vecāks
revīzija
4f2613b1cf

+ 2 - 1
app.json

@@ -49,7 +49,8 @@
     "pages/invitation/evidence/index",
     "pages/invitation/navigation/index",
     "pages/invitation/index/index",
-    "pages/invitation/verify/index"
+    "pages/invitation/verify/index",
+    "pages/guanyuan/openApplet/openApplet"
   ],
   "tabBar": {
     "color": "#D0D0D0",

+ 86 - 0
pages/guanyuan/openApplet/openApplet.js

@@ -0,0 +1,86 @@
+// pages/guanyuan/openApplet/openApplet.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    isShowPop: true
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    // this.wxNavigate()
+  },
+  hidePop () {
+    wx.navigateToMiniProgram({
+      appId: 'wx3e2bf8a906c9c911',
+      path: '/pages/index/index',
+      // appId: 'wx8ef47ca1972f03be',
+      // path: '/pages/activity/index',
+      extraData: {
+        foo: 'bar'
+      },
+      envVersion: 'release',
+      success(res) {
+        // 打开成功
+      }
+    })
+  },
+  goBack() {
+    wx.navigateBack({
+      delta: -2
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 3 - 0
pages/guanyuan/openApplet/openApplet.json

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

+ 15 - 0
pages/guanyuan/openApplet/openApplet.wxml

@@ -0,0 +1,15 @@
+<!--pages/guanyuan/openApplet/openApplet.wxml-->
+<!-- <text>pages/guanyuan/openApplet/openApplet.wxml</text> -->
+<!-- 弹框 -->
+<view wx:if="{{isShowPop}}" class="pop-box">
+    <view class="pop-inner">
+        <view>
+            <view class="pop-inner-text">
+                <view>是否前往灵境小程序</view>
+                <!-- <view>请点击下面的按钮“立即身份验证”</view> -->
+            </view>
+            <navigator bindtap="hidePop" url="/page/index/index" class="default-btn primary">立即跳转</navigator>
+        </view>
+        <view bindtap="goBack" class="pop-close"><image  class="img-full" src="https://resource.artouchstone.com/miniapp/artist/images/close.png"></image></view>
+    </view>
+</view>

+ 1 - 0
pages/guanyuan/openApplet/openApplet.wxss

@@ -0,0 +1 @@
+/* pages/guanyuan/openApplet/openApplet.wxss */

+ 2 - 1
pages/guanyuan/webview/webview.js

@@ -22,6 +22,8 @@ Page({
         if (options.src){
             this.setData({
                 src: options.src
+                // src: 'http://localhost:8080/shyaf-cloud'
+                // src: 'https://shyafsignup.jiinfo.cn/signup/'
             });
         }
         if (options.title){
@@ -30,7 +32,6 @@ Page({
             })
         }
     },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */