add
This commit is contained in:
parent
222d978a10
commit
636304af73
@ -5,6 +5,19 @@ module.exports = {
|
|||||||
defineConstants: {
|
defineConstants: {
|
||||||
},
|
},
|
||||||
weapp: {},
|
weapp: {},
|
||||||
|
|
||||||
h5: {}
|
h5: {
|
||||||
}
|
esnextModules: ['taro-ui'],
|
||||||
|
// devServer: {
|
||||||
|
// proxy: {
|
||||||
|
// '/api': 'http://192.168.1.230/Shop-ajaxStore',
|
||||||
|
// changeOrigin: true,
|
||||||
|
// headers: {
|
||||||
|
// // 后端要校验请求源,那改下 host 或者 origin 不就美滋滋了?
|
||||||
|
// Host: '192.168.1.230',
|
||||||
|
// Origin: '192.168.1.230'
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
@ -8,7 +8,7 @@ const config = {
|
|||||||
'828': 1.81 / 2
|
'828': 1.81 / 2
|
||||||
},
|
},
|
||||||
sourceRoot: 'src',
|
sourceRoot: 'src',
|
||||||
outputRoot: 'dist',
|
outputRoot: 'dist',
|
||||||
plugins: {
|
plugins: {
|
||||||
babel: {
|
babel: {
|
||||||
sourceMap: true,
|
sourceMap: true,
|
||||||
|
@ -5,5 +5,7 @@ module.exports = {
|
|||||||
defineConstants: {
|
defineConstants: {
|
||||||
},
|
},
|
||||||
weapp: {},
|
weapp: {},
|
||||||
h5: {}
|
h5: {
|
||||||
|
esnextModules: ['taro-ui']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -198,7 +198,7 @@ class ShopTypeInteractionComp extends Component {
|
|||||||
<View className='shop-interaction' >
|
<View className='shop-interaction' >
|
||||||
<View className='picker-wrapper' onClick={this.invokeAliPicker.bind(this)} >
|
<View className='picker-wrapper' onClick={this.invokeAliPicker.bind(this)} >
|
||||||
<AtList>
|
<AtList>
|
||||||
<AtListItem title='店铺分类' extraText={this.props.selectedValue.name} arrow='right' />
|
<AtListItem hasBorder={false} title='店铺分类' extraText={this.props.selectedValue.name} arrow='right' />
|
||||||
</AtList>
|
</AtList>
|
||||||
</View>
|
</View>
|
||||||
{this.state.AliIsShowPicker ? <View>
|
{this.state.AliIsShowPicker ? <View>
|
||||||
|
@ -43,10 +43,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.picker-wrapper{
|
|
||||||
padding-left: 20px;
|
|
||||||
padding-right: 20px;
|
|
||||||
}
|
|
||||||
.curtain{
|
.curtain{
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: black;
|
background-color: black;
|
||||||
@ -56,12 +53,14 @@
|
|||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ali-picker-container{
|
.ali-picker-container{
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
|
left: 0;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
303
src/component/aliGoodsTypeInteraction/aliGoodsTypeInteraction.js
Normal file
303
src/component/aliGoodsTypeInteraction/aliGoodsTypeInteraction.js
Normal file
@ -0,0 +1,303 @@
|
|||||||
|
import Taro, { Component } from '@tarojs/taro'
|
||||||
|
import { View, Text, Picker } from '@tarojs/components'
|
||||||
|
import { AtList, AtListItem, } from 'taro-ui'
|
||||||
|
|
||||||
|
import './aliGoodsTypeInteraction.scss'
|
||||||
|
import loginExpired from '../../util/loginExpired'
|
||||||
|
import { getGlobalStorage } from '../../util/getSetStoage';
|
||||||
|
|
||||||
|
let maxDepth = 0
|
||||||
|
let initialDataArray = []
|
||||||
|
class AliGoodsTypeInteraction extends Component {
|
||||||
|
|
||||||
|
config = {
|
||||||
|
navigationBarTitleText: 'aliGoodsTypeInteraction'
|
||||||
|
}
|
||||||
|
constructor() {
|
||||||
|
super(...arguments);
|
||||||
|
|
||||||
|
this.state = {
|
||||||
|
///---行业分类 开始
|
||||||
|
initailMultiArray: [[{ class_name: '选择商品分类', class_id: '' }], [], []], // 初始化底部数据
|
||||||
|
multiIndex: [0, 0, 0, 0],// 默认联动列数为4个并且每一列都是第一行
|
||||||
|
interactionMultiArray: [],// 联动
|
||||||
|
|
||||||
|
|
||||||
|
///---行业分类 结束
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
//商品目录请求api GetShopCategoryList
|
||||||
|
getProductCateList(url) {
|
||||||
|
Taro.request({
|
||||||
|
url: url,
|
||||||
|
method: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
|
header: {
|
||||||
|
'content-type': 'application/x-www-form-urlencoded',
|
||||||
|
'Cookie': 'PFWSSS=' + getGlobalStorage('session_id'),
|
||||||
|
'X-Requested-With': 'XMLHttpRequest'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
if (res.data.err_code === 0) {
|
||||||
|
console.log('商品分类目录', res)
|
||||||
|
|
||||||
|
const recursionInteractionData = this.recursionInteraction(res.data.data)
|
||||||
|
maxDepth = 0
|
||||||
|
initialDataArray = []
|
||||||
|
|
||||||
|
this.recursionInitialized(res.data.data) //
|
||||||
|
const depthInArray = this.recursionDepth(res.data.data)
|
||||||
|
console.log('depthInArray', depthInArray)
|
||||||
|
console.log('initialDataArray', initialDataArray)
|
||||||
|
for (let i = initialDataArray.length; i < depthInArray.length; i++) {
|
||||||
|
initialDataArray.unshift([{ name: '--', id: '' }])
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setState({
|
||||||
|
interactionMultiArray: recursionInteractionData,
|
||||||
|
multiIndex: depthInArray,
|
||||||
|
initailMultiArray: initialDataArray.reverse()
|
||||||
|
}, () => {
|
||||||
|
console.log('interactionMultiArray',this.state.interactionMultiArray)
|
||||||
|
// 把全局变变量赋值给state之后,初始化商品分类为空, 不然第二次进去的时候会自动添加进去
|
||||||
|
// console.log('联动数据', this.state.interactionMultiArray)
|
||||||
|
// console.log('初始化数据', this.state.initailMultiArray)
|
||||||
|
|
||||||
|
|
||||||
|
}) // 用递归来整理无限层次的数据
|
||||||
|
// console.log('联动数据', this.recursionInteraction(res.data.data))
|
||||||
|
// console.log('初始数据', this.recursionInitialized(res.data.data).reverse())
|
||||||
|
} else if (res.data.err_code === 88888) {
|
||||||
|
loginExpired(res)
|
||||||
|
} else {
|
||||||
|
Taro.showToast({
|
||||||
|
title: res.data.err_msg,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.catch(error => {
|
||||||
|
console.log('商品分类请求错误', error)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//联动确认
|
||||||
|
bindMultiPickerChange(e) {
|
||||||
|
// 如果没有上商品 那就不执行
|
||||||
|
if (getGlobalStorage('shopInfo').shop_id) {
|
||||||
|
this.setState({
|
||||||
|
multiIndex: e.detail.value.map(item => { if (item === null) { item = 0 } return item })
|
||||||
|
}, () => {
|
||||||
|
// console.log('picker发送选择改变,携带值为', this.state.multiIndex)
|
||||||
|
this.returnResultToParent()
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
returnResultToParent() {
|
||||||
|
let selected = this.state.interactionMultiArray
|
||||||
|
for (let index of this.state.multiIndex) {
|
||||||
|
if (selected[index].children[0].id) {
|
||||||
|
selected = selected[index].children
|
||||||
|
} else {
|
||||||
|
this.props.onPassDataToChild(selected[index])
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 递归整理无限层初始数据,将整理好的数据赋值给initialDataArray
|
||||||
|
recursionInitialized(data) {
|
||||||
|
const arrayTem = []
|
||||||
|
if (data.length) {
|
||||||
|
for (let item of data) {
|
||||||
|
arrayTem.push({ name: item.class_name, id: item.class_id })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (data[0].children.length) {
|
||||||
|
this.recursionInitialized(data[0].children)
|
||||||
|
}
|
||||||
|
initialDataArray.push(arrayTem)
|
||||||
|
return arrayTem
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 递归整理无限层联动数据
|
||||||
|
recursionInteraction(data) {
|
||||||
|
let arrayTem = []
|
||||||
|
for (let items of data) {
|
||||||
|
arrayTem.push({ name: items.class_name, id: items.class_id })
|
||||||
|
if (items.children) {
|
||||||
|
arrayTem[arrayTem.length - 1].children = this.recursionInteraction(items.children)
|
||||||
|
} else {
|
||||||
|
arrayTem[arrayTem.length - 1].children = [{ name: '--', id: '' }]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return arrayTem // 返回联动数据
|
||||||
|
// return arrayTem
|
||||||
|
}
|
||||||
|
// 递归整理无限层初始数据
|
||||||
|
// recursionInitialized(data) {
|
||||||
|
// const arrayTem = []
|
||||||
|
// const childrenHolderArray = []
|
||||||
|
// if (data.length) {
|
||||||
|
// for (let item of data) {
|
||||||
|
// arrayTem.push({ name: item.class_name, id: item.class_id })
|
||||||
|
// item.children ? childrenHolderArray.push(...item.children) : null
|
||||||
|
// }
|
||||||
|
// this.recursionInitialized(childrenHolderArray)
|
||||||
|
// }
|
||||||
|
|
||||||
|
// arrayTem.length ? initialDataArray.push(arrayTem) : null // 数组为空则不添加
|
||||||
|
// return initialDataArray
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 递归整理无限层初始数据
|
||||||
|
recursionDepth(data) {
|
||||||
|
const arrayTem = []
|
||||||
|
const childrenHolderArray = []
|
||||||
|
if (data.length) {
|
||||||
|
for (let item of data) {
|
||||||
|
arrayTem.push({ name: item.class_name, id: item.class_id })
|
||||||
|
item.children ? childrenHolderArray.push(...item.children) : null
|
||||||
|
}
|
||||||
|
this.recursionDepth(childrenHolderArray)
|
||||||
|
maxDepth += 1
|
||||||
|
}
|
||||||
|
return new Array(maxDepth).fill(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 触动联动筛选
|
||||||
|
bindMultiPickerCol(e) {
|
||||||
|
console.log('修改的列为', e.detail.column, ',值为', e.detail.value)
|
||||||
|
console.log(this.state.initailMultiArray)
|
||||||
|
const data = {
|
||||||
|
multiArray: this.state.initailMultiArray,
|
||||||
|
multiIndex: this.state.multiIndex
|
||||||
|
}
|
||||||
|
data.multiIndex[e.detail.column] = e.detail.value
|
||||||
|
|
||||||
|
|
||||||
|
if (e.detail.column == 0) {
|
||||||
|
for (let index in data.multiArray[0]) {
|
||||||
|
const indexNumber = Number(index)
|
||||||
|
if (indexNumber === data.multiIndex[0]) {
|
||||||
|
data.multiArray[1] = this.state.interactionMultiArray[indexNumber].children
|
||||||
|
data.multiArray[2] = this.state.interactionMultiArray[indexNumber].children[data.multiIndex[1]].children
|
||||||
|
data.multiArray[3] = this.state.interactionMultiArray[indexNumber].children[data.multiIndex[1]].children[data.multiIndex[2]].children
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (e.detail.column == 1) {
|
||||||
|
for (let index in data.multiArray[1]) {
|
||||||
|
const indexNumber = Number(index)
|
||||||
|
if (indexNumber === data.multiIndex[1]) {
|
||||||
|
data.multiArray[2] = this.state.interactionMultiArray[data.multiIndex[0]].children[indexNumber].children
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (e.detail.column == 2) {
|
||||||
|
for (let index in data.multiArray[2]) {
|
||||||
|
const indexNumber = Number(index)
|
||||||
|
if (indexNumber === data.multiIndex[2]) {
|
||||||
|
data.multiArray[3] = this.state.interactionMultiArray[data.multiIndex[0]].children[data.multiIndex[1]].children[indexNumber].children
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setState({ multiIndex: data.multiIndex })
|
||||||
|
}
|
||||||
|
|
||||||
|
aliBindMultiPickerCol(e) {
|
||||||
|
console.log(',值为', e.detail.value)
|
||||||
|
|
||||||
|
this.setState({ multiIndex: e.detail.value })
|
||||||
|
}
|
||||||
|
|
||||||
|
aliCancelButton() {
|
||||||
|
this.setState({
|
||||||
|
AliIsShowPicker: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
aliConfirmButton() {
|
||||||
|
this.setState({
|
||||||
|
AliIsShowPicker: false
|
||||||
|
})
|
||||||
|
this.returnResultToParent()
|
||||||
|
}
|
||||||
|
invokeAliPicker() {
|
||||||
|
this.setState({
|
||||||
|
AliIsShowPicker: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
|
||||||
|
if (getGlobalStorage('shopInfo').shop_id) {
|
||||||
|
this.getProductCateList(this.props.url)
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// 当然父组件有新的props的 会从新渲染组件
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
|
||||||
|
}
|
||||||
|
componentWillUnmount() { }
|
||||||
|
|
||||||
|
componentDidShow() { }
|
||||||
|
|
||||||
|
componentDidHide() { }
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<View className='goods-interaction' >
|
||||||
|
<View className='picker-wrapper' onClick={this.invokeAliPicker.bind(this)} >
|
||||||
|
<AtList >
|
||||||
|
<AtListItem hasBorder={false} title='商品分类' className='title' extraText={this.props.selectedValue.name} arrow='right' />
|
||||||
|
</AtList>
|
||||||
|
</View>
|
||||||
|
{this.state.AliIsShowPicker ? <View>
|
||||||
|
<View className='curtain' onClick={this.aliCancelButton.bind(this)} > </View>
|
||||||
|
|
||||||
|
<View class='ali-picker-container'>
|
||||||
|
<View className='button'>
|
||||||
|
<View className='cancel-button' onClick={this.aliCancelButton.bind(this)}>取消</View>
|
||||||
|
<View className='confirm-button ali-blue-color' onClick={this.aliConfirmButton.bind(this)}>确定</View>
|
||||||
|
</View>
|
||||||
|
<picker-view value={this.state.multiIndex} onChange={this.aliBindMultiPickerCol.bind(this)}>
|
||||||
|
<picker-view-column>
|
||||||
|
{this.state.interactionMultiArray.map((item, index) => {
|
||||||
|
return <View key={index}>{item.name}</View>
|
||||||
|
})}
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column>
|
||||||
|
{this.state.interactionMultiArray[this.state.multiIndex[0]].children.map((item, index) => {
|
||||||
|
return <View key={index}>{item.name}</View>
|
||||||
|
})}
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column>
|
||||||
|
{this.state.interactionMultiArray[this.state.multiIndex[0]].children[this.state.multiIndex[1]].children.map((item, index) => {
|
||||||
|
return <View key={index}>{item.name}</View>
|
||||||
|
})}
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column>
|
||||||
|
{this.state.interactionMultiArray[this.state.multiIndex[0]].children[this.state.multiIndex[1]].children[this.state.multiIndex[2]].children.map((item, index) => {
|
||||||
|
return <View key={index}>{item.name}</View>
|
||||||
|
})}
|
||||||
|
</picker-view-column>
|
||||||
|
</picker-view>
|
||||||
|
</View ></View> : null}
|
||||||
|
</View>
|
||||||
|
|
||||||
|
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AliGoodsTypeInteraction
|
||||||
|
|
||||||
|
|
@ -0,0 +1,47 @@
|
|||||||
|
|
||||||
|
.picker-wrapper{
|
||||||
|
.item-content__info-title{
|
||||||
|
font-weight: bold
|
||||||
|
}
|
||||||
|
.item-extra__info{
|
||||||
|
color: black
|
||||||
|
}
|
||||||
|
.at-list__item{
|
||||||
|
padding-left: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.curtain{
|
||||||
|
height: 100%;
|
||||||
|
background-color: black;
|
||||||
|
width: 100%;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 99;
|
||||||
|
opacity: 0.5;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left:0
|
||||||
|
}
|
||||||
|
|
||||||
|
.ali-picker-container{
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
bottom: 0px;
|
||||||
|
left:0;
|
||||||
|
background-color: #fff;
|
||||||
|
z-index: 100;
|
||||||
|
opacity: 1;
|
||||||
|
.button{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
padding:20px 30px;
|
||||||
|
border-bottom: 1px solid #d6e4ef;
|
||||||
|
}
|
||||||
|
.cancel-button{
|
||||||
|
flex:1;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.confirm-button{
|
||||||
|
flex:1;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
@ -198,8 +198,8 @@ class AliIndustryTypeInteraction extends Component {
|
|||||||
return (
|
return (
|
||||||
<View className='industry-interaction' >
|
<View className='industry-interaction' >
|
||||||
<View className='picker-wrapper' onClick={this.invokeAliPicker.bind(this)} >
|
<View className='picker-wrapper' onClick={this.invokeAliPicker.bind(this)} >
|
||||||
<AtList>
|
<AtList >
|
||||||
<AtListItem title='行业分类' className='title' extraText={this.props.selectedValue.name} arrow='right' />
|
<AtListItem hasBorder={false} title='行业分类' className='title' extraText={this.props.selectedValue.name} arrow='right' />
|
||||||
</AtList>
|
</AtList>
|
||||||
</View>
|
</View>
|
||||||
{this.state.AliIsShowPicker ? <View>
|
{this.state.AliIsShowPicker ? <View>
|
||||||
|
@ -6,6 +6,9 @@
|
|||||||
.item-extra__info{
|
.item-extra__info{
|
||||||
color: black
|
color: black
|
||||||
}
|
}
|
||||||
|
.at-list__item{
|
||||||
|
padding-left: 0px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.curtain{
|
.curtain{
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -16,12 +19,14 @@
|
|||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
left:0
|
||||||
}
|
}
|
||||||
|
|
||||||
.ali-picker-container{
|
.ali-picker-container{
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
|
left:0;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
@ -6,7 +6,7 @@ import './interactionComponent.scss'
|
|||||||
import loginExpired from '../../util/loginExpired';
|
import loginExpired from '../../util/loginExpired';
|
||||||
import { getGlobalStorage } from '../../util/getSetStoage';
|
import { getGlobalStorage } from '../../util/getSetStoage';
|
||||||
|
|
||||||
|
// 这个是行业分类的联动
|
||||||
let maxDepth = 0
|
let maxDepth = 0
|
||||||
let initialDataArray = []
|
let initialDataArray = []
|
||||||
class Interaction extends Component {
|
class Interaction extends Component {
|
||||||
|
@ -7,6 +7,7 @@ import AliPictureUploadComponent from '../../component/aliPictureUploadComponent
|
|||||||
import ShopTypeInteractionComp from '../../component/shopTypeInteractionComp/shopTypeInteractionComp'
|
import ShopTypeInteractionComp from '../../component/shopTypeInteractionComp/shopTypeInteractionComp'
|
||||||
import AliShopTypeInteraction from '../../component/AliShopTypeInteraction/AliShopTypeInteraction'
|
import AliShopTypeInteraction from '../../component/AliShopTypeInteraction/AliShopTypeInteraction'
|
||||||
import GoodsTypeInteractionComp from '../../component/goodsTypeInteractionComp/goodsTypeInteractionComp'
|
import GoodsTypeInteractionComp from '../../component/goodsTypeInteractionComp/goodsTypeInteractionComp'
|
||||||
|
import AliGoodsTypeInteraction from '../../component/aliGoodsTypeInteraction/aliGoodsTypeInteraction'
|
||||||
|
|
||||||
import LoginService from '../../util/LoginService'
|
import LoginService from '../../util/LoginService'
|
||||||
import URL from '../../serviceAPI.config'
|
import URL from '../../serviceAPI.config'
|
||||||
@ -320,11 +321,16 @@ class GoodsPublish extends Component {
|
|||||||
|
|
||||||
<View className='goods-category'>
|
<View className='goods-category'>
|
||||||
{/* 商品分类开始 */}
|
{/* 商品分类开始 */}
|
||||||
<GoodsTypeInteractionComp
|
{platformChecker() ? <GoodsTypeInteractionComp
|
||||||
url={URL.GetProductCategoryList}
|
url={URL.GetProductCategoryList}
|
||||||
onPassDataToChild={this.getDataFromGoodsChild.bind(this)}
|
onPassDataToChild={this.getDataFromGoodsChild.bind(this)}
|
||||||
selectedValue={this.state.goodsTypeSelected}
|
selectedValue={this.state.goodsTypeSelected}
|
||||||
></GoodsTypeInteractionComp>
|
></GoodsTypeInteractionComp>
|
||||||
|
|
||||||
|
: <AliGoodsTypeInteraction url={URL.GetProductCategoryList}
|
||||||
|
onPassDataToChild={this.getDataFromGoodsChild.bind(this)}
|
||||||
|
selectedValue={this.state.goodsTypeSelected} />}
|
||||||
|
|
||||||
{/* 商品分类结束 */}
|
{/* 商品分类结束 */}
|
||||||
|
|
||||||
<View className='input-box'>
|
<View className='input-box'>
|
||||||
@ -380,18 +386,18 @@ class GoodsPublish extends Component {
|
|||||||
|
|
||||||
</View>
|
</View>
|
||||||
{/* 店铺分类 */}
|
{/* 店铺分类 */}
|
||||||
{platformChecker() ? <View className='ShopTypeInteractionComp-wrapper'>
|
{platformChecker() ?
|
||||||
<ShopTypeInteractionComp url={URL.GetShopCategoryList}
|
<ShopTypeInteractionComp url={URL.GetShopCategoryList}
|
||||||
shopId={getGlobalStorage('shopInfo').shop_id}
|
shopId={getGlobalStorage('shopInfo').shop_id}
|
||||||
selectedValue={this.state.shopTypeSelected}
|
selectedValue={this.state.shopTypeSelected}
|
||||||
onPassDataToChild={this.getDataFromShopChild.bind(this)}
|
onPassDataToChild={this.getDataFromShopChild.bind(this)}
|
||||||
></ShopTypeInteractionComp>
|
></ShopTypeInteractionComp>
|
||||||
|
|
||||||
</View> : <AliShopTypeInteraction url={URL.GetShopCategoryList}
|
: <AliShopTypeInteraction url={URL.GetShopCategoryList}
|
||||||
shopId={getGlobalStorage('shopInfo') ? getGlobalStorage('shopInfo').shop_id : ''}
|
shopId={getGlobalStorage('shopInfo') ? getGlobalStorage('shopInfo').shop_id : ''}
|
||||||
selectedValue={this.state.shopTypeSelected}
|
selectedValue={this.state.shopTypeSelected}
|
||||||
onPassDataToChild={this.getDataFromShopChild.bind(this)}
|
onPassDataToChild={this.getDataFromShopChild.bind(this)}
|
||||||
></AliShopTypeInteraction>
|
></AliShopTypeInteraction>
|
||||||
}
|
}
|
||||||
{/* 店铺分类结束 */}
|
{/* 店铺分类结束 */}
|
||||||
|
|
||||||
@ -401,12 +407,19 @@ class GoodsPublish extends Component {
|
|||||||
<Text className='require'></Text>
|
<Text className='require'></Text>
|
||||||
<Text className='title'>商品简介:</Text>
|
<Text className='title'>商品简介:</Text>
|
||||||
</View>
|
</View>
|
||||||
<AtTextarea
|
{platformChecker() ? <AtTextarea
|
||||||
value={this.state.productDescript}
|
value={this.state.productDescript}
|
||||||
onChange={this.productDescriptChange.bind(this)}
|
onChange={this.productDescriptChange.bind(this)}
|
||||||
maxlength='140'
|
maxlength='140'
|
||||||
placeholder='你的产品简介'
|
placeholder='你的产品简介'
|
||||||
/>
|
/> : <View className='textarea-wrapper'>
|
||||||
|
<textarea className='text-area'
|
||||||
|
onInput={this.productDescriptChange.bind(this)}
|
||||||
|
value={this.state.productDescript}
|
||||||
|
placeholder='你的产品简介'
|
||||||
|
maxlength='140' /></View>
|
||||||
|
}
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View className='button-box' >
|
<View className='button-box' >
|
||||||
|
@ -3,7 +3,7 @@ $themeColor:#FF7142;
|
|||||||
|
|
||||||
|
|
||||||
.goods-category{
|
.goods-category{
|
||||||
padding-top: 10px;
|
padding: 10px 20px;
|
||||||
.border-box{
|
.border-box{
|
||||||
border-bottom: 1Px solid #d6e4ef;
|
border-bottom: 1Px solid #d6e4ef;
|
||||||
|
|
||||||
@ -18,8 +18,7 @@ $themeColor:#FF7142;
|
|||||||
}
|
}
|
||||||
.img-box{
|
.img-box{
|
||||||
margin-top:10Px;
|
margin-top:10Px;
|
||||||
padding-left: 20px;
|
|
||||||
padding-right: 20px;
|
|
||||||
.img-container{
|
.img-container{
|
||||||
border: 1Px solid #d6e4ef;
|
border: 1Px solid #d6e4ef;
|
||||||
border-radius:8rpx;
|
border-radius:8rpx;
|
||||||
@ -32,8 +31,7 @@ $themeColor:#FF7142;
|
|||||||
}
|
}
|
||||||
.description-box{
|
.description-box{
|
||||||
margin-top:10Px;
|
margin-top:10Px;
|
||||||
padding-left: 20px;
|
|
||||||
padding-right: 20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -92,8 +90,7 @@ $themeColor:#FF7142;
|
|||||||
}
|
}
|
||||||
.page-section{
|
.page-section{
|
||||||
border-bottom: 1Px solid #d6e4ef;
|
border-bottom: 1Px solid #d6e4ef;
|
||||||
padding-left: 20px;
|
|
||||||
padding-right: 20px;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.selected{
|
.selected{
|
||||||
@ -104,8 +101,7 @@ $themeColor:#FF7142;
|
|||||||
.input-box{
|
.input-box{
|
||||||
border-bottom: 1Px solid #d6e4ef;
|
border-bottom: 1Px solid #d6e4ef;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding-left: 20px;
|
|
||||||
padding-right: 20px;
|
|
||||||
}
|
}
|
||||||
.require{
|
.require{
|
||||||
color:red;
|
color:red;
|
||||||
@ -122,7 +118,14 @@ $themeColor:#FF7142;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ShopTypeInteractionComp-wrapper{
|
|
||||||
padding-left: 20px;
|
.textarea-wrapper{
|
||||||
padding-right: 20px;
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: rgb(214, 228, 239);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding:5px;
|
||||||
|
.text-area{
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
}
|
}
|
@ -114,6 +114,7 @@ class Home extends Component {
|
|||||||
header: {
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded',
|
'content-type': 'application/x-www-form-urlencoded',
|
||||||
'Cookie': 'PFWSSS=' + Taro.getStorageSync('session_id'),
|
'Cookie': 'PFWSSS=' + Taro.getStorageSync('session_id'),
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
@ -311,27 +312,29 @@ class Home extends Component {
|
|||||||
|
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
// 页面加载后 得到首页的基本信息和推荐店铺的信息
|
// // 页面加载后 得到首页的基本信息和推荐店铺的信息
|
||||||
showLoading({ title: '加载中' })
|
// showLoading({ title: '加载中' })
|
||||||
// promise 返回经纬度给state 然后调用函数
|
// // promise 返回经纬度给state 然后调用函数
|
||||||
this.getUserLocation().then(res => {
|
// this.getUserLocation().then(res => {
|
||||||
this.setState({
|
// this.setState({
|
||||||
latitude: res.latitude,
|
// latitude: res.latitude,
|
||||||
longitude: res.longitude
|
// longitude: res.longitude
|
||||||
}, () => {
|
// }, () => {
|
||||||
this.getShops({})
|
// this.getShops({})
|
||||||
this.getHomeCategoriesInfo()
|
// this.getHomeCategoriesInfo()
|
||||||
})
|
// })
|
||||||
}).catch(err => {
|
// }).catch(err => {
|
||||||
this.getShops({})
|
// this.getShops({})
|
||||||
this.getHomeCategoriesInfo()
|
// this.getHomeCategoriesInfo()
|
||||||
})
|
// })
|
||||||
|
this.getShops({})
|
||||||
|
this.getHomeCategoriesInfo()
|
||||||
// 本地缓存没有userid时 从新登入
|
// 本地缓存没有userid时 从新登入
|
||||||
Taro.getStorageSync('userInfo').user_id ? true : weChatLogin()
|
Taro.getStorageSync('userInfo').user_id ? true : weChatLogin()
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
|
|
||||||
}
|
}
|
||||||
componentWillUnmount() { }
|
componentWillUnmount() { }
|
||||||
|
|
||||||
@ -397,7 +400,7 @@ class Home extends Component {
|
|||||||
<View className='text'>{item.class_name}</View>
|
<View className='text'>{item.class_name}</View>
|
||||||
</SwiperItem>
|
</SwiperItem>
|
||||||
}) : null
|
}) : null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollView
|
<ScrollView
|
||||||
className='home'
|
className='home'
|
||||||
|
@ -427,24 +427,37 @@ class MyDemandSupplyEdit extends Component {
|
|||||||
<View className='title-box'>
|
<View className='title-box'>
|
||||||
<Text className='title'><Text className='require'></Text>联系地址:</Text>
|
<Text className='title'><Text className='require'></Text>联系地址:</Text>
|
||||||
</View>
|
</View>
|
||||||
|
{platformChecker() ? <AtTextarea
|
||||||
<AtTextarea
|
|
||||||
value={this.state.contactAddress}
|
value={this.state.contactAddress}
|
||||||
onChange={this.contactAddressChange.bind(this)}
|
onChange={this.contactAddressChange.bind(this)}
|
||||||
maxlength='140'
|
maxlength='140'
|
||||||
placeholder='联系地址'
|
placeholder='联系地址'
|
||||||
/>
|
/> : <View className='textarea-wrapper'>
|
||||||
|
<textarea className='text-area'
|
||||||
|
onInput={this.contactAddressChange.bind(this)}
|
||||||
|
value={this.state.contactAddress}
|
||||||
|
placeholder="联系地址"
|
||||||
|
maxlength='140' /></View>
|
||||||
|
}
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
<View className='demanding-box'>
|
<View className='demanding-box'>
|
||||||
<View className='title-box'>
|
<View className='title-box'>
|
||||||
<Text className='title'><Text className='require'>*</Text>需求内容:</Text>
|
<Text className='title'><Text className='require'>*</Text>需求内容:</Text>
|
||||||
</View>
|
</View>
|
||||||
<AtTextarea
|
{platformChecker() ? <AtTextarea
|
||||||
value={this.state.content}
|
value={this.state.content}
|
||||||
onChange={this.contentChange.bind(this)}
|
onChange={this.contentChange.bind(this)}
|
||||||
maxlength='140'
|
maxlength='140'
|
||||||
placeholder=''
|
placeholder=''
|
||||||
/>
|
/>: <View className='textarea-wrapper'>
|
||||||
|
<textarea className='text-area'
|
||||||
|
onInput={this.contentChange.bind(this)}
|
||||||
|
value={this.state.content}
|
||||||
|
placeholder=""
|
||||||
|
maxlength='140' /></View>
|
||||||
|
}
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
<View className='img-box'>
|
<View className='img-box'>
|
||||||
<View className='title-box'>
|
<View className='title-box'>
|
||||||
|
@ -76,4 +76,14 @@ $themeColor:#FF7142;
|
|||||||
.title-box{
|
.title-box{
|
||||||
line-height:100rpx;
|
line-height:100rpx;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.textarea-wrapper{
|
||||||
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: rgb(214, 228, 239);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding:5px;
|
||||||
|
.text-area{
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
}
|
}
|
@ -9,6 +9,7 @@ import './myGoodList.scss'
|
|||||||
import loginExpired from '../../util/loginExpired';
|
import loginExpired from '../../util/loginExpired';
|
||||||
import onClickValueService from '../../util/onClickValueService';
|
import onClickValueService from '../../util/onClickValueService';
|
||||||
import { getGlobalStorage } from '../../util/getSetStoage';
|
import { getGlobalStorage } from '../../util/getSetStoage';
|
||||||
|
import platformChecker from '../../util/plaformChecker'
|
||||||
|
|
||||||
|
|
||||||
class MyGoodList extends Component {
|
class MyGoodList extends Component {
|
||||||
@ -144,7 +145,8 @@ class MyGoodList extends Component {
|
|||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
Taro.hideLoading()
|
Taro.hideLoading()
|
||||||
const data = JSON.parse(res.data)
|
console.log('res',res)
|
||||||
|
const data = platformChecker()? JSON.parse(res.data):res.data
|
||||||
|
|
||||||
if (data.err_code === 88888) {
|
if (data.err_code === 88888) {
|
||||||
loginExpired(data)
|
loginExpired(data)
|
||||||
|
@ -466,13 +466,13 @@ class MyGoodsEdit extends Component {
|
|||||||
|
|
||||||
</View>
|
</View>
|
||||||
{/* 店铺分类 */}
|
{/* 店铺分类 */}
|
||||||
{platformChecker() ? <View className='ShopTypeInteractionComp-wrapper'>
|
{platformChecker() ?
|
||||||
<ShopTypeInteractionComp url={URL.GetShopCategoryList}
|
<ShopTypeInteractionComp url={URL.GetShopCategoryList}
|
||||||
shopId={getGlobalStorage('shopInfo') ? getGlobalStorage('shopInfo').shop_id : ''}
|
shopId={getGlobalStorage('shopInfo') ? getGlobalStorage('shopInfo').shop_id : ''}
|
||||||
selectedValue={this.state.shopTypeSelected}
|
selectedValue={this.state.shopTypeSelected}
|
||||||
onPassDataToChild={this.getDataFromShopChild.bind(this)
|
onPassDataToChild={this.getDataFromShopChild.bind(this)
|
||||||
}></ShopTypeInteractionComp>
|
}></ShopTypeInteractionComp>
|
||||||
</View> : <AliShopTypeInteraction url={URL.GetShopCategoryList}
|
: <AliShopTypeInteraction url={URL.GetShopCategoryList}
|
||||||
shopId={getGlobalStorage('shopInfo') ? getGlobalStorage('shopInfo').shop_id : ''}
|
shopId={getGlobalStorage('shopInfo') ? getGlobalStorage('shopInfo').shop_id : ''}
|
||||||
selectedValue={this.state.shopTypeSelected}
|
selectedValue={this.state.shopTypeSelected}
|
||||||
onPassDataToChild={this.getDataFromShopChild.bind(this)}
|
onPassDataToChild={this.getDataFromShopChild.bind(this)}
|
||||||
@ -487,13 +487,20 @@ class MyGoodsEdit extends Component {
|
|||||||
<Text className='require'></Text>
|
<Text className='require'></Text>
|
||||||
<Text className='title'>商品简介:</Text>
|
<Text className='title'>商品简介:</Text>
|
||||||
</View>
|
</View>
|
||||||
|
{platformChecker() ? <AtTextarea
|
||||||
<AtTextarea
|
|
||||||
value={this.state.productDescript}
|
value={this.state.productDescript}
|
||||||
onChange={this.productDescriptChange.bind(this)}
|
onChange={this.productDescriptChange.bind(this)}
|
||||||
maxlength='140'
|
maxlength='140'
|
||||||
placeholder='你的产品简介'
|
placeholder='你的产品简介'
|
||||||
/>
|
/> : <View className='textarea-wrapper'>
|
||||||
|
<textarea className='text-area'
|
||||||
|
onInput={this.productDescriptChange.bind(this)}
|
||||||
|
value={this.state.contactAddress}
|
||||||
|
placeholder="你的产品简介"
|
||||||
|
maxlength='140' /></View>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
<View className='button-box' >
|
<View className='button-box' >
|
||||||
<View className='button' >
|
<View className='button' >
|
||||||
|
@ -3,7 +3,7 @@ $themeColor:#FF7142;
|
|||||||
|
|
||||||
|
|
||||||
.goods-category{
|
.goods-category{
|
||||||
padding-top: 10px;
|
padding: 10px 20px;
|
||||||
.border-box{
|
.border-box{
|
||||||
border-bottom: 1Px solid #d6e4ef;
|
border-bottom: 1Px solid #d6e4ef;
|
||||||
|
|
||||||
@ -11,16 +11,14 @@ $themeColor:#FF7142;
|
|||||||
.at-input__container{
|
.at-input__container{
|
||||||
color:black;
|
color:black;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
// padding-left: 20px;
|
|
||||||
// padding-right: 20px;
|
|
||||||
.at-input__input{
|
.at-input__input{
|
||||||
font-weight: normal
|
font-weight: normal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.img-box{
|
.img-box{
|
||||||
margin-top:10Px;
|
margin-top:10Px;
|
||||||
padding-left: 20px;
|
|
||||||
padding-right: 20px;
|
|
||||||
.img-container{
|
.img-container{
|
||||||
border: 1Px solid #d6e4ef;
|
border: 1Px solid #d6e4ef;
|
||||||
border-radius:8rpx;
|
border-radius:8rpx;
|
||||||
@ -33,8 +31,7 @@ $themeColor:#FF7142;
|
|||||||
}
|
}
|
||||||
.description-box{
|
.description-box{
|
||||||
margin-top:10Px;
|
margin-top:10Px;
|
||||||
padding-left: 20px;
|
|
||||||
padding-right: 20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -103,15 +100,21 @@ $themeColor:#FF7142;
|
|||||||
.input-box{
|
.input-box{
|
||||||
border-bottom: 1Px solid #d6e4ef;
|
border-bottom: 1Px solid #d6e4ef;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding-left: 20px;
|
|
||||||
padding-right: 20px;
|
|
||||||
}
|
}
|
||||||
.require{
|
.require{
|
||||||
color:red;
|
color:red;
|
||||||
line-height:100rpx;
|
line-height:100rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
.ShopTypeInteractionComp-wrapper{
|
|
||||||
padding-left: 20px;
|
.textarea-wrapper{
|
||||||
padding-right: 20px;
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: rgb(214, 228, 239);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding:5px;
|
||||||
|
.text-area{
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
}
|
}
|
@ -5,6 +5,8 @@ import { AtInput, AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction
|
|||||||
import URL from '../../serviceAPI.config'
|
import URL from '../../serviceAPI.config'
|
||||||
import ScrollToTopComponent from '../../component/scrollToTopComponent/scrollToTopComponent'
|
import ScrollToTopComponent from '../../component/scrollToTopComponent/scrollToTopComponent'
|
||||||
import InteractionComponent from '../../component/interactionComponent/interactionComponent'
|
import InteractionComponent from '../../component/interactionComponent/interactionComponent'
|
||||||
|
import AliIndustryTypeInteraction from '../../component/aliIndustryTypeInteraction/aliIndustryTypeInteraction'
|
||||||
|
|
||||||
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
import CopyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
||||||
import LoginService from '../../util/LoginService'
|
import LoginService from '../../util/LoginService'
|
||||||
|
|
||||||
@ -14,6 +16,7 @@ import onClickValueService from '../../util/onClickValueService';
|
|||||||
import { getGlobalStorage } from '../../util/getSetStoage';
|
import { getGlobalStorage } from '../../util/getSetStoage';
|
||||||
import { showLoading } from '../../util/hideShowLoading';
|
import { showLoading } from '../../util/hideShowLoading';
|
||||||
import { isUserLogin } from '../../util/checkLogin';
|
import { isUserLogin } from '../../util/checkLogin';
|
||||||
|
import platformChecker from '../../util/plaformChecker';
|
||||||
|
|
||||||
class MyNeeds extends Component {
|
class MyNeeds extends Component {
|
||||||
|
|
||||||
@ -392,7 +395,7 @@ class MyNeeds extends Component {
|
|||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
{/* 开始和结束日期 */}
|
{/* 开始和结束日期 */}
|
||||||
<View className='page-section'>
|
<View className='page-section-picker'>
|
||||||
<View className='picker-box'>
|
<View className='picker-box'>
|
||||||
<View className='picker-wrapper'>
|
<View className='picker-wrapper'>
|
||||||
<Picker mode='date' className='picker-container' onChange={this.onStartDateChange}>
|
<Picker mode='date' className='picker-container' onChange={this.onStartDateChange}>
|
||||||
@ -416,7 +419,14 @@ class MyNeeds extends Component {
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
{/* 行业分类开始 */}
|
{/* 行业分类开始 */}
|
||||||
<InteractionComponent url={URL.GetIndustryTypeList} onPassDataToChild={this.getDataFromChild.bind(this)} selectedValue={this.state.industryTypeSelected}></InteractionComponent>
|
{/* 行业分类 */}
|
||||||
|
|
||||||
|
|
||||||
|
{platformChecker() ? <View className='InteractionComponent-wrapper'>
|
||||||
|
<InteractionComponent url={URL.GetIndustryTypeList} onPassDataToChild={this.getDataFromChild.bind(this)} selectedValue={this.state.industryTypeSelected}></InteractionComponent>
|
||||||
|
</View> : <AliIndustryTypeInteraction url={URL.GetIndustryTypeList}
|
||||||
|
onPassDataToChild={this.getDataFromChild.bind(this)}
|
||||||
|
selectedValue={this.state.industryTypeSelected} />}
|
||||||
{/* 行业分类结束 */}
|
{/* 行业分类结束 */}
|
||||||
{/* 需求类型 */}
|
{/* 需求类型 */}
|
||||||
<View className='page-section'>
|
<View className='page-section'>
|
||||||
|
@ -64,6 +64,47 @@ $themeColor:#FF7142;
|
|||||||
margin-left: 10%
|
margin-left: 10%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.page-section-picker{
|
||||||
|
|
||||||
|
|
||||||
|
.picker{
|
||||||
|
// padding: 24rpx 0;
|
||||||
|
.selected{
|
||||||
|
font-weight: normal;
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 20%;
|
||||||
|
font-size: 32rpx
|
||||||
|
}
|
||||||
|
.date{
|
||||||
|
margin-left: 0%
|
||||||
|
}
|
||||||
|
.title-box{
|
||||||
|
line-height:100rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
.title{
|
||||||
|
//color: #333;
|
||||||
|
line-height:100rpx;
|
||||||
|
margin-right:16rpx;
|
||||||
|
width:172rpx;
|
||||||
|
font-size:32rpx;
|
||||||
|
vertical-align:middle;
|
||||||
|
text-align:left;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.first-col{
|
||||||
|
font-weight: normal;
|
||||||
|
margin-left: 10%
|
||||||
|
}
|
||||||
|
.second-col{
|
||||||
|
font-weight: normal;
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 10%
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -102,7 +143,6 @@ $themeColor:#FF7142;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.info-box{
|
.info-box{
|
||||||
|
|
||||||
.needs-box{
|
.needs-box{
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
border: 3rpx solid #ddd;
|
border: 3rpx solid #ddd;
|
||||||
|
@ -373,12 +373,12 @@ class MyNeedsEdit extends Component {
|
|||||||
<View className='supply-demand'>
|
<View className='supply-demand'>
|
||||||
{deleteModalWindowElement}
|
{deleteModalWindowElement}
|
||||||
{/* 行业分类 */}
|
{/* 行业分类 */}
|
||||||
{platformChecker() ? <View className='InteractionComponent-wrapper'>
|
{platformChecker() ?
|
||||||
<InteractionComponent url={URL.GetIndustryTypeList} onPassDataToChild={this.getDataFromChild.bind(this)} selectedValue={this.state.industryTypeSelected} ></InteractionComponent></View>
|
<InteractionComponent url={URL.GetIndustryTypeList} onPassDataToChild={this.getDataFromChild.bind(this)} selectedValue={this.state.industryTypeSelected} ></InteractionComponent>
|
||||||
: <AliIndustryTypeInteraction url={URL.GetIndustryTypeList} onPassDataToChild={this.getDataFromChild.bind(this)} selectedValue={this.state.industryTypeSelected} />}
|
: <AliIndustryTypeInteraction url={URL.GetIndustryTypeList} onPassDataToChild={this.getDataFromChild.bind(this)} selectedValue={this.state.industryTypeSelected} />}
|
||||||
|
|
||||||
{/* 需求类型 */}
|
{/* 需求类型 */}
|
||||||
<View className='padding-wrapper'>
|
|
||||||
<View className='page-section'>
|
<View className='page-section'>
|
||||||
<View>
|
<View>
|
||||||
<Picker mode='selector' rangeKey='name' range={this.state.needsType} onChange={this.needsTypeChange.bind(this)}>
|
<Picker mode='selector' rangeKey='name' range={this.state.needsType} onChange={this.needsTypeChange.bind(this)}>
|
||||||
@ -432,24 +432,38 @@ class MyNeedsEdit extends Component {
|
|||||||
<View className='title-box'>
|
<View className='title-box'>
|
||||||
<Text className='title'>联系地址:</Text>
|
<Text className='title'>联系地址:</Text>
|
||||||
</View>
|
</View>
|
||||||
|
{platformChecker() ? <AtTextarea
|
||||||
<AtTextarea
|
|
||||||
value={this.state.contactAddress}
|
value={this.state.contactAddress}
|
||||||
onChange={this.contactAddressChange.bind(this)}
|
onChange={this.contactAddressChange.bind(this)}
|
||||||
maxlength='140'
|
maxlength='140'
|
||||||
placeholder='联系地址'
|
placeholder='联系地址'
|
||||||
/>
|
/> : <View className='textarea-wrapper'>
|
||||||
|
<textarea className='text-area'
|
||||||
|
onInput={this.contactAddressChange.bind(this)}
|
||||||
|
value={this.state.contactAddress}
|
||||||
|
placeholder="联系地址"
|
||||||
|
maxlength='140' /></View>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
<View className='demanding-box'>
|
<View className='demanding-box'>
|
||||||
<View className='title-box'>
|
<View className='title-box'>
|
||||||
<Text className='title'><Text className='require'>*</Text>需求内容:</Text>
|
<Text className='title'><Text className='require'>*</Text>需求内容:</Text>
|
||||||
</View>
|
</View>
|
||||||
<AtTextarea
|
{platformChecker() ?<AtTextarea
|
||||||
value={this.state.content}
|
value={this.state.content}
|
||||||
onChange={this.contentChange.bind(this)}
|
onChange={this.contentChange.bind(this)}
|
||||||
maxlength='140'
|
maxlength='140'
|
||||||
placeholder=''
|
placeholder=''
|
||||||
/>
|
/> : <View className='textarea-wrapper'>
|
||||||
|
<textarea className='text-area'
|
||||||
|
onInput={this.contentChange.bind(this)}
|
||||||
|
value={this.state.content}
|
||||||
|
placeholder=""
|
||||||
|
maxlength='140' /></View>
|
||||||
|
}
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
<View className='img-box'>
|
<View className='img-box'>
|
||||||
<View className='title-box'>
|
<View className='title-box'>
|
||||||
@ -508,7 +522,7 @@ class MyNeedsEdit extends Component {
|
|||||||
<CopyrightComponent></CopyrightComponent>
|
<CopyrightComponent></CopyrightComponent>
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
</View>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,7 @@
|
|||||||
$themeColor:#FF7142;
|
$themeColor:#FF7142;
|
||||||
|
|
||||||
.supply-demand{
|
.supply-demand{
|
||||||
padding: 10px ;
|
padding: 10px 20px;
|
||||||
.padding-wrapper{
|
|
||||||
padding-left: 20px;
|
|
||||||
padding-right: 20px;
|
|
||||||
}
|
|
||||||
.InteractionComponent-wrapper{
|
|
||||||
padding-left: 20px;
|
|
||||||
padding-right: 20px;
|
|
||||||
}
|
|
||||||
.border-box{
|
.border-box{
|
||||||
border-bottom: 1Px solid #d6e4ef;
|
border-bottom: 1Px solid #d6e4ef;
|
||||||
display: flex
|
display: flex
|
||||||
@ -83,4 +75,14 @@ $themeColor:#FF7142;
|
|||||||
.title-box{
|
.title-box{
|
||||||
line-height:100rpx;
|
line-height:100rpx;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.textarea-wrapper{
|
||||||
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: rgb(214, 228, 239);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding:5px;
|
||||||
|
.text-area{
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
}
|
}
|
@ -299,14 +299,14 @@ class MyNeedsPublish extends Component {
|
|||||||
|
|
||||||
{/* 行业分类 */}
|
{/* 行业分类 */}
|
||||||
|
|
||||||
{/* 需求类型 */}
|
|
||||||
{platformChecker() ? <View className='InteractionComponent-wrapper'><InteractionComponent url={URL.GetIndustryTypeList}
|
{platformChecker() ? <View className='InteractionComponent-wrapper'><InteractionComponent url={URL.GetIndustryTypeList}
|
||||||
onPassDataToChild={this.getDataFromChild.bind(this)}
|
onPassDataToChild={this.getDataFromChild.bind(this)}
|
||||||
selectedValue={this.state.industryTypeSelected}
|
selectedValue={this.state.industryTypeSelected}
|
||||||
></InteractionComponent></View> : <AliIndustryTypeInteraction url={URL.GetIndustryTypeList}
|
></InteractionComponent></View> : <AliIndustryTypeInteraction url={URL.GetIndustryTypeList}
|
||||||
onPassDataToChild={this.getDataFromChild.bind(this)}
|
onPassDataToChild={this.getDataFromChild.bind(this)}
|
||||||
selectedValue={this.state.industryTypeSelected} />}
|
selectedValue={this.state.industryTypeSelected} />}
|
||||||
<View className='padding-wrapper'> <View className='page-section'>
|
<View className='page-section'>
|
||||||
<View>
|
<View>
|
||||||
<Picker mode='selector' rangeKey='name' range={this.state.needsType} onChange={this.needsTypeHandler.bind(this)}>
|
<Picker mode='selector' rangeKey='name' range={this.state.needsType} onChange={this.needsTypeHandler.bind(this)}>
|
||||||
<View className='picker'>
|
<View className='picker'>
|
||||||
@ -340,7 +340,18 @@ class MyNeedsPublish extends Component {
|
|||||||
onChange={this.contactNameChange.bind(this)}
|
onChange={this.contactNameChange.bind(this)}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
<View className='input-box' style='padding:24rpx 0;font-size:32rpx'>
|
<View className='input-box'>
|
||||||
|
<Text className='require'>*</Text>
|
||||||
|
<AtInput
|
||||||
|
name='value'
|
||||||
|
title='联系电话:'
|
||||||
|
type='number'
|
||||||
|
value={this.state.contactNumber}
|
||||||
|
border={false}
|
||||||
|
onChange={this.contactNumberChange.bind(this)}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
{/* <View className='input-box' style='padding:24rpx 0;font-size:32rpx'>
|
||||||
<View className='title' style='font-weight:bold;'>
|
<View className='title' style='font-weight:bold;'>
|
||||||
<Text style='color:red'>*</Text>
|
<Text style='color:red'>*</Text>
|
||||||
<Text>联系电话:</Text>
|
<Text>联系电话:</Text>
|
||||||
@ -352,31 +363,38 @@ class MyNeedsPublish extends Component {
|
|||||||
value={this.state.contactNumber}
|
value={this.state.contactNumber}
|
||||||
onInput={this.contactNumberChange.bind(this)}
|
onInput={this.contactNumberChange.bind(this)}
|
||||||
/></View>
|
/></View>
|
||||||
</View>
|
</View> */}
|
||||||
|
|
||||||
<View className='demanding-box'>
|
<View className='demanding-box'>
|
||||||
<View className='title-box'>
|
<View className='title-box'>
|
||||||
<Text className='title'>联系地址:</Text>
|
<Text className='title'>联系地址:</Text>
|
||||||
</View>
|
</View>
|
||||||
|
{platformChecker() ? <AtTextarea
|
||||||
<AtTextarea
|
|
||||||
value={this.state.contactAddress}
|
value={this.state.contactAddress}
|
||||||
onChange={this.contactAddressChange.bind(this)}
|
onChange={this.contactAddressChange.bind(this)}
|
||||||
maxlength='140'
|
maxlength='140'
|
||||||
placeholder='联系地址'
|
placeholder='联系地址'
|
||||||
/>
|
/> : <View className='textarea-wrapper'>
|
||||||
|
<textarea className='text-area' onInput={this.contactAddressChange.bind(this)} value={this.state.contactAddress} placeholder="联系地址" maxlength='140' /></View>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|
||||||
<View className='demanding-box'>
|
<View className='demanding-box'>
|
||||||
<View className='title-box'>
|
<View className='title-box'>
|
||||||
<Text className='title'><Text className='require'>*</Text>需求内容:</Text>
|
<Text className='title'><Text className='require'>*</Text>需求内容:</Text>
|
||||||
</View>
|
</View>
|
||||||
<AtTextarea
|
{platformChecker() ? <AtTextarea
|
||||||
value={this.state.content}
|
value={this.state.content}
|
||||||
onChange={this.contentChange.bind(this)}
|
onChange={this.contentChange.bind(this)}
|
||||||
maxlength='140'
|
maxlength='140'
|
||||||
placeholder=''
|
placeholder=''
|
||||||
/>
|
/> : <View className='textarea-wrapper'>
|
||||||
|
<textarea className='text-area' onInput={this.contentChange.bind(this)} value={this.state.content} maxlength='140' /></View>
|
||||||
|
}
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|
||||||
@ -429,7 +447,7 @@ class MyNeedsPublish extends Component {
|
|||||||
<CopyrightComponent></CopyrightComponent>
|
<CopyrightComponent></CopyrightComponent>
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
</View>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,9 @@
|
|||||||
$themeColor:#FF7142;
|
$themeColor:#FF7142;
|
||||||
|
|
||||||
.supply-demand{
|
.supply-demand{
|
||||||
padding: 10px ;
|
padding: 10px 20px ;
|
||||||
.padding-wrapper{
|
|
||||||
padding-left: 20px;
|
|
||||||
padding-right: 20px;
|
|
||||||
}
|
|
||||||
.InteractionComponent-wrapper{
|
|
||||||
padding-left: 20px;
|
|
||||||
padding-right: 20px;
|
|
||||||
}
|
|
||||||
.border-box{
|
.border-box{
|
||||||
border-bottom: 1Px solid #d6e4ef;
|
border-bottom: 1Px solid #d6e4ef;
|
||||||
display: flex
|
display: flex
|
||||||
@ -84,3 +78,13 @@ $themeColor:#FF7142;
|
|||||||
line-height:100rpx;
|
line-height:100rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.textarea-wrapper{
|
||||||
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: rgb(214, 228, 239);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding:5px;
|
||||||
|
.text-area{
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
}
|
@ -315,7 +315,18 @@ class SupplyDemand extends Component {
|
|||||||
border={false}
|
border={false}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
<View className='input-box' style='padding:24rpx 0;font-size:32rpx'>
|
<View className='input-box'>
|
||||||
|
<Text className='require'>*</Text>
|
||||||
|
<AtInput
|
||||||
|
name='value'
|
||||||
|
title='联系电话:'
|
||||||
|
type='number'
|
||||||
|
value={this.state.contactNumber}
|
||||||
|
onChange={this.contactNumberChange.bind(this)}
|
||||||
|
border={false}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
{/* <View className='input-box' style='padding:24rpx 0;font-size:32rpx'>
|
||||||
<View className='title' style='font-weight:bold;'>
|
<View className='title' style='font-weight:bold;'>
|
||||||
<Text style='color:red'>*</Text>
|
<Text style='color:red'>*</Text>
|
||||||
<Text>联系电话:</Text>
|
<Text>联系电话:</Text>
|
||||||
@ -327,30 +338,44 @@ class SupplyDemand extends Component {
|
|||||||
value={this.state.contactNumber}
|
value={this.state.contactNumber}
|
||||||
onInput={this.contactNumberChange.bind(this)}
|
onInput={this.contactNumberChange.bind(this)}
|
||||||
/></View>
|
/></View>
|
||||||
</View>
|
</View> */}
|
||||||
|
|
||||||
<View className='demanding-box'>
|
<View className='demanding-box'>
|
||||||
<View className='title-box'>
|
<View className='title-box'>
|
||||||
<Text className='title'>联系地址:</Text>
|
<Text className='title'>联系地址:</Text>
|
||||||
</View>
|
</View>
|
||||||
|
{platformChecker() ? <AtTextarea
|
||||||
<AtTextarea
|
|
||||||
value={this.state.contactAddress}
|
value={this.state.contactAddress}
|
||||||
onChange={this.contactAddressChange.bind(this)}
|
onChange={this.contactAddressChange.bind(this)}
|
||||||
maxlength='140'
|
maxlength='140'
|
||||||
placeholder='联系地址'
|
placeholder='联系地址'
|
||||||
/>
|
/> : <View className='textarea-wrapper'>
|
||||||
|
<textarea className='text-area'
|
||||||
|
onInput={this.contactAddressChange.bind(this)}
|
||||||
|
value={this.state.contactAddress}
|
||||||
|
placeholder="联系地址"
|
||||||
|
maxlength='140' /></View>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
<View className='demanding-box'>
|
<View className='demanding-box'>
|
||||||
<View className='title-box'>
|
<View className='title-box'>
|
||||||
<Text className='title'><Text className='require'>*</Text>需求内容:</Text>
|
<Text className='title'><Text className='require'>*</Text>需求内容:</Text>
|
||||||
</View>
|
</View>
|
||||||
<AtTextarea
|
{platformChecker() ? <AtTextarea
|
||||||
value={this.state.content}
|
value={this.state.content}
|
||||||
onChange={this.contentChange.bind(this)}
|
onChange={this.contentChange.bind(this)}
|
||||||
maxlength='140'
|
maxlength='140'
|
||||||
placeholder=''
|
placeholder=''
|
||||||
/>
|
/> : <View className='textarea-wrapper'>
|
||||||
|
<textarea className='text-area'
|
||||||
|
onInput={this.contentChange.bind(this)}
|
||||||
|
value={this.state.content}
|
||||||
|
placeholder=""
|
||||||
|
maxlength='140' /></View>
|
||||||
|
}
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
<View className='img-box'>
|
<View className='img-box'>
|
||||||
<View className='title-box'>
|
<View className='title-box'>
|
||||||
|
@ -71,4 +71,14 @@ $themeColor:#FF7142;
|
|||||||
color:red;
|
color:red;
|
||||||
line-height:100rpx;
|
line-height:100rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
.textarea-wrapper{
|
||||||
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: rgb(214, 228, 239);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding:5px;
|
||||||
|
.text-area{
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
const LOCALURL = "http://192.168.1.230/"
|
//const LOCALURL = "http://192.168.1.230/"
|
||||||
// const LOCALURL = "https://www.ihome6.com/"
|
const LOCALURL = "https://www.ihome6.com/"
|
||||||
|
|
||||||
const URL = {
|
const URL = {
|
||||||
Base: LOCALURL,
|
Base: LOCALURL,
|
||||||
|
Loading…
Reference in New Issue
Block a user