修改
This commit is contained in:
4
app.json
4
app.json
@@ -5,8 +5,8 @@
|
||||
"pages/222",
|
||||
"pages/details/details",
|
||||
"pages/search/index",
|
||||
"pages/s-list/s-list"
|
||||
|
||||
"pages/s-list/s-list",
|
||||
"pages/about/about"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTextStyle": "black",
|
||||
|
||||
@@ -47,14 +47,14 @@
|
||||
.title{
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family: YouSheBiaoTiHei-1;
|
||||
font-family: YouSheBiaoTiHei-3;
|
||||
font-size: 38rpx;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.subtitle{
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family: YouSheBiaoTiHei-1;
|
||||
font-family: YouSheBiaoTiHei-3;
|
||||
font-size: 45rpx;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
114
pages/about/about.js
Normal file
114
pages/about/about.js
Normal file
@@ -0,0 +1,114 @@
|
||||
const request = require('../../utils/request')
|
||||
const ui = require('../../utils/ui')
|
||||
const wxParse = require("../../wxParse/wxParse.js");
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
navTitle: "联系我们",
|
||||
title: "北京欧华莱茵科技有限公司"
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let that = this;
|
||||
that.GetLabelList()
|
||||
},
|
||||
|
||||
|
||||
|
||||
GetLabelList() {
|
||||
let that = this;
|
||||
request.request({
|
||||
method: "GET",
|
||||
// https://app.19year.cn/api.php/doc/details?id=51
|
||||
url: "/api.php/doc/label_list"
|
||||
}).then(res => {
|
||||
if (res.data.code === 1) {
|
||||
let list = res.data.data.data
|
||||
for(let j = 0, len=list.length; j < len; j++) {
|
||||
that.setData({[`${list[j].name}`]:list[j].value})
|
||||
}
|
||||
that.initContent()
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log('ERROR', err)
|
||||
});
|
||||
},
|
||||
|
||||
initContent() {
|
||||
let that = this;
|
||||
console.log(that.data.contact_content);
|
||||
if (that.data.contact_content.length > 0) {
|
||||
wxParse.wxParse('content', 'html', that.data.contact_content, that, 0);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 拨打电话事件
|
||||
phoneOn() {
|
||||
let that = this;
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: that.data.contact_tel, //此号码仅用于测试
|
||||
success: function () {
|
||||
console.log("拨打电话成功!")
|
||||
},
|
||||
fail: function () {
|
||||
console.log("拨打电话失败!")
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
6
pages/about/about.json
Normal file
6
pages/about/about.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"list-nav-bar": "/components/list-nav-bar/list-nav-bar"
|
||||
|
||||
}
|
||||
}
|
||||
23
pages/about/about.wxml
Normal file
23
pages/about/about.wxml
Normal file
@@ -0,0 +1,23 @@
|
||||
<import src="../../wxParse/wxParse.wxml"></import>
|
||||
|
||||
<list-nav-bar title="{{navTitle}}" background="#3c8bf6" showNavBtn="{{true}}"></list-nav-bar>
|
||||
<scroll-view style="height: 100%;overflow:hidden;" scroll-y type="list">
|
||||
<view class="container">
|
||||
<view class="title">
|
||||
<text>{{contact_title}}</text>
|
||||
<text class="date">{{date}}</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="text">
|
||||
<template is="wxParse" data="{{wxParseData:content.nodes}}"/>
|
||||
</view>
|
||||
<view class="text-list">地址:{{contact_address}}</view>
|
||||
<view class="text-list">电话:{{contact_tel}}</view>
|
||||
<view class="text-list">邮编:{{contact_post_code}}</view>
|
||||
<view class="text-list">邮箱:{{contact_email}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class='btn-view'>
|
||||
<button bind:tap="phoneOn" style="background: #3c8bf6;;border-radius: 60rpx;width: 85%;color: #fff;font-size: 30rpx;font-weight: normal;">拨打电话</button>
|
||||
</view>
|
||||
66
pages/about/about.wxss
Normal file
66
pages/about/about.wxss
Normal file
@@ -0,0 +1,66 @@
|
||||
@import "../../wxParse/wxParse.wxss";
|
||||
|
||||
page {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #ffffff;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.container{
|
||||
margin-top: 45rpx;
|
||||
margin-bottom: 120rpx;
|
||||
/* margin-left: 30rpx;
|
||||
margin-right: 30rpx; */
|
||||
}
|
||||
|
||||
|
||||
|
||||
.title {
|
||||
border-bottom: 2rpx solid #e9e9e9;
|
||||
/* padding-bottom: 30rpx; */
|
||||
padding-left: 30rpx;
|
||||
padding-right: 30rpx;
|
||||
font-size: 36rpx;
|
||||
text-align: center;
|
||||
/* margin-bottom: 20rpx; */
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: 24rpx;
|
||||
color: #737373;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
|
||||
.content {
|
||||
margin-top: 30rpx;
|
||||
margin-left: 30rpx;
|
||||
margin-right: 30rpx;
|
||||
|
||||
}
|
||||
.text {
|
||||
/* margin-top: 16px; */
|
||||
font-size: 28rpx;
|
||||
line-height: 55rpx;
|
||||
color: #333;
|
||||
}
|
||||
.text-list {
|
||||
/* margin-top: 16px; */
|
||||
font-size: 28rpx;
|
||||
line-height: 55rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
|
||||
.btn-view {
|
||||
box-shadow: 0 -5px 5px -5px rgba(0, 0, 0, 0.2);
|
||||
width: 100%;
|
||||
padding: 20rpx 0;
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ Page({
|
||||
showMenu: true,
|
||||
success: function (res) {
|
||||
console.log('打开成功');
|
||||
util.hideLoading()
|
||||
ui.hideLoading()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -3,121 +3,147 @@ const request = require('../../utils/request')
|
||||
const ui = require('../../utils/ui')
|
||||
Page({
|
||||
|
||||
data: {
|
||||
codes: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
codes_current_page: 1,
|
||||
codes_has_prev: false,
|
||||
codes_has_next: false,
|
||||
data: {
|
||||
codes: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
codes_current_page: 1,
|
||||
codes_has_prev: false,
|
||||
codes_has_next: false,
|
||||
|
||||
codes_total_count: 0,
|
||||
codes_total_pages: 0,
|
||||
categorys: []
|
||||
},
|
||||
codes_total_count: 0,
|
||||
codes_total_pages: 0,
|
||||
categorys: []
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
//获取接口数据
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
//获取接口数据
|
||||
|
||||
let that = this;
|
||||
that.GetCodes()
|
||||
that.GetIndexList()
|
||||
},
|
||||
let that = this;
|
||||
that.GetCodes()
|
||||
that.GetIndexList()
|
||||
that.GetLabelList()
|
||||
},
|
||||
|
||||
GetLabelList() {
|
||||
let that = this;
|
||||
request.request({
|
||||
method: "GET",
|
||||
// https://app.19year.cn/api.php/doc/details?id=51
|
||||
url: "/api.php/doc/label_list"
|
||||
}).then(res => {
|
||||
if (res.data.code === 1) {
|
||||
let list = res.data.data.data
|
||||
for(let j = 0, len=list.length; j < len; j++) {
|
||||
that.setData({[`${list[j].name}`]:list[j].value})
|
||||
}
|
||||
// that.initContent()
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log('ERROR', err)
|
||||
});
|
||||
},
|
||||
|
||||
GetIndexList() {
|
||||
let that = this;
|
||||
request.request({
|
||||
method: "GET",
|
||||
url: "/api.php/doc/index_category"
|
||||
}).then(res => {
|
||||
if (res.data.code === 1) {
|
||||
console.log(res.data.data);
|
||||
that.setData({
|
||||
categorys: res.data.data.data
|
||||
})
|
||||
}
|
||||
// ui.showToast(res.data.errorMsg)
|
||||
}).catch(err => {
|
||||
console.log('ERROR')
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
GetIndexList() {
|
||||
let that = this;
|
||||
request.request({
|
||||
method: "GET",
|
||||
url: "/api.php/doc/index_category"
|
||||
}).then(res => {
|
||||
if (res.data.code === 1) {
|
||||
console.log(res.data.data);
|
||||
that.setData({
|
||||
categorys: res.data.data.data
|
||||
})
|
||||
}
|
||||
// ui.showToast(res.data.errorMsg)
|
||||
}).catch(err => {
|
||||
console.log('ERROR')
|
||||
});
|
||||
},
|
||||
codesPrev() {
|
||||
let that = this;
|
||||
console.log(that.data.codes_has_prev);
|
||||
if (that.data.codes_has_prev) {
|
||||
console.log("shang");
|
||||
that.setData({
|
||||
codes_current_page: that.data.codes_current_page - 1
|
||||
})
|
||||
that.GetCodes()
|
||||
console.log("shang");
|
||||
}
|
||||
},
|
||||
codesNext() {
|
||||
let that = this;
|
||||
if (that.data.codes_has_next) {
|
||||
that.setData({
|
||||
codes_current_page: that.data.codes_current_page + 1
|
||||
})
|
||||
that.GetCodes()
|
||||
console.log("xia");
|
||||
}
|
||||
},
|
||||
GetCodes() {
|
||||
let that = this;
|
||||
request.request({
|
||||
method: "GET",
|
||||
url: "/api.php/doc/index_codes?page=" + that.data.codes_current_page + "&pageSize=16"
|
||||
}).then(res => {
|
||||
if (res.data.code === 1) {
|
||||
that.setData({
|
||||
codes: res.data.data.data,
|
||||
codes_current_page: res.data.data.current_page,
|
||||
codes_has_next: res.data.data.has_next,
|
||||
codes_has_prev: res.data.data.has_prev,
|
||||
codes_total_count: res.data.data.total_count,
|
||||
codes_total_pages: res.data.data.total_pages,
|
||||
})
|
||||
}
|
||||
// ui.showToast(res.data.errorMsg)
|
||||
}).catch(err => {
|
||||
console.log('ERROR')
|
||||
});
|
||||
},
|
||||
// 页面跳转
|
||||
jumpPage(e) {
|
||||
let jumpType = e.currentTarget.dataset.jumptype;
|
||||
// 文章id
|
||||
let aid = e.currentTarget.dataset.aid;
|
||||
// 类目id
|
||||
let cid = e.currentTarget.dataset.cid;
|
||||
console.log(jumpType == 1);
|
||||
console.log(aid);
|
||||
console.log(cid);
|
||||
// 类目
|
||||
if (jumpType == 1 && cid) {
|
||||
wx.navigateTo({
|
||||
url: "/pages/list/list?cid=" + cid
|
||||
})
|
||||
}
|
||||
if (jumpType == 2 && aid) {
|
||||
wx.navigateTo({
|
||||
url: "/pages/details/details?aid=" + aid
|
||||
})
|
||||
}
|
||||
// 搜索页面
|
||||
if (jumpType == 3) {
|
||||
wx.navigateTo({
|
||||
url: "/pages/search/index"
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
codesPrev() {
|
||||
let that = this;
|
||||
console.log(that.data.codes_has_prev);
|
||||
if (that.data.codes_has_prev) {
|
||||
console.log("shang");
|
||||
that.setData({
|
||||
codes_current_page: that.data.codes_current_page - 1
|
||||
})
|
||||
that.GetCodes()
|
||||
console.log("shang");
|
||||
// 搜索页面
|
||||
if (jumpType == 4) {
|
||||
wx.navigateTo({
|
||||
url: "/pages/about/about"
|
||||
})
|
||||
}
|
||||
},
|
||||
bindFocus(e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
codesNext() {
|
||||
let that = this;
|
||||
if (that.data.codes_has_next) {
|
||||
that.setData({
|
||||
codes_current_page: that.data.codes_current_page + 1
|
||||
})
|
||||
that.GetCodes()
|
||||
console.log("xia");
|
||||
}
|
||||
},
|
||||
GetCodes() {
|
||||
let that = this;
|
||||
request.request({
|
||||
method: "GET",
|
||||
url: "/api.php/doc/index_codes?page=" + that.data.codes_current_page + "&pageSize=16"
|
||||
}).then(res => {
|
||||
if (res.data.code === 1) {
|
||||
that.setData({
|
||||
codes: res.data.data.data,
|
||||
codes_current_page: res.data.data.current_page,
|
||||
codes_has_next: res.data.data.has_next,
|
||||
codes_has_prev: res.data.data.has_prev,
|
||||
codes_total_count: res.data.data.total_count,
|
||||
codes_total_pages: res.data.data.total_pages,
|
||||
})
|
||||
}
|
||||
// ui.showToast(res.data.errorMsg)
|
||||
}).catch(err => {
|
||||
console.log('ERROR')
|
||||
});
|
||||
},
|
||||
// 页面跳转
|
||||
jumpPage(e) {
|
||||
let jumpType = e.currentTarget.dataset.jumptype;
|
||||
// 文章id
|
||||
let aid = e.currentTarget.dataset.aid;
|
||||
// 类目id
|
||||
let cid = e.currentTarget.dataset.cid;
|
||||
console.log(jumpType == 1);
|
||||
console.log(aid);
|
||||
console.log(cid);
|
||||
// 类目
|
||||
if (jumpType == 1 && cid) {
|
||||
wx.navigateTo({
|
||||
url: "/pages/list/list?cid=" + cid
|
||||
})
|
||||
}
|
||||
if (jumpType == 2 && aid) {
|
||||
wx.navigateTo({
|
||||
url: "/pages/details/details?aid=" + aid
|
||||
})
|
||||
}
|
||||
// 搜索页面
|
||||
if (jumpType == 3) {
|
||||
wx.navigateTo({
|
||||
url: "/pages/search/index"
|
||||
})
|
||||
}
|
||||
},
|
||||
bindFocus(e) {
|
||||
console.log(e);
|
||||
}
|
||||
})
|
||||
@@ -130,35 +130,18 @@
|
||||
</view> -->
|
||||
|
||||
|
||||
<!-- <view class="group-item-box">
|
||||
<view class="group-item-box">
|
||||
<view class="group-item">
|
||||
<view class="group-item-header">
|
||||
<view class="group-item-header-tip"></view>
|
||||
<view class="group-item-header-title">常见问题解决</view>
|
||||
<view class="group-item-header-tip">
|
||||
<view class="group-item-header-tip-txt">全部</view>
|
||||
<image class="group-item-header-tip-image" src="../../images/jt.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group-txt-item">
|
||||
<text class="group-txt-item-bullet">•</text>
|
||||
<text class="group-txt-item-text">超出焊接时间</text>
|
||||
<text class="group-txt-item-text-time">08.04 00:48</text>
|
||||
</view>
|
||||
<view class="group-txt-item">
|
||||
<text class="group-txt-item-bullet">•</text>
|
||||
<text class="group-txt-item-text">超出焊接时间</text>
|
||||
<text class="group-txt-item-text-time">08.04 00:48</text>
|
||||
</view>
|
||||
<view class="group-txt-item">
|
||||
<text class="group-txt-item-bullet">•</text>
|
||||
<text class="group-txt-item-text">超出焊接时间</text>
|
||||
<text class="group-txt-item-text-time">08.04 00:48</text>
|
||||
<view class="group-item-header-title" bind:tap="jumpPage" data-jumpType="4">联系我们</view>
|
||||
<view class="group-item-header-tip"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<!-- <view class="copyright">iuu by © 2017-2024版权所有</view> -->
|
||||
<view class="copyright">{{index_copyright}}</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
@@ -104,7 +104,7 @@ page {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
line-height: 65rpx;
|
||||
font-family: YouSheBiaoTiHei-1;
|
||||
font-family: YouSheBiaoTiHei-3;
|
||||
font-size: 36rpx;
|
||||
color: #3c8af6;
|
||||
}
|
||||
@@ -196,7 +196,7 @@ page {
|
||||
padding-right: 25rpx;
|
||||
padding-top: 5rpx; */
|
||||
padding:5rpx 25rpx 0 25rpx;
|
||||
font-family: YouSheBiaoTiHei-1;
|
||||
font-family: YouSheBiaoTiHei-3;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
color: #3c8af6;
|
||||
@@ -263,7 +263,7 @@ page {
|
||||
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
background-color: #3c8bf6;; /* 蓝色圆点 */
|
||||
background-color: #3c8bf6; /* 蓝色圆点 */
|
||||
border-radius: 50%;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
@@ -279,6 +279,7 @@ page {
|
||||
}
|
||||
|
||||
.copyright {
|
||||
color: #3c8af6;
|
||||
margin-bottom: 60rpx;
|
||||
text-align: center;
|
||||
}
|
||||
Reference in New Issue
Block a user