使用jquery1.3比较小
This commit is contained in:
parent
36fedd4d15
commit
d3c45fd133
|
@ -2,7 +2,7 @@ button:
|
||||||
-
|
-
|
||||||
type: "view"
|
type: "view"
|
||||||
name: "我的动态"
|
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"
|
type: "click"
|
||||||
name: "意见反馈"
|
name: "意见反馈"
|
||||||
|
|
|
@ -5,11 +5,11 @@ default: &default
|
||||||
# Or if using public account, only need above two line
|
# Or if using public account, only need above two line
|
||||||
|
|
||||||
# guange test
|
# guange test
|
||||||
#appid: "wxf694495398c7d470"
|
appid: "wxf694495398c7d470"
|
||||||
#secret: "743e038392f1d89540e95f8f7645849a"
|
secret: "743e038392f1d89540e95f8f7645849a"
|
||||||
|
|
||||||
appid: "wx8e1ab05163a28e37"
|
#appid: "wx8e1ab05163a28e37"
|
||||||
secret: "beb4d3bc4b32b3557811680835357841"
|
#secret: "beb4d3bc4b32b3557811680835357841"
|
||||||
|
|
||||||
token: "123456"
|
token: "123456"
|
||||||
access_token: "1234567"
|
access_token: "1234567"
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
<div ng-view>
|
<div ng-view>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/javascripts/jquery-1.3.2.js"></script>
|
|
||||||
<script src="/javascripts/wechat/build/angular.all.min.js"></script>
|
<script src="/javascripts/wechat/build/angular.all.min.js"></script>
|
||||||
<script src="/javascripts/wechat/app.js"></script>
|
<script src="/javascripts/wechat/app.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
var app = angular.module('wechat', ['ngRoute','ngCookies']);
|
var app = angular.module('wechat', ['ngRoute']);
|
||||||
var apiUrl = '/api/v1/';
|
var apiUrl = '/api/v1/';
|
||||||
var debug = false; //调试标志,如果在本地请置为true
|
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 = '';
|
var _openid = '';
|
||||||
|
|
||||||
if(typeof g_openid !== 'undefined'){
|
if(typeof g_openid !== 'undefined'){
|
||||||
|
@ -31,15 +31,6 @@ app.factory('auth', function($http,$routeParams, $cookies, $q){
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
}).then(function successCallback(response) {
|
}).then(function successCallback(response) {
|
||||||
_openid = response.data.openid;
|
_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);
|
deferred.resolve(_openid);
|
||||||
}, function errorCallback(response) {
|
}, function errorCallback(response) {
|
||||||
deferred.reject(response);
|
deferred.reject(response);
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,7 +3,7 @@ var gulp = require('gulp'),
|
||||||
var concat = require('gulp-concat');
|
var concat = require('gulp-concat');
|
||||||
|
|
||||||
gulp.task('minify', function () {
|
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(uglify())
|
||||||
.pipe(concat('angular.all.min.js'))
|
.pipe(concat('angular.all.min.js'))
|
||||||
.pipe(gulp.dest('build'))
|
.pipe(gulp.dest('build'))
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue