作者 李洪娟

上传

正在显示 95 个修改的文件 包含 4378 行增加0 行删除

要显示太多修改。

为保证性能只显示 95 of 95+ 个文件。

//app.js
import md5 from 'utils/md5.js';
App({
post: function(url, data) {
wx.showNavigationBarLoading()
wx.showLoading({
title: '加载中',
})
var promise = new Promise((resolve, reject) => {
let that = this;
let postData = data;
let baseUrl = 'https://insurance.w.broteam.cn/';
wx.request({
url: baseUrl + url,
data: postData,
method: 'POST',
header: {
'content-type': 'application/x-www-form-urlencoded'
},
success: function(res) {
resolve(res)
wx.hideLoading()
wx.hideNavigationBarLoading()
},
fail: function(e) {
reject('');
wx.hideLoading()
wx.hideNavigationBarLoading()
wx.showModal({
title: '',
content: res.data.msg,
showCancel: false
})
}
})
});
return promise;
console.log(promise)
},
formCollect(id) {
let url = 'sign/formid'
let params = {
formid: id,
openid: wx.getStorageSync('openId')
}
this.post(url, params).then((res) => {
console.log(res)
}).catch((errMsg) => {
})
},
nowDate() {
let date = new Date();
let month = date.getMonth() + 1;
let day = date.getDate();
return date.getFullYear() + '-' + (month > 9 ? month : ('0' + month)) + '-' + (day > 9 ? day : ('0' + day));
},
initDate(a) {
let date1 = new Date();
let time1 = date1.getFullYear() + "-" + (date1.getMonth() + 1) + "-" + date1.getDate();
let date2 = new Date(date1);
date2.setDate(date1.getDate() + a);
let time2 = date2.getFullYear() + "-" + (date2.getMonth() + 1) + "-" + date2.getDate();
return time2;
},
// 数组移除指定元素
arryRemove(arr, item) {
return arr.filter(function(ele) {
return ele != item;
})
},
strTime(strtime) {
let str = 'bronet' + strtime + 'beijing'
return md5(md5(str))
},
onLaunch() {
var that=this
wx.login({
success: (res) => {
let url = 'pubilc/sign';
let params = {
code: res.code,
status: ''
}
that.post(url, params).then((res) => {
console.log(res)
// console.log('start', res.data.data.UserType, res.data.data.checkstatus, res.data.data.PublishId)
}).catch((errMsg) => {
console.log(errMsg)
})
}
});
},
globalData: {
userInfo: null,
OpenId: '', //用户openid
UserId: '', //用户userid
UserType: '', //用户类型(2为普通会员,3为顾问,4为推广)
checkstatus: '', //分享参数(0为无分享参数,1为保单分享,2为注册分享,3为文章分享)
UserStatus: '', //用户状态(1初次登录需要授权操作,2多次登录不需要授权)
PublishId: '', //如果是保单分享返回保单id
NewsId: '', //如果是文章分享返回文章id
temp_UserType: '',
user_index: '',
}
})
\ No newline at end of file
... ...
{
"pages": [
"pages/start/start",
"pages/index/verigyCode/verigyCode",
"pages/index/summaryList2/summaryList2",
"pages/index/register/register",
"pages/about/about",
"pages/index/personalPolicyList/personalPolicyList",
"pages/index/agreement/agreement",
"pages/index/browseRecordDetail/browseRecordDetail",
"pages/index/consultantList/consultantList",
"pages/index/periodicReviews/periodicReviews",
"pages/index/CustomerManagement/CustomerManagement",
"pages/index/ArticleDetails/ArticleDetails",
"pages/index/reportList/reportList",
"pages/index/reportList2/reportList2",
"pages/index/editProfile/editProfile",
"pages/index/editProfile2/editProfile2",
"pages/index/policyList/policyList",
"pages/index/policyListDetail/policyListDetail",
"pages/index/policyManage/policyManage",
"pages/index/addListDetail/addListDetail",
"pages/index/personInfo/personInfo",
"pages/index/addNewFamily/addNewFamily",
"pages/index/smartRemind/smartRemind",
"pages/index/VipRecharge/VipRecharge",
"pages/index/twoCode/twoCode",
"pages/index/share/share",
"pages/index/inviteList/inviteList",
"pages/index/payWay/payWay",
"pages/index/addLog/addLog",
"pages/index/remind/remind",
"pages/index/summaryList/summaryList",
"pages/index/learnShare/learnShare",
"pages/index/EntryInformation2/EntryInformation2",
"pages/index/EntryInformation/EntryInformation",
"pages/index/Program/Program",
"pages/index/Suggest/Suggest",
"pages/index/articleBrowseRecord/articleBrowseRecord",
"pages/index/browseRecord/browseRecord",
"pages/index/TB/TB",
"pages/index/index",
"pages/personalCenter/personalCenter"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0286FF",
"navigationBarTitleText": "保单体检专家",
"navigationBarTextStyle": "white"
},
"tabBar": {
"color": "#666666",
"selectedColor": "#487AFF",
"borderStyle": "black",
"backgroundColor": "#fff",
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "/images/nav01@2x.png",
"selectedIconPath": "/images/nav02@2x.png"
},
{
"pagePath": "pages/about/about",
"text": "关于",
"iconPath": "/images/nav03@2x.png",
"selectedIconPath": "/images/nav04@2x.png"
},
{
"pagePath": "pages/personalCenter/personalCenter",
"text": "我的",
"iconPath": "/images/nav05@2x.png",
"selectedIconPath": "/images/nav06@2x.png"
}
]
},
"sitemapLocation": "sitemap.json"
}
\ No newline at end of file
... ...
.no_data {
color: #999;
font-size: 36rpx;
text-align: center;
width: 100%;
height: 100%;
position: fixed;
left: 0;
top: 0;
display: flex;
align-items: center;
justify-content: center;
}
button {
border-radius: 0;
}
button::after {
border: 0;
border-radius: 0;
}
/* iconfont */
@font-face {
font-family: 'iconfont'; /* project id 926819 */
src: url('//at.alicdn.com/t/font_926819_2olbhnsznao.eot');
src: url('//at.alicdn.com/t/font_926819_2olbhnsznao.eot?#iefix') format('embedded-opentype'),
url('//at.alicdn.com/t/font_926819_2olbhnsznao.woff2') format('woff2'),
url('//at.alicdn.com/t/font_926819_2olbhnsznao.woff') format('woff'),
url('//at.alicdn.com/t/font_926819_2olbhnsznao.ttf') format('truetype'),
url('//at.alicdn.com/t/font_926819_2olbhnsznao.svg#iconfont') format('svg');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-chongzhi:before {
content: "\e606";
}
.icon-bi:before {
content: "\e60a";
}
.icon-renzheng:before {
content: "\e646";
}
.icon-anquan:before {
content: "\e63c";
}
.icon-listpress:before {
content: "\e627";
}
.icon-xiala1:before {
content: "\e61c";
}
.icon-baodanyuhetong:before {
content: "\e642";
}
.icon-shu:before {
content: "\e645";
}
.icon-fenxiang2:before {
content: "\e620";
}
.icon-fangxingxuanzhongfill:before {
content: "\e721";
}
.icon-bianji:before {
content: "\e6b4";
}
.icon-zhaoxiangji1:before {
content: "\e663";
}
.icon-xuanzhong2:before {
content: "\e62b";
}
.icon-guanyuwomen:before {
content: "\e61e";
}
.icon-ren-copy:before {
content: "\e600";
}
.icon-xuanzhong:before {
content: "\e61a";
}
.icon-artboard61:before {
content: "\e788";
}
.icon-jinru:before {
content: "\e618";
}
.icon-kehu:before {
content: "\e613";
}
.icon-jiating1:before {
content: "\e81d";
}
.icon-wuuiconxiangjifangda:before {
content: "\e623";
}
.icon-guwen:before {
content: "\e61d";
}
.icon-tianjia:before {
content: "\e648";
}
.icon-xiala:before {
content: "\e619";
}
.icon-icon-test:before {
content: "\e72e";
}
.icon-fangkuang:before {
content: "\e629";
}
.icon-jiating:before {
content: "\e73d";
}
.icon-jiaoyijilu:before {
content: "\e638";
}
.icon-jinbi:before {
content: "\e672";
}
.icon-bianji1:before {
content: "\e68a";
}
.icon-mingdanguanli:before {
content: "\e658";
}
.icon-renzheng1:before {
content: "\e62a";
}
.icon-dkw_wode-:before {
content: "\e60e";
}
.icon-guanbi2:before {
content: "\e60f";
}
.icon-qiehuan:before {
content: "\e630";
}
.icon-wenjian:before {
content: "\e67d";
}
.icon-xuanzhongyuandian:before {
content: "\e624";
}
.icon-sousuo:before {
content: "\e617";
}
.icon-xuanze:before {
content: "\e6c3";
}
.icon-sousuo1:before {
content: "\e632";
}
.icon-yuan:before {
content: "\e622";
}
.icon-YDUI-naozhong:before {
content: "\e65d";
}
.icon-ren:before {
content: "\e6d9";
}
.icon-ziliao:before {
content: "\e603";
}
.icon-kehuguanli-copy-copy:before {
content: "\e63a";
}
.icon-add:before {
content: "\e604";
}
.icon-baodanxinxi:before {
content: "\e602";
}
.icon-hengxian1:before {
content: "\e626";
}
.icon-riqi:before {
content: "\ea1a";
}
.icon-tijian:before {
content: "\e605";
}
.icon-qiehuan1:before {
content: "\e62c";
}
.icon-hengxian:before {
content: "\e657";
}
.icon-gouwuche:before {
content: "\e609";
}
.icon-yaoqing:before {
content: "\e60b";
}
.icon-guanbi:before {
content: "\e621";
}
.icon-xiazai:before {
content: "\e625";
}
.icon-qiehuan2:before {
content: "\e643";
}
.icon-fenxiang:before {
content: "\e62e";
}
.icon-xuexi:before {
content: "\e61b";
}
.icon-baogao:before {
content: "\e639";
}
.icon-weixinzhifu:before {
content: "\e647";
}
.icon-dianhua:before {
content: "\e67c";
}
.icon-xiugai:before {
content: "\e607";
}
.icon-xuanzhong1:before {
content: "\e61f";
}
.icon-guanli:before {
content: "\e6e3";
}
.icon-tixian:before {
content: "\e62d";
}
.icon-shang:before {
content: "\e611";
}
.icon-rizhi:before {
content: "\e614";
}
.icon-baogao1:before {
content: "\e62f";
}
.icon-jisuanqi:before {
content: "\e608";
}
.icon-jiatingzhanghu:before {
content: "\e615";
}
.icon-shuoming:before {
content: "\e633";
}
.icon-nav:before {
content: "\e601";
}
.icon-xuanzhongkuang:before {
content: "\e628";
}
.icon-ling:before {
content: "\e8bf";
}
.icon-dianhua2:before {
content: "\e649";
}
.icon-fangan:before {
content: "\e60c";
}
.icon-fenxiang1:before {
content: "\e634";
}
.icon-gray-crown:before {
content: "\e60d";
}
.icon-shanchu1:before {
content: "\e616";
}
.icon-kakou:before {
content: "\e660";
}
.icon-shezhi:before {
content: "\e610";
}
.icon-jianyi:before {
content: "\e696";
}
.icon-zhuanfa:before {
content: "\e783";
}
.icon-shanchu:before {
content: "\e67b";
}
.icon-danjiantou:before {
content: "\e612";
}
... ...
// pages/about/about.js
const app = getApp()
var WxParse = require('../../wxParse/wxParse.js');
Page({
/**
* 页面的初始数据
*/
data: {
aboutdata: {
picurl: '',
title: ''
}
},
getaboutdata() {
let that = this;
let url = 'pubilc/about';
let aboutdata = that.data.aboutdata;
app.post(url, {
AboutType: 9
}).then((res) => {
console.log(res.data)
if (res.data.code == 200) {
aboutdata.picurl = res.data.data.picurl;
aboutdata.title = res.data.data.title;
that.setData({
aboutdata: aboutdata,
})
WxParse.wxParse('content', 'html', res.data.data.post_content, that, 5);
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
this.getaboutdata();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "关于保单体检专家"
}
\ No newline at end of file
... ...
<!--pages/about/about.wxml-->
<!-- <view class='topimg'>
<image src='{{aboutdata.picurl}}'></image>
</view> -->
<view class='content'>
<!-- <view class='title'>{{aboutdata.title}}</view> -->
<view class='main'>
<import src="../../wxParse/wxParse.wxml" />
<template is="wxParse" data="{{wxParseData:content.nodes}}" />
</view>
</view>
\ No newline at end of file
... ...
/* pages/about/about.wxss */
.topimg{
height:376rpx;
width:100%;
box-sizing: border-box;
overflow: hidden;
}
.topimg image{
width:100%;
height: 100%;
}
.content{
/* padding:32rpx 32rpx 0 32rpx; */
text-align: center;
}
.title{
color:#000;
font-size:30rpx;
margin:0 0 32rpx 0;
}
.main{
text-align: left;
font-size:26rpx;
color:rgba(0,0,0,1);
line-height:44rpx;
}
.wxParse-p{
/* display:flex; */
/* flex-direction: column;
justify-content: center; */
}
.wxParse-p image{
display:block;
width:750rpx!important;
box-sizing: border-box
}
\ No newline at end of file
... ...
// pages/indexs/article_details/article_details.js
const app = getApp();
var WxParse = require('../../../wxParse/wxParse.js');
Page({
/**
* 页面的初始数据
*/
data: {
NewsId: '', //文章ID
GoId: '', //分享人id
articleDetail: [], //文章详情内容
share_num: '',
UserId: '',
UserType: '',
show_state: false,
state:false
},
goIndex() {
wx.switchTab({
url: '/pages/index/index',
})
},
//文章详情
listDetail() {
let url = 'pubilc/content';
let that = this;
app.post(url, {
NewsId: that.data.NewsId,
UserId: app.globalData.UserId,
GoId: that.data.GoId
}).then((res) => {
if (res.data.code == 200) {
console.log(res);
that.setData({
articleDetail: res.data.data
})
var content = res.data.data.content
WxParse.wxParse('content', 'html', content, that, 5);
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
//注册顾问
goRegister() {
wx.navigateTo({
url: '/pages/index/register/register',
})
},
//查看顾问详情
goDetail(e) {
var CounselorId = this.data.GoId
console.log(222, CounselorId)
wx.navigateTo({
url: '/pages/index/editProfile2/editProfile2?CounselorId=' + CounselorId,
})
},
//有奖分享
prizeshare() {
var that = this;
let url = 'pubilc/sharetext';
app.post(url, {
UserId: app.globalData.UserId
}).then((res) => {
console.log('4567',res)
if (res.data.code == 200) {
this.setData({
share_num: res.data.data.share_num
})
wx.showLoading();
wx.hideLoading();
setTimeout(() => {
if (this.data.share_num == 0) {
wx.showToast({
title: '今日分享获得TB次数以达到上限',
icon: 'none',
duration: 2000,
})
}
setTimeout(() => {
wx.hideToast();
}, 2000)
}, 0);
}
}).catch((errMsg) => {
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
console.log(options)
let that = this;
that.setData({
NewsId: options.NewsId,
UserId: app.globalData.UserId,
GoId: options.GoId,
UserType: app.globalData.UserType,
show_state: options.show_state
})
console.log('aa', that.data.show_state);
console.log('123', that.data.GoId);
console.log('456', that.data.UserType)
that.listDetail();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
// this.listDetail()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function(options) {
let that=this;
let show_state=''
// console.log(options)
console.log(app.globalData.UserType)
if (app.globalData.UserType == 2) {
that.setData({
state:false
})
}else{
that.setData({
state: true
})
}
console.log(that.data.show_state)
this.prizeshare()
var shareObj = {
title: options.target.dataset.title, // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?status=' + options.target.dataset.status + '&GoId=' + app.globalData.UserId + '' + '&show_state=' + that.data.state + '&NewsId' + this.data.NewsId,
imgUrl: '',
}  
// if (options.from == 'button') {
// // 此处可以修改 shareObj 中的内容
// shareObj.path = '/pages/start/start?status=' + options.target.dataset.status
// }  
return shareObj;
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "文章详情"
}
\ No newline at end of file
... ...
<!--pages/personalCenter/personalCenter.wxml-->
<import src="../../../wxParse/wxParse.wxml" />
<view class='go_index' bindtap="goIndex" wx:if="{{GoId!=''}}">回到首页</view>
<view class='content_box'>
<view class='list_title'>{{articleDetail.title}}</view>
<view class='list_info_box'>
<text>{{articleDetail.writer}}</text>
<text class='line'></text>
<text> {{articleDetail.source}}</text>
<text class='line'></text>
<text> {{articleDetail.create_time}}</text>
</view>
<!-- &&UserType!=3&&GoId!=UserId&&UserType!=4 -->
<view class='banner_box' wx:if="{{GoId!=''}}">
<view class='head_img'>
<image src='{{articleDetail.user.picurl}}'></image>
</view>
<view class='head_info_box'>
<view class='user_name'>{{articleDetail.user.name}}</view>
<view>{{articleDetail.user.mobile}}</view>
<view>{{articleDetail.user.work}}</view>
<view>{{articleDetail.user.work_post}}</view>
</view>
<view class='edit_box' bindtap='goDetail'>
<view>查看详情</view>
</view>
<view class='banner_info' wx:if='{{UserType!=3}}' bindtap='goRegister'>我要开通名片功能</view>
</view>
<view class='list_content'>
<template is="wxParse" data="{{wxParseData:content.nodes}}" />
</view>
<view class='bottom_box'>
<button data-status="{{articleDetail.status}}" data-title='{{articleDetail.title}}' open-type='share'></button>
<text class='iconfont icon-zhuanfa'></text>
<text>转发</text>
</view>
</view>
\ No newline at end of file
... ...
/* pages/ArticleDetails/ArticleDetails.wxss */
.go_index {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
position: fixed;
right: 30rpx;
top: 60rpx;
background: #0286ff;
font-size: 30rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
padding: 20rpx;
box-sizing: border-box;
}
.banner_box {
background: #0286ff;
display: flex;
align-items: center;
font-size: 28rpx;
color: #fff;
position: relative;
padding: 30rpx 30rpx 85rpx 30rpx;
border-radius: 16rpx;
box-shadow: 0rpx 15rpx 30rpx 0rpx rgba(9, 60, 121, 0.08);
overflow: hidden;
}
.head_img {
width: 180rpx;
height: 180rpx;
display: flex;
align-items: center;
justify-items: center;
margin-right: 32rpx;
box-shadow: 0rpx 5rpx 10rpx 0rpx rgba(2, 134, 255, 0.66);
}
.head_img image {
width: 100%;
height: 100%;
}
.head_info_box {
line-height: 50rpx;
}
.user_name {
font-size: 32rpx;
font-weight: bold;
}
.edit_box {
display: flex;
align-items: center;
font-size: 26rpx;
color: #f80;
background: #fff;
border-radius: 26rpx;
padding: 13rpx 30rpx;
position: absolute;
right: 30rpx;
top: 50%;
transform: translateY(-50%);
}
.icon-xiugai {
font-size: 26rpx;
margin-right: 11rpx;
}
.banner_info {
width: 100%;
height: 60rpx;
line-height: 60rpx;
background: #0073dc;
font-size: 28rpx;
color: #fff;
text-align: center;
position: absolute;
bottom: 0;
left: 0;
}
.content_box {
padding: 30rpx;
}
.list_title {
font-size: 40rpx;
color: #000;
margin-bottom: 40rpx;
}
.list_info_box {
font-size: 28rpx;
color: #97a0a8;
margin-bottom: 30rpx;
}
.line {
display: inline-block;
width: 1rpx;
height: 22rpx;
background: #dedede;
margin: 0 15rpx;
}
.bottom_box {
width: 120rpx;
height: 120rpx;
background: linear-gradient(-30deg, rgba(31, 118, 220, 1), rgba(69, 149, 244, 1));
border-radius: 50%;
font-size: 24rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
position: fixed;
bottom: 50rpx;
right: 50rpx;
}
.bottom_box button {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1000;
opacity: 0;
}
.icon-zhuanfa {
font-size: 45rpx;
font-weight: bold;
margin-bottom: 5rpx;
}
.list_content {
font-size: 30rpx;
color: #252729;
line-height: 50rpx;
text-indent: 2rem;
margin-top: 70rpx;
}
.wxParse-p {
text-indent: 0 !important;
word-spacing: normal;
word-wrap: normal;
display: block !important;
margin: 0!important;
}
.wxParse-img {
width: 100% !important;
height: 100%;
}
.wxParse-span{
width: 100%;
}
\ No newline at end of file
... ...
// pages/CustomerManagement/CustomerManagement.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
currentTab: 2,
Status: '',
KeyWord: '',
mainid: '',
vip_state: false
},
showtotast(){
this.showInfo()
},
showInfo() {
wx.showModal({
title: '提示',
content: '会员已过期,请充值!',
cancelText: '暂不充值',
confirmText: '立即充值',
success(res) {
console.log(res)
if (res.confirm) {
wx.navigateTo({
url: '/pages/index/VipRecharge/VipRecharge',
})
}
},
})
},
goIndex() {
wx.switchTab({
url: '/pages/index/index',
})
},
//点击切换
tabCharge(e) {
var that = this;
if (this.data.currentTab === e.target.dataset.current) {
return false;
} else {
that.setData({
currentTab: e.target.dataset.current
})
that.getInfo()
}
},
//设置查询的关键词
setKeyWord(e) {
let that = this;
that.setData({
KeyWord: e.detail.value
})
},
//获取客户管理页面信息
getInfo() {
let that = this;
let url = 'counselor/familylist';
let param = {
UserId: app.globalData.UserId,
Status: this.data.currentTab,
KeyWord: that.data.KeyWord
}
app.post(url, param).then((res) => {
let data = res.data;
if (data.code == 200) {
that.setData({
list: data.data.list
})
}
}).catch((errMsg) => {
// console.log(errMsg)
})
},
//获取客户管理页面信息
getdata() {
let that = this;
let url = 'pubilc/UserType';
let param = {
UserId: app.globalData.UserId,
}
app.post(url, param).then((res) => {
if (res.data.code == 200) {
if (res.data.data.type == 5) {
wx.showToast({
title: '会员到期,请充值',
icon: 'none'
}, 2000)
that.setData({
vip_state: false
})
} else if (res.data.data.type == 2) {
wx.showToast({
title: '您的权限不足',
icon: 'none'
}, 2000)
that.setData({
vip_state: false
})
} else {
that.setData({
vip_state: true
})
}
}
}).catch((errMsg) => {
// console.log(errMsg)
})
},
//家庭信息
familyData(e) {
var that = this
let familyid = e.currentTarget.dataset.familyid;
let list = that.data.list;
// console.log(list)
for (let items of list) {
if (items.family_id == familyid) {
for (let j in items.users) {
if (items.users[j].user_family == 1) {
that.setData({
mainid: items.users[j].id, //户主ID
cid: items.users[j].cid //顾问ID
})
}
}
}
}
wx.navigateTo({
url: '../remind/remind?cid=' + this.data.cid + '&mainid=' + this.data.mainid + '&vip_state=' + this.data.vip_state,
})
},
//个人信息详情
infoDetail(e) {
// wx.navigateTo({
// url: '../personInfo/personInfo?DefId=' + e.currentTarget.dataset.id,
// })
wx.navigateTo({
url: '/pages/index/EntryInformation2/EntryInformation2?DefId=' + e.currentTarget.dataset.id,
})
},
//创建新家庭
addFamily() {
var flag = true
wx.navigateTo({
url: '../addNewFamily/addNewFamily?flag=' + flag,
})
wx.setStorageSync('familyid', '')
},
//管理成员
addPerson(e) {
let familyid = e.currentTarget.dataset.familyid;
wx.navigateTo({
url: '../addNewFamily/addNewFamily?familyid=' + familyid,
})
wx.setStorageSync('familyid', familyid)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
// this.getdata()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
this.getInfo()
this.getdata()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "客户管理"
}
\ No newline at end of file
... ...
<!--pages/CustomerManagement/CustomerManagement.wxml-->
<view class='search_box'>
<view class='search_item'>
<view class='iconfont icon-sousuo1'></view>
<view class='search_input'>
<input placeholder='搜索姓名或标签' bindinput='setKeyWord'></input>
</view>
</view>
<view bindtap='getInfo'>搜索</view>
</view>
<view class='line_box'></view>
<view class='content_box'>
<view class='tab_box'>
<view class="tab_item {{currentTab==2?'tab_active':''}}" data-current="2" bindtap='tabCharge'>日志降序排序</view>
<view class="tab_item {{currentTab==1?'tab_active':''}}" data-current="1" bindtap='tabCharge'>优先级排序</view>
</view>
<view class='item_list' wx:for='{{list}}' wx:key=''>
<view class='list_left_box'>
<view class='list_label_box' bindtap='familyData' data-familyid='{{item.family_id}}'>
<view class='iconfont icon-jiating1'></view>
<view>跟踪日志</view>
<text class='iconfont icon-yuan label_icon' wx:if='{{item.warn_status==1}}'></text>
</view>
<view class='list_label_item'>
<view class='label_item' wx:for='{{item.users}}' wx:for-item='user' wx:key='' data-id='{{user.id}}' bindtap='infoDetail'>
<text>{{user.name}}({{user.family_role}})</text>
<text class='iconfont icon-yuan' wx:if='{{user.user_family==1}}'></text>
<text class='iconfont icon-yuan user_point' wx:if='{{user.key_status==1}}'></text>
</view>
<!-- <view class='label_item'>
<text>曹文正(爸爸)</text>
<text class='iconfont icon-yuan '></text>
</view>
<view class='label_item'>
<text>曹文正(爸爸)</text>
<text class='iconfont icon-yuan user_point'></text>
</view> -->
</view>
</view>
<view class='list_right_box'>
<view class='list_btn_box' bindtap="{{vip_state?'addPerson':'showtotast'}}" data-familyid='{{item.family_id}}'>
<view class='list_btn'>
<view class='iconfont icon-shezhi'></view>
</view>
<view>管理成员</view>
</view>
</view>
</view>
<view class='null_box'></view>
<view class='bottom'>
<view class='bottom_box' style='100%;' bindtap="{{vip_state?'addFamily':'showInfo'}}">创建新家庭</view>
<view class='bottom_box' bindtap="goIndex">回到首页</view>
</view>
</view>
\ No newline at end of file
... ...
/* pages/CustomerManagement/CustomerManagement.wxss */
.line_box {
width: 100%;
height: 16rpx;
background: #f5f6fa;
}
.go_index {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
position: fixed;
right: 30rpx;
bottom: 120rpx;
background: #0286ff;
font-size: 30rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
padding: 20rpx;
box-sizing: border-box;
}
.search_box {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10rpx 30rpx;
box-sizing: border-box;
font-size: 30rpx;
color: #666;
}
.search_item {
width: 80%;
height: 100%;
background: rgba(245, 245, 250, 1);
border-radius: 5rpx;
display: flex;
align-items: center;
padding: 10rpx 20rpx;
}
.icon-sousuo1 {
font-size: 40rpx;
color: #ccc;
margin-right: 20rpx;
}
.search_input input {
font-size: 30rpx;
border: 0;
outline: none;
}
.tab_box {
width: 400rpx;
height: 60rpx;
background: rgba(255, 255, 255, 1);
border: 1rpx solid rgba(43, 154, 255, 1);
border-radius: 30rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #999;
margin: 30rpx auto 50rpx auto;
overflow: hidden;
}
.tab_item {
width: 50%;
height: 100%;
border-right: 1rpx solid #2b9aff;
display: flex;
align-items: center;
justify-content: center;
}
.tab_item:last-child {
border: 0;
}
.tab_active {
background: #d7ecff;
color: #0286ff;
}
.content_box {
padding: 0 30rpx;
box-sizing: border-box;
}
.item_list {
min-height: 222rpx;
display: flex;
/* align-items: center; */
align-items: flex-start;
justify-content: space-between;
box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(0, 0, 0, 0.08);
border-radius: 5rpx;
padding: 16rpx 0;
box-sizing: border-box;
position: relative;
margin-bottom: 40rpx;
}
.list_left_box {
width: 87%;
display: flex;
align-items: flex-start;
}
.list_label_box {
width: 160rpx;
height: 207rpx;
background: rgba(2, 134, 255, 1);
box-shadow: 2rpx 8rpx 30rpx 0rpx rgba(0, 0, 0, 0.24);
border-radius: 5rpx;
font-size: 24rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin-left: 15rpx;
position: relative;
/* position: absolute;
left: 0;
top: -20rpx; */
}
.icon-jiating1 {
font-size: 80rpx;
}
.icon-yuan {
font-size: 16rpx;
position: absolute;
right: 0;
top: 0;
color: #0286ff;
}
.label_icon {
color: #f00;
}
.user_point {
color: #0ed137;
position: absolute;
right: 0;
bottom: 0;
top: 80%;
}
.list_label_item {
width: 66%;
display: flex;
align-items: center;
flex-wrap: wrap;
margin-left: 20rpx;
}
.label_item {
width: 136rpx;
height: 80rpx;
background: rgba(242, 244, 247, 1);
border-radius: 5rpx;
font-size: 24rpx;
color: #1a1a1a;
position: relative;
display: flex;
align-items: center;
justify-content: center;
margin: 0 20rpx 20rpx 0;
padding: 0 15rpx;
}
.list_right_box {
width: 16%;
margin-top: 50rpx;
margin-right: 10rpx;
}
.list_btn_box {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
font-size: 24rpx;
color: #1a1a1a;
}
.list_btn {
width: 80rpx;
height: 80rpx;
background: linear-gradient(-40deg, rgba(246, 200, 44, 1), rgba(250, 189, 75, 1));
border-radius: 40rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 12rpx;
}
.icon-shezhi {
font-size: 40rpx;
}
.bottom {
width: 100%;
height: 120rpx;
background: #fff;
position: fixed;
bottom: 0rpx;
left: 50%;
transform: translateX(-50%);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30rpx;
box-sizing: border-box;
}
.bottom_box {
width: 45%;
height: 88rpx;
background: rgba(2, 134, 255, 1);
border-radius: 44rpx;
font-size: 36rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.null_box {
width: 100%;
height: 120rpx;
}
... ...
// pages/EntryInformation/EntryInformation.js
const app = getApp();
Page({
data: {
sexArray: ['女', '男'],
card_Array: ['身份证', '护照', '出生证', '军官证', '港澳通行证'],
birth_date: '',
addsess_current: 0,
label_list: [],
list: {
name: '',
sex: '',
family_role: '',
money: '',
mobile: '',
birthday: '',
work: '',
work_address: '',
address: '',
mid: 0,
user_status: '',
status_num: '',
text: '',
},
label_ids: [],
familyid: 0, //家庭ID
hasimg: '',
DefId: ''
},
// 打电话
makePhoneCall() {
let that = this;
var list = that.data.list
var phoneNumber = list.mobile
wx.makePhoneCall({
phoneNumber: phoneNumber
})
},
//设置查询的关键词
setKeyWord(e) {
let that = this;
that.setData({
KeyWord: e.detail.value
})
},
//名字
setName(e) {
var list = this.data.list;
list.name = e.detail.value;
this.setData({
list: list
})
},
//选择性别
selectSex(e) {
var list = this.data.list;
var sexArray = this.data.sexArray
list.sex = e.detail.value;
this.setData({
sex_index: e.detail.value,
list: list
})
},
//选择家庭角色
familyRole(e) {
let list = this.data.list;
list.family_role = e.detail.value;
this.setData({
list: list
})
},
//选择年收入
income(e) {
let list = this.data.list;
list.money = e.detail.value;
this.setData({
list: list
})
},
//手机号
setMobile(e) {
let list = this.data.list;
list.mobile = e.detail.value;
this.setData({
list: list
})
},
//出生日期
birthDate(e) {
var list = this.data.list;
list.birthday = e.detail.value;
this.setData({
birth_date: e.detail.value,
list: list
})
},
//选择家庭角色
setWork(e) {
let list = this.data.list;
list.work = e.detail.value;
this.setData({
list: list
})
},
//选择家庭角色
setworkAddress(e) {
let list = this.data.list;
list.work_address = e.detail.value;
this.setData({
list: list
})
},
//设置家庭地址
setSddress(e) {
let list = this.data.list;
list.address = e.detail.value;
var address = list.address
if (this.data.familyid == 0) {
wx.setStorageSync('address', address)
}
this.setData({
list: list
})
},
//通讯切换
addressCharge(e) {
var that = this;
var list = this.data.list
list.mid = e.target.dataset.current
if (this.data.addsess_current === e.target.dataset.current) {
return false;
} else {
that.setData({
addsess_current: e.target.dataset.current,
list: list
})
}
},
//选择证件类型
selectIdCard(e) {
let list = this.data.list;
var card_Array = this.data.card_Array
list.user_status = parseInt(e.detail.value) + 1;
this.setData({
card_index: e.detail.value,
list: list
})
},
//选择家庭角色
setIdNum(e) {
let list = this.data.list;
list.status_num = e.detail.value;
this.setData({
list: list
})
},
//用户描述
descript(e) {
let list = this.data.list;
list.text = e.detail.value;
this.setData({
list: list
})
},
//添加成员标签
labelInfo() {
let that = this;
let url = 'counselor/DefAdd';
let params = {}
app.post(url, params).then((res) => {
if (res.data.code == 200) {
var list = this.data.list
that.setData({
label_list: res.data.data
})
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
//选择用户标签
selectLabel(e) {
var mindex = e.currentTarget.dataset.mindex
var sindex = e.currentTarget.dataset.sindex
var list = this.data.list
var id = e.currentTarget.dataset.id
var status = e.currentTarget.dataset.status
var label_list = this.data.label_list
var label_ids = this.data.label_ids;
//去重
const add = label_ids.every((label_ids) => {
return label_ids != id
})
// if (add) {
if (!(label_list[mindex].data[sindex].status)) {
label_ids.push(id)
} else {
for (var i = 0; i < label_ids.length; i++) {
// if (!(label_list[mindex].data[sindex].status)) {
if (label_list[mindex].data[sindex].id == label_ids[i]) {
label_ids.splice(i, 1);
console.log(11, label_ids)
}
// }
}
}
// }
label_list[mindex].data[sindex].status = !(label_list[mindex].data[sindex].status)
this.setData({
label_list: label_list,
label_ids: label_ids
});
},
// 选择上传的图片
chooseImg() { //这里是选取图片的方法
var that = this;
wx.chooseImage({
count: 1,
success: (res) => {
var tempFilePaths = res.tempFilePaths
let url = '/users/upload'
let strtime = +new Date()
let params = {
picurl: tempFilePaths[0],
strtime: strtime,
token: app.strTime(strtime)
}
wx.uploadFile({
url: 'https://insurance.w.broteam.cn/pubilc/upload', //仅为示例,非真实的接口地址
filePath: tempFilePaths[0],
name: 'picurl',
formData: {
'strtime': strtime,
'token': app.strTime(strtime)
},
success: function(res) {
var data = JSON.parse(res.data);
var picurl = data.data.picurl;
picurl = picurl.indexOf('http') != '-1' ? picurl : "http://" + picurl
var list = that.data.list
list.picurl = picurl
that.setData({
hasimg: picurl,
list: list
})
}
})
}
})
},
//成员信息的修改,新增
listVerify(e) {
let that = this;
var warn = "";
var flag = true;
var state = that.data.state
var list = this.data.list;
var sex_index = (this.data.sex_index)
var picurl = list.picurl
if (picurl == undefined) {
picurl = ''
}
// else if (list.mobile == '') {
// warn = '请填写您的手机号'
// } else if (!(/^[1][3,4,5,7,8][0-9]{9}$/.test(list.mobile))) {
// warn = "手机号格式不正确";
// }
if (list.name == "") {
warn = "请填写您的姓名";
} else if (sex_index == undefined) {
warn = "请填写您的性别";
} else if (list.family_role == '') {
warn = '请填写您的家庭角色'
} else if (list.birthday == '') {
warn = "请填选择您的出生日期"
} else {
flag = false; //若必要信息都填写,则不用弹框.正常调用接口
let paramlist = {
name: list.name,
sex: sex_index,
family_role: list.family_role,
money: list.money,
mobile: list.mobile,
birthday: list.birthday,
work: list.work,
work_address: list.work_address,
address: list.address,
mid: list.mid,
user_status: list.user_status,
status_num: list.status_num,
picurl: picurl,
text: list.text,
label_ids: this.data.label_ids,
family_id: that.data.familyid,
DefId: that.data.DefId,
UserId: app.globalData.UserId
}
let url = 'counselor/deflistdo'
app.post(url, paramlist).then((res) => {
console.log(res)
if (res.data.code == 200) {
wx.showToast({
title: '录入成功',
})
wx.setStorageSync('familyid', res.data.data.family_id)
setTimeout(() => {
if (this.data.familyid == 0) {
// wx.redirectTo({
// url: '/pages/index/CustomerManagement/CustomerManagement',
// })
wx.navigateTo({
url: '/pages/index/addNewFamily/addNewFamily',
})
} else {
wx.navigateBack()
}
}, 1500)
// wx.navigateTo({
// url: '/pages/index/addNewFamily/addNewFamily?familyid=' + res.data.data.family_id,
// })
}
}).catch((errMsg) => {
console.log(errMsg)
})
}
if (flag == true) {
wx.showToast({
title: warn,
icon: 'none',
duration: 2000
})
}
},
//获取成员详细信息
getUserInfo() {
let that = this;
let url = 'counselor/deflist';
let params = {
DefId: that.data.DefId
}
app.post(url, params).then((res) => {
if (res.data.code == 200) {
var list = res.data.data.list
if (res.data.data.list.picurl != '') {
this.setData({
hasimg: true
})
}
var label_ids = this.data.label_ids
var label_list = res.data.data.label_list
for (var i = 0; i < label_list.length; i++) {
for (var j = 0; j < label_list[i].data.length; j++) {
if (label_list[i].data[j].status == 1) {
label_ids.push(label_list[i].data[j].id)
label_list[i].data[j].status = true
} else {
label_list[i].data[j].status = false
}
}
}
var list = res.data.data.list;
list.sex = res.data.data.list.sex;
that.setData({
list: list,
label_list: label_list,
sex_index: res.data.data.list.sex,
card_index: parseInt(res.data.data.list.user_status) - 1,
addsess_current: res.data.data.list.mid,
label_ids: label_ids
})
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
//获取家庭地址
getAddress() {
let that = this;
let url = 'counselor/addUserAds';
app.post(url, {
family_id: this.data.familyid
}).then((res) => {
if (res.data.code == 200) {
var list = that.data.list
list.address = res.data.data.address
list.mobile=res.data.data.mobile
that.setData({
list: list
})
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
this.labelInfo()
this.setData({
familyid: options.familyid
})
if (options.DefId == undefined) {
this.setData({
DefId: ''
})
} else {
this.setData({
DefId: options.DefId
})
this.getUserInfo();
}
if (this.data.familyid != '') {
this.getAddress()
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "个人信息录入"
}
\ No newline at end of file
... ...
<!--pages/EntryInformation/EntryInformation.wxml-->
<form bindsubmit='listVerify'>
<view class='content_item'>
<view class='item_list'>
<view class='list_title'>
<text class='list_icon'>*</text>
<text>姓名</text>
</view>
<view class='list_input'>
<input type='text' placeholder='请输入客户姓名' value='{{list.name}}' bindinput='setName'></input>
</view>
</view>
<view class='item_list'>
<view class='list_title'>
<text class='list_icon'>*</text>
<text>性别</text>
</view>
<view class='list_input'>
<picker class='picker' range='{{sexArray}}' value='{{sex_index}}' bindchange='selectSex'>
<input placeholder='请选择性别' value='{{sexArray[sex_index]}}' disabled='true'></input>
</picker>
</view>
</view>
<view class='item_list'>
<view class='list_title'>
<text class='list_icon'>*</text>
<text>家庭角色</text>
</view>
<view class='list_input'>
<input type='text' placeholder='请输入家庭角色' value='{{list.family_role}}' bindinput='familyRole'></input>
</view>
</view>
<view class='item_list'>
<view class='list_title'>个人年收入</view>
<view class='list_input' style='justify-content:flex-start;'>
<input type='number' placeholder='请输入' value='{{list.money}}' bindinput='income' style='width:100rpx;'></input>
<view>万</view>
</view>
</view>
<view class='item_list'>
<view class='list_title'>
<!-- <text class='list_icon'>*</text> -->
<text>手机号</text>
</view>
<view class='list_input'>
<input type='number' placeholder='请输入手机号' value='{{list.mobile}}' bindinput='setMobile'></input>
</view>
</view>
<view class='item_list'>
<view class='list_title'>
<text class='list_icon'>*</text>
<text>出生日期</text>
</view>
<view class='list_input'>
<picker class='picker' mode="date" value='{{list.birthday}}' bindchange='birthDate'>
<input placeholder='请选择真实出生日期' value='{{list.birthday}}' disabled='true'></input>
</picker>
</view>
</view>
<view class='item_list'>
<view class='list_title'>单位名称 </view>
<view class='list_input'>
<input type='text' placeholder='请输入单位名称' value='{{list.work}}' bindinput='setWork'></input>
</view>
</view>
<view class='item_list'>
<view class='list_title'>单位地址 </view>
<view class='list_input'>
<input type='text' placeholder='请输入单位地址' value='{{list.work_address}}' bindinput='setworkAddress'></input>
</view>
</view>
<view class='item_list' style='align-items: flex-start;min-height:80rpx;'>
<view class='list_title'>家庭地址 </view>
<view class='list_input'>
<!-- wx:if='{{list.address}}' -->
<textarea type='text' placeholder='请输入家庭地址' value='{{list.address}}' bindinput='setSddress'></textarea>
</view>
</view>
<view class='item_list'>
<view class='list_title'>通讯地址 </view>
<view class='list_input'>
<view class="address_btn {{addsess_current==1?'unit_address':''}}" data-current='1' bindtap='addressCharge'>家庭地址</view>
<view class="address_btn {{addsess_current==2?'unit_address':''}}" data-current='2' bindtap='addressCharge'>单位地址</view>
</view>
</view>
<view class='item_list'>
<view class='list_title'>证件类型</view>
<view class='list_input'>
<picker class='picker' range='{{card_Array}}' value='{{card_index}}' bindchange='selectIdCard'>
<input placeholder='请选择证件类型' value='{{card_Array[card_index]}}' disabled='true'></input>
</picker>
</view>
</view>
<view class='item_list'>
<view class='list_title'>证件号 </view>
<view class='list_input'>
<input type='text' placeholder='请输入证件号' value='{{list.status_num}}' bindinput='setIdNum'></input>
</view>
</view>
</view>
<view class='box'>
<!-- 上传图片 -->
<view class='upload_box'>
<view class='popup_img' wx:if='{{hasimg}}' bindtap='chooseImg'>
<image src='{{list.picurl}}' mode='widthFix'></image>
</view>
<view bindtap='chooseImg' wx:else>
<view class='iconfont icon-add'></view>
<view style='margin-bottom:25rpx;'>上传客户照片</view>
</view>
</view>
</view>
<view class='content_item'>
<view class='item_list'>
<view class='list_title'>客户描述</view>
</view>
<view class='list_textarea'>
<textarea placeholder='请在此添加对客户的描述' value='{{list.text}}' placeholder-class='font_color' bindinput='descript'></textarea>
</view>
</view>
<view class='content_item'>
<view class='item_list'>
<view class='list_title' style='width: 100%;text-align: center;'>客户画像</view>
</view>
<view class='item_list item_label_box' wx:for='{{label_list}}' wx:key='' wx:for-index='mindex'>
<view class='list_label_title'>{{item.label}} </view>
<view class='list_label'>
<view class="address_btn {{sub_its.status?'unit_address':''}}" data-id='{{sub_its.id}}' data-status='{{sub_its.status}}' wx:for='{{item.data}}' wx:for-item='sub_its' wx:key='' wx:for-index='sindex' data-sindex='{{sindex}}' data-mindex='{{mindex}}' bindtap='selectLabel'>{{sub_its.name}}</view>
</view>
</view>
</view>
<!-- 底部按钮 -->
<view class='null_box'></view>
<!-- <cover-view class='bottom_box'>
<button class='bottom_btn' style='width: 100%;height: 80rpx;font-size: 32rpx;color: #fff;background: rgba(2, 134, 255, 1);border-radius: 44rpx;display: flex;align-items: center;justify-content: center;' data-type='complete' formType='submit'>完成</button>
</cover-view> -->
<cover-view class='bottom_box'>
<button data-type='complete' formType='submit' style='font-size:12pt;border:0px;width:100%;background:#0286FF;color:#fff'>完成</button>
</cover-view>
</form>
\ No newline at end of file
... ...
/* pages/my/listDetail/listDetail.wxss */
page {
background: #f5f5fa;
}
.content_item {
background: #fff;
padding: 0 38rpx;
margin-top: 16rpx;
}
.item_list {
width: 100%;
display: flex;
align-items: center;
border-bottom: 1rpx dashed #ebebeb;
padding: 23rpx 0;
}
.list_icon {
font-size: 30rpx;
color: #f00;
margin-right: 10rpx;
}
.list_title {
width: 170rpx;
font-size: 29rpx;
color: #000;
}
.list_label_title {
width: 140rpx;
font-size: 29rpx;
color: #000;
}
.project {
background: none;
}
.symbol_icon {
font-size: 27rpx;
color: red;
}
.list_input {
width: 75%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 30rpx;
color: #000;
}
.list_input textarea{
height: 120rpx;
/* position: fixed; */
}
.list_input input {
border: 0;
outline: none;
font-size: 30rpx;
color: #000;
line-height: 1;
}
.list_input .picker {
width: 100%;
height: 53rpx;
font-size: 30rpx;
color: #000;
line-height: 53rpx;
}
.item_label_box {
align-items: flex-start;
}
.list_label {
width: 75%;
display: flex;
align-items: center;
flex-wrap: wrap;
}
.list_label .address_btn {
margin-bottom: 20rpx;
}
.list_textarea {
width: 100%;
}
.list_textarea textarea {
width: 100%;
padding: 30rpx 0;
box-sizing: border-box;
min-height: 140rpx;
}
.font_color {
font-size: 28rpx;
color: #999;
}
.icon-add {
font-size: 32rpx;
color: #ccc;
text-align: center;
padding: 20rpx 0;
}
.icon-jinru {
float: right;
color: #ccc;
}
.item {
justify-content: space-between;
}
.box {
padding: 0 32rpx;
}
.upload_box {
font-size: 28rpx;
color: #1a1a1a;
background: #fff;
margin-top: 16rpx;
text-align: center;
/* padding: 36rpx 0; */
border-radius: 10rpx;
box-shadow: 2rpx 0rpx 3rpx rgba(235, 235, 235, 1);
overflow: hidden;
}
.upload_box .icon-add {
font-size: 64rpx;
}
.popup_img {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.popup_img image {
width: 100%;
/* height: 100%; */
}
/* .icon-guanbi {
position: absolute;
top: 10rpx;
right: 20rpx;
color: #ccc;
} */
.content_info {
font-size: 24rpx;
color: #999;
margin-top: 22rpx;
}
.null_box {
width: 100%;
height: 120rpx;
}
.bottom_box {
width: 100%;
height: 100rpx;
background: rgba(255, 255, 255, 1);
box-shadow: 1rpx 0rpx 1rpx rgba(235, 233, 232, 1);
display: flex;
align-items: center;
justify-content: flex-end;
position: fixed;
bottom: 0;
padding: 0 32rpx;
z-index: 5;
box-sizing: border-box;
}
.bottom_btn {
width: 100%;
height: 80rpx;
font-size: 32rpx;
color: #fff;
background: rgba(2, 134, 255, 1);
border-radius: 44rpx;
display: flex;
align-items: center;
justify-content: center;
}
.add_btn {
width: 260rpx;
height: 80rpx;
font-size: 32rpx;
color: #1a1a1a;
background: #fff;
border: 1rpx solid #ebebeb;
border-radius: 40rpx;
display: flex;
align-items: center;
justify-content: center;
margin-left: 200rpx;
margin-right: 20rpx;
}
.addrisk {
width: 70%;
display: flex;
align-items: center;
justify-content: space-between;
text-align: left;
}
.unit {
text-align: left;
}
.address_btn {
background: none;
border: 1rpx solid #0286ff;
color: #0286ff;
font-size: 34rpx;
font-weight: bold;
border-radius: 40rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20rpx;
padding: 8rpx 30rpx;
}
.unit_address {
color: #fff;
background: rgba(2, 134, 255, 1);
}
... ...
// pages/EntryInformation/EntryInformation.js
const app = getApp();
Page({
data: {
sexArray: ['女', '男'],
card_Array: ['身份证', '护照', '出生证', '军官证', '港澳通行证'],
birth_date: '',
addsess_current: 0,
label_list: [],
list: {
name: '',
sex: '',
family_role: '',
money: '',
mobile: '',
birthday: '',
work: '',
work_address: '',
address: '',
mid: 0,
user_status: '',
status_num: '',
text: '',
},
label_ids: [],
familyid: 0, //家庭ID
hasimg: '',
DefId: ''
},
// 打电话
makePhoneCall() {
let that = this;
var list = that.data.list
var phoneNumber = list.mobile
wx.makePhoneCall({
phoneNumber: phoneNumber
})
},
//获取成员详细信息
getUserInfo() {
let that = this;
let url = 'counselor/deflist';
let params = {
DefId: that.data.DefId
}
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
var list = res.data.data.list
if (res.data.data.list.picurl != '') {
this.setData({
hasimg: true
})
}
var label_ids = this.data.label_ids
var label_list = res.data.data.label_list
for (var i = 0; i < label_list.length; i++) {
for (var j = 0; j < label_list[i].data.length; j++) {
if (label_list[i].data[j].status == 1) {
label_ids.push(label_list[i].data[j].id)
}
}
}
var list = res.data.data.list;
list.sex = res.data.data.list.sex;
console.log(list.sex)
that.setData({
list: list,
label_list: res.data.data.label_list,
sex_index: res.data.data.list.sex,
card_index: parseInt(res.data.data.list.user_status) - 1,
addsess_current: res.data.data.list.mid,
label_ids: label_ids
})
}
}).catch((errMsg) => {
console.log(errMsg)
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
DefId: options.DefId,
})
if (options.DefId == undefined) {
this.setData({
DefId: ''
})
} else {
this.setData({
DefId: options.DefId
})
this.getUserInfo();
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--pages/EntryInformation/EntryInformation.wxml-->
<form bindsubmit='listVerify'>
<view class='content_item'>
<view class='item_list'>
<view class='list_title'>
<text>姓名</text>
</view>
<view class='list_input'>
<input type='text' placeholder='' value='{{list.name}}' disabled='true'></input>
</view>
</view>
<view class='item_list'>
<view class='list_title'>
<text>性别</text>
</view>
<view class='list_input'>
<view class='picker' range='{{sexArray}}' value='{{sex_index}}'>
<input placeholder='' value='{{sexArray[sex_index]}}' disabled='true'></input>
</view>
</view>
</view>
<view class='item_list'>
<view class='list_title'>
<text>家庭角色</text>
</view>
<view class='list_input'>
<input type='text' placeholder='' value='{{list.family_role}}' disabled='true' disabled='true'></input>
</view>
</view>
<view class='item_list'>
<view class='list_title'>个人年收入</view>
<view class='list_input'>
<!-- <input type='text' placeholder='' value='{{list.money}}' disabled='true' disabled='true'></input> -->
<text>{{list.money}}</text>
<text>万</text>
</view>
</view>
<view class='item_list' catchtap='makePhoneCall'>
<view class='list_title'>手机号 </view>
<view class='list_input'>
<input type='text' placeholder='' value='{{list.mobile}}' disabled='true' disabled='true'></input>
</view>
</view>
<view class='item_list'>
<view class='list_title'>
<text>出生日期</text>
</view>
<view class='list_input'>
<view class='picker' mode="date" value='{{list.birthday}}'>
<input placeholder='' value='{{list.birthday}}' disabled='true'></input>
</view>
</view>
</view>
<view class='item_list'>
<view class='list_title'>单位名称 </view>
<view class='list_input'>
<input type='text' placeholder='' value='{{list.work}}' disabled='true' disabled='true'></input>
</view>
</view>
<view class='item_list'>
<view class='list_title'>单位地址 </view>
<view class='list_input'>
<input type='text' placeholder='' value='{{list.work_address}}' disabled='true' disabled='true'></input>
</view>
</view>
<view class='item_list' style='align-items:flex-start;'>
<view class='list_title'>家庭地址 </view>
<view class='list_input'>
<textarea type='text' placeholder='' value='{{list.address}}' disabled='true' disabled='true' style='height:120rpx;'></textarea>
</view>
</view>
<view class='item_list'>
<view class='list_title'>通讯地址 </view>
<view class='list_input'>
<view class="address_btn {{addsess_current==1?'unit_address':''}}" data-current='1'>家庭地址</view>
<view class="address_btn {{addsess_current==2?'unit_address':''}}" data-current='2'>单位地址</view>
</view>
</view>
<view class='item_list'>
<view class='list_title'>证件类型</view>
<view class='list_input'>
<view class='picker' range='{{card_Array}}' value='{{card_index}}'>
<input placeholder='' value='{{card_Array[card_index]}}' disabled='true'></input>
</view>
</view>
</view>
<view class='item_list'>
<view class='list_title'>证件号 </view>
<view class='list_input'>
<input type='text' placeholder='' value='{{list.status_num}}' disabled='true'></input>
</view>
</view>
</view>
<view class='box'>
<!-- 上传图片 -->
<view class='upload_box' wx:if='{{list.picurl}}'>
<view class='popup_img' >
<image src='{{list.picurl}}' mode="widthFix"></image>
</view>
</view>
</view>
<view class='content_item'>
<view class='item_list'>
<view class='list_title'>客户描述</view>
</view>
<view class='list_textarea'>
<textarea placeholder='' value='{{list.text}}' placeholder-class='font_color' bindinput='descript' disabled='true'></textarea>
</view>
</view>
<view class='content_item'>
<view class='item_list'>
<view class='list_title' style='width: 100%;text-align: center;'>客户画像</view>
</view>
<view class='item_list item_label_box' wx:for='{{label_list}}' wx:key='' wx:for-index='mindex'>
<view class='list_label_title'>{{item.label}} </view>
<view class='list_label'>
<view class="address_btn {{sub_its.status?'unit_address':''}}" data-id='{{sub_its.id}}' data-status='{{sub_its.status}}' wx:for='{{item.data}}' wx:for-item='sub_its' wx:key='' wx:for-index='sindex' data-sindex='{{sindex}}' data-mindex='{{mindex}}' wx:if='{{sub_its.status!=0}}'>{{sub_its.name}}</view>
</view>
</view>
</view>
<!-- 底部按钮 -->
<!-- <view class='null_box'></view>
<view class='bottom_box'>
<button class='bottom_btn' data-type='complete' formType='submit'>完成</button>
</view> -->
</form>
\ No newline at end of file
... ...
/* pages/my/listDetail/listDetail.wxss */
page {
background: #f5f5fa;
}
.content_item {
background: #fff;
padding: 0 38rpx;
margin-top: 16rpx;
}
.item_list {
display: flex;
align-items: center;
border-bottom: 1rpx dashed #ebebeb;
padding: 23rpx 0;
}
.list_icon {
font-size: 30rpx;
color: #f00;
margin-right: 10rpx;
}
.list_title {
width: 185rpx;
font-size: 29rpx;
color: #000;
}
.list_label_title {
width: 140rpx;
font-size: 29rpx;
color: #000;
}
.project {
background: none;
}
.symbol_icon {
font-size: 27rpx;
color: red;
}
.list_input {
width: 75%;
display: flex;
align-items: center;
font-size: 29rpx;
color: #000;
}
.list_input input {
border: 0;
outline: none;
font-size: 30rpx;
color: #000;
}
.list_input textarea{
overflow: scroll;
}
.list_input .picker {
width: 100%;
height: 53rpx;
font-size: 30rpx;
color: #000;
line-height: 53rpx;
}
.item_label_box {
align-items: flex-start;
}
.list_label {
width: 75%;
display: flex;
align-items: center;
flex-wrap: wrap;
}
.list_label .address_btn {
margin-bottom: 20rpx;
}
.list_textarea {
width: 100%;
}
.list_textarea textarea {
width: 100%;
padding: 30rpx 0;
box-sizing: border-box;
min-height: 140rpx;
}
.font_color {
font-size: 28rpx;
color: #999;
}
.icon-add {
font-size: 32rpx;
color: #ccc;
text-align: center;
padding: 20rpx 0;
}
.icon-jinru {
float: right;
color: #ccc;
}
.item {
justify-content: space-between;
}
.box {
padding: 0 32rpx;
}
.upload_box {
font-size: 28rpx;
color: #1a1a1a;
background: #fff;
margin-top: 16rpx;
text-align: center;
/* padding: 36rpx 0; */
border-radius: 10rpx;
box-shadow: 2rpx 0rpx 3rpx rgba(235, 235, 235, 1);
overflow: hidden;
}
.upload_box .icon-add {
font-size: 64rpx;
}
.popup_img {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.popup_img image {
width: 100%;
}
/* .icon-guanbi {
position: absolute;
top: 10rpx;
right: 20rpx;
color: #ccc;
} */
.upload_box .icon-add {
font-size: 64rpx;
}
.content_info {
font-size: 24rpx;
color: #999;
margin-top: 22rpx;
}
.null_box {
width: 100%;
height: 120rpx;
}
.bottom_box {
width: 100%;
height: 100rpx;
background: rgba(255, 255, 255, 1);
box-shadow: 1rpx 0rpx 1rpx rgba(235, 233, 232, 1);
display: flex;
align-items: center;
justify-content: flex-end;
position: fixed;
bottom: 0;
padding: 0 32rpx;
z-index: 5;
box-sizing: border-box;
}
.bottom_btn {
width: 100%;
height: 80rpx;
font-size: 32rpx;
color: #fff;
background: rgba(2, 134, 255, 1);
border-radius: 44rpx;
display: flex;
align-items: center;
justify-content: center;
}
.add_btn {
width: 260rpx;
height: 80rpx;
font-size: 32rpx;
color: #1a1a1a;
background: #fff;
border: 1rpx solid #ebebeb;
border-radius: 40rpx;
display: flex;
align-items: center;
justify-content: center;
margin-left: 200rpx;
margin-right: 20rpx;
}
.addrisk {
width: 70%;
display: flex;
align-items: center;
justify-content: space-between;
text-align: left;
}
.unit {
text-align: left;
}
.address_btn {
background: none;
border: 1rpx solid #0286ff;
color: #0286ff;
font-size: 32rpx;
border-radius: 40rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20rpx;
padding: 8rpx 30rpx;
}
.unit_address {
color: #fff;
background: rgba(2, 134, 255, 1);
}
... ...
// pages/Program/Program.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
list: [],
temobj: {
name: '',
firm: '',
text: '',
last_state: true,
add_state: false,
input_stete:false
},
},
//获取预设方案列表
getlist() {
let that = this;
// var list=this.data.list
// list.push({
// name: '',
// firm: '',
// text: '',
// id: 0,
// last_state: true
// })
// that.setData({
// list: list
// })
let url = 'counselor/SchemeList';
let params = {
userId: app.globalData.UserId
}
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
var list = res.data.data.list
if (list.length == 0) {
list.push({
name: '',
firm: '',
text: '',
id: 0,
last_state: true
})
that.setData({
list: list
})
} else {
that.setData({
list: res.data.data.list
})
}
that.getLength()
}
}).catch((err) => {
// console.log(err)
})
},
//设置名字
setName(e) {
let that = this;
let list = that.data.list;
let index = e.currentTarget.dataset.index;
list[index].name = e.detail.value;
that.setData({
list: list
})
},
//设置公司名
setFirm(e) {
let that = this;
let list = that.data.list;
let index = e.currentTarget.dataset.index;
list[index].firm = e.detail.value;
that.setData({
list: list
})
},
//保障内容
setText(e) {
let that = this;
let list = that.data.list;
let index = e.currentTarget.dataset.index;
list[index].text = e.detail.value;
that.setData({
list: list
})
},
//添加方案
addPlan(e) {
let that = this;
let list = that.data.list;
let index = e.currentTarget.dataset.index;
list[index].add_state = false
list[index].input_stete=true
this.setData({
list: list
})
let url = 'counselor/SchemeSave';
let params = {
userId: app.globalData.UserId,
schemeId: e.currentTarget.dataset.id,
name: list[index].name,
firm: list[index].firm,
text: list[index].text
}
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
list.push({
name: '',
firm: '',
text: '',
id: 0,
last_state: true,
add_state: false,
input_stete:false
})
that.setData({
list: list
})
that.getLength2();
}
})
},
getLength() {
var list = this.data.list
list[list.length - 1].add_state = true
for (var obj in list) {
if (obj == list.length - 1) {
list[list.length - 1].last_state = false
} else {
list[obj].last_state = true
}
}
this.setData({
list: list
})
},
getLength2() {
// this.getlist()
var list = this.data.list
list[list.length - 1].add_state = true
for (var obj in list) {
if (obj == list.length - 1) {
list[list.length - 1].last_state = false
} else {
list[obj].last_state = true
}
}
this.setData({
list: list
})
},
//保存按钮
del(e) {
let that = this;
let index = e.currentTarget.dataset.index;
let list = that.data.list;
let id = e.currentTarget.dataset.id;
if (list.length != 1) {
wx.showModal({
title: '提示',
content: '是否删除预设方案',
cancelColor: '#000000',
confirmColor: '#3cc51f',
showCancel: true,
cancelText: '取消',
confirmText: '确定',
success(res) {
if (res.confirm) {
let url = 'counselor/SchemeDelete';
let params = {
SchemeId: id
}
app.post(url, params).then((res) => {
// console.log(res)
that.getlist();
})
} else if (res.cancel) {
// console.log('用户点击取消')
}
}
})
} else {
this.setData({
last_state: false
})
}
},
settemname(e) {
let that = this;
let temobj = that.data.temobj;
temobj.name = e.detail.value;
that.setData({
temobj: temobj
})
},
settemfirm(e) {
let that = this;
let temobj = that.data.temobj;
temobj.firm = e.detail.value;
that.setData({
temobj: temobj
})
},
settemtext(e) {
let that = this;
let temobj = that.data.temobj;
temobj.text = e.detail.value;
that.setData({
temobj: temobj
})
},
deltemobj() {
let that = this;
let temobj = {
name: '',
firm: '',
text: '',
}
that.setData({
temobj: temobj
})
},
//保存所有
allsave() {
let that = this;
let list = this.data.list;
console.log(list[list.length - 1].name);
console.log(list[list.length - 1].id)
if (list[list.length - 1].name != '' && list[list.length - 1].id != 0) {
let url = 'counselor/SchemeSave';
let params = {
userId: app.globalData.UserId,
schemeId: list[list.length - 1].id,
name: list[list.length - 1].name,
firm: list[list.length - 1].firm,
text: list[list.length - 1].text
}
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
// wx.showToast({
// title: '添加成功',
// })
wx.navigateBack({
delta: 1
})
}
})
} else {
list.pop()
that.setData({
list: list
})
wx.navigateBack({
})
}
that.getlist();
console.log(that.data.list)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
let that = this;
that.getlist();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
let that = this;
that.getlist();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "方案预设"
}
\ No newline at end of file
... ...
<!--pages/Program/Program.wxml-->
<view wx:for='{{list}}' wx:key>
<view class='line_box'></view>
<view class='content_box'>
<view class='item_list'>
<view>产品名称</view>
<view class='list_input'>
<input placeholder='请输入产品名称' value='{{item.name}}' bindinput='setName' data-index='{{index}}' placeholder-class='pl_style' disabled='{{item.last_state}}'></input>
</view>
</view>
<view class='item_list'>
<view>保险公司</view>
<view class='list_input'>
<input placeholder='请输入保险公司' value='{{item.firm}}' bindinput='setFirm' data-index='{{index}}' placeholder-class='pl_style' disabled='{{item.last_state}}'></input>
</view>
</view>
<view class='item_list'>
<view>保障内容</view>
<view class='list_input'>
<textarea placeholder='请输入保障内容' value='{{item.text}}' bindinput='setText' data-index='{{index}}' placeholder-class='pl_style' disabled='{{item.last_state}}'></textarea>
</view>
</view>
</view>
<view class='list_btn_box'>
<view class='list_btn' bindtap='del' data-id='{{item.id}}' wx:if='{{item.last_state}}'>删除方案</view>
<view class='list_btn add_btn' bindtap='addPlan' data-id='{{item.id}}' data-index='{{index}}' wx:if='{{item.add_state}}'>添加方案</view>
</view>
<!-- <view class='line_box'></view> -->
</view>
<!-- <view wx:if='{{}}'>
<view class='content_box'>
<view class='item_list'>
<view>产品名称</view>
<view class='list_input'>
<input placeholder='请输入产品名称' value='{{temobj.name}}' bindinput='settemname'></input>
</view>
</view>
<view class='item_list'>
<view>保险公司</view>
<view class='list_input'>
<input placeholder='请输入保险公司' value='{{temobj.firm}}' bindinput='settemfirm'></input>
</view>
</view>
<view class='item_list'>
<view>保障内容</view>
<view class='list_input'>
<textarea placeholder='请输入保障内容' value='{{temobj.text}}' bindinput='settemtext'></textarea>
</view>
</view>
</view>
<view class='list_btn_box'>
<view class='list_btn' bindtap='deltemobj'>删除方案</view>
<view class='list_btn add_btn' bindtap='addtemobj'>添加方案</view>
</view>
</view> -->
<view class='bottom_box'>
<view class='save_btn' bindtap='allsave'>保存</view>
</view>
\ No newline at end of file
... ...
/* pages/Program/Program.wxss */
page {
padding: 0 0 150rpx 0;
}
.line_box {
width: 100%;
height: 16rpx;
background: #e5e5e5;
}
.content_box {
padding: 0 30rpx;
}
.item_list {
display: flex;
align-items: flex-start;
font-size: 28rpx;
color: #000;
padding: 25rpx 0;
border-bottom: 1rpx solid #f5f5fa;
}
.list_input {
width: 79%;
margin-left: 30rpx;
font-size: 28rpx;
}
.list_input input {
width: 100%;
border: 0;
outline: none;
padding-bottom: 3rpx;
box-sizing: border-box;
font-size: 28rpx;
}
.list_input textarea {
width: 100%;
height: 200rpx;
padding-top: 10rpx;
font-size: 28rpx;
box-sizing: border-box;
}
.pl_style {
font-size: 28rpx;
color: #999;
}
.list_btn_box {
padding: 13rpx 30rpx;
display: flex;
align-items: center;
justify-content: flex-end;
}
.list_btn {
width: 182rpx;
height: 62rpx;
border: 1rpx solid rgba(226, 226, 226, 1);
border-radius: 30rpx;
font-size: 26rpx;
color: #000;
display: flex;
align-items: center;
justify-content: center;
}
.add_btn {
border: 0;
background: #0286ff;
color: #fff;
margin-left: 20rpx;
}
.bottom_box {
width: 100%;
padding: 30rpx;
position: fixed;
bottom: 0;
left: 0;
box-sizing: border-box;
z-index: 100;
background: #fff;
}
.save_btn {
width: 100%;
height: 88rpx;
background: #0286ff;
border-radius: 44rpx;
font-size: 32rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
}
... ...
// pages/Suggest/Suggest.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
list: []
},
setcontent(e) {
let list = this.data.list;
list.content = e.detail.value;
this.setData({
list: list
})
},
setreprt(e) {
let list = this.data.list;
list.report = e.detail.value;
this.setData({
list: list
})
},
//查看预设建议列表
getAdviseLook() {
let that = this;
let url = 'counselor/AdviseLook';
app.post(url, {
userId: app.globalData.UserId
}).then((res) => {
if (res.data.code == 200) {
that.setData({
list: res.data.data
})
}
}).catch((err) => {
console.log(err)
})
},
save_btn() {
let that = this;
let url = 'counselor/AdviseSave';
let params = {
userId: app.globalData.UserId,
report: that.data.list.report,
advise: that.data.list.content
}
app.post(url, params).then((res) => {
console.log(res)
if (res.data.code == 200) {
wx.showToast({
title: '保存成功',
icon: 'none',
duration: 2000,
})
setTimeout(function() {
wx.navigateBack({
delta: 1,
})
}, 1000)
}
}).catch((err) => {
console.log(err)
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
let that = this;
that.getAdviseLook();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
let that = this;
that.getAdviseLook();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "建议预设"
}
\ No newline at end of file
... ...
<!--pages/Suggest/Suggest.wxml-->
<view class='line_box'></view>
<view class='content_box'>
<view class='list_title'>体检报告预设</view>
<view class='list_input'>
<textarea placeholder='请输入预设的体检报告' placeholder-class='pl_style' value='{{list.content}}' bindinput='setcontent'></textarea>
</view>
</view>
<view class='line_box'></view>
<view class='content_box'>
<view class='list_title'>建议预设</view>
<view class='list_input'>
<textarea placeholder='请输入预设的建议' bindinput='setreprt' placeholder-class='pl_style'
value='{{list.report}}'></textarea>
</view>
</view>
<view class='bottom_box'>
<view class='save_btn' bindtap='save_btn'>保存</view>
</view>
\ No newline at end of file
... ...
/* pages/Suggest/Suggest.wxss */
.line_box {
width: 100%;
height: 16rpx;
background: #e5e5e5;
}
.content_box {
/* margin-top: 16rpx; */
background: #fff;
}
.list_title {
font-size: 30rpx;
font-weight: bold;
color: #1a1a1a;
padding: 25rpx 30rpx;
border-bottom: 1rpx solid #ebebeb;
}
.list_input {
padding: 30rpx;
}
.list_input textarea {
width: 100%;
border: 0;
outline: none;
font-size: 28rpx;
color: #1a1a1a;
}
.pl_style {
font-size: 28rpx;
color: #999999;
}
.bottom_box {
width: 100%;
padding: 30rpx;
position: fixed;
bottom: 0;
left: 0;
box-sizing: border-box;
}
.save_btn {
width: 100%;
height: 88rpx;
background: #0286ff;
border-radius: 44rpx;
font-size: 32rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
}
... ...
// pages/index/TB/TB.js
const app = getApp();
var WxParse = require('../../../wxParse/wxParse.js');
Page({
/**
* 页面的初始数据
*/
data: {
popup_stete: false,
tlist: '',
Page: 0
},
//说明
instructionsInfo() {
this.setData({
popup_stete: true
})
},
//取消弹窗
setpopupflase() {
console.log(1);
this.setData({
popup_stete: false
})
},
//个人中心T币接口
gettlist() {
let that = this;
let url = 'counselor/tlist';
let params = {
UserId: app.globalData.UserId,
Page: that.data.Page
}
app.post(url, params).then((res) => {
console.log(res);
if (res.data.code == 200) {
that.setData({
tlist: res.data.data
})
}
}).catch((err) => {
console.log(err)
})
},
//TB信息内容接口
aboutTB() {
let that = this;
let url = 'pubilc/about';
app.post(url, {
AboutType: 10
}).then((res) => {
if (res.data.code == 200) {
console.log(res)
console.log(res.data.data.post_content)
WxParse.wxParse('content', 'html', res.data.data.post_content, that, 5);
}
}).catch((err) => {
console.log(err)
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
let that = this;
that.gettlist();
that.aboutTB();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "T币"
}
\ No newline at end of file
... ...
<!--pages/my/myConsultantPersonalCentre/myConsultantPersonalCentre.wxml-->
<view class='banner_box'>
<view class='banner_title'>
<view>我的T币</view>
<view bindtap='instructionsInfo'>
<text class='iconfont icon-shuoming'></text>
<text>说明</text>
</view>
</view>
<view class='money'>{{tlist.balance}}</view>
</view>
<view class="content_item">
<view class='content_title'>
<text class='iconfont icon-jiaoyijilu'></text>
<text>交易记录</text>
</view>
<view class='scroll_box'>
<scroll-view scroll-y>
<view class="item_list" wx:for='{{tlist.payllist}}' wx:key>
<view class="list_content">
<view>{{item.description}}</view>
</view>
<view class='list_info'>
<view class=" ">{{item.text}}</view>
<view class=" ">{{item.time}}</view>
</view>
</view>
</scroll-view>
</view>
</view>
<view class='mask_box' wx:if="{{popup_stete}}" bindtap='setpopupflase'>
<view class='tri'></view>
<view class='popup_box' catchtap='funvoid'>
<import src="../../../wxParse/wxParse.wxml" />
<template is="wxParse" data="{{wxParseData:content.nodes}}" />
</view>
</view>
\ No newline at end of file
... ...
/* pages/my/myConsultantPersonalCentre/myConsultantPersonalCentre.wxss */
page {
background-color: #f5f5fa;
}
.banner_box {
width: 100%;
height: 300rpx;
background-color: #0c8aff;
padding: 32rpx 34rpx;
box-sizing: border-box;
position: fixed;
top: 0;
left: 0;
z-index: 10;
}
.banner_title {
font-size: 26rpx;
color: #ffff;
display: flex;
justify-content: space-between;
align-items: center;
}
.icon-shuoming {
margin-right: 10rpx;
}
.money {
font-size: 120rpx;
color: #fff;
margin-top: 75rpx;
}
.content_item {
background-color: #fff;
overflow: hidden;
position: relative;
margin-top: 320rpx;
}
.content_title {
font-size: 26rpx;
color: #0286ff;
margin: 33rpx 0 20rpx 33rpx;
}
.icon-jiaoyijilu {
margin-right: 11rpx;
}
.item_list {
font-size: 30rpx;
color: #1a1a1a;
display: flex;
justify-content: space-between;
align-items: flex-start;
border-bottom: 1rpx solid #ebebeb;
padding: 33rpx 35rpx;
}
.mask_box {
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.8);
position: fixed;
top: 0;
left: 0;
z-index: 100;
}
.popup_box {
width: 85%;
font-size: 28rpx;
color: #1a1a1a;
background: rgba(255, 255, 255, 1);
border-radius: 10rpx;
box-shadow: 0rpx 0rpx 5rpx rgba(0, 0, 0, 0.08);
padding: 21rpx;
position: fixed;
top: 78rpx;
left: 50%;
transform: translateX(-50%);
}
.tri {
position: absolute;
top: 68rpx;
right: 84rpx;
width: 0;
height: 0;
border-left: 16rpx solid transparent;
border-right: 16rpx solid transparent;
border-bottom: 10rpx solid #fff;
}
.list_info {
text-align: right;
}
... ...
// pages/VipRecharge/VipRecharge.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
viplist: [],
toplist: [],
mainlist: []
},
//选择支付方式
buyWay(e) {
wx.navigateTo({
url: '../payWay/payWay?id=' + e.currentTarget.id + '&moneyt=' + e.currentTarget.dataset.moneyt + '&money=' + e.currentTarget.dataset.money,
})
},
getvip() {
let that = this;
let url = 'counselor/vip';
app.post(url, {}).then((res) => {
console.log(res)
if (res.data.code == 200) {
let viplist = res.data.data.viplist;
let toplist = [];
let mainlist = [];
for (let obj of viplist) {
if (obj.status == 1) {
mainlist.push(obj)
} else if (obj.status == 2) {
toplist.push(obj)
}
}
that.setData({
viplist: viplist,
toplist: toplist,
mainlist: mainlist
})
}
}).catch((err) => {
console.log(err)
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
let that = this;
that.getvip();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "会员充值"
}
\ No newline at end of file
... ...
<view class='content_box'>
<view class='banner_box'>
<view class='banner_img'>
<image src='/images/ele@2x.png'></image>
</view>
<text class='banner_info'>{{toplist[0].t_title}}</text>
<view class='banner_title'>{{toplist[0].title}}</view>
<!-- <view class='banner_content'>完成新手任务,赠送{{toplist[0].title}}</view> -->
<view class='banner_content'>{{toplist[0].t_text}}</view>
<navigator class='list_btn' hover-class="navigator-hover" url='/pages/index/payWay/payWay?id={{toplist[0].id}}&moneyt={{toplist[0].moneyt}}&title={{toplist[0].title}}&money={{toplist[0].backt}}'>立即购买</navigator>
</view>
<view class='item_list_box'>
<view class="item_list {{(index+1)%2==0?'year_list':''}}" wx:for='{{mainlist}}' wx:key>
<view class='list_title'>{{item.title}}</view>
<view class='list_content'>
<text>优惠价{{item.money}}</text>
<text>或{{item.moneyt}}T币</text>
</view>
<navigator class='list_btn month_card' hover-class="navigator-hover"
url='/pages/index/payWay/payWay?id={{item.id}}&moneyt={{item.moneyt}}&title={{item.title}}&money={{item.backt}}' >立即购买</navigator>
</view>
</view>
</view>
\ No newline at end of file
... ...
page {
background: #f5f5fa;
}
.content_box {
padding: 49rpx 30rpx 30rpx 30rpx;
}
.banner_box {
width: 100%;
min-height: 317rpx;
padding: 40rpx;
background: linear-gradient(-30deg, rgba(75, 135, 243, 1), rgba(83, 147, 250, 1));
box-shadow: 0rpx 15rpx 30rpx 0rpx rgba(75, 135, 243, 0.24);
border-radius: 16rpx;
box-sizing: border-box;
position: relative;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.banner_info {
font-size: 26rpx;
font-weight: bold;
color: #fff;
position: absolute;
left: 50%;
top: -20rpx;
transform: translateX(-50%);
z-index: 20;
}
.banner_img {
width: 300rpx;
height: 55rpx;
position: absolute;
left: 50%;
top: -20rpx;
transform: translateX(-50%);
z-index: 10;
}
.banner_img image {
width: 100%;
height: 100%;
}
.banner_title {
font-size: 36rpx;
font-weight: bold;
color: #fff;
}
.banner_content {
font-size: 28rpx;
color: #fff;
margin: 30rpx 0;
}
.item_list_box {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
margin-top: 36rpx;
}
.item_list {
width: 326rpx;
height: 225rpx;
background: linear-gradient(-30deg, rgba(255, 92, 46, 1), rgba(255, 152, 116, 1));
box-shadow: 0rpx 15rpx 30rpx 0rpx rgba(75, 135, 243, 0.24);
border-radius: 16rpx;
box-sizing: border-box;
position: relative;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin-bottom: 36rpx;
}
.list_title {
font-size: 30rpx;
color: #fff;
}
.list_content {
font-size: 28rpx;
color: #fff;
margin: 20rpx 0;
}
.list_btn {
font-size: 28rpx;
color: #508ef7;
background: #fff;
border-radius: 30rpx;
padding: 10rpx 30rpx;
}
.month_card {
color: #ff6b40;
}
.year_list {
background: linear-gradient(to right, #f7a80a, #fcc200);
}
.year_card {
color: #e7ad27;
}
... ...
// pages/index/about/about.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{}
\ No newline at end of file
... ...
<!--pages/index/about/about.wxml-->
<text>pages/index/about/about.wxml</text>
... ...
/* pages/index/about/about.wxss */
\ No newline at end of file
... ...