ソースを参照

Initial Commit

SZIIT2001010449 3 年 前
コミット
4ea8d26d04
11 ファイル変更335 行追加0 行削除
  1. 31 0
      .eslintrc.js
  2. 14 0
      .gitignore
  3. 14 0
      app.js
  4. 13 0
      app.json
  5. 10 0
      app.wxss
  6. 75 0
      pages/index/index.js
  7. 3 0
      pages/index/index.json
  8. 21 0
      pages/index/index.wxml
  9. 70 0
      pages/index/index.wxss
  10. 77 0
      project.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: {},
+}

+ 14 - 0
.gitignore

@@ -0,0 +1,14 @@
+# Windows
+[Dd]esktop.ini
+Thumbs.db
+$RECYCLE.BIN/
+
+# macOS
+.DS_Store
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+
+# Node.js
+node_modules/

+ 14 - 0
app.js

@@ -0,0 +1,14 @@
+// app.js
+App({
+    onLaunch:function(){
+        if(!wx.cloud){
+            console.error()
+        }else{
+            wx.cloud.init({
+                env:'creator-xcq6k',
+                traceUser:true,
+            })
+        }
+        this.globalData={}
+    }
+})

+ 13 - 0
app.json

@@ -0,0 +1,13 @@
+{
+    "pages": [
+        "pages/index/index"
+    ],
+    "window": {
+        "backgroundTextStyle": "light",
+        "navigationBarBackgroundColor": "#fff",
+        "navigationBarTitleText": "Weixin",
+        "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;
+} 

+ 75 - 0
pages/index/index.js

@@ -0,0 +1,75 @@
+// index.js
+Page({
+    /**
+    * 页面的初始数据
+    */
+    data: {
+    qrCode: "../../images/qr.png",
+    flag: "true",
+    imgToggle: "../../images/qrcode.png",
+    list: [
+        {
+            src: "../../images/rice.png",
+            text: "饭"
+            },
+            {
+            src: "../../images/noodles.png",
+            text: "面"
+            },
+            {
+            src: "../../images/congee.png",
+            text: "粥"
+            },
+            {
+            src: "../../images/drink.png",
+            text: "饮料"
+            }
+            ]
+            },
+            toggleLogin: function(){
+            this.setData({
+            flag: !this.data.flag
+            })
+            },
+            /**
+            * 生命周期函数--监听页面加载
+            */
+            onLoad: function (options) {
+            },
+            /**
+            * 生命周期函数--监听页面初次渲染完成
+            */
+            onReady: function () {
+            },
+            /**
+            * 生命周期函数--监听页面显示
+            */
+            onShow: function () {
+            },
+            /**
+            * 生命周期函数--监听页面隐藏
+            */
+            onHide: function () {
+            },
+            /**
+            * 生命周期函数--监听页面卸载
+            */
+            onUnload: function () {
+            },
+            /**
+            * 页面相关事件处理函数--监听用户下拉动作
+            */
+            onPullDownRefresh: function () {
+            },
+            /**
+            * 页面上拉触底事件的处理函数
+            */
+            onReachBottom: function () {
+            },
+            /**
+            * 用户点击右上角分享
+            */
+            onShareAppMessage: function () {
+            }
+           })
+                     

+ 3 - 0
pages/index/index.json

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

+ 21 - 0
pages/index/index.wxml

@@ -0,0 +1,21 @@
+<!--index.wxml-->
+<!-- 登录页 -->
+<view>
+ <view class="v1" wx:if="{{flag}}">
+ <view class="v2">
+ <!-- <image class="img1" src=""></image> -->
+ <input type="text" placeholder="请输入用户名/手机"/>
+ <input type="password" placeholder="请输入密码"/>
+ <view class="v3">
+ <text>注册</text>
+ <text class="text2">找回密码</text>
+ </view>
+ <button class="button">登录</button>
+ <button class="button" bindtap="toggleLogin">二维码登录</button>
+ </view>
+ </view>
+ <view class="v4" wx:else>
+  <!-- <image class="qr" src="{{qrCode}}"></image> -->
+ <button class="button" bindtap="toggleLogin">账号密码登录</button>
+ </view>
+</view>

+ 70 - 0
pages/index/index.wxss

@@ -0,0 +1,70 @@
+/**index.wxss**/
+/* pages/test/test.wxss */
+.v1{
+    width: 100%;
+    display: flex;
+    flex-flow: column wrap;
+    justify-content: space-around;
+    align-items: center;
+   }
+   .v2{
+    margin-top: 25%;
+    display: flex;
+    flex-flow: column wrap;
+    justify-content: space-around;
+    box-sizing: border-box;
+    border: 1px solid #ccc;
+    background-color: white;
+    align-items: center;
+    padding: 20px 40px 20px 40px;
+   }
+   .img1{
+    width: 45px;
+    height: 45px;
+    padding: 10px;
+    align-items: center;
+   }
+   input{
+    width: 100%;
+    height: 20%;
+    border: 1px solid #ccc;
+    margin: 5px 10px 10px;
+    border-radius: 5px;
+    font-size: 18rpx;
+    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
+   }
+   .v3{
+    display: flex;
+    flex-flow: row wrap;
+    justify-content: space-between;
+}
+text{
+ /* justify-content: space-between; */
+ font-size: 20px;
+ font-weight: 300px;
+ color: skyblue;
+}
+.text2{
+ margin-left: 100px;
+ font-size: 20rpx;
+ font-weight: 300px;
+ color: skyblue;
+}
+.button{
+ width: 30%;
+ height: 5%;
+ font-size: 12px;
+ color: white;
+ background-color: deepskyblue;
+ margin: 5px 5px;
+}
+.qr{
+ width: 200px;
+ height: 200px;
+}
+.v4{
+ margin-top: 25%;
+ display: flex;
+ flex-flow: row wrap;
+ justify-content: space-around;
+}

+ 77 - 0
project.config.json

@@ -0,0 +1,77 @@
+{
+    "description": "项目配置文件",
+    "packOptions": {
+        "ignore": []
+    },
+    "setting": {
+        "urlCheck": true,
+        "es6": true,
+        "enhance": true,
+        "postcss": true,
+        "preloadBackgroundData": false,
+        "minified": true,
+        "newFeature": false,
+        "coverView": true,
+        "nodeModules": false,
+        "autoAudits": false,
+        "showShadowRootInWxmlPanel": true,
+        "scopeDataCheck": false,
+        "uglifyFileName": false,
+        "checkInvalidKey": true,
+        "checkSiteMap": true,
+        "uploadWithSourceMap": true,
+        "compileHotReLoad": true,
+        "lazyloadPlaceholderEnable": false,
+        "useMultiFrameRuntime": true,
+        "useApiHook": true,
+        "useApiHostProcess": true,
+        "babelSetting": {
+            "ignore": [],
+            "disablePlugins": [],
+            "outputPath": ""
+        },
+        "useIsolateContext": false,
+        "userConfirmedBundleSwitch": false,
+        "packNpmManually": false,
+        "packNpmRelationList": [],
+        "minifyWXSS": true,
+        "disableUseStrict": false,
+        "minifyWXML": true,
+        "showES6CompileOption": false,
+        "useCompilerPlugins": false,
+        "ignoreUploadUnusedFiles": true
+    },
+    "compileType": "miniprogram",
+    "libVersion": "2.21.3",
+    "appid": "touristappid",
+    "projectname": "weiyong",
+    "debugOptions": {
+        "hidedInDevtools": []
+    },
+    "scripts": {},
+    "staticServerOptions": {
+        "baseURL": "",
+        "servePath": ""
+    },
+    "isGameTourist": false,
+    "condition": {
+        "search": {
+            "list": []
+        },
+        "conversation": {
+            "list": []
+        },
+        "game": {
+            "list": []
+        },
+        "plugin": {
+            "list": []
+        },
+        "gamePlugin": {
+            "list": []
+        },
+        "miniprogram": {
+            "list": []
+        }
+    }
+}

+ 7 - 0
sitemap.json

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