Skip to content

Commit 97763ea

Browse files
committed
change
1 parent 8ae7f2a commit 97763ea

36 files changed

+742
-640
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
dist
3+
.DB_store

.prettierrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

.wepycache

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"I:\\newvuesvn\\wepy-customer\\node_modules\\wepy\\lib\\wepy.js":1519786782000,"I:\\newvuesvn\\wepy-customer\\node_modules\\wepy-async-function\\index.js":1523427808000,"I:\\newvuesvn\\wepy-customer\\node_modules\\qs\\lib\\index.js":1488790926000,"I:\\newvuesvn\\wepy-customer\\node_modules\\wepy\\lib\\app.js":1519786782000,"I:\\newvuesvn\\wepy-customer\\node_modules\\wepy\\lib\\page.js":1519786782000,"I:\\newvuesvn\\wepy-customer\\node_modules\\wepy\\lib\\component.js":1519786782000,"I:\\newvuesvn\\wepy-customer\\node_modules\\wepy\\lib\\event.js":1519786782000,"I:\\newvuesvn\\wepy-customer\\node_modules\\wepy\\lib\\base.js":1519786782000,"I:\\newvuesvn\\wepy-customer\\node_modules\\wepy\\lib\\util.js":1519786782000,"I:\\newvuesvn\\wepy-customer\\node_modules\\wepy\\lib\\mixin.js":1519786782000,"I:\\newvuesvn\\wepy-customer\\node_modules\\wepy-async-function\\global.js":1517302333000,"I:\\newvuesvn\\wepy-customer\\node_modules\\promise-polyfill\\promise.js":1511627065000,"I:\\newvuesvn\\wepy-customer\\node_modules\\regenerator-runtime\\runtime.js":1493390741000,"I:\\newvuesvn\\wepy-customer\\node_modules\\qs\\lib\\stringify.js":1488790926000,"I:\\newvuesvn\\wepy-customer\\node_modules\\qs\\lib\\parse.js":1488790926000,"I:\\newvuesvn\\wepy-customer\\node_modules\\qs\\lib\\formats.js":1488790926000,"I:\\newvuesvn\\wepy-customer\\node_modules\\wepy\\lib\\native.js":1519786782000,"I:\\newvuesvn\\wepy-customer\\node_modules\\qs\\lib\\utils.js":1488790926000}

.wepyignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
.DB_store
4+
*.wpy___jb_tmp___

package.json

+10-7
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,27 @@
2020
"redux": "^4.0.0",
2121
"wepy": "^1.6.0",
2222
"wepy-async-function": "^1.4.4",
23-
"wepy-redux": "^1.5.6"
23+
"wepy-com-toast": "^1.0.2",
24+
"wepy-compiler-typescript": "^1.5.9",
25+
"wepy-redux": "^1.5.6",
26+
"wepy-web": "^1.6.0"
2427
},
2528
"devDependencies": {
2629
"babel-eslint": "^7.2.1",
2730
"babel-plugin-syntax-export-extensions": "^6.13.0",
28-
"babel-plugin-transform-export-extensions": "^6.22.0",
29-
"babel-preset-es2015": "^6.24.0",
30-
"babel-preset-stage-1": "^6.22.0",
3131
"babel-plugin-transform-class-properties": "^6.24.1",
3232
"babel-plugin-transform-decorators-legacy": "^1.3.4",
33+
"babel-plugin-transform-export-extensions": "^6.22.0",
3334
"babel-plugin-transform-object-rest-spread": "^6.26.0",
3435
"babel-preset-env": "^1.6.1",
36+
"babel-preset-es2015": "^6.24.0",
37+
"babel-preset-stage-1": "^6.22.0",
3538
"cross-env": "^5.1.3",
3639
"wepy-compiler-babel": "^1.5.1",
3740
"wepy-compiler-less": "^1.3.10",
38-
"wepy-plugin-imagemin": "^1.5.2",
39-
"wepy-plugin-uglifyjs": "^1.3.6",
4041
"wepy-compiler-sass": "0.0.3",
41-
"wepy-eslint": "^1.5.3"
42+
"wepy-eslint": "^1.5.3",
43+
"wepy-plugin-imagemin": "^1.5.2",
44+
"wepy-plugin-uglifyjs": "^1.3.6"
4245
}
4346
}

project.config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"newFeature": true
99
},
1010
"compileType": "miniprogram",
11-
"appid": "wx53e73f3576558314",
11+
"appid": "wxe0be55a8c3e0ac3b",
1212
"projectname": "wepy",
1313
"miniprogramRoot": "./dist",
1414
"libVersion": "1.9.91",

src/app.vue

