diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/consumption/consumption.wxml b/packageB/consumption/consumption.wxml new file mode 100644 index 0000000..5b86f89 --- /dev/null +++ b/packageB/consumption/consumption.wxml @@ -0,0 +1,2 @@ + +用气分析 diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/consumption/consumption.wxml b/packageB/consumption/consumption.wxml new file mode 100644 index 0000000..5b86f89 --- /dev/null +++ b/packageB/consumption/consumption.wxml @@ -0,0 +1,2 @@ + +用气分析 diff --git a/packageB/consumption/consumption.wxss b/packageB/consumption/consumption.wxss new file mode 100644 index 0000000..08fa592 --- /dev/null +++ b/packageB/consumption/consumption.wxss @@ -0,0 +1,4 @@ +/* packageB/consumption/consumption.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} \ No newline at end of file diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/consumption/consumption.wxml b/packageB/consumption/consumption.wxml new file mode 100644 index 0000000..5b86f89 --- /dev/null +++ b/packageB/consumption/consumption.wxml @@ -0,0 +1,2 @@ + +用气分析 diff --git a/packageB/consumption/consumption.wxss b/packageB/consumption/consumption.wxss new file mode 100644 index 0000000..08fa592 --- /dev/null +++ b/packageB/consumption/consumption.wxss @@ -0,0 +1,4 @@ +/* packageB/consumption/consumption.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} \ No newline at end of file diff --git a/packageB/historical/historical.js b/packageB/historical/historical.js new file mode 100644 index 0000000..5eebf3f --- /dev/null +++ b/packageB/historical/historical.js @@ -0,0 +1,66 @@ +// packageB/historical/historical.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + historicaList:[{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/consumption/consumption.wxml b/packageB/consumption/consumption.wxml new file mode 100644 index 0000000..5b86f89 --- /dev/null +++ b/packageB/consumption/consumption.wxml @@ -0,0 +1,2 @@ + +用气分析 diff --git a/packageB/consumption/consumption.wxss b/packageB/consumption/consumption.wxss new file mode 100644 index 0000000..08fa592 --- /dev/null +++ b/packageB/consumption/consumption.wxss @@ -0,0 +1,4 @@ +/* packageB/consumption/consumption.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} \ No newline at end of file diff --git a/packageB/historical/historical.js b/packageB/historical/historical.js new file mode 100644 index 0000000..5eebf3f --- /dev/null +++ b/packageB/historical/historical.js @@ -0,0 +1,66 @@ +// packageB/historical/historical.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + historicaList:[{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/historical/historical.json b/packageB/historical/historical.json new file mode 100644 index 0000000..4186ec6 --- /dev/null +++ b/packageB/historical/historical.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "历史账单", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/consumption/consumption.wxml b/packageB/consumption/consumption.wxml new file mode 100644 index 0000000..5b86f89 --- /dev/null +++ b/packageB/consumption/consumption.wxml @@ -0,0 +1,2 @@ + +用气分析 diff --git a/packageB/consumption/consumption.wxss b/packageB/consumption/consumption.wxss new file mode 100644 index 0000000..08fa592 --- /dev/null +++ b/packageB/consumption/consumption.wxss @@ -0,0 +1,4 @@ +/* packageB/consumption/consumption.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} \ No newline at end of file diff --git a/packageB/historical/historical.js b/packageB/historical/historical.js new file mode 100644 index 0000000..5eebf3f --- /dev/null +++ b/packageB/historical/historical.js @@ -0,0 +1,66 @@ +// packageB/historical/historical.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + historicaList:[{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/historical/historical.json b/packageB/historical/historical.json new file mode 100644 index 0000000..4186ec6 --- /dev/null +++ b/packageB/historical/historical.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "历史账单", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/historical/historical.wxml b/packageB/historical/historical.wxml new file mode 100644 index 0000000..00bc5aa --- /dev/null +++ b/packageB/historical/historical.wxml @@ -0,0 +1,25 @@ + + + + + + + + + +缴费记录 + + 缴费日期 + 充值金额 + + + {{item.name}} + {{item.num}} + + + diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/consumption/consumption.wxml b/packageB/consumption/consumption.wxml new file mode 100644 index 0000000..5b86f89 --- /dev/null +++ b/packageB/consumption/consumption.wxml @@ -0,0 +1,2 @@ + +用气分析 diff --git a/packageB/consumption/consumption.wxss b/packageB/consumption/consumption.wxss new file mode 100644 index 0000000..08fa592 --- /dev/null +++ b/packageB/consumption/consumption.wxss @@ -0,0 +1,4 @@ +/* packageB/consumption/consumption.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} \ No newline at end of file diff --git a/packageB/historical/historical.js b/packageB/historical/historical.js new file mode 100644 index 0000000..5eebf3f --- /dev/null +++ b/packageB/historical/historical.js @@ -0,0 +1,66 @@ +// packageB/historical/historical.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + historicaList:[{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/historical/historical.json b/packageB/historical/historical.json new file mode 100644 index 0000000..4186ec6 --- /dev/null +++ b/packageB/historical/historical.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "历史账单", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/historical/historical.wxml b/packageB/historical/historical.wxml new file mode 100644 index 0000000..00bc5aa --- /dev/null +++ b/packageB/historical/historical.wxml @@ -0,0 +1,25 @@ + + + + + + + + + +缴费记录 + + 缴费日期 + 充值金额 + + + {{item.name}} + {{item.num}} + + + diff --git a/packageB/historical/historical.wxss b/packageB/historical/historical.wxss new file mode 100644 index 0000000..4a12a61 --- /dev/null +++ b/packageB/historical/historical.wxss @@ -0,0 +1,48 @@ +/* packageB/historical/historical.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.historical-top{ + padding: 50rpx; +} +.historical-top-box{ + display: flex; + align-items: center; + width: 100%; + height: 240rpx; + border: #000 2rpx solid; + border-radius: 20rpx; +} +.id-img{ + width: 200rpx; + height: 80rpx; + margin-left: 30rpx; + margin-bottom: 40rpx; + border-radius: 10rpx; +} + +.user-info{ + margin-left: 34rpx; + margin-top: 18rpx; +} +.user-info view { + margin-bottom: 10rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + padding: 26rpx; + padding-left: 80rpx; + border-top: solid 2rpx #eee; + border-bottom: solid 2rpx #eee; +} + +.table-tr{ + display: flex; + justify-content: space-around; + padding: 35rpx; + border-bottom: solid 2rpx #eee; +} + + diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/consumption/consumption.wxml b/packageB/consumption/consumption.wxml new file mode 100644 index 0000000..5b86f89 --- /dev/null +++ b/packageB/consumption/consumption.wxml @@ -0,0 +1,2 @@ + +用气分析 diff --git a/packageB/consumption/consumption.wxss b/packageB/consumption/consumption.wxss new file mode 100644 index 0000000..08fa592 --- /dev/null +++ b/packageB/consumption/consumption.wxss @@ -0,0 +1,4 @@ +/* packageB/consumption/consumption.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} \ No newline at end of file diff --git a/packageB/historical/historical.js b/packageB/historical/historical.js new file mode 100644 index 0000000..5eebf3f --- /dev/null +++ b/packageB/historical/historical.js @@ -0,0 +1,66 @@ +// packageB/historical/historical.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + historicaList:[{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/historical/historical.json b/packageB/historical/historical.json new file mode 100644 index 0000000..4186ec6 --- /dev/null +++ b/packageB/historical/historical.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "历史账单", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/historical/historical.wxml b/packageB/historical/historical.wxml new file mode 100644 index 0000000..00bc5aa --- /dev/null +++ b/packageB/historical/historical.wxml @@ -0,0 +1,25 @@ + + + + + + + + + +缴费记录 + + 缴费日期 + 充值金额 + + + {{item.name}} + {{item.num}} + + + diff --git a/packageB/historical/historical.wxss b/packageB/historical/historical.wxss new file mode 100644 index 0000000..4a12a61 --- /dev/null +++ b/packageB/historical/historical.wxss @@ -0,0 +1,48 @@ +/* packageB/historical/historical.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.historical-top{ + padding: 50rpx; +} +.historical-top-box{ + display: flex; + align-items: center; + width: 100%; + height: 240rpx; + border: #000 2rpx solid; + border-radius: 20rpx; +} +.id-img{ + width: 200rpx; + height: 80rpx; + margin-left: 30rpx; + margin-bottom: 40rpx; + border-radius: 10rpx; +} + +.user-info{ + margin-left: 34rpx; + margin-top: 18rpx; +} +.user-info view { + margin-bottom: 10rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + padding: 26rpx; + padding-left: 80rpx; + border-top: solid 2rpx #eee; + border-bottom: solid 2rpx #eee; +} + +.table-tr{ + display: flex; + justify-content: space-around; + padding: 35rpx; + border-bottom: solid 2rpx #eee; +} + + diff --git a/packageB/serviceNetwork/serviceNetwork.js b/packageB/serviceNetwork/serviceNetwork.js new file mode 100644 index 0000000..351ee5a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.js @@ -0,0 +1,78 @@ +// packageB/serviceNetwork/serviceNetwork.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + value:'', + option1: [ + { text: '全部商品', value: 0 }, + { text: '新款商品', value: 1 }, + { text: '活动商品', value: 2 }, + ], + option2: [ + { text: '默认排序', value: 'a' }, + { text: '好评排序', value: 'b' }, + { text: '销量排序', value: 'c' }, + ], + value1: 0, + value2: 'b', + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/consumption/consumption.wxml b/packageB/consumption/consumption.wxml new file mode 100644 index 0000000..5b86f89 --- /dev/null +++ b/packageB/consumption/consumption.wxml @@ -0,0 +1,2 @@ + +用气分析 diff --git a/packageB/consumption/consumption.wxss b/packageB/consumption/consumption.wxss new file mode 100644 index 0000000..08fa592 --- /dev/null +++ b/packageB/consumption/consumption.wxss @@ -0,0 +1,4 @@ +/* packageB/consumption/consumption.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} \ No newline at end of file diff --git a/packageB/historical/historical.js b/packageB/historical/historical.js new file mode 100644 index 0000000..5eebf3f --- /dev/null +++ b/packageB/historical/historical.js @@ -0,0 +1,66 @@ +// packageB/historical/historical.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + historicaList:[{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/historical/historical.json b/packageB/historical/historical.json new file mode 100644 index 0000000..4186ec6 --- /dev/null +++ b/packageB/historical/historical.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "历史账单", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/historical/historical.wxml b/packageB/historical/historical.wxml new file mode 100644 index 0000000..00bc5aa --- /dev/null +++ b/packageB/historical/historical.wxml @@ -0,0 +1,25 @@ + + + + + + + + + +缴费记录 + + 缴费日期 + 充值金额 + + + {{item.name}} + {{item.num}} + + + diff --git a/packageB/historical/historical.wxss b/packageB/historical/historical.wxss new file mode 100644 index 0000000..4a12a61 --- /dev/null +++ b/packageB/historical/historical.wxss @@ -0,0 +1,48 @@ +/* packageB/historical/historical.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.historical-top{ + padding: 50rpx; +} +.historical-top-box{ + display: flex; + align-items: center; + width: 100%; + height: 240rpx; + border: #000 2rpx solid; + border-radius: 20rpx; +} +.id-img{ + width: 200rpx; + height: 80rpx; + margin-left: 30rpx; + margin-bottom: 40rpx; + border-radius: 10rpx; +} + +.user-info{ + margin-left: 34rpx; + margin-top: 18rpx; +} +.user-info view { + margin-bottom: 10rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + padding: 26rpx; + padding-left: 80rpx; + border-top: solid 2rpx #eee; + border-bottom: solid 2rpx #eee; +} + +.table-tr{ + display: flex; + justify-content: space-around; + padding: 35rpx; + border-bottom: solid 2rpx #eee; +} + + diff --git a/packageB/serviceNetwork/serviceNetwork.js b/packageB/serviceNetwork/serviceNetwork.js new file mode 100644 index 0000000..351ee5a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.js @@ -0,0 +1,78 @@ +// packageB/serviceNetwork/serviceNetwork.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + value:'', + option1: [ + { text: '全部商品', value: 0 }, + { text: '新款商品', value: 1 }, + { text: '活动商品', value: 2 }, + ], + option2: [ + { text: '默认排序', value: 'a' }, + { text: '好评排序', value: 'b' }, + { text: '销量排序', value: 'c' }, + ], + value1: 0, + value2: 'b', + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.json b/packageB/serviceNetwork/serviceNetwork.json new file mode 100644 index 0000000..85c4d0a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "van-search":"../../miniprogram_npm/@vant/weapp/search/index", + "van-dropdown-menu":"../../miniprogram_npm/@vant/weapp/dropdown-menu/index", + "van-dropdown-item":"../../miniprogram_npm/@vant/weapp/dropdown-item/index", + "van-button":"../../miniprogram_npm/@vant/weapp/button/index" + }, + "navigationBarTitleText": "服务网点", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/consumption/consumption.wxml b/packageB/consumption/consumption.wxml new file mode 100644 index 0000000..5b86f89 --- /dev/null +++ b/packageB/consumption/consumption.wxml @@ -0,0 +1,2 @@ + +用气分析 diff --git a/packageB/consumption/consumption.wxss b/packageB/consumption/consumption.wxss new file mode 100644 index 0000000..08fa592 --- /dev/null +++ b/packageB/consumption/consumption.wxss @@ -0,0 +1,4 @@ +/* packageB/consumption/consumption.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} \ No newline at end of file diff --git a/packageB/historical/historical.js b/packageB/historical/historical.js new file mode 100644 index 0000000..5eebf3f --- /dev/null +++ b/packageB/historical/historical.js @@ -0,0 +1,66 @@ +// packageB/historical/historical.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + historicaList:[{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/historical/historical.json b/packageB/historical/historical.json new file mode 100644 index 0000000..4186ec6 --- /dev/null +++ b/packageB/historical/historical.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "历史账单", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/historical/historical.wxml b/packageB/historical/historical.wxml new file mode 100644 index 0000000..00bc5aa --- /dev/null +++ b/packageB/historical/historical.wxml @@ -0,0 +1,25 @@ + + + + + + + + + +缴费记录 + + 缴费日期 + 充值金额 + + + {{item.name}} + {{item.num}} + + + diff --git a/packageB/historical/historical.wxss b/packageB/historical/historical.wxss new file mode 100644 index 0000000..4a12a61 --- /dev/null +++ b/packageB/historical/historical.wxss @@ -0,0 +1,48 @@ +/* packageB/historical/historical.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.historical-top{ + padding: 50rpx; +} +.historical-top-box{ + display: flex; + align-items: center; + width: 100%; + height: 240rpx; + border: #000 2rpx solid; + border-radius: 20rpx; +} +.id-img{ + width: 200rpx; + height: 80rpx; + margin-left: 30rpx; + margin-bottom: 40rpx; + border-radius: 10rpx; +} + +.user-info{ + margin-left: 34rpx; + margin-top: 18rpx; +} +.user-info view { + margin-bottom: 10rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + padding: 26rpx; + padding-left: 80rpx; + border-top: solid 2rpx #eee; + border-bottom: solid 2rpx #eee; +} + +.table-tr{ + display: flex; + justify-content: space-around; + padding: 35rpx; + border-bottom: solid 2rpx #eee; +} + + diff --git a/packageB/serviceNetwork/serviceNetwork.js b/packageB/serviceNetwork/serviceNetwork.js new file mode 100644 index 0000000..351ee5a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.js @@ -0,0 +1,78 @@ +// packageB/serviceNetwork/serviceNetwork.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + value:'', + option1: [ + { text: '全部商品', value: 0 }, + { text: '新款商品', value: 1 }, + { text: '活动商品', value: 2 }, + ], + option2: [ + { text: '默认排序', value: 'a' }, + { text: '好评排序', value: 'b' }, + { text: '销量排序', value: 'c' }, + ], + value1: 0, + value2: 'b', + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.json b/packageB/serviceNetwork/serviceNetwork.json new file mode 100644 index 0000000..85c4d0a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "van-search":"../../miniprogram_npm/@vant/weapp/search/index", + "van-dropdown-menu":"../../miniprogram_npm/@vant/weapp/dropdown-menu/index", + "van-dropdown-item":"../../miniprogram_npm/@vant/weapp/dropdown-item/index", + "van-button":"../../miniprogram_npm/@vant/weapp/button/index" + }, + "navigationBarTitleText": "服务网点", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.wxml b/packageB/serviceNetwork/serviceNetwork.wxml new file mode 100644 index 0000000..82b1b9b --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxml @@ -0,0 +1,26 @@ + + + + + + + + + + + 服务中心 + + + +10km + + + +营业时间:24小时 +联系方式:010-96777 + + + + 默认按钮 + + diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/consumption/consumption.wxml b/packageB/consumption/consumption.wxml new file mode 100644 index 0000000..5b86f89 --- /dev/null +++ b/packageB/consumption/consumption.wxml @@ -0,0 +1,2 @@ + +用气分析 diff --git a/packageB/consumption/consumption.wxss b/packageB/consumption/consumption.wxss new file mode 100644 index 0000000..08fa592 --- /dev/null +++ b/packageB/consumption/consumption.wxss @@ -0,0 +1,4 @@ +/* packageB/consumption/consumption.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} \ No newline at end of file diff --git a/packageB/historical/historical.js b/packageB/historical/historical.js new file mode 100644 index 0000000..5eebf3f --- /dev/null +++ b/packageB/historical/historical.js @@ -0,0 +1,66 @@ +// packageB/historical/historical.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + historicaList:[{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/historical/historical.json b/packageB/historical/historical.json new file mode 100644 index 0000000..4186ec6 --- /dev/null +++ b/packageB/historical/historical.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "历史账单", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/historical/historical.wxml b/packageB/historical/historical.wxml new file mode 100644 index 0000000..00bc5aa --- /dev/null +++ b/packageB/historical/historical.wxml @@ -0,0 +1,25 @@ + + + + + + + + + +缴费记录 + + 缴费日期 + 充值金额 + + + {{item.name}} + {{item.num}} + + + diff --git a/packageB/historical/historical.wxss b/packageB/historical/historical.wxss new file mode 100644 index 0000000..4a12a61 --- /dev/null +++ b/packageB/historical/historical.wxss @@ -0,0 +1,48 @@ +/* packageB/historical/historical.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.historical-top{ + padding: 50rpx; +} +.historical-top-box{ + display: flex; + align-items: center; + width: 100%; + height: 240rpx; + border: #000 2rpx solid; + border-radius: 20rpx; +} +.id-img{ + width: 200rpx; + height: 80rpx; + margin-left: 30rpx; + margin-bottom: 40rpx; + border-radius: 10rpx; +} + +.user-info{ + margin-left: 34rpx; + margin-top: 18rpx; +} +.user-info view { + margin-bottom: 10rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + padding: 26rpx; + padding-left: 80rpx; + border-top: solid 2rpx #eee; + border-bottom: solid 2rpx #eee; +} + +.table-tr{ + display: flex; + justify-content: space-around; + padding: 35rpx; + border-bottom: solid 2rpx #eee; +} + + diff --git a/packageB/serviceNetwork/serviceNetwork.js b/packageB/serviceNetwork/serviceNetwork.js new file mode 100644 index 0000000..351ee5a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.js @@ -0,0 +1,78 @@ +// packageB/serviceNetwork/serviceNetwork.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + value:'', + option1: [ + { text: '全部商品', value: 0 }, + { text: '新款商品', value: 1 }, + { text: '活动商品', value: 2 }, + ], + option2: [ + { text: '默认排序', value: 'a' }, + { text: '好评排序', value: 'b' }, + { text: '销量排序', value: 'c' }, + ], + value1: 0, + value2: 'b', + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.json b/packageB/serviceNetwork/serviceNetwork.json new file mode 100644 index 0000000..85c4d0a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "van-search":"../../miniprogram_npm/@vant/weapp/search/index", + "van-dropdown-menu":"../../miniprogram_npm/@vant/weapp/dropdown-menu/index", + "van-dropdown-item":"../../miniprogram_npm/@vant/weapp/dropdown-item/index", + "van-button":"../../miniprogram_npm/@vant/weapp/button/index" + }, + "navigationBarTitleText": "服务网点", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.wxml b/packageB/serviceNetwork/serviceNetwork.wxml new file mode 100644 index 0000000..82b1b9b --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxml @@ -0,0 +1,26 @@ + + + + + + + + + + + 服务中心 + + + +10km + + + +营业时间:24小时 +联系方式:010-96777 + + + + 默认按钮 + + diff --git a/packageB/serviceNetwork/serviceNetwork.wxss b/packageB/serviceNetwork/serviceNetwork.wxss new file mode 100644 index 0000000..7c2c4cb --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxss @@ -0,0 +1,35 @@ +/* packageB/serviceNetwork/serviceNetwork.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} + +.serviceNetwork{ + margin: 20rpx; + padding: 20rpx; + border: solid 2rpx #000; + border-radius: 15rpx; +} +.title{ + margin-left: 10rpx; +} +.center{ + margin: 20rpx 0; +} +.content-top{ + display: flex; + margin: 20rpx 0; +} +.content-km{ + padding: 10rpx; + padding-right: 40rpx; + margin-right: 40rpx; + border-right: solid 2rpx #000; +} +.content-bottom{ + padding-bottom: 20rpx; + border-bottom: solid 2rpx #000; +} +.bottom{ + display: flex; + justify-content: center; +} \ No newline at end of file diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/consumption/consumption.wxml b/packageB/consumption/consumption.wxml new file mode 100644 index 0000000..5b86f89 --- /dev/null +++ b/packageB/consumption/consumption.wxml @@ -0,0 +1,2 @@ + +用气分析 diff --git a/packageB/consumption/consumption.wxss b/packageB/consumption/consumption.wxss new file mode 100644 index 0000000..08fa592 --- /dev/null +++ b/packageB/consumption/consumption.wxss @@ -0,0 +1,4 @@ +/* packageB/consumption/consumption.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} \ No newline at end of file diff --git a/packageB/historical/historical.js b/packageB/historical/historical.js new file mode 100644 index 0000000..5eebf3f --- /dev/null +++ b/packageB/historical/historical.js @@ -0,0 +1,66 @@ +// packageB/historical/historical.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + historicaList:[{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/historical/historical.json b/packageB/historical/historical.json new file mode 100644 index 0000000..4186ec6 --- /dev/null +++ b/packageB/historical/historical.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "历史账单", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/historical/historical.wxml b/packageB/historical/historical.wxml new file mode 100644 index 0000000..00bc5aa --- /dev/null +++ b/packageB/historical/historical.wxml @@ -0,0 +1,25 @@ + + + + + + + + + +缴费记录 + + 缴费日期 + 充值金额 + + + {{item.name}} + {{item.num}} + + + diff --git a/packageB/historical/historical.wxss b/packageB/historical/historical.wxss new file mode 100644 index 0000000..4a12a61 --- /dev/null +++ b/packageB/historical/historical.wxss @@ -0,0 +1,48 @@ +/* packageB/historical/historical.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.historical-top{ + padding: 50rpx; +} +.historical-top-box{ + display: flex; + align-items: center; + width: 100%; + height: 240rpx; + border: #000 2rpx solid; + border-radius: 20rpx; +} +.id-img{ + width: 200rpx; + height: 80rpx; + margin-left: 30rpx; + margin-bottom: 40rpx; + border-radius: 10rpx; +} + +.user-info{ + margin-left: 34rpx; + margin-top: 18rpx; +} +.user-info view { + margin-bottom: 10rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + padding: 26rpx; + padding-left: 80rpx; + border-top: solid 2rpx #eee; + border-bottom: solid 2rpx #eee; +} + +.table-tr{ + display: flex; + justify-content: space-around; + padding: 35rpx; + border-bottom: solid 2rpx #eee; +} + + diff --git a/packageB/serviceNetwork/serviceNetwork.js b/packageB/serviceNetwork/serviceNetwork.js new file mode 100644 index 0000000..351ee5a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.js @@ -0,0 +1,78 @@ +// packageB/serviceNetwork/serviceNetwork.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + value:'', + option1: [ + { text: '全部商品', value: 0 }, + { text: '新款商品', value: 1 }, + { text: '活动商品', value: 2 }, + ], + option2: [ + { text: '默认排序', value: 'a' }, + { text: '好评排序', value: 'b' }, + { text: '销量排序', value: 'c' }, + ], + value1: 0, + value2: 'b', + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.json b/packageB/serviceNetwork/serviceNetwork.json new file mode 100644 index 0000000..85c4d0a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "van-search":"../../miniprogram_npm/@vant/weapp/search/index", + "van-dropdown-menu":"../../miniprogram_npm/@vant/weapp/dropdown-menu/index", + "van-dropdown-item":"../../miniprogram_npm/@vant/weapp/dropdown-item/index", + "van-button":"../../miniprogram_npm/@vant/weapp/button/index" + }, + "navigationBarTitleText": "服务网点", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.wxml b/packageB/serviceNetwork/serviceNetwork.wxml new file mode 100644 index 0000000..82b1b9b --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxml @@ -0,0 +1,26 @@ + + + + + + + + + + + 服务中心 + + + +10km + + + +营业时间:24小时 +联系方式:010-96777 + + + + 默认按钮 + + diff --git a/packageB/serviceNetwork/serviceNetwork.wxss b/packageB/serviceNetwork/serviceNetwork.wxss new file mode 100644 index 0000000..7c2c4cb --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxss @@ -0,0 +1,35 @@ +/* packageB/serviceNetwork/serviceNetwork.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} + +.serviceNetwork{ + margin: 20rpx; + padding: 20rpx; + border: solid 2rpx #000; + border-radius: 15rpx; +} +.title{ + margin-left: 10rpx; +} +.center{ + margin: 20rpx 0; +} +.content-top{ + display: flex; + margin: 20rpx 0; +} +.content-km{ + padding: 10rpx; + padding-right: 40rpx; + margin-right: 40rpx; + border-right: solid 2rpx #000; +} +.content-bottom{ + padding-bottom: 20rpx; + border-bottom: solid 2rpx #000; +} +.bottom{ + display: flex; + justify-content: center; +} \ No newline at end of file diff --git a/packageB/subsidy/subsidy.js b/packageB/subsidy/subsidy.js new file mode 100644 index 0000000..239557f --- /dev/null +++ b/packageB/subsidy/subsidy.js @@ -0,0 +1,66 @@ +// packageB/subsidy/subsidy.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + list:['',''] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/consumption/consumption.wxml b/packageB/consumption/consumption.wxml new file mode 100644 index 0000000..5b86f89 --- /dev/null +++ b/packageB/consumption/consumption.wxml @@ -0,0 +1,2 @@ + +用气分析 diff --git a/packageB/consumption/consumption.wxss b/packageB/consumption/consumption.wxss new file mode 100644 index 0000000..08fa592 --- /dev/null +++ b/packageB/consumption/consumption.wxss @@ -0,0 +1,4 @@ +/* packageB/consumption/consumption.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} \ No newline at end of file diff --git a/packageB/historical/historical.js b/packageB/historical/historical.js new file mode 100644 index 0000000..5eebf3f --- /dev/null +++ b/packageB/historical/historical.js @@ -0,0 +1,66 @@ +// packageB/historical/historical.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + historicaList:[{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/historical/historical.json b/packageB/historical/historical.json new file mode 100644 index 0000000..4186ec6 --- /dev/null +++ b/packageB/historical/historical.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "历史账单", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/historical/historical.wxml b/packageB/historical/historical.wxml new file mode 100644 index 0000000..00bc5aa --- /dev/null +++ b/packageB/historical/historical.wxml @@ -0,0 +1,25 @@ + + + + + + + + + +缴费记录 + + 缴费日期 + 充值金额 + + + {{item.name}} + {{item.num}} + + + diff --git a/packageB/historical/historical.wxss b/packageB/historical/historical.wxss new file mode 100644 index 0000000..4a12a61 --- /dev/null +++ b/packageB/historical/historical.wxss @@ -0,0 +1,48 @@ +/* packageB/historical/historical.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.historical-top{ + padding: 50rpx; +} +.historical-top-box{ + display: flex; + align-items: center; + width: 100%; + height: 240rpx; + border: #000 2rpx solid; + border-radius: 20rpx; +} +.id-img{ + width: 200rpx; + height: 80rpx; + margin-left: 30rpx; + margin-bottom: 40rpx; + border-radius: 10rpx; +} + +.user-info{ + margin-left: 34rpx; + margin-top: 18rpx; +} +.user-info view { + margin-bottom: 10rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + padding: 26rpx; + padding-left: 80rpx; + border-top: solid 2rpx #eee; + border-bottom: solid 2rpx #eee; +} + +.table-tr{ + display: flex; + justify-content: space-around; + padding: 35rpx; + border-bottom: solid 2rpx #eee; +} + + diff --git a/packageB/serviceNetwork/serviceNetwork.js b/packageB/serviceNetwork/serviceNetwork.js new file mode 100644 index 0000000..351ee5a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.js @@ -0,0 +1,78 @@ +// packageB/serviceNetwork/serviceNetwork.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + value:'', + option1: [ + { text: '全部商品', value: 0 }, + { text: '新款商品', value: 1 }, + { text: '活动商品', value: 2 }, + ], + option2: [ + { text: '默认排序', value: 'a' }, + { text: '好评排序', value: 'b' }, + { text: '销量排序', value: 'c' }, + ], + value1: 0, + value2: 'b', + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.json b/packageB/serviceNetwork/serviceNetwork.json new file mode 100644 index 0000000..85c4d0a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "van-search":"../../miniprogram_npm/@vant/weapp/search/index", + "van-dropdown-menu":"../../miniprogram_npm/@vant/weapp/dropdown-menu/index", + "van-dropdown-item":"../../miniprogram_npm/@vant/weapp/dropdown-item/index", + "van-button":"../../miniprogram_npm/@vant/weapp/button/index" + }, + "navigationBarTitleText": "服务网点", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.wxml b/packageB/serviceNetwork/serviceNetwork.wxml new file mode 100644 index 0000000..82b1b9b --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxml @@ -0,0 +1,26 @@ + + + + + + + + + + + 服务中心 + + + +10km + + + +营业时间:24小时 +联系方式:010-96777 + + + + 默认按钮 + + diff --git a/packageB/serviceNetwork/serviceNetwork.wxss b/packageB/serviceNetwork/serviceNetwork.wxss new file mode 100644 index 0000000..7c2c4cb --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxss @@ -0,0 +1,35 @@ +/* packageB/serviceNetwork/serviceNetwork.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} + +.serviceNetwork{ + margin: 20rpx; + padding: 20rpx; + border: solid 2rpx #000; + border-radius: 15rpx; +} +.title{ + margin-left: 10rpx; +} +.center{ + margin: 20rpx 0; +} +.content-top{ + display: flex; + margin: 20rpx 0; +} +.content-km{ + padding: 10rpx; + padding-right: 40rpx; + margin-right: 40rpx; + border-right: solid 2rpx #000; +} +.content-bottom{ + padding-bottom: 20rpx; + border-bottom: solid 2rpx #000; +} +.bottom{ + display: flex; + justify-content: center; +} \ No newline at end of file diff --git a/packageB/subsidy/subsidy.js b/packageB/subsidy/subsidy.js new file mode 100644 index 0000000..239557f --- /dev/null +++ b/packageB/subsidy/subsidy.js @@ -0,0 +1,66 @@ +// packageB/subsidy/subsidy.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + list:['',''] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/subsidy/subsidy.json b/packageB/subsidy/subsidy.json new file mode 100644 index 0000000..5177fb0 --- /dev/null +++ b/packageB/subsidy/subsidy.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "采暖补贴", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/consumption/consumption.wxml b/packageB/consumption/consumption.wxml new file mode 100644 index 0000000..5b86f89 --- /dev/null +++ b/packageB/consumption/consumption.wxml @@ -0,0 +1,2 @@ + +用气分析 diff --git a/packageB/consumption/consumption.wxss b/packageB/consumption/consumption.wxss new file mode 100644 index 0000000..08fa592 --- /dev/null +++ b/packageB/consumption/consumption.wxss @@ -0,0 +1,4 @@ +/* packageB/consumption/consumption.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} \ No newline at end of file diff --git a/packageB/historical/historical.js b/packageB/historical/historical.js new file mode 100644 index 0000000..5eebf3f --- /dev/null +++ b/packageB/historical/historical.js @@ -0,0 +1,66 @@ +// packageB/historical/historical.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + historicaList:[{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/historical/historical.json b/packageB/historical/historical.json new file mode 100644 index 0000000..4186ec6 --- /dev/null +++ b/packageB/historical/historical.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "历史账单", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/historical/historical.wxml b/packageB/historical/historical.wxml new file mode 100644 index 0000000..00bc5aa --- /dev/null +++ b/packageB/historical/historical.wxml @@ -0,0 +1,25 @@ + + + + + + + + + +缴费记录 + + 缴费日期 + 充值金额 + + + {{item.name}} + {{item.num}} + + + diff --git a/packageB/historical/historical.wxss b/packageB/historical/historical.wxss new file mode 100644 index 0000000..4a12a61 --- /dev/null +++ b/packageB/historical/historical.wxss @@ -0,0 +1,48 @@ +/* packageB/historical/historical.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.historical-top{ + padding: 50rpx; +} +.historical-top-box{ + display: flex; + align-items: center; + width: 100%; + height: 240rpx; + border: #000 2rpx solid; + border-radius: 20rpx; +} +.id-img{ + width: 200rpx; + height: 80rpx; + margin-left: 30rpx; + margin-bottom: 40rpx; + border-radius: 10rpx; +} + +.user-info{ + margin-left: 34rpx; + margin-top: 18rpx; +} +.user-info view { + margin-bottom: 10rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + padding: 26rpx; + padding-left: 80rpx; + border-top: solid 2rpx #eee; + border-bottom: solid 2rpx #eee; +} + +.table-tr{ + display: flex; + justify-content: space-around; + padding: 35rpx; + border-bottom: solid 2rpx #eee; +} + + diff --git a/packageB/serviceNetwork/serviceNetwork.js b/packageB/serviceNetwork/serviceNetwork.js new file mode 100644 index 0000000..351ee5a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.js @@ -0,0 +1,78 @@ +// packageB/serviceNetwork/serviceNetwork.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + value:'', + option1: [ + { text: '全部商品', value: 0 }, + { text: '新款商品', value: 1 }, + { text: '活动商品', value: 2 }, + ], + option2: [ + { text: '默认排序', value: 'a' }, + { text: '好评排序', value: 'b' }, + { text: '销量排序', value: 'c' }, + ], + value1: 0, + value2: 'b', + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.json b/packageB/serviceNetwork/serviceNetwork.json new file mode 100644 index 0000000..85c4d0a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "van-search":"../../miniprogram_npm/@vant/weapp/search/index", + "van-dropdown-menu":"../../miniprogram_npm/@vant/weapp/dropdown-menu/index", + "van-dropdown-item":"../../miniprogram_npm/@vant/weapp/dropdown-item/index", + "van-button":"../../miniprogram_npm/@vant/weapp/button/index" + }, + "navigationBarTitleText": "服务网点", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.wxml b/packageB/serviceNetwork/serviceNetwork.wxml new file mode 100644 index 0000000..82b1b9b --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxml @@ -0,0 +1,26 @@ + + + + + + + + + + + 服务中心 + + + +10km + + + +营业时间:24小时 +联系方式:010-96777 + + + + 默认按钮 + + diff --git a/packageB/serviceNetwork/serviceNetwork.wxss b/packageB/serviceNetwork/serviceNetwork.wxss new file mode 100644 index 0000000..7c2c4cb --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxss @@ -0,0 +1,35 @@ +/* packageB/serviceNetwork/serviceNetwork.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} + +.serviceNetwork{ + margin: 20rpx; + padding: 20rpx; + border: solid 2rpx #000; + border-radius: 15rpx; +} +.title{ + margin-left: 10rpx; +} +.center{ + margin: 20rpx 0; +} +.content-top{ + display: flex; + margin: 20rpx 0; +} +.content-km{ + padding: 10rpx; + padding-right: 40rpx; + margin-right: 40rpx; + border-right: solid 2rpx #000; +} +.content-bottom{ + padding-bottom: 20rpx; + border-bottom: solid 2rpx #000; +} +.bottom{ + display: flex; + justify-content: center; +} \ No newline at end of file diff --git a/packageB/subsidy/subsidy.js b/packageB/subsidy/subsidy.js new file mode 100644 index 0000000..239557f --- /dev/null +++ b/packageB/subsidy/subsidy.js @@ -0,0 +1,66 @@ +// packageB/subsidy/subsidy.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + list:['',''] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/subsidy/subsidy.json b/packageB/subsidy/subsidy.json new file mode 100644 index 0000000..5177fb0 --- /dev/null +++ b/packageB/subsidy/subsidy.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "采暖补贴", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/subsidy/subsidy.wxml b/packageB/subsidy/subsidy.wxml new file mode 100644 index 0000000..97c36a5 --- /dev/null +++ b/packageB/subsidy/subsidy.wxml @@ -0,0 +1,14 @@ + + + +补贴报数 +补贴查询及领取 + +补贴政策 + + +北京自采暖补贴二次报数开启 +****** + + + diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/consumption/consumption.wxml b/packageB/consumption/consumption.wxml new file mode 100644 index 0000000..5b86f89 --- /dev/null +++ b/packageB/consumption/consumption.wxml @@ -0,0 +1,2 @@ + +用气分析 diff --git a/packageB/consumption/consumption.wxss b/packageB/consumption/consumption.wxss new file mode 100644 index 0000000..08fa592 --- /dev/null +++ b/packageB/consumption/consumption.wxss @@ -0,0 +1,4 @@ +/* packageB/consumption/consumption.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} \ No newline at end of file diff --git a/packageB/historical/historical.js b/packageB/historical/historical.js new file mode 100644 index 0000000..5eebf3f --- /dev/null +++ b/packageB/historical/historical.js @@ -0,0 +1,66 @@ +// packageB/historical/historical.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + historicaList:[{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/historical/historical.json b/packageB/historical/historical.json new file mode 100644 index 0000000..4186ec6 --- /dev/null +++ b/packageB/historical/historical.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "历史账单", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/historical/historical.wxml b/packageB/historical/historical.wxml new file mode 100644 index 0000000..00bc5aa --- /dev/null +++ b/packageB/historical/historical.wxml @@ -0,0 +1,25 @@ + + + + + + + + + +缴费记录 + + 缴费日期 + 充值金额 + + + {{item.name}} + {{item.num}} + + + diff --git a/packageB/historical/historical.wxss b/packageB/historical/historical.wxss new file mode 100644 index 0000000..4a12a61 --- /dev/null +++ b/packageB/historical/historical.wxss @@ -0,0 +1,48 @@ +/* packageB/historical/historical.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.historical-top{ + padding: 50rpx; +} +.historical-top-box{ + display: flex; + align-items: center; + width: 100%; + height: 240rpx; + border: #000 2rpx solid; + border-radius: 20rpx; +} +.id-img{ + width: 200rpx; + height: 80rpx; + margin-left: 30rpx; + margin-bottom: 40rpx; + border-radius: 10rpx; +} + +.user-info{ + margin-left: 34rpx; + margin-top: 18rpx; +} +.user-info view { + margin-bottom: 10rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + padding: 26rpx; + padding-left: 80rpx; + border-top: solid 2rpx #eee; + border-bottom: solid 2rpx #eee; +} + +.table-tr{ + display: flex; + justify-content: space-around; + padding: 35rpx; + border-bottom: solid 2rpx #eee; +} + + diff --git a/packageB/serviceNetwork/serviceNetwork.js b/packageB/serviceNetwork/serviceNetwork.js new file mode 100644 index 0000000..351ee5a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.js @@ -0,0 +1,78 @@ +// packageB/serviceNetwork/serviceNetwork.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + value:'', + option1: [ + { text: '全部商品', value: 0 }, + { text: '新款商品', value: 1 }, + { text: '活动商品', value: 2 }, + ], + option2: [ + { text: '默认排序', value: 'a' }, + { text: '好评排序', value: 'b' }, + { text: '销量排序', value: 'c' }, + ], + value1: 0, + value2: 'b', + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.json b/packageB/serviceNetwork/serviceNetwork.json new file mode 100644 index 0000000..85c4d0a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "van-search":"../../miniprogram_npm/@vant/weapp/search/index", + "van-dropdown-menu":"../../miniprogram_npm/@vant/weapp/dropdown-menu/index", + "van-dropdown-item":"../../miniprogram_npm/@vant/weapp/dropdown-item/index", + "van-button":"../../miniprogram_npm/@vant/weapp/button/index" + }, + "navigationBarTitleText": "服务网点", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.wxml b/packageB/serviceNetwork/serviceNetwork.wxml new file mode 100644 index 0000000..82b1b9b --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxml @@ -0,0 +1,26 @@ + + + + + + + + + + + 服务中心 + + + +10km + + + +营业时间:24小时 +联系方式:010-96777 + + + + 默认按钮 + + diff --git a/packageB/serviceNetwork/serviceNetwork.wxss b/packageB/serviceNetwork/serviceNetwork.wxss new file mode 100644 index 0000000..7c2c4cb --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxss @@ -0,0 +1,35 @@ +/* packageB/serviceNetwork/serviceNetwork.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} + +.serviceNetwork{ + margin: 20rpx; + padding: 20rpx; + border: solid 2rpx #000; + border-radius: 15rpx; +} +.title{ + margin-left: 10rpx; +} +.center{ + margin: 20rpx 0; +} +.content-top{ + display: flex; + margin: 20rpx 0; +} +.content-km{ + padding: 10rpx; + padding-right: 40rpx; + margin-right: 40rpx; + border-right: solid 2rpx #000; +} +.content-bottom{ + padding-bottom: 20rpx; + border-bottom: solid 2rpx #000; +} +.bottom{ + display: flex; + justify-content: center; +} \ No newline at end of file diff --git a/packageB/subsidy/subsidy.js b/packageB/subsidy/subsidy.js new file mode 100644 index 0000000..239557f --- /dev/null +++ b/packageB/subsidy/subsidy.js @@ -0,0 +1,66 @@ +// packageB/subsidy/subsidy.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + list:['',''] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/subsidy/subsidy.json b/packageB/subsidy/subsidy.json new file mode 100644 index 0000000..5177fb0 --- /dev/null +++ b/packageB/subsidy/subsidy.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "采暖补贴", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/subsidy/subsidy.wxml b/packageB/subsidy/subsidy.wxml new file mode 100644 index 0000000..97c36a5 --- /dev/null +++ b/packageB/subsidy/subsidy.wxml @@ -0,0 +1,14 @@ + + + +补贴报数 +补贴查询及领取 + +补贴政策 + + +北京自采暖补贴二次报数开启 +****** + + + diff --git a/packageB/subsidy/subsidy.wxss b/packageB/subsidy/subsidy.wxss new file mode 100644 index 0000000..2588c6d --- /dev/null +++ b/packageB/subsidy/subsidy.wxss @@ -0,0 +1,40 @@ +/* packageB/subsidy/subsidy.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.subsidy-top{ + padding: 40rpx; + display: flex; +} +.top-number{ + width: 330rpx; + height: 200rpx; + border: 1px #000 solid; + text-align: center; + line-height: 200rpx; +} + +.top-draw{ + width: 330rpx; + height: 200rpx; + border: 1px #000 solid; + border-left: none; + text-align: center; + line-height: 200rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + margin: 20rpx 30rpx; +} + +.content-item{ + padding: 20rpx 130rpx; + border-bottom: 2rpx solid #eee; +} + +.content-item-top{ + font-weight: 500; + margin-bottom: 14rpx; +} \ No newline at end of file diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/consumption/consumption.wxml b/packageB/consumption/consumption.wxml new file mode 100644 index 0000000..5b86f89 --- /dev/null +++ b/packageB/consumption/consumption.wxml @@ -0,0 +1,2 @@ + +用气分析 diff --git a/packageB/consumption/consumption.wxss b/packageB/consumption/consumption.wxss new file mode 100644 index 0000000..08fa592 --- /dev/null +++ b/packageB/consumption/consumption.wxss @@ -0,0 +1,4 @@ +/* packageB/consumption/consumption.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} \ No newline at end of file diff --git a/packageB/historical/historical.js b/packageB/historical/historical.js new file mode 100644 index 0000000..5eebf3f --- /dev/null +++ b/packageB/historical/historical.js @@ -0,0 +1,66 @@ +// packageB/historical/historical.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + historicaList:[{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/historical/historical.json b/packageB/historical/historical.json new file mode 100644 index 0000000..4186ec6 --- /dev/null +++ b/packageB/historical/historical.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "历史账单", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/historical/historical.wxml b/packageB/historical/historical.wxml new file mode 100644 index 0000000..00bc5aa --- /dev/null +++ b/packageB/historical/historical.wxml @@ -0,0 +1,25 @@ + + + + + + + + + +缴费记录 + + 缴费日期 + 充值金额 + + + {{item.name}} + {{item.num}} + + + diff --git a/packageB/historical/historical.wxss b/packageB/historical/historical.wxss new file mode 100644 index 0000000..4a12a61 --- /dev/null +++ b/packageB/historical/historical.wxss @@ -0,0 +1,48 @@ +/* packageB/historical/historical.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.historical-top{ + padding: 50rpx; +} +.historical-top-box{ + display: flex; + align-items: center; + width: 100%; + height: 240rpx; + border: #000 2rpx solid; + border-radius: 20rpx; +} +.id-img{ + width: 200rpx; + height: 80rpx; + margin-left: 30rpx; + margin-bottom: 40rpx; + border-radius: 10rpx; +} + +.user-info{ + margin-left: 34rpx; + margin-top: 18rpx; +} +.user-info view { + margin-bottom: 10rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + padding: 26rpx; + padding-left: 80rpx; + border-top: solid 2rpx #eee; + border-bottom: solid 2rpx #eee; +} + +.table-tr{ + display: flex; + justify-content: space-around; + padding: 35rpx; + border-bottom: solid 2rpx #eee; +} + + diff --git a/packageB/serviceNetwork/serviceNetwork.js b/packageB/serviceNetwork/serviceNetwork.js new file mode 100644 index 0000000..351ee5a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.js @@ -0,0 +1,78 @@ +// packageB/serviceNetwork/serviceNetwork.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + value:'', + option1: [ + { text: '全部商品', value: 0 }, + { text: '新款商品', value: 1 }, + { text: '活动商品', value: 2 }, + ], + option2: [ + { text: '默认排序', value: 'a' }, + { text: '好评排序', value: 'b' }, + { text: '销量排序', value: 'c' }, + ], + value1: 0, + value2: 'b', + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.json b/packageB/serviceNetwork/serviceNetwork.json new file mode 100644 index 0000000..85c4d0a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "van-search":"../../miniprogram_npm/@vant/weapp/search/index", + "van-dropdown-menu":"../../miniprogram_npm/@vant/weapp/dropdown-menu/index", + "van-dropdown-item":"../../miniprogram_npm/@vant/weapp/dropdown-item/index", + "van-button":"../../miniprogram_npm/@vant/weapp/button/index" + }, + "navigationBarTitleText": "服务网点", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.wxml b/packageB/serviceNetwork/serviceNetwork.wxml new file mode 100644 index 0000000..82b1b9b --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxml @@ -0,0 +1,26 @@ + + + + + + + + + + + 服务中心 + + + +10km + + + +营业时间:24小时 +联系方式:010-96777 + + + + 默认按钮 + + diff --git a/packageB/serviceNetwork/serviceNetwork.wxss b/packageB/serviceNetwork/serviceNetwork.wxss new file mode 100644 index 0000000..7c2c4cb --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxss @@ -0,0 +1,35 @@ +/* packageB/serviceNetwork/serviceNetwork.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} + +.serviceNetwork{ + margin: 20rpx; + padding: 20rpx; + border: solid 2rpx #000; + border-radius: 15rpx; +} +.title{ + margin-left: 10rpx; +} +.center{ + margin: 20rpx 0; +} +.content-top{ + display: flex; + margin: 20rpx 0; +} +.content-km{ + padding: 10rpx; + padding-right: 40rpx; + margin-right: 40rpx; + border-right: solid 2rpx #000; +} +.content-bottom{ + padding-bottom: 20rpx; + border-bottom: solid 2rpx #000; +} +.bottom{ + display: flex; + justify-content: center; +} \ No newline at end of file diff --git a/packageB/subsidy/subsidy.js b/packageB/subsidy/subsidy.js new file mode 100644 index 0000000..239557f --- /dev/null +++ b/packageB/subsidy/subsidy.js @@ -0,0 +1,66 @@ +// packageB/subsidy/subsidy.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + list:['',''] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/subsidy/subsidy.json b/packageB/subsidy/subsidy.json new file mode 100644 index 0000000..5177fb0 --- /dev/null +++ b/packageB/subsidy/subsidy.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "采暖补贴", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/subsidy/subsidy.wxml b/packageB/subsidy/subsidy.wxml new file mode 100644 index 0000000..97c36a5 --- /dev/null +++ b/packageB/subsidy/subsidy.wxml @@ -0,0 +1,14 @@ + + + +补贴报数 +补贴查询及领取 + +补贴政策 + + +北京自采暖补贴二次报数开启 +****** + + + diff --git a/packageB/subsidy/subsidy.wxss b/packageB/subsidy/subsidy.wxss new file mode 100644 index 0000000..2588c6d --- /dev/null +++ b/packageB/subsidy/subsidy.wxss @@ -0,0 +1,40 @@ +/* packageB/subsidy/subsidy.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.subsidy-top{ + padding: 40rpx; + display: flex; +} +.top-number{ + width: 330rpx; + height: 200rpx; + border: 1px #000 solid; + text-align: center; + line-height: 200rpx; +} + +.top-draw{ + width: 330rpx; + height: 200rpx; + border: 1px #000 solid; + border-left: none; + text-align: center; + line-height: 200rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + margin: 20rpx 30rpx; +} + +.content-item{ + padding: 20rpx 130rpx; + border-bottom: 2rpx solid #eee; +} + +.content-item-top{ + font-weight: 500; + margin-bottom: 14rpx; +} \ No newline at end of file diff --git a/pages/guide/index.js b/pages/guide/index.js index bbd0135..e59f8bf 100644 --- a/pages/guide/index.js +++ b/pages/guide/index.js @@ -1,11 +1,10 @@ // pages/guide/index.js require('regenerator-runtime'); import { - request, login } from '../../utils/request'; import { judgeMyApi } from '../../utils/util/index' - +import {getBanner} from '../../utils/api/index' Page({ data: { isLogin: false, @@ -55,6 +54,9 @@ }, onLoad: async function (options) { await this.wxLogin(); + // const res = await getBanner({bannerName:'',bannerModule:''}) + // console.log(res) + this.setData({ isLogin: true }); @@ -134,6 +136,7 @@ phoneNumber: phone }) }, + //跳转页面 gotoUserManage(event) { const { dataset: { gopage } } = event.currentTarget; @@ -145,6 +148,22 @@ wx.navigateTo({ url: '/packageB/pay/pay', }) + }else if(gopage === 'history') { + wx.navigateTo({ + url: '/packageB/historical/historical', + }) + }else if(gopage === 'analyze') { + wx.navigateTo({ + url: '/packageB/consumption/consumption', + }) + }else if(gopage === 'place') { + wx.navigateTo({ + url: '/packageB/serviceNetwork/serviceNetwork', + }) + }else if(gopage === 'subsidy') { + wx.navigateTo({ + url: '/packageB/subsidy/subsidy', + }) } } }); \ No newline at end of file diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/consumption/consumption.wxml b/packageB/consumption/consumption.wxml new file mode 100644 index 0000000..5b86f89 --- /dev/null +++ b/packageB/consumption/consumption.wxml @@ -0,0 +1,2 @@ + +用气分析 diff --git a/packageB/consumption/consumption.wxss b/packageB/consumption/consumption.wxss new file mode 100644 index 0000000..08fa592 --- /dev/null +++ b/packageB/consumption/consumption.wxss @@ -0,0 +1,4 @@ +/* packageB/consumption/consumption.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} \ No newline at end of file diff --git a/packageB/historical/historical.js b/packageB/historical/historical.js new file mode 100644 index 0000000..5eebf3f --- /dev/null +++ b/packageB/historical/historical.js @@ -0,0 +1,66 @@ +// packageB/historical/historical.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + historicaList:[{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/historical/historical.json b/packageB/historical/historical.json new file mode 100644 index 0000000..4186ec6 --- /dev/null +++ b/packageB/historical/historical.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "历史账单", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/historical/historical.wxml b/packageB/historical/historical.wxml new file mode 100644 index 0000000..00bc5aa --- /dev/null +++ b/packageB/historical/historical.wxml @@ -0,0 +1,25 @@ + + + + + + + + + +缴费记录 + + 缴费日期 + 充值金额 + + + {{item.name}} + {{item.num}} + + + diff --git a/packageB/historical/historical.wxss b/packageB/historical/historical.wxss new file mode 100644 index 0000000..4a12a61 --- /dev/null +++ b/packageB/historical/historical.wxss @@ -0,0 +1,48 @@ +/* packageB/historical/historical.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.historical-top{ + padding: 50rpx; +} +.historical-top-box{ + display: flex; + align-items: center; + width: 100%; + height: 240rpx; + border: #000 2rpx solid; + border-radius: 20rpx; +} +.id-img{ + width: 200rpx; + height: 80rpx; + margin-left: 30rpx; + margin-bottom: 40rpx; + border-radius: 10rpx; +} + +.user-info{ + margin-left: 34rpx; + margin-top: 18rpx; +} +.user-info view { + margin-bottom: 10rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + padding: 26rpx; + padding-left: 80rpx; + border-top: solid 2rpx #eee; + border-bottom: solid 2rpx #eee; +} + +.table-tr{ + display: flex; + justify-content: space-around; + padding: 35rpx; + border-bottom: solid 2rpx #eee; +} + + diff --git a/packageB/serviceNetwork/serviceNetwork.js b/packageB/serviceNetwork/serviceNetwork.js new file mode 100644 index 0000000..351ee5a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.js @@ -0,0 +1,78 @@ +// packageB/serviceNetwork/serviceNetwork.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + value:'', + option1: [ + { text: '全部商品', value: 0 }, + { text: '新款商品', value: 1 }, + { text: '活动商品', value: 2 }, + ], + option2: [ + { text: '默认排序', value: 'a' }, + { text: '好评排序', value: 'b' }, + { text: '销量排序', value: 'c' }, + ], + value1: 0, + value2: 'b', + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.json b/packageB/serviceNetwork/serviceNetwork.json new file mode 100644 index 0000000..85c4d0a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "van-search":"../../miniprogram_npm/@vant/weapp/search/index", + "van-dropdown-menu":"../../miniprogram_npm/@vant/weapp/dropdown-menu/index", + "van-dropdown-item":"../../miniprogram_npm/@vant/weapp/dropdown-item/index", + "van-button":"../../miniprogram_npm/@vant/weapp/button/index" + }, + "navigationBarTitleText": "服务网点", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.wxml b/packageB/serviceNetwork/serviceNetwork.wxml new file mode 100644 index 0000000..82b1b9b --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxml @@ -0,0 +1,26 @@ + + + + + + + + + + + 服务中心 + + + +10km + + + +营业时间:24小时 +联系方式:010-96777 + + + + 默认按钮 + + diff --git a/packageB/serviceNetwork/serviceNetwork.wxss b/packageB/serviceNetwork/serviceNetwork.wxss new file mode 100644 index 0000000..7c2c4cb --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxss @@ -0,0 +1,35 @@ +/* packageB/serviceNetwork/serviceNetwork.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} + +.serviceNetwork{ + margin: 20rpx; + padding: 20rpx; + border: solid 2rpx #000; + border-radius: 15rpx; +} +.title{ + margin-left: 10rpx; +} +.center{ + margin: 20rpx 0; +} +.content-top{ + display: flex; + margin: 20rpx 0; +} +.content-km{ + padding: 10rpx; + padding-right: 40rpx; + margin-right: 40rpx; + border-right: solid 2rpx #000; +} +.content-bottom{ + padding-bottom: 20rpx; + border-bottom: solid 2rpx #000; +} +.bottom{ + display: flex; + justify-content: center; +} \ No newline at end of file diff --git a/packageB/subsidy/subsidy.js b/packageB/subsidy/subsidy.js new file mode 100644 index 0000000..239557f --- /dev/null +++ b/packageB/subsidy/subsidy.js @@ -0,0 +1,66 @@ +// packageB/subsidy/subsidy.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + list:['',''] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/subsidy/subsidy.json b/packageB/subsidy/subsidy.json new file mode 100644 index 0000000..5177fb0 --- /dev/null +++ b/packageB/subsidy/subsidy.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "采暖补贴", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/subsidy/subsidy.wxml b/packageB/subsidy/subsidy.wxml new file mode 100644 index 0000000..97c36a5 --- /dev/null +++ b/packageB/subsidy/subsidy.wxml @@ -0,0 +1,14 @@ + + + +补贴报数 +补贴查询及领取 + +补贴政策 + + +北京自采暖补贴二次报数开启 +****** + + + diff --git a/packageB/subsidy/subsidy.wxss b/packageB/subsidy/subsidy.wxss new file mode 100644 index 0000000..2588c6d --- /dev/null +++ b/packageB/subsidy/subsidy.wxss @@ -0,0 +1,40 @@ +/* packageB/subsidy/subsidy.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.subsidy-top{ + padding: 40rpx; + display: flex; +} +.top-number{ + width: 330rpx; + height: 200rpx; + border: 1px #000 solid; + text-align: center; + line-height: 200rpx; +} + +.top-draw{ + width: 330rpx; + height: 200rpx; + border: 1px #000 solid; + border-left: none; + text-align: center; + line-height: 200rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + margin: 20rpx 30rpx; +} + +.content-item{ + padding: 20rpx 130rpx; + border-bottom: 2rpx solid #eee; +} + +.content-item-top{ + font-weight: 500; + margin-bottom: 14rpx; +} \ No newline at end of file diff --git a/pages/guide/index.js b/pages/guide/index.js index bbd0135..e59f8bf 100644 --- a/pages/guide/index.js +++ b/pages/guide/index.js @@ -1,11 +1,10 @@ // pages/guide/index.js require('regenerator-runtime'); import { - request, login } from '../../utils/request'; import { judgeMyApi } from '../../utils/util/index' - +import {getBanner} from '../../utils/api/index' Page({ data: { isLogin: false, @@ -55,6 +54,9 @@ }, onLoad: async function (options) { await this.wxLogin(); + // const res = await getBanner({bannerName:'',bannerModule:''}) + // console.log(res) + this.setData({ isLogin: true }); @@ -134,6 +136,7 @@ phoneNumber: phone }) }, + //跳转页面 gotoUserManage(event) { const { dataset: { gopage } } = event.currentTarget; @@ -145,6 +148,22 @@ wx.navigateTo({ url: '/packageB/pay/pay', }) + }else if(gopage === 'history') { + wx.navigateTo({ + url: '/packageB/historical/historical', + }) + }else if(gopage === 'analyze') { + wx.navigateTo({ + url: '/packageB/consumption/consumption', + }) + }else if(gopage === 'place') { + wx.navigateTo({ + url: '/packageB/serviceNetwork/serviceNetwork', + }) + }else if(gopage === 'subsidy') { + wx.navigateTo({ + url: '/packageB/subsidy/subsidy', + }) } } }); \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index ced7205..37c2e7e 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -1,5 +1,5 @@ { - "projectname": "智慧厨房", + "projectname": "%E6%99%BA%E6%85%A7%E5%8E%A8%E6%88%BF", "setting": { "compileHotReLoad": true }, diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/consumption/consumption.wxml b/packageB/consumption/consumption.wxml new file mode 100644 index 0000000..5b86f89 --- /dev/null +++ b/packageB/consumption/consumption.wxml @@ -0,0 +1,2 @@ + +用气分析 diff --git a/packageB/consumption/consumption.wxss b/packageB/consumption/consumption.wxss new file mode 100644 index 0000000..08fa592 --- /dev/null +++ b/packageB/consumption/consumption.wxss @@ -0,0 +1,4 @@ +/* packageB/consumption/consumption.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} \ No newline at end of file diff --git a/packageB/historical/historical.js b/packageB/historical/historical.js new file mode 100644 index 0000000..5eebf3f --- /dev/null +++ b/packageB/historical/historical.js @@ -0,0 +1,66 @@ +// packageB/historical/historical.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + historicaList:[{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/historical/historical.json b/packageB/historical/historical.json new file mode 100644 index 0000000..4186ec6 --- /dev/null +++ b/packageB/historical/historical.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "历史账单", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/historical/historical.wxml b/packageB/historical/historical.wxml new file mode 100644 index 0000000..00bc5aa --- /dev/null +++ b/packageB/historical/historical.wxml @@ -0,0 +1,25 @@ + + + + + + + + + +缴费记录 + + 缴费日期 + 充值金额 + + + {{item.name}} + {{item.num}} + + + diff --git a/packageB/historical/historical.wxss b/packageB/historical/historical.wxss new file mode 100644 index 0000000..4a12a61 --- /dev/null +++ b/packageB/historical/historical.wxss @@ -0,0 +1,48 @@ +/* packageB/historical/historical.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.historical-top{ + padding: 50rpx; +} +.historical-top-box{ + display: flex; + align-items: center; + width: 100%; + height: 240rpx; + border: #000 2rpx solid; + border-radius: 20rpx; +} +.id-img{ + width: 200rpx; + height: 80rpx; + margin-left: 30rpx; + margin-bottom: 40rpx; + border-radius: 10rpx; +} + +.user-info{ + margin-left: 34rpx; + margin-top: 18rpx; +} +.user-info view { + margin-bottom: 10rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + padding: 26rpx; + padding-left: 80rpx; + border-top: solid 2rpx #eee; + border-bottom: solid 2rpx #eee; +} + +.table-tr{ + display: flex; + justify-content: space-around; + padding: 35rpx; + border-bottom: solid 2rpx #eee; +} + + diff --git a/packageB/serviceNetwork/serviceNetwork.js b/packageB/serviceNetwork/serviceNetwork.js new file mode 100644 index 0000000..351ee5a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.js @@ -0,0 +1,78 @@ +// packageB/serviceNetwork/serviceNetwork.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + value:'', + option1: [ + { text: '全部商品', value: 0 }, + { text: '新款商品', value: 1 }, + { text: '活动商品', value: 2 }, + ], + option2: [ + { text: '默认排序', value: 'a' }, + { text: '好评排序', value: 'b' }, + { text: '销量排序', value: 'c' }, + ], + value1: 0, + value2: 'b', + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.json b/packageB/serviceNetwork/serviceNetwork.json new file mode 100644 index 0000000..85c4d0a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "van-search":"../../miniprogram_npm/@vant/weapp/search/index", + "van-dropdown-menu":"../../miniprogram_npm/@vant/weapp/dropdown-menu/index", + "van-dropdown-item":"../../miniprogram_npm/@vant/weapp/dropdown-item/index", + "van-button":"../../miniprogram_npm/@vant/weapp/button/index" + }, + "navigationBarTitleText": "服务网点", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.wxml b/packageB/serviceNetwork/serviceNetwork.wxml new file mode 100644 index 0000000..82b1b9b --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxml @@ -0,0 +1,26 @@ + + + + + + + + + + + 服务中心 + + + +10km + + + +营业时间:24小时 +联系方式:010-96777 + + + + 默认按钮 + + diff --git a/packageB/serviceNetwork/serviceNetwork.wxss b/packageB/serviceNetwork/serviceNetwork.wxss new file mode 100644 index 0000000..7c2c4cb --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxss @@ -0,0 +1,35 @@ +/* packageB/serviceNetwork/serviceNetwork.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} + +.serviceNetwork{ + margin: 20rpx; + padding: 20rpx; + border: solid 2rpx #000; + border-radius: 15rpx; +} +.title{ + margin-left: 10rpx; +} +.center{ + margin: 20rpx 0; +} +.content-top{ + display: flex; + margin: 20rpx 0; +} +.content-km{ + padding: 10rpx; + padding-right: 40rpx; + margin-right: 40rpx; + border-right: solid 2rpx #000; +} +.content-bottom{ + padding-bottom: 20rpx; + border-bottom: solid 2rpx #000; +} +.bottom{ + display: flex; + justify-content: center; +} \ No newline at end of file diff --git a/packageB/subsidy/subsidy.js b/packageB/subsidy/subsidy.js new file mode 100644 index 0000000..239557f --- /dev/null +++ b/packageB/subsidy/subsidy.js @@ -0,0 +1,66 @@ +// packageB/subsidy/subsidy.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + list:['',''] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/subsidy/subsidy.json b/packageB/subsidy/subsidy.json new file mode 100644 index 0000000..5177fb0 --- /dev/null +++ b/packageB/subsidy/subsidy.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "采暖补贴", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/subsidy/subsidy.wxml b/packageB/subsidy/subsidy.wxml new file mode 100644 index 0000000..97c36a5 --- /dev/null +++ b/packageB/subsidy/subsidy.wxml @@ -0,0 +1,14 @@ + + + +补贴报数 +补贴查询及领取 + +补贴政策 + + +北京自采暖补贴二次报数开启 +****** + + + diff --git a/packageB/subsidy/subsidy.wxss b/packageB/subsidy/subsidy.wxss new file mode 100644 index 0000000..2588c6d --- /dev/null +++ b/packageB/subsidy/subsidy.wxss @@ -0,0 +1,40 @@ +/* packageB/subsidy/subsidy.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.subsidy-top{ + padding: 40rpx; + display: flex; +} +.top-number{ + width: 330rpx; + height: 200rpx; + border: 1px #000 solid; + text-align: center; + line-height: 200rpx; +} + +.top-draw{ + width: 330rpx; + height: 200rpx; + border: 1px #000 solid; + border-left: none; + text-align: center; + line-height: 200rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + margin: 20rpx 30rpx; +} + +.content-item{ + padding: 20rpx 130rpx; + border-bottom: 2rpx solid #eee; +} + +.content-item-top{ + font-weight: 500; + margin-bottom: 14rpx; +} \ No newline at end of file diff --git a/pages/guide/index.js b/pages/guide/index.js index bbd0135..e59f8bf 100644 --- a/pages/guide/index.js +++ b/pages/guide/index.js @@ -1,11 +1,10 @@ // pages/guide/index.js require('regenerator-runtime'); import { - request, login } from '../../utils/request'; import { judgeMyApi } from '../../utils/util/index' - +import {getBanner} from '../../utils/api/index' Page({ data: { isLogin: false, @@ -55,6 +54,9 @@ }, onLoad: async function (options) { await this.wxLogin(); + // const res = await getBanner({bannerName:'',bannerModule:''}) + // console.log(res) + this.setData({ isLogin: true }); @@ -134,6 +136,7 @@ phoneNumber: phone }) }, + //跳转页面 gotoUserManage(event) { const { dataset: { gopage } } = event.currentTarget; @@ -145,6 +148,22 @@ wx.navigateTo({ url: '/packageB/pay/pay', }) + }else if(gopage === 'history') { + wx.navigateTo({ + url: '/packageB/historical/historical', + }) + }else if(gopage === 'analyze') { + wx.navigateTo({ + url: '/packageB/consumption/consumption', + }) + }else if(gopage === 'place') { + wx.navigateTo({ + url: '/packageB/serviceNetwork/serviceNetwork', + }) + }else if(gopage === 'subsidy') { + wx.navigateTo({ + url: '/packageB/subsidy/subsidy', + }) } } }); \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index ced7205..37c2e7e 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -1,5 +1,5 @@ { - "projectname": "智慧厨房", + "projectname": "%E6%99%BA%E6%85%A7%E5%8E%A8%E6%88%BF", "setting": { "compileHotReLoad": true }, diff --git a/utils/api/index.js b/utils/api/index.js new file mode 100644 index 0000000..133435e --- /dev/null +++ b/utils/api/index.js @@ -0,0 +1,25 @@ +import fetch from '../common/fetch' +const baseUrl = 'https://kitchen.smartlog.work' +const getBannerUrl = baseUrl + '/appBannerInfo/mini/listPage' +const login = baseUrl + '/miniUser/login' +// 获取banner轮播图 +export function getBanner(params) { + return fetch.post(getBannerUrl, params).then(res => res); +} + +// 登录 +export function LOGIN(data) { + const params = { + wxCode:data, + appid:'wx84dba45d4abf799f', + wxUserInfo: { + nickName: '', + country: '', + province: '', + city: '', + avatarUrl: '', + phone: 17571066031, + }, + } + return fetch.post(login,params).then((res) => res); +} diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/consumption/consumption.wxml b/packageB/consumption/consumption.wxml new file mode 100644 index 0000000..5b86f89 --- /dev/null +++ b/packageB/consumption/consumption.wxml @@ -0,0 +1,2 @@ + +用气分析 diff --git a/packageB/consumption/consumption.wxss b/packageB/consumption/consumption.wxss new file mode 100644 index 0000000..08fa592 --- /dev/null +++ b/packageB/consumption/consumption.wxss @@ -0,0 +1,4 @@ +/* packageB/consumption/consumption.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} \ No newline at end of file diff --git a/packageB/historical/historical.js b/packageB/historical/historical.js new file mode 100644 index 0000000..5eebf3f --- /dev/null +++ b/packageB/historical/historical.js @@ -0,0 +1,66 @@ +// packageB/historical/historical.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + historicaList:[{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/historical/historical.json b/packageB/historical/historical.json new file mode 100644 index 0000000..4186ec6 --- /dev/null +++ b/packageB/historical/historical.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "历史账单", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/historical/historical.wxml b/packageB/historical/historical.wxml new file mode 100644 index 0000000..00bc5aa --- /dev/null +++ b/packageB/historical/historical.wxml @@ -0,0 +1,25 @@ + + + + + + + + + +缴费记录 + + 缴费日期 + 充值金额 + + + {{item.name}} + {{item.num}} + + + diff --git a/packageB/historical/historical.wxss b/packageB/historical/historical.wxss new file mode 100644 index 0000000..4a12a61 --- /dev/null +++ b/packageB/historical/historical.wxss @@ -0,0 +1,48 @@ +/* packageB/historical/historical.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.historical-top{ + padding: 50rpx; +} +.historical-top-box{ + display: flex; + align-items: center; + width: 100%; + height: 240rpx; + border: #000 2rpx solid; + border-radius: 20rpx; +} +.id-img{ + width: 200rpx; + height: 80rpx; + margin-left: 30rpx; + margin-bottom: 40rpx; + border-radius: 10rpx; +} + +.user-info{ + margin-left: 34rpx; + margin-top: 18rpx; +} +.user-info view { + margin-bottom: 10rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + padding: 26rpx; + padding-left: 80rpx; + border-top: solid 2rpx #eee; + border-bottom: solid 2rpx #eee; +} + +.table-tr{ + display: flex; + justify-content: space-around; + padding: 35rpx; + border-bottom: solid 2rpx #eee; +} + + diff --git a/packageB/serviceNetwork/serviceNetwork.js b/packageB/serviceNetwork/serviceNetwork.js new file mode 100644 index 0000000..351ee5a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.js @@ -0,0 +1,78 @@ +// packageB/serviceNetwork/serviceNetwork.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + value:'', + option1: [ + { text: '全部商品', value: 0 }, + { text: '新款商品', value: 1 }, + { text: '活动商品', value: 2 }, + ], + option2: [ + { text: '默认排序', value: 'a' }, + { text: '好评排序', value: 'b' }, + { text: '销量排序', value: 'c' }, + ], + value1: 0, + value2: 'b', + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.json b/packageB/serviceNetwork/serviceNetwork.json new file mode 100644 index 0000000..85c4d0a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "van-search":"../../miniprogram_npm/@vant/weapp/search/index", + "van-dropdown-menu":"../../miniprogram_npm/@vant/weapp/dropdown-menu/index", + "van-dropdown-item":"../../miniprogram_npm/@vant/weapp/dropdown-item/index", + "van-button":"../../miniprogram_npm/@vant/weapp/button/index" + }, + "navigationBarTitleText": "服务网点", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.wxml b/packageB/serviceNetwork/serviceNetwork.wxml new file mode 100644 index 0000000..82b1b9b --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxml @@ -0,0 +1,26 @@ + + + + + + + + + + + 服务中心 + + + +10km + + + +营业时间:24小时 +联系方式:010-96777 + + + + 默认按钮 + + diff --git a/packageB/serviceNetwork/serviceNetwork.wxss b/packageB/serviceNetwork/serviceNetwork.wxss new file mode 100644 index 0000000..7c2c4cb --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxss @@ -0,0 +1,35 @@ +/* packageB/serviceNetwork/serviceNetwork.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} + +.serviceNetwork{ + margin: 20rpx; + padding: 20rpx; + border: solid 2rpx #000; + border-radius: 15rpx; +} +.title{ + margin-left: 10rpx; +} +.center{ + margin: 20rpx 0; +} +.content-top{ + display: flex; + margin: 20rpx 0; +} +.content-km{ + padding: 10rpx; + padding-right: 40rpx; + margin-right: 40rpx; + border-right: solid 2rpx #000; +} +.content-bottom{ + padding-bottom: 20rpx; + border-bottom: solid 2rpx #000; +} +.bottom{ + display: flex; + justify-content: center; +} \ No newline at end of file diff --git a/packageB/subsidy/subsidy.js b/packageB/subsidy/subsidy.js new file mode 100644 index 0000000..239557f --- /dev/null +++ b/packageB/subsidy/subsidy.js @@ -0,0 +1,66 @@ +// packageB/subsidy/subsidy.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + list:['',''] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/subsidy/subsidy.json b/packageB/subsidy/subsidy.json new file mode 100644 index 0000000..5177fb0 --- /dev/null +++ b/packageB/subsidy/subsidy.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "采暖补贴", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/subsidy/subsidy.wxml b/packageB/subsidy/subsidy.wxml new file mode 100644 index 0000000..97c36a5 --- /dev/null +++ b/packageB/subsidy/subsidy.wxml @@ -0,0 +1,14 @@ + + + +补贴报数 +补贴查询及领取 + +补贴政策 + + +北京自采暖补贴二次报数开启 +****** + + + diff --git a/packageB/subsidy/subsidy.wxss b/packageB/subsidy/subsidy.wxss new file mode 100644 index 0000000..2588c6d --- /dev/null +++ b/packageB/subsidy/subsidy.wxss @@ -0,0 +1,40 @@ +/* packageB/subsidy/subsidy.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.subsidy-top{ + padding: 40rpx; + display: flex; +} +.top-number{ + width: 330rpx; + height: 200rpx; + border: 1px #000 solid; + text-align: center; + line-height: 200rpx; +} + +.top-draw{ + width: 330rpx; + height: 200rpx; + border: 1px #000 solid; + border-left: none; + text-align: center; + line-height: 200rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + margin: 20rpx 30rpx; +} + +.content-item{ + padding: 20rpx 130rpx; + border-bottom: 2rpx solid #eee; +} + +.content-item-top{ + font-weight: 500; + margin-bottom: 14rpx; +} \ No newline at end of file diff --git a/pages/guide/index.js b/pages/guide/index.js index bbd0135..e59f8bf 100644 --- a/pages/guide/index.js +++ b/pages/guide/index.js @@ -1,11 +1,10 @@ // pages/guide/index.js require('regenerator-runtime'); import { - request, login } from '../../utils/request'; import { judgeMyApi } from '../../utils/util/index' - +import {getBanner} from '../../utils/api/index' Page({ data: { isLogin: false, @@ -55,6 +54,9 @@ }, onLoad: async function (options) { await this.wxLogin(); + // const res = await getBanner({bannerName:'',bannerModule:''}) + // console.log(res) + this.setData({ isLogin: true }); @@ -134,6 +136,7 @@ phoneNumber: phone }) }, + //跳转页面 gotoUserManage(event) { const { dataset: { gopage } } = event.currentTarget; @@ -145,6 +148,22 @@ wx.navigateTo({ url: '/packageB/pay/pay', }) + }else if(gopage === 'history') { + wx.navigateTo({ + url: '/packageB/historical/historical', + }) + }else if(gopage === 'analyze') { + wx.navigateTo({ + url: '/packageB/consumption/consumption', + }) + }else if(gopage === 'place') { + wx.navigateTo({ + url: '/packageB/serviceNetwork/serviceNetwork', + }) + }else if(gopage === 'subsidy') { + wx.navigateTo({ + url: '/packageB/subsidy/subsidy', + }) } } }); \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index ced7205..37c2e7e 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -1,5 +1,5 @@ { - "projectname": "智慧厨房", + "projectname": "%E6%99%BA%E6%85%A7%E5%8E%A8%E6%88%BF", "setting": { "compileHotReLoad": true }, diff --git a/utils/api/index.js b/utils/api/index.js new file mode 100644 index 0000000..133435e --- /dev/null +++ b/utils/api/index.js @@ -0,0 +1,25 @@ +import fetch from '../common/fetch' +const baseUrl = 'https://kitchen.smartlog.work' +const getBannerUrl = baseUrl + '/appBannerInfo/mini/listPage' +const login = baseUrl + '/miniUser/login' +// 获取banner轮播图 +export function getBanner(params) { + return fetch.post(getBannerUrl, params).then(res => res); +} + +// 登录 +export function LOGIN(data) { + const params = { + wxCode:data, + appid:'wx84dba45d4abf799f', + wxUserInfo: { + nickName: '', + country: '', + province: '', + city: '', + avatarUrl: '', + phone: 17571066031, + }, + } + return fetch.post(login,params).then((res) => res); +} diff --git a/utils/common/fetch.js b/utils/common/fetch.js new file mode 100644 index 0000000..a17f1c6 --- /dev/null +++ b/utils/common/fetch.js @@ -0,0 +1,63 @@ +import {getLogin} from '../request' + + +// 发送请求 +function fetch(method) { + return function (url, data, otherParams = {}) { + const sessionId = wx.getStorageSync("sessionId"); + //定时器 + return new Promise((resolve, reject) => { + wx.request({ + url, + method, + data, + header: { + token: sessionId, + }, + success(data) { + if (data.statusCode === 200) { + if (data.data.code === 200) { + resolve(data.data.data); + } else if (data.data.code === 2401) { + wx.showToast({ + title: `登录过期,正在重新登录`, + icon: "none", + duration: 2000, + }); + getLogin(); + resolve(data.data.message); + } else if (data.data.code === 500 && data.data.message === '您的账号未注册,请先注册' || + data.data.code === 2402) { + resolve('用户未注册'); + } else { + wx.showToast({ + // title: "系统异常,请稍后再试!", + title: `${data.data.message}`, + icon: "none", + duration: 2000, + }); + reject(data); + } + } else { + reject(data); + } + }, + fail(err) { + reject(err); + }, + ...otherParams, + }); + }); + }; +} + +export default { + get: fetch("GET"), + post: fetch("POST"), + put: fetch("PUT"), + delete: fetch("DELETE"), + connect: fetch("CONNECT"), + head: fetch("HEAD"), + options: fetch("OPTIONS"), + trace: fetch("TRACE"), +}; \ No newline at end of file diff --git a/app.js b/app.js index e9d1f39..68ffd75 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,10 @@ -//app.js + require('regenerator-runtime') import wxMqtt from './utils/mqtt/wxMqtt' import { Provider } from './libs/wechat-weapp-redux.min'; import { configStore } from './utils/store/store'; import { judgeMyApi } from './utils/util/index' - +import {getLogin} from './utils/request' const store = configStore(); let count = 0; @@ -18,6 +18,7 @@ }, onLoad: function() { this.wxLogin(); + }, onHide: function() { @@ -29,6 +30,7 @@ }, onShow: async function() { + getLogin() let access_token = await wx.getStorageSync('access_token') if(!access_token) return; await this.onConnect(); diff --git a/app.json b/app.json index 263b1ba..f242abb 100644 --- a/app.json +++ b/app.json @@ -70,7 +70,11 @@ "independent": true, "pages": [ "userManagement/userManagement", - "pay/pay" + "pay/pay", + "historical/historical", + "consumption/consumption", + "serviceNetwork/serviceNetwork", + "subsidy/subsidy" ] } ], diff --git a/package-lock.json b/package-lock.json index 04335fc..52ce8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,39 @@ { - "name": "zhihui", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - } + "name": "zhihui", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "zhihui", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "node_modules/vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } }, - "node_modules/@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "node_modules/vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + "dependencies": { + "@vant/weapp": { + "version": "1.10.8", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.8.tgz", + "integrity": "sha512-/6w9U5UclF50ORqM2C9vo+oB5+PCOuLGpNI3cxYL1z0xWqPYratitLRhQx53Qo6k1I45Ri8DYGCb7C0qSKB/xg==" + }, + "vant-weapp": { + "version": "0.5.29", + "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", + "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" + } } - }, - "dependencies": { - "@vant/weapp": { - "version": "1.10.4", - "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.4.tgz", - "integrity": "sha512-S0T6myy4Ve4ZClRujJKP1Eu5hP5GFkVeQH587uakhacrQ+9Fp23gfnmo+dKMf7FbjTRqQu+ehxcr0Ba75iV8HA==" - }, - "vant-weapp": { - "version": "0.5.29", - "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz", - "integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q==" - } - } } diff --git a/package.json b/package.json index 4da043f..cf9396b 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "dependencies": { - "@vant/weapp": "^1.6.2", - "vant-weapp": "^0.5.29" - }, - "name": "zhihui", - "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", - "version": "1.0.0", - "main": "app.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "keywords": [] + "dependencies": { + "@vant/weapp": "^1.10.8", + "vant-weapp": "^0.5.29" + }, + "name": "zhihui", + "description": "This is a simple version of fast access[Doodle applet SDK](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/overview/applet-ecology?id=K9ptacgp94o5d),[配网插件](https://developer.tuya.com/cn/docs/iot/app-development/mini-programs/tuya-applet-with-web-plugin/distribution-network-plugin?id=K9lq218xn0wn8) and MQTT Of the connection Demo,It's stabilizing at the moment. New features will be updated in the future.", + "version": "1.0.0", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "keywords": [] } diff --git a/packageB/consumption/consumption.js b/packageB/consumption/consumption.js new file mode 100644 index 0000000..628dd2c --- /dev/null +++ b/packageB/consumption/consumption.js @@ -0,0 +1,66 @@ +// packageB/consumption/consumption.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/consumption/consumption.json b/packageB/consumption/consumption.json new file mode 100644 index 0000000..dc038b3 --- /dev/null +++ b/packageB/consumption/consumption.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用气分析", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/consumption/consumption.wxml b/packageB/consumption/consumption.wxml new file mode 100644 index 0000000..5b86f89 --- /dev/null +++ b/packageB/consumption/consumption.wxml @@ -0,0 +1,2 @@ + +用气分析 diff --git a/packageB/consumption/consumption.wxss b/packageB/consumption/consumption.wxss new file mode 100644 index 0000000..08fa592 --- /dev/null +++ b/packageB/consumption/consumption.wxss @@ -0,0 +1,4 @@ +/* packageB/consumption/consumption.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} \ No newline at end of file diff --git a/packageB/historical/historical.js b/packageB/historical/historical.js new file mode 100644 index 0000000..5eebf3f --- /dev/null +++ b/packageB/historical/historical.js @@ -0,0 +1,66 @@ +// packageB/historical/historical.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + historicaList:[{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},{name:'2022-06-01',num:'100元'},] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/historical/historical.json b/packageB/historical/historical.json new file mode 100644 index 0000000..4186ec6 --- /dev/null +++ b/packageB/historical/historical.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "历史账单", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/historical/historical.wxml b/packageB/historical/historical.wxml new file mode 100644 index 0000000..00bc5aa --- /dev/null +++ b/packageB/historical/historical.wxml @@ -0,0 +1,25 @@ + + + + + + + + + +缴费记录 + + 缴费日期 + 充值金额 + + + {{item.name}} + {{item.num}} + + + diff --git a/packageB/historical/historical.wxss b/packageB/historical/historical.wxss new file mode 100644 index 0000000..4a12a61 --- /dev/null +++ b/packageB/historical/historical.wxss @@ -0,0 +1,48 @@ +/* packageB/historical/historical.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.historical-top{ + padding: 50rpx; +} +.historical-top-box{ + display: flex; + align-items: center; + width: 100%; + height: 240rpx; + border: #000 2rpx solid; + border-radius: 20rpx; +} +.id-img{ + width: 200rpx; + height: 80rpx; + margin-left: 30rpx; + margin-bottom: 40rpx; + border-radius: 10rpx; +} + +.user-info{ + margin-left: 34rpx; + margin-top: 18rpx; +} +.user-info view { + margin-bottom: 10rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + padding: 26rpx; + padding-left: 80rpx; + border-top: solid 2rpx #eee; + border-bottom: solid 2rpx #eee; +} + +.table-tr{ + display: flex; + justify-content: space-around; + padding: 35rpx; + border-bottom: solid 2rpx #eee; +} + + diff --git a/packageB/serviceNetwork/serviceNetwork.js b/packageB/serviceNetwork/serviceNetwork.js new file mode 100644 index 0000000..351ee5a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.js @@ -0,0 +1,78 @@ +// packageB/serviceNetwork/serviceNetwork.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + value:'', + option1: [ + { text: '全部商品', value: 0 }, + { text: '新款商品', value: 1 }, + { text: '活动商品', value: 2 }, + ], + option2: [ + { text: '默认排序', value: 'a' }, + { text: '好评排序', value: 'b' }, + { text: '销量排序', value: 'c' }, + ], + value1: 0, + value2: 'b', + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.json b/packageB/serviceNetwork/serviceNetwork.json new file mode 100644 index 0000000..85c4d0a --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "van-search":"../../miniprogram_npm/@vant/weapp/search/index", + "van-dropdown-menu":"../../miniprogram_npm/@vant/weapp/dropdown-menu/index", + "van-dropdown-item":"../../miniprogram_npm/@vant/weapp/dropdown-item/index", + "van-button":"../../miniprogram_npm/@vant/weapp/button/index" + }, + "navigationBarTitleText": "服务网点", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/serviceNetwork/serviceNetwork.wxml b/packageB/serviceNetwork/serviceNetwork.wxml new file mode 100644 index 0000000..82b1b9b --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxml @@ -0,0 +1,26 @@ + + + + + + + + + + + 服务中心 + + + +10km + + + +营业时间:24小时 +联系方式:010-96777 + + + + 默认按钮 + + diff --git a/packageB/serviceNetwork/serviceNetwork.wxss b/packageB/serviceNetwork/serviceNetwork.wxss new file mode 100644 index 0000000..7c2c4cb --- /dev/null +++ b/packageB/serviceNetwork/serviceNetwork.wxss @@ -0,0 +1,35 @@ +/* packageB/serviceNetwork/serviceNetwork.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} + +.serviceNetwork{ + margin: 20rpx; + padding: 20rpx; + border: solid 2rpx #000; + border-radius: 15rpx; +} +.title{ + margin-left: 10rpx; +} +.center{ + margin: 20rpx 0; +} +.content-top{ + display: flex; + margin: 20rpx 0; +} +.content-km{ + padding: 10rpx; + padding-right: 40rpx; + margin-right: 40rpx; + border-right: solid 2rpx #000; +} +.content-bottom{ + padding-bottom: 20rpx; + border-bottom: solid 2rpx #000; +} +.bottom{ + display: flex; + justify-content: center; +} \ No newline at end of file diff --git a/packageB/subsidy/subsidy.js b/packageB/subsidy/subsidy.js new file mode 100644 index 0000000..239557f --- /dev/null +++ b/packageB/subsidy/subsidy.js @@ -0,0 +1,66 @@ +// packageB/subsidy/subsidy.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + list:['',''] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/packageB/subsidy/subsidy.json b/packageB/subsidy/subsidy.json new file mode 100644 index 0000000..5177fb0 --- /dev/null +++ b/packageB/subsidy/subsidy.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "采暖补贴", + "navigationBarBackgroundColor": "#f8f8f8" +} \ No newline at end of file diff --git a/packageB/subsidy/subsidy.wxml b/packageB/subsidy/subsidy.wxml new file mode 100644 index 0000000..97c36a5 --- /dev/null +++ b/packageB/subsidy/subsidy.wxml @@ -0,0 +1,14 @@ + + + +补贴报数 +补贴查询及领取 + +补贴政策 + + +北京自采暖补贴二次报数开启 +****** + + + diff --git a/packageB/subsidy/subsidy.wxss b/packageB/subsidy/subsidy.wxss new file mode 100644 index 0000000..2588c6d --- /dev/null +++ b/packageB/subsidy/subsidy.wxss @@ -0,0 +1,40 @@ +/* packageB/subsidy/subsidy.wxss */ +page { + background: linear-gradient(180deg, #fefeff 0%, #a8cee1 50%, #fefeff 100%); +} +.subsidy-top{ + padding: 40rpx; + display: flex; +} +.top-number{ + width: 330rpx; + height: 200rpx; + border: 1px #000 solid; + text-align: center; + line-height: 200rpx; +} + +.top-draw{ + width: 330rpx; + height: 200rpx; + border: 1px #000 solid; + border-left: none; + text-align: center; + line-height: 200rpx; +} + +.title{ + font-size: 42rpx; + font-weight: 700; + margin: 20rpx 30rpx; +} + +.content-item{ + padding: 20rpx 130rpx; + border-bottom: 2rpx solid #eee; +} + +.content-item-top{ + font-weight: 500; + margin-bottom: 14rpx; +} \ No newline at end of file diff --git a/pages/guide/index.js b/pages/guide/index.js index bbd0135..e59f8bf 100644 --- a/pages/guide/index.js +++ b/pages/guide/index.js @@ -1,11 +1,10 @@ // pages/guide/index.js require('regenerator-runtime'); import { - request, login } from '../../utils/request'; import { judgeMyApi } from '../../utils/util/index' - +import {getBanner} from '../../utils/api/index' Page({ data: { isLogin: false, @@ -55,6 +54,9 @@ }, onLoad: async function (options) { await this.wxLogin(); + // const res = await getBanner({bannerName:'',bannerModule:''}) + // console.log(res) + this.setData({ isLogin: true }); @@ -134,6 +136,7 @@ phoneNumber: phone }) }, + //跳转页面 gotoUserManage(event) { const { dataset: { gopage } } = event.currentTarget; @@ -145,6 +148,22 @@ wx.navigateTo({ url: '/packageB/pay/pay', }) + }else if(gopage === 'history') { + wx.navigateTo({ + url: '/packageB/historical/historical', + }) + }else if(gopage === 'analyze') { + wx.navigateTo({ + url: '/packageB/consumption/consumption', + }) + }else if(gopage === 'place') { + wx.navigateTo({ + url: '/packageB/serviceNetwork/serviceNetwork', + }) + }else if(gopage === 'subsidy') { + wx.navigateTo({ + url: '/packageB/subsidy/subsidy', + }) } } }); \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index ced7205..37c2e7e 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -1,5 +1,5 @@ { - "projectname": "智慧厨房", + "projectname": "%E6%99%BA%E6%85%A7%E5%8E%A8%E6%88%BF", "setting": { "compileHotReLoad": true }, diff --git a/utils/api/index.js b/utils/api/index.js new file mode 100644 index 0000000..133435e --- /dev/null +++ b/utils/api/index.js @@ -0,0 +1,25 @@ +import fetch from '../common/fetch' +const baseUrl = 'https://kitchen.smartlog.work' +const getBannerUrl = baseUrl + '/appBannerInfo/mini/listPage' +const login = baseUrl + '/miniUser/login' +// 获取banner轮播图 +export function getBanner(params) { + return fetch.post(getBannerUrl, params).then(res => res); +} + +// 登录 +export function LOGIN(data) { + const params = { + wxCode:data, + appid:'wx84dba45d4abf799f', + wxUserInfo: { + nickName: '', + country: '', + province: '', + city: '', + avatarUrl: '', + phone: 17571066031, + }, + } + return fetch.post(login,params).then((res) => res); +} diff --git a/utils/common/fetch.js b/utils/common/fetch.js new file mode 100644 index 0000000..a17f1c6 --- /dev/null +++ b/utils/common/fetch.js @@ -0,0 +1,63 @@ +import {getLogin} from '../request' + + +// 发送请求 +function fetch(method) { + return function (url, data, otherParams = {}) { + const sessionId = wx.getStorageSync("sessionId"); + //定时器 + return new Promise((resolve, reject) => { + wx.request({ + url, + method, + data, + header: { + token: sessionId, + }, + success(data) { + if (data.statusCode === 200) { + if (data.data.code === 200) { + resolve(data.data.data); + } else if (data.data.code === 2401) { + wx.showToast({ + title: `登录过期,正在重新登录`, + icon: "none", + duration: 2000, + }); + getLogin(); + resolve(data.data.message); + } else if (data.data.code === 500 && data.data.message === '您的账号未注册,请先注册' || + data.data.code === 2402) { + resolve('用户未注册'); + } else { + wx.showToast({ + // title: "系统异常,请稍后再试!", + title: `${data.data.message}`, + icon: "none", + duration: 2000, + }); + reject(data); + } + } else { + reject(data); + } + }, + fail(err) { + reject(err); + }, + ...otherParams, + }); + }); + }; +} + +export default { + get: fetch("GET"), + post: fetch("POST"), + put: fetch("PUT"), + delete: fetch("DELETE"), + connect: fetch("CONNECT"), + head: fetch("HEAD"), + options: fetch("OPTIONS"), + trace: fetch("TRACE"), +}; \ No newline at end of file diff --git a/utils/request.js b/utils/request.js index e4f0136..0248485 100644 --- a/utils/request.js +++ b/utils/request.js @@ -1,5 +1,5 @@ require('regenerator-runtime') - +import {LOGIN} from '../utils/api/index' const EXPIRDCODE = 1010; const INVALIDCODE = 1004; let errorInfo = {}; @@ -12,7 +12,7 @@ ]; let wxAppid = 'wx84dba45d4abf799f'; //此处请选择填入您当前的wxappid,默认将从微信请求头中机械获取请求主体wxappid -const wxRequest = function (config = { + const wxRequest = function (config = { url: '' }) { return new Promise(function (resolve, reject) { @@ -70,6 +70,36 @@ return request(params); }; +// 登录 +export function getLogin() { + console.log('login') + return new Promise((resolve, reject) => { + wx.login({ + onlyAuthorize: true, + success(data) { + console.log('登录参数', data, wx.getStorageSync('sessionId')) + LOGIN(data.code).then(res => { + wx.setStorageSync('sessionId', res); + wx.showToast({ + title: `登录成功`, + icon: "none", + duration: 2000, + }); + resolve('登录成功'); + }); + }, + fail(err) { + console.log('login fail', err); + wx.showToast({ + title: '登录错误', + icon: 'none' + }); + reject('登录错误'); + }, + }); + }) +} + export const login = async () => { if(!wxAppid.length) wxAppid = 'cloud' let schema = await getSchema();