Commit 6da4b563 by 施宇

11111

parent 60a4d7b0
Showing with 449 additions and 871 deletions
...@@ -54,9 +54,9 @@ App({ ...@@ -54,9 +54,9 @@ App({
if (this.globalData.auth) { if (this.globalData.auth) {
//是否登录 //是否登录
if (this.globalData.token) { if (this.globalData.token) {
wx.switchTab({ // wx.switchTab({
url: '/pages/tab/home/home' // url: '/pages/tab/home/home'
}); // });
} else { } else {
wx.redirectTo({ wx.redirectTo({
url: '/pages/person/login/index' url: '/pages/person/login/index'
......
{ {
"pages": [ "pages": [
"pages/tab/home/home",
"pages/person/auth/index", "pages/person/auth/index",
"pages/person/forget/index", "pages/person/forget/index",
"pages/person/register/index", "pages/person/register/index",
...@@ -8,12 +9,10 @@ ...@@ -8,12 +9,10 @@
"pages/person/getphone/index", "pages/person/getphone/index",
"pages/person/agreement/index", "pages/person/agreement/index",
"pages/person/successfully/index", "pages/person/successfully/index",
"pages/tab/home/home",
"pages/form/good/index", "pages/form/good/index",
"pages/tab/good/good", "pages/tab/good/good",
"pages/tab/price/price", "pages/tab/price/price",
"pages/form/bj/index", "pages/form/bj/index",
"pages/list/bj/index",
"pages/list/xj/index", "pages/list/xj/index",
"pages/tab/message/message", "pages/tab/message/message",
"pages/tab/me/me", "pages/tab/me/me",
......
...@@ -99,7 +99,7 @@ Component({ ...@@ -99,7 +99,7 @@ Component({
chatType: me.data.chatType, chatType: me.data.chatType,
success: function (argument) { success: function (argument) {
console.log('发送图片成功') console.log('发送图片成功')
disp.fire('em.chat.sendSuccess', id); // disp.fire('em.chat.sendSuccess', id);
}, },
fail:function(){ fail:function(){
console.log('发送图片失败') console.log('发送图片失败')
......
...@@ -102,7 +102,7 @@ Component({ ...@@ -102,7 +102,7 @@ Component({
chatType: this.data.chatType, chatType: this.data.chatType,
success(id, serverMsgId) { success(id, serverMsgId) {
console.log('发送消息成功') console.log('发送消息成功')
disp.fire('em.chat.sendSuccess', id, me.data.userMessage); // disp.fire('em.chat.sendSuccess', id, me.data.userMessage);
}, },
fail(id, serverMsgId) { fail(id, serverMsgId) {
console.log('发送消息失败') console.log('发送消息失败')
...@@ -151,7 +151,7 @@ Component({ ...@@ -151,7 +151,7 @@ Component({
console.log('发送模板成功') console.log('发送模板成功')
console.log(me.data.username.your) console.log(me.data.username.your)
// getApp().addChatMember(me.data.username.your) // getApp().addChatMember(me.data.username.your)
disp.fire('em.chat.sendSuccess', id); // disp.fire('em.chat.sendSuccess', id);
}, },
fail: function() { fail: function() {
console.log('发送模板失败'); console.log('发送模板失败');
......
...@@ -157,7 +157,7 @@ Component({ ...@@ -157,7 +157,7 @@ Component({
wx.setStorageSync(sessionKey, null); wx.setStorageSync(sessionKey, null);
disp.on('em.xmpp.error.sendMsgErr', function(err) { disp.on('em.xmpp.error.sendMsgErr', function(err) {
curMsgMid = err.data.mid curMsgMid = err.data.mid
isFail = true isFail = true;
return return
console.log('发送失败了') console.log('发送失败了')
let msgList = me.data.chatMsg let msgList = me.data.chatMsg
......
...@@ -11,10 +11,10 @@ Component({ ...@@ -11,10 +11,10 @@ Component({
}, },
properties: { properties: {
priceList: { priceList: {
type: Array//数据 type: Array //数据
}, },
priceType: { priceType: {
type: Number//展示类型 type: Number //展示类型
}, },
xb: { xb: {
type: Number // 询报价类型 1询价 2报价 type: Number // 询报价类型 1询价 2报价
...@@ -32,49 +32,50 @@ Component({ ...@@ -32,49 +32,50 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
emitevent: function (e) { emitevent: function(e) {
let inquiryItemsId = e.currentTarget.dataset.inquiryitemsid; let inquiryItemsId = e.currentTarget.dataset.inquiryitemsid;
let goodId = e.currentTarget.dataset.goodid; let goodId = e.currentTarget.dataset.goodid;
let offerId = e.currentTarget.dataset.offerid; let offerId = e.currentTarget.dataset.offerid;
let xb = e.currentTarget.dataset.xb; let xb = e.currentTarget.dataset.xb;
let type = e.currentTarget.dataset.type;//1代表询价 2代表报价 3代表商品 let type = e.currentTarget.dataset.type; //1代表询价 2代表报价 3代表商品
let priceType = e.currentTarget.dataset.pricetype; let priceType = e.currentTarget.dataset.pricetype;
if (judgeToken(true)) { if (judgeToken(true)) {
if (priceType == 1) { if (priceType == 1) {
if (type == 1) { if (type == 1) {
wx.navigateTo({ wx.navigateTo({
url: "/pages/list/xj/index?inquiryItemsId=" + inquiryItemsId url: "/pages/list/xj/index?type=1&inquiryItemsId=" + inquiryItemsId
}) })
} else if (type == 2) { } else if (type == 2) {
console.log(111)
wx.navigateTo({ wx.navigateTo({
url: "/pages/list/bj/index?inquiryItemsId=" + inquiryItemsId + '&offerId=' + offerId url: "/pages/list/xj/index?type=2&inquiryItemsId=" + inquiryItemsId + '&offerId=' + offerId
}) })
} }
} else if (priceType == 2){//搜索页面商品跳转 } else if (priceType == 2) { //搜索页面商品跳转
wx.navigateTo({ wx.navigateTo({
url: "/pages/detail/good/index?goodId=" + goodId + '&type=2' url: "/pages/detail/good/index?goodId=" + goodId + '&type=2'
}) })
} else if (priceType == 3) { } else if (priceType == 3) {
if (type == 1) { if (type == 1) {
wx.navigateTo({ wx.navigateTo({
url: "/pages/list/bj/index?inquiryItemsId=" + inquiryItemsId url: "/pages/list/xj/index?type=2&inquiryItemsId=" + inquiryItemsId
}) })
} else if (type == 2) { } else if (type == 2) {
wx.navigateTo({ wx.navigateTo({
url: "/pages/detail/xj/index?inquiryItemsId=" + inquiryItemsId + '&offerId=' + offerId url: "/pages/detail/xj/index?inquiryItemsId=" + inquiryItemsId + '&offerId=' + offerId
}) })
} }
}else if(priceType == 4){ } else if (priceType == 4) {
} else if (priceType ==5){//tab页商品跳转 } else if (priceType == 5) { //tab页商品跳转
wx.navigateTo({ wx.navigateTo({
url: "/pages/detail/good/index?goodId=" + goodId + '&type=1' url: "/pages/detail/good/index?goodId=" + goodId + '&type=1'
}) })
} }
} }
}, },
previewImage: function (e) { previewImage: function(e) {
let img = e.currentTarget.dataset.image; let img = e.currentTarget.dataset.image;
wx.previewImage({ wx.previewImage({
urls: [img] urls: [img]
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<!-- 搜索页的商品展示 --> <!-- 搜索页的商品展示 -->
<block wx:if="{{priceType==2}}"> <block wx:if="{{priceType==2}}">
<view class="price-item" wx:for="{{priceList}}" wx:key="{{index}}" bindtap="emitevent" data-goodid="{{item.goods_id}}" data-pricetype="2"> <view class="price-item" wx:for="{{priceList}}" wx:key="{{index}}" bindtap="emitevent" data-goodid="{{item.goods_id}}" data-pricetype="2">
<view class="item-header px-hr-bottom row verCenter bothSide nowrap"> <view class="item-header px-hr-bottom row verCenter bothSide nowrap ">
<view class="row verCenter"> <view class="row verCenter">
<text class="mark bao"> <text class="mark bao">
<block wx:if="{{item.company_type!=''}}"> <block wx:if="{{item.company_type!=''}}">
...@@ -115,12 +115,17 @@ ...@@ -115,12 +115,17 @@
<view class="item-middle row verCenter bothSide item-middle2 nowrap"> <view class="item-middle row verCenter bothSide item-middle2 nowrap">
<text class="name ellipsis">{{item.goods_name||'--'}}</text> <text class="name ellipsis">{{item.goods_name||'--'}}</text>
<text class="price"> <text class="price">
<block wx:if="{{!item.price||item.price=='0.00'||item.price=='0'}}">
未回复
</block>
<block wx:else>
<block wx:if="{{item.currency == 1}}"> <block wx:if="{{item.currency == 1}}">
¥{{item.price}} ¥{{item.price}}
</block> </block>
<block wx:else> <block wx:else>
${{item.price}} ${{item.price}}
</block> </block>
</block>
</text> </text>
</view> </view>
<view class="item-middle row verCenter nowrap"> <view class="item-middle row verCenter nowrap">
...@@ -137,9 +142,9 @@ ...@@ -137,9 +142,9 @@
</view> </view>
</block> </block>
<!-- 商品管理 --> <!-- 商品管理 -->
<block wx:if="{{priceType == 5}}" > <block wx:if="{{priceType == 5}}">
<view class="price-item" wx:for="{{priceList}}" wx:key="{{index}}" bindtap="emitevent" data-goodid="{{item.goods_id}}" data-pricetype="5"> <view class="price-item good-item" wx:for="{{priceList}}" wx:key="{{index}}" bindtap="emitevent" data-goodid="{{item.goods_id}}" data-pricetype="5">
<view class="item-header row verCenter bothSide nowrap"> <view class="item-header row verCenter bothSide nowrap good-header">
<view class="row verCenter"> <view class="row verCenter">
<text class="name ellipsis good-name">{{item.goods_name}}</text> <text class="name ellipsis good-name">{{item.goods_name}}</text>
<block wx:if="{{item.goods_images}}"> <block wx:if="{{item.goods_images}}">
...@@ -147,12 +152,9 @@ ...@@ -147,12 +152,9 @@
</block> </block>
</view> </view>
<text class="price"> <text class="price">
<block wx:if="{{item.currency == 1}}"> <block wx:if="{{item.currency == 1}}">¥{{item.price}}</block>
¥{{item.price}} <block wx:else>${{item.price}}</block>
</block> </text>
<block wx:else>
${{item.price}}
</block></text>
</view> </view>
<view class="item-middle row verCenter nowrap"> <view class="item-middle row verCenter nowrap">
<text class="brand ellipsis"><text>品牌:</text>{{item.brand_name}}</text> <text class="brand ellipsis"><text>品牌:</text>{{item.brand_name}}</text>
......
...@@ -3,16 +3,19 @@ ...@@ -3,16 +3,19 @@
.price-item { .price-item {
padding-left: 24rpx; padding-left: 24rpx;
} }
.good-item{
padding-bottom:24rpx;
}
.item-header { .item-header {
padding: 29rpx 23rpx 21rpx 0; padding: 29rpx 23rpx 21rpx 0;
} }
.good-header{
padding:14rpx 23rpx 13rpx 0;
}
.item-header .row { .item-header .row {
overflow: hidden; overflow: hidden;
} }
.item-header .mark { .item-header .mark {
border-radius: 2px; border-radius: 2px;
font-size: 24rpx; font-size: 24rpx;
......
...@@ -56,13 +56,6 @@ Page({ ...@@ -56,13 +56,6 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
switchTab: function (e) { switchTab: function (e) {
let i = e.currentTarget.dataset.index; let i = e.currentTarget.dataset.index;
if (i == this.data.tabIndex) { if (i == this.data.tabIndex) {
......
// pages/detail/good/index.js // pages/detail/good/index.js
import { getData, changeTime } from '../../../utils/util.js'; import {
import { apis } from '../../../utils/api.js'; getData,
changeTime
} from '../../../utils/util.js';
import {
apis
} from '../../../utils/api.js';
Page({ Page({
/** /**
...@@ -8,22 +13,23 @@ Page({ ...@@ -8,22 +13,23 @@ Page({
*/ */
data: { data: {
info: null, info: null,
editOrShow: -1,//1编辑 2在线沟通 editOrShow: -1, //1编辑 2在线沟通
goodId: "", goodId: "",
type: "", type: "",
isShowImg: false,
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function(options) {
this.setData({ this.setData({
goodId: options.goodId || '', goodId: options.goodId || '',
type: options.type || '' type: options.type || ''
}) })
}, },
getData: function () { getData: function() {
let me = this; let me = this;
let token = wx.getStorageSync('access_token'); let token = wx.getStorageSync('access_token');
let url = ""; let url = "";
...@@ -40,7 +46,7 @@ Page({ ...@@ -40,7 +46,7 @@ Page({
getData(url, 'get', { getData(url, 'get', {
"goods_id/eq": goodId, "goods_id/eq": goodId,
"token": token, "token": token,
}, function (res) { }, function(res) {
if (res.errcode == 0) { if (res.errcode == 0) {
if (res.total == 0) { if (res.total == 0) {
me.setData({ me.setData({
...@@ -77,12 +83,12 @@ Page({ ...@@ -77,12 +83,12 @@ Page({
} }
}, true) }, true)
}, },
editGood: function () { editGood: function() {
wx.navigateTo({ wx.navigateTo({
url: "/pages/form/good/index?goodId=" + this.data.goodId, url: "/pages/form/good/index?goodId=" + this.data.goodId,
}) })
}, },
sendTemplate: function () { sendTemplate: function() {
let data = this.data.info; let data = this.data.info;
let my = wx.getStorageSync("myUsername"); let my = wx.getStorageSync("myUsername");
let companyName = wx.getStorageSync("company_name"); let companyName = wx.getStorageSync("company_name");
...@@ -121,49 +127,69 @@ Page({ ...@@ -121,49 +127,69 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () { onReady: function() {
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function() {
if (this.data.isShowImg) {
this.setData({
isShowImg: false
})
} else {
this.getData() this.getData()
}
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () { onHide: function() {
}, },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () { onUnload: function() {
}, },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function() {
}, },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { onReachBottom: function() {
}, },
onShareAppMessage: function(res) {
return {
title: this.data.info.goods_name || '',
path: "/pages/detail/good/index?type=3&goodId=" + this.data.goodId
}
},
previewImage: function() {
let img = this.data.info.goods_images;
if (img) {
this.setData({
isShowImg: true
})
wx.previewImage({
urls: [img]
})
} else {
return
}
}
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })
\ No newline at end of file
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<text class="c-com">{{dateUtil.dateFormat(info.update_time*1000)}}</text> <text class="c-com">{{dateUtil.dateFormat(info.update_time*1000)}}</text>
</view> </view>
</view> </view>
<image class="right" src="{{info.goods_images?info.goods_images:'/res/images/imgs/defaultgood.png'}}"></image> <image class="right" src="{{info.goods_images?info.goods_images:'/res/images/imgs/defaultgood.png'}}" bindtap="previewImage"></image>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -149,10 +149,5 @@ Page({ ...@@ -149,10 +149,5 @@ Page({
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })
\ No newline at end of file
...@@ -60,9 +60,6 @@ Page({ ...@@ -60,9 +60,6 @@ Page({
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () {
},
closeTip:function(){ closeTip:function(){
this.setData({ this.setData({
isShowTip:false isShowTip:false
......
// pages/form/bj/index.js // pages/form/bj/index.js
import { getData, tips } from '../../../utils/util.js'; import {
import { apis } from '../../../utils/api.js'; getData,
tips
} from '../../../utils/util.js';
import {
apis
} from '../../../utils/api.js';
Page({ Page({
/** /**
...@@ -10,11 +15,16 @@ Page({ ...@@ -10,11 +15,16 @@ Page({
inquiryItemsId: "", inquiryItemsId: "",
offerId: "", offerId: "",
type: "", type: "",
isShowSwitch: false,
isShowTime: false, isShowTime: false,
currency: 1, currency: 0,
isClick: true, isClick: true,
isShowTip: true isShowTip: true,
array: ['RMB', 'USD']
},
bindPickerChange: function (e) {
this.setData({
currency: e.detail.value
})
}, },
formSubmit: function (e) { formSubmit: function (e) {
let obj = e.detail.value; let obj = e.detail.value;
...@@ -40,7 +50,7 @@ Page({ ...@@ -40,7 +50,7 @@ Page({
tips('请填写价格'); tips('请填写价格');
return return
} else { } else {
if (obj.hq == 2) {//期货 if (obj.hq == 2) { //期货
if (!obj.day.trim().length) { if (!obj.day.trim().length) {
tips('请填写货期'); tips('请填写货期');
return return
...@@ -60,7 +70,7 @@ Page({ ...@@ -60,7 +70,7 @@ Page({
let token = wx.getStorageSync('access_token'); let token = wx.getStorageSync('access_token');
let url; let url;
obj.hq == 1 ? obj.delivery_time = '现货' : obj.delivery_time = obj.day + '天'; obj.hq == 1 ? obj.delivery_time = '现货' : obj.delivery_time = obj.day + '天';
obj.currency = this.data.currency; obj.currency = this.data.currency == 0 ? 1 : 2;
obj.token = token; obj.token = token;
if (me.data.type == 1) { if (me.data.type == 1) {
obj.inquiry_items_id = me.data.inquiryItemsId; obj.inquiry_items_id = me.data.inquiryItemsId;
...@@ -78,20 +88,12 @@ Page({ ...@@ -78,20 +88,12 @@ Page({
getData(url, 'get', obj, function (res) { getData(url, 'get', obj, function (res) {
if (res.errcode == 0) { if (res.errcode == 0) {
tips('提交成功') tips('提交成功')
// wx.showToast({
// title: '提交成功',
// icon: 'none',
// duration: 2000,
// success: function () {
// wx.navigateBack()
// }
// })
me.setData({ me.setData({
isClick: true isClick: true
}); });
setTimeout(() => {
wx.navigateBack()
}, 1000)
} else { } else {
tips('提交失败') tips('提交失败')
...@@ -164,24 +166,6 @@ Page({ ...@@ -164,24 +166,6 @@ Page({
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
changePrice: function (e) {
let type = e.target.dataset.pricetype;
this.setData({
currency: type,
isShowSwitch: false
})
},
switchPrice: function () {
this.setData({
isShowSwitch: !this.data.isShowSwitch
})
},
closeTip: function () { closeTip: function () {
this.setData({ this.setData({
isShowTip: false isShowTip: false
......
...@@ -35,16 +35,11 @@ ...@@ -35,16 +35,11 @@
<view class="form-item row verCenter px-hr-top bj-item"> <view class="form-item row verCenter px-hr-top bj-item">
<text class="form-item-title">*报价</text> <text class="form-item-title">*报价</text>
<view class="form-item-right row verCenter bothSide"> <view class="form-item-right row verCenter bothSide">
<input placeholder="请输入单价" placeholder-class="placeholderClass" type="number" name="price"></input> <input placeholder="请输入单价" placeholder-class="placeholderClass" type="digit" name="price"></input>
<view class="price-type" bindtap="switchPrice"> <picker class="price-type" value="{{currency}}" range="{{array}}" bindchange="bindPickerChange">
<text class="price-value">{{currency == 1?'RMB':'USD'}}</text> <text class="price-value">{{array[currency]}}</text>
<text class="icon iconfont iconbianzu1"></text> <text class="icon iconfont iconbianzu1"></text>
</view> </picker>
</view>
<view class="price-ul {{isShowSwitch?'show':''}}">
<view class="price-li {{currency == 1?'active':''}}" data-pricetype="1" bindtap="changePrice">RMB</view>
<view class="price-li px-hr-top {{currency == 2?'active':''}}" data-pricetype="2" bindtap="changePrice">USD</view>
</view> </view>
</view> </view>
<view class="form-item row verCenter px-hr-top qx-item"> <view class="form-item row verCenter px-hr-top qx-item">
...@@ -63,7 +58,7 @@ ...@@ -63,7 +58,7 @@
<view class="form-item row verCenter px-hr-top" hidden="{{!isShowTime}}"> <view class="form-item row verCenter px-hr-top" hidden="{{!isShowTime}}">
<text class="form-item-title">*时间</text> <text class="form-item-title">*时间</text>
<view class="form-item-right"> <view class="form-item-right">
<input placeholder="请输入货期时间(天)" placeholder-class="placeholderClass" type="text" name="day"></input> <input placeholder="请输入货期时间(天)" placeholder-class="placeholderClass" type="number" name="day"></input>
</view> </view>
</view> </view>
<view class="form-hr"></view> <view class="form-hr"></view>
......
...@@ -7,10 +7,9 @@ Page({ ...@@ -7,10 +7,9 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
isShowSwitch: false,
isShowTime: false, isShowTime: false,
imgUrl: null, imgUrl: null,
currency: 1, currency: 0,
isClick: true, isClick: true,
goodsName: "", goodsName: "",
brandName: "", brandName: "",
...@@ -20,9 +19,14 @@ Page({ ...@@ -20,9 +19,14 @@ Page({
day: "", day: "",
goodId: "", goodId: "",
hq: "1", hq: "1",
isShowTip: true isShowTip: true,
array: ['RMB', 'USD']
},
bindPickerChange: function (e) {
this.setData({
currency: e.detail.value
})
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
...@@ -70,7 +74,7 @@ Page({ ...@@ -70,7 +74,7 @@ Page({
encap: infoObj.encap, encap: infoObj.encap,
stock: infoObj.stock, stock: infoObj.stock,
price: infoObj.price, price: infoObj.price,
currency: infoObj.currency, currency: infoObj.currency == 1?0:1,
imgUrl: infoObj.goods_images imgUrl: infoObj.goods_images
}); });
if (infoObj.delivery_time !== '现货') { if (infoObj.delivery_time !== '现货') {
...@@ -128,7 +132,7 @@ Page({ ...@@ -128,7 +132,7 @@ Page({
let token = wx.getStorageSync('access_token'); let token = wx.getStorageSync('access_token');
let url = ""; let url = "";
obj.hq == 1 ? obj.delivery_time = '现货' : obj.delivery_time = obj.day + '天'; obj.hq == 1 ? obj.delivery_time = '现货' : obj.delivery_time = obj.day + '天';
obj.currency = this.data.currency; obj.currency = this.data.currency == 0 ? 1 : 2;
obj.goods_images = this.data.imgUrl || ''; obj.goods_images = this.data.imgUrl || '';
obj.token = token; obj.token = token;
if (me.data.goodId) { if (me.data.goodId) {
...@@ -229,25 +233,6 @@ Page({ ...@@ -229,25 +233,6 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
changePrice: function (e) {
let type = e.target.dataset.pricetype;
this.setData({
currency: type,
isShowSwitch: false
})
},
switchPrice: function () {
this.setData({
isShowSwitch: !this.data.isShowSwitch
})
},
closeTip: function () { closeTip: function () {
this.setData({ this.setData({
isShowTip: false isShowTip: false
......
...@@ -46,15 +46,11 @@ ...@@ -46,15 +46,11 @@
<view class="form-item row verCenter px-hr-top bj-item"> <view class="form-item row verCenter px-hr-top bj-item">
<text class="form-item-title">*报价</text> <text class="form-item-title">*报价</text>
<view class="form-item-right row verCenter bothSide"> <view class="form-item-right row verCenter bothSide">
<input placeholder="请输入单价" placeholder-class="placeholderClass" type="number" name="price" value="{{price}}"></input> <input placeholder="请输入单价" placeholder-class="placeholderClass" type="digit" name="price" value="{{price}}"></input>
<view class="price-type" bindtap="switchPrice"> <picker class="price-type" value="{{currency}}" range="{{array}}" bindchange="bindPickerChange">
<text class="price-value">{{currency == 1?'RMB':'USD'}}</text> <text class="price-value">{{array[currency]}}</text>
<text class="icon iconfont iconbianzu1"></text> <text class="icon iconfont iconbianzu1"></text>
</view> </picker>
</view>
<view class="price-ul {{isShowSwitch?'show':''}}">
<view class="price-li {{currency == 1?'active':''}}" data-pricetype="1" bindtap="changePrice">RMB</view>
<view class="price-li px-hr-top {{currency == 2?'active':''}}" data-pricetype="2" bindtap="changePrice">USD</view>
</view> </view>
</view> </view>
<view class="form-item row verCenter px-hr-top qx-item px-hr-bottom"> <view class="form-item row verCenter px-hr-top qx-item px-hr-bottom">
...@@ -62,10 +58,10 @@ ...@@ -62,10 +58,10 @@
<view class="form-item-right"> <view class="form-item-right">
<radio-group name="hq" bindchange="radioChange"> <radio-group name="hq" bindchange="radioChange">
<label> <label>
<radio value="1" checked="{{hq == 1}}"/>现货 <radio value="1" checked="{{hq == 1}}" />现货
</label> </label>
<label> <label>
<radio value="2" checked="{{hq == 2}}"/>期货 <radio value="2" checked="{{hq == 2}}" />期货
</label> </label>
</radio-group> </radio-group>
</view> </view>
...@@ -73,7 +69,7 @@ ...@@ -73,7 +69,7 @@
<view class="form-item row verCenter px-hr-bottom" hidden="{{!isShowTime}}"> <view class="form-item row verCenter px-hr-bottom" hidden="{{!isShowTime}}">
<text class="form-item-title">*时间</text> <text class="form-item-title">*时间</text>
<view class="form-item-right"> <view class="form-item-right">
<input placeholder="请输入货期时间(天)" placeholder-class="placeholderClass" type="text" name="day" value="{{day}}"></input> <input placeholder="请输入货期时间(天)" placeholder-class="placeholderClass" type="number" name="day" value="{{day}}"></input>
</view> </view>
</view> </view>
<!-- <button class="btn-com btn-com-b hf-btn " form-type="submit" style="margin-bottom:{{'goodId'&&'32rpx'}}"> --> <!-- <button class="btn-com btn-com-b hf-btn " form-type="submit" style="margin-bottom:{{'goodId'&&'32rpx'}}"> -->
......
...@@ -59,12 +59,6 @@ Page({ ...@@ -59,12 +59,6 @@ Page({
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
textareaChange: function (e) { textareaChange: function (e) {
let val = e.detail.value; let val = e.detail.value;
this.setData({ this.setData({
......
...@@ -68,10 +68,4 @@ Page({ ...@@ -68,10 +68,4 @@ Page({
}) })
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })
\ No newline at end of file
...@@ -13,12 +13,17 @@ Page({ ...@@ -13,12 +13,17 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
isShowSwitch: false,
isShowTime: false, isShowTime: false,
imgUrl: null, imgUrl: null,
currency: 1, currency: 0,
isClick: true, isClick: true,
isShowTip: true isShowTip: true,
array: ['RMB','USD']
},
bindPickerChange: function (e) {
this.setData({
currency: e.detail.value
})
}, },
formSubmit: function(e) { formSubmit: function(e) {
let obj = e.detail.value; let obj = e.detail.value;
...@@ -63,7 +68,7 @@ Page({ ...@@ -63,7 +68,7 @@ Page({
let me = this; let me = this;
let token = wx.getStorageSync('access_token'); let token = wx.getStorageSync('access_token');
obj.hq == 1 ? obj.delivery_time = '现货' : obj.delivery_time = obj.day + '天'; obj.hq == 1 ? obj.delivery_time = '现货' : obj.delivery_time = obj.day + '天';
obj.currency = this.data.currency; obj.currency = this.data.currency == 0?1:2;
obj.goods_images = this.data.imgUrl || ''; obj.goods_images = this.data.imgUrl || '';
obj.token = token; obj.token = token;
delete obj.day; delete obj.day;
...@@ -158,25 +163,6 @@ Page({ ...@@ -158,25 +163,6 @@ Page({
onReachBottom: function() { onReachBottom: function() {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
},
changePrice: function(e) {
let type = e.target.dataset.pricetype;
this.setData({
currency: type,
isShowSwitch: false
})
},
switchPrice: function() {
this.setData({
isShowSwitch: !this.data.isShowSwitch
})
},
closeTip: function() { closeTip: function() {
this.setData({ this.setData({
isShowTip: false isShowTip: false
......
...@@ -46,16 +46,11 @@ ...@@ -46,16 +46,11 @@
<view class="form-item row verCenter px-hr-top bj-item"> <view class="form-item row verCenter px-hr-top bj-item">
<text class="form-item-title">*价格</text> <text class="form-item-title">*价格</text>
<view class="form-item-right row verCenter bothSide"> <view class="form-item-right row verCenter bothSide">
<input placeholder="请输入单价" placeholder-class="placeholderClass" type="number" name="price"></input> <input placeholder="请输入单价" placeholder-class="placeholderClass" type="digit" name="price"></input>
<view class="price-type" bindtap="switchPrice"> <picker class="price-type" value="{{currency}}" range="{{array}}" bindchange="bindPickerChange">
<text class="price-value">{{currency == 1?'RMB':'USD'}}</text> <text class="price-value">{{array[currency]}}</text>
<text class="icon iconfont iconbianzu1"></text> <text class="icon iconfont iconbianzu1"></text>
</view> </picker>
</view>
<view class="price-ul {{isShowSwitch?'show':''}}">
<view class="price-li {{currency == 1?'active':''}}" data-pricetype="1" bindtap="changePrice">RMB</view>
<view class="price-li px-hr-top {{currency == 2?'active':''}}" data-pricetype="2" bindtap="changePrice">USD</view>
</view> </view>
</view> </view>
<view class="form-item row verCenter px-hr-top qx-item"> <view class="form-item row verCenter px-hr-top qx-item">
...@@ -74,7 +69,7 @@ ...@@ -74,7 +69,7 @@
<view class="form-item row verCenter px-hr-top" hidden="{{!isShowTime}}"> <view class="form-item row verCenter px-hr-top" hidden="{{!isShowTime}}">
<text class="form-item-title">*时间</text> <text class="form-item-title">*时间</text>
<view class="form-item-right"> <view class="form-item-right">
<input placeholder="请输入货期时间(天)" placeholder-class="placeholderClass" type="text" name="day"></input> <input placeholder="请输入货期时间(天)" placeholder-class="placeholderClass" type="number" name="day"></input>
</view> </view>
</view> </view>
<view class="form-hr"></view> <view class="form-hr"></view>
......
// pages/list/bj/index.js
import { getData } from '../../../utils/util.js';
import { apis } from '../../../utils/api.js';
Page({
/**
* 页面的初始数据
*/
data: {
priceList: null,
topInfo: null,
total: 0,
inquiryItemsId: "",
offerId: "",
isShowImg: false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let inquiryItemsId = options.inquiryItemsId || '';
let offerId = options.offerId || '';
this.setData({
inquiryItemsId: inquiryItemsId,
offerId: offerId
});
},
getTopInfo: function () {
let me = this;
let id = me.data.inquiryItemsId;
getData(apis.inquirySearch, 'get', { "inquiry_items_id/eq": id }, function (res) {
if (res.errcode === 0) {
me.setData({
topInfo: res.inquiry_list[id]
})
} else {
me.setData({
topInfo: null
})
}
}, false)
},
getList: function () {
let me = this;
let inquiryItemsId = me.data.inquiryItemsId;
let offerId = me.data.offerId;
let token = wx.getStorageSync('access_token');
let params = { token: token };
if (offerId) {
params["offer_id/eq"] = offerId;
} else {
params["inquiry_items_id/eq"] = inquiryItemsId;
}
getData(apis.offerinfo, 'get', params, function (res) {
if (res.errcode == 0) {
if (res.total == 0) {
me.setData({
priceList: [],
total: 0
})
} else {
let arr = res.data[0].items || [];
for (let i = 0; i < arr.length; i++) {
arr[i].company_name = res.data[0].company_name || ''
}
me.setData({
priceList: arr,
total: arr.length,
})
}
} else {
me.setData({
total: 0,
priceList: [],
})
}
}, true)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
if (this.data.isShowImg) {
this.setData({
isShowImg: false
})
} else {
this.setData({
priceList: null,
topInfo: null,
total: 0,
});
this.getTopInfo();
this.getList()
}
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
go_bj: function () {
if (this.data.total == 3) {
wx.showToast({
title: '报价次数为0',
icon: 'none',
duration: 2000
});
} else {
if (this.data.total == 0) {
wx.navigateTo({
url: "/pages/form/bj/index?type=1&inquiryItemsId=" + this.data.inquiryItemsId,
})
} else {
let offerId = this.data.priceList[0].offer_id || ''
wx.navigateTo({
url: "/pages/form/bj/index?type=2&offerId=" + offerId,
})
}
}
},
previewImage: function () {
let img = this.data.topInfo.goods_images;
if (img) {
this.setData({
isShowImg: true
})
wx.previewImage({
urls: [img]
})
} else {
return
}
}
})
\ No newline at end of file
{
"usingComponents": {
"priceItem": "/components/priceItem/priceItem"
},
"navigationBarBackgroundColor": "#0D84D1",
"navigationBarTextStyle": "white",
"backgroundColor": "#0d84d1",
"navigationBarTitleText": ""
}
\ No newline at end of file
<!--pages/list/bj/index.wxml-->
<wxs module="dateUtil" src="../../../utils/timeUtil.wxs"></wxs>
<view class="bj-view">
<view class="bj-title ">
<view class="row bothSide verCenter" wx:if="{{topInfo}}">
<view class="company row verCenter">
<text class="xun">询价</text>
<text class="name bold">{{topInfo.company_name||'--'}}</text>
</view>
<text class="icon iconfont iconiconxiantiaoshouji6"></text>
</view>
</view>
<view class="xb-com-content">
<view class="x-info">
<view wx:if="{{topInfo}}">
<view class="title row bothSide verCenter nowrap px-hr-bottom">
<text class="name bold ellipsis">{{topInfo.goods_name||'--'}}</text>
<text class="time ">{{dateUtil.dateFormat(topInfo.add_time*1000)}}</text>
</view>
<view class="desc row">
<view class="left">
<view class="brand row">
<text class="t-com">品牌:</text>
<text class="c-com">{{topInfo.brand_name}}</text>
</view>
<view class="fz row">
<text class="t-com">封装:</text>
<text class="c-com">{{topInfo.encap}}</text>
</view>
<view class="hq row">
<text class="t-com">货期:</text>
<text class="c-com">{{topInfo.delivery_time}}</text>
</view>
<view class="num row">
<text class="t-com">数量:</text>
<text class="c-com bold">{{topInfo.number}} PCS</text>
</view>
<view class="price row">
<text class="t-com">接受价:</text>
<text class="c-com {{(!topInfo.price||topInfo.price=='0.00'||topInfo.price=='0')?'':'bold red'}}">
<block wx:if="{{!topInfo.price||topInfo.price=='0.00'||topInfo.price=='0'}}">无</block>
<block wx:else>
<block wx:if="{{topInfo.currency == 1}}">¥{{topInfo.price}}</block><block wx:else>${{topInfo.price}}
</block>
</block>
</text>
</view>
<view class="bz row">
<text class="t-com">备注:</text>
<text class="c-com">{{topInfo.remark||'--'}}</text>
</view>
</view>
<image class="right" src="{{topInfo.goods_images?topInfo.goods_images:'/res/images/imgs/defaultgood.png'}}" bindtap="previewImage"></image>
</view>
</view>
</view>
<view class="bj-data">
<view class="xb-com-t row bothSide verCenter px-hr-bottom ">
<text class="mybj bold beforeLine">我的报价 {{total}}</text>
<!-- <view class="sdbj">
已收到
<text class="num">5</text> 条报价
</view> -->
</view>
<view class="bj-list">
<view wx:if="{{priceList&&priceList.length==0}}" class="nodata">
<image src="/res/images/imgs/noxb.png" class="img"></image>
<!-- <view class="h3 bold">暂无报价信息</view> -->
</view>
<priceItem price-list="{{priceList}}" wx:if="{{priceList&&priceList.length!==0}}" price-type="4"></priceItem>
</view>
</view>
</view>
<view class="bj-btn-view" wx:if="{{priceList}}">
<view id="bjBth" class="btn-com bj-btn {{total!=3?'btn-com-b':'btn-com-disable'}}" bindtap="go_bj">
<block wx:if="{{total == 3}}">
剩余0次
</block>
<block wx:else>
<block wx:if="{{total == 0}}">
我要报价,剩余3次
</block>
<block wx:else>
继续报价,剩余{{3-total}}次
</block>
</block>
</view>
</view>
</view>
\ No newline at end of file
/* pages/list/bj/index.wxss */
.bj-view {
min-height: 100%;
position: relative;
box-sizing: border-box;
padding-bottom: 128rpx;
}
.bj-title {
background-color: #0d84d1;
color: #fff;
font-size: 26rpx;
padding: 24rpx 24rpx 60rpx;
min-height:130rpx;
box-sizing: border-box;
}
.bj-list .nodata .h3{
padding-top:100rpx;
}
.x-info{
min-height: 400rpx;
}
.bj-title .icon {
font-size: 40rpx;
}
.company {
flex: 1;
}
.company .xun {
flex: 0 0 87rpx;
height: 36rpx;
text-align: center;
line-height: 36rpx;
border-radius: 2rpx;
margin-right: 24rpx;
}
.company .name {
font-size: 32rpx;
flex: 1;
}
.xb-com-content {
top: -20rpx;
}
.bj-t .mybj {
color: #515559;
font-size: 28rpx;
}
.sdbj {
font-size: 24rpx;
color: #8a9299;
}
.sdbj .num {
color: #61a0f2;
}
.bj-btn-view{
position: fixed;
bottom:0;
left: 0;
right: 0;
padding-bottom:30rpx;
background-color: #fff;
}
...@@ -72,13 +72,6 @@ Page({ ...@@ -72,13 +72,6 @@ Page({
onReachBottom: function() { onReachBottom: function() {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
},
onReachBottom: function() { onReachBottom: function() {
let allPage = Math.ceil(this.data.total / this.data.limit); let allPage = Math.ceil(this.data.total / this.data.limit);
let p = this.data.p; let p = this.data.p;
......
...@@ -113,13 +113,6 @@ Page({ ...@@ -113,13 +113,6 @@ Page({
this.getData(); this.getData();
} }
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
switchTab: function (e) { switchTab: function (e) {
let i = e.currentTarget.dataset.index; let i = e.currentTarget.dataset.index;
if (i == this.data.tabIndex) { if (i == this.data.tabIndex) {
......
...@@ -55,12 +55,5 @@ Page({ ...@@ -55,12 +55,5 @@ Page({
*/ */
onReachBottom: function () { onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
} }
}) })
\ No newline at end of file
...@@ -56,13 +56,6 @@ Page({ ...@@ -56,13 +56,6 @@ Page({
onReachBottom: function() { onReachBottom: function() {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
},
switchTab: function(e) { switchTab: function(e) {
let i = e.currentTarget.dataset.index; let i = e.currentTarget.dataset.index;
if (i == this.data.tabIndex) { if (i == this.data.tabIndex) {
......
...@@ -57,13 +57,6 @@ Page({ ...@@ -57,13 +57,6 @@ Page({
onReachBottom: function() { onReachBottom: function() {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
},
sendSignin: function(evt) { sendSignin: function(evt) {
console.log(evt) console.log(evt)
this.data.inputbar.cancelEmoji(); this.data.inputbar.cancelEmoji();
......
// pages/list/xj/index.js // pages/list/xj/index.js
import { import {
getData getData,
judgeToken
} from '../../../utils/util.js'; } from '../../../utils/util.js';
import { import {
apis apis
...@@ -16,31 +17,53 @@ Page({ ...@@ -16,31 +17,53 @@ Page({
limit: 10, //每页的条数 limit: 10, //每页的条数
p: 1, //当前页面 p: 1, //当前页面
total: 0, total: 0,
id: "",
isShowBottom: false, isShowBottom: false,
type: 0, //1 看别人的询价 2给别人报价 3分享进来的
inquiryItemsId: "",
offerId: "",
isShowImg: false,
isShareType: 0, //分享后点进来的页面 1代表自己的询价 2代表别人的询价
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function(options) {
this.setData({ this.setData({
id: options.inquiryItemsId || '' inquiryItemsId: options.inquiryItemsId || '',
}) type: options.type || '',
offerId: options.offerId || ''
});
console.log(options)
this.getTopInfo(); this.getTopInfo();
this.getBjData(); if (this.data.type == 1) {
this.getOthertBj();
}
}, },
getTopInfo: function () { getTopInfo: function() {
let me = this; let me = this;
let token = wx.getStorageSync('access_token'); let token = wx.getStorageSync('access_token');
getData(apis.inquiryInfo, 'get', { let userId = wx.getStorageSync('user_id');
"inquiry_items_id/eq": me.data.id, getData(apis.inquirySearch, 'get', {
token: token "inquiry_items_id/eq": me.data.inquiryItemsId,
}, function (res) { }, function(res) {
if (res.errcode == 0) { if (res.errcode == 0) {
me.setData({ me.setData({
topInfo: res.inquiry_list[me.data.id] topInfo: res.inquiry_list[me.data.inquiryItemsId]
});
if (me.data.type == 3) {
if (me.data.topInfo.user_id && me.data.topInfo.user_id == userId) {
me.getOthertBj();
me.setData({
isShareType: 1
})
} else if (me.data.topInfo.user_id && me.data.topInfo.user_id != userId) {
me.getSelfBj();
me.setData({
isShareType: 2
}) })
}
}
} else if (res.errcode == 105001) { } else if (res.errcode == 105001) {
me.setData({ me.setData({
topInfo: null topInfo: null
...@@ -48,15 +71,15 @@ Page({ ...@@ -48,15 +71,15 @@ Page({
} }
}, false) }, false)
}, },
getBjData: function () { getOthertBj: function() { //看别人给自己报的价
let me = this; let me = this;
let token = wx.getStorageSync('access_token'); let token = wx.getStorageSync('access_token');
getData(apis.inquiryMyOffer, 'get', { getData(apis.inquiryMyOffer, 'get', {
"inquiry_items_id/eq": me.data.id, "inquiry_items_id/eq": me.data.inquiryItemsId,
offset: me.data.limit, offset: me.data.limit,
p: me.data.p, p: me.data.p,
token: token token: token
}, function (res) { }, function(res) {
if (res.errcode === 0) { if (res.errcode === 0) {
let newArr = []; let newArr = [];
if (me.data.p > 1) { if (me.data.p > 1) {
...@@ -76,45 +99,104 @@ Page({ ...@@ -76,45 +99,104 @@ Page({
} }
}, true) }, true)
}, },
getSelfBj: function() { //看自己给别人报的价
let me = this;
let inquiryItemsId = me.data.inquiryItemsId;
let offerId = me.data.offerId;
let token = wx.getStorageSync('access_token');
let params = {
token: token
};
if (offerId) {
params["offer_id/eq"] = offerId;
} else {
params["inquiry_items_id/eq"] = inquiryItemsId;
}
if (!token && me.data.type == 3) {
me.setData({
priceList: [],
total: 0
});
return
}
getData(apis.offerinfo, 'get', params, function(res) {
if (res.errcode == 0) {
if (res.total == 0) {
me.setData({
priceList: [],
total: 0
})
} else {
let arr = res.data[0].items || [];
for (let i = 0; i < arr.length; i++) {
arr[i].company_name = res.data[0].company_name || ''
}
me.setData({
priceList: arr,
total: arr.length,
})
}
} else {
me.setData({
total: 0,
priceList: [],
})
}
}, true)
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () { onReady: function() {
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function() {
if (this.data.type == 2 || this.data.isShareType == 2) {
if (this.data.isShowImg) {
this.setData({
isShowImg: false
})
} else {
this.setData({
priceList: null,
total: 0,
});
this.getSelfBj()
}
}
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () { onHide: function() {
}, },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () { onUnload: function() {
}, },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function() {
}, },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { onReachBottom: function() {
let allPage = Math.ceil(this.data.total / this.data.limit); let allPage = Math.ceil(this.data.total / this.data.limit);
let p = this.data.p; let p = this.data.p;
if (p == allPage) { if (p == allPage) {
...@@ -126,19 +208,52 @@ Page({ ...@@ -126,19 +208,52 @@ Page({
this.setData({ this.setData({
p: p + 1 p: p + 1
}); });
this.getBjData(); this.getOthertBj();
} }
}, },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { onShareAppMessage: function(res) {
return {
title: this.data.topInfo.goods_name || '',
path: "/pages/list/xj/index?type=3&inquiryItemsId=" + this.data.inquiryItemsId + '&offerId=' + this.data.offerId
}
},
go_bj: function() {
if (!judgeToken(true) && this.data.type == 3) {
return
}
if (this.data.total == 3) {
wx.showToast({
title: '报价次数为0',
icon: 'none',
duration: 2000
});
} else {
if (this.data.total == 0) {
wx.navigateTo({
url: "/pages/form/bj/index?type=1&inquiryItemsId=" + this.data.inquiryItemsId,
})
} else {
let offerId = this.data.priceList[0].offer_id || ''
wx.navigateTo({
url: "/pages/form/bj/index?type=2&offerId=" + offerId,
})
}
}
}, },
previewImage: function () { previewImage: function() {
let img = this.data.topInfo.goods_images; let img = this.data.topInfo.goods_images;
if (img) { if (img) {
if (this.data.type == 2) {
this.setData({
isShowImg: true
})
}
wx.previewImage({ wx.previewImage({
urls: [img] urls: [img]
}) })
......
<!--pages/list/xj/index.wxml--> <!--pages/list/xj/index.wxml-->
<wxs module="dateUtil" src="../../../utils/timeUtil.wxs"></wxs> <wxs module="dateUtil" src="../../../utils/timeUtil.wxs"></wxs>
<view class="xj-view"> <template name="info">
<view class="xj-title"></view>
<view class="xb-com-content"> <view class="xb-com-content">
<view class="b-info"> <view class="x-info">
<view wx:if="{{topInfo}}"> <view wx:if="{{topInfo}}">
<view class="title row bothSide verCenter nowrap px-hr-bottom"> <view class="title row bothSide verCenter nowrap px-hr-bottom">
<text class="name bold ellipsis">{{topInfo.goods_name||'--'}}</text> <text class="name bold ellipsis">{{topInfo.goods_name||'--'}}</text>
...@@ -47,6 +46,12 @@ ...@@ -47,6 +46,12 @@
</view> </view>
</view> </view>
</view> </view>
</template>
<!-- 看自己的询价 -->
<block wx:if="{{type==1||isShareType==1}}">
<view class="xj-view">
<view class="xj-title"></view>
<template is="info" data="{{ topInfo }}" />
<view class="bj-data"> <view class="bj-data">
<view class="xb-com-t row bothSide verCenter px-hr-bottom "> <view class="xb-com-t row bothSide verCenter px-hr-bottom ">
<text class="num bold beforeLine">收到的报价 <text>{{total}}</text></text> <text class="num bold beforeLine">收到的报价 <text>{{total}}</text></text>
...@@ -68,4 +73,46 @@ ...@@ -68,4 +73,46 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file </block>
<!-- 看别人的询价 -->
<block wx:if="{{type==2||isShareType==2}}">
<view class="bj-view">
<view class="bj-title ">
<view class="row bothSide verCenter" wx:if="{{topInfo}}">
<view class="company row verCenter">
<text class="xun">询价</text>
<text class="name bold">{{topInfo.company_name||'--'}}</text>
</view>
<text class="icon iconfont iconiconxiantiaoshouji6"></text>
</view>
</view>
<template is="info" data="{{ topInfo }}" />
<view class="bj-data">
<view class="xb-com-t row bothSide verCenter px-hr-bottom ">
<text class="mybj bold beforeLine">我的报价 {{total}}</text>
</view>
<view class="bj-list">
<view wx:if="{{priceList&&priceList.length==0}}" class="nodata">
<image src="/res/images/imgs/noxb.png" class="img"></image>
</view>
<priceItem price-list="{{priceList}}" wx:if="{{priceList&&priceList.length!==0}}" price-type="4"></priceItem>
</view>
</view>
<view class="bj-btn-view" wx:if="{{priceList}}">
<view class="btn-com bj-btn {{total!=3?'btn-com-b':'btn-com-disable'}}" bindtap="go_bj">
<block wx:if="{{total == 3}}">
剩余0次
</block>
<block wx:else>
<block wx:if="{{total == 0}}">
我要报价,剩余3次
</block>
<block wx:else>
继续报价,剩余{{3-total}}次
</block>
</block>
</view>
</view>
</view>
</block>
\ No newline at end of file
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
.b-info{ .b-info{
min-height: 400rpx; min-height: 400rpx;
} }
.bj-data{
position: relative;
top:-20rpx;
}
.bj-data .num { .bj-data .num {
color: #515559; color: #515559;
font-size: 28rpx; font-size: 28rpx;
...@@ -27,3 +31,73 @@ ...@@ -27,3 +31,73 @@
font-size: 30rpx; font-size: 30rpx;
margin-right: 8rpx; margin-right: 8rpx;
} }
.bj-view {
min-height: 100%;
position: relative;
box-sizing: border-box;
padding-bottom: 128rpx;
}
.bj-title {
background-color: #0d84d1;
color: #fff;
font-size: 26rpx;
padding: 24rpx 24rpx 60rpx;
min-height:130rpx;
box-sizing: border-box;
}
.bj-list .nodata .h3{
padding-top:100rpx;
}
.x-info{
min-height: 400rpx;
}
.bj-title .icon {
font-size: 40rpx;
}
.company {
flex: 1;
}
.company .xun {
flex: 0 0 87rpx;
height: 36rpx;
text-align: center;
line-height: 36rpx;
border-radius: 2rpx;
margin-right: 24rpx;
}
.company .name {
font-size: 32rpx;
flex: 1;
}
.xb-com-content {
top: -20rpx;
}
.bj-t .mybj {
color: #515559;
font-size: 28rpx;
}
.sdbj {
font-size: 24rpx;
color: #8a9299;
}
.sdbj .num {
color: #61a0f2;
}
.bj-btn-view{
position: fixed;
bottom:0;
left: 0;
right: 0;
padding-bottom:30rpx;
background-color: #fff;
}
\ No newline at end of file
...@@ -55,12 +55,5 @@ Page({ ...@@ -55,12 +55,5 @@ Page({
*/ */
onReachBottom: function () { onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
} }
}) })
\ No newline at end of file
...@@ -62,13 +62,6 @@ Page({ ...@@ -62,13 +62,6 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
/** /**
* 授权用户信息 * 授权用户信息
*/ */
......
...@@ -120,13 +120,6 @@ Page({ ...@@ -120,13 +120,6 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
/** /**
* 认证类型 * 认证类型
*/ */
......
...@@ -72,13 +72,6 @@ Page({ ...@@ -72,13 +72,6 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
/** /**
* 跳转认证信息 * 跳转认证信息
*/ */
......
...@@ -85,13 +85,6 @@ Page({ ...@@ -85,13 +85,6 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
/** /**
* 跳转地址 * 跳转地址
*/ */
......
...@@ -141,13 +141,6 @@ Page({ ...@@ -141,13 +141,6 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
/** /**
* 上传企业形象 * 上传企业形象
*/ */
......
...@@ -56,13 +56,6 @@ Page({ ...@@ -56,13 +56,6 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
/** /**
* tab切换 * tab切换
*/ */
......
...@@ -84,13 +84,6 @@ Page({ ...@@ -84,13 +84,6 @@ Page({
onReachBottom: function() { onReachBottom: function() {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
},
/** /**
* 获取验证码 * 获取验证码
*/ */
......
...@@ -60,13 +60,6 @@ Page({ ...@@ -60,13 +60,6 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
/** /**
* 一键获取手机号 * 一键获取手机号
*/ */
......
...@@ -56,11 +56,4 @@ Page({ ...@@ -56,11 +56,4 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })
\ No newline at end of file
...@@ -56,11 +56,4 @@ Page({ ...@@ -56,11 +56,4 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })
\ No newline at end of file
...@@ -56,11 +56,4 @@ Page({ ...@@ -56,11 +56,4 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })
\ No newline at end of file
...@@ -76,13 +76,6 @@ Page({ ...@@ -76,13 +76,6 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
/** /**
* 校验字段 * 校验字段
*/ */
......
...@@ -56,13 +56,6 @@ Page({ ...@@ -56,13 +56,6 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
/** /**
* 关闭弹出层 * 关闭弹出层
*/ */
......
...@@ -56,11 +56,4 @@ Page({ ...@@ -56,11 +56,4 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })
\ No newline at end of file
...@@ -81,13 +81,6 @@ Page({ ...@@ -81,13 +81,6 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
/** /**
* 获取验证码 * 获取验证码
*/ */
......
...@@ -71,13 +71,6 @@ Page({ ...@@ -71,13 +71,6 @@ Page({
onReachBottom: function() { onReachBottom: function() {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
},
/** /**
* 校验字段 * 校验字段
*/ */
......
...@@ -60,13 +60,6 @@ Page({ ...@@ -60,13 +60,6 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
/** /**
* 跳转地址 * 跳转地址
*/ */
......
...@@ -56,13 +56,6 @@ Page({ ...@@ -56,13 +56,6 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
/** /**
* 暂不认证 * 暂不认证
*/ */
......
...@@ -77,13 +77,6 @@ Page({ ...@@ -77,13 +77,6 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
/** /**
* 获取验证码 * 获取验证码
*/ */
......
...@@ -56,11 +56,4 @@ Page({ ...@@ -56,11 +56,4 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })
\ No newline at end of file
...@@ -56,13 +56,6 @@ Page({ ...@@ -56,13 +56,6 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
/** /**
* tab切换 * tab切换
*/ */
......
...@@ -57,11 +57,4 @@ Page({ ...@@ -57,11 +57,4 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })
\ No newline at end of file
...@@ -93,13 +93,6 @@ Page({ ...@@ -93,13 +93,6 @@ Page({
onReachBottom: function() { onReachBottom: function() {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
},
bindKeyInput: function(e) { bindKeyInput: function(e) {
this.setData({ this.setData({
key: e.detail.value key: e.detail.value
......
...@@ -179,13 +179,6 @@ Page({ ...@@ -179,13 +179,6 @@ Page({
this.getData(); this.getData();
} }
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
switchTab: function (e) { switchTab: function (e) {
let i = e.currentTarget.dataset.index; let i = e.currentTarget.dataset.index;
if (i == this.data.tabIndex) { if (i == this.data.tabIndex) {
......
...@@ -130,13 +130,6 @@ Page({ ...@@ -130,13 +130,6 @@ Page({
this.getData(); this.getData();
} }
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
fbGood: function () { fbGood: function () {
wx.navigateTo({ wx.navigateTo({
url: "/pages/form/good/index", url: "/pages/form/good/index",
......
...@@ -165,13 +165,6 @@ Page({ ...@@ -165,13 +165,6 @@ Page({
onReachBottom: function() { onReachBottom: function() {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
},
switchTab: function(e) { switchTab: function(e) {
let i = e.currentTarget.dataset.index; let i = e.currentTarget.dataset.index;
if (i == this.data.tabIndex) { if (i == this.data.tabIndex) {
......
...@@ -94,13 +94,6 @@ Page({ ...@@ -94,13 +94,6 @@ Page({
onReachBottom: function () { onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
/** /**
* 跳转地址 * 跳转地址
*/ */
...@@ -159,4 +152,9 @@ Page({ ...@@ -159,4 +152,9 @@ Page({
}) })
}, },
toSignin:function(){
wx.navigateTo({
url: "/pages/list/signin/index"
})
}
}) })
\ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="signin row verCenter rowCenter"> <view class="signin row verCenter rowCenter" bindtap="toSignin">
<text class="icon iconfont iconiconxiantiaoshouji17"></text> <text class="icon iconfont iconiconxiantiaoshouji17"></text>
<text class="t1">签到成功</text> <text class="t1">签到成功</text>
</view> </view>
......
...@@ -252,12 +252,6 @@ Page({ ...@@ -252,12 +252,6 @@ Page({
} }
}, false) }, false)
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
deleteChatItem: function (e) { //拉黑 deleteChatItem: function (e) { //拉黑
this.del_chat(e, 2) this.del_chat(e, 2)
......
...@@ -113,13 +113,6 @@ Page({ ...@@ -113,13 +113,6 @@ Page({
this.getData(); this.getData();
} }
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
switchTab: function (e) { switchTab: function (e) {
let i = e.currentTarget.dataset.index; let i = e.currentTarget.dataset.index;
if (i == this.data.tabIndex) { if (i == this.data.tabIndex) {
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": 26, "current": 29,
"list": [ "list": [
{ {
"id": -1, "id": -1,
...@@ -238,6 +238,27 @@ ...@@ -238,6 +238,27 @@
"pathName": "pages/detail/good/index", "pathName": "pages/detail/good/index",
"query": "goodId=156274103196309&type=3", "query": "goodId=156274103196309&type=3",
"scene": null "scene": null
},
{
"id": 27,
"name": "pages/list/xj/index",
"pathName": "pages/list/xj/index",
"query": "inquiryItemsId=156403573054791&type=3",
"scene": null
},
{
"id": -1,
"name": "pages/detail/good/index",
"pathName": "pages/detail/good/index",
"query": "goodId=156617742470181&type=3",
"scene": null
},
{
"id": -1,
"name": "pages/detail/good/index",
"pathName": "pages/detail/good/index",
"query": "goodId=156393707673258&type=3",
"scene": null
} }
] ]
} }
......
...@@ -61,32 +61,6 @@ textarea { ...@@ -61,32 +61,6 @@ textarea {
.hf-btn { .hf-btn {
margin: 60rpx 55rpx; margin: 60rpx 55rpx;
} }
.price-ul {
position: absolute;
top: 100rpx;
right: 24rpx;
background-color: #fff;
box-shadow: 2px 2px 5px #ddd;
z-index: 3;
border-radius: 2rpx;
display: none;
}
.price-ul.show {
display: block;
}
.price-ul .price-li {
padding: 25rpx 40rpx;
text-align: center;
font-size: 32rpx;
}
.price-ul .price-li.active {
color: #0d84d1;
}
.hf-btn .icon { .hf-btn .icon {
margin-right: 8rpx; margin-right: 8rpx;
font-size: 32rpx; font-size: 32rpx;
......
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 auth_url = 'http://authapi.icsales.cc';
// const so_url = 'http://soapi.icsales.cc'; const so_url = 'http://soapi.icsales.cc';
// const offer_url = "http://offerapi.icsales.cc"; const offer_url = "http://offerapi.icsales.cc";
// const user_url = 'http://userapi.icsales.cc'; const user_url = 'http://userapi.icsales.cc';
// const goods_url = 'http://goodsapi.icsales.cc'; const goods_url = 'http://goodsapi.icsales.cc';
// const home_url = 'http://home.icsales.cc'; const home_url = 'http://home.icsales.cc';
const apis = { const apis = {
/** /**
......
...@@ -148,6 +148,8 @@ const webimListen = () => { ...@@ -148,6 +148,8 @@ const webimListen = () => {
content: '聊天系统出现异常!', content: '聊天系统出现异常!',
showCancel: false showCancel: false
}) })
disp.fire("em.xmpp.error.sendMsgErr", error);
} }
}, },
}); });
......
...@@ -102,7 +102,6 @@ const uploadFile = (url, path, callBack) => { ...@@ -102,7 +102,6 @@ const uploadFile = (url, path, callBack) => {
success: (res) => { success: (res) => {
console.log(res) console.log(res)
var data = JSON.parse(res.data); var data = JSON.parse(res.data);
console.log(data)
if (data.errcode == 103200) { if (data.errcode == 103200) {
callBack(data.data[0]) callBack(data.data[0])
} else { } else {
......
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