使用jquery1.3比较小

This commit is contained in:
guange 2016-06-12 13:40:14 +08:00
parent 36fedd4d15
commit d3c45fd133
7 changed files with 10 additions and 24 deletions

View File

@ -2,7 +2,7 @@ button:
-
type: "view"
name: "我的动态"
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=123#wechat_redirect"
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf694495398c7d470&redirect_uri=http://wechat.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=123#wechat_redirect"
-
type: "click"
name: "意见反馈"

View File

@ -5,11 +5,11 @@ default: &default
# Or if using public account, only need above two line
# guange test
#appid: "wxf694495398c7d470"
#secret: "743e038392f1d89540e95f8f7645849a"
appid: "wxf694495398c7d470"
secret: "743e038392f1d89540e95f8f7645849a"
appid: "wx8e1ab05163a28e37"
secret: "beb4d3bc4b32b3557811680835357841"
#appid: "wx8e1ab05163a28e37"
#secret: "beb4d3bc4b32b3557811680835357841"
token: "123456"
access_token: "1234567"

View File

@ -17,7 +17,6 @@
<div ng-view>
</div>
<script src="/javascripts/jquery-1.3.2.js"></script>
<script src="/javascripts/wechat/build/angular.all.min.js"></script>
<script src="/javascripts/wechat/app.js"></script>
</body>

View File

@ -1,4 +1,4 @@
var app = angular.module('wechat', ['ngRoute','ngCookies']);
var app = angular.module('wechat', ['ngRoute']);
var apiUrl = '/api/v1/';
var debug = false; //调试标志,如果在本地请置为true
@ -8,7 +8,7 @@ if(debug===true){
}
app.factory('auth', function($http,$routeParams, $cookies, $q){
app.factory('auth', function($http,$routeParams, $q){
var _openid = '';
if(typeof g_openid !== 'undefined'){
@ -31,15 +31,6 @@ app.factory('auth', function($http,$routeParams, $cookies, $q){
method: 'POST'
}).then(function successCallback(response) {
_openid = response.data.openid;
if(typeof _openid !== 'undefined' && _openid.length>0){
if(debug !== true){ //如果是生产环境,就存到cookies中
$cookies.put("openid", _openid);
}
} else {
if(debug!==true){//考虑从cookies中取出
_openid = $cookies.get('openid');
}
}
deferred.resolve(_openid);
}, function errorCallback(response) {
deferred.reject(response);

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@ var gulp = require('gulp'),
var concat = require('gulp-concat');
gulp.task('minify', function () {
gulp.src(['angular.js', 'angular-route.js', 'angular-cookies.js', 'angular-sanitize.min.js'])
gulp.src(['../jquery-1.3.2.js','angular.js', 'angular-route.js', 'angular-sanitize.min.js'])
.pipe(uglify())
.pipe(concat('angular.all.min.js'))
.pipe(gulp.dest('build'))

File diff suppressed because one or more lines are too long