跳转逻辑改变

This commit is contained in:
luchenqun 2018-05-19 21:00:37 +08:00
parent ae963c76b9
commit a8a3889af7
14 changed files with 72 additions and 31 deletions

BIN
public/images/wx.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
public/images/zfb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -1,5 +1,9 @@
app.controller('adviceCtr', ['$scope', '$state', '$timeout', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $state, $timeout, bookmarkService, pubSubService, dataService) {
console.log("Hello adviceCtr");
if(dataService.smallDevice()){
$window.location = "http://m.mybookmark.cn/#/tags";
return;
}
var maxSelections = 3;
$scope.comment = '';

View File

@ -1,7 +1,6 @@
app.controller('bookmarksCtr', ['$scope', '$state', '$stateParams', '$filter', '$window', '$timeout', '$document', 'ngDialog', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $state, $stateParams, $filter, $window, $timeout, $document, ngDialog, bookmarkService, pubSubService, dataService) {
console.log("Hello bookmarksCtr...", $stateParams);
var browser = dataService.browser();
if(browser.mobile && !browser.iPad){
if(dataService.smallDevice()){
$window.location = "http://m.mybookmark.cn/#/tags";
return;
}

View File

@ -1,9 +1,7 @@
app.controller('homeCtr', ['$scope', '$stateParams', '$filter', '$state', '$window', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $stateParams, $filter, $state, $window, bookmarkService, pubSubService, dataService) {
console.log('Hello homeCtr......');
var browser = dataService.browser();
if(browser.mobile && !browser.iPad){
toastr.success(JSON.stringify(browser), "提示");
$window.location = "http://m.mybookmark.cn";
if(dataService.smallDevice()){
$window.location = "http://m.mybookmark.cn/#/tags";
return;
}
bookmarkService.autoLogin()

View File

@ -1,7 +1,6 @@
app.controller('hotCtr', ['$scope', '$state', '$stateParams', '$filter', '$window', '$timeout', '$document', 'ngDialog', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $state, $stateParams, $filter, $window, $timeout, $document, ngDialog, bookmarkService, pubSubService, dataService) {
console.log("Hello hotCtr...");
var browser = dataService.browser();
if(browser.mobile && !browser.iPad){
if(dataService.smallDevice()){
$window.location = "http://m.mybookmark.cn/#/tags";
return;
}

View File

@ -1,8 +1,7 @@
app.controller('loginCtr', ['$scope', '$filter', '$state', '$cookieStore', '$window', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $filter, $state, $cookieStore, $window, bookmarkService, pubSubService, dataService) {
console.log("Hello loginCtr...", $cookieStore.get("username"));
var browser = dataService.browser();
if(browser.mobile && !browser.iPad){
$window.location = "http://m.mybookmark.cn/#/login";
if(dataService.smallDevice()){
$window.location = "http://m.mybookmark.cn/#/tags";
return;
}

View File

@ -1,8 +1,7 @@
app.controller('noteCtr', ['$scope', '$state', '$stateParams', '$filter', '$window', '$timeout', '$document', 'ngDialog', 'bookmarkService', 'pubSubService', 'dataService', function ($scope, $state, $stateParams, $filter, $window, $timeout, $document, ngDialog, bookmarkService, pubSubService, dataService) {
console.log("Hello noteCtr...", $stateParams);
var browser = dataService.browser();
if(browser.mobile && !browser.iPad){
$window.location = "http://m.mybookmark.cn/#/note";
if(dataService.smallDevice()){
$window.location = "http://m.mybookmark.cn/#/tags";
return;
}

View File

@ -1,6 +1,9 @@
app.controller('praiseCtr', ['$scope', '$state', '$stateParams', '$filter', '$window', '$timeout', 'ngDialog', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $state, $stateParams, $filter, $window, $timeout, ngDialog, bookmarkService, pubSubService, dataService) {
console.log("Hello praiseCtr...", $stateParams);
if(dataService.smallDevice()){
$window.location = "http://m.mybookmark.cn/#/tags";
return;
}
bookmarkService.autoLogin()
.then((data) => {
var login = data.logined;

View File

@ -1,8 +1,7 @@
app.controller('searchCtr', ['$scope', '$state', '$stateParams', '$filter', '$window', '$timeout', '$document', 'ngDialog', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $state, $stateParams, $filter, $window, $timeout, $document, ngDialog, bookmarkService, pubSubService, dataService) {
console.log("Hello searchCtr...", $stateParams);
var browser = dataService.browser();
if(browser.mobile && !browser.iPad){
$window.location = "http://m.mybookmark.cn/#/search";
if(dataService.smallDevice()){
$window.location = "http://m.mybookmark.cn/#/tags";
return;
}

View File

@ -1,13 +1,12 @@
app.controller('settingsCtr', ['$scope', '$stateParams', '$filter', '$state', '$window', '$timeout', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $stateParams, $filter, $state, $window, $timeout, bookmarkService, pubSubService, dataService) {
console.log('Hello settingsCtr......', $stateParams);
var browser = dataService.browser();
if(browser.mobile && !browser.iPad){
$window.location = "http://m.mybookmark.cn/#/settings";
if(dataService.smallDevice()){
$window.location = "http://m.mybookmark.cn/#/tags";
return;
}
$scope.forbidQuickKey = dataService.forbidQuickKey
$scope.form = [false, false, false, false, false, false];
$scope.form = [false, false, false, false, false, false, false];
$scope.passwordOrgin = "";
$scope.passwordNew1 = "";
$scope.passwordNew2 = "";

View File

@ -1,7 +1,6 @@
app.controller('tagsCtr', ['$scope', '$filter', '$window', '$stateParams', '$timeout', '$document', 'ngDialog', 'bookmarkService', 'pubSubService', 'dataService', function ($scope, $filter, $window, $stateParams, $timeout, $document, ngDialog, bookmarkService, pubSubService, dataService) {
console.log("Hello tagsCtr...", $stateParams);
var browser = dataService.browser();
if(browser.mobile && !browser.iPad){
if(dataService.smallDevice()){
$window.location = "http://m.mybookmark.cn/#/tags";
return;
}

View File

@ -33,9 +33,6 @@ app.factory('dataService', [function() {
}, {
uiSref: 'advice',
title: '留言'
}, {
uiSref: 'praise',
title: '咖啡'
}],
notLoginMenus: [{
uiSref: '/',
@ -133,10 +130,10 @@ app.factory('dataService', [function() {
$("#clipboard").attr("data-clipboard-text", text);
document.getElementById("clipboard").click();
},
browser: function() {
var u = navigator.userAgent,
app = navigator.appVersion;
return { //移动终端浏览器版本信息
smallDevice: function() {
var u = navigator.userAgent;
var app = navigator.appVersion;
var device = { //移动终端浏览器版本信息
trident: u.indexOf('Trident') > -1, //IE内核
presto: u.indexOf('Presto') > -1, //opera内核
webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
@ -148,6 +145,12 @@ app.factory('dataService', [function() {
iPad: u.indexOf('iPad') > -1, //是否iPad
webApp: u.indexOf('Safari') == -1 //是否web应该程序没有头部与底部
};
if((device.mobile && !device.iPad) || (screen && screen.availWidth < 768)){
return true;
}
return false;
}
};

View File

@ -14,6 +14,8 @@
</a>
<a class="item" ng-class="{active:form[5]}" ng-click="changeForm(5)">更新日志
</a>
<a class="item" ng-class="{active:form[6]}" ng-click="changeForm(6)">请喝咖啡
</a>
</div>
</div>
<div class="twelve wide stretched column">
@ -214,6 +216,44 @@
更早日志
</button>
</div>
<div class="ui container js-p-info" ng-show="form[6]">
<h3 class="ui dividing header">赞赏说明</h3>
<p>赞赏金额主要用于服务器的租用与域名的费用,对于赞赏有以下几点说明:</p>
<p>1、目前租用的服务器Vultr每月5$折合人名币大概35元/月。如果有新用户想购买Vultr服务器的可以点击<a href="http://www.vultr.com/?ref=6902013" target="_blank">链接</a>进行购买这样你我将都能得到10$。域名mybookmark.cn我花151元买了五年2021年11月份到期。</p>
<p>2、由于目前的服务器在国外导致有时候访问比较慢如果赞赏金融余额能支撑起在国内租用服务器费用将在国内租用一个服务器以提高访问速度。如果有能提供国内免费服务器的更佳</p>
<p>3、对于开发计划优先开发赞赏用户提出的需求当然需要我自己同意加入开发计划。</p>
<p>4、赞赏用户的一些其他特权暂未开发可以自定义网站背景可自定义更多的分类目前上限为30个</p>
<p>5、赞赏转账的时候请留言至少添加“书签赞赏”这四个汉字以供我做区分。赞赏之后我会及时将赞赏信息更新到网站上如果有遗漏可联系我微信QQ530485521或者在留言版块说明。</p>
<h3 class="ui dividing header">赞赏二维码</h3>
<div class="ui grid">
<div class="one wide column"></div>
<div class="five wide column">微信<img class="ui rounded left floated medium image" src="./images/wx.png"></div>
<div class="two wide column"></div>
<div class="five wide column">支付宝<img class="ui rounded right floated medium image" src="./images/zfb.png"></div>
<div class="one wide column"></div>
</div>
<h3 class="ui dividing header">赞赏排行版</h3>
<table class="ui selectable celled table">
<thead>
<tr>
<th>用户</th>
<th>昵称</th>
<th>赞赏日期</th>
<th>赞赏金融(人民币)</th>
<th>留言说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>lcq</td>
<td>泥巴</td>
<td>2017-03-01 12:03:08</td>
<td>210</td>
<td>本人用于服务器租用</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>