-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ShaoWei
committed
Jun 9, 2019
0 parents
commit 103aca6
Showing
464 changed files
with
19,999 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Windows | ||
[Dd]esktop.ini | ||
Thumbs.db | ||
$RECYCLE.BIN/ | ||
|
||
# macOS | ||
.DS_Store | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
|
||
# Node.js | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
西邮校园百科社区 | ||
kjd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
App({ | ||
globalData:{ | ||
baikeId:'', | ||
phoneHeight:'', | ||
isRegister:false | ||
}, | ||
onLaunch: function () { | ||
var that = this | ||
wx.getSystemInfo({ //获取机型高度 | ||
success: function (res) { | ||
//console.log(res.windowHeight) | ||
that.globalData.phoneHeight=res.windowHeight | ||
} | ||
}) | ||
wx.BaaS = requirePlugin('sdkPlugin') | ||
//让插件帮助完成登录、支付等功能 | ||
wx.BaaS.wxExtend(wx.login, | ||
wx.getUserInfo, | ||
wx.requestPayment) | ||
let clientID ='ae509f5119f4d6e79bf1' | ||
wx.BaaS.init(clientID) | ||
// wx.BaaS.auth.register({ username: 'ifanrx', password: 'ifanrx123' }).then(user => { | ||
// console.log(user) | ||
// }).catch(err => { | ||
// // HError 对象 | ||
// }) | ||
|
||
// wx.BaaS.auth.login({ username: 'ifanrx', password: 'ifanrx123' }).then(user => { | ||
// //console.log(user) | ||
// }).catch(err => { | ||
// // HError | ||
// }) | ||
|
||
|
||
|
||
|
||
}, | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"pages": [ | ||
"pages/welcome/welcome", | ||
"pages/index/index", | ||
"pages/baike/baike", | ||
"pages/logs/logs", | ||
"pages/write/write", | ||
"pages/notice/notice", | ||
"pages/me/me", | ||
"self_pages/selfInfo/selfInfo", | ||
"pacakge_baike/schoolNet/schoolNet", | ||
"pages/comment/comment", | ||
"pages/write_success/write_success", | ||
"self_pages/notice_info/notice_info", | ||
"self_pages/selfRelease/selfRelease", | ||
"self_pages/collectedInfo/collectedInfo", | ||
"self_pages/aboutInfo/aboutInfo" | ||
], | ||
"window": { | ||
"backgroundTextStyle": "dark", | ||
"navigationBarBackgroundColor": "#1296db", | ||
"navigationBarTitleText": "邮我问", | ||
"navigationBarTextStyle": "black" | ||
}, | ||
"tabBar": { | ||
"color": "#cdcdcd", | ||
"selectedColor": "#1296db", | ||
"list": [ | ||
{ | ||
"pagePath": "pages/index/index", | ||
"text": "首页", | ||
"iconPath": "/icons/shouye.png", | ||
"selectedIconPath": "/icons/shouye_hl.png" | ||
}, | ||
{ | ||
"pagePath": "pages/baike/baike", | ||
"text": "速查", | ||
"iconPath": "/icons/baike.png", | ||
"selectedIconPath": "/icons/baike_hl.png" | ||
}, | ||
{ | ||
"pagePath": "pages/notice/notice", | ||
"text": "通知", | ||
"iconPath": "icons/notice.png", | ||
"selectedIconPath": "icons/notice_hl.png" | ||
}, | ||
{ | ||
"pagePath": "pages/me/me", | ||
"text": "我的", | ||
"iconPath": "icons/me.png", | ||
"selectedIconPath": "icons/me_hl.png" | ||
} | ||
] | ||
}, | ||
"plugins": { | ||
"sdkPlugin": { | ||
"version": "2.0.9", | ||
"provider": "wxc6b86e382a1e3294" | ||
} | ||
}, | ||
"sitemapLocation": "sitemap.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@import"iconfont.wxss"; | ||
/**app.wxss**/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
import baseComponent from '../helpers/baseComponent' | ||
|
||
baseComponent({ | ||
relations: { | ||
'../accordion/index': { | ||
type: 'child', | ||
observer() { | ||
this.debounce(this.changeCurrent) | ||
}, | ||
}, | ||
}, | ||
properties: { | ||
prefixCls: { | ||
type: String, | ||
value: 'wux-accordion-group', | ||
}, | ||
cellGroupPrefixCls: { | ||
type: String, | ||
value: 'wux-cell-group', | ||
}, | ||
defaultCurrent: { | ||
type: Array, | ||
value: [], | ||
}, | ||
current: { | ||
type: Array, | ||
value: [], | ||
observer: 'changeCurrent', | ||
}, | ||
controlled: { | ||
type: Boolean, | ||
value: false, | ||
}, | ||
accordion: { | ||
type: Boolean, | ||
value: false, | ||
}, | ||
title: { | ||
type: String, | ||
value: '', | ||
}, | ||
label: { | ||
type: String, | ||
value: '', | ||
}, | ||
}, | ||
data: { | ||
activeKey: '', | ||
keys: [], | ||
}, | ||
methods: { | ||
updated(activeKey, condition) { | ||
const elements = this.getRelationNodes('../accordion/index') | ||
|
||
if (elements.length > 0) { | ||
if (condition) { | ||
this.setData({ | ||
activeKey, | ||
}) | ||
|
||
elements.forEach((element, index) => { | ||
const key = element.data.key || String(index) | ||
const current = this.data.accordion ? activeKey[0] === key : activeKey.indexOf(key) !== -1 | ||
|
||
element.changeCurrent(current, key) | ||
}) | ||
} | ||
} | ||
|
||
if (this.data.keys.length !== elements.length) { | ||
this.setData({ | ||
keys: elements.map((element) => element.data) | ||
}) | ||
} | ||
}, | ||
changeCurrent(activeKey = this.data.current) { | ||
this.updated(activeKey, this.data.controlled) | ||
}, | ||
emitEvent(key) { | ||
this.triggerEvent('change', { | ||
key, | ||
keys: this.data.keys, | ||
}) | ||
}, | ||
setActiveKey(activeKey) { | ||
if (this.data.activeKey !== activeKey) { | ||
this.updated(activeKey, !this.data.controlled) | ||
} | ||
|
||
this.emitEvent(this.data.accordion ? activeKey[0] : activeKey) | ||
}, | ||
onClickItem(key) { | ||
let activeKey = [...this.data.activeKey] | ||
|
||
if (this.data.accordion) { | ||
activeKey = activeKey[0] === key ? [] : [key] | ||
} else { | ||
activeKey = activeKey.indexOf(key) !== -1 ? activeKey.filter((n) => n !== key) : [...activeKey, key] | ||
} | ||
|
||
this.setActiveKey(activeKey) | ||
}, | ||
}, | ||
ready() { | ||
const { defaultCurrent, current, controlled } = this.data | ||
const activeKey = controlled ? current : defaultCurrent | ||
|
||
this.updated(activeKey, true) | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"component": true, | ||
"usingComponents": { | ||
"wux-cell-group": "../cell-group/index" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<wux-cell-group wux-class="{{ prefixCls }}" prefixCls="{{ cellGroupPrefixCls }}" title="{{ title }}" label="{{ label }}"> | ||
<slot></slot> | ||
</wux-cell-group> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.wux-accordion-group{position:relative;border:none} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import baseComponent from '../helpers/baseComponent' | ||
import classNames from '../helpers/classNames' | ||
|
||
baseComponent({ | ||
relations: { | ||
'../accordion-group/index': { | ||
type: 'parent', | ||
}, | ||
}, | ||
properties: { | ||
prefixCls: { | ||
type: String, | ||
value: 'wux-accordion', | ||
}, | ||
key: { | ||
type: String, | ||
value: '', | ||
}, | ||
thumb: { | ||
type: String, | ||
value: '', | ||
}, | ||
title: { | ||
type: String, | ||
value: '', | ||
}, | ||
content: { | ||
type: String, | ||
value: '', | ||
}, | ||
disabled: { | ||
type: Boolean, | ||
value: false, | ||
}, | ||
showArrow: { | ||
type: Boolean, | ||
value: true, | ||
}, | ||
}, | ||
data: { | ||
current: false, | ||
index: '0', | ||
}, | ||
computed: { | ||
classes() { | ||
const { prefixCls, current, disabled } = this.data | ||
const wrap = classNames(prefixCls, { | ||
[`${prefixCls}--current`]: current, | ||
[`${prefixCls}--disabled`]: disabled, | ||
}) | ||
const hd = `${prefixCls}__hd` | ||
const thumb = `${prefixCls}__thumb` | ||
const title = `${prefixCls}__title` | ||
const arrow = `${prefixCls}__arrow` | ||
const bd = `${prefixCls}__bd` | ||
const content = `${prefixCls}__content` | ||
|
||
return { | ||
wrap, | ||
hd, | ||
thumb, | ||
title, | ||
arrow, | ||
bd, | ||
content, | ||
} | ||
}, | ||
}, | ||
methods: { | ||
changeCurrent(current, index) { | ||
this.setData({ | ||
current, | ||
index, | ||
}) | ||
}, | ||
onTap() { | ||
const { index, disabled } = this.data | ||
const parent = this.getRelationNodes('../accordion-group/index')[0] | ||
|
||
if (disabled || !parent) { | ||
return false | ||
} | ||
|
||
parent.onClickItem(index) | ||
}, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"component": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<view class="wux-class {{ classes.wrap }}"> | ||
<view class="{{ classes.hd }}" bindtap="onTap"> | ||
<block wx:if="{{ thumb }}"> | ||
<image class="{{ classes.thumb }}" src="{{ thumb }}" /> | ||
</block> | ||
<block wx:if="{{ title }}"> | ||
<view class="{{ classes.title }}">{{ title }}</view> | ||
</block> | ||
<block wx:else> | ||
<slot name="header"></slot> | ||
</block> | ||
<view class="{{ classes.arrow }}" wx:if="{{ showArrow }}"></view> | ||
</view> | ||
<view class="{{ classes.bd }}"> | ||
<view class="{{ classes.content }}" wx:if="{{ content }}">{{ content }}</view> | ||
<slot></slot> | ||
</view> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.wux-accordion__hd{position:relative;padding:20rpx 30rpx;color:#000;background-color:#fff;box-sizing:border-box;padding-left:30rpx;padding-right:60rpx;width:auto;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.wux-accordion__hd:after{content:" ";position:absolute;bottom:0;right:0;height:2rpx;border-bottom:2rpx solid #d9d9d9;color:#d9d9d9;transform-origin:0 100%;transform:scaleY(.5);left:0}.wux-accordion__thumb{display:block;width:40rpx;height:40rpx;margin-right:10rpx}.wux-accordion__arrow{position:absolute;display:block;top:30rpx;right:30rpx;width:30rpx;height:30rpx;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='26' viewBox='0 0 16 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 0L0 2l11.5 11L0 24l2 2 14-13z' fill='%23C7C7CC' fill-rule='evenodd'/%3E%3C/svg%3E");background-size:contain;background-repeat:no-repeat;background-position:50% 50%;transform:rotate(90deg);transition:transform .2s ease}.wux-accordion--current .wux-accordion__arrow{transform:rotate(270deg)}.wux-accordion__bd{display:none;overflow:hidden;background:#fff;font-size:30rpx;color:#333;position:relative;padding:30rpx}.wux-accordion__bd:after{content:" ";position:absolute;bottom:0;right:0;height:2rpx;border-bottom:2rpx solid #d9d9d9;color:#d9d9d9;transform-origin:0 100%;transform:scaleY(.5);left:0}.wux-accordion--current .wux-accordion__bd{display:block} |
Oops, something went wrong.