Compare commits
10 Commits
Author | SHA1 | Date |
---|---|---|
wbb | 9d8ba11cd4 | 2 years ago |
wbb | 46ee67cc25 | 2 years ago |
wbb | f3387991d8 | 2 years ago |
wbb | d7d9102c7e | 2 years ago |
wbb | 4b36882820 | 2 years ago |
pu6ej7yq9 | b24478fe95 | 2 years ago |
wbb | 2dc9c11d66 | 2 years ago |
wbb | 269afd50ae | 2 years ago |
wbb | 1e60237891 | 2 years ago |
wbb | b67707d1aa | 2 years ago |
@ -0,0 +1,2 @@
|
|||||||
|
666666
|
||||||
|
wbbgood
|
@ -0,0 +1 @@
|
|||||||
|
wwww
|
Before Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 549 KiB |
Before Width: | Height: | Size: 243 KiB |
Before Width: | Height: | Size: 130 KiB |
Before Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 166 KiB |
Before Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 237 KiB |
Before Width: | Height: | Size: 401 KiB |
Before Width: | Height: | Size: 745 KiB |
Before Width: | Height: | Size: 174 KiB |
Before Width: | Height: | Size: 361 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 141 KiB |
Before Width: | Height: | Size: 482 KiB |
Before Width: | Height: | Size: 202 KiB |
Before Width: | Height: | Size: 409 KiB |
Before Width: | Height: | Size: 120 KiB |
Before Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 246 KiB |
Before Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 122 KiB |
Before Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 576 KiB |
Before Width: | Height: | Size: 202 KiB |
Before Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 20 KiB |
@ -0,0 +1,2 @@
|
|||||||
|
6666677777
|
||||||
|
wbbbbbbbb
|
@ -0,0 +1,2 @@
|
|||||||
|
6666677777
|
||||||
|
wbbbbbbbb
|
@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* Eslint config file
|
|
||||||
* Documentation: https://eslint.org/docs/user-guide/configuring/
|
|
||||||
* Install the Eslint extension before using this feature.
|
|
||||||
*/
|
|
||||||
module.exports = {
|
|
||||||
env: {
|
|
||||||
es6: true,
|
|
||||||
browser: true,
|
|
||||||
node: true,
|
|
||||||
},
|
|
||||||
ecmaFeatures: {
|
|
||||||
modules: true,
|
|
||||||
},
|
|
||||||
parserOptions: {
|
|
||||||
ecmaVersion: 2018,
|
|
||||||
sourceType: 'module',
|
|
||||||
},
|
|
||||||
globals: {
|
|
||||||
wx: true,
|
|
||||||
App: true,
|
|
||||||
Page: true,
|
|
||||||
getCurrentPages: true,
|
|
||||||
getApp: true,
|
|
||||||
Component: true,
|
|
||||||
requirePlugin: true,
|
|
||||||
requireMiniProgram: true,
|
|
||||||
},
|
|
||||||
// extends: 'eslint:recommended',
|
|
||||||
rules: {},
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
{
|
|
||||||
"pages": [
|
|
||||||
"pages/login/login",
|
|
||||||
"pages/index/index",
|
|
||||||
"pages/fourm/fourm",
|
|
||||||
"pages/submit/submit",
|
|
||||||
"pages/cart/cart",
|
|
||||||
"pages/usercenter/usercenter",
|
|
||||||
"pages/detail/detail",
|
|
||||||
"pages/searchShow/searchShow",
|
|
||||||
"pages/change/change",
|
|
||||||
"pages/answer/answer",
|
|
||||||
"pages/paying/paying",
|
|
||||||
"pages/orderlist/orderlist",
|
|
||||||
"pages/address/address",
|
|
||||||
"pages/turning/turning",
|
|
||||||
"pages/addAddress/addAddress",
|
|
||||||
"pages/myorder/myorder",
|
|
||||||
"pages/orderdetail/orderdetail",
|
|
||||||
"pages/searchfood/searchfood",
|
|
||||||
"pages/select1/select1",
|
|
||||||
"pages/select2/select2"
|
|
||||||
|
|
||||||
],
|
|
||||||
"tabBar": {
|
|
||||||
"custom": false,
|
|
||||||
|
|
||||||
"backgroundColor": "#ffffff",
|
|
||||||
"borderStyle": "black",
|
|
||||||
"list": [
|
|
||||||
{
|
|
||||||
"pagePath": "pages/index/index",
|
|
||||||
"text": "首页",
|
|
||||||
"iconPath": "/images/home.png",
|
|
||||||
"selectedIconPath": "/images/home-active.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pagePath": "pages/fourm/fourm",
|
|
||||||
"text": "论坛",
|
|
||||||
"iconPath": "/images/message.png",
|
|
||||||
"selectedIconPath": "/images/message-active.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pagePath": "pages/cart/cart",
|
|
||||||
"text": "购物车",
|
|
||||||
"iconPath": "/images/message.png",
|
|
||||||
"selectedIconPath": "/images/message-active.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pagePath": "pages/usercenter/usercenter",
|
|
||||||
"text": "我的",
|
|
||||||
"iconPath": "/images/message.png",
|
|
||||||
"selectedIconPath": "/images/message-active.png"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
},
|
|
||||||
"window": {
|
|
||||||
"backgroundColor": "#F6F6F6",
|
|
||||||
"backgroundTextStyle": "light",
|
|
||||||
"navigationBarBackgroundColor": "#F6F6F6",
|
|
||||||
"navigationBarTitleText": "节时不节食",
|
|
||||||
"navigationBarTextStyle": "black",
|
|
||||||
"enablePullDownRefresh": true
|
|
||||||
},
|
|
||||||
"networkTimeout": {
|
|
||||||
"request": 10000,
|
|
||||||
"downloadFile": 10000
|
|
||||||
},
|
|
||||||
"debug": true,
|
|
||||||
"sitemapLocation": "sitemap.json",
|
|
||||||
"style": "v2"
|
|
||||||
}
|
|
@ -1,160 +0,0 @@
|
|||||||
/**app.wxss**/
|
|
||||||
.container {
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: 200rpx 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
background: initial;
|
|
||||||
}
|
|
||||||
|
|
||||||
button:focus{
|
|
||||||
outline: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
button::after{
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
page {
|
|
||||||
background: #f6f6f6;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: flex-start;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**app.wxss**/
|
|
||||||
/* .container {
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
/*padding: 200rpx 0;*/
|
|
||||||
/* box-sizing: border-box;
|
|
||||||
background: #F0F4F3;
|
|
||||||
} */
|
|
||||||
|
|
||||||
.container.withtab{
|
|
||||||
margin: 105rpx 0 0 0;
|
|
||||||
/*top: 105rpx;*/
|
|
||||||
}
|
|
||||||
.flex-wrp{
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
.flex-tab{
|
|
||||||
flex-flow: row nowrap;
|
|
||||||
justify-content: space-around;
|
|
||||||
align-items: stretch;
|
|
||||||
}
|
|
||||||
.flex-item{
|
|
||||||
flex-grow: 1;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.top-tab{
|
|
||||||
width: 750rpx;
|
|
||||||
height: 100rpx;
|
|
||||||
background: #298DE5;
|
|
||||||
color: #8CCEFD;
|
|
||||||
font-size: 28rpx;
|
|
||||||
line-height: 100rpx;
|
|
||||||
box-shadow: 0 2px 2px #bebebe;
|
|
||||||
margin: 0 0 8rpx 0;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
z-index: 9999;
|
|
||||||
}
|
|
||||||
.toptab.active{
|
|
||||||
color: #ffffff;
|
|
||||||
border-bottom: solid 2px #ffffff;
|
|
||||||
}
|
|
||||||
.container{
|
|
||||||
padding: 0;
|
|
||||||
font-size: 14rpx;
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
.container .feed-item{
|
|
||||||
width: 690rpx;
|
|
||||||
padding: 30rpx 30rpx 20rpx;
|
|
||||||
margin: 7rpx 0 6rpx 0;
|
|
||||||
background: #ffffff;
|
|
||||||
border-top: 1px solid #eee;
|
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
box-shadow: 0 2px 5px #eeeeee;
|
|
||||||
}
|
|
||||||
.container .feed-item .feed-source{
|
|
||||||
width: 690rpx;
|
|
||||||
left: 0;
|
|
||||||
height: 50rpx;
|
|
||||||
}
|
|
||||||
.container .feed-item .feed-source .avatar{
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
.container .feed-item .feed-source a{
|
|
||||||
display: inline-block;
|
|
||||||
height: 40rpx;
|
|
||||||
}
|
|
||||||
.container .feed-item .feed-source .avatar image{
|
|
||||||
/*position: absolute;*/
|
|
||||||
display: inline-block;
|
|
||||||
width: 45rpx;
|
|
||||||
height: 45rpx;
|
|
||||||
border-radius: 45rpx;
|
|
||||||
top: 10rpx;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
.container .feed-item .feed-source text{
|
|
||||||
/*position: absolute;*/
|
|
||||||
display: inline-block;
|
|
||||||
height: 40rpx;
|
|
||||||
line-height: 40rpx;
|
|
||||||
vertical-align: middle;
|
|
||||||
margin: 0 0 0 15rpx;
|
|
||||||
color: #a0acac;
|
|
||||||
font-size: 26rpx;
|
|
||||||
}
|
|
||||||
.container .feed-item .feed-source .item-more{
|
|
||||||
display: inline-block;
|
|
||||||
width: 40rpx;
|
|
||||||
height: 45rpx;
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
.container .feed-item .feed-content{
|
|
||||||
padding: 10rpx 0 0 0;
|
|
||||||
}
|
|
||||||
.container .feed-item .feed-content .question text{
|
|
||||||
font-size: 28rpx;
|
|
||||||
font-weight: 600px;
|
|
||||||
line-height: 40rpx;
|
|
||||||
word-spacing: 5rpx;
|
|
||||||
}
|
|
||||||
.container .feed-item .feed-content .answer-body{
|
|
||||||
padding: 10rpx 0 0 0;
|
|
||||||
/*height: 10rpx;*/
|
|
||||||
font-size: 24rpx;
|
|
||||||
line-height: 28rpx;
|
|
||||||
color: #5b5b5b;
|
|
||||||
}
|
|
||||||
.container .feed-item .feed-content .answer-actions{
|
|
||||||
width: 690rpx;
|
|
||||||
padding: 10rpx 0 0;
|
|
||||||
color: #a0acac;
|
|
||||||
}
|
|
||||||
.container .feed-item .feed-content .answer-actions view{
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: text-bottom;
|
|
||||||
padding: 0 10rpx 0 0;
|
|
||||||
font-size: 24rpx;
|
|
||||||
}
|
|
||||||
.container .feed-item .feed-content .answer-actions .dot ::after{
|
|
||||||
content: "•";
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
const cloud = require('wx-server-sdk');
|
|
||||||
|
|
||||||
cloud.init({
|
|
||||||
env: cloud.DYNAMIC_CURRENT_ENV
|
|
||||||
});
|
|
||||||
|
|
||||||
// 获取小程序二维码云函数入口函数
|
|
||||||
exports.main = async (event, context) => {
|
|
||||||
// 获取小程序二维码的buffer
|
|
||||||
const resp = await cloud.openapi.wxacode.get({
|
|
||||||
path: 'pages/index/index'
|
|
||||||
});
|
|
||||||
const { buffer } = resp;
|
|
||||||
// 将图片上传云存储空间
|
|
||||||
const upload = await cloud.uploadFile({
|
|
||||||
cloudPath: 'code.png',
|
|
||||||
fileContent: buffer
|
|
||||||
});
|
|
||||||
return upload.fileID;
|
|
||||||
};
|
|
@ -1,17 +0,0 @@
|
|||||||
const cloud = require('wx-server-sdk');
|
|
||||||
|
|
||||||
cloud.init({
|
|
||||||
env: "cloud1-8g5wmepxce8a3b8a"
|
|
||||||
});
|
|
||||||
|
|
||||||
// 获取openId云函数入口函数
|
|
||||||
exports.main = async (event, context) => {
|
|
||||||
// 获取基础信息
|
|
||||||
const wxContext = cloud.getWXContext();
|
|
||||||
|
|
||||||
return {
|
|
||||||
openid: wxContext.OPENID,
|
|
||||||
appid: wxContext.APPID,
|
|
||||||
unionid: wxContext.UNIONID,
|
|
||||||
};
|
|
||||||
};
|
|
@ -1,25 +0,0 @@
|
|||||||
const getOpenId = require('./getOpenId/index');
|
|
||||||
const getMiniProgramCode = require('./getMiniProgramCode/index');
|
|
||||||
const createCollection = require('./createCollection/index');
|
|
||||||
const selectRecord = require('./selectRecord/index');
|
|
||||||
const updateRecord = require('./updateRecord/index');
|
|
||||||
const sumRecord = require('./sumRecord/index');
|
|
||||||
|
|
||||||
|
|
||||||
// 云函数入口函数
|
|
||||||
exports.main = async (event, context) => {
|
|
||||||
switch (event.type) {
|
|
||||||
case 'getOpenId':
|
|
||||||
return await getOpenId.main(event, context);
|
|
||||||
case 'getMiniProgramCode':
|
|
||||||
return await getMiniProgramCode.main(event, context);
|
|
||||||
case 'createCollection':
|
|
||||||
return await createCollection.main(event, context);
|
|
||||||
case 'selectRecord':
|
|
||||||
return await selectRecord.main(event, context);
|
|
||||||
case 'updateRecord':
|
|
||||||
return await updateRecord.main(event, context);
|
|
||||||
case 'sumRecord':
|
|
||||||
return await sumRecord.main(event, context);
|
|
||||||
}
|
|
||||||
};
|
|
@ -1,12 +0,0 @@
|
|||||||
const cloud = require('wx-server-sdk');
|
|
||||||
|
|
||||||
cloud.init({
|
|
||||||
env: cloud.DYNAMIC_CURRENT_ENV
|
|
||||||
});
|
|
||||||
const db = cloud.database();
|
|
||||||
|
|
||||||
// 查询数据库集合云函数入口函数
|
|
||||||
exports.main = async (event, context) => {
|
|
||||||
// 返回数据库查询结果
|
|
||||||
return await db.collection('sales').get();
|
|
||||||
};
|
|
@ -1,18 +0,0 @@
|
|||||||
const cloud = require('wx-server-sdk');
|
|
||||||
|
|
||||||
cloud.init({
|
|
||||||
env: cloud.DYNAMIC_CURRENT_ENV
|
|
||||||
});
|
|
||||||
const db = cloud.database();
|
|
||||||
const $ = db.command.aggregate;
|
|
||||||
|
|
||||||
// 聚合记录云函数入口函数
|
|
||||||
exports.main = async (event, context) => {
|
|
||||||
// 返回数据库聚合结果
|
|
||||||
return db.collection('sales').aggregate()
|
|
||||||
.group({
|
|
||||||
_id: '$region',
|
|
||||||
sum: $.sum('$sales')
|
|
||||||
})
|
|
||||||
.end();
|
|
||||||
};
|
|
@ -1,32 +0,0 @@
|
|||||||
const cloud = require('wx-server-sdk');
|
|
||||||
|
|
||||||
cloud.init({
|
|
||||||
env: cloud.DYNAMIC_CURRENT_ENV
|
|
||||||
});
|
|
||||||
const db = cloud.database();
|
|
||||||
|
|
||||||
// 修改数据库信息云函数入口函数
|
|
||||||
exports.main = async (event, context) => {
|
|
||||||
try {
|
|
||||||
// 遍历修改数据库信息
|
|
||||||
for (let i = 0; i < event.data.length; i++) {
|
|
||||||
await db.collection('sales').where({
|
|
||||||
_id: event.data[i]._id
|
|
||||||
})
|
|
||||||
.update({
|
|
||||||
data: {
|
|
||||||
sales: event.data[i].sales
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
success: true,
|
|
||||||
data: event.data
|
|
||||||
};
|
|
||||||
} catch (e) {
|
|
||||||
return {
|
|
||||||
success: false,
|
|
||||||
errMsg: e
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
|
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 526 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 91 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 108 KiB |