+34-38
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ page {
1212
overflow: hidden;
1313
min-height: 100px;
1414
box-sizing: border-box;
15+
HEIGHT:100%;
1516
}
1617
textarea {
1718
width: auto;
@@ -34,6 +35,9 @@ icon {
3435
.padding-15 {
3536
padding: 15px;
3637
}
38+
.padding-top-15{
39+
padding-top:15px;
40+
}
3741
.margin-auto {
3842
margin: 0 auto;
3943
}
@@ -43,6 +47,9 @@ icon {
4347
.full-height{
4448
height:100%;
4549
}
50+
.zan-loadmore__tips{
51+
background: #f1f2f7 !important;
52+
}
4653
</style>
4754

4855
<script>
@@ -58,22 +65,7 @@ export default class extends wepy.app {
5865
// 这里只能是静态数据
5966
config = {
6067
pages: [
61-
'pages/customer/index',
62-
'pages/customer/login',
63-
'pages/business/index',
64-
'pages/business/login',
65-
'pages/index',
66-
'pages/customer/authentication',
67-
'pages/customer/auth_success',
68-
'pages/customer/contract',
69-
'pages/customer/progress',
70-
'pages/business/pact/index',
71-
'pages/business/pact/add',
72-
'pages/business/pact/detail',
73-
'pages/business/pact/submit',
74-
'pages/business/progress/index',
75-
'pages/business/progress/add',
76-
'pages/business/progress/submit'
68+
'pages/login'
7769
],
7870
window: {
7971
backgroundTextStyle: 'light',
@@ -86,15 +78,15 @@ export default class extends wepy.app {
8678
constructor() {
8779
super();
8880
this.use('requestfix');
89-
console.log(this)
9081
}
9182
9283
onLaunch(options) {
93-
console.log(this)
94-
console.log(options)
9584
let _self = this;
9685
this.intercept('request', {
9786
config(res) {
87+
if (!res.data) {
88+
res.data = {}
89+
}
9890
res.data.token = G.token;
9991
res.data = qs.stringify(res.data);
10092
@@ -122,7 +114,7 @@ export default class extends wepy.app {
122114
case 401:
123115
G.token = '';
124116
wx.redirectTo({
125-
url: '../index'
117+
url: 'login'
126118
});
127119
return false;
128120
break;
@@ -135,7 +127,11 @@ export default class extends wepy.app {
135127
break;
136128
default:
137129
if (res.data.ret) {
138-
Tip.errorToast('数据格式错误' + res.data.msg);
130+
wx.showToast({
131+
title: res.data.msg,
132+
icon: 'none',
133+
duration: 2000
134+
});
139135
return false;
140136
}
141137
return res.data;
@@ -188,11 +184,11 @@ export default class extends wepy.app {
188184
wx.login({
189185
success: async function(res) {
190186
if (res.code) {
191-
let result = await api.miniProgramLogin({ code: res.code });
187+
let result = await api.miniProgramLogin({ code: res.code });
192188
if (result) {
193-
wepy.G.openId = result.openid;
189+
G.openId = result.openid;
194190
if (callback) {
195-
callback();
191+
callback(res);
196192
}
197193
}
198194
} else {
@@ -202,19 +198,19 @@ export default class extends wepy.app {
202198
});
203199
}
204200
205-
getUserInfo() {
206-
wx.getSetting({
207-
success: function(res) {
208-
if (res.authSetting['scope.userInfo']) {
209-
// 已经授权,可以直接调用 getUserInfo 获取头像昵称
210-
wx.getUserInfo({
211-
success: function(res) {
212-
console.log(res);
213-
}
214-
});
215-
}
216-
}
217-
});
218-
}
201+
// getUserInfo() {
202+
// wx.getSetting({
203+
// success: function(res) {
204+
// if (res.authSetting['scope.userInfo']) {
205+
// // 已经授权,可以直接调用 getUserInfo 获取头像昵称
206+
// wx.getUserInfo({
207+
// success: function(res) {
208+
// console.log(res);
209+
// }
210+
// });
211+
// }
212+
// }
213+
// });
214+
// }
219215
}
220216
</script>

src/components/layout.vue

+7-9
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,24 @@
1111
</template>
1212

1313
<script>
14-
import wepy from 'wepy'
15-
export default class Layout extends wepy.component {
16-
};
14+
import wepy from 'wepy';
15+
export default class Layout extends wepy.component {}
1716
</script>
18-
1917
<style lang="scss" scoped>
2018
@import '../zanui/common.scss';
21-
view{
22-
display:unset;
19+
view {
20+
display: unset;
2321
}
2422
.wepy {
2523
&-view {
2624
margin: 0 auto;
2725
&:before {
28-
content: '';
26+
content: ' ';
2927
display: block;
3028
width: 100%;
3129
}
3230
&:after {
33-
content: '';
31+
content: ' ';
3432
display: block;
3533
width: 100%;
3634
}
@@ -53,7 +51,7 @@ view{
5351
position: relative;
5452
margin-bottom: -1px;
5553
&:after {
56-
content: '';
54+
content: ' ';
5755
display: block;
5856
width: 100%;
5957
}

0 commit comments

Comments
 (0)