更换版本
This commit is contained in:
135
pages/home/jubao/jubao.js
Normal file
135
pages/home/jubao/jubao.js
Normal file
@@ -0,0 +1,135 @@
|
||||
var t;
|
||||
(t = getApp()),
|
||||
Page({
|
||||
data: {
|
||||
car_uid: 0,
|
||||
value: "",
|
||||
feedback_type: 1,
|
||||
isShow: !1,
|
||||
more_status: !0,
|
||||
items: [
|
||||
{ name: "虚假信息", checked: "true" },
|
||||
{ name: "广告" },
|
||||
{ name: "其他" },
|
||||
],
|
||||
leftid: 1,
|
||||
content: [],
|
||||
},
|
||||
onLoad: function (t) {
|
||||
console.log(t),
|
||||
t.form_type &&
|
||||
"undefined" != t.form_type &&
|
||||
this.setData({
|
||||
feedback_type: t.form_type,
|
||||
car_id: t.car_id,
|
||||
car_uid: t.car_uid,
|
||||
}),
|
||||
wx.getUserInfo({
|
||||
success: function (t) {
|
||||
console.log(t);
|
||||
},
|
||||
fail: function (t) {
|
||||
console.log(t);
|
||||
},
|
||||
}),
|
||||
wx.setNavigationBarTitle({
|
||||
title: 1 == this.data.feedback_type ? "留言商家" : "举报商家",
|
||||
}),
|
||||
this._stay();
|
||||
},
|
||||
_stay: function () {
|
||||
var a = this;
|
||||
t.util.request({
|
||||
url: "entry/wxapp/Api",
|
||||
data: {
|
||||
m: "monai_market",
|
||||
r: "home.index.stay",
|
||||
car_id: this.data.car_id,
|
||||
leftid: this.data.leftid++,
|
||||
},
|
||||
cachetime: "0",
|
||||
success: function (t) {
|
||||
var e;
|
||||
console.log(t),
|
||||
t.data.data.length > 0
|
||||
? (console.log(t),
|
||||
(e = a.data.content).push.apply(
|
||||
e,
|
||||
(function (t) {
|
||||
if (Array.isArray(t)) {
|
||||
for (var a = 0, e = Array(t.length); a < t.length; a++)
|
||||
e[a] = t[a];
|
||||
return e;
|
||||
}
|
||||
return Array.from(t);
|
||||
})(t.data.data)
|
||||
),
|
||||
a.setData({ content: a.data.content }))
|
||||
: a.setData({ more_status: !1 });
|
||||
},
|
||||
});
|
||||
},
|
||||
more: function () {
|
||||
this._stay();
|
||||
},
|
||||
formSubmit: function (a) {
|
||||
console.log(wx.getStorageSync("uid"));
|
||||
var e = a.detail.value,
|
||||
i = "";
|
||||
1 != this.data.feedback_type && (i = "[车辆信息]:" + this.data.value),
|
||||
e.content
|
||||
? t.util.request({
|
||||
url: "entry/wxapp/Api",
|
||||
data: {
|
||||
m: "monai_market",
|
||||
r: "home.index.word",
|
||||
content: e.content,
|
||||
car_uid: this.data.car_uid,
|
||||
car_info: i,
|
||||
feedback_type: this.data.feedback_type,
|
||||
uid: wx.getStorageSync("uid"),
|
||||
car_id: this.data.car_id,
|
||||
},
|
||||
cachetime: "0",
|
||||
success: function (t) {
|
||||
console.log(t),
|
||||
wx.showModal({
|
||||
title: "提示",
|
||||
content: "提交信息成功",
|
||||
showCancel: !1,
|
||||
success: function (t) {
|
||||
wx.navigateBack({});
|
||||
},
|
||||
});
|
||||
},
|
||||
})
|
||||
: wx.showModal({
|
||||
title: "提示",
|
||||
content: "内容不能为空!",
|
||||
showCancel: !1,
|
||||
success: function (t) {},
|
||||
});
|
||||
},
|
||||
radioChange: function (t) {
|
||||
0 == t.detail.value
|
||||
? (this.data.value = "虚假信息")
|
||||
: 1 == t.detail.value
|
||||
? (this.data.value = "广告")
|
||||
: 2 == t.detail.value && (this.data.value = "其他");
|
||||
},
|
||||
hideDialog: function () {
|
||||
this.setData({ isShow: !this.data.isShow });
|
||||
},
|
||||
onShow: function () {
|
||||
var a = this;
|
||||
t.util.getUserInfo(function (t) {
|
||||
(wx.getStorageSync("uid") && t.memberInfo) || a.setData({ isShow: !0 });
|
||||
});
|
||||
},
|
||||
updateUserInfo: function (a) {
|
||||
var e = this;
|
||||
t.util.getUserInfo(function (t) {
|
||||
wx.setStorageSync("uid", t.memberInfo.uid), e.hideDialog();
|
||||
}, a.detail);
|
||||
},
|
||||
});
|
1
pages/home/jubao/jubao.json
Normal file
1
pages/home/jubao/jubao.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "usingComponents": {} }
|
56
pages/home/jubao/jubao.wxml
Normal file
56
pages/home/jubao/jubao.wxml
Normal file
@@ -0,0 +1,56 @@
|
||||
<view wx:if="{{feedback_type!=1}}">
|
||||
<view class="banner" wx:if="{{feedback_type!=1}}">
|
||||
<view class="banner_top">
|
||||
<image class="banner_top_img" src="../../image/duigou_icn.png"></image> 请选择举报的理由</view>
|
||||
<view class="banner_bottom">本平台会坚决落实非法、虚假、色情等信息,你的举报我们会认真查实并根据平台协议进行落实!</view>
|
||||
</view>
|
||||
<view class="nav" wx:if="{{feedback_type!=1}}"></view>
|
||||
<view class="modle_nav" wx:if="{{feedback_type!=1}}">
|
||||
<view class="modle_nav_biaoji"></view>
|
||||
<text>车辆信息</text>
|
||||
</view>
|
||||
<form bindsubmit="formSubmit">
|
||||
<radio-group bindchange="radioChange" wx:if="{{feedback_type!=1}}">
|
||||
<label wx:for="{{items}}" wx:key="1">
|
||||
<view class="modle_nav">
|
||||
<radio checked="{{item.checked}}" color="#3d61f0" value="{{index}}"></radio>
|
||||
<text>{{item.name}}</text>
|
||||
</view>
|
||||
</label>
|
||||
</radio-group>
|
||||
<view class="nav"></view>
|
||||
<view class="modle_nav">
|
||||
<view class="modle_nav_biaoji"></view>
|
||||
<text>{{feedback_type==1?'留言内容':'举报理由'}}</text>
|
||||
</view>
|
||||
<textarea class="text_area" name="content" placeholder="{{feedback_type==1?'留言内容':'举报理由'}}(不少于20字)" placeholderStyle="color:9295A8"></textarea>
|
||||
<view class="btn_view">
|
||||
<button class="tijiao_btn tijiao_btn_active" formType="submit">提交</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
<view wx:if="{{feedback_type==1}}">
|
||||
<view class="modle" wx:if="{{content.length>0}}" wx:for="{{content}}">
|
||||
<view class="modle_top">
|
||||
<image class="modle_top_img" src="{{item.head_image}}"></image>
|
||||
<view class="modle_top_text_index">{{item.nickname?item.nickname:'匿名留言'}}</view>
|
||||
<view class="modle_top_text_second">{{item.time}}</view>
|
||||
</view>
|
||||
<view class="modle_text">{{item.content}}</view>
|
||||
</view>
|
||||
<view bindtap="more" class="more" wx:if="{{more_status&&content.length>3}}">查看更多 <image class="more_img" src="/pages/image/lvsejtxx_btn.png"></image>
|
||||
</view>
|
||||
<view class="nav"></view>
|
||||
<form bindsubmit="formSubmit">
|
||||
<view class="modle_nav">
|
||||
<view class="modle_nav_biaoji"></view>
|
||||
<text>商家留言</text>
|
||||
</view>
|
||||
<textarea class="text_area" name="content" placeholder="{{feedback_type==1?'留言内容':'举报理由'}}(不少于20字)" placeholderStyle="color:9295A8"></textarea>
|
||||
<view class="btn_view">
|
||||
<button class="tijiao_btn tijiao_btn_active" formType="submit">提交</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
<import src="/pages/alert/index.wxml"></import>
|
||||
<template is="alert" data="{{isShow:isShow}}"></template>
|
171
pages/home/jubao/jubao.wxss
Normal file
171
pages/home/jubao/jubao.wxss
Normal file
@@ -0,0 +1,171 @@
|
||||
@import "/pages/alert/index.wxss";
|
||||
radio .wx-radio-input {
|
||||
border-radius: 50%;
|
||||
height: 35rpx;
|
||||
width: 35rpx;
|
||||
}
|
||||
radio .wx-radio-input.wx-radio-input-checked {
|
||||
background: red;
|
||||
border: none;
|
||||
}
|
||||
radio .wx-radio-input.wx-radio-input-checked::before {
|
||||
background: transparent;
|
||||
border-radius: 50%;
|
||||
color: #fff;
|
||||
font-size: 25rpx;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
text-align: center;
|
||||
transform: translate(-50%, -50%) scale(1);
|
||||
width: 40rpx;
|
||||
}
|
||||
.btn_view {
|
||||
background: #fff;
|
||||
border-top: 1rpx solid #f9f9f9;
|
||||
bottom: 0rpx;
|
||||
height: 140rpx;
|
||||
margin-top: 50rpx;
|
||||
width: 100%;
|
||||
}
|
||||
.tijiao_btn {
|
||||
background: #b2b2b2;
|
||||
border-radius: 20rpx;
|
||||
bottom: 30rpx;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
margin: 0 0 0 5%;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
width: 90%;
|
||||
}
|
||||
.modle {
|
||||
border-bottom: 1rpx solid #f9f9f9;
|
||||
margin: 0 auto;
|
||||
padding-bottom: 30rpx;
|
||||
padding-top: 30rpx;
|
||||
width: 690rpx;
|
||||
}
|
||||
.modle_top {
|
||||
height: 72rpx;
|
||||
width: 100%;
|
||||
}
|
||||
.modle_top_img {
|
||||
border-radius: 100%;
|
||||
float: left;
|
||||
height: 72rpx;
|
||||
width: 72rpx;
|
||||
}
|
||||
.modle_top_text_index {
|
||||
color: #333;
|
||||
float: left;
|
||||
font-size: 28rpx;
|
||||
margin-left: 15rpx;
|
||||
width: 400rpx;
|
||||
}
|
||||
.modle_top_text_second {
|
||||
color: #9195a3;
|
||||
float: left;
|
||||
font-size: 20rpx;
|
||||
margin-left: 15rpx;
|
||||
margin-top: 3rpx;
|
||||
width: 400rpx;
|
||||
}
|
||||
.modle_text {
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
margin-top: 18rpx;
|
||||
width: 100%;
|
||||
}
|
||||
.banner {
|
||||
padding: 30rpx 5%;
|
||||
width: 90%;
|
||||
}
|
||||
.banner_top {
|
||||
color: #737985;
|
||||
font-size: 26rpx;
|
||||
width: 100%;
|
||||
}
|
||||
.banner_top_img {
|
||||
height: 28rpx;
|
||||
margin-top: -5rpx;
|
||||
padding-right: 5rpx;
|
||||
vertical-align: middle;
|
||||
width: 28rpx;
|
||||
}
|
||||
.banner_bottom {
|
||||
color: #737985;
|
||||
font-size: 26rpx;
|
||||
margin-top: 16rpx;
|
||||
width: 100%;
|
||||
}
|
||||
.modle_nav {
|
||||
border-bottom: 1rpx solid #f9f9f9;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
height: 87rpx;
|
||||
line-height: 87rpx;
|
||||
margin-left: 5%;
|
||||
margin-right: 5%;
|
||||
padding-top: 1rpx;
|
||||
width: 90%;
|
||||
}
|
||||
.modle_nav_biaoji {
|
||||
background: #3d61f0;
|
||||
border-right: 16rpx solid #fff;
|
||||
display: inline-block;
|
||||
height: 24rpx;
|
||||
margin-top: 32rpx;
|
||||
width: 6rpx;
|
||||
}
|
||||
.nav {
|
||||
background: #f9f9f9;
|
||||
height: 20rpx;
|
||||
width: 100%;
|
||||
}
|
||||
.text_area {
|
||||
color: #333;
|
||||
font-size: 24rpx;
|
||||
height: 270rpx;
|
||||
margin-top: 30rpx;
|
||||
padding-left: 5%;
|
||||
padding-right: 5%;
|
||||
width: 90%;
|
||||
}
|
||||
.chooseType_view {
|
||||
background: #fff;
|
||||
height: 100%;
|
||||
left: 0rpx;
|
||||
overflow-y: scroll;
|
||||
position: fixed;
|
||||
top: 0rpx;
|
||||
width: 100%;
|
||||
z-index: 25;
|
||||
}
|
||||
button::after {
|
||||
border: none;
|
||||
}
|
||||
.tijiao_btn_active {
|
||||
background: #3d61f0;
|
||||
}
|
||||
.btm_nav {
|
||||
height: 140rpx;
|
||||
width: 100%;
|
||||
}
|
||||
.more {
|
||||
color: #3d61f0;
|
||||
font-size: 24rpx;
|
||||
padding-bottom: 20rpx;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
.more_img {
|
||||
height: 30rpx;
|
||||
margin-top: -5rpx;
|
||||
vertical-align: middle;
|
||||
width: 30rpx;
|
||||
}
|
||||
.modle:last-child {
|
||||
border: none;
|
||||
}
|
Reference in New Issue
Block a user