Skip to content

Commit

Permalink
更新统计代码
Browse files Browse the repository at this point in the history
  • Loading branch information
axf520 committed Jan 21, 2017
1 parent 03d254e commit b007418
Show file tree
Hide file tree
Showing 21 changed files with 119 additions and 120 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.js]

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.idea/
utils/ald-sdk/
tests/
node_modules/
16 changes: 4 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
HotApp云笔记, 是基于[HotApp小程序统计云后台](https://weixin.hotapp.cn)提供的api接口开发的一个微信小程序

# 更新日志

- 2017-01-10 版本1.7 优化参数二维码中文字符问题

- 2017-01-09 版本1.6 增加小程序分享精准统计
# 2016-01-03 更新日志

- 2017-01-03 版本1.5 增加参数二维码精准统计功能
1 添加 添加错误日志上传 错误日志地址:https://weixin.hotapp.cn/analysis/errorlog

- 2017-01-02 版本1.4 添加错误日志上传, 错误日志地址:https://weixin.hotapp.cn/analysis/errorlog

- 2016-12-28 版本1.3.1 优化了用户反馈模块对用户唯一性的验证, 用户反馈地址:https://weixin.hotapp.cn/analysis/feedback

- 2016-12-27 版本1.3 新增加版本用户反馈组件功能

- 2016-12-25 版本1.0 添加分享功能, 可以把每个页面分享到好友和微信群;
2 添加 添加用户反馈功能 用户反馈地址:https://weixin.hotapp.cn/analysis/feedback

3 添加 添加分享功能 可以把每个页面分享到好友和微信群;

# 截图

Expand Down
28 changes: 14 additions & 14 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@
***API 文档地址:https://weixin.hotapp.cn/api
***小程序技术讨论QQ群:173063969
*/
var hotapp = require('utils/hotapp.js');

App({
var hotapp=require('./utils/hotapp');

hotapp.setDebug(true);

App({
/**
* 启动事件
*/
onLaunch: function () {

//使用HotApp小程序统计,统计小程序新增,日活,留存,当日可查看统计结果
//线上发布
hotapp.init('hotapp11377340');
// 输入debug错误日志, 建议生产环境不要开启
hotapp.setDebug(true);
//user logic
},
onShow: function(){
//user logic
},
onHide: function(){
//user logic
},
onError:function(msg){
//错误统计 2.0.0为版本号
hotapp.onError(msg,'2.0.0',function (err) {
console.log(err)
})
onError:function(err){
//
}
})
})
29 changes: 29 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "hotapp-notepad",
"version": "1.0.0",
"description": "hotapp-notepad wechat liteapp",
"main": "app.js",
"directories": {
"test": "tests"
},
"dependencies": {},
"devDependencies": {
"uglify-js": "^2.7.5"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/hotapp888/hotapp-notepad.git"
},
"keywords": [
"wechat"
],
"author": "jack",
"license": "MIT",
"bugs": {
"url": "https://github.com/hotapp888/hotapp-notepad/issues"
},
"homepage": "https://github.com/hotapp888/hotapp-notepad#readme"
}
17 changes: 14 additions & 3 deletions pages/about/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,33 @@ Page({
url: '../feedback/index'
})
},
//扫一扫
scanCode: function () {
wx.scanCode({
success: (res) => {

this.setData({
userInfo: res.result
})
}
})
},
onShareAppMessage: function () {
return {
title: '热点记事本反馈系统组件',
desc: '小程序二维码精准统计平台hotapp',
desc: '小程序二维码精准统计平台hotapp,技术讨论QQ群:173063969',
path: '/pages/about/index?hotappPath=about'
}
},
onLoad: function (option) {

},
onReady: function () {

},
onShow: function () {
// 生命周期函数--监听页面显示

},
onHide: function () {
// 生命周期函数--监听页面隐藏
Expand Down
2 changes: 1 addition & 1 deletion pages/about/index.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"navigationBarTitleText": "关于我们"
}
}
9 changes: 4 additions & 5 deletions pages/about/index.wxss
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@

