邪性 hace 3 años
padre
commit
4b47e20d94
Se han modificado 7 ficheros con 27 adiciones y 30 borrados
  1. 2 1
      app.js
  2. 1 0
      pages/addinput/addinput.js
  3. 0 1
      pages/detailed/detailed.js
  4. 5 3
      pages/pay/pay.js
  5. 2 2
      pages/pay/pay.wxml
  6. 11 12
      project.config.json
  7. 6 11
      project.private.config.json

+ 2 - 1
app.js

@@ -117,7 +117,8 @@ App({
     // 全局请求方法
     axios ({ url: _url = '', token: _token = true, method: _method = 'post', data: _data = {}, success: _success = () => { }, complete: _complete = () => { } }) {
       let globalurl = "http://192.168.2.45:8888", error = (data) => {
-        if (wx.hasOwnProprety("lxd") && wx.lxd.hasOwnProperty("Notify")) {
+        console.log(data)
+        if (wx.hasOwnProperty("lxd") && wx.lxd.hasOwnProperty("Notify")) {
           wx.lxd.Notify({
             message: data,
             icon: "warn-o"

+ 1 - 0
pages/addinput/addinput.js

@@ -94,6 +94,7 @@ Page({
       method: 'get',
       success (res) {
         let { data } = res.data, obj = {}, objs = [[], []];
+        if(data.length==0) return false;
         data.forEach((item, index) => {
           index == 0 ? keya = item.title : '';
           obj[item["title"]] = {};

+ 0 - 1
pages/detailed/detailed.js

@@ -19,7 +19,6 @@ Page({
       url: '/option/balance_log/',
       method: 'get',
       success (res) {
-        console.log(res)
         let { data } = res.data;
         datalist = [...datalist, ...data];
         that.currentPage++;

+ 5 - 3
pages/pay/pay.js

@@ -3,6 +3,7 @@ const app = getApp();
 const { axios } = app.globalData;
 Page({
   data: {
+    nick_name:'',
     loadding: false,//正在支付中 true
     disabled: false,//支付完毕 true
     message: '',//订单备注
@@ -19,9 +20,10 @@ Page({
       url: '/option/balance/',
       method: 'get',
       success (res) {
-        let { data } = res.data;
+        let { data } = res.data, result = data["balance"] * 1 > 0 ? ["1"] : [];
         that.setData({
-          ...data[0]
+          ...data[0],
+          result
         })
       }
     })
@@ -56,7 +58,6 @@ Page({
             appid, openid, notes, commodity, student, balance
           },
           success (res) {
-            console.log(res);
             that.setData({ loadding: true })
             let { data } = res.data;
             if (!data) {
@@ -124,6 +125,7 @@ Page({
       title: "支付", //标题
       bgc: false,//使用更改后的颜色;配合json使用
     })
+    this.setData({nick_name:app.globalData.user.nick_name})
     let { data } = options;
     if (!!data) {
       data = JSON.parse(data);

+ 2 - 2
pages/pay/pay.wxml

@@ -12,10 +12,10 @@
         </view>
       </view>
     </van-cell>
-    <!-- 商品清单 -->
+    <!-- 商品清单  -->
     <view class="pay-list">
       <van-cell value="{{shopdetail.name}}">
-        <view class="title" slot="title">老实人学生营养餐</view>
+        <view class="title" slot="title">{{nick_name}}</view>
       </van-cell>
       <view class="container" slot="title">
         <scroll-view scroll-x="true" class="scroll">

+ 11 - 12
project.config.json

@@ -1,7 +1,8 @@
 {
-  "description": "项目配置文件",
+  "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
   "packOptions": {
-    "ignore": []
+    "ignore": [],
+    "include": []
   },
   "setting": {
     "urlCheck": false,
@@ -36,22 +37,16 @@
     "packNpmManually": false,
     "packNpmRelationList": [],
     "minifyWXSS": true,
+    "disableUseStrict": false,
+    "minifyWXML": true,
     "showES6CompileOption": false,
-    "minifyWXML": true
+    "useCompilerPlugins": false,
+    "useStaticServer": true
   },
   "compileType": "miniprogram",
   "libVersion": "2.19.2",
   "appid": "wx0347990f2c6f574c",
   "projectname": "%E9%A4%90%E9%A5%AE%E9%A1%B9%E7%9B%AE",
-  "debugOptions": {
-    "hidedInDevtools": []
-  },
-  "scripts": {},
-  "staticServerOptions": {
-    "baseURL": "",
-    "servePath": ""
-  },
-  "isGameTourist": false,
   "condition": {
     "search": {
       "list": []
@@ -71,5 +66,9 @@
     "miniprogram": {
       "list": []
     }
+  },
+  "editorSetting": {
+    "tabIndent": "insertSpaces",
+    "tabSize": 2
   }
 }

+ 6 - 11
project.private.config.json

@@ -1,15 +1,8 @@
 {
-  "setting": {},
+  "setting": {
+    "compileHotReLoad": true
+  },
   "condition": {
-    "plugin": {
-      "list": []
-    },
-    "game": {
-      "list": []
-    },
-    "gamePlugin": {
-      "list": []
-    },
     "miniprogram": {
       "list": [
         {
@@ -86,5 +79,7 @@
         }
       ]
     }
-  }
+  },
+  "projectname": "school_meal_wxapp",
+  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
 }