Commit c6076631 by 梁建民

Merge branch 'master' of http://119.23.72.7/shiyu/icsalesProgram

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