wangsaitao 2 년 전
부모
커밋
3143979ba1
11개의 변경된 파일173개의 추가작업 그리고 0개의 파일을 삭제
  1. 31 0
      .eslintrc.js
  2. 2 0
      app.js
  3. 13 0
      app.json
  4. 10 0
      app.wxss
  5. 36 0
      pages/index/index.js
  6. 3 0
      pages/index/index.json
  7. 5 0
      pages/index/index.wxml
  8. 1 0
      pages/index/index.wxss
  9. 44 0
      project.config.json
  10. 21 0
      project.private.config.json
  11. 7 0
      sitemap.json

+ 31 - 0
.eslintrc.js

@@ -0,0 +1,31 @@
+/*
+ * Eslint config file
+ * Documentation: https://eslint.org/docs/user-guide/configuring/
+ * Install the Eslint extension before using this feature.
+ */
+module.exports = {
+  env: {
+    es6: true,
+    browser: true,
+    node: true,
+  },
+  ecmaFeatures: {
+    modules: true,
+  },
+  parserOptions: {
+    ecmaVersion: 2018,
+    sourceType: 'module',
+  },
+  globals: {
+    wx: true,
+    App: true,
+    Page: true,
+    getCurrentPages: true,
+    getApp: true,
+    Component: true,
+    requirePlugin: true,
+    requireMiniProgram: true,
+  },
+  // extends: 'eslint:recommended',
+  rules: {},
+}

+ 2 - 0
app.js

@@ -0,0 +1,2 @@
+// app.js
+App({})

+ 13 - 0
app.json

@@ -0,0 +1,13 @@
+{
+    "pages": [
+        "pages/index/index"
+    ],
+    "window": {
+        "backgroundTextStyle": "light",
+        "navigationBarBackgroundColor": "#fff",
+        "navigationBarTitleText": "大正陪护",
+        "navigationBarTextStyle": "black"
+    },
+    "style": "v2",
+    "sitemapLocation": "sitemap.json"
+}

+ 10 - 0
app.wxss

@@ -0,0 +1,10 @@
+/**app.wxss**/
+.container {
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: space-between;
+  padding: 200rpx 0;
+  box-sizing: border-box;
+} 

+ 36 - 0
pages/index/index.js

@@ -0,0 +1,36 @@
+// index.js
+Page({
+    data:{
+        src:"https://wy.dazhengyun.com/public/wap/ph?orgId="
+    },
+
+    onLoad:function(options){
+       this.getScene(options);
+        var orgId = wx.getStorageSync("orgId");
+        var orgId = orgId?orgId:3;
+        console.log(this.data.src+orgId);
+        this.setData({
+            'src':this.data.src+orgId
+        })
+    },
+    getScene(options){
+        if(options.hasOwnProperty('scene')){
+            const scene = decodeURIComponent(options.scene);
+            let ss = scene.split('_');
+            if(ss.length == 2){
+                wx.setStorageSync("orgId", ss[1]);
+            }else {
+                wx.showToast({
+                    title: '项目id不存在',
+                    icon: 'none',
+                    duration: 2000
+                });
+                return false;
+            }
+        }else {
+            wx.setStorageSync("orgId", 3);
+
+        }
+
+    },
+})

+ 3 - 0
pages/index/index.json

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

+ 5 - 0
pages/index/index.wxml

@@ -0,0 +1,5 @@
+<!--index.wxml-->
+<view class="container">
+  <web-view  src="{{src}}"></web-view>
+
+</view>

+ 1 - 0
pages/index/index.wxss

@@ -0,0 +1 @@
+/**index.wxss**/

+ 44 - 0
project.config.json

@@ -0,0 +1,44 @@
+{
+  "appid": "wxc320e33148800fb3",
+  "compileType": "miniprogram",
+  "libVersion": "2.30.2",
+  "packOptions": {
+    "ignore": [],
+    "include": []
+  },
+  "setting": {
+    "urlCheck": true,
+    "coverView": true,
+    "es6": true,
+    "postcss": true,
+    "lazyloadPlaceholderEnable": false,
+    "preloadBackgroundData": false,
+    "minified": true,
+    "autoAudits": false,
+    "uglifyFileName": false,
+    "uploadWithSourceMap": true,
+    "enhance": true,
+    "useMultiFrameRuntime": true,
+    "showShadowRootInWxmlPanel": true,
+    "packNpmManually": false,
+    "packNpmRelationList": [],
+    "minifyWXSS": true,
+    "useStaticServer": true,
+    "showES6CompileOption": false,
+    "checkInvalidKey": true,
+    "babelSetting": {
+      "ignore": [],
+      "disablePlugins": [],
+      "outputPath": ""
+    },
+    "disableUseStrict": false,
+    "useCompilerPlugins": false,
+    "minifyWXML": true
+  },
+  "condition": {},
+  "editorSetting": {
+    "tabIndent": "insertSpaces",
+    "tabSize": 2
+  },
+  "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
+}

+ 21 - 0
project.private.config.json

@@ -0,0 +1,21 @@
+{
+  "projectname": "%E5%A4%A7%E6%AD%A3%E9%99%AA%E6%8A%A4",
+  "setting": {
+    "compileHotReLoad": true,
+    "urlCheck": false
+  },
+  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+  "condition": {
+    "miniprogram": {
+      "list": [
+        {
+          "name": "",
+          "pathName": "pages/index/index",
+          "query": "scene=org_3",
+          "launchMode": "default",
+          "scene": null
+        }
+      ]
+    }
+  }
+}

+ 7 - 0
sitemap.json

@@ -0,0 +1,7 @@
+{
+    "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
+    "rules": [{
+    "action": "allow",
+    "page": "*"
+    }]
+}