From 9af0b1771f32c27bd51f78532a582b41cbcdcdc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E4=BF=8A=E9=94=8B?= Date: Fri, 11 Nov 2022 16:31:22 +0800 Subject: [PATCH] 12 --- .../miniprogram/app.json | 15 +++ .../miniprogram/pages/index/index.js | 110 +++++++++--------- .../miniprogram/pages/index/index.wxml | 24 +++- .../miniprogram/pages/login/login.wxml | 21 +--- 4 files changed, 96 insertions(+), 74 deletions(-) diff --git a/scr/wechat-weapp-mapdemo-master/miniprogram/app.json b/scr/wechat-weapp-mapdemo-master/miniprogram/app.json index 1a48489..7e4763b 100644 --- a/scr/wechat-weapp-mapdemo-master/miniprogram/app.json +++ b/scr/wechat-weapp-mapdemo-master/miniprogram/app.json @@ -7,6 +7,21 @@ "pages/ModifyMap/ModifyMap", "pages/ModifyInformation/ModifyInformation", "pages/ManageAccount/ManageAccount", + "pages/index/index", + "pages/adduser/index", + "pages/addusers/index", + "pages/adduserssuccess/index", + "pages/delete/index", + "pages/deleteuser/index", + "pages/deleteusers/index", + "pages/deleteuserssuccess/index", + "pages/selectusers/index", + "pages/selectusers(ID)/index", + "pages/selectusers(college)/index", + "pages/selectuserss/index", + "pages/selectuserssuccess/index", + "pages/updateusers/index", + "pages/updateuserssuccess/index", "pages/index_hjf/index_hjf", "pages/index1/index1", "pages/adlogin/adlogin", diff --git a/scr/wechat-weapp-mapdemo-master/miniprogram/pages/index/index.js b/scr/wechat-weapp-mapdemo-master/miniprogram/pages/index/index.js index aadb4bd..7213097 100644 --- a/scr/wechat-weapp-mapdemo-master/miniprogram/pages/index/index.js +++ b/scr/wechat-weapp-mapdemo-master/miniprogram/pages/index/index.js @@ -1,66 +1,70 @@ // pages/index/index.js +//连接数据库 +const db = wx.cloud.database() Page({ - - /** - * 页面的初始数据 - */ data: { + loginOK: false + }, + //map + map() { + wx.navigateTo({ + url: '/pages/ModifyMap/ModifyMap', + }) + }, + //information + information() { + wx.navigateTo({ + url: '/pages/ModifyInformation/ModifyInformation', + }) + }, + //account + account() { + wx.navigateTo({ + url: '/pages/index/index' + }) + }, - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - - }, /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 + * 页面的初始数据 */ - onPullDownRefresh() { - }, - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { + //使用云函数 + //插入数据(增) + add:function(e){ + wx.navigateTo({ + url: '/pages/adduser/index', + }) }, - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } + //删除数据(删) + removeDataFn:function(){ + wx.navigateTo({ + url: '/pages/delete/index', + }) + }, + + + //查询数据(查) + searchDataNameFn:function(){ + wx.navigateTo({ + url: '/pages/selectusers/index', + }) + }, + + + //修改数据(改) + updateDataFn(){ + wx.navigateTo({ + url: '/pages/updateusers/index', + }) + }, + //返回 + getback:function(){ + wx.navigateBack({ + delta: 1, + }) + }, }) \ No newline at end of file diff --git a/scr/wechat-weapp-mapdemo-master/miniprogram/pages/index/index.wxml b/scr/wechat-weapp-mapdemo-master/miniprogram/pages/index/index.wxml index a7772aa..bf08593 100644 --- a/scr/wechat-weapp-mapdemo-master/miniprogram/pages/index/index.wxml +++ b/scr/wechat-weapp-mapdemo-master/miniprogram/pages/index/index.wxml @@ -1,2 +1,24 @@ -pages/index/index.wxml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scr/wechat-weapp-mapdemo-master/miniprogram/pages/login/login.wxml b/scr/wechat-weapp-mapdemo-master/miniprogram/pages/login/login.wxml index ef82efb..ac1b78f 100644 --- a/scr/wechat-weapp-mapdemo-master/miniprogram/pages/login/login.wxml +++ b/scr/wechat-weapp-mapdemo-master/miniprogram/pages/login/login.wxml @@ -1,23 +1,4 @@ - - +