diff --git a/.gitignore b/.gitignore
index 14ea590..4196004 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,5 @@ $RECYCLE.BIN/
# Node.js
node_modules/
+
+miniprogram_npm/
diff --git a/api.js b/api.js
new file mode 100644
index 0000000..a366f38
--- /dev/null
+++ b/api.js
@@ -0,0 +1,216 @@
+const baseUri = "https://market-staging.huww98.cn/api";
+// const baseUri = "http://localhost:8080";
+
+const ErrorCode = {
+ InvalidJwt: 'invalid-jwt',
+}
+
+export class ApiError extends Error {
+ constructor(code, message) {
+ super(message);
+ this.code = code;
+ this.message = message;
+ }
+}
+
+function readApiResponse(response) {
+ const json = response.data;
+ if (response.statusCode != 200) {
+ if (json.errorCode) {
+ throw new ApiError(json.errorCode, json.message);
+ }
+ throw new Error("意外的错误");
+ }
+ return json;
+}
+
+function buildUri(path) {
+ return baseUri + path;
+}
+
+function callApi(path, init) {
+ let builtUri = buildUri(path);
+ if (init) {
+ let builtQuery = init.query;
+ if (init.query) {
+ delete init.query;
+ }
+ if (init.paging) {
+ builtQuery = {
+ page: init.paging.page,
+ size: init.paging.size || 10,
+ ...builtQuery
+ }
+ }
+ if (builtQuery) {
+ const params = Object.entries(builtQuery).map(([key, value]) => `${key}=${encodeURIComponent(value)}`);
+ builtUri += "?" + Array.prototype.join.call(params, "&");
+ }
+ }
+
+ return new Promise((resolve, reject) => {
+ wx.request({
+ ...init,
+ url: builtUri,
+ success: resolve,
+ fail: reject
+ })
+ }).then(readApiResponse);
+}
+
+function callApiWithAuthorization(path, init) {
+ const doCallApi = (jwt) => {
+ const builtInit = init || {};
+ builtInit.header = {
+ "Authorization": "Bearer " + jwt,
+ ...builtInit.header
+ }
+ return callApi(path, builtInit);
+ }
+ const loginAndCallApi = () => {
+ return login().then(() => {
+ doCallApi(getJwt())
+ });
+ }
+ const jwt = getJwt();
+ let callApiPromise;
+ if(jwt) {
+ return doCallApi(jwt).catch(e => {
+ if (e.errorCode == "invalid-jwt") {
+ logout();
+ return loginAndCallApi()
+ }
+ throw e;
+ });
+ } else {
+ return loginAndCallApi();
+ }
+}
+
+function callApiWarpper(method, path, body, init) {
+ const builtInit = {
+ method,
+ ...init
+ }
+ if (body) {
+ builtInit.data = body;
+ }
+ if (builtInit && builtInit.withAuthorization) {
+ delete builtInit.withAuthorization;
+ return callApiWithAuthorization(path, builtInit);
+ } else {
+ return callApi(path, builtInit);
+ }
+}
+
+function getApi(path, init) {
+ return callApiWarpper('GET', path, null, init);
+}
+
+function postApi(path, body, init) {
+ return callApiWarpper('POST', path, body, init);
+}
+
+function putApi(path, body, init) {
+ return callApiWarpper('PUT', path, body, init);
+}
+
+const jwtStorageKey = "JWT";
+export function getJwt() {
+ return wx.getStorageSync(jwtStorageKey);
+}
+
+let loginPromise = null;
+
+export function login() {
+ if (loginPromise != null) {
+ return loginPromise;
+ }
+ loginPromise = new Promise((resolve, reject) => {
+ wx.login({
+ success(res) {
+ if (res.code) {
+ resolve(res.code);
+ } else {
+ reject(res);
+ }
+ },
+ fail: reject
+ })
+ }).then(code => postApi("/wechat/login", { code }))
+ .then(result =>{
+ wx.setStorageSync(jwtStorageKey, result.jwt);
+ loginPromise = null;
+ });
+ return loginPromise;
+}
+
+export function logout() {
+ wx.removeStorageSync(jwtStorageKey);
+}
+
+export function hasLogedIn() {
+ return getJwt() !== null;
+}
+
+export function getAllCategories() {
+ return getApi("/categories");
+}
+
+export function getAllGoodsInCategory(categoryId, page) {
+ return getApi(`/categories/${categoryId}/goods`, {
+ paging: { page }
+ });
+}
+
+export function getGoods(goodsId) {
+ return getApi(`/goods/${goodsId}`);
+}
+
+export function uploadFile(localPath) {
+ const uri = buildUri('/wechat/uploadfile');
+ return new Promise((resolve, reject) => wx.uploadFile({
+ url: uri,
+ filePath: localPath,
+ name: 'file',
+ success: resolve,
+ fail: reject
+ })).then(res => {
+ res.data = JSON.parse(res.data)
+ return readApiResponse(res);
+ });
+}
+
+export function createGoods(goodsDescription) {
+ return postApi('/goods', goodsDescription, { withAuthorization: true });
+}
+
+export function getAllFavorite(page) {
+ return getApi('/goods/favorite', {
+ withAuthorization: true,
+ paging: { page }
+ });
+}
+
+export function addToFavorite(goodsId) {
+ return postApi(`/goods/${goodsId}/addToFavorite`, null, { withAuthorization: true });
+}
+
+export function deleteFromFavorite(goodsId) {
+ return postApi(`/goods/${goodsId}/deleteFromFavorite`, null, { withAuthorization: true });
+}
+
+export function getAllMy(page) {
+ return getApi('/goods/my', {
+ withAuthorization: true,
+ paging: { page }
+ });
+}
+
+export function getMy(descriptionId) {
+ return getApi(`/goods/my/${descriptionId}`, { withAuthorization: true });
+}
+
+export function updateGoods(goodsId, description) {
+ return putApi(`/goods/${goodsId}`, description, { withAuthorization: true });
+}
\ No newline at end of file
diff --git a/app.js b/app.js
index 68c629f..d4c5356 100644
--- a/app.js
+++ b/app.js
@@ -1,22 +1,10 @@
+import { login, getAllCategories } from "./api.js"
+
App({
globalData: {
-
+ allCategoriesPromise: getAllCategories()
},
- onLaunch: function () {
- wx.login({
- success: res => {
- wx.request({
- url: 'https://market-staging.huww98.cn/api/wechat/login',
- method: 'POST',
- data: {
- code: res.code
- },
- success: function (loginResult) {
- console.log(loginResult.statusCode);
- console.log(loginResult.data);
- }
- });
- }
- });
+ onLaunch() {
+ login();
}
})
diff --git a/app.json b/app.json
index fcad58a..6e5065a 100644
--- a/app.json
+++ b/app.json
@@ -1,9 +1,14 @@
{
"pages": [
"pages/index/index",
- "pages/list/list",
+ "pages/published/published",
"pages/post/post",
- "pages/detail/detail"
+ "pages/detail/detail",
+ "pages/i/i",
+ "pages/favorite/favorite",
+ "pages/about/about",
+ "pages/post/selectCategory",
+ "pages/post/selectArea"
],
"window": {
"backgroundColor": "#0071BD",
@@ -19,17 +24,38 @@
"text": "主页"
},
{
- "pagePath": "pages/post/post",
- "text": "发布"
+ "pagePath": "pages/i/i",
+ "text": "我"
}
],
"color": "#cccccc",
"selectedColor": "#00b26a"
},
"networkTimeout": {
- "request": 10000,
+ "request": 20000,
"connectSocket": 10000,
- "uploadFile": 10000,
+ "uploadFile": 60000,
"downloadFile": 10000
+ },
+ "usingComponents": {
+ "van-button": "vant-weapp/button",
+ "van-icon": "vant-weapp/icon",
+ "van-tab": "vant-weapp/tab",
+ "van-tabs": "vant-weapp/tabs",
+ "van-panel": "vant-weapp/panel",
+ "van-cell": "vant-weapp/cell",
+ "van-cell-group": "vant-weapp/cell-group",
+ "van-slider": "vant-weapp/slider",
+ "van-progress": "vant-weapp/progress",
+ "van-checkbox": "vant-weapp/checkbox",
+ "van-checkbox-group": "vant-weapp/checkbox-group",
+ "van-radio": "vant-weapp/radio",
+ "van-radio-group": "vant-weapp/radio-group",
+ "van-search": "vant-weapp/search",
+ "van-tag": "vant-weapp/tag",
+ "van-field": "vant-weapp/field",
+ "van-popup": "vant-weapp/popup",
+ "van-swipe-cell": "vant-weapp/swipe-cell",
+ "van-loading": "vant-weapp/loading"
}
}
\ No newline at end of file
diff --git a/app.wxss b/app.wxss
index 0bf63b7..aca15a2 100644
--- a/app.wxss
+++ b/app.wxss
@@ -1,4 +1,4 @@
-@import "style/weui.wxss";
+@import "miniprogram_npm/vant-weapp/common/index.wxss";
.container {
display: flex;
@@ -7,6 +7,21 @@
box-sizing: border-box;
}
+.no-item {
+ height: 40vh;
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+.no-more-item {
+ width: 100%;
+ text-align: center;
+ padding-top: 20px;
+ padding-bottom: 25px;
+}
+
page {
background-color: #f8f8f8;
font-size: 16px;
diff --git a/behaviors/apiCall.js b/behaviors/apiCall.js
new file mode 100644
index 0000000..49de0d8
--- /dev/null
+++ b/behaviors/apiCall.js
@@ -0,0 +1,23 @@
+export default Behavior({
+ data: {
+ loading: false,
+ loadingCount: 0
+ },
+ methods: {
+ callApi(promise) {
+ this.setData({
+ loading: true,
+ loadingCount: this.data.loadingCount + 1
+ });
+ const exitLoading = () => {
+ const loadingCount = this.data.loadingCount - 1
+ this.setData({
+ loading: loadingCount > 0,
+ loadingCount
+ });
+ }
+ promise.then(exitLoading, exitLoading);
+ return promise;
+ }
+ }
+})
\ No newline at end of file
diff --git a/behaviors/navigationBarLoading.js b/behaviors/navigationBarLoading.js
new file mode 100644
index 0000000..587226d
--- /dev/null
+++ b/behaviors/navigationBarLoading.js
@@ -0,0 +1,21 @@
+export default Behavior({
+ observers: {
+ loading() {
+ this.syncNavigationBarLoading();
+ }
+ },
+ pageLifetimes: {
+ show() {
+ this.syncNavigationBarLoading();
+ },
+ },
+ methods: {
+ syncNavigationBarLoading() {
+ if (this.data.loading) {
+ wx.showNavigationBarLoading();
+ } else {
+ wx.hideNavigationBarLoading();
+ }
+ }
+ }
+})
\ No newline at end of file
diff --git a/behaviors/pagedContent.js b/behaviors/pagedContent.js
new file mode 100644
index 0000000..42adfa5
--- /dev/null
+++ b/behaviors/pagedContent.js
@@ -0,0 +1,98 @@
+import apiCall from './apiCall.js'
+
+const pagedContent = Behavior({
+ behaviors: [apiCall],
+ data: {
+ totalPages: 0,
+ loadedPages: 0,
+ loadingNextPage: false,
+ isLastPage: false,
+ content: null
+ },
+ lifetimes: {
+ attached() {
+ this.loadFirstPage();
+ },
+ },
+ methods: {
+ /**
+ * @returns {Promise}
+ */
+ doLoadPage(pageToLoad) {
+ throw "Must be overrided";
+ },
+ /**
+ * @private
+ * @param {Promise<{}>} promise - Resolve to new data to be passed to setData.
+ */
+ _loadPage(promise) {
+ this.setData({ loadingNextPage: true });
+ this.loadingPromise = this.callApi(promise)
+ .then(newData => {
+ newData.isLastPage = newData.loadedPages >= newData.totalPages,
+ newData.loadingNextPage = false;
+ this.setData(newData);
+ this.loadingPromise = null;
+ }, e => {
+ this.setData({ loadingNextPage: false });
+ this.loadingPromise = null;
+ throw e;
+ });
+ return this.loadingPromise;
+ },
+ loadFirstPage() {
+ const loadPagePromise = this.doLoadPage(0)
+ .then(({ totalPages, content }) => {
+ const loadedPages = 1;
+ return {
+ totalPages,
+ loadedPages,
+ content
+ };
+ });
+ return this._loadPage(loadPagePromise);
+ },
+ loadNextPage() {
+ if (this.data.isLastPage) {
+ return Promise.resolve();
+ }
+ if (this.loadingPromise) {
+ return this.loadingPromise;
+ }
+ const loadPagePromise = this.doLoadPage(this.data.loadedPages)
+ .then(({ totalPages, content }) => {
+ const newData = {
+ totalPages,
+ loadedPages: this.data.loadedPages + 1,
+ };
+ const previousLength = (this.data.content || []).length;
+ content.forEach((item, index) => {
+ newData[`content[${previousLength + index}]`] = item
+ });
+ return newData;
+ })
+ return this._loadPage(loadPagePromise);
+ },
+ onReachBottom() {
+ this.loadNextPage();
+ },
+ onPullDownRefresh() {
+ const stopRefresh = () => {
+ wx.stopPullDownRefresh()
+ }
+ this.loadFirstPage().then(stopRefresh, stopRefresh);
+ }
+ }
+})
+
+export default pagedContent;
+export const pagedContentSyncStateOnLoad = Behavior({
+ behaviors: [pagedContent],
+ pageLifetimes: {
+ show() {
+ if (!this.data.loadingNextPage) {
+ wx.stopPullDownRefresh();
+ }
+ },
+ },
+});
\ No newline at end of file
diff --git a/components/sellingGoods/categorySellingGoodsList.js b/components/sellingGoods/categorySellingGoodsList.js
new file mode 100644
index 0000000..fbdb06a
--- /dev/null
+++ b/components/sellingGoods/categorySellingGoodsList.js
@@ -0,0 +1,19 @@
+import { getAllGoodsInCategory } from "../../api.js";
+import pagedContent from "../../behaviors/pagedContent.js"
+
+Component({
+ behaviors: [pagedContent],
+ options: {
+ addGlobalClass: true,
+ },
+ properties: {
+ categoryId: Number
+ },
+ data: {
+ },
+ methods: {
+ doLoadPage(pageToLoad) {
+ return getAllGoodsInCategory(this.data.categoryId, pageToLoad);
+ },
+ }
+})
diff --git a/components/sellingGoods/categorySellingGoodsList.json b/components/sellingGoods/categorySellingGoodsList.json
new file mode 100644
index 0000000..8c67165
--- /dev/null
+++ b/components/sellingGoods/categorySellingGoodsList.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "selling-goods": "./sellingGoods"
+ }
+}
diff --git a/components/sellingGoods/categorySellingGoodsList.wxml b/components/sellingGoods/categorySellingGoodsList.wxml
new file mode 100644
index 0000000..ef3bb81
--- /dev/null
+++ b/components/sellingGoods/categorySellingGoodsList.wxml
@@ -0,0 +1,5 @@
+
+
+
+
+没有更多内容了
\ No newline at end of file
diff --git a/components/sellingGoods/categorySellingGoodsList.wxss b/components/sellingGoods/categorySellingGoodsList.wxss
new file mode 100644
index 0000000..785b565
--- /dev/null
+++ b/components/sellingGoods/categorySellingGoodsList.wxss
@@ -0,0 +1,4 @@
+.loading {
+ padding-top: 40px;
+ text-align: center;
+}
\ No newline at end of file
diff --git a/components/sellingGoods/sellingGoods.js b/components/sellingGoods/sellingGoods.js
new file mode 100644
index 0000000..3c88bf7
--- /dev/null
+++ b/components/sellingGoods/sellingGoods.js
@@ -0,0 +1,26 @@
+import { area, sellOrBuy } from "../../i18n.js";
+
+Component({
+ properties: {
+ goods: {
+ type: Object,
+ observer() {
+ this.setData({
+ "photosInList": this.data.goods.currentDescription.photos.slice(0, 3)
+ });
+ }
+ }
+ },
+ data: {
+ i18n: {
+ area, sellOrBuy
+ },
+ },
+ methods: {
+ navigateToDetail({ currentTarget }) {
+ wx.navigateTo({
+ url: `/pages/detail/detail?id=${currentTarget.dataset.goodsId}`,
+ })
+ }
+ }
+})
diff --git a/components/sellingGoods/sellingGoods.json b/components/sellingGoods/sellingGoods.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/components/sellingGoods/sellingGoods.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/components/sellingGoods/sellingGoods.wxml b/components/sellingGoods/sellingGoods.wxml
new file mode 100644
index 0000000..e016974
--- /dev/null
+++ b/components/sellingGoods/sellingGoods.wxml
@@ -0,0 +1,17 @@
+
+ [{{i18n.sellOrBuy[goods.currentDescription.active]}}] {{goods.currentDescription.title}}
+
+
+
+
+ {{goods.currentDescription.detail}}
+
+
+
\ No newline at end of file
diff --git a/components/sellingGoods/sellingGoods.wxss b/components/sellingGoods/sellingGoods.wxss
new file mode 100644
index 0000000..d392098
--- /dev/null
+++ b/components/sellingGoods/sellingGoods.wxss
@@ -0,0 +1,40 @@
+.photo-list {
+ display: flex;
+ flex-direction: row;
+}
+
+.photo-list image {
+ margin: 1px;
+ height: 230rpx;
+ width: 230rpx;
+}
+
+.item {
+ padding: 0 10px;
+ margin: 5px 0;
+ background: #fff
+}
+
+.item-footer {
+ display: flex;
+ flex-direction: row;
+ align-items: baseline;
+}
+
+.price {
+ width: 110px;
+ color: #1173bc;
+ font-size: 1.4em;
+}
+
+.area {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+}
+
+.time {
+ text-align: right;
+ flex: auto;
+ color: #ccc;
+}
\ No newline at end of file
diff --git a/i18n.js b/i18n.js
new file mode 100644
index 0000000..9438eb1
--- /dev/null
+++ b/i18n.js
@@ -0,0 +1,9 @@
+export const area = {
+ north: "五山校区",
+ south: "大学城校区",
+}
+
+export const sellOrBuy = {
+ sell: "出售",
+ buy: "收购",
+}
diff --git a/images/addPhoto.svg b/images/addPhoto.svg
new file mode 100644
index 0000000..bbe8059
--- /dev/null
+++ b/images/addPhoto.svg
@@ -0,0 +1 @@
+
diff --git a/images/psb2.jpeg b/images/psb2.jpeg
new file mode 100644
index 0000000..5aa0667
Binary files /dev/null and b/images/psb2.jpeg differ
diff --git a/images/s1.jpg b/images/s1.jpg
new file mode 100644
index 0000000..909e646
Binary files /dev/null and b/images/s1.jpg differ
diff --git a/images/upload.png b/images/upload.png
deleted file mode 100644
index 2d133a3..0000000
Binary files a/images/upload.png and /dev/null differ
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..9097395
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,13 @@
+{
+ "name": "market-miniprogram",
+ "version": "0.2.1",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "vant-weapp": {
+ "version": "0.5.6",
+ "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.6.tgz",
+ "integrity": "sha512-hJyTRlc9DBqd/6mMExtKahfCPQSETiYokH/cuu2h2lGe6CVq9CiwdGHAnQqSahHIWFKKIs+V5S8IrumdJlxN2w=="
+ }
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..1b4692e
--- /dev/null
+++ b/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "market-miniprogram",
+ "version": "0.2.1",
+ "description": "华南理工大学学生会二手交易市场微信小程序",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/SCUT-StudentUnion/Market-miniprogram.git"
+ },
+ "author": "SCUT-StudentUnion",
+ "bugs": {
+ "url": "https://github.com/SCUT-StudentUnion/Market-miniprogram/issues"
+ },
+ "homepage": "https://github.com/SCUT-StudentUnion/Market-miniprogram#readme",
+ "dependencies": {
+ "vant-weapp": "^0.5.6"
+ }
+}
diff --git a/pages/about/about.js b/pages/about/about.js
new file mode 100644
index 0000000..0520273
--- /dev/null
+++ b/pages/about/about.js
@@ -0,0 +1,2 @@
+Page({
+})
\ No newline at end of file
diff --git a/pages/list/list.json b/pages/about/about.json
similarity index 100%
rename from pages/list/list.json
rename to pages/about/about.json
diff --git a/pages/about/about.wxml b/pages/about/about.wxml
new file mode 100644
index 0000000..44cbfa7
--- /dev/null
+++ b/pages/about/about.wxml
@@ -0,0 +1,7 @@
+
+华工集市
+Copyright© 华南理工大学学生会版权所有
+如有任何建议
+欢迎在华南理工大学学生会微信公众号后台留言反馈
+让我们共同建设更好的华工集市平台
+
\ No newline at end of file
diff --git a/pages/about/about.wxss b/pages/about/about.wxss
new file mode 100644
index 0000000..9e52ddb
--- /dev/null
+++ b/pages/about/about.wxss
@@ -0,0 +1,9 @@
+text {
+ height: 80vh;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ text-align:center;
+ color:#6e6e6e;
+ font-size:0.8em
+}
\ No newline at end of file
diff --git a/pages/detail/detail.js b/pages/detail/detail.js
index 501a7a1..da6a79b 100644
--- a/pages/detail/detail.js
+++ b/pages/detail/detail.js
@@ -1,67 +1,45 @@
+import {
+ getGoods
+} from "../../api.js";
+import { area, sellOrBuy } from "../../i18n.js";
Page({
-
- /**
- * 页面的初始数据
- */
data: {
- text: ""
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
+ text: 2,
+ detail: {
+ isCollected: "已收藏",
+ title: "网球拍大甩卖",
+ description: '11成新网球拍hahahahah哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈',
+ OldPrice: "¥666",
+ NewPrice: "¥233",
+ userid: "wxid_abcdefg",
+ contact: "23333",
+ place: "五山"
+ },
+ carousel: [
+ ]
+ },
+ onLoad: function(options) {
this.setData({
text: options.id
})
+ getGoods(this.data.text).then((
+ res
+ ) => {
+ console.log(res)
+ let desc = res.currentDescription;
+ this.setData({
+ 'detail.title': desc.title,
+ 'detail.description': desc.detail,
+ 'detail.place': (() => {
+ return area[desc.area]
+
+ })(),
+ 'detail.contact': `联系方式: ${ desc.contactInfo }`,
+ 'detail.NewPrice': desc.sellingPrice,
+ 'detail.userid': `用户id:${res.releasedBy.id}`,
+ 'carousel':desc.photos
+
+ })
+ })
},
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
-
- }
-})
+})
\ No newline at end of file
diff --git a/pages/detail/detail.wxml b/pages/detail/detail.wxml
index a71c57e..241c62b 100644
--- a/pages/detail/detail.wxml
+++ b/pages/detail/detail.wxml
@@ -1 +1,69 @@
-{{text}}
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 出售
+ {{ detail.title }}
+
+
+
+
+
+
+
+
+
+
+ {{detail.description}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 已售出此商品
+ 分享
+
+
\ No newline at end of file
diff --git a/pages/detail/detail.wxss b/pages/detail/detail.wxss
index 4c8cd74..125ed25 100644
--- a/pages/detail/detail.wxss
+++ b/pages/detail/detail.wxss
@@ -1 +1,140 @@
/* pages/detail/detail.wxss */
+
+.mycontainer {
+ display: flex;
+ background: white;
+ justify-content: flex-start;
+}
+
+.badge {
+ background: #1073ba;
+ border-radius: 15rpx;
+ color: white;
+ font-size: 22rpx;
+ padding: 10rpx;
+ margin-right: 10rpx;
+}
+
+.title{
+ font-size:28rpx;
+ font-weight: bold;
+}
+
+.inline{
+ display:inline-block;float:left;
+}
+
+.btn{
+ background:#1173bc!important;
+ color: white!important;
+}
+
+.weui-form-preview_modified {
+ position: relative;
+ background-color: #fff;
+}
+
+.weui-form-preview_modified:before {
+ top: 0;
+ border-top: 0rpx solid #d9d9d9;
+}
+
+.weui-form-preview_modified:after, .weui-form-preview_modified:before {
+ content: " ";
+ position: absolute;
+ left: 0;
+ right: 0;
+ height: 0px;
+ color: #d9d9d9;
+}
+
+
+.weui-form-preview__hd {
+ position: relative;
+ padding: 10px 15px;
+ text-align: right;
+ line-height: 2.5em;
+}
+
+.weui-form-preview__hd:after {
+ content: " ";
+ position: absolute;
+ left: 0;
+ bottom: 0;
+ right: 0;
+ height: 1px;
+ border-bottom: 0rpx solid #d9d9d9;
+ color: #d9d9d9;
+ left: 15px;
+}
+
+.weui-form-preview__ft {
+ position: relative;
+ line-height: 50px;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+}
+
+.weui-form-preview__ft:after {
+ content: " ";
+ position: absolute;
+ left: 0;
+ top: 0;
+ right: 0;
+ height: 0px;
+ border-top: 0rpx solid #d5d5d6;
+ color: #d5d5d6;
+}
+
+.weui-form-preview__value {
+ display: block;
+ overflow: hidden;
+ word-break: normal;
+ word-wrap: break-word;
+ color: black;
+
+}
+
+.weui-form-preview__value {
+ font-size: 14px;
+ flex-basis: 80%;
+ text-align: start;
+ text-align-last: start;
+}
+
+.weui-form-preview__value_in-hd {
+ font-size: 26px;
+}
+
+.weui-form-preview__item {
+ overflow: hidden;
+}
+
+.weui-form-preview__label {
+ float: left;
+ margin-right: 1em;
+ min-width: 4em;
+ color: #999;
+ text-align: start;
+ text-align-last: start;
+ flex-basis:20%;
+ flex-grow: 1
+}
+
+.van-panel {
+ background: #fff;
+}
+
+.van-panel__header-value {
+ color: #1173bc;
+ font-weight:normal;
+}
+
+.van-panel__footer {
+ padding: 10px 15px;
+}
+
+.van-panel__footer2 {
+ padding: 3px 15px;
+}
diff --git a/pages/favorite/favorite.js b/pages/favorite/favorite.js
new file mode 100644
index 0000000..431ea26
--- /dev/null
+++ b/pages/favorite/favorite.js
@@ -0,0 +1,26 @@
+import { getAllFavorite, deleteFromFavorite } from "../../api.js";
+import { pagedContentSyncStateOnLoad } from "../../behaviors/pagedContent.js"
+import navigationBarLoading from "../../behaviors/navigationBarLoading.js"
+
+Component({
+ behaviors: [pagedContentSyncStateOnLoad, navigationBarLoading],
+ data: {
+ },
+ methods: {
+ doLoadPage(pageToLoad) {
+ return getAllFavorite(pageToLoad);
+ },
+ delete({ currentTarget }) {
+ const goodsId = currentTarget.dataset.goodsId;
+ this.setData({
+ content: this.data.content.filter(f => f.goods.id != goodsId)
+ });
+ this.callApi(deleteFromFavorite(goodsId)).catch(e => {
+ wx.showToast({
+ title: '删除失败:' + e,
+ icon: 'none'
+ })
+ });
+ }
+ },
+})
\ No newline at end of file
diff --git a/pages/favorite/favorite.json b/pages/favorite/favorite.json
new file mode 100644
index 0000000..48769d2
--- /dev/null
+++ b/pages/favorite/favorite.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "selling-goods": "/components/sellingGoods/sellingGoods"
+ },
+ "navigationBarTitleText": "我的收藏",
+ "enablePullDownRefresh": true
+}
\ No newline at end of file
diff --git a/pages/favorite/favorite.wxml b/pages/favorite/favorite.wxml
new file mode 100644
index 0000000..cfb1b43
--- /dev/null
+++ b/pages/favorite/favorite.wxml
@@ -0,0 +1,9 @@
+
+
+ 删除
+
+
+
+你还没有收藏
+
+没有更多收藏了
\ No newline at end of file
diff --git a/pages/favorite/favorite.wxss b/pages/favorite/favorite.wxss
new file mode 100644
index 0000000..c68164d
--- /dev/null
+++ b/pages/favorite/favorite.wxss
@@ -0,0 +1,8 @@
+.delete-btn {
+ width: 65px;
+ height: 100%;
+ background: red;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
diff --git a/pages/i/i.js b/pages/i/i.js
new file mode 100644
index 0000000..72b5fe5
--- /dev/null
+++ b/pages/i/i.js
@@ -0,0 +1,5 @@
+Page({
+ data: {
+
+ },
+})
\ No newline at end of file
diff --git a/pages/i/i.json b/pages/i/i.json
new file mode 100644
index 0000000..9e26dfe
--- /dev/null
+++ b/pages/i/i.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/pages/i/i.wxml b/pages/i/i.wxml
new file mode 100644
index 0000000..71b7877
--- /dev/null
+++ b/pages/i/i.wxml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/i/i.wxss b/pages/i/i.wxss
new file mode 100644
index 0000000..237d673
--- /dev/null
+++ b/pages/i/i.wxss
@@ -0,0 +1,24 @@
+.header {
+ height: 300rpx;
+ background:#0071bd;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+}
+
+.header .avatar {
+ width: 160rpx;
+ height: 160rpx;
+ border-radius: 50%;
+ display: block;
+ overflow: hidden;
+}
+
+.header .nick-name {
+ color: white;
+}
+
+.cell-group {
+ margin-bottom: 20px;
+}
\ No newline at end of file
diff --git a/pages/index/index.js b/pages/index/index.js
index b5a39c1..d947f6d 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -1,42 +1,60 @@
-const app = getApp()
+const app = getApp();
-Page({
+Component({
data: {
- avatarUrl: './user-unlogin.png',
- userInfo: {},
- logged: false,
- takeSession: false,
- requestResult: ''
+ active: 0,
+ carousel: [{
+ id: 0,
+ img: '/images/s1.jpg',
+ url: '/pages/detail/detail'
+ },
+ {
+ id: 1,
+ img: '/images/psb2.jpeg',
+ url: '/pages/detail/detail'
+ }
+ ],
},
-
- onLoad: function () {
-
- // 获取用户信息
- wx.getSetting({
- success: res => {
- if (res.authSetting['scope.userInfo']) {
- // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
- wx.getUserInfo({
- success: res => {
- this.setData({
- avatarUrl: res.userInfo.avatarUrl,
- userInfo: res.userInfo
- })
- }
- })
- }
+ lifetimes: {
+ attached() {
+ app.globalData.allCategoriesPromise
+ .then(categories => {
+ this.setData({ categories })
+ });
+ this.loadList(0);
+ },
+ },
+ pageLifetimes: {
+ show() {
+ const lists = this.selectAllComponents(".list");
+ if (lists.every(l => !l.data.loadingNextPage)) {
+ wx.stopPullDownRefresh();
}
- })
+ },
},
-
- onGetUserInfo: function (e) {
- if (!this.logged && e.detail.userInfo) {
+ methods: {
+ activeList() {
+ return this.selectComponent(`#list-${this.data.active}`);
+ },
+ onPullDownRefresh() {
+ // Unload all lists but active one.
+ this.setData({
+ listLoaded: [],
+ [`listLoaded[${this.data.active}]`]: true
+ });
+ this.activeList().onPullDownRefresh();
+ },
+ onReachBottom() {
+ this.activeList().onReachBottom();
+ },
+ loadList(index) {
this.setData({
- logged: true,
- avatarUrl: e.detail.userInfo.avatarUrl,
- userInfo: e.detail.userInfo
- })
- }
- },
-
-})
+ active: index,
+ [`listLoaded[${index}]`]: true
+ });
+ },
+ tabChange({ detail: {index} }) {
+ this.loadList(index);
+ },
+ }
+})
\ No newline at end of file
diff --git a/pages/index/index.json b/pages/index/index.json
index 9e26dfe..06cc8f3 100644
--- a/pages/index/index.json
+++ b/pages/index/index.json
@@ -1 +1,6 @@
-{}
\ No newline at end of file
+{
+ "usingComponents": {
+ "selling-goods-list": "/components/sellingGoods/categorySellingGoodsList"
+ },
+ "enablePullDownRefresh": true
+}
\ No newline at end of file
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 5faa3b6..4b28596 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -1,21 +1,17 @@
-
+
+ 搜索
+
-
-
- 发布二手信息
-
-
+
+
+
+
+
-
-
- 商品列表
-
-
-
-
-
- Homepage is building...
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
index 446a469..348f3c5 100644
--- a/pages/index/index.wxss
+++ b/pages/index/index.wxss
@@ -1,61 +1,3 @@
-/**index.wxss**/
-
-page {
- background: #f6f6f6;
- display: flex;
- flex-direction: column;
- justify-content: flex-start;
-}
-
-.userinfo, .uploader {
- margin-top: 40rpx;
- height: 140rpx;
- width: 100%;
- background: #fff;
- border: 1px solid rgba(0, 0, 0, 0.1);
- border-left: none;
- border-right: none;
- display: flex;
- flex-direction: row;
- align-items: center;
- transition: all 300ms ease;
-}
-
-.userinfo-avatar {
- width: 100rpx;
- height: 100rpx;
- margin: 20rpx;
- border-radius: 50%;
- background-size: cover;
- background-color: white;
-}
-
-.userinfo-avatar:after {
- border: none;
-}
-
-.userinfo-nickname {
- font-size: 32rpx;
- color: #007aff;
- background-color: white;
- background-size: cover;
-}
-
-.userinfo-nickname::after {
- border: none;
-}
-
-.uploader {
- height: auto;
- padding: 0 0 0 0rpx;
- flex-direction: column;
- align-items: flex-start;
- box-sizing: border-box;
-}
-
-.uploader-text {
- width: 100%;
- line-height: 52px;
- font-size: 34rpx;
- color: #007aff;
-}
+.content {
+ min-height: 100vh;
+}
\ No newline at end of file
diff --git a/pages/index/user-unlogin.png b/pages/index/user-unlogin.png
deleted file mode 100644
index 95b27e4..0000000
Binary files a/pages/index/user-unlogin.png and /dev/null differ
diff --git a/pages/list/list.js b/pages/list/list.js
deleted file mode 100644
index 878d8de..0000000
--- a/pages/list/list.js
+++ /dev/null
@@ -1,78 +0,0 @@
-Page({
- data: {
- goods_list: [{
- id:1,
- title: "小风车",
- description: "转呀转呀转",
- pic: "/images/upload.png"
- }, {
- id:2,
- title: "大蟑螂",
- description: "交通工具",
- pic: "/images/upload.png"
- },
- {
- id:3,
- title: "二手书",
- description: "流通的二手书",
- pic: "/images/upload.png"
- }
- ]
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function(options) {
-
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function() {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function() {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function() {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function() {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function() {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function() {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function() {
-
- }
-})
\ No newline at end of file
diff --git a/pages/list/list.wxml b/pages/list/list.wxml
deleted file mode 100644
index 1b43a27..0000000
--- a/pages/list/list.wxml
+++ /dev/null
@@ -1,15 +0,0 @@
-
- 商品列表
-
-
-
-
-
-
- {{item.title}}
- {{item.description}}
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/list/list.wxss b/pages/list/list.wxss
deleted file mode 100644
index 601ce69..0000000
--- a/pages/list/list.wxss
+++ /dev/null
@@ -1 +0,0 @@
-/* pages/list/list.wxss */
\ No newline at end of file
diff --git a/pages/post/post.js b/pages/post/post.js
index d379282..f0f6455 100644
--- a/pages/post/post.js
+++ b/pages/post/post.js
@@ -1,74 +1,149 @@
-Page({
+import { area, sellOrBuy } from "../../i18n.js";
+import { uploadFile, createGoods, updateGoods, getMy } from "../../api.js"
+import apiCall from '../../behaviors/apiCall.js'
+import navigationBarLoading from "../../behaviors/navigationBarLoading.js"
+
+const descriptionDefaults = {
+ active: 'sell'
+};
+
+Component({
+ behaviors: [apiCall, navigationBarLoading],
+ properties: {
+ descriptionId: Number
+ },
data: {
- text: "data",
- types: [{
- name: "电子产品",
- isSelected: true
- }, {
- name: "生活用具",
- isSelected: false
- }, {
- name: "书籍教材",
- isSelected: false
- }],
- img: [],
- detail: '',
- contact: '',
- bought: '',
- sell: '',
- category: 'electric',
- index: '',
- isAgree: ''
+ maxPhotoCount: 9,
+ localPhotos: [],
+ i18n: {
+ area,
+ sellOrBuy,
+ },
+ description: {
+ ...descriptionDefaults
+ },
+ sellOrBuy: Object.keys(sellOrBuy),
+ area: Object.keys(area)
},
- onLoad: function() {},
- upimg: function() {
- var mythis = this;
- wx.chooseImage({
- count: 9,
- sizeType: ['original', 'compressed'],
- sourceType: ['album', 'camera'],
- success(res) {
- // tempFilePath可以作为img标签的src属性显示图片
- mythis.setData({
- img: res.tempFilePaths
- });
+ lifetimes: {
+ attached() {
+ if (this.data.descriptionId) {
+ this.callApi(getMy(this.data.descriptionId)).then(({ goods, photos, ...description }) => {
+ this.setData({
+ description,
+ goods,
+ localPhotos: photos.map(p => ({ path: p.url, remoteId: p.id }))
+ });
+ })
}
- });
+ },
},
- askdel: function() {
- var mythis = this;
- wx.showModal({
- title: 'info',
- content: 'del?',
- success(res) {
- if (res.confirm == true) {
- mythis.setData({
- img: []
+ methods: {
+ selectCategory() {
+ wx.navigateTo({
+ url: 'selectCategory',
+ });
+ },
+ selectArea() {
+ wx.navigateTo({
+ url: 'selectArea',
+ });
+ },
+ onSelectImage() {
+ wx.chooseImage({
+ count: this.data.maxPhotoCount - this.data.localPhotos.length,
+ success: res => {
+ const newPhotos = res.tempFilePaths.map(path => ({ path }));
+ this.setData({
+ localPhotos: this.data.localPhotos.concat(newPhotos)
});
}
+ });
+ },
+ onDeleteImage({ currentTarget }) {
+ const photo = currentTarget.dataset.photo;
+ wx.showModal({
+ title: '要删除该图片吗?',
+ success: res => {
+ if (res.confirm) {
+ this.setData({
+ localPhotos: this.data.localPhotos.filter(p => p.path != photo.path)
+ });
+ }
+ }
+ });
+ },
+ onFieldChange({ currentTarget, detail }) {
+ const fieldName = `description.${currentTarget.dataset.fieldName}`;
+ this.setData({
+ [fieldName]: detail
+ });
+ },
+ onSubmit(e) {
+ const value = e.detail.value;
+ for (const k of Object.keys(sellOrBuy)) {
+ delete value[k];
}
- });
- },
- tapcat: function(e) {
- for (var j = 0; j < this.data.types.length; j++) {
- this.data.types[j].isSelected = false;
- }
- var index = e.target.dataset.in;
- this.data.types[index].isSelected = true;
- this.setData({
- types: this.data.types,
- index: index
- });
- },
- bindAgreeChange: function(e) {
- if (this.data.isAgree) {
this.setData({
- isAgree: "" //checkbox[0]='agree'或者empty
+ description: {
+ ...this.data.description,
+ ...value,
+ weChatFormId: e.detail.formId
+ }
})
- } else {
- this.setData({
- isAgree: "ture" //checkbox[0]='agree'或者empty
+
+ let uploadedCount = 0;
+ const updateLoading = () => {
+ wx.showLoading({
+ title: `上传图片(${uploadedCount}/${this.data.localPhotos.length})`,
+ mask: true
+ });
+ }
+ updateLoading();
+ let uploadPromise = Promise.resolve();
+ for (const localPhoto of this.data.localPhotos) {
+ if (localPhoto.remoteId) {
+ // already uploaded
+ uploadedCount++;
+ updateLoading();
+ continue;
+ }
+ uploadPromise = uploadPromise
+ .then(() => uploadFile(localPhoto.path))
+ .then(res => {
+ localPhoto.remoteId = res.photoId;
+ uploadedCount++;
+ updateLoading();
+ });
+ }
+ const submitPromise = uploadPromise.then(() => {
+ this.setData({
+ 'description.photos': this.data.localPhotos.map(p => ({ id: p.remoteId }))
+ });
+ if (this.data.goods) {
+ return updateGoods(this.data.goods.id, this.data.description);
+ } else {
+ return createGoods(this.data.description);
+ }
})
+
+ this.callApi(submitPromise).then(() => {
+ wx.hideLoading();
+ wx.showModal({
+ title: '提交成功',
+ content: '校会工作人员将为您尽快审核',
+ showCancel: false,
+ success() {
+ wx.navigateBack();
+ }
+ })
+ }).catch(e => {
+ wx.hideLoading();
+ wx.showToast({
+ title: '发布失败:' + e,
+ icon: 'none'
+ })
+ });
}
}
})
diff --git a/pages/post/post.json b/pages/post/post.json
index 9e26dfe..5d2119e 100644
--- a/pages/post/post.json
+++ b/pages/post/post.json
@@ -1 +1,3 @@
-{}
\ No newline at end of file
+{
+ "navigationBarTitleText": "商品发布"
+}
\ No newline at end of file
diff --git a/pages/post/post.wxml b/pages/post/post.wxml
index e35bfdb..a8e38eb 100644
--- a/pages/post/post.wxml
+++ b/pages/post/post.wxml
@@ -1,57 +1,39 @@
-
- 请选择分类\n右滑获取更多
-
- {{item.name}}
-
-
+
\ No newline at end of file
diff --git a/pages/post/post.wxss b/pages/post/post.wxss
index f6c2a39..848c289 100644
--- a/pages/post/post.wxss
+++ b/pages/post/post.wxss
@@ -1,50 +1,35 @@
-.placeholder {
- margin: 5px;
- padding: 0 10px;
- text-align: center;
- background-color: #ebebeb;
- /**height: 2.3em;
- line-height: 2.3em;**/
- color: #cfcfcf;
+page {
+ padding-bottom: 50px;
}
-.post_input {
- height: 1.08823529em;
- min-height: 1.08823529em;
- line-height: 1.08823529em;
+.active-select {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-around;
}
-.post-cells {
- position: relative;
- margin-top: 1.17647059em;
- background-color: #fff;
- line-height: 1.11176471;
- font-size: 17px;
+.photo-list {
+ display: flex;
+ flex-flow: row wrap;
}
-.post-cell {
- padding: 1px 10px;
- position: relative;
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- -webkit-box-align: center;
- -webkit-align-items: center;
- align-items: center;
+.photo-list image {
+ margin: 1px;
+ height: 220rpx;
+ width: 220rpx;
+}
+
+.description-input {
+ min-height: 4em !important;
}
-.category {
- width: 80px;
- display: inline-block;
- background: #ccc;
- margin-right: 10px;
- border: 1px solid #ccc !important;
- border-radius: 6px !important;
- font-size: 12px;
- line-height: 2em;
+.submit {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
}
-.category.selected {
- background: #1073ba;
- border: 1px solid #1073ba !important;
+.submit button {
+ border-radius: 0;
}
diff --git a/pages/post/selectArea.js b/pages/post/selectArea.js
new file mode 100644
index 0000000..e66e867
--- /dev/null
+++ b/pages/post/selectArea.js
@@ -0,0 +1,18 @@
+import { area } from "../../i18n.js";
+
+Page({
+ data: {
+ i18n: {
+ area,
+ },
+ area: Object.keys(area),
+ },
+ onAreaSelected({ currentTarget }) {
+ const pages = getCurrentPages()
+ const previousPage = pages[pages.length - 2];
+ previousPage.setData({
+ 'description.area': currentTarget.dataset.area
+ });
+ wx.navigateBack();
+ }
+})
\ No newline at end of file
diff --git a/pages/post/selectArea.json b/pages/post/selectArea.json
new file mode 100644
index 0000000..5700ce3
--- /dev/null
+++ b/pages/post/selectArea.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "选择校区"
+}
\ No newline at end of file
diff --git a/pages/post/selectArea.wxml b/pages/post/selectArea.wxml
new file mode 100644
index 0000000..0150041
--- /dev/null
+++ b/pages/post/selectArea.wxml
@@ -0,0 +1,4 @@
+
+
+
\ No newline at end of file
diff --git a/pages/post/selectArea.wxss b/pages/post/selectArea.wxss
new file mode 100644
index 0000000..5075690
--- /dev/null
+++ b/pages/post/selectArea.wxss
@@ -0,0 +1 @@
+/* pages/post/selectArea.wxss */
\ No newline at end of file
diff --git a/pages/post/selectCategory.js b/pages/post/selectCategory.js
new file mode 100644
index 0000000..91c6056
--- /dev/null
+++ b/pages/post/selectCategory.js
@@ -0,0 +1,18 @@
+const app = getApp();
+
+Page({
+ data: {
+ },
+ onLoad(options) {
+ app.globalData.allCategoriesPromise
+ .then(categories => this.setData({ categories }));
+ },
+ onCategorySelected({ currentTarget }) {
+ const pages = getCurrentPages()
+ const previousPage = pages[pages.length - 2];
+ previousPage.setData({
+ 'description.category': currentTarget.dataset.category
+ });
+ wx.navigateBack();
+ }
+})
\ No newline at end of file
diff --git a/pages/post/selectCategory.json b/pages/post/selectCategory.json
new file mode 100644
index 0000000..6913695
--- /dev/null
+++ b/pages/post/selectCategory.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "选择分类"
+}
\ No newline at end of file
diff --git a/pages/post/selectCategory.wxml b/pages/post/selectCategory.wxml
new file mode 100644
index 0000000..b9b3abb
--- /dev/null
+++ b/pages/post/selectCategory.wxml
@@ -0,0 +1,4 @@
+
+
+
\ No newline at end of file
diff --git a/pages/post/selectCategory.wxss b/pages/post/selectCategory.wxss
new file mode 100644
index 0000000..cc4a3b8
--- /dev/null
+++ b/pages/post/selectCategory.wxss
@@ -0,0 +1 @@
+/* pages/post/selectCategory.wxss */
\ No newline at end of file
diff --git a/pages/published/published.js b/pages/published/published.js
new file mode 100644
index 0000000..c82cd3e
--- /dev/null
+++ b/pages/published/published.js
@@ -0,0 +1,24 @@
+import { area, sellOrBuy } from "../../i18n.js";
+import { getAllMy } from "../../api.js"
+import { pagedContentSyncStateOnLoad } from "../../behaviors/pagedContent.js"
+import navigationBarLoading from "../../behaviors/navigationBarLoading.js"
+
+Component({
+ behaviors: [pagedContentSyncStateOnLoad, navigationBarLoading],
+ data: {
+ i18n: {
+ area, sellOrBuy
+ },
+ },
+ methods: {
+ doLoadPage(pageToLoad) {
+ return getAllMy(pageToLoad);
+ },
+ onUpdate({ currentTarget }) {
+ const descriptionId = currentTarget.dataset.descriptionId;
+ wx.navigateTo({
+ url: `/pages/post/post?descriptionId=${descriptionId}`
+ })
+ }
+ }
+})
\ No newline at end of file
diff --git a/pages/published/published.json b/pages/published/published.json
new file mode 100644
index 0000000..6d4ef21
--- /dev/null
+++ b/pages/published/published.json
@@ -0,0 +1,4 @@
+{
+ "navigationBarTitleText": "我的发布",
+ "enablePullDownRefresh": true
+}
\ No newline at end of file
diff --git a/pages/published/published.wxml b/pages/published/published.wxml
new file mode 100644
index 0000000..23f2bda
--- /dev/null
+++ b/pages/published/published.wxml
@@ -0,0 +1,21 @@
+
+
+
+ [{{i18n.sellOrBuy[item.active]}}] {{item.title}}
+ {{item.goods.isPublished ? '修改审核中' : '审核中'}}
+ 已上架
+
+ {{item.goods.isPublished ? '修改审核未通过' : '审核未通过'}}
+ 未通过原因:{{item.reviewComment}}
+
+
+
+ 修改
+
+
+
+
+
+你还没有发布
+
+没有更多发布了
diff --git a/pages/published/published.wxss b/pages/published/published.wxss
new file mode 100644
index 0000000..0d76451
--- /dev/null
+++ b/pages/published/published.wxss
@@ -0,0 +1,33 @@
+.item {
+ display: flex;
+ flex-direction: row;
+ align-items: stretch;
+ padding: 5px 10px;
+ margin: 5px 0;
+ background: #fff;
+}
+
+.item image {
+ width: 250rpx;
+ height: 250rpx;
+ margin-right: 5px;
+ flex: none;
+}
+
+.item .detail {
+ flex: auto;
+ display: flex;
+ flex-direction: column;
+}
+
+.item .title {
+ margin-bottom: 5px;
+}
+
+.item .operations {
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-end;
+ align-items: flex-end;
+ flex: auto;
+}
\ No newline at end of file
diff --git a/project.config.json b/project.config.json
index 08431bf..8067929 100644
--- a/project.config.json
+++ b/project.config.json
@@ -1,6 +1,6 @@
{
"setting": {
- "urlCheck": true,
+ "urlCheck": false,
"es6": true,
"postcss": true,
"minified": true,
@@ -9,7 +9,7 @@
},
"appid": "wx2d51bf22a78c11f6",
"projectname": "Market-miniprogram",
- "libVersion": "2.2.5",
+ "libVersion": "2.6.1",
"compileType": "miniprogram",
"condition": {
"search": {
diff --git a/style/index.wxss b/style/index.wxss
new file mode 100644
index 0000000..e69de29
diff --git a/style/weui.wxss b/style/weui.wxss
deleted file mode 100644
index 3d6cfac..0000000
--- a/style/weui.wxss
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
- * Copyright 2017 Tencent, Inc.
- * Licensed under the MIT license
- */
-page{line-height:1.6;font-family:-apple-system-font,Helvetica Neue,sans-serif}icon{vertical-align:middle}.weui-cells{position:relative;margin-top:1.17647059em;background-color:#fff;line-height:1.41176471;font-size:17px}.weui-cells:before{top:0;border-top:1rpx solid #d9d9d9}.weui-cells:after,.weui-cells:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#d9d9d9}.weui-cells:after{bottom:0;border-bottom:1rpx solid #d9d9d9}.weui-cells__title{margin-top:.77em;margin-bottom:.3em;padding-left:15px;padding-right:15px;color:#999;font-size:14px}.weui-cells_after-title{margin-top:0}.weui-cells__tips{margin-top:.3em;color:#999;padding-left:15px;padding-right:15px;font-size:14px}.weui-cell{padding:10px 15px;position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-cell:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid #d9d9d9;color:#d9d9d9;left:15px}.weui-cell:first-child:before{display:none}.weui-cell_active{background-color:#ececec}.weui-cell_primary{-webkit-box-align:start;-webkit-align-items:flex-start;align-items:flex-start}.weui-cell__bd{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-cell__ft{text-align:right;color:#999}.weui-cell_access{color:inherit}.weui-cell__ft_in-access{padding-right:13px;position:relative}.weui-cell__ft_in-access:after{content:" ";display:inline-block;height:6px;width:6px;border-width:2px 2px 0 0;border-color:#c8c8cd;border-style:solid;-webkit-transform:matrix(.71,.71,-.71,.71,0,0);transform:matrix(.71,.71,-.71,.71,0,0);position:relative;top:-2px;position:absolute;top:50%;margin-top:-4px;right:2px}.weui-cell_link{color:#586c94;font-size:14px}.weui-cell_link:active{background-color:#ececec}.weui-cell_link:first-child:before{display:block}.weui-icon-radio{margin-left:3.2px;margin-right:3.2px}.weui-icon-checkbox_circle,.weui-icon-checkbox_success{margin-left:4.6px;margin-right:4.6px}.weui-check__label:active{background-color:#ececec}.weui-check{position:absolute;left:-9999px}.weui-check__hd_in-checkbox{padding-right:.35em}.weui-cell__ft_in-radio{padding-left:.35em}.weui-cell_input{padding-top:0;padding-bottom:0}.weui-label{width:105px;word-wrap:break-word;word-break:break-all}.weui-input{height:2.58823529em;min-height:2.58823529em;line-height:2.58823529em}.weui-toptips{position:fixed;-webkit-transform:translateZ(0);transform:translateZ(0);top:0;left:0;right:0;padding:5px;font-size:14px;text-align:center;color:#fff;z-index:5000;word-wrap:break-word;word-break:break-all}.weui-toptips_warn{background-color:#e64340}.weui-textarea{display:block;width:100%}.weui-textarea-counter{color:#b2b2b2;text-align:right}.weui-cell_warn,.weui-textarea-counter_warn{color:#e64340}.weui-form-preview{position:relative;background-color:#fff}.weui-form-preview:before{top:0;border-top:1rpx solid #d9d9d9}.weui-form-preview:after,.weui-form-preview:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#d9d9d9}.weui-form-preview:after{bottom:0;border-bottom:1rpx solid #d9d9d9}.weui-form-preview__value{font-size:14px}.weui-form-preview__value_in-hd{font-size:26px}.weui-form-preview__hd{position:relative;padding:10px 15px;text-align:right;line-height:2.5em}.weui-form-preview__hd:after{content:" ";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1rpx solid #d9d9d9;color:#d9d9d9;left:15px}.weui-form-preview__bd{padding:10px 15px;font-size:.9em;text-align:right;color:#999;line-height:2}.weui-form-preview__ft{position:relative;line-height:50px;display:-webkit-box;display:-webkit-flex;display:flex}.weui-form-preview__ft:after{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid #d5d5d6;color:#d5d5d6}.weui-form-preview__item{overflow:hidden}.weui-form-preview__label{float:left;margin-right:1em;min-width:4em;color:#999;text-align:justify;text-align-last:justify}.weui-form-preview__value{display:block;overflow:hidden;word-break:normal;word-wrap:break-word}.weui-form-preview__btn{position:relative;display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;color:#3cc51f;text-align:center}.weui-form-preview__btn:after{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #d5d5d6;color:#d5d5d6}.weui-form-preview__btn:first-child:after{display:none}.weui-form-preview__btn_active{background-color:#eee}.weui-form-preview__btn_default{color:#999}.weui-form-preview__btn_primary{color:#0bb20c}.weui-cell_select{padding:0}.weui-select{position:relative;padding-left:15px;padding-right:30px;height:2.58823529em;min-height:2.58823529em;line-height:2.58823529em;border-right:1rpx solid #d9d9d9}.weui-select:before{content:" ";display:inline-block;height:6px;width:6px;border-width:2px 2px 0 0;border-color:#c8c8cd;border-style:solid;-webkit-transform:matrix(.71,.71,-.71,.71,0,0);transform:matrix(.71,.71,-.71,.71,0,0);position:relative;top:-2px;position:absolute;top:50%;right:15px;margin-top:-4px}.weui-select_in-select-after{padding-left:0}.weui-cell__bd_in-select-before,.weui-cell__hd_in-select-after{padding-left:15px}.weui-cell_vcode{padding-right:0}.weui-vcode-btn,.weui-vcode-img{margin-left:5px;height:2.58823529em;vertical-align:middle}.weui-vcode-btn{display:inline-block;padding:0 .6em 0 .7em;border-left:1px solid #e5e5e5;line-height:2.58823529em;font-size:17px;color:#3cc51f;white-space:nowrap}.weui-vcode-btn:active{color:#52a341}.weui-cell_switch{padding-top:6px;padding-bottom:6px}.weui-uploader__hd{display:-webkit-box;display:-webkit-flex;display:flex;padding-bottom:10px;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-uploader__title{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-uploader__info{color:#b2b2b2}.weui-uploader__bd{margin-bottom:-4px;margin-right:-9px;overflow:hidden}.weui-uploader__file{float:left;margin-right:9px;margin-bottom:9px}.weui-uploader__img{display:block;width:79px;height:79px}.weui-uploader__file_status{position:relative}.weui-uploader__file_status:before{content:" ";position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,.5)}.weui-uploader__file-content{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);color:#fff}.weui-uploader__input-box{float:left;position:relative;margin-right:9px;margin-bottom:9px;width:77px;height:77px;border:1px solid #d9d9d9}.weui-uploader__input-box:after,.weui-uploader__input-box:before{content:" ";position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:#d9d9d9}.weui-uploader__input-box:before{width:2px;height:39.5px}.weui-uploader__input-box:after{width:39.5px;height:2px}.weui-uploader__input-box:active{border-color:#999}.weui-uploader__input-box:active:after,.weui-uploader__input-box:active:before{background-color:#999}.weui-uploader__input{position:absolute;z-index:1;top:0;left:0;width:100%;height:100%;opacity:0}.weui-article{padding:20px 15px;font-size:15px}.weui-article__section{margin-bottom:1.5em}.weui-article__h1{font-size:18px;font-weight:400;margin-bottom:.9em}.weui-article__h2{font-size:16px;font-weight:400;margin-bottom:.34em}.weui-article__h3{font-weight:400;font-size:15px;margin-bottom:.34em}.weui-article__p{margin:0 0 .8em}.weui-msg{padding-top:36px;text-align:center}.weui-msg__link{display:inline;color:#586c94}.weui-msg__icon-area{margin-bottom:30px}.weui-msg__text-area{margin-bottom:25px;padding:0 20px}.weui-msg__title{margin-bottom:5px;font-weight:400;font-size:20px}.weui-msg__desc{font-size:14px;color:#999}.weui-msg__opr-area{margin-bottom:25px}.weui-msg__extra-area{margin-bottom:15px;font-size:14px;color:#999}@media screen and (min-height:438px){.weui-msg__extra-area{position:fixed;left:0;bottom:0;width:100%;text-align:center}}.weui-flex{display:-webkit-box;display:-webkit-flex;display:flex}.weui-flex__item{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-btn{margin-top:15px}.weui-btn:first-child{margin-top:0}.weui-btn-area{margin:1.17647059em 15px .3em}.weui-agree{display:block;padding:.5em 15px;font-size:13px}.weui-agree__text{color:#999}.weui-agree__link{display:inline;color:#586c94}.weui-agree__checkbox{position:absolute;left:-9999px}.weui-agree__checkbox-icon{position:relative;top:2px;display:inline-block;border:1px solid #d1d1d1;background-color:#fff;border-radius:3px;width:11px;height:11px}.weui-agree__checkbox-icon-check{position:absolute;top:1px;left:1px}.weui-footer{color:#999;font-size:14px;text-align:center}.weui-footer_fixed-bottom{position:fixed;bottom:.52em;left:0;right:0}.weui-footer__links{font-size:0}.weui-footer__link{display:inline-block;vertical-align:top;margin:0 .62em;position:relative;font-size:14px;color:#586c94}.weui-footer__link:before{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #c7c7c7;color:#c7c7c7;left:-.65em;top:.36em;bottom:.36em}.weui-footer__link:first-child:before{display:none}.weui-footer__text{padding:0 .34em;font-size:12px}.weui-grids{border-top:1rpx solid #d9d9d9;border-left:1rpx solid #d9d9d9;overflow:hidden}.weui-grid{position:relative;float:left;padding:20px 10px;width:33.33333333%;box-sizing:border-box;border-right:1rpx solid #d9d9d9;border-bottom:1rpx solid #d9d9d9}.weui-grid_active{background-color:#ececec}.weui-grid__icon{display:block;width:28px;height:28px;margin:0 auto}.weui-grid__label{margin-top:5px;display:block;text-align:center;color:#000;font-size:14px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.weui-loading{margin:0 5px;width:20px;height:20px;display:inline-block;vertical-align:middle;-webkit-animation:a 1s steps(12) infinite;animation:a 1s steps(12) infinite;background:transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat;background-size:100%}.weui-loading.weui-loading_transparent{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect xmlns='http://www.w3.org/2000/svg' width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.56)' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.5)' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.43)' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.38)' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.32)' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.28)' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.25)' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.2)' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.17)' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.14)' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.1)' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.03)' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E")}@-webkit-keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.weui-badge{display:inline-block;padding:.15em .4em;min-width:8px;border-radius:18px;background-color:#e64340;color:#fff;line-height:1.2;text-align:center;font-size:12px;vertical-align:middle}.weui-badge_dot{padding:.4em;min-width:0}.weui-loadmore{width:65%;margin:1.5em auto;line-height:1.6em;font-size:14px;text-align:center}.weui-loadmore__tips{display:inline-block;vertical-align:middle}.weui-loadmore_line{border-top:1px solid #e5e5e5;margin-top:2.4em}.weui-loadmore__tips_in-line{position:relative;top:-.9em;padding:0 .55em;background-color:#fff;color:#999}.weui-loadmore__tips_in-dot{position:relative;padding:0 .16em;width:4px;height:1.6em}.weui-loadmore__tips_in-dot:before{content:" ";position:absolute;top:50%;left:50%;margin-top:-1px;margin-left:-2px;width:4px;height:4px;border-radius:50%;background-color:#e5e5e5}.weui-panel{background-color:#fff;margin-top:10px;position:relative;overflow:hidden}.weui-panel:first-child{margin-top:0}.weui-panel:before{top:0;border-top:1rpx solid #e5e5e5}.weui-panel:after,.weui-panel:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#e5e5e5}.weui-panel:after{bottom:0;border-bottom:1rpx solid #e5e5e5}.weui-panel__hd{padding:14px 15px 10px;color:#999;font-size:13px;position:relative}.weui-panel__hd:after{content:" ";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1rpx solid #e5e5e5;color:#e5e5e5;left:15px}.weui-media-box{padding:15px;position:relative}.weui-media-box:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid #e5e5e5;color:#e5e5e5;left:15px}.weui-media-box:first-child:before{display:none}.weui-media-box__title{font-weight:400;font-size:17px;width:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal;word-wrap:break-word;word-break:break-all}.weui-media-box__desc{color:#999;font-size:13px;line-height:1.2;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.weui-media-box__info{margin-top:15px;padding-bottom:5px;font-size:13px;color:#cecece;line-height:1em;list-style:none;overflow:hidden}.weui-media-box__info__meta{float:left;padding-right:1em}.weui-media-box__info__meta_extra{padding-left:1em;border-left:1px solid #cecece}.weui-media-box__title_in-text{margin-bottom:8px}.weui-media-box_appmsg{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-media-box__thumb{width:100%;height:100%;vertical-align:top}.weui-media-box__hd_in-appmsg{margin-right:.8em;width:60px;height:60px;line-height:60px;text-align:center}.weui-media-box__bd_in-appmsg{-webkit-box-flex:1;-webkit-flex:1;flex:1;min-width:0}.weui-media-box_small-appmsg{padding:0}.weui-cells_in-small-appmsg{margin-top:0}.weui-cells_in-small-appmsg:before{display:none}.weui-progress{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-progress__bar{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-progress__opr{margin-left:15px;font-size:0}.weui-navbar{display:-webkit-box;display:-webkit-flex;display:flex;position:absolute;z-index:500;top:0;width:100%;border-bottom:1rpx solid #ccc}.weui-navbar__item{position:relative;display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;padding:13px 0;text-align:center;font-size:0}.weui-navbar__item.weui-bar__item_on{color:#1aad19}.weui-navbar__slider{position:absolute;content:" ";left:0;bottom:0;width:6em;height:3px;background-color:#1aad19;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.weui-navbar__title{display:inline-block;font-size:15px;max-width:8em;width:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal}.weui-tab{position:relative;height:100%}.weui-tab__panel{box-sizing:border-box;height:100%;padding-top:50px;overflow:auto;-webkit-overflow-scrolling:touch}.weui-search-bar{position:relative;padding:8px 10px;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;background-color:#efeff4;border-top:1rpx solid #d7d6dc;border-bottom:1rpx solid #d7d6dc}.weui-icon-search{margin-right:8px;font-size:inherit}.weui-icon-search_in-box{position:absolute;left:10px;top:7px}.weui-search-bar__text{display:inline-block;font-size:14px;vertical-align:middle}.weui-search-bar__form{position:relative;-webkit-box-flex:1;-webkit-flex:auto;flex:auto;border-radius:5px;background:#fff;border:1rpx solid #e6e6ea}.weui-search-bar__box{position:relative;padding-left:30px;padding-right:30px;width:100%;box-sizing:border-box;z-index:1}.weui-search-bar__input{height:28px;line-height:28px;font-size:14px}.weui-icon-clear{position:absolute;top:0;right:0;padding:7px 8px;font-size:0}.weui-search-bar__label{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;border-radius:3px;text-align:center;color:#9b9b9b;background:#fff;line-height:28px}.weui-search-bar__cancel-btn{margin-left:10px;line-height:28px;color:#09bb07;white-space:nowrap}
\ No newline at end of file