weapp测试结束
This commit is contained in:
parent
636304af73
commit
870fc47323
@ -8,16 +8,9 @@ module.exports = {
|
|||||||
|
|
||||||
h5: {
|
h5: {
|
||||||
esnextModules: ['taro-ui'],
|
esnextModules: ['taro-ui'],
|
||||||
// devServer: {
|
devServer:{
|
||||||
// proxy: {
|
host: "192.168.1.120",
|
||||||
// '/api': 'http://192.168.1.230/Shop-ajaxStore',
|
port:80
|
||||||
// changeOrigin: true,
|
}
|
||||||
// headers: {
|
|
||||||
// // 后端要校验请求源,那改下 host 或者 origin 不就美滋滋了?
|
|
||||||
// Host: '192.168.1.230',
|
|
||||||
// Origin: '192.168.1.230'
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -19,7 +19,7 @@ class App extends Component {
|
|||||||
|
|
||||||
config = {
|
config = {
|
||||||
pages: [
|
pages: [
|
||||||
//'pages/index/index', // index页面
|
//'pages/index/index', // index页面
|
||||||
|
|
||||||
'pages/home/home',//首页 ---------------------
|
'pages/home/home',//首页 ---------------------
|
||||||
'pages/login/login',//登入页面 ---------------------
|
'pages/login/login',//登入页面 ---------------------
|
||||||
|
@ -47,7 +47,7 @@ class AliGoodsTypeInteraction extends Component {
|
|||||||
maxDepth = 0
|
maxDepth = 0
|
||||||
initialDataArray = []
|
initialDataArray = []
|
||||||
|
|
||||||
this.recursionInitialized(res.data.data) //
|
this.recursionInitialized(res.data.data) //
|
||||||
const depthInArray = this.recursionDepth(res.data.data)
|
const depthInArray = this.recursionDepth(res.data.data)
|
||||||
console.log('depthInArray', depthInArray)
|
console.log('depthInArray', depthInArray)
|
||||||
console.log('initialDataArray', initialDataArray)
|
console.log('initialDataArray', initialDataArray)
|
||||||
|
@ -113,7 +113,7 @@ class GoodsPublish extends Component {
|
|||||||
if (this.state.isPublish) {
|
if (this.state.isPublish) {
|
||||||
// 导航到编辑页面
|
// 导航到编辑页面
|
||||||
Taro.redirectTo({
|
Taro.redirectTo({
|
||||||
url: '/pages/myGoodsList/myGoodsList'
|
url: '/pages/myGoodList/myGoodList'
|
||||||
})
|
})
|
||||||
} else if (this.state.isPublishAndAdd) {
|
} else if (this.state.isPublishAndAdd) {
|
||||||
// 导航到发布页面
|
// 导航到发布页面
|
||||||
@ -299,6 +299,7 @@ class GoodsPublish extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
|
||||||
}
|
}
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
// console.log(this.props, nextProps)
|
// console.log(this.props, nextProps)
|
||||||
|
@ -17,6 +17,8 @@ $themeColor: #FF7142;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.item-title{
|
.item-title{
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
font-size: 40px;
|
font-size: 40px;
|
||||||
min-height: 21px;
|
min-height: 21px;
|
||||||
clear: both;
|
clear: both;
|
||||||
@ -39,7 +41,7 @@ $themeColor: #FF7142;
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-orange{
|
.button-orange{
|
||||||
color:white;
|
color:white;
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
@ -49,9 +51,9 @@ $themeColor: #FF7142;
|
|||||||
.blur{
|
.blur{
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.last{
|
.last{
|
||||||
border-right: 2px solid #ddd;
|
border-right: 2px solid #ddd;
|
||||||
}
|
}
|
||||||
|
@ -1,45 +1,40 @@
|
|||||||
import Taro, { Component } from '@tarojs/taro'
|
import Taro, { Component } from '@tarojs/taro'
|
||||||
import { View , Swiper, SwiperItem} from '@tarojs/components'
|
import { View, ScrollView } from '@tarojs/components'
|
||||||
import { AtGrid } from 'taro-ui'
|
|
||||||
import URL from '../../../serviceAPI.config'
|
|
||||||
import './subCateSlider.scss'
|
import './subCateSlider.scss'
|
||||||
|
|
||||||
|
|
||||||
class SubCateSlider extends Component {
|
class SubCateSlider extends Component {
|
||||||
|
passDataToParent(e) {
|
||||||
|
|
||||||
|
this.props.onClickChildCate(e)
|
||||||
|
}
|
||||||
|
|
||||||
passDataToParent(e) {
|
render() {
|
||||||
|
const { subCateList } = this.props
|
||||||
|
const subCateElementsArray = subCateList.map((item, index) => {
|
||||||
|
return <View key={index} onClick={this.passDataToParent.bind(this, item)} className='view-item'>
|
||||||
|
<View className='text'>{item.class_name}</View>
|
||||||
|
</View>
|
||||||
|
})
|
||||||
|
|
||||||
this.props.onClickChildCate(e)
|
return (
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
<ScrollView
|
||||||
const { subCateList } = this.props
|
className='scroll-view'
|
||||||
const subCateElementsArray = subCateList.map((item, index) => {
|
scrollX
|
||||||
return <View key={index} onClick={this.passDataToParent.bind(this, item)} className='view-item'>
|
scrollWithAnimation
|
||||||
<View className='text'>{item.class_name}</View>
|
scrollTop='0'
|
||||||
</View>
|
lowerThreshold='20'
|
||||||
})
|
upperThreshold='20'
|
||||||
|
style='white-space: nowrap;'
|
||||||
|
>
|
||||||
|
|
||||||
return (
|
{subCateElementsArray}
|
||||||
|
|
||||||
<ScrollView
|
</ScrollView>
|
||||||
|
|
||||||
className='scroll-view'
|
)
|
||||||
scrollX
|
}
|
||||||
scrollWithAnimation
|
|
||||||
scrollTop='0'
|
|
||||||
lowerThreshold='20'
|
|
||||||
upperThreshold='20'
|
|
||||||
style='white-space: nowrap;'
|
|
||||||
>
|
|
||||||
|
|
||||||
{subCateElementsArray}
|
|
||||||
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SubCateSlider
|
export default SubCateSlider
|
||||||
|
@ -2,10 +2,12 @@
|
|||||||
height:100%;
|
height:100%;
|
||||||
padding:0px 0px;
|
padding:0px 0px;
|
||||||
.view-item{
|
.view-item{
|
||||||
|
font-size: 25px;
|
||||||
width:150px;
|
width:150px;
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
border-bottom:2px solid #F2F2F2;
|
border-bottom:2px solid #F2F2F2;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ class MyNeedsEdit extends Component {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//获取需求信息api
|
//获取需求信息api
|
||||||
getMyNeedEditInfo() {
|
getMyNeedEditInfo() {
|
||||||
let id = decodeURIComponent(this.$router.params.id)
|
let id = decodeURIComponent(this.$router.params.id)
|
||||||
Taro.request({
|
Taro.request({
|
||||||
@ -110,7 +110,7 @@ class MyNeedsEdit extends Component {
|
|||||||
needsStateSelected: needsState,
|
needsStateSelected: needsState,
|
||||||
initialImageURL: imageFile,
|
initialImageURL: imageFile,
|
||||||
initialImagesInfo: res.data.sdInfo.file_path,
|
initialImagesInfo: res.data.sdInfo.file_path,
|
||||||
ImageURL: imageFile,
|
pickerImageUrl: imageFile,
|
||||||
ImagesInfo: res.data.sdInfo.file_path,
|
ImagesInfo: res.data.sdInfo.file_path,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -301,6 +301,51 @@ class MyNeedsEdit extends Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 上传图片
|
||||||
|
onChangeImg(files, operationType, index) {
|
||||||
|
const that = this
|
||||||
|
if (operationType === 'add') {
|
||||||
|
Taro.uploadFile({
|
||||||
|
url: URL.UploadDSPorductImage,
|
||||||
|
filePath: files[files.length - 1].url,
|
||||||
|
name: 'file',
|
||||||
|
header: {
|
||||||
|
'content-type': 'multipart/form-data',
|
||||||
|
'Cookie': 'PFWSSS=' + getGlobalStorage('session_id'),
|
||||||
|
'X-Requested-With': 'XMLHttpRequest'
|
||||||
|
},
|
||||||
|
success(response) {
|
||||||
|
const data = JSON.parse(response.data)
|
||||||
|
const imagePath = URL.Base + data.file_path
|
||||||
|
const newPickerImageUrl = that.state.pickerImageUrl.concat({ url: imagePath })
|
||||||
|
const newImageInfo = that.state.ImagesInfo.concat(data)
|
||||||
|
that.setState({
|
||||||
|
pickerImageUrl: newPickerImageUrl,
|
||||||
|
ImagesInfo: newImageInfo
|
||||||
|
})
|
||||||
|
Taro.showToast({
|
||||||
|
title: '上传成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 1500
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (operationType === 'remove') {
|
||||||
|
this.state.ImagesInfo.splice(index, 1) // 删除显示的图片
|
||||||
|
this.state.pickerImageUrl.splice(index, 1)// 删除图片param
|
||||||
|
that.setState({
|
||||||
|
pockerImageUrl: this.state.pickerImageUrl,
|
||||||
|
ImagesInfo: this.state.ImagesInfo,
|
||||||
|
})
|
||||||
|
Taro.showToast({
|
||||||
|
title: '删除成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 1500
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 从图片子组件获取信息
|
// 从图片子组件获取信息
|
||||||
getImageDetails(value) {
|
getImageDetails(value) {
|
||||||
this.setState({
|
this.setState({
|
||||||
@ -373,12 +418,12 @@ class MyNeedsEdit extends Component {
|
|||||||
<View className='supply-demand'>
|
<View className='supply-demand'>
|
||||||
{deleteModalWindowElement}
|
{deleteModalWindowElement}
|
||||||
{/* 行业分类 */}
|
{/* 行业分类 */}
|
||||||
{platformChecker() ?
|
{platformChecker() ?
|
||||||
<InteractionComponent url={URL.GetIndustryTypeList} onPassDataToChild={this.getDataFromChild.bind(this)} selectedValue={this.state.industryTypeSelected} ></InteractionComponent>
|
<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='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)}>
|
||||||
@ -463,7 +508,7 @@ class MyNeedsEdit extends Component {
|
|||||||
placeholder=""
|
placeholder=""
|
||||||
maxlength='140' /></View>
|
maxlength='140' /></View>
|
||||||
}
|
}
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
<View className='img-box'>
|
<View className='img-box'>
|
||||||
<View className='title-box'>
|
<View className='title-box'>
|
||||||
@ -522,7 +567,7 @@ class MyNeedsEdit extends Component {
|
|||||||
<CopyrightComponent></CopyrightComponent>
|
<CopyrightComponent></CopyrightComponent>
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -147,6 +147,7 @@ class MySupplyDemand extends Component {
|
|||||||
Taro.showToast({
|
Taro.showToast({
|
||||||
title: '删除成功'
|
title: '删除成功'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
Taro.showLoading()
|
||||||
this.getMySupplyDemand({})
|
this.getMySupplyDemand({})
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -478,8 +479,10 @@ class MySupplyDemand extends Component {
|
|||||||
<CopyrightComponent></CopyrightComponent>
|
<CopyrightComponent></CopyrightComponent>
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|
||||||
<MovableView className='movable-point' x={this.state.screenWidth} y={this.state.screenHeight} style='opacity:0.3' direction='all' >
|
<MovableView className='movable-point' x={this.state.screenWidth} y={this.state.screenHeight} style='opacity:0.3' direction='all' >
|
||||||
<View onClick={this.goToCenterPage.bind(this)}> 个人中心</View>
|
<View className='movable-point' onClick={this.goToCenterPage.bind(this)}> 个人中心</View>
|
||||||
|
|
||||||
</MovableView>
|
</MovableView>
|
||||||
</MovableArea>
|
</MovableArea>
|
||||||
|
@ -86,7 +86,6 @@ class SupplyDemand extends Component {
|
|||||||
icon: res.data.err_msg == 'success' ? 'success' : 'none',
|
icon: res.data.err_msg == 'success' ? 'success' : 'none',
|
||||||
duration: 1000
|
duration: 1000
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
console.log('this.state.isPublishAndNew', this.state.isPublishAndNew)
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (this.state.isPublishAndNew) {
|
if (this.state.isPublishAndNew) {
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
|
@ -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