.container {
height: 100%;
display: flex;
flex-direction: column;
box-sizing: border-box;
padding: 50rpx;
}

}
.header{
display: flex;
flex-direction: column;
Expand All @@ -25,9 +24,9 @@
border-radius: 10rpx;
background: #fff;
padding:0 20rpx;

}
.button{
display: flex;
justify-content: space-between;
}
}
13 changes: 3 additions & 10 deletions pages/create/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,8 @@ Page({
isNew: false,
focus: false
},
onShareAppMessage: function () {
return {
title: '热点记事本',
desc: '小程序二维码精准统计平台hotapp,技术讨论QQ群:173063969',
path: '/pages/about/create?hotappPath=create'
}
},
onLoad: function(options) {
hotapp.onLoad(this, options);
//
},

/**
Expand Down Expand Up @@ -84,12 +77,12 @@ Page({
wx.navigateBack();
},1000)
}
});
});
} else {
wx.showToast({
title: "保存失败"
});
}
});
}
});
});
2 changes: 1 addition & 1 deletion pages/create/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
<button formType="submit" class='btn success'>保存</button>
</view>
</view>
</form>
</form>
2 changes: 1 addition & 1 deletion pages/create/index.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ page{
.btn.del{
background: #e64340;
color: #fff;
}
}
12 changes: 1 addition & 11 deletions pages/edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@ Page({
isNew: false,
focus: false,
},
/**
* 分享功能
*/
onShareAppMessage: function () {
return {
title: '热点记事本',
desc: '小程序二维码精准统计平台hotapp,技术讨论QQ群:173063969',
path: '/pages/about/edit?hotappPath=edit'
}
},
/**
* 页面首次加载事件
*/
Expand Down Expand Up @@ -136,4 +126,4 @@ Page({
});
});
}
});
});
4 changes: 2 additions & 2 deletions pages/edit/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<input name="title" placeholder-class="placeholder" placeholder="在此输入标题(可选)" value="{{item.value.title}}" />
</view>
<view class='row' catchtap="onFocus">
<textarea class='text' value="{{item.value.content}}" maxlength="5000" auto-height="true"
<textarea class='text' value="{{item.value.content}}" maxlength="5000" auto-height="true"
placeholder-class="placeholder"
name="content" focus="{{focus}}" auto-focus="true" placeholder="点击添加文本" />
</view>
Expand All @@ -23,4 +23,4 @@
<button class='btn del' bindtap="onDelete">删除</button>
</view>
</view>
</form>
</form>
2 changes: 1 addition & 1 deletion pages/edit/index.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ page{
.btn.del{
background: #e64340;
color: #fff;
}
}
19 changes: 9 additions & 10 deletions pages/feedback/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ Page({
/***
* 分享功能
*/
// onShareAppMessage: function () {
// return {
// title: '热点记事本',
// desc: '小程序二维码精准统计平台hotapp,技术讨论QQ群:173063969',
// path: '/pages/about/feedback?hotappPath=feedback'
// }
// },
onShareAppMessage: function () {
return {
title: '热点记事本',
desc: '小程序二维码精准统计平台hotapp,技术讨论QQ群:173063969',
path: '/pages/about/feedback?hotappPath=feedback'
}
},

onLoad: function (options) {
hotapp.onLoad(this, options);
//
},
onReady: function () {
// 页面渲染完成
Expand Down Expand Up @@ -91,7 +91,6 @@ Page({
})
//提交输入框的数据
if (e.detail.value != '' && this.data.networkType != 'fail') {

//获取当前时间
var myDate = new Date();
var hours = myDate.getHours(); //获取当前小时数(0-23)
Expand Down Expand Up @@ -241,4 +240,4 @@ Page({
onUnload: function () {
// 页面关闭
}
})
})
2 changes: 1 addition & 1 deletion pages/feedback/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"navigationBarTitleText": "用户反馈",
"navigationBarBackgroundColor": "#000"

}
}
14 changes: 6 additions & 8 deletions pages/index/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ Page({
},

onLoad: function (options) {
//二维码参数统计
hotapp.onLoad(this, options);

},

/**
Expand All @@ -32,12 +31,11 @@ Page({
* 分享网页
*/
onShareAppMessage: function () {
// return {
// title: '热点记事本',
// desc: '小程序二维码精准统计平台hotapp,技术讨论QQ群:173063969',
// path: '/pages/about/index?id=页面参数&userId=备注信息'
// }
return hotapp.onShare(this, '热点记事本', '微信小程序记事本,笔记云端同步');
return {
title: '热点记事本',
desc: '小程序二维码精准统计平台hotapp,技术讨论QQ群:173063969',
path: '/pages/index/index?id=页面参数&userId=备注信息'
}
},
/**
* 新增笔记事件
Expand Down
4 changes: 2 additions & 2 deletions pages/index/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<view class='col'>
<view class='item add_box' bindtap="onNewItem">
<image class="add_bg" src="../../images/add.png" style="width:120rpx;height:120rpx;"></image>
</view>
</view>
<!--没有笔记时的提示-->
<block wx:if="{{items.length < 1}}">
<view class='tips'>
Expand All @@ -23,7 +23,7 @@
</view>

<!--笔记列表-->
<block wx:for="{{items}}">
<block wx:for="{{items}}" wx:key="{{key}}">
<view class="col" wx:if="{{ item.state != 3 }}">
<view class='item notepad {{item.class}}' data-key="{{item.key}}" bindtap="onEditItem">
<view class='content'>
Expand Down
Loading

0 comments on commit b007418

Please sign in to comment.