-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9b0f939
Showing
230 changed files
with
8,076 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// 云函数模板 | ||
// 部署:在 cloud-functions/login 文件夹右击选择 “上传并部署” | ||
|
||
const cloud = require('wx-server-sdk') | ||
|
||
// 初始化 cloud | ||
cloud.init() | ||
|
||
/** | ||
* 这个示例将经自动鉴权过的小程序用户 openid 返回给小程序端 | ||
* | ||
* event 参数包含小程序端调用传入的 data | ||
* | ||
*/ | ||
exports.main = (event, context) => { | ||
console.log(event) | ||
console.log(context) | ||
|
||
// 可执行其他自定义逻辑 | ||
// console.log 的内容可以在云开发云函数调用日志查看 | ||
|
||
// 获取 WX Context (微信调用上下文),包括 OPENID、APPID、及 UNIONID(需满足 UNIONID 获取条件) | ||
const wxContext = cloud.getWXContext() | ||
|
||
return { | ||
event, | ||
openid: wxContext.OPENID, | ||
appid: wxContext.APPID, | ||
unionid: wxContext.UNIONID, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "login", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"wx-server-sdk": "latest" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// 云函数入口文件 | ||
const cloud = require('wx-server-sdk') | ||
|
||
cloud.init() | ||
|
||
// 云函数入口函数 | ||
exports.main = async (event, context) => { | ||
const wxContext = cloud.getWXContext() | ||
|
||
return { | ||
event, | ||
openid: wxContext.OPENID, | ||
appid: wxContext.APPID, | ||
unionid: wxContext.UNIONID, | ||
} | ||
} | ||
// 云函数入口函数 | ||
exports.main = (event, context) => { | ||
console.log(event) | ||
console.log(context) | ||
console.log('asd') | ||
return { | ||
sum: event.a + event.b | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "sum", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"wx-server-sdk": "latest" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
//app.js | ||
App({ | ||
onLaunch: function () { | ||
|
||
if (!wx.cloud) { | ||
console.error('请使用 2.2.3 或以上的基础库以使用云能力') | ||
} else { | ||
wx.cloud.init({ | ||
traceUser: true, | ||
}) | ||
} | ||
//调用API从本地缓存中获取数据 | ||
var logs = wx.getStorageSync('logs') || [] | ||
logs.unshift(Date.now()) | ||
wx.setStorageSync('logs', logs) | ||
}, | ||
getUserInfo:function(cb){ | ||
var that = this | ||
if(this.globalData.userInfo){ | ||
typeof cb == "function" && cb(this.globalData.userInfo) | ||
}else{ | ||
//调用登录接口 | ||
wx.login({ | ||
success: function () { | ||
wx.getUserInfo({ | ||
success: function (res) { | ||
that.globalData.userInfo = res.userInfo | ||
typeof cb == "function" && cb(that.globalData.userInfo) | ||
} | ||
}) | ||
} | ||
}) | ||
} | ||
}, | ||
globalData:{ | ||
userInfo:null, | ||
res_success: "000000", /** 网络请求成功 */ | ||
token_expired: "400011", /** token 过期 */ | ||
token_invalid: "400012" /** token 无效 */ | ||
} | ||
|
||
/* this.globalData = {} | ||
}*/ | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"pages": [ | ||
|
||
"pages/index/index", | ||
"pages/logs/logs", | ||
"pages/sort/sort", | ||
"pages/find/find", | ||
"pages/huangye/huangye", | ||
"pages/myself/myself", | ||
|
||
|
||
"pages/login/login" | ||
], | ||
"window": { | ||
"navigationBarBackgroundColor": "#302f34", | ||
"navigationBarTitleText": "", | ||
"navigationBarTextStyle":"white", | ||
"backgroundTextStyle":"dark", | ||
"enablePullDownRefresh":true | ||
|
||
|
||
}, | ||
|
||
"tabBar": { | ||
"color": "#abadbb", | ||
"selectedColor": "#0164a6", | ||
"list": [ | ||
{ | ||
"pagePath": "pages/index/index", | ||
"text": "认知", | ||
"iconPath": "images/tab/sh.png", | ||
"selectedIconPath": "images/tab/sh_selected.png" | ||
}, | ||
{ | ||
"pagePath": "pages/sort/sort", | ||
"text": "分类", | ||
"iconPath": "images/tab/zhengwu.png", | ||
"selectedIconPath": "images/tab/zhengwu_selected.png" | ||
}, | ||
{ | ||
"pagePath": "pages/find/find", | ||
"text": "发现", | ||
"iconPath": "images/tab/bianmin.png", | ||
"selectedIconPath": "images/tab/bianmin_selected.png" | ||
}, | ||
{ | ||
"pagePath": "pages/myself/myself", | ||
"text": "我的", | ||
"iconPath": "images/tab/me.png", | ||
"selectedIconPath": "images/tab/me_selected.png" | ||
} | ||
] | ||
}, | ||
"networkTimeout": { | ||
"request": 10000, | ||
"downloadFile": 10000 | ||
}, | ||
"sitemapLocation": "sitemap.json" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* 小程序配置文件 | ||
*/ | ||
|
||
var host = "http://gov.jointem.com/zyb/api" //API请求接口 | ||
var host_sh = "http://m.jointem.com" //API请求接口 | ||
var host_iamge = "http://gov.jointem.com" //图片拼接前 | ||
|
||
var config = { | ||
|
||
// 下面的地址配合云端 Server 工作 | ||
host, | ||
|
||
loginUrl: `${host_iamge}/zyb/public/user/system/login`, /** 登录接口 login */ | ||
logout: `${host_iamge}/zyb/public/user/system/logout`, /** 退出登录 logout */ | ||
AppinitData: `${host}/init3_1/public/getAppInitData`, /** 首页接口数据 - 轮播 */ | ||
GET_HOT_NEWS: `${host}/hotNews/public/getHotNews?accessToken=`,/** 获取新闻动态 */ | ||
|
||
newsTagUrl: `${host}/newstag/public/getnewstag`, /** 获取政务资讯顶部标签 */ | ||
|
||
// 测试的请求地址 | ||
requestUrl: `${host}/testRequest`, | ||
|
||
//生活 | ||
RecommendDoorListUrl: `${host_sh}/front/public/advert/getAdvertRecommendDoorList`, /** 获取便民首页优选推荐店铺列表 */ | ||
ttPrizeUrl: `${host_sh}/front/public/activity/getActivityListByTypeId`,/** 天天有奖 */ | ||
onePrizeUrl: `${host_sh}/front/public/oyb/getServantPrdList`, /** 一元夺宝 */ | ||
miaoshaUrl: `${host_sh}/front/public/activity/getActivityListByTypeId`, /** 一元夺宝 */ | ||
couponCategoryUrl: `${host_sh}/front/public/search/getCouponCategory`, /** 获取优惠券分类 */ | ||
CouponSearchListUrl: `${host_sh}/front/public/search/getCouponSearchList`, /*好优惠搜索*/ | ||
receiveCouponUrl: `${host_sh}/front/public/user/url/receiveCoupon`, /** 筛选出用户领取过的未使用的优惠券 */ | ||
addCouponUrl: `${host_sh}/front/public/user/url/addCoupon`, /** 领取优惠券 */ | ||
CouponDetailUrl: `${host_sh}/front/public/getCouponDetail`, /** 获取优惠券详情 */ | ||
UserCouponIdUrl: `${host_sh}/front/public/user/getUserCouponId`, /** 获取用户优惠券表id */ | ||
UserCouponInfoUrl: `${host_sh}/front/public/user/url/getUserCouponInfo`, /** 获取用户优惠券信息 */ | ||
ServiceTypeListUrl: `${host_sh}/front/public/door/getServiceTypeList`,/** 分类服务 */ | ||
ServiceSearchListUrl: `${host_sh}/front/public/search/getServiceSearchList`, /** 好服务搜索 */ | ||
ServiceDetailInfoUrL: `${host_sh}/front/public/door/viewServiceDetailInfo`, /** 获取服务详情数据 */ | ||
AdvertCaroucelsUrl: `${host_sh}/front/public/advert/getAdvertCaroucels`, /**吃喝玩乐 - 广告轮播*/ | ||
ChildCateUrl: `${host_sh}/front/public/common/url/getChildCate`, /** 吃喝玩乐 - 分类 */ | ||
LifeSearchListUrl: `${host_sh}/front/public/search/getLifeSearchList`, /** 吃喝玩乐 - 条件检索 */ | ||
HighestDiscountUrl: `${host_sh}/front/public/getHighestDiscount`, /** 吃喝玩乐 - 条件检索 - 对应折扣查询 */ | ||
PrdSearchListUrl: `${host_sh}/front/public/search/getPrdSearchList`, /** 好商品搜索 */ | ||
PrdFirstCategoryUrl: `${host_sh}/front/public/search/getPrdFirstCategory`, /** 获取好商品所有一级分类 */ | ||
}; | ||
|
||
module.exports = config |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.