Commit e37d1e65 by 梁建民

js

parent ee7cd75f
// pages/person/company/index.js const http = require('../../../utils/util.js');
import {
apis
} from '../../../utils/api.js';
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
userInfo: {},
business:{}
}, },
/** /**
...@@ -27,6 +33,29 @@ Page({ ...@@ -27,6 +33,29 @@ Page({
*/ */
onShow: function () { onShow: function () {
//获取数量统计
http.getData(apis.countBusiness, 'GET', {
token: wx.getStorageSync('access_token')
}, (res) => {
if (res.errcode === 0) {
this.setData({
business: res.data
});
}
}, true);
//获取用户信息
http.getData(apis.userInfo, 'GET', {
token: wx.getStorageSync('access_token')
}, (res) => {
if (res.errcode === 0) {
this.setData({
userInfo: res.data
});
}
}, true);
}, },
/** /**
...@@ -63,7 +92,7 @@ Page({ ...@@ -63,7 +92,7 @@ Page({
onShareAppMessage: function () { onShareAppMessage: function () {
}, },
/** /**
* 跳转地址 * 跳转地址
*/ */
toUrl: function (e) { toUrl: function (e) {
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<view class="head boxsiz row verCenter bothSide"> <view class="head boxsiz row verCenter bothSide">
<view class="row"> <view class="row">
<view class="pic"> <view class="pic">
<cover-image class="im" src="/res/images/imgs/test.jpg"></cover-image> <cover-image class="im" src="{{userInfo.avatar}}"></cover-image>
</view> </view>
<view class="txt"> <view class="txt">
<text class="t1">深圳市猎芯科技有限公司</text> <text class="t1">{{userInfo.company_name}}</text>
<view class="row"> <view class="row">
<view class="company-txt"> <view class="company-txt">
<text class="icon iconfont iconiconxiantiaoshouji24"></text> <text class="icon iconfont iconiconxiantiaoshouji24"></text>
...@@ -25,15 +25,15 @@ ...@@ -25,15 +25,15 @@
</view> </view>
<view class="tab row rowCenter verCenter"> <view class="tab row rowCenter verCenter">
<view class="v"> <view class="v">
<text class="t1">513</text> <text class="t1">{{business.goods}}</text>
<text class="t2">商品</text> <text class="t2">商品</text>
</view> </view>
<view class="v"> <view class="v">
<text class="t1">53</text> <text class="t1">{{business.inquiry}}</text>
<text class="t2">询价</text> <text class="t2">询价</text>
</view> </view>
<view class="v"> <view class="v">
<text class="t1">2</text> <text class="t1">{{business.offer}}</text>
<text class="t2">报价</text> <text class="t2">报价</text>
</view> </view>
</view> </view>
...@@ -52,14 +52,12 @@ ...@@ -52,14 +52,12 @@
</view> </view>
<view class="text-introduced column"> <view class="text-introduced column">
<text class="tit">企业简介</text> <text class="tit">企业简介</text>
<text class="t1"> <text class="t1">{{userInfo.com_desc}}</text>
猎芯网是由深圳市猎芯科技有限公司开发运营的电子元器件交易服务平台,可为用户提供涵盖购买、报关、仓储、金融等整个交易环节的全闭环服务。 猎芯网于2015年7月上线,总部位于深圳,在北京、香港设有分公司,迄今已获得经纬中国、微光创投、华诺创投、京东、海通证券及文华海汇等多轮融资,及E络盟与Mouser贸泽电子等多家知名分销商授权; 猎芯网提供自营、联营、寄售、供应链金融等服务,并在深圳光明新区设有一万多平米的自营仓库,实现当天下单,当天发货,订单动态全透明,极大的提升了效率 ,降低了交易成本;同时与5500多家优质供应商合作,提供超过2000万的联营商品选择,极大地满足了广大用户的采购需求!
</text>
</view> </view>
<view class="text-introduced column"> <view class="text-introduced column">
<text class="tit">公司地址</text> <text class="tit">公司地址</text>
<text class="t1">广东省深圳市龙岗区坂田街道五和大道南路2号万科星火Online天枢仓6栋3楼</text> <text class="t1">广东省深圳市龙岗区坂田街道五和大道南路2号万科星火Online天枢仓6栋3楼</text>
</view> </view>
<view class="btn">联系电话:15012479484</view> <view class="btn">联系电话:{{userInfo.com_tel}}</view>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -178,6 +178,9 @@ Page({ ...@@ -178,6 +178,9 @@ Page({
let params = Object.assign({}, e.detail.value, { let params = Object.assign({}, e.detail.value, {
province_id: this.data.province_id,
city_id: this.data.city_id,
district_id: this.data.district_id,
avatar: this.data.avatar avatar: this.data.avatar
}); });
...@@ -186,6 +189,9 @@ Page({ ...@@ -186,6 +189,9 @@ Page({
if (res.errcode === 0) { if (res.errcode === 0) {
wx.navigateTo({
url: '/pages/person/company/index'
});
} else { } else {
...@@ -245,9 +251,9 @@ Page({ ...@@ -245,9 +251,9 @@ Page({
multiArray: arr multiArray: arr
}); });
let city_index=this.data.multiIndex; let city_index = this.data.multiIndex;
city_index.splice(1,1,0); city_index.splice(1, 1, 0);
this.setData({ this.setData({
multiIndex: city_index multiIndex: city_index
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</block> </block>
</view> </view>
<view class="txt"> <view class="txt">
<textarea bindblur="bindTextAreaBlur" auto-height placeholder="请输入企业简介" class="tarea" placeholder-class="textarea-placeholder" /> <textarea name='com_desc' bindblur="bindTextAreaBlur" auto-height placeholder="请输入企业简介" class="tarea" placeholder-class="textarea-placeholder" />
</view> </view>
<view class="hr"></view> <view class="hr"></view>
<view class="list row verCenter bothSide bor"> <view class="list row verCenter bothSide bor">
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<view class="list row verCenter bothSide bor"> <view class="list row verCenter bothSide bor">
<view class="l">联系电话</view> <view class="l">联系电话</view>
<view class="r"> <view class="r">
<input type="text" placeholder="请输入联系电话" placeholder-class="placeholderClass" name="mobile" /> <input type="text" placeholder="请输入联系电话" placeholder-class="placeholderClass" name="com_tel" />
</view> </view>
</view> </view>
<view class="btn-wrap"> <view class="btn-wrap">
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": 22, "current": 23,
"list": [ "list": [
{ {
"id": -1, "id": -1,
...@@ -208,6 +208,13 @@ ...@@ -208,6 +208,13 @@
"id": -1, "id": -1,
"name": "pages/person/editcompany/index", "name": "pages/person/editcompany/index",
"pathName": "pages/person/editcompany/index", "pathName": "pages/person/editcompany/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/person/auth/index",
"pathName": "pages/person/auth/index",
"scene": null "scene": null
} }
] ]
......
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