diff --git a/src/app.js b/src/app.js
index 56c2ab2..7aa3e9f 100644
--- a/src/app.js
+++ b/src/app.js
@@ -18,17 +18,17 @@ class App extends Component {
config = {
pages: [
- 'pages/index/index', // index页面
- 'pages/home/home',//首页
- 'pages/shop/shop',//店铺页面
- 'pages/goods/goods',// 商品页面
- 'pages/goodsPublish/goodsPublish',// 商品发布页面
- 'pages/supplyDemandPublish/supplyDemandPublish',// 供求发布页面
- 'pages/mySupplyDemand/mySupplyDemand',// 我的供求列表页面
- 'pages/myGoodsEdit/myGoodsEdit',// 我的商品编辑页面
- 'pages/allDemanding/allDemanding',// 所有供求页面
- 'pages/myGoodList/myGoodList',// 我的商品列表页面
- 'pages/myDemandSupplyEdit/myDemandSupplyEdit',// 我的供求编辑页面
+ 'pages/index/index', // index页面
+ 'pages/home/home',//首页 ---------------------
+ 'pages/shop/shop',//店铺页面 ---------------------
+ 'pages/goods/goods',// 商品页面 ---------------------
+ 'pages/goodsPublish/goodsPublish',// 商品发布页面 ---------------------
+ 'pages/supplyDemandPublish/supplyDemandPublish',// 供求发布页面 ---------------------
+ 'pages/mySupplyDemand/mySupplyDemand',// 我的供求列表页面 ---------------------
+ 'pages/myGoodsEdit/myGoodsEdit',// 我的商品编辑页面 ---------------------
+ 'pages/allDemanding/allDemanding',// 所有供求页面 ---------------------
+ 'pages/myGoodList/myGoodList',// 我的商品列表页面 --------------------- 编辑商品按键
+ 'pages/myDemandSupplyEdit/myDemandSupplyEdit',// 我的供求编辑页面 ---------------------
'pages/supplyDemandView/supplyDemandView',// 查看单个供求页面
'pages/grabOrderPage/grabOrderPage',// 抢单页面
'pages/myNeeds/myNeeds',// 我的需求页面
@@ -41,8 +41,8 @@ class App extends Component {
backgroundTextStyle: 'light',
navigationBarBackgroundColor: '#fff',
navigationBarTitleText: 'WeChat',
- navigationBarTextStyle: 'black'
-
+ navigationBarTextStyle: 'black',
+ enablePullDownRefresh:true
}
,
diff --git a/src/app.scss b/src/app.scss
index 74b6d80..b7f8ea7 100644
--- a/src/app.scss
+++ b/src/app.scss
@@ -1,16 +1,44 @@
$themeColor: #FF7142;
+$themeColor: #FF7142;
+$linearOrange:linear-gradient(to right, #FF7142, #FF7142);
+$linearDarkRed:linear-gradient(to right, #d9534f, #d9534f);;
+$linearGreen:linear-gradient(to right, #5cb85c, #5cb85c);;
+
+.input-index--at-input__title{
+ font-weight: bold
+}
.orange{
color:#FF7142,
}
-.blur{
- color:#FF7142;
- opacity: .65;
-
-}
+
.orange-bg{
background-color:#FF7142,
}
.green-bg{
background-color: #5cb85c
+}
+
+.button-green{
+ color:white;
+ font-size: 28px;
+ background:$linearGreen;
+ margin:20px auto
+}
+
+.button-dark-red{
+ color:white;
+ font-size: 28px;
+ background:$linearDarkRed;
+ margin:20px auto
+}
+
+.button-orange{
+ color:white;
+ font-size: 28px;
+ background:$linearOrange;
+ margin:20px auto
+}
+.button-no-margin{
+ margin:10px 0
}
\ No newline at end of file
diff --git a/src/component/filteredShopComponent/filteredShopComponent.js b/src/component/filteredShopComponent/filteredShopComponent.js
index 34c48ff..e5f7d69 100644
--- a/src/component/filteredShopComponent/filteredShopComponent.js
+++ b/src/component/filteredShopComponent/filteredShopComponent.js
@@ -114,7 +114,7 @@ class recommondShop extends Component {
.then(res => {
console.log('购买咨询请求成功', res)
if (res.statusCode === 200) {
- Taro.showToast({ title: res.data.err_msg,icon:'success' })
+ Taro.showToast({ title: '咨询成功',icon:'success' })
} else {
Taro.showToast({ title: res.data.err_msg,icon:'none' })
@@ -262,10 +262,10 @@ class recommondShop extends Component {
{title}
- {voucherLeft ? : }
+ {voucherLeft ? : }
-
+
diff --git a/src/component/filteredShopComponent/filteredShopComponent.scss b/src/component/filteredShopComponent/filteredShopComponent.scss
index 27536b6..1a3db7a 100644
--- a/src/component/filteredShopComponent/filteredShopComponent.scss
+++ b/src/component/filteredShopComponent/filteredShopComponent.scss
@@ -1,5 +1,5 @@
.shop-list-box{
- border: 1px solid #ddd;
+ border: 4rpx solid #ddd;
border-radius: 3px;
box-shadow: 0 5px 5px #ddd;
margin-bottom: 10px;
@@ -24,7 +24,7 @@
}
.header{
- border-bottom:1px solid #F2F2F2;
+ border-bottom:4rpx solid #F2F2F2;
display: flex;
.title{
@@ -33,10 +33,10 @@
font-weight: bold;
font-size: 30px;
text-align: left;
- overflow:hidden;
-white-space:nowrap;
-
-
+ overflow:hidden;
+ white-space:nowrap;
+ line-height:90rpx;
+ margin-left:3%;
}
.consult-voucher-button{
@@ -53,7 +53,7 @@ white-space:nowrap;
width: 100px;
line-height:50px;
height:50px;
- margin-top:20px;
+ margin-top:7%;
}
.voucher-button-text{
color:white;
@@ -62,7 +62,7 @@ white-space:nowrap;
width: 100px;
line-height:50px;
height:50px;
- margin-top:20px;
+ margin-top:7%;
}
.voucher{
@@ -71,7 +71,7 @@ white-space:nowrap;
}
}
.body{
- border-bottom:1px solid #F2F2F2;
+ border-bottom:4rpx solid #F2F2F2;
display: flex;
flex-wrap: nowrap;
font-size: 35px;
diff --git a/src/pages/allDemanding/allDemanding.js b/src/pages/allDemanding/allDemanding.js
index e9bdaaa..9028501 100644
--- a/src/pages/allDemanding/allDemanding.js
+++ b/src/pages/allDemanding/allDemanding.js
@@ -247,9 +247,9 @@ class AllDemanding extends Component {
{item.sd_title}
{item.sd_desc}
{item.state_name === '在用' ?
- 抢单
+
:
- 已抢单
+
}
@@ -317,15 +317,15 @@ class AllDemanding extends Component {
-
+
+ 搜索
-
+
+ 清空
{/* 供求页面的数据加载 */}
diff --git a/src/pages/allDemanding/allDemanding.scss b/src/pages/allDemanding/allDemanding.scss
index 547c395..860e0a5 100644
--- a/src/pages/allDemanding/allDemanding.scss
+++ b/src/pages/allDemanding/allDemanding.scss
@@ -69,16 +69,21 @@ $themeColor: #FF7142;
text-align: center;
- .at-button--primary{
- background-color:$themeColor;
- border:1PX solid $themeColor;
- }
+ // .button-s{
+ // // color:white;
+ // // font-size: 30px;
+ // // background:linear-gradient(to right, #FF9900, #FF7B00);
+ // // width: 150px;
+ // // margin:20px auto
+ // // background-color:$themeColor;
+ // // border:1PX solid $themeColor;
+ // }
- .button-b{
-
- background-color:#d9534f;
- border:1PX solid #d9534f;
- }
+ // .button-b{
+ // width: 150px;
+ // background-color:#d9534f;
+ // border:1PX solid #d9534f;
+ // }
}
}
.demanding-box{
@@ -171,4 +176,7 @@ $themeColor: #FF7142;
}
.pagination-box{
margin: 50px 0;
-}
\ No newline at end of file
+}
+.input-index--at-input__title{
+ font-weight: bold
+}
diff --git a/src/pages/goodsPublish/goodsPublish.js b/src/pages/goodsPublish/goodsPublish.js
index 7169c98..29ac6d1 100644
--- a/src/pages/goodsPublish/goodsPublish.js
+++ b/src/pages/goodsPublish/goodsPublish.js
@@ -1,6 +1,6 @@
import Taro, { Component } from '@tarojs/taro'
-import { View, Text } from '@tarojs/components'
-import { AtInput, AtImagePicker, AtTextarea, AtButton, } from 'taro-ui'
+import { View, Text, Button } from '@tarojs/components'
+import { AtInput, AtImagePicker, AtTextarea, AtForm } from 'taro-ui'
import ShopTypeInteractionComp from '../../component/shopTypeInteractionComp/shopTypeInteractionComp'
@@ -19,7 +19,7 @@ class GoodsPublish extends Component {
constructor() {
super(...arguments)
this.state = {
-
+
shopTypeSelected: { name: '选择店铺类型', id: '' },//已选的店铺分类
goodsTypeSelected: { name: '选择商品分类', id: '' },// 已选的商品分类
productName: '',
@@ -34,7 +34,7 @@ class GoodsPublish extends Component {
}
-
+
@@ -133,10 +133,10 @@ class GoodsPublish extends Component {
})
}
-
-
+
+
productNameChange(event) {
this.setState({
productName: event
@@ -199,7 +199,7 @@ class GoodsPublish extends Component {
})
}
}
-
+
onClickUploadGoods() {
if (this.state.productName &&
this.state.productPrice &&
@@ -260,14 +260,14 @@ class GoodsPublish extends Component {
return (
+
{/* 商品分类开始 */}
+ url={URL.GetProductCategoryList}
+ onPassDataToChild={this.getDataFromGoodsChild.bind(this)}
+ selectedValue={this.state.goodsTypeSelected}
+ >
{/* 商品分类结束 */}
@@ -277,6 +277,7 @@ class GoodsPublish extends Component {
title='商品名称:'
type='text'
value={this.state.productName}
+ border={false}
onChange={this.productNameChange.bind(this)}
/>
@@ -288,6 +289,7 @@ class GoodsPublish extends Component {
type='number'
placeholder='¥'
value={this.state.productPrice}
+ border={false}
onChange={this.productPriceChange.bind(this)}
/>
@@ -296,8 +298,9 @@ class GoodsPublish extends Component {
@@ -342,13 +345,13 @@ class GoodsPublish extends Component {
- 发布
+
{/*
- 发布并新增
+
*/}
- 商品列表
+
diff --git a/src/pages/goodsPublish/goodsPublish.scss b/src/pages/goodsPublish/goodsPublish.scss
index ece2140..c43e807 100644
--- a/src/pages/goodsPublish/goodsPublish.scss
+++ b/src/pages/goodsPublish/goodsPublish.scss
@@ -108,4 +108,7 @@ $themeColor:#FF7142;
color:red;
line-height:100rpx;
-}
\ No newline at end of file
+}
+
+
+
diff --git a/src/pages/grabOrderPage/grabOrderPage.js b/src/pages/grabOrderPage/grabOrderPage.js
index 8438076..d18705e 100644
--- a/src/pages/grabOrderPage/grabOrderPage.js
+++ b/src/pages/grabOrderPage/grabOrderPage.js
@@ -1,7 +1,7 @@
//grabOrderPage
import Taro, { Component } from '@tarojs/taro'
-import { View, Text } from '@tarojs/components'
-import { AtButton, AtIcon } from 'taro-ui'
+import { View, Text, Button } from '@tarojs/components'
+import { AtModal, AtModalHeader, AtModalContent, AtModalAction, AtIcon } from 'taro-ui'
import URL from '../../serviceAPI.config'
@@ -25,7 +25,8 @@ class GrabOrderPage extends Component {
contactNumber: '',
address: '',
content: '',
-
+ isOpen: false, // 抢单消息提示
+ grabOrderId:this.$router.params.orderId
}
}
@@ -46,9 +47,6 @@ class GrabOrderPage extends Component {
})
.then(res => {
console.log('抢单详情获取成功', res)
-
-
-
this.setState({
type: res.data.sdInfo.sd_type,
title: res.data.sdInfo.sd_title,
@@ -65,14 +63,70 @@ class GrabOrderPage extends Component {
console.log('抢单详情获取失败', error)
})
}
- callPhoneNumber(){
+ //抢单请求
+ GrabDemand({ demandId = 218 }) {
+ Taro.request({
+ url: URL.GrabDemand,
+ method: 'POST',
+ dataType: 'json',
+ data: {
+ demandId: demandId
+ },
+ header: {
+ 'content-type': 'application/x-www-form-urlencoded',
+ 'Cookie': 'PFWSSS=' + Taro.getStorageSync('session_id'),
+ 'X-Requested-With': 'XMLHttpRequest'
+ }
+ })
+ .then(res => {
+ if(res.data.err_msg === 'success'){
+ Taro.showToast({
+ title: '抢单成功' ,
+ icon: 'success',
+ duration: 1500
+ })
+ setTimeout(() => {
+ Taro.navigateTo({
+ url:'/pages/home/home'
+ })
+ }, 1500);
+
+ }else{
+ Taro.showToast({
+ title: res.data.err_msg ,
+ icon: 'none',
+ duration: 1500
+ })
+ }
+
+
+ console.log('抢单请求:', res)
+
+ })
+
+ }
+ callPhoneNumber() {
Taro.makePhoneCall({
phoneNumber: this.state.contactNumber
})
}
+ grabButtonHandler() {
+ this.setState({ isOpen: true })
+ }
+ handleGrabModalClose() {
+ this.setState({ isOpen: false })
+ }
+ handleGrabModalCancel() {
+ this.setState({ isOpen: false })
+ }
+ handleGrabConfirm() {
+ this.setState({ isOpen: false })
+ // 确认抢单之后
+ this.GrabDemand({ demandId: this.state.grabOrderId })
+ }
componentDidMount() {
- console.log(this.$router.params.orderId)
+
this.getGrabOrderInfo()
}
componentWillReceiveProps(nextProps) {
@@ -86,8 +140,18 @@ class GrabOrderPage extends Component {
componentDidHide() { }
render() {
+ // 提示模态弹窗element
+ const modalMessageGrabElement =
+ 提示
+
+ 确认抢单?
+
+
+
+
return (
+ {modalMessageGrabElement}
行业分类:
{this.state.type}
@@ -117,10 +181,10 @@ class GrabOrderPage extends Component {
{this.state.content}
-
-
+
+
+ 抢单
diff --git a/src/pages/home/home.js b/src/pages/home/home.js
index 781646b..f23f584 100644
--- a/src/pages/home/home.js
+++ b/src/pages/home/home.js
@@ -1,6 +1,6 @@
import Taro, { Component } from '@tarojs/taro'
import { View, Button, Text, Swiper, SwiperItem, Image, } from '@tarojs/components'
-import { AtModal, AtButton, AtToast, AtModalHeader, AtModalContent, AtModalAction, AtLoadMore } from 'taro-ui'
+import { AtModal, AtModalHeader, AtModalContent, AtModalAction, AtLoadMore } from 'taro-ui'
import FilteredShopComponent from '../../component/filteredShopComponent/filteredShopComponent'
import BottomNav from '../../component/bottomNav/bottomNav'
import URL from '../../serviceAPI.config'
@@ -31,6 +31,16 @@ class Home extends Component {
}
}
+ onPullDownRefresh() {
+ Taro.showLoading({ title: '加载中' })
+
+ this.login().then(() => {
+ this.getShops({})
+ this.getHomeCategoriesInfo()
+ }).catch(err => console.log('微信登入失败:', err))
+
+ Taro.stopPullDownRefresh()
+ }
@@ -89,26 +99,67 @@ class Home extends Component {
.then(res => {
console.log('所有店铺的信息', res)
Taro.hideLoading()
- if (res.data.err_msg === 'success'){
+ if (res.data.err_msg === 'success') {
if (res.data.shops.length) {
this.setState({ shopsDetails: this.state.shopsDetails.concat(res.data.shops), isMore: 'more' }, () => {
})
-
+
} else {
this.setState({ isMore: 'noMore' }, () => {
console.log('ismore?', this.state.isMore)
})
}
- }else{
+ } else {
Taro.showToast({
title: res.data.err_msg,
icon: 'none',
duration: 1500
})
-
+
}
-
+
+
+ }
+ )
+ }
+ getShopsInfo({ parent_supply_class = 0, supply_class = '-1', supply_level = 1, curr_page = 1,
+ page_count = 20, action = "2" }) {
+ Taro.request({
+ url: URL.ShopSupplyShops,
+ method: 'POST',
+ dataType: 'json',
+ data: {
+ param: JSON.stringify({
+ curr_page: curr_page,
+ page_count: page_count,
+ parent_supply_class: parent_supply_class, //父级class id
+ supply_class: supply_class,// 子级class id
+ supply_level: supply_level,// 层级
+ action: action
+ })
+ },
+ header: {
+ 'content-type': 'application/x-www-form-urlencoded',
+ 'Cookie': 'PFWSSS=' + Taro.getStorageSync('session_id'),
+ }
+ })
+ .then(res => {
+ console.log('所有店铺的信息', res)
+ Taro.hideLoading()
+ if (res.data.err_msg === 'success') {
+
+ this.setState({ shopsDetails: res.data.shops })
+
+ } else {
+ Taro.showToast({
+ title: res.data.err_msg,
+ icon: 'none',
+ duration: 1500
+ })
+
+ }
+
}
)
@@ -118,7 +169,7 @@ class Home extends Component {
async login() {
Taro.login({
success(res) {
-
+
if (res.code) {
// 发起网络请求
// console.log('手机端微信code:',res.code)
@@ -134,26 +185,26 @@ class Home extends Component {
}
})
.then(response => {
- if(response.data.err_msg==='success'){
+ if (response.data.err_msg === 'success') {
console.log('微信登入成功', response)
- Taro.showToast({
- title:'登入成功',
- icon:'success',
- duration:1500
- })
+ // Taro.showToast({
+ // title:'登入成功',
+ // icon:'success',
+ // duration:1500
+ // })
//储存后台返回的session_id 到local Storage
Taro.setStorageSync('session_id', response.data.session_id)
Taro.setStorageSync('shopInfo', response.data.shop_info)
Taro.setStorageSync('userInfo', response.data.user_info)
- }else{
+ } else {
Taro.showToast({
- title:'登入失败'+response.data.err_msg,
- icon:'none',
- duration:1500
+ title: '登入失败' + response.data.err_msg,
+ icon: 'none',
+ duration: 1500
})
}
-
+
}
).catch(err => {
console.log('登入微信失败', err)
@@ -220,15 +271,23 @@ class Home extends Component {
const parentClass = item.parent_class_id
const childClass = item.class_id
this.setState({ subCate: item.children })
- this.getShops({ parent_supply_class: parentClass, supply_class: childClass })
- this.getShops({ parent_supply_class: parentClass, supply_class: childClass })
+ this.getShopsInfo({ parent_supply_class: parentClass, supply_class: childClass })
+
}
// 点击子类
onClickChildCate(item) {
const parentClass = item.parent_class_id
const childClass = item.class_id
// this.getShops(item.parent_class_id, item.class_id, 2)
- this.getShops({ parent_supply_class: parentClass, supply_class: childClass, supply_level: 2 })
+ this.getShopsInfo({ parent_supply_class: parentClass, supply_class: childClass, supply_level: 2 })
+ }
+ scrollToSubCate(item) {
+ Taro.pageScrollTo({
+ scrollTop: 400,
+ duration: 300
+ })
+ this.onClickParentCate(item)
+
}
// 转到其他页面
goToAllDemandingPage() {
@@ -306,7 +365,7 @@ class Home extends Component {
提示
确认抢单?
-
+
@@ -346,13 +405,14 @@ class Home extends Component {
// 这里应该代码可以优化-----
const categoriesElementsArray1 = this.state.categories.length ? this.state.categories[0].map((item, index) => {
- return
+ return
+ {/* onClick={this.onClickParentCate.bind(this, item)}> */}
{item.class_name}
}) : null
const categoriesElementsArray2 = this.state.categories.length ? this.state.categories[1].map((item, index) => {
- return
+ return
{item.class_name}
@@ -394,6 +454,7 @@ class Home extends Component {
{/* 第二行图片滚动条 */}
@@ -304,6 +306,7 @@ class MyDemandSupplyEdit extends Component {
title='联系人:'
type='text'
value={this.state.contactName}
+ border={false}
onChange={this.contactNameChange.bind(this)}
/>
@@ -314,6 +317,7 @@ class MyDemandSupplyEdit extends Component {
title='联系电话:'
type='number'
value={this.state.contactNumber}
+ border={false}
onChange={this.contactNumberChange.bind(this)}
/>
@@ -374,14 +378,14 @@ class MyDemandSupplyEdit extends Component {
- 保存
+
{/*
- 保存并新增
+
*/}
- 我的供求
+
diff --git a/src/pages/myGoodList/myGoodList.js b/src/pages/myGoodList/myGoodList.js
index b986bd2..b17e217 100644
--- a/src/pages/myGoodList/myGoodList.js
+++ b/src/pages/myGoodList/myGoodList.js
@@ -1,6 +1,6 @@
import Taro, { Component } from '@tarojs/taro'
-import { View, Radio, } from '@tarojs/components'
-import { AtInput, Text, AtButton, AtIcon, Picker, Image, AtPagination, AtModal, AtModalHeader, AtModalContent, AtModalAction, Button } from 'taro-ui'
+import { View, Radio,Button } from '@tarojs/components'
+import { AtInput, Text, AtIcon, Picker, Image, AtPagination, AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
import URL from '../../serviceAPI.config'
@@ -540,17 +540,20 @@ class MyGoodList extends Component {
//等待接口数据
const goodListElementArray = this.state.myGoodList.map((item, index) => {
return
-
- {/* onClick={this.handleCheckChange.bind(this,item.goods_id)} */}
+
+
{item.goods_name}
¥{item.goods_price}
{item.sales_volume}
+
+
+
-
- 编辑商品
+
})
@@ -593,19 +596,23 @@ class MyGoodList extends Component {
-
+
@@ -623,6 +631,7 @@ class MyGoodList extends Component {
className='input'
type='number'
value={this.state.minimumSold}
+ border={false}
onChange={this.minimumSoldChange.bind(this)}
/>
@@ -640,9 +650,10 @@ class MyGoodList extends Component {
border={false}
name='value'
title='商品编码:'
- type='text'
+ type='number'
value={this.state.productId}
onChange={this.productIdChange.bind(this)}
+ border={false}
/>
@@ -659,14 +670,14 @@ class MyGoodList extends Component {
-
+
+ 搜索
-
+
+ 清空条件
@@ -681,13 +692,12 @@ class MyGoodList extends Component {
全选
-
- 删除
+
-
-
- 下架
+
diff --git a/src/pages/myGoodList/myGoodList.scss b/src/pages/myGoodList/myGoodList.scss
index ca50a23..700b420 100644
--- a/src/pages/myGoodList/myGoodList.scss
+++ b/src/pages/myGoodList/myGoodList.scss
@@ -46,23 +46,13 @@ $themeColor:#FF7142;
.radio{
margin-left: 10px;
- margin-top:4%;
+ margin-top:3%;
font-size: 30px;
font-weight: bold;
}
.button{
- margin-top:4%;
+ margin-left:2%;
text-align: center;
- .at-button--primary{
- margin-left: 20px;
- background-color:#ac2925;
- border:1PX solid #ac2925;
- }
- .button-a{
- margin-left: 10px;
- background-color:#5bc0de;
- border:1PX solid #5bc0de;
- }
}
}
@@ -139,6 +129,14 @@ $themeColor:#FF7142;
border-top: 0px;
display: flex;
flex-wrap: nowrap;
+ .button-box1{
+ flex:1;
+ margin-top: 7%;
+ }
+ .good-container-a{
+ flex:3;
+ display: flex;
+ flex-wrap: nowrap;
flex-direction: row;
font-size: 30px;
height: 200px;
@@ -168,17 +166,10 @@ $themeColor:#FF7142;
flex:1;
}
- .button-box1{
- flex:1;
- padding-top: 3%;
- padding-right: 2%;
- .button-a{
-
- background-color:$themeColor;
- border:1PX solid $themeColor;
- }
+
}
+
}
}
@@ -189,7 +180,7 @@ $themeColor:#FF7142;
}
.nomore{
- font-size: 32rpx;
+ font-size: 25rpx;
margin-top: 40px;
text-align: center
}
diff --git a/src/pages/myGoodsEdit/myGoodsEdit.js b/src/pages/myGoodsEdit/myGoodsEdit.js
index 9e4dd51..dc7e550 100644
--- a/src/pages/myGoodsEdit/myGoodsEdit.js
+++ b/src/pages/myGoodsEdit/myGoodsEdit.js
@@ -1,6 +1,6 @@
-import Taro, { Component, UpdateManager } from '@tarojs/taro'
-import { View, Text, Radio, RadioGroup, Label } from '@tarojs/components'
-import { AtInput, AtImagePicker, AtTextarea, AtButton, Picker, AtToast } from 'taro-ui'
+import Taro, { Component } from '@tarojs/taro'
+import { View, Text } from '@tarojs/components'
+import { AtInput, AtImagePicker, AtTextarea, Button, } from 'taro-ui'
import ShopTypeInteractionComp from '../../component/shopTypeInteractionComp/shopTypeInteractionComp'
@@ -339,7 +339,10 @@ class MyGoodsEdit extends Component {
title='商品名称:'
type='text'
value={this.state.productName}
+ border={false}
onChange={this.productNameChange.bind(this)}
+
+
/>
@@ -350,6 +353,7 @@ class MyGoodsEdit extends Component {
type='number'
placeholder='¥'
value={this.state.productPrice}
+ border={false}
onChange={this.productPriceChange.bind(this)}
/>
@@ -358,8 +362,9 @@ class MyGoodsEdit extends Component {
@@ -402,13 +407,13 @@ class MyGoodsEdit extends Component {
- 保存
+
{/*
- 发布并新增
+
*/}
- 商品列表
+
diff --git a/src/pages/myNeeds/myNeeds.js b/src/pages/myNeeds/myNeeds.js
index 4724a8a..8572c90 100644
--- a/src/pages/myNeeds/myNeeds.js
+++ b/src/pages/myNeeds/myNeeds.js
@@ -1,7 +1,7 @@
//myNeeds
import Taro, { Component } from '@tarojs/taro'
import { View, Text, Button } from '@tarojs/components'
-import { AtInput, AtButton, Picker, AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction, AtPagination } from 'taro-ui'
+import { AtInput, Picker, AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction, AtPagination } from 'taro-ui'
import URL from '../../serviceAPI.config'
import InteractionComponent from '../../component/interactionComponent/interactionComponent'
@@ -289,17 +289,17 @@ class MyNeeds extends Component {
{item.state === '0'||item.state === '1' ?
- 查看
+
- 编辑
+
- 删除
+
:
- 查看
+
}
@@ -383,19 +383,19 @@ class MyNeeds extends Component {
-
+
+ 搜索
-
+
+ 新增
-
+
+ 清空
diff --git a/src/pages/myNeeds/myNeeds.scss b/src/pages/myNeeds/myNeeds.scss
index 98e9706..0526241 100644
--- a/src/pages/myNeeds/myNeeds.scss
+++ b/src/pages/myNeeds/myNeeds.scss
@@ -90,20 +90,7 @@ $themeColor:#FF7142;
text-align: center;
- .at-button--primary{
- background-color:$themeColor;
- border:1PX solid $themeColor;
- }
- .button-a{
-
- background-color:#5cb85c;
- border:1PX solid #5cb85c;
- }
- .button-b{
-
- background-color:#d9534f;
- border:1PX solid #d9534f;
- }
+
}
}
@@ -115,14 +102,15 @@ $themeColor:#FF7142;
.needs-box{
margin-top: 10px;
- border: 1px solid #ddd;
+ border: 3rpx solid #ddd;
margin-bottom: 8px;
box-shadow: 0 8px 8px #ddd;
padding: 10px;
+ font-size: 25rpx;
.box{
margin-top: 10px;
- font-size: 28px;
+
}
.needs-title{
.content{
@@ -140,29 +128,13 @@ $themeColor:#FF7142;
.button{
// flex:1;
text-align: right;
- margin:2% 1% 0;
-
- .at-button--primary{
- background-color:#FF9500;
- border:1PX solid #FF9500;
- }
- }
- .button-a{
- // flex:1;
- text-align: right;
- margin:2% 1% 0;
-
- .at-button--primary{
- background-color:#d9534f;
- border:1PX solid #d9534f;
- }
- }
+ margin:0 1% 0;
}
-
+ }
}}
.nomore{
text-align: center;
- font-size: 35px;
+ font-size: 25rpx;
}
diff --git a/src/pages/myNeedsEdit/myNeedsEdit.js b/src/pages/myNeedsEdit/myNeedsEdit.js
index 5ee5f3a..824f55a 100644
--- a/src/pages/myNeedsEdit/myNeedsEdit.js
+++ b/src/pages/myNeedsEdit/myNeedsEdit.js
@@ -1,7 +1,7 @@
import Taro, { Component } from '@tarojs/taro'
-import { View, Text } from '@tarojs/components'
-import { AtInput, AtImagePicker, AtTextarea, AtButton, Picker, AtToast } from 'taro-ui'
+import { View, Text,Button } from '@tarojs/components'
+import { AtInput, AtImagePicker, AtTextarea, Picker } from 'taro-ui'
import InteractionComponent from '../../component/interactionComponent/interactionComponent'
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
@@ -321,8 +321,11 @@ class MyNeedsEdit extends Component {
title='需求标题:'
type='text'
value={this.state.title}
+ border={false}
onChange={this.titleChange.bind(this)}
+
/>
+
*
@@ -331,6 +334,7 @@ class MyNeedsEdit extends Component {
title='联系人:'
type='text'
value={this.state.contactName}
+ border={false}
onChange={this.contactNameChange.bind(this)}
/>
@@ -341,6 +345,7 @@ class MyNeedsEdit extends Component {
title='联系电话:'
type='number'
value={this.state.contactNumber}
+ border={false}
onChange={this.contactNumberChange.bind(this)}
/>
@@ -401,14 +406,14 @@ class MyNeedsEdit extends Component {
- 保存
+
{/*
- 保存并新增
+
*/}
- 我的需求
+
diff --git a/src/pages/myNeedsPublish/myNeedsPublish.js b/src/pages/myNeedsPublish/myNeedsPublish.js
index 7b5c9aa..7949d81 100644
--- a/src/pages/myNeedsPublish/myNeedsPublish.js
+++ b/src/pages/myNeedsPublish/myNeedsPublish.js
@@ -1,7 +1,7 @@
import Taro, { Component } from '@tarojs/taro'
-import { View, Text } from '@tarojs/components'
-import { AtInput, AtImagePicker, AtTextarea, AtButton, Picker, AtToast } from 'taro-ui'
+import { View, Text ,Button} from '@tarojs/components'
+import { AtInput, AtImagePicker, AtTextarea, Picker } from 'taro-ui'
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
import URL from '../../serviceAPI.config'
@@ -256,7 +256,9 @@ class MyNeedsPublish extends Component {
title='需求标题:'
type='text'
value={this.state.title}
+ border={false}
onChange={this.titleChange.bind(this)}
+
/>
@@ -266,6 +268,7 @@ class MyNeedsPublish extends Component {
title='联系人:'
type='text'
value={this.state.contactName}
+ border={false}
onChange={this.contactNameChange.bind(this)}
/>
@@ -276,6 +279,7 @@ class MyNeedsPublish extends Component {
title='联系电话:'
type='number'
value={this.state.contactNumber}
+ border={false}
onChange={this.contactNumberChange.bind(this)}
/>
@@ -336,14 +340,14 @@ class MyNeedsPublish extends Component {
- 发布
+
{/*
- 保存并新增
+
*/}
- 我的需求
+
diff --git a/src/pages/myNeedsView/myNeedsView.js b/src/pages/myNeedsView/myNeedsView.js
index 6ab667c..9534692 100644
--- a/src/pages/myNeedsView/myNeedsView.js
+++ b/src/pages/myNeedsView/myNeedsView.js
@@ -1,7 +1,7 @@
import Taro, { Component } from '@tarojs/taro'
import { View, Text, Image, Button } from '@tarojs/components'
-import { AtButton, AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
+import { AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
import URL from '../../serviceAPI.config'
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
@@ -245,25 +245,25 @@ class SupplyDemandView extends Component {
-
+
+ 新增
-
+
+ 我的需求
-
+
+ 修改
-
+
+ 删除
diff --git a/src/pages/mySupplyDemand/mySupplyDemand.js b/src/pages/mySupplyDemand/mySupplyDemand.js
index 51d46cd..78c262e 100644
--- a/src/pages/mySupplyDemand/mySupplyDemand.js
+++ b/src/pages/mySupplyDemand/mySupplyDemand.js
@@ -1,6 +1,6 @@
import Taro, { Component } from '@tarojs/taro'
import { View, Text, Button } from '@tarojs/components'
-import { AtInput, AtButton, Picker, AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction, AtPagination } from 'taro-ui'
+import { AtInput, Picker, AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction, AtPagination } from 'taro-ui'
import URL from '../../serviceAPI.config'
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
@@ -243,6 +243,7 @@ class MySupplyDemand extends Component {
Taro.showLoading({ title: '加载中' })
this.setState({ currentPage: type.current, }, () => {
this.getMySupplyDemand({ curr_page: this.state.currentPage })
+
})
}
@@ -308,13 +309,13 @@ class MySupplyDemand extends Component {
- 查看
+
- 编辑
+
- 删除
+
@@ -365,6 +366,7 @@ class MySupplyDemand extends Component {
type='text'
value={this.state.title}
onChange={this.titleChange.bind(this)}
+ border={false}
/>
{/* 开始和结束日期 */}
@@ -391,19 +393,19 @@ class MySupplyDemand extends Component {
-
+
+ 搜索
-
+
+ 新增
-
+
+ 清空
一共{this.state.totalDemandSupply} 条记录
diff --git a/src/pages/mySupplyDemand/mySupplyDemand.scss b/src/pages/mySupplyDemand/mySupplyDemand.scss
index 1e54a07..cf9c3ba 100644
--- a/src/pages/mySupplyDemand/mySupplyDemand.scss
+++ b/src/pages/mySupplyDemand/mySupplyDemand.scss
@@ -99,10 +99,10 @@ $themeColor:#FF7142;
}
.info-box{
- font-size: 30px;
+ font-size: 25rpx;
.info-container{
- border: 1px solid #ddd;
+ border: 3rpx solid #ddd;
margin-bottom: 8px;
box-shadow: 0 8px 8px #ddd;
padding: 10px;
@@ -124,16 +124,8 @@ $themeColor:#FF7142;
// flex:1;
text-align: center;
margin:1% 1% 0;
-
- .at-button--primary{
- background-color:#FF9500;
- border:1PX solid #FF9500;
- }
- .button-a{
-
- background-color:#d9534f;
- border:1PX solid #d9534f;
- }
+
+
}
}
@@ -142,7 +134,7 @@ $themeColor:#FF7142;
.title{
text-align: center;
- font-size: 30px;
+ font-size: 25rpx;
}
.pagination-box{
diff --git a/src/pages/shop/shop.js b/src/pages/shop/shop.js
index eef30d4..8006782 100644
--- a/src/pages/shop/shop.js
+++ b/src/pages/shop/shop.js
@@ -6,8 +6,8 @@ import URL from '../../serviceAPI.config'
import './shop.scss'
import ShopItem from '../../component/shopItemComponent/shopItemComponent'
-import bottomNav from '../../component/bottomNav/bottomNav'
-import copyrightComponent from '../../component/copyrightComponent/copyrightComponent'
+import BottomNav from '../../component/bottomNav/bottomNav'
+import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
import ShopDescription from '../shopDescription/shopDescription';
class Shop extends Component {
@@ -59,7 +59,7 @@ class Shop extends Component {
curr_page: 1,
page_count: 10,
shop_name: false,
- shop_id: Taro.getStorageSync('shopInfo').shop_id,
+ shop_id: this.$router.params.id,
config_id: 4,
shop_class_id: '',
order: '',
@@ -192,7 +192,6 @@ class Shop extends Component {
config_id = this.state.config_id,
shop_class_id = this.state.shop_class_id,
order = this.state.order,
- currPage = this.state.currPage,
goods_class_id = this.state.goods_class_id,
goodsSpec = this.state.goodsSpec,
goodsParam = this.state.goodsParam,
@@ -210,7 +209,6 @@ class Shop extends Component {
config_id: config_id,
shop_class_id: shop_class_id,
order: order,
- currPage: currPage,
goods_class_id: goods_class_id,
}),
goodsRegion: JSON.stringify({}),
@@ -224,6 +222,7 @@ class Shop extends Component {
}
})
.then(res => {
+ console.log('searchGood',res)
Taro.hideLoading()
this.setState({ shopItem: res.data.goods, total: res.data.goodsCount, filterCondition: order }, () => {
@@ -461,7 +460,6 @@ class Shop extends Component {
handleOnPageChange(value) {
Taro.showLoading({ title: '加载中' })
- this.setState({ currentPage: value.current })
this.goodsSearch({ curr_page: value.current, order: this.state.filterCondition })
}
showHomePage() {
@@ -736,10 +734,10 @@ class Shop extends Component {
{/* 显示店铺首页或者店铺详情 */}
{this.state.showShopHomePage ? shopHomepageElement : shopDescriptionElement}
-
+
-
+
)
diff --git a/src/pages/supplyDemandPublish/supplyDemandPublish.js b/src/pages/supplyDemandPublish/supplyDemandPublish.js
index 21f8c1a..7d3777e 100644
--- a/src/pages/supplyDemandPublish/supplyDemandPublish.js
+++ b/src/pages/supplyDemandPublish/supplyDemandPublish.js
@@ -1,9 +1,9 @@
import Taro, { Component } from '@tarojs/taro'
-import { View, Text } from '@tarojs/components'
-import { AtInput, AtImagePicker, AtTextarea, AtButton, Picker, AtToast } from 'taro-ui'
+import { View, Text,Button } from '@tarojs/components'
+import { AtInput, AtImagePicker, AtTextarea, Picker } from 'taro-ui'
-import copyrightComponent from '../../component/copyrightComponent/copyrightComponent'
+import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
import URL from '../../serviceAPI.config'
@@ -237,6 +237,7 @@ class SupplyDemand extends Component {
type='text'
value={this.state.title}
onChange={this.titleChange.bind(this)}
+ border={false}
/>
@@ -247,6 +248,7 @@ class SupplyDemand extends Component {
type='text'
value={this.state.contactName}
onChange={this.contactNameChange.bind(this)}
+ border={false}
/>
@@ -257,6 +259,7 @@ class SupplyDemand extends Component {
type='number'
value={this.state.contactNumber}
onChange={this.contactNumberChange.bind(this)}
+ border={false}
/>
@@ -316,17 +319,17 @@ class SupplyDemand extends Component {
- 发布
+
{/*
- 发布并新增
+
*/}
- 我的供求
+
-
+
diff --git a/src/pages/supplyDemandView/supplyDemandView.js b/src/pages/supplyDemandView/supplyDemandView.js
index d8df34b..31c28b8 100644
--- a/src/pages/supplyDemandView/supplyDemandView.js
+++ b/src/pages/supplyDemandView/supplyDemandView.js
@@ -1,7 +1,7 @@
import Taro, { Component } from '@tarojs/taro'
-import { View, Text, Image } from '@tarojs/components'
-import { AtButton, AtIcon,AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
+import { View, Text, Image,Button } from '@tarojs/components'
+import { AtIcon,AtModal, AtModalHeader, AtModalContent, AtModalAction } from 'taro-ui'
import URL from '../../serviceAPI.config'
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
@@ -221,24 +221,24 @@ class SupplyDemandView extends Component {
-
+
+ 新增
-
+
+ 修改
-
+
+ 我的供求
-
+
+ 删除