Commit 8b22af06 by 施宇

11111

parent 2192c2a1
......@@ -206,6 +206,9 @@ Page({
} else {
return
}
},
refreshGood:function(){
console.log(this.data.goodId)
}
})
\ No newline at end of file
......@@ -72,7 +72,10 @@
<text class="icon iconfont iconiconxiantiaoshouji11"></text>
<text class="gt-t">在线沟通</text>
</view>
<view class="zxgt btn-com btn-com-b" wx:if="{{editOrShow==1}}" bindtap="editGood">
<view class="edit-good btn-com btn-com-b" wx:if="{{editOrShow==1}}" bindtap="editGood">
<text class="gt-t">编辑商品</text>
</view>
<view class="refresh-time btn-com btn-com-y" wx:if="{{editOrShow==1}}" bindtap="refreshGood">
<text class="gt-t">擦亮商品</text>
</view>
</view>
\ No newline at end of file
......@@ -18,7 +18,6 @@ Page({
onLoad: function (options) {
let inquiryItemsId = options.inquiryItemsId || '';
let offerId = options.offerId || '';
// this.getData(inquiryItemsId, offerId)
this.getTopInfo(inquiryItemsId,offerId)
},
......@@ -30,7 +29,6 @@ Page({
me.setData({
topInfo: res.inquiry_list[inquiryItemsId]
});
console.log(me.data.topInfo)
me.getData(inquiryItemsId, offerId,token)
} else {
me.setData({
......
......@@ -20,13 +20,15 @@ Page({
province_id: "",
city_id: "",
district_id: "",
step: 0
step: 0,
selectArray: [],
selectIndex: [0, 0, 0]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
onLoad: function (options) {
//获取用户信息
http.getData(apis.userInfo, 'GET', {
token: wx.getStorageSync('access_token')
......@@ -34,7 +36,7 @@ Page({
if (res.errcode === 0) {
this.setData({
userInfo: res.data,
avatar: res.data.com_pic,
avatar: res.data.com_pic || '',
status: res.data.com_pic ? false : true,
province_id: res.data.province,
city_id: res.data.city,
......@@ -51,14 +53,14 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
onShow: function () {
......@@ -67,34 +69,34 @@ Page({
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
onReachBottom: function () {
},
/**
* 上传企业形象
*/
uploadImg: function() {
uploadImg: function () {
chooseImg(apis.ossupload, 1, (res) => {
if (res) {
......@@ -108,7 +110,7 @@ Page({
/**
* 删除企业形象
*/
deleteImg: function() {
deleteImg: function () {
this.setData({
avatar: '',
status: true
......@@ -117,7 +119,7 @@ Page({
/**
* 验证字段
*/
calcForm: function(val) {
calcForm: function (val) {
let detail_address = val.detail_address;
let mobile = val.mobile;
......@@ -128,7 +130,7 @@ Page({
*
* 企业提交
*/
formSubmit: function(e) {
formSubmit: function (e) {
if (this.calcForm(e.detail.value)) {
this.setData({
disabled: true,
......@@ -166,16 +168,18 @@ Page({
}, false, false, true);
}
},
bindMultiPickerChange: function(e) {
bindMultiPickerChange: function (e) {
this.setData({
step: 1, // 有数据时显示当前已选择的省市区
multiIndex: e.detail.value,
selectIndex: e.detail.value,
selectArray: this.data.multiArray,
province_id: this.data.multiArray[0][e.detail.value[0]].region_id,
city_id: this.data.multiArray[1][e.detail.value[1]].region_id,
district_id: this.data.multiArray[2][e.detail.value[2]] ? this.data.multiArray[2][e.detail.value[2]].region_id : ''
})
},
bindMultiPickerColumnChange: function(e) {
bindMultiPickerColumnChange: function (e) {
console.log(e.detail)
let column = e.detail.column // 当前改变的列
let data = {
......@@ -203,20 +207,20 @@ Page({
}
this.setData(data)
},
getProvince: function(isInit) {
getProvince: function (isInit) {
let me = this;
let indexArr = [];
let positionArr = [];
http.getData(apis.regionPcd, 'GET', null, (res) => {
if (res.errcode === 0) {
let province = [];
res.data.forEach(function(value, index, array) {
res.data.forEach(function (value, index, array) {
province.push({
id: index,
region_id: value.region_id,
name: value.region_name
});
if (value.region_id == me.data.province_id) {
if (value.region_id == (me.data.province_id == 0 ? 2 : me.data.province_id)) {
if (isInit) {
indexArr[0] = index;
}
......@@ -228,7 +232,7 @@ Page({
],
provinceList: province
})
let defaultId = isInit ? me.data.province_id : me.data.provinceList[0].region_id;
let defaultId = isInit ? (me.data.province_id == 0 ? 2 : me.data.province_id) : me.data.provinceList[0].region_id;
if (defaultId) {
me.setData({
currentProvinceId: defaultId
......@@ -242,7 +246,7 @@ Page({
}, false, false, true);
},
getCity: function(id, isInit, indexArr, positionArr) {
getCity: function (id, isInit, indexArr, positionArr) {
let me = this;
this.setData({
currentProvinceId: id // 保存当前选择的省级id
......@@ -251,13 +255,13 @@ Page({
province_id: id
}, (cityData) => {
let city = [];
cityData.data.forEach(function(value, index, array) {
cityData.data.forEach(function (value, index, array) {
city.push({
id: index,
region_id: value.region_id,
name: value.region_name
});
if (value.region_id == me.data.city_id) {
if (value.region_id == (me.data.city_id == 0 ? 52 : me.data.city_id)) {
if (isInit) {
indexArr[1] = index;
}
......@@ -267,7 +271,7 @@ Page({
multiArray: [me.data.provinceList, city, []],
cityList: city
})
let defaultId = isInit ? me.data.city_id : me.data.cityList[0].region_id;
let defaultId = isInit ? (me.data.city_id == 0 ? 52 : me.data.city_id) : me.data.cityList[0].region_id;
if (defaultId) {
me.setData({
currentCityId: defaultId
......@@ -279,7 +283,7 @@ Page({
me.getArea(defaultId, isInit, indexArr, positionArr)
}, false, false, true);
},
getArea: function(id, isInit, indexArr, positionArr) {
getArea: function (id, isInit, indexArr, positionArr) {
let me = this;
this.setData({
currentCityId: id // 保存当前选择的市级id
......@@ -289,13 +293,13 @@ Page({
city_id: id
}, (areaData) => {
let area = [];
areaData.data.forEach(function(value, index, array) {
areaData.data.forEach(function (value, index, array) {
area.push({
id: index,
region_id: value.region_id,
name: value.region_name
});
if (value.region_id == me.data.district_id) {
if (value.region_id == (me.data.district_id == 0 ? 513 : me.data.district_id)) {
if (isInit) {
indexArr[2] = index;
}
......@@ -305,7 +309,9 @@ Page({
positionArr.push(area);
me.setData({
multiArray: positionArr,
multiIndex: indexArr
multiIndex: indexArr,
selectIndex:indexArr,
selectArray: positionArr
});
if (me.data.province_id) {
me.setData({
......
......@@ -25,7 +25,7 @@
<picker class="t1" mode="multiSelector" bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange" value="{{multiIndex}}" range="{{multiArray}}" range-key="name">
<view wx:if="{{step==0}}">请选择省/市/区</view>
<view wx:if="{{step==1}}">
{{multiArray[0][multiIndex[0]].name}}<text>-</text>{{multiArray[1][multiIndex[1]].name}}<text wx:if="{{multiArray[2][multiIndex[2]].name}}">-</text>{{multiArray[2][multiIndex[2]].name}}
{{selectArray[0][selectIndex[0]].name}}<text>-</text>{{selectArray[1][selectIndex[1]].name}}<text wx:if="{{selectArray[2][selectIndex[2]].name}}">-</text>{{selectArray[2][selectIndex[2]].name}}
</view>
</picker>
......
<!--pages/tab/good/good.wxml-->
<wxs module="dateUtil" src="../../../utils/timeUtil.wxs"></wxs>
<!-- <wxs module="dateUtil" src="../../../utils/timeUtil.wxs"></wxs> -->
<view class="good-view {{isFixed?'fixed-good-view':''}}">
<view class="search-com {{isFixed?'search-com-fixed':''}}">
<text class="icon iconfont iconiconxiantiaoshouji8"></text>
......@@ -10,10 +10,10 @@
<text>已发布商品: </text>
<text class="num bold">{{total}}</text>
</view>
<text class="time">
<!-- <text class="time">
<text>最近更新:</text>
<text>{{dateUtil.dateFormat(time*1000)}}</text>
</text>
</text> -->
</view>
<view class="good-content">
<view wx:if="{{priceList&&priceList.length==0}}" class="nodata">
......@@ -39,8 +39,8 @@
<text>新增商品</text>
</view>
</view>
<view class="cl-good">
<!-- <view class="cl-good">
<view>擦亮</view>
<view>商品</view>
</view>
</view> -->
</view>
\ No newline at end of file
......@@ -64,7 +64,7 @@
padding-top: 16rpx;
}
.zxgt,.rate-btn {
.zxgt,.rate-btn,.refresh-time {
position: absolute;
bottom: 94rpx;
left: 0;
......@@ -82,3 +82,10 @@
.rate-btn{
bottom: 68rpx;
}
.edit-good{
position: absolute;
bottom:230rpx;
left:0;
right:0;
}
// const auth_url = 'https://authapi.icsales.com';
// const so_url = 'https://soapi.icsales.com';
// const offer_url = "https://offerapi.icsales.com";
// const user_url = 'https://userapi.icsales.com';
// const goods_url = 'https://goodsapi.icsales.com';
// const home_url = 'https://home.icsales.com';
const auth_url = 'http://authapi.icsales.cc';
const so_url = 'http://soapi.icsales.cc';
const offer_url = "http://offerapi.icsales.cc";
const user_url = 'http://userapi.icsales.cc';
const goods_url = 'http://goodsapi.icsales.cc';
const home_url = 'http://home.icsales.cc';
const welfare_url = 'http://welfareapi.icsales.cc';
const auth_url = 'https://authapi.icsales.com';
const so_url = 'https://soapi.icsales.com';
const offer_url = "https://offerapi.icsales.com";
const user_url = 'https://userapi.icsales.com';
const goods_url = 'https://goodsapi.icsales.com';
const home_url = 'https://home.icsales.com';
const welfare_url = 'https://welfareapi.icsales.com'
// const auth_url = 'http://authapi.icsales.cc';
// const so_url = 'http://soapi.icsales.cc';
// const offer_url = "http://offerapi.icsales.cc";
// const user_url = 'http://userapi.icsales.cc';
// const goods_url = 'http://goodsapi.icsales.cc';
// const home_url = 'http://home.icsales.cc';
// const welfare_url = 'http://welfareapi.icsales.cc';
const apis = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment