Commit 21ca4b84 by 施宇

11

parent f47dcf20
......@@ -55,13 +55,13 @@ App({
if (this.globalData.auth) {
//是否登录
if (this.globalData.token) {
wx.switchTab({
url: '/pages/tab/home/home'
});
// wx.switchTab({
// url: '/pages/tab/home/home'
// });
} else {
wx.redirectTo({
url: '/pages/person/login/index'
});
// wx.redirectTo({
// url: '/pages/person/login/index'
// });
}
} else {
wx.redirectTo({
......
......@@ -30,7 +30,9 @@
"pages/person/certification/certificationmanage/index",
"pages/person/company/index",
"pages/person/editcompany/index",
"pages/person/welfare/index"
"pages/person/welfare/index",
"pages/form/rate/index",
"pages/detail/company/index"
],
"window": {
"backgroundTextStyle": "light",
......
......@@ -123,6 +123,7 @@ image {
.nodata .img {
width: 600rpx;
height:393rpx;
margin: 0 auto;
}
......@@ -293,6 +294,36 @@ image {
text-align: center;
}
.tip {
padding: 12rpx 24rpx;
background-color: #fff6e6;
}
.tip .close-icon {
color: #d8dfe6;
}
.tip .icon {
font-size: 30rpx;
}
.tip-left {
color: #eaa217;
}
.tip-left .tip-icon {
margin-right: 7rpx;
vertical-align: middle;
}
.tip-c {
font-size: 24rpx;
}
.tip-c .pc-url {
color: #61a0f2;
}
/**询报价列表**/
/**字体**/
@import 'res/fonts/iconfont.wxss'
\ No newline at end of file
let _compData = {
'_toast_.isHide': false,// 控制组件显示隐藏
'_toast_.content': ''// 显示的内容
}
let toastPannel = {
// toast显示的方法
toastSuccess: function (data) {
let self = this;
this.setData({ '_toast_.isHidescss': true, '_toast_.content': data });
setTimeout(function () {
self.setData({ '_toast_.isHidescss': false })//自定义方法,根据编辑需求
}, 2000)
},
toastFilled: function (data) {
let self = this;
this.setData({ '_toast_.isHidefil': true, '_toast_.content': data });
setTimeout(function () {
self.setData({ '_toast_.isHidefil': false })//自定义方法,根据编辑需求
}, 2000)
}
}
function ToastPannel() {//构造方法关联了当前页的方法及相关代码
// 拿到当前页面对象
let pages = getCurrentPages();
let curPage = pages[pages.length - 1];
this.__page = curPage;
// 小程序最新版把原型链干掉了。。。换种写法
Object.assign(curPage, toastPannel);
// 附加到page上,方便访问
curPage.toastPannel = this;
// 把组件的数据合并到页面的data对象中
curPage.setData(_compData);
return this;
}
module.exports = {
ToastPannel
}
\ No newline at end of file
<template name="toast">
<view class='toast_content_box'>
<view class="toast_content" wx:if="{{ isHidefil }}">
<view class="toast_content_border"></view>
<view class="toast_content_icon">
<image class="toast_icon_img" src="../../images/filled@2x.png"/>
</view>
<view class="toast_content_text">
{{content}}
</view>
</view>
<view class='toast_content_box'>
<view class="toast_content" wx:if="{{ isHidescss }}">
<view class="toast_content_border toast_success"></view>
<view class="toast_content_icon">
<image class="toast_icon_img" src="../../images/success@2x.png"/>
</view>
<view class="toast_content_text">
{{content}}
</view>
</view>
</view>
</view>
</template>
<!-- <template name="toast_success">
<view class='toast_content_box'>
<view class="toast_content" wx:if="{{ isHide }}">
<view class="toast_content_border"></view>
<view class="toast_content_icon">
<image class="toast_icon_img" src="../../images/success@2x.png"/>
</view>
<view class="toast_content_text">
{{content}}
</view>
</view>
</view>
</template> -->
\ No newline at end of file
.toast_content_box {
display: flex;
width: 100%;
justify-content: center;
align-items: center;
position: fixed;
z-index: 999;
top: 0;
left: 0;
}
.toast_content {
width: 80%;
padding: 30rpx;
border-radius: 10rpx;
height: 88rpx;
box-sizing:border-box;
overflow: hidden;
box-shadow: 0 8rpx 16rpx #BABABA;
background-color: #fff;
}
.toast_content_border{
width: 0px;
height: 80rpx;
border: 4rpx solid #CE3918;
position: relative;
left: -30rpx;
top: -30rpx;
}
.toast_success {
border: 4rpx solid #179F52;
}
.toast_content_icon{
width: 30rpx;
height: 30rpx;
position: relative;
top: -96rpx;
}
.toast_icon_img{
width: 30rpx;
height: 30rpx;
}
.toast_content_text {
height:100%;
width:100%;
color:#000;
font-size:28rpx;
text-align:center;
display:;
float:right;
position:absolute;
top:0;
line-height:88rpx;
text-align:left;
padding-left:50rpx;
}
\ No newline at end of file
// pages/detail/company/index.js
Page({
/**
* 页面的初始数据
*/
data: {
tabIndex:1
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
switchTab: function (e) {
let i = e.currentTarget.dataset.index;
if (i == this.data.tabIndex) {
return
} else {
this.setData({
tabIndex: i,
})
}
},
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": ""
}
\ No newline at end of file
<!--pages/detail/company/index.wxml-->
<view class="company-view">
<view class="company-head row verCenter">
<image src="/res/images/imgs/test.jpg" class="company-img"></image>
<view class="text">
<view class="h3 bold">深圳市猎芯科技有限公司</view>
<view class="rz row">
<view class="yes">
<text class="icon iconfont iconiconxiantiaoshouji11"></text>
<text>未认证</text>
</view>
<view class="yes">
<text class="icon iconfont iconiconxiantiaoshouji11"></text>
<text>未认证</text>
</view>
</view>
</view>
</view>
<view class="switch-tab-com row">
<view bindtap="switchTab" class="{{tabIndex == 1&&'active'}}" data-index="1">
<text>商品</text>
<text class="active-bg"></text>
</view>
<view bindtap="switchTab" class="{{tabIndex == 2&&'active'}}" data-index="2">
<text>询价</text>
<text class="active-bg"></text>
</view>
<view bindtap="switchTab" class="{{tabIndex == 3&&'active'}}" data-index="3">
<text>报价</text>
<text class="active-bg"></text>
</view>
</view>
<view class="company-content">
<view class="nodata">
<image src="/res/images/imgs/noxb.png" class="img"></image>
<view class="h3 bold">当前信息不展示</view>
</view>
</view>
</view>
\ No newline at end of file
/* pages/detail/company/index.wxss */
.company-view {
}
.company-head {
padding: 40rpx 24rpx;
border-bottom: 10rpx solid #f5f9fc;
}
.company-img {
height: 120rpx;
width: 120rpx;
border-radius: 50%;
}
.company-head .text {
margin-left: 24rpx;
flex: 1;
}
.company-head .text .h3 {
font-size: 36rpx;
}
.rz {
flex-wrap: wrap;
}
.rz .yes {
margin: 24rpx 24rpx 0 0;
color: #8a9299;
font-size: 26rpx;
}
.rz .yes .icon {
color: #61a0f2;
font-size: 30rpx;
margin-right: 12rpx;
}
.company-content {
}
// pages/form/rate/index.js
Page({
/**
* 页面的初始数据
*/
data: {
defaulType: 0,
total: 0,
textareaVal:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
textareaChange: function (e) {
let val = e.detail.value;
this.setData({
total: val.length,
textareaVal:val
})
},
changeType: function (e) {
let index = e.currentTarget.dataset.index;
this.setData({
defaulType: index
})
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "发表评价"
}
\ No newline at end of file
<!--pages/form/rate/index.wxml-->
<view class="rate-form">
<view class="tip row bothSide verCenter tip-error">
<view class="tip-left">
<!-- <text class="icon iconfont iconiconxiantiaoshouji12 tip-icon"></text> -->
<!-- <text class="tip-c">评论内容,一条回复报价仅评价一次</text> -->
<text class="icon iconfont iconiconxiantiaoshouji1 tip-icon error-icon"></text>
<text class="tip-c error-text">提示:您的内容存在敏感词汇,请编辑后再发布</text>
</view>
<text class="icon iconfont iconiconxiantiaoshouji13 close-icon"></text>
</view>
<view class="form">
<view class="textarea-view">
<textarea class="textarea" placeholder="请输入评价内容" maxlength="100" bindinput="textareaChange"></textarea>
<view class="statistics">
<text>{{total}}</text>/100
</view>
</view>
<view class="rate-type row">
<view class="type yes-rate {{defaulType ==0?'active':'' }}" data-index="0" bindtap="changeType">
<text class="icon iconfont iconiconxiantiaoshouji23"></text>
<text>好评</text>
</view>
<view class="type no-rate {{defaulType ==1?'active':'' }}" data-index="1" bindtap="changeType">
<text class="icon iconfont iconiconxiantiaoshouji29"></text>
<text>差评</text>
</view>
</view>
</view>
<view class="btn-com btn-com-b rate-btn ">发布评价</view>
</view>
\ No newline at end of file
.rate-form {
padding-top: 68rpx;
}
.rate-form .tip {
height: 68rpx;
position: absolute;
top: 0;
left: 0;
right: 0;
box-sizing: border-box;
}
.rate-form .error-text, .rate-form .error-icon {
color: #f03737;
}
.rate-form .tip-error {
background-color: #ffd2d2;
}
.form {
margin-left: 39rpx;
}
.textarea-view {
border-bottom: 1px solid #d8dfe6;
position: relative;
}
.textarea {
padding: 27rpx 39rpx 27rpx 0;
width: 100%;
box-sizing: border-box;
font-size: 28rpx;
color: #515559;
height: 400rpx;
}
.statistics {
position: absolute;
bottom: 28rpx;
right: 24rpx;
font-size: 22rpx;
color: #adb6bf;
}
.rate-type {
margin-top: 24rpx;
}
.type {
flex: 1;
height: 100rpx;
border: 1px solid#d8dfe6;
line-height: 100rpx;
text-align: center;
margin-right: 24rpx;
border-radius: 8rpx;
font-size: 28rpx;
color: #515559;
box-sizing: border-box;
padding: 1px;
}
.type.active {
padding: 0;
border: 2px solid#0D84D1;
}
.type .icon {
font-size: 40rpx;
margin-right: 24rpx;
color: #adb6bf;
vertical-align: middle;
}
.yes-rate .icon {
color: #ea1717;
}
.rate-btn {
margin-top: 60rpx;
}
......@@ -48,7 +48,7 @@
"list": []
},
"miniprogram": {
"current": 9,
"current": 11,
"list": [
{
"id": -1,
......@@ -117,6 +117,20 @@
"id": -1,
"name": "pages/person/welfare/index",
"pathName": "pages/person/welfare/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/form/rate/index",
"pathName": "pages/form/rate/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/detail/company/index",
"pathName": "pages/detail/company/index",
"scene": null
}
]
......
.form-view {
}
.tip {
padding: 12rpx 24rpx;
background-color: #fff6e6;
}
.tip .close-icon {
color: #d8dfe6;
}
.tip .icon {
font-size: 30rpx;
}
.tip-left {
color: #eaa217;
}
.tip-left .tip-icon {
margin-right: 7rpx;
vertical-align: middle;
}
.tip-c {
font-size: 24rpx;
}
.tip-c .pc-url {
color: #61a0f2;
}
.form-item {
margin-left: 24rpx;
......
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