作者 李洪娟

上传

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

要显示太多修改。

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

  1 +//app.js
  2 +import md5 from 'utils/md5.js';
  3 +App({
  4 + post: function(url, data) {
  5 + wx.showNavigationBarLoading()
  6 + wx.showLoading({
  7 + title: '加载中',
  8 + })
  9 + var promise = new Promise((resolve, reject) => {
  10 + let that = this;
  11 + let postData = data;
  12 + let baseUrl = 'https://insurance.w.broteam.cn/';
  13 + wx.request({
  14 + url: baseUrl + url,
  15 + data: postData,
  16 + method: 'POST',
  17 + header: {
  18 + 'content-type': 'application/x-www-form-urlencoded'
  19 + },
  20 + success: function(res) {
  21 + resolve(res)
  22 + wx.hideLoading()
  23 + wx.hideNavigationBarLoading()
  24 + },
  25 + fail: function(e) {
  26 + reject('');
  27 + wx.hideLoading()
  28 + wx.hideNavigationBarLoading()
  29 + wx.showModal({
  30 + title: '',
  31 + content: res.data.msg,
  32 + showCancel: false
  33 + })
  34 + }
  35 + })
  36 + });
  37 + return promise;
  38 + console.log(promise)
  39 + },
  40 + formCollect(id) {
  41 + let url = 'sign/formid'
  42 + let params = {
  43 + formid: id,
  44 + openid: wx.getStorageSync('openId')
  45 + }
  46 + this.post(url, params).then((res) => {
  47 + console.log(res)
  48 + }).catch((errMsg) => {
  49 +
  50 + })
  51 + },
  52 + nowDate() {
  53 + let date = new Date();
  54 + let month = date.getMonth() + 1;
  55 + let day = date.getDate();
  56 + return date.getFullYear() + '-' + (month > 9 ? month : ('0' + month)) + '-' + (day > 9 ? day : ('0' + day));
  57 + },
  58 + initDate(a) {
  59 + let date1 = new Date();
  60 + let time1 = date1.getFullYear() + "-" + (date1.getMonth() + 1) + "-" + date1.getDate();
  61 + let date2 = new Date(date1);
  62 + date2.setDate(date1.getDate() + a);
  63 + let time2 = date2.getFullYear() + "-" + (date2.getMonth() + 1) + "-" + date2.getDate();
  64 + return time2;
  65 + },
  66 + // 数组移除指定元素
  67 + arryRemove(arr, item) {
  68 + return arr.filter(function(ele) {
  69 + return ele != item;
  70 + })
  71 + },
  72 + strTime(strtime) {
  73 + let str = 'bronet' + strtime + 'beijing'
  74 + return md5(md5(str))
  75 + },
  76 +
  77 + onLaunch() {
  78 + var that=this
  79 + wx.login({
  80 + success: (res) => {
  81 + let url = 'pubilc/sign';
  82 + let params = {
  83 + code: res.code,
  84 + status: ''
  85 + }
  86 + that.post(url, params).then((res) => {
  87 + console.log(res)
  88 + // console.log('start', res.data.data.UserType, res.data.data.checkstatus, res.data.data.PublishId)
  89 +
  90 + }).catch((errMsg) => {
  91 + console.log(errMsg)
  92 + })
  93 + }
  94 + });
  95 + },
  96 +
  97 +
  98 +
  99 + globalData: {
  100 + userInfo: null,
  101 + OpenId: '', //用户openid
  102 + UserId: '', //用户userid
  103 + UserType: '', //用户类型(2为普通会员,3为顾问,4为推广)
  104 + checkstatus: '', //分享参数(0为无分享参数,1为保单分享,2为注册分享,3为文章分享)
  105 + UserStatus: '', //用户状态(1初次登录需要授权操作,2多次登录不需要授权)
  106 + PublishId: '', //如果是保单分享返回保单id
  107 + NewsId: '', //如果是文章分享返回文章id
  108 + temp_UserType: '',
  109 + user_index: '',
  110 + }
  111 +})
  1 +{
  2 + "pages": [
  3 + "pages/start/start",
  4 + "pages/index/verigyCode/verigyCode",
  5 + "pages/index/summaryList2/summaryList2",
  6 + "pages/index/register/register",
  7 + "pages/about/about",
  8 + "pages/index/personalPolicyList/personalPolicyList",
  9 + "pages/index/agreement/agreement",
  10 + "pages/index/browseRecordDetail/browseRecordDetail",
  11 + "pages/index/consultantList/consultantList",
  12 + "pages/index/periodicReviews/periodicReviews",
  13 + "pages/index/CustomerManagement/CustomerManagement",
  14 + "pages/index/ArticleDetails/ArticleDetails",
  15 + "pages/index/reportList/reportList",
  16 + "pages/index/reportList2/reportList2",
  17 + "pages/index/editProfile/editProfile",
  18 + "pages/index/editProfile2/editProfile2",
  19 + "pages/index/policyList/policyList",
  20 + "pages/index/policyListDetail/policyListDetail",
  21 + "pages/index/policyManage/policyManage",
  22 + "pages/index/addListDetail/addListDetail",
  23 + "pages/index/personInfo/personInfo",
  24 + "pages/index/addNewFamily/addNewFamily",
  25 + "pages/index/smartRemind/smartRemind",
  26 + "pages/index/VipRecharge/VipRecharge",
  27 + "pages/index/twoCode/twoCode",
  28 + "pages/index/share/share",
  29 + "pages/index/inviteList/inviteList",
  30 + "pages/index/payWay/payWay",
  31 + "pages/index/addLog/addLog",
  32 + "pages/index/remind/remind",
  33 + "pages/index/summaryList/summaryList",
  34 + "pages/index/learnShare/learnShare",
  35 + "pages/index/EntryInformation2/EntryInformation2",
  36 + "pages/index/EntryInformation/EntryInformation",
  37 + "pages/index/Program/Program",
  38 + "pages/index/Suggest/Suggest",
  39 + "pages/index/articleBrowseRecord/articleBrowseRecord",
  40 + "pages/index/browseRecord/browseRecord",
  41 + "pages/index/TB/TB",
  42 + "pages/index/index",
  43 + "pages/personalCenter/personalCenter"
  44 +
  45 + ],
  46 + "window": {
  47 + "backgroundTextStyle": "light",
  48 + "navigationBarBackgroundColor": "#0286FF",
  49 + "navigationBarTitleText": "保单体检专家",
  50 + "navigationBarTextStyle": "white"
  51 + },
  52 + "tabBar": {
  53 + "color": "#666666",
  54 + "selectedColor": "#487AFF",
  55 + "borderStyle": "black",
  56 + "backgroundColor": "#fff",
  57 + "list": [
  58 + {
  59 + "pagePath": "pages/index/index",
  60 + "text": "首页",
  61 + "iconPath": "/images/nav01@2x.png",
  62 + "selectedIconPath": "/images/nav02@2x.png"
  63 + },
  64 + {
  65 + "pagePath": "pages/about/about",
  66 + "text": "关于",
  67 + "iconPath": "/images/nav03@2x.png",
  68 + "selectedIconPath": "/images/nav04@2x.png"
  69 + },
  70 + {
  71 + "pagePath": "pages/personalCenter/personalCenter",
  72 + "text": "我的",
  73 + "iconPath": "/images/nav05@2x.png",
  74 + "selectedIconPath": "/images/nav06@2x.png"
  75 + }
  76 + ]
  77 + },
  78 + "sitemapLocation": "sitemap.json"
  79 +}
  1 +.no_data {
  2 + color: #999;
  3 + font-size: 36rpx;
  4 + text-align: center;
  5 + width: 100%;
  6 + height: 100%;
  7 + position: fixed;
  8 + left: 0;
  9 + top: 0;
  10 + display: flex;
  11 + align-items: center;
  12 + justify-content: center;
  13 +}
  14 +
  15 +button {
  16 + border-radius: 0;
  17 +}
  18 +
  19 +button::after {
  20 + border: 0;
  21 + border-radius: 0;
  22 +}
  23 +
  24 +/* iconfont */
  25 +
  26 +@font-face {
  27 + font-family: 'iconfont'; /* project id 926819 */
  28 + src: url('//at.alicdn.com/t/font_926819_2olbhnsznao.eot');
  29 + src: url('//at.alicdn.com/t/font_926819_2olbhnsznao.eot?#iefix') format('embedded-opentype'),
  30 + url('//at.alicdn.com/t/font_926819_2olbhnsznao.woff2') format('woff2'),
  31 + url('//at.alicdn.com/t/font_926819_2olbhnsznao.woff') format('woff'),
  32 + url('//at.alicdn.com/t/font_926819_2olbhnsznao.ttf') format('truetype'),
  33 + url('//at.alicdn.com/t/font_926819_2olbhnsznao.svg#iconfont') format('svg');
  34 +}
  35 +
  36 +.iconfont {
  37 + font-family: "iconfont" !important;
  38 + font-size: 16px;
  39 + font-style: normal;
  40 + -webkit-font-smoothing: antialiased;
  41 + -moz-osx-font-smoothing: grayscale;
  42 +}
  43 +
  44 +.icon-chongzhi:before {
  45 + content: "\e606";
  46 +}
  47 +
  48 +.icon-bi:before {
  49 + content: "\e60a";
  50 +}
  51 +
  52 +.icon-renzheng:before {
  53 + content: "\e646";
  54 +}
  55 +
  56 +.icon-anquan:before {
  57 + content: "\e63c";
  58 +}
  59 +
  60 +.icon-listpress:before {
  61 + content: "\e627";
  62 +}
  63 +
  64 +.icon-xiala1:before {
  65 + content: "\e61c";
  66 +}
  67 +
  68 +.icon-baodanyuhetong:before {
  69 + content: "\e642";
  70 +}
  71 +
  72 +.icon-shu:before {
  73 + content: "\e645";
  74 +}
  75 +
  76 +.icon-fenxiang2:before {
  77 + content: "\e620";
  78 +}
  79 +
  80 +.icon-fangxingxuanzhongfill:before {
  81 + content: "\e721";
  82 +}
  83 +
  84 +.icon-bianji:before {
  85 + content: "\e6b4";
  86 +}
  87 +
  88 +.icon-zhaoxiangji1:before {
  89 + content: "\e663";
  90 +}
  91 +
  92 +.icon-xuanzhong2:before {
  93 + content: "\e62b";
  94 +}
  95 +
  96 +.icon-guanyuwomen:before {
  97 + content: "\e61e";
  98 +}
  99 +
  100 +.icon-ren-copy:before {
  101 + content: "\e600";
  102 +}
  103 +
  104 +.icon-xuanzhong:before {
  105 + content: "\e61a";
  106 +}
  107 +
  108 +.icon-artboard61:before {
  109 + content: "\e788";
  110 +}
  111 +
  112 +.icon-jinru:before {
  113 + content: "\e618";
  114 +}
  115 +
  116 +.icon-kehu:before {
  117 + content: "\e613";
  118 +}
  119 +
  120 +.icon-jiating1:before {
  121 + content: "\e81d";
  122 +}
  123 +
  124 +.icon-wuuiconxiangjifangda:before {
  125 + content: "\e623";
  126 +}
  127 +
  128 +.icon-guwen:before {
  129 + content: "\e61d";
  130 +}
  131 +
  132 +.icon-tianjia:before {
  133 + content: "\e648";
  134 +}
  135 +
  136 +.icon-xiala:before {
  137 + content: "\e619";
  138 +}
  139 +
  140 +.icon-icon-test:before {
  141 + content: "\e72e";
  142 +}
  143 +
  144 +.icon-fangkuang:before {
  145 + content: "\e629";
  146 +}
  147 +
  148 +.icon-jiating:before {
  149 + content: "\e73d";
  150 +}
  151 +
  152 +.icon-jiaoyijilu:before {
  153 + content: "\e638";
  154 +}
  155 +
  156 +.icon-jinbi:before {
  157 + content: "\e672";
  158 +}
  159 +
  160 +.icon-bianji1:before {
  161 + content: "\e68a";
  162 +}
  163 +
  164 +.icon-mingdanguanli:before {
  165 + content: "\e658";
  166 +}
  167 +
  168 +.icon-renzheng1:before {
  169 + content: "\e62a";
  170 +}
  171 +
  172 +.icon-dkw_wode-:before {
  173 + content: "\e60e";
  174 +}
  175 +
  176 +.icon-guanbi2:before {
  177 + content: "\e60f";
  178 +}
  179 +
  180 +.icon-qiehuan:before {
  181 + content: "\e630";
  182 +}
  183 +
  184 +.icon-wenjian:before {
  185 + content: "\e67d";
  186 +}
  187 +
  188 +.icon-xuanzhongyuandian:before {
  189 + content: "\e624";
  190 +}
  191 +
  192 +.icon-sousuo:before {
  193 + content: "\e617";
  194 +}
  195 +
  196 +.icon-xuanze:before {
  197 + content: "\e6c3";
  198 +}
  199 +
  200 +.icon-sousuo1:before {
  201 + content: "\e632";
  202 +}
  203 +
  204 +.icon-yuan:before {
  205 + content: "\e622";
  206 +}
  207 +
  208 +.icon-YDUI-naozhong:before {
  209 + content: "\e65d";
  210 +}
  211 +
  212 +.icon-ren:before {
  213 + content: "\e6d9";
  214 +}
  215 +
  216 +.icon-ziliao:before {
  217 + content: "\e603";
  218 +}
  219 +
  220 +.icon-kehuguanli-copy-copy:before {
  221 + content: "\e63a";
  222 +}
  223 +
  224 +.icon-add:before {
  225 + content: "\e604";
  226 +}
  227 +
  228 +.icon-baodanxinxi:before {
  229 + content: "\e602";
  230 +}
  231 +
  232 +.icon-hengxian1:before {
  233 + content: "\e626";
  234 +}
  235 +
  236 +.icon-riqi:before {
  237 + content: "\ea1a";
  238 +}
  239 +
  240 +.icon-tijian:before {
  241 + content: "\e605";
  242 +}
  243 +
  244 +.icon-qiehuan1:before {
  245 + content: "\e62c";
  246 +}
  247 +
  248 +.icon-hengxian:before {
  249 + content: "\e657";
  250 +}
  251 +
  252 +.icon-gouwuche:before {
  253 + content: "\e609";
  254 +}
  255 +
  256 +.icon-yaoqing:before {
  257 + content: "\e60b";
  258 +}
  259 +
  260 +.icon-guanbi:before {
  261 + content: "\e621";
  262 +}
  263 +
  264 +.icon-xiazai:before {
  265 + content: "\e625";
  266 +}
  267 +
  268 +.icon-qiehuan2:before {
  269 + content: "\e643";
  270 +}
  271 +
  272 +.icon-fenxiang:before {
  273 + content: "\e62e";
  274 +}
  275 +
  276 +.icon-xuexi:before {
  277 + content: "\e61b";
  278 +}
  279 +
  280 +.icon-baogao:before {
  281 + content: "\e639";
  282 +}
  283 +
  284 +.icon-weixinzhifu:before {
  285 + content: "\e647";
  286 +}
  287 +
  288 +.icon-dianhua:before {
  289 + content: "\e67c";
  290 +}
  291 +
  292 +.icon-xiugai:before {
  293 + content: "\e607";
  294 +}
  295 +
  296 +.icon-xuanzhong1:before {
  297 + content: "\e61f";
  298 +}
  299 +
  300 +.icon-guanli:before {
  301 + content: "\e6e3";
  302 +}
  303 +
  304 +.icon-tixian:before {
  305 + content: "\e62d";
  306 +}
  307 +
  308 +.icon-shang:before {
  309 + content: "\e611";
  310 +}
  311 +
  312 +.icon-rizhi:before {
  313 + content: "\e614";
  314 +}
  315 +
  316 +.icon-baogao1:before {
  317 + content: "\e62f";
  318 +}
  319 +
  320 +.icon-jisuanqi:before {
  321 + content: "\e608";
  322 +}
  323 +
  324 +.icon-jiatingzhanghu:before {
  325 + content: "\e615";
  326 +}
  327 +
  328 +.icon-shuoming:before {
  329 + content: "\e633";
  330 +}
  331 +
  332 +.icon-nav:before {
  333 + content: "\e601";
  334 +}
  335 +
  336 +.icon-xuanzhongkuang:before {
  337 + content: "\e628";
  338 +}
  339 +
  340 +.icon-ling:before {
  341 + content: "\e8bf";
  342 +}
  343 +
  344 +.icon-dianhua2:before {
  345 + content: "\e649";
  346 +}
  347 +
  348 +.icon-fangan:before {
  349 + content: "\e60c";
  350 +}
  351 +
  352 +.icon-fenxiang1:before {
  353 + content: "\e634";
  354 +}
  355 +
  356 +.icon-gray-crown:before {
  357 + content: "\e60d";
  358 +}
  359 +
  360 +.icon-shanchu1:before {
  361 + content: "\e616";
  362 +}
  363 +
  364 +.icon-kakou:before {
  365 + content: "\e660";
  366 +}
  367 +
  368 +.icon-shezhi:before {
  369 + content: "\e610";
  370 +}
  371 +
  372 +.icon-jianyi:before {
  373 + content: "\e696";
  374 +}
  375 +
  376 +.icon-zhuanfa:before {
  377 + content: "\e783";
  378 +}
  379 +
  380 +.icon-shanchu:before {
  381 + content: "\e67b";
  382 +}
  383 +
  384 +.icon-danjiantou:before {
  385 + content: "\e612";
  386 +}
  1 +// pages/about/about.js
  2 +const app = getApp()
  3 +var WxParse = require('../../wxParse/wxParse.js');
  4 +Page({
  5 +
  6 + /**
  7 + * 页面的初始数据
  8 + */
  9 + data: {
  10 + aboutdata: {
  11 + picurl: '',
  12 + title: ''
  13 + }
  14 + },
  15 +
  16 +
  17 +
  18 +
  19 +
  20 + getaboutdata() {
  21 + let that = this;
  22 + let url = 'pubilc/about';
  23 + let aboutdata = that.data.aboutdata;
  24 + app.post(url, {
  25 + AboutType: 9
  26 + }).then((res) => {
  27 + console.log(res.data)
  28 + if (res.data.code == 200) {
  29 + aboutdata.picurl = res.data.data.picurl;
  30 + aboutdata.title = res.data.data.title;
  31 + that.setData({
  32 + aboutdata: aboutdata,
  33 + })
  34 + WxParse.wxParse('content', 'html', res.data.data.post_content, that, 5);
  35 + }
  36 + }).catch((errMsg) => {
  37 + console.log(errMsg)
  38 + })
  39 + },
  40 +
  41 + /**
  42 + * 生命周期函数--监听页面加载
  43 + */
  44 + onLoad: function(options) {
  45 + this.getaboutdata();
  46 + },
  47 +
  48 + /**
  49 + * 生命周期函数--监听页面初次渲染完成
  50 + */
  51 + onReady: function() {
  52 +
  53 + },
  54 +
  55 + /**
  56 + * 生命周期函数--监听页面显示
  57 + */
  58 + onShow: function() {
  59 +
  60 + },
  61 +
  62 + /**
  63 + * 生命周期函数--监听页面隐藏
  64 + */
  65 + onHide: function() {
  66 +
  67 + },
  68 +
  69 + /**
  70 + * 生命周期函数--监听页面卸载
  71 + */
  72 + onUnload: function() {
  73 +
  74 + },
  75 +
  76 + /**
  77 + * 页面相关事件处理函数--监听用户下拉动作
  78 + */
  79 + onPullDownRefresh: function() {
  80 +
  81 + },
  82 +
  83 + /**
  84 + * 页面上拉触底事件的处理函数
  85 + */
  86 + onReachBottom: function() {
  87 +
  88 + },
  89 +
  90 + /**
  91 + * 用户点击右上角分享
  92 + */
  93 + onShareAppMessage: function() {
  94 +
  95 + }
  96 +})
  1 +{
  2 + "navigationBarTitleText": "关于保单体检专家"
  3 +}
  1 +<!--pages/about/about.wxml-->
  2 +<!-- <view class='topimg'>
  3 + <image src='{{aboutdata.picurl}}'></image>
  4 +</view> -->
  5 +<view class='content'>
  6 + <!-- <view class='title'>{{aboutdata.title}}</view> -->
  7 + <view class='main'>
  8 + <import src="../../wxParse/wxParse.wxml" />
  9 + <template is="wxParse" data="{{wxParseData:content.nodes}}" />
  10 + </view>
  11 +</view>
  1 +/* pages/about/about.wxss */
  2 +.topimg{
  3 + height:376rpx;
  4 + width:100%;
  5 + box-sizing: border-box;
  6 + overflow: hidden;
  7 +}
  8 +.topimg image{
  9 + width:100%;
  10 + height: 100%;
  11 +}
  12 +.content{
  13 + /* padding:32rpx 32rpx 0 32rpx; */
  14 + text-align: center;
  15 +}
  16 +.title{
  17 + color:#000;
  18 + font-size:30rpx;
  19 + margin:0 0 32rpx 0;
  20 +}
  21 +.main{
  22 + text-align: left;
  23 + font-size:26rpx;
  24 + color:rgba(0,0,0,1);
  25 + line-height:44rpx;
  26 +}
  27 +.wxParse-p{
  28 + /* display:flex; */
  29 + /* flex-direction: column;
  30 + justify-content: center; */
  31 +
  32 +}
  33 +.wxParse-p image{
  34 + display:block;
  35 + width:750rpx!important;
  36 +
  37 +
  38 + box-sizing: border-box
  39 +}
  1 +// pages/indexs/article_details/article_details.js
  2 +const app = getApp();
  3 +var WxParse = require('../../../wxParse/wxParse.js');
  4 +Page({
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + NewsId: '', //文章ID
  10 + GoId: '', //分享人id
  11 + articleDetail: [], //文章详情内容
  12 + share_num: '',
  13 + UserId: '',
  14 + UserType: '',
  15 + show_state: false,
  16 + state:false
  17 + },
  18 + goIndex() {
  19 + wx.switchTab({
  20 + url: '/pages/index/index',
  21 + })
  22 + },
  23 + //文章详情
  24 + listDetail() {
  25 + let url = 'pubilc/content';
  26 + let that = this;
  27 + app.post(url, {
  28 + NewsId: that.data.NewsId,
  29 + UserId: app.globalData.UserId,
  30 + GoId: that.data.GoId
  31 + }).then((res) => {
  32 + if (res.data.code == 200) {
  33 + console.log(res);
  34 + that.setData({
  35 + articleDetail: res.data.data
  36 + })
  37 + var content = res.data.data.content
  38 + WxParse.wxParse('content', 'html', content, that, 5);
  39 + }
  40 + }).catch((errMsg) => {
  41 + console.log(errMsg)
  42 + })
  43 + },
  44 +
  45 + //注册顾问
  46 + goRegister() {
  47 + wx.navigateTo({
  48 + url: '/pages/index/register/register',
  49 + })
  50 + },
  51 +
  52 + //查看顾问详情
  53 + goDetail(e) {
  54 + var CounselorId = this.data.GoId
  55 + console.log(222, CounselorId)
  56 + wx.navigateTo({
  57 + url: '/pages/index/editProfile2/editProfile2?CounselorId=' + CounselorId,
  58 + })
  59 + },
  60 +
  61 + //有奖分享
  62 + prizeshare() {
  63 + var that = this;
  64 + let url = 'pubilc/sharetext';
  65 + app.post(url, {
  66 + UserId: app.globalData.UserId
  67 + }).then((res) => {
  68 + console.log('4567',res)
  69 + if (res.data.code == 200) {
  70 + this.setData({
  71 + share_num: res.data.data.share_num
  72 + })
  73 + wx.showLoading();
  74 + wx.hideLoading();
  75 + setTimeout(() => {
  76 + if (this.data.share_num == 0) {
  77 + wx.showToast({
  78 + title: '今日分享获得TB次数以达到上限',
  79 + icon: 'none',
  80 + duration: 2000,
  81 + })
  82 + }
  83 + setTimeout(() => {
  84 + wx.hideToast();
  85 + }, 2000)
  86 + }, 0);
  87 + }
  88 + }).catch((errMsg) => {
  89 +
  90 + })
  91 + },
  92 +
  93 + /**
  94 + * 生命周期函数--监听页面加载
  95 + */
  96 + onLoad: function(options) {
  97 + console.log(options)
  98 +
  99 + let that = this;
  100 + that.setData({
  101 + NewsId: options.NewsId,
  102 + UserId: app.globalData.UserId,
  103 + GoId: options.GoId,
  104 + UserType: app.globalData.UserType,
  105 + show_state: options.show_state
  106 + })
  107 +
  108 + console.log('aa', that.data.show_state);
  109 + console.log('123', that.data.GoId);
  110 + console.log('456', that.data.UserType)
  111 +
  112 +
  113 + that.listDetail();
  114 +
  115 + },
  116 +
  117 + /**
  118 + * 生命周期函数--监听页面初次渲染完成
  119 + */
  120 + onReady: function() {
  121 +
  122 + },
  123 +
  124 + /**
  125 + * 生命周期函数--监听页面显示
  126 + */
  127 + onShow: function() {
  128 + // this.listDetail()
  129 + },
  130 +
  131 + /**
  132 + * 生命周期函数--监听页面隐藏
  133 + */
  134 + onHide: function() {
  135 +
  136 + },
  137 +
  138 + /**
  139 + * 生命周期函数--监听页面卸载
  140 + */
  141 + onUnload: function() {
  142 +
  143 + },
  144 +
  145 + /**
  146 + * 页面相关事件处理函数--监听用户下拉动作
  147 + */
  148 + onPullDownRefresh: function() {
  149 +
  150 + },
  151 +
  152 + /**
  153 + * 页面上拉触底事件的处理函数
  154 + */
  155 + onReachBottom: function() {
  156 +
  157 + },
  158 +
  159 + /**
  160 + * 用户点击右上角分享
  161 + */
  162 + onShareAppMessage: function(options) {
  163 + let that=this;
  164 + let show_state=''
  165 + // console.log(options)
  166 + console.log(app.globalData.UserType)
  167 + if (app.globalData.UserType == 2) {
  168 + that.setData({
  169 + state:false
  170 + })
  171 +
  172 + }else{
  173 +
  174 + that.setData({
  175 + state: true
  176 + })
  177 +
  178 + }
  179 +
  180 + console.log(that.data.show_state)
  181 + this.prizeshare()
  182 + var shareObj = {
  183 + title: options.target.dataset.title, // 默认是小程序的名称(可以写slogan等)
  184 + path: '/pages/start/start?status=' + options.target.dataset.status + '&GoId=' + app.globalData.UserId + '' + '&show_state=' + that.data.state + '&NewsId' + this.data.NewsId,
  185 + imgUrl: '',
  186 + }  
  187 +
  188 + // if (options.from == 'button') {
  189 + // // 此处可以修改 shareObj 中的内容
  190 + // shareObj.path = '/pages/start/start?status=' + options.target.dataset.status
  191 + // }  
  192 +
  193 + return shareObj;
  194 + }
  195 +
  196 +})
  1 +{
  2 + "navigationBarTitleText": "文章详情"
  3 +}
  1 +<!--pages/personalCenter/personalCenter.wxml-->
  2 +<import src="../../../wxParse/wxParse.wxml" />
  3 +<view class='go_index' bindtap="goIndex" wx:if="{{GoId!=''}}">回到首页</view>
  4 +<view class='content_box'>
  5 + <view class='list_title'>{{articleDetail.title}}</view>
  6 + <view class='list_info_box'>
  7 + <text>{{articleDetail.writer}}</text>
  8 + <text class='line'></text>
  9 + <text> {{articleDetail.source}}</text>
  10 + <text class='line'></text>
  11 + <text> {{articleDetail.create_time}}</text>
  12 + </view>
  13 + <!-- &&UserType!=3&&GoId!=UserId&&UserType!=4 -->
  14 + <view class='banner_box' wx:if="{{GoId!=''}}">
  15 + <view class='head_img'>
  16 + <image src='{{articleDetail.user.picurl}}'></image>
  17 + </view>
  18 + <view class='head_info_box'>
  19 + <view class='user_name'>{{articleDetail.user.name}}</view>
  20 + <view>{{articleDetail.user.mobile}}</view>
  21 + <view>{{articleDetail.user.work}}</view>
  22 + <view>{{articleDetail.user.work_post}}</view>
  23 + </view>
  24 + <view class='edit_box' bindtap='goDetail'>
  25 + <view>查看详情</view>
  26 + </view>
  27 + <view class='banner_info' wx:if='{{UserType!=3}}' bindtap='goRegister'>我要开通名片功能</view>
  28 + </view>
  29 + <view class='list_content'>
  30 + <template is="wxParse" data="{{wxParseData:content.nodes}}" />
  31 + </view>
  32 +
  33 + <view class='bottom_box'>
  34 + <button data-status="{{articleDetail.status}}" data-title='{{articleDetail.title}}' open-type='share'></button>
  35 + <text class='iconfont icon-zhuanfa'></text>
  36 + <text>转发</text>
  37 + </view>
  38 +</view>
  1 +/* pages/ArticleDetails/ArticleDetails.wxss */
  2 +.go_index {
  3 + width: 100rpx;
  4 + height: 100rpx;
  5 + border-radius: 50%;
  6 + position: fixed;
  7 + right: 30rpx;
  8 + top: 60rpx;
  9 + background: #0286ff;
  10 + font-size: 30rpx;
  11 + color: #fff;
  12 + display: flex;
  13 + align-items: center;
  14 + justify-content: center;
  15 + text-align: center;
  16 + padding: 20rpx;
  17 + box-sizing: border-box;
  18 +}
  19 +.banner_box {
  20 + background: #0286ff;
  21 + display: flex;
  22 + align-items: center;
  23 + font-size: 28rpx;
  24 + color: #fff;
  25 + position: relative;
  26 + padding: 30rpx 30rpx 85rpx 30rpx;
  27 + border-radius: 16rpx;
  28 + box-shadow: 0rpx 15rpx 30rpx 0rpx rgba(9, 60, 121, 0.08);
  29 + overflow: hidden;
  30 +}
  31 +
  32 +.head_img {
  33 + width: 180rpx;
  34 + height: 180rpx;
  35 + display: flex;
  36 + align-items: center;
  37 + justify-items: center;
  38 + margin-right: 32rpx;
  39 + box-shadow: 0rpx 5rpx 10rpx 0rpx rgba(2, 134, 255, 0.66);
  40 +}
  41 +
  42 +.head_img image {
  43 + width: 100%;
  44 + height: 100%;
  45 +}
  46 +
  47 +.head_info_box {
  48 + line-height: 50rpx;
  49 +}
  50 +
  51 +.user_name {
  52 + font-size: 32rpx;
  53 + font-weight: bold;
  54 +}
  55 +
  56 +.edit_box {
  57 + display: flex;
  58 + align-items: center;
  59 + font-size: 26rpx;
  60 + color: #f80;
  61 + background: #fff;
  62 + border-radius: 26rpx;
  63 + padding: 13rpx 30rpx;
  64 + position: absolute;
  65 + right: 30rpx;
  66 + top: 50%;
  67 + transform: translateY(-50%);
  68 +}
  69 +
  70 +.icon-xiugai {
  71 + font-size: 26rpx;
  72 + margin-right: 11rpx;
  73 +}
  74 +
  75 +.banner_info {
  76 + width: 100%;
  77 + height: 60rpx;
  78 + line-height: 60rpx;
  79 + background: #0073dc;
  80 + font-size: 28rpx;
  81 + color: #fff;
  82 + text-align: center;
  83 + position: absolute;
  84 + bottom: 0;
  85 + left: 0;
  86 +}
  87 +
  88 +.content_box {
  89 + padding: 30rpx;
  90 +}
  91 +
  92 +.list_title {
  93 + font-size: 40rpx;
  94 + color: #000;
  95 + margin-bottom: 40rpx;
  96 +}
  97 +
  98 +.list_info_box {
  99 + font-size: 28rpx;
  100 + color: #97a0a8;
  101 + margin-bottom: 30rpx;
  102 +}
  103 +
  104 +.line {
  105 + display: inline-block;
  106 + width: 1rpx;
  107 + height: 22rpx;
  108 + background: #dedede;
  109 + margin: 0 15rpx;
  110 +}
  111 +
  112 +.bottom_box {
  113 + width: 120rpx;
  114 + height: 120rpx;
  115 + background: linear-gradient(-30deg, rgba(31, 118, 220, 1), rgba(69, 149, 244, 1));
  116 + border-radius: 50%;
  117 + font-size: 24rpx;
  118 + color: #fff;
  119 + display: flex;
  120 + align-items: center;
  121 + justify-content: center;
  122 + flex-direction: column;
  123 + position: fixed;
  124 + bottom: 50rpx;
  125 + right: 50rpx;
  126 +}
  127 +
  128 +.bottom_box button {
  129 + position: absolute;
  130 + top: 0;
  131 + left: 0;
  132 + width: 100%;
  133 + height: 100%;
  134 + z-index: 1000;
  135 + opacity: 0;
  136 +}
  137 +
  138 +.icon-zhuanfa {
  139 + font-size: 45rpx;
  140 + font-weight: bold;
  141 + margin-bottom: 5rpx;
  142 +}
  143 +
  144 +.list_content {
  145 + font-size: 30rpx;
  146 + color: #252729;
  147 + line-height: 50rpx;
  148 + text-indent: 2rem;
  149 + margin-top: 70rpx;
  150 +}
  151 +
  152 +.wxParse-p {
  153 + text-indent: 0 !important;
  154 + word-spacing: normal;
  155 + word-wrap: normal;
  156 + display: block !important;
  157 + margin: 0!important;
  158 +}
  159 +
  160 +.wxParse-img {
  161 + width: 100% !important;
  162 + height: 100%;
  163 +}
  164 +.wxParse-span{
  165 + width: 100%;
  166 +}
  1 +// pages/CustomerManagement/CustomerManagement.js
  2 +const app = getApp()
  3 +Page({
  4 +
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + currentTab: 2,
  10 + Status: '',
  11 + KeyWord: '',
  12 + mainid: '',
  13 + vip_state: false
  14 + },
  15 +
  16 + showtotast(){
  17 + this.showInfo()
  18 + },
  19 +
  20 + showInfo() {
  21 + wx.showModal({
  22 + title: '提示',
  23 + content: '会员已过期,请充值!',
  24 + cancelText: '暂不充值',
  25 + confirmText: '立即充值',
  26 + success(res) {
  27 + console.log(res)
  28 + if (res.confirm) {
  29 + wx.navigateTo({
  30 + url: '/pages/index/VipRecharge/VipRecharge',
  31 + })
  32 + }
  33 + },
  34 + })
  35 + },
  36 + goIndex() {
  37 + wx.switchTab({
  38 + url: '/pages/index/index',
  39 + })
  40 + },
  41 + //点击切换
  42 + tabCharge(e) {
  43 + var that = this;
  44 + if (this.data.currentTab === e.target.dataset.current) {
  45 + return false;
  46 + } else {
  47 + that.setData({
  48 + currentTab: e.target.dataset.current
  49 + })
  50 + that.getInfo()
  51 + }
  52 + },
  53 +
  54 + //设置查询的关键词
  55 + setKeyWord(e) {
  56 + let that = this;
  57 + that.setData({
  58 + KeyWord: e.detail.value
  59 + })
  60 + },
  61 +
  62 + //获取客户管理页面信息
  63 + getInfo() {
  64 + let that = this;
  65 + let url = 'counselor/familylist';
  66 + let param = {
  67 + UserId: app.globalData.UserId,
  68 + Status: this.data.currentTab,
  69 + KeyWord: that.data.KeyWord
  70 + }
  71 + app.post(url, param).then((res) => {
  72 + let data = res.data;
  73 + if (data.code == 200) {
  74 + that.setData({
  75 + list: data.data.list
  76 + })
  77 +
  78 + }
  79 + }).catch((errMsg) => {
  80 + // console.log(errMsg)
  81 + })
  82 + },
  83 +
  84 +
  85 + //获取客户管理页面信息
  86 + getdata() {
  87 + let that = this;
  88 + let url = 'pubilc/UserType';
  89 + let param = {
  90 + UserId: app.globalData.UserId,
  91 + }
  92 + app.post(url, param).then((res) => {
  93 + if (res.data.code == 200) {
  94 + if (res.data.data.type == 5) {
  95 + wx.showToast({
  96 + title: '会员到期,请充值',
  97 + icon: 'none'
  98 + }, 2000)
  99 + that.setData({
  100 + vip_state: false
  101 + })
  102 + } else if (res.data.data.type == 2) {
  103 + wx.showToast({
  104 + title: '您的权限不足',
  105 + icon: 'none'
  106 + }, 2000)
  107 + that.setData({
  108 + vip_state: false
  109 + })
  110 + } else {
  111 + that.setData({
  112 + vip_state: true
  113 + })
  114 + }
  115 + }
  116 + }).catch((errMsg) => {
  117 + // console.log(errMsg)
  118 + })
  119 + },
  120 +
  121 +
  122 +
  123 + //家庭信息
  124 + familyData(e) {
  125 + var that = this
  126 + let familyid = e.currentTarget.dataset.familyid;
  127 + let list = that.data.list;
  128 + // console.log(list)
  129 + for (let items of list) {
  130 + if (items.family_id == familyid) {
  131 + for (let j in items.users) {
  132 + if (items.users[j].user_family == 1) {
  133 + that.setData({
  134 + mainid: items.users[j].id, //户主ID
  135 + cid: items.users[j].cid //顾问ID
  136 + })
  137 + }
  138 + }
  139 + }
  140 + }
  141 + wx.navigateTo({
  142 + url: '../remind/remind?cid=' + this.data.cid + '&mainid=' + this.data.mainid + '&vip_state=' + this.data.vip_state,
  143 + })
  144 + },
  145 +
  146 + //个人信息详情
  147 + infoDetail(e) {
  148 + // wx.navigateTo({
  149 + // url: '../personInfo/personInfo?DefId=' + e.currentTarget.dataset.id,
  150 + // })
  151 + wx.navigateTo({
  152 + url: '/pages/index/EntryInformation2/EntryInformation2?DefId=' + e.currentTarget.dataset.id,
  153 + })
  154 + },
  155 +
  156 + //创建新家庭
  157 + addFamily() {
  158 + var flag = true
  159 + wx.navigateTo({
  160 + url: '../addNewFamily/addNewFamily?flag=' + flag,
  161 + })
  162 + wx.setStorageSync('familyid', '')
  163 + },
  164 +
  165 + //管理成员
  166 + addPerson(e) {
  167 + let familyid = e.currentTarget.dataset.familyid;
  168 + wx.navigateTo({
  169 + url: '../addNewFamily/addNewFamily?familyid=' + familyid,
  170 + })
  171 + wx.setStorageSync('familyid', familyid)
  172 + },
  173 +
  174 + /**
  175 + * 生命周期函数--监听页面加载
  176 + */
  177 + onLoad: function(options) {
  178 + // this.getdata()
  179 +
  180 + },
  181 +
  182 + /**
  183 + * 生命周期函数--监听页面初次渲染完成
  184 + */
  185 + onReady: function() {
  186 +
  187 + },
  188 +
  189 + /**
  190 + * 生命周期函数--监听页面显示
  191 + */
  192 + onShow: function() {
  193 + this.getInfo()
  194 + this.getdata()
  195 + },
  196 +
  197 + /**
  198 + * 生命周期函数--监听页面隐藏
  199 + */
  200 + onHide: function() {
  201 +
  202 + },
  203 +
  204 + /**
  205 + * 生命周期函数--监听页面卸载
  206 + */
  207 + onUnload: function() {
  208 +
  209 + },
  210 +
  211 + /**
  212 + * 页面相关事件处理函数--监听用户下拉动作
  213 + */
  214 + onPullDownRefresh: function() {
  215 +
  216 + },
  217 +
  218 + /**
  219 + * 页面上拉触底事件的处理函数
  220 + */
  221 + onReachBottom: function() {
  222 +
  223 + },
  224 +
  225 + /**
  226 + * 用户点击右上角分享
  227 + */
  228 + onShareAppMessage: function() {
  229 +
  230 + }
  231 +})
  1 +{
  2 + "navigationBarTitleText": "客户管理"
  3 +}
  1 +<!--pages/CustomerManagement/CustomerManagement.wxml-->
  2 +<view class='search_box'>
  3 + <view class='search_item'>
  4 + <view class='iconfont icon-sousuo1'></view>
  5 + <view class='search_input'>
  6 + <input placeholder='搜索姓名或标签' bindinput='setKeyWord'></input>
  7 + </view>
  8 + </view>
  9 + <view bindtap='getInfo'>搜索</view>
  10 +</view>
  11 +<view class='line_box'></view>
  12 +<view class='content_box'>
  13 + <view class='tab_box'>
  14 + <view class="tab_item {{currentTab==2?'tab_active':''}}" data-current="2" bindtap='tabCharge'>日志降序排序</view>
  15 + <view class="tab_item {{currentTab==1?'tab_active':''}}" data-current="1" bindtap='tabCharge'>优先级排序</view>
  16 + </view>
  17 + <view class='item_list' wx:for='{{list}}' wx:key=''>
  18 + <view class='list_left_box'>
  19 + <view class='list_label_box' bindtap='familyData' data-familyid='{{item.family_id}}'>
  20 + <view class='iconfont icon-jiating1'></view>
  21 + <view>跟踪日志</view>
  22 + <text class='iconfont icon-yuan label_icon' wx:if='{{item.warn_status==1}}'></text>
  23 + </view>
  24 + <view class='list_label_item'>
  25 + <view class='label_item' wx:for='{{item.users}}' wx:for-item='user' wx:key='' data-id='{{user.id}}' bindtap='infoDetail'>
  26 + <text>{{user.name}}({{user.family_role}})</text>
  27 + <text class='iconfont icon-yuan' wx:if='{{user.user_family==1}}'></text>
  28 + <text class='iconfont icon-yuan user_point' wx:if='{{user.key_status==1}}'></text>
  29 + </view>
  30 + <!-- <view class='label_item'>
  31 + <text>曹文正(爸爸)</text>
  32 + <text class='iconfont icon-yuan '></text>
  33 + </view>
  34 + <view class='label_item'>
  35 + <text>曹文正(爸爸)</text>
  36 + <text class='iconfont icon-yuan user_point'></text>
  37 + </view> -->
  38 + </view>
  39 + </view>
  40 + <view class='list_right_box'>
  41 + <view class='list_btn_box' bindtap="{{vip_state?'addPerson':'showtotast'}}" data-familyid='{{item.family_id}}'>
  42 + <view class='list_btn'>
  43 + <view class='iconfont icon-shezhi'></view>
  44 + </view>
  45 + <view>管理成员</view>
  46 + </view>
  47 + </view>
  48 + </view>
  49 + <view class='null_box'></view>
  50 + <view class='bottom'>
  51 + <view class='bottom_box' style='100%;' bindtap="{{vip_state?'addFamily':'showInfo'}}">创建新家庭</view>
  52 + <view class='bottom_box' bindtap="goIndex">回到首页</view>
  53 + </view>
  54 +</view>
  1 +/* pages/CustomerManagement/CustomerManagement.wxss */
  2 +
  3 +.line_box {
  4 + width: 100%;
  5 + height: 16rpx;
  6 + background: #f5f6fa;
  7 +}
  8 +
  9 +.go_index {
  10 + width: 100rpx;
  11 + height: 100rpx;
  12 + border-radius: 50%;
  13 + position: fixed;
  14 + right: 30rpx;
  15 + bottom: 120rpx;
  16 + background: #0286ff;
  17 + font-size: 30rpx;
  18 + color: #fff;
  19 + display: flex;
  20 + align-items: center;
  21 + justify-content: center;
  22 + text-align: center;
  23 + padding: 20rpx;
  24 + box-sizing: border-box;
  25 +}
  26 +
  27 +.search_box {
  28 + width: 100%;
  29 + display: flex;
  30 + align-items: center;
  31 + justify-content: space-between;
  32 + padding: 10rpx 30rpx;
  33 + box-sizing: border-box;
  34 + font-size: 30rpx;
  35 + color: #666;
  36 +}
  37 +
  38 +.search_item {
  39 + width: 80%;
  40 + height: 100%;
  41 + background: rgba(245, 245, 250, 1);
  42 + border-radius: 5rpx;
  43 + display: flex;
  44 + align-items: center;
  45 + padding: 10rpx 20rpx;
  46 +}
  47 +
  48 +.icon-sousuo1 {
  49 + font-size: 40rpx;
  50 + color: #ccc;
  51 + margin-right: 20rpx;
  52 +}
  53 +
  54 +.search_input input {
  55 + font-size: 30rpx;
  56 + border: 0;
  57 + outline: none;
  58 +}
  59 +
  60 +.tab_box {
  61 + width: 400rpx;
  62 + height: 60rpx;
  63 + background: rgba(255, 255, 255, 1);
  64 + border: 1rpx solid rgba(43, 154, 255, 1);
  65 + border-radius: 30rpx;
  66 + display: flex;
  67 + align-items: center;
  68 + justify-content: center;
  69 + font-size: 24rpx;
  70 + color: #999;
  71 + margin: 30rpx auto 50rpx auto;
  72 + overflow: hidden;
  73 +}
  74 +
  75 +.tab_item {
  76 + width: 50%;
  77 + height: 100%;
  78 + border-right: 1rpx solid #2b9aff;
  79 + display: flex;
  80 + align-items: center;
  81 + justify-content: center;
  82 +}
  83 +
  84 +.tab_item:last-child {
  85 + border: 0;
  86 +}
  87 +
  88 +.tab_active {
  89 + background: #d7ecff;
  90 + color: #0286ff;
  91 +}
  92 +
  93 +.content_box {
  94 + padding: 0 30rpx;
  95 + box-sizing: border-box;
  96 +}
  97 +
  98 +.item_list {
  99 + min-height: 222rpx;
  100 + display: flex;
  101 + /* align-items: center; */
  102 + align-items: flex-start;
  103 + justify-content: space-between;
  104 + box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(0, 0, 0, 0.08);
  105 + border-radius: 5rpx;
  106 + padding: 16rpx 0;
  107 + box-sizing: border-box;
  108 + position: relative;
  109 + margin-bottom: 40rpx;
  110 +}
  111 +
  112 +.list_left_box {
  113 + width: 87%;
  114 + display: flex;
  115 + align-items: flex-start;
  116 +}
  117 +
  118 +.list_label_box {
  119 + width: 160rpx;
  120 + height: 207rpx;
  121 + background: rgba(2, 134, 255, 1);
  122 + box-shadow: 2rpx 8rpx 30rpx 0rpx rgba(0, 0, 0, 0.24);
  123 + border-radius: 5rpx;
  124 + font-size: 24rpx;
  125 + color: #fff;
  126 + display: flex;
  127 + align-items: center;
  128 + justify-content: center;
  129 + flex-direction: column;
  130 + margin-left: 15rpx;
  131 + position: relative;
  132 + /* position: absolute;
  133 + left: 0;
  134 + top: -20rpx; */
  135 +}
  136 +
  137 +.icon-jiating1 {
  138 + font-size: 80rpx;
  139 +}
  140 +
  141 +.icon-yuan {
  142 + font-size: 16rpx;
  143 + position: absolute;
  144 + right: 0;
  145 + top: 0;
  146 + color: #0286ff;
  147 +}
  148 +
  149 +.label_icon {
  150 + color: #f00;
  151 +}
  152 +
  153 +.user_point {
  154 + color: #0ed137;
  155 + position: absolute;
  156 + right: 0;
  157 + bottom: 0;
  158 + top: 80%;
  159 +}
  160 +
  161 +.list_label_item {
  162 + width: 66%;
  163 + display: flex;
  164 + align-items: center;
  165 + flex-wrap: wrap;
  166 + margin-left: 20rpx;
  167 +}
  168 +
  169 +.label_item {
  170 + width: 136rpx;
  171 + height: 80rpx;
  172 + background: rgba(242, 244, 247, 1);
  173 + border-radius: 5rpx;
  174 + font-size: 24rpx;
  175 + color: #1a1a1a;
  176 + position: relative;
  177 + display: flex;
  178 + align-items: center;
  179 + justify-content: center;
  180 + margin: 0 20rpx 20rpx 0;
  181 + padding: 0 15rpx;
  182 +}
  183 +
  184 +.list_right_box {
  185 + width: 16%;
  186 + margin-top: 50rpx;
  187 + margin-right: 10rpx;
  188 +}
  189 +
  190 +.list_btn_box {
  191 + display: flex;
  192 + align-items: center;
  193 + justify-content: center;
  194 + flex-direction: column;
  195 + font-size: 24rpx;
  196 + color: #1a1a1a;
  197 +}
  198 +
  199 +.list_btn {
  200 + width: 80rpx;
  201 + height: 80rpx;
  202 + background: linear-gradient(-40deg, rgba(246, 200, 44, 1), rgba(250, 189, 75, 1));
  203 + border-radius: 40rpx;
  204 + color: #fff;
  205 + display: flex;
  206 + align-items: center;
  207 + justify-content: center;
  208 + margin-bottom: 12rpx;
  209 +}
  210 +
  211 +.icon-shezhi {
  212 + font-size: 40rpx;
  213 +}
  214 +
  215 +.bottom {
  216 + width: 100%;
  217 + height: 120rpx;
  218 + background: #fff;
  219 + position: fixed;
  220 + bottom: 0rpx;
  221 + left: 50%;
  222 + transform: translateX(-50%);
  223 + display: flex;
  224 + align-items: center;
  225 + justify-content: space-between;
  226 + padding: 0 30rpx;
  227 + box-sizing: border-box;
  228 +}
  229 +
  230 +.bottom_box {
  231 + width: 45%;
  232 + height: 88rpx;
  233 + background: rgba(2, 134, 255, 1);
  234 + border-radius: 44rpx;
  235 + font-size: 36rpx;
  236 + color: #fff;
  237 + display: flex;
  238 + align-items: center;
  239 + justify-content: center;
  240 +}
  241 +
  242 +.null_box {
  243 + width: 100%;
  244 + height: 120rpx;
  245 +}
  1 +// pages/EntryInformation/EntryInformation.js
  2 +const app = getApp();
  3 +Page({
  4 + data: {
  5 + sexArray: ['女', '男'],
  6 + card_Array: ['身份证', '护照', '出生证', '军官证', '港澳通行证'],
  7 + birth_date: '',
  8 + addsess_current: 0,
  9 + label_list: [],
  10 + list: {
  11 + name: '',
  12 + sex: '',
  13 + family_role: '',
  14 + money: '',
  15 + mobile: '',
  16 + birthday: '',
  17 + work: '',
  18 + work_address: '',
  19 + address: '',
  20 + mid: 0,
  21 + user_status: '',
  22 + status_num: '',
  23 + text: '',
  24 + },
  25 + label_ids: [],
  26 + familyid: 0, //家庭ID
  27 + hasimg: '',
  28 + DefId: ''
  29 + },
  30 +
  31 + // 打电话
  32 + makePhoneCall() {
  33 + let that = this;
  34 + var list = that.data.list
  35 + var phoneNumber = list.mobile
  36 + wx.makePhoneCall({
  37 + phoneNumber: phoneNumber
  38 + })
  39 + },
  40 +
  41 + //设置查询的关键词
  42 + setKeyWord(e) {
  43 + let that = this;
  44 + that.setData({
  45 + KeyWord: e.detail.value
  46 + })
  47 + },
  48 +
  49 + //名字
  50 + setName(e) {
  51 + var list = this.data.list;
  52 + list.name = e.detail.value;
  53 + this.setData({
  54 + list: list
  55 + })
  56 + },
  57 +
  58 + //选择性别
  59 + selectSex(e) {
  60 + var list = this.data.list;
  61 + var sexArray = this.data.sexArray
  62 + list.sex = e.detail.value;
  63 + this.setData({
  64 + sex_index: e.detail.value,
  65 + list: list
  66 + })
  67 + },
  68 +
  69 + //选择家庭角色
  70 + familyRole(e) {
  71 + let list = this.data.list;
  72 + list.family_role = e.detail.value;
  73 + this.setData({
  74 + list: list
  75 + })
  76 + },
  77 +
  78 + //选择年收入
  79 + income(e) {
  80 + let list = this.data.list;
  81 + list.money = e.detail.value;
  82 + this.setData({
  83 + list: list
  84 + })
  85 + },
  86 +
  87 + //手机号
  88 + setMobile(e) {
  89 + let list = this.data.list;
  90 + list.mobile = e.detail.value;
  91 + this.setData({
  92 + list: list
  93 + })
  94 + },
  95 +
  96 + //出生日期
  97 + birthDate(e) {
  98 + var list = this.data.list;
  99 + list.birthday = e.detail.value;
  100 + this.setData({
  101 + birth_date: e.detail.value,
  102 + list: list
  103 + })
  104 + },
  105 +
  106 + //选择家庭角色
  107 + setWork(e) {
  108 + let list = this.data.list;
  109 + list.work = e.detail.value;
  110 + this.setData({
  111 + list: list
  112 + })
  113 + },
  114 +
  115 + //选择家庭角色
  116 + setworkAddress(e) {
  117 + let list = this.data.list;
  118 + list.work_address = e.detail.value;
  119 + this.setData({
  120 + list: list
  121 + })
  122 + },
  123 +
  124 + //设置家庭地址
  125 + setSddress(e) {
  126 + let list = this.data.list;
  127 + list.address = e.detail.value;
  128 + var address = list.address
  129 + if (this.data.familyid == 0) {
  130 + wx.setStorageSync('address', address)
  131 + }
  132 + this.setData({
  133 + list: list
  134 + })
  135 + },
  136 +
  137 + //通讯切换
  138 + addressCharge(e) {
  139 + var that = this;
  140 + var list = this.data.list
  141 + list.mid = e.target.dataset.current
  142 + if (this.data.addsess_current === e.target.dataset.current) {
  143 + return false;
  144 + } else {
  145 + that.setData({
  146 + addsess_current: e.target.dataset.current,
  147 + list: list
  148 + })
  149 + }
  150 + },
  151 +
  152 + //选择证件类型
  153 + selectIdCard(e) {
  154 + let list = this.data.list;
  155 + var card_Array = this.data.card_Array
  156 + list.user_status = parseInt(e.detail.value) + 1;
  157 + this.setData({
  158 + card_index: e.detail.value,
  159 + list: list
  160 + })
  161 + },
  162 +
  163 + //选择家庭角色
  164 + setIdNum(e) {
  165 + let list = this.data.list;
  166 + list.status_num = e.detail.value;
  167 + this.setData({
  168 + list: list
  169 + })
  170 + },
  171 +
  172 + //用户描述
  173 + descript(e) {
  174 + let list = this.data.list;
  175 + list.text = e.detail.value;
  176 + this.setData({
  177 + list: list
  178 + })
  179 + },
  180 +
  181 + //添加成员标签
  182 + labelInfo() {
  183 + let that = this;
  184 + let url = 'counselor/DefAdd';
  185 + let params = {}
  186 + app.post(url, params).then((res) => {
  187 + if (res.data.code == 200) {
  188 + var list = this.data.list
  189 + that.setData({
  190 + label_list: res.data.data
  191 + })
  192 + }
  193 + }).catch((errMsg) => {
  194 + console.log(errMsg)
  195 + })
  196 + },
  197 +
  198 + //选择用户标签
  199 + selectLabel(e) {
  200 + var mindex = e.currentTarget.dataset.mindex
  201 + var sindex = e.currentTarget.dataset.sindex
  202 + var list = this.data.list
  203 + var id = e.currentTarget.dataset.id
  204 + var status = e.currentTarget.dataset.status
  205 + var label_list = this.data.label_list
  206 + var label_ids = this.data.label_ids;
  207 +
  208 + //去重
  209 + const add = label_ids.every((label_ids) => {
  210 + return label_ids != id
  211 + })
  212 + // if (add) {
  213 + if (!(label_list[mindex].data[sindex].status)) {
  214 + label_ids.push(id)
  215 + } else {
  216 + for (var i = 0; i < label_ids.length; i++) {
  217 + // if (!(label_list[mindex].data[sindex].status)) {
  218 + if (label_list[mindex].data[sindex].id == label_ids[i]) {
  219 + label_ids.splice(i, 1);
  220 + console.log(11, label_ids)
  221 + }
  222 + // }
  223 + }
  224 + }
  225 + // }
  226 + label_list[mindex].data[sindex].status = !(label_list[mindex].data[sindex].status)
  227 + this.setData({
  228 + label_list: label_list,
  229 + label_ids: label_ids
  230 + });
  231 + },
  232 +
  233 + // 选择上传的图片
  234 + chooseImg() { //这里是选取图片的方法
  235 + var that = this;
  236 + wx.chooseImage({
  237 + count: 1,
  238 + success: (res) => {
  239 + var tempFilePaths = res.tempFilePaths
  240 + let url = '/users/upload'
  241 + let strtime = +new Date()
  242 + let params = {
  243 + picurl: tempFilePaths[0],
  244 + strtime: strtime,
  245 + token: app.strTime(strtime)
  246 + }
  247 + wx.uploadFile({
  248 + url: 'https://insurance.w.broteam.cn/pubilc/upload', //仅为示例,非真实的接口地址
  249 + filePath: tempFilePaths[0],
  250 + name: 'picurl',
  251 + formData: {
  252 + 'strtime': strtime,
  253 + 'token': app.strTime(strtime)
  254 + },
  255 + success: function(res) {
  256 + var data = JSON.parse(res.data);
  257 + var picurl = data.data.picurl;
  258 + picurl = picurl.indexOf('http') != '-1' ? picurl : "http://" + picurl
  259 + var list = that.data.list
  260 + list.picurl = picurl
  261 + that.setData({
  262 + hasimg: picurl,
  263 + list: list
  264 + })
  265 + }
  266 + })
  267 + }
  268 + })
  269 + },
  270 +
  271 + //成员信息的修改,新增
  272 + listVerify(e) {
  273 + let that = this;
  274 + var warn = "";
  275 + var flag = true;
  276 + var state = that.data.state
  277 + var list = this.data.list;
  278 + var sex_index = (this.data.sex_index)
  279 + var picurl = list.picurl
  280 + if (picurl == undefined) {
  281 + picurl = ''
  282 + }
  283 +
  284 +
  285 + // else if (list.mobile == '') {
  286 + // warn = '请填写您的手机号'
  287 + // } else if (!(/^[1][3,4,5,7,8][0-9]{9}$/.test(list.mobile))) {
  288 + // warn = "手机号格式不正确";
  289 + // }
  290 +
  291 + if (list.name == "") {
  292 + warn = "请填写您的姓名";
  293 + } else if (sex_index == undefined) {
  294 + warn = "请填写您的性别";
  295 + } else if (list.family_role == '') {
  296 + warn = '请填写您的家庭角色'
  297 + } else if (list.birthday == '') {
  298 + warn = "请填选择您的出生日期"
  299 + } else {
  300 + flag = false; //若必要信息都填写,则不用弹框.正常调用接口
  301 + let paramlist = {
  302 + name: list.name,
  303 + sex: sex_index,
  304 + family_role: list.family_role,
  305 + money: list.money,
  306 + mobile: list.mobile,
  307 + birthday: list.birthday,
  308 + work: list.work,
  309 + work_address: list.work_address,
  310 + address: list.address,
  311 + mid: list.mid,
  312 + user_status: list.user_status,
  313 + status_num: list.status_num,
  314 + picurl: picurl,
  315 + text: list.text,
  316 + label_ids: this.data.label_ids,
  317 + family_id: that.data.familyid,
  318 + DefId: that.data.DefId,
  319 + UserId: app.globalData.UserId
  320 + }
  321 + let url = 'counselor/deflistdo'
  322 + app.post(url, paramlist).then((res) => {
  323 + console.log(res)
  324 + if (res.data.code == 200) {
  325 + wx.showToast({
  326 + title: '录入成功',
  327 + })
  328 + wx.setStorageSync('familyid', res.data.data.family_id)
  329 + setTimeout(() => {
  330 + if (this.data.familyid == 0) {
  331 + // wx.redirectTo({
  332 + // url: '/pages/index/CustomerManagement/CustomerManagement',
  333 + // })
  334 + wx.navigateTo({
  335 + url: '/pages/index/addNewFamily/addNewFamily',
  336 + })
  337 +
  338 + } else {
  339 + wx.navigateBack()
  340 + }
  341 +
  342 + }, 1500)
  343 + // wx.navigateTo({
  344 + // url: '/pages/index/addNewFamily/addNewFamily?familyid=' + res.data.data.family_id,
  345 + // })
  346 + }
  347 + }).catch((errMsg) => {
  348 + console.log(errMsg)
  349 + })
  350 + }
  351 + if (flag == true) {
  352 + wx.showToast({
  353 + title: warn,
  354 + icon: 'none',
  355 + duration: 2000
  356 + })
  357 + }
  358 + },
  359 +
  360 +
  361 + //获取成员详细信息
  362 + getUserInfo() {
  363 + let that = this;
  364 + let url = 'counselor/deflist';
  365 + let params = {
  366 + DefId: that.data.DefId
  367 + }
  368 + app.post(url, params).then((res) => {
  369 + if (res.data.code == 200) {
  370 + var list = res.data.data.list
  371 + if (res.data.data.list.picurl != '') {
  372 + this.setData({
  373 + hasimg: true
  374 + })
  375 + }
  376 + var label_ids = this.data.label_ids
  377 + var label_list = res.data.data.label_list
  378 + for (var i = 0; i < label_list.length; i++) {
  379 + for (var j = 0; j < label_list[i].data.length; j++) {
  380 + if (label_list[i].data[j].status == 1) {
  381 + label_ids.push(label_list[i].data[j].id)
  382 + label_list[i].data[j].status = true
  383 + } else {
  384 + label_list[i].data[j].status = false
  385 + }
  386 + }
  387 + }
  388 + var list = res.data.data.list;
  389 + list.sex = res.data.data.list.sex;
  390 + that.setData({
  391 + list: list,
  392 + label_list: label_list,
  393 + sex_index: res.data.data.list.sex,
  394 + card_index: parseInt(res.data.data.list.user_status) - 1,
  395 + addsess_current: res.data.data.list.mid,
  396 + label_ids: label_ids
  397 + })
  398 + }
  399 + }).catch((errMsg) => {
  400 + console.log(errMsg)
  401 + })
  402 + },
  403 +
  404 + //获取家庭地址
  405 + getAddress() {
  406 + let that = this;
  407 + let url = 'counselor/addUserAds';
  408 + app.post(url, {
  409 + family_id: this.data.familyid
  410 + }).then((res) => {
  411 + if (res.data.code == 200) {
  412 + var list = that.data.list
  413 + list.address = res.data.data.address
  414 + list.mobile=res.data.data.mobile
  415 + that.setData({
  416 + list: list
  417 + })
  418 + }
  419 + }).catch((errMsg) => {
  420 + console.log(errMsg)
  421 + })
  422 + },
  423 +
  424 + /**
  425 + * 生命周期函数--监听页面加载
  426 + */
  427 + onLoad: function(options) {
  428 + this.labelInfo()
  429 + this.setData({
  430 + familyid: options.familyid
  431 + })
  432 + if (options.DefId == undefined) {
  433 + this.setData({
  434 + DefId: ''
  435 + })
  436 + } else {
  437 + this.setData({
  438 + DefId: options.DefId
  439 + })
  440 + this.getUserInfo();
  441 + }
  442 +
  443 + if (this.data.familyid != '') {
  444 + this.getAddress()
  445 + }
  446 + },
  447 +
  448 + /**
  449 + * 生命周期函数--监听页面初次渲染完成
  450 + */
  451 + onReady: function() {
  452 +
  453 + },
  454 +
  455 + /**
  456 + * 生命周期函数--监听页面显示
  457 + */
  458 + onShow: function() {
  459 +
  460 + },
  461 +
  462 + /**
  463 + * 生命周期函数--监听页面隐藏
  464 + */
  465 + onHide: function() {
  466 +
  467 + },
  468 +
  469 + /**
  470 + * 生命周期函数--监听页面卸载
  471 + */
  472 + onUnload: function() {
  473 +
  474 + },
  475 +
  476 + /**
  477 + * 页面相关事件处理函数--监听用户下拉动作
  478 + */
  479 + onPullDownRefresh: function() {
  480 +
  481 + },
  482 +
  483 + /**
  484 + * 页面上拉触底事件的处理函数
  485 + */
  486 + onReachBottom: function() {
  487 +
  488 + },
  489 +
  490 + /**
  491 + * 用户点击右上角分享
  492 + */
  493 + onShareAppMessage: function() {
  494 +
  495 + }
  496 +})
  1 +{
  2 + "navigationBarTitleText": "个人信息录入"
  3 +}
  1 +<!--pages/EntryInformation/EntryInformation.wxml-->
  2 +<form bindsubmit='listVerify'>
  3 + <view class='content_item'>
  4 + <view class='item_list'>
  5 + <view class='list_title'>
  6 + <text class='list_icon'>*</text>
  7 + <text>姓名</text>
  8 + </view>
  9 + <view class='list_input'>
  10 + <input type='text' placeholder='请输入客户姓名' value='{{list.name}}' bindinput='setName'></input>
  11 + </view>
  12 + </view>
  13 + <view class='item_list'>
  14 + <view class='list_title'>
  15 + <text class='list_icon'>*</text>
  16 + <text>性别</text>
  17 + </view>
  18 + <view class='list_input'>
  19 + <picker class='picker' range='{{sexArray}}' value='{{sex_index}}' bindchange='selectSex'>
  20 + <input placeholder='请选择性别' value='{{sexArray[sex_index]}}' disabled='true'></input>
  21 + </picker>
  22 + </view>
  23 + </view>
  24 + <view class='item_list'>
  25 + <view class='list_title'>
  26 + <text class='list_icon'>*</text>
  27 + <text>家庭角色</text>
  28 + </view>
  29 + <view class='list_input'>
  30 + <input type='text' placeholder='请输入家庭角色' value='{{list.family_role}}' bindinput='familyRole'></input>
  31 + </view>
  32 + </view>
  33 + <view class='item_list'>
  34 + <view class='list_title'>个人年收入</view>
  35 + <view class='list_input' style='justify-content:flex-start;'>
  36 + <input type='number' placeholder='请输入' value='{{list.money}}' bindinput='income' style='width:100rpx;'></input>
  37 + <view>万</view>
  38 + </view>
  39 + </view>
  40 + <view class='item_list'>
  41 + <view class='list_title'>
  42 + <!-- <text class='list_icon'>*</text> -->
  43 + <text>手机号</text>
  44 + </view>
  45 + <view class='list_input'>
  46 + <input type='number' placeholder='请输入手机号' value='{{list.mobile}}' bindinput='setMobile'></input>
  47 + </view>
  48 + </view>
  49 +
  50 + <view class='item_list'>
  51 + <view class='list_title'>
  52 + <text class='list_icon'>*</text>
  53 + <text>出生日期</text>
  54 + </view>
  55 + <view class='list_input'>
  56 + <picker class='picker' mode="date" value='{{list.birthday}}' bindchange='birthDate'>
  57 + <input placeholder='请选择真实出生日期' value='{{list.birthday}}' disabled='true'></input>
  58 + </picker>
  59 + </view>
  60 + </view>
  61 + <view class='item_list'>
  62 + <view class='list_title'>单位名称 </view>
  63 + <view class='list_input'>
  64 + <input type='text' placeholder='请输入单位名称' value='{{list.work}}' bindinput='setWork'></input>
  65 + </view>
  66 + </view>
  67 + <view class='item_list'>
  68 + <view class='list_title'>单位地址 </view>
  69 + <view class='list_input'>
  70 + <input type='text' placeholder='请输入单位地址' value='{{list.work_address}}' bindinput='setworkAddress'></input>
  71 + </view>
  72 + </view>
  73 + <view class='item_list' style='align-items: flex-start;min-height:80rpx;'>
  74 + <view class='list_title'>家庭地址 </view>
  75 + <view class='list_input'>
  76 + <!-- wx:if='{{list.address}}' -->
  77 + <textarea type='text' placeholder='请输入家庭地址' value='{{list.address}}' bindinput='setSddress'></textarea>
  78 + </view>
  79 + </view>
  80 +
  81 + <view class='item_list'>
  82 + <view class='list_title'>通讯地址 </view>
  83 + <view class='list_input'>
  84 + <view class="address_btn {{addsess_current==1?'unit_address':''}}" data-current='1' bindtap='addressCharge'>家庭地址</view>
  85 + <view class="address_btn {{addsess_current==2?'unit_address':''}}" data-current='2' bindtap='addressCharge'>单位地址</view>
  86 + </view>
  87 + </view>
  88 +
  89 + <view class='item_list'>
  90 + <view class='list_title'>证件类型</view>
  91 + <view class='list_input'>
  92 + <picker class='picker' range='{{card_Array}}' value='{{card_index}}' bindchange='selectIdCard'>
  93 + <input placeholder='请选择证件类型' value='{{card_Array[card_index]}}' disabled='true'></input>
  94 + </picker>
  95 + </view>
  96 + </view>
  97 + <view class='item_list'>
  98 + <view class='list_title'>证件号 </view>
  99 + <view class='list_input'>
  100 + <input type='text' placeholder='请输入证件号' value='{{list.status_num}}' bindinput='setIdNum'></input>
  101 + </view>
  102 + </view>
  103 + </view>
  104 + <view class='box'>
  105 + <!-- 上传图片 -->
  106 + <view class='upload_box'>
  107 + <view class='popup_img' wx:if='{{hasimg}}' bindtap='chooseImg'>
  108 + <image src='{{list.picurl}}' mode='widthFix'></image>
  109 + </view>
  110 + <view bindtap='chooseImg' wx:else>
  111 + <view class='iconfont icon-add'></view>
  112 + <view style='margin-bottom:25rpx;'>上传客户照片</view>
  113 + </view>
  114 + </view>
  115 + </view>
  116 + <view class='content_item'>
  117 + <view class='item_list'>
  118 + <view class='list_title'>客户描述</view>
  119 + </view>
  120 + <view class='list_textarea'>
  121 + <textarea placeholder='请在此添加对客户的描述' value='{{list.text}}' placeholder-class='font_color' bindinput='descript'></textarea>
  122 + </view>
  123 + </view>
  124 + <view class='content_item'>
  125 + <view class='item_list'>
  126 + <view class='list_title' style='width: 100%;text-align: center;'>客户画像</view>
  127 + </view>
  128 + <view class='item_list item_label_box' wx:for='{{label_list}}' wx:key='' wx:for-index='mindex'>
  129 + <view class='list_label_title'>{{item.label}} </view>
  130 + <view class='list_label'>
  131 + <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>
  132 + </view>
  133 + </view>
  134 + </view>
  135 + <!-- 底部按钮 -->
  136 + <view class='null_box'></view>
  137 + <!-- <cover-view class='bottom_box'>
  138 + <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>
  139 + </cover-view> -->
  140 +
  141 + <cover-view class='bottom_box'>
  142 + <button data-type='complete' formType='submit' style='font-size:12pt;border:0px;width:100%;background:#0286FF;color:#fff'>完成</button>
  143 + </cover-view>
  144 +
  145 +</form>
  1 +/* pages/my/listDetail/listDetail.wxss */
  2 +
  3 +page {
  4 + background: #f5f5fa;
  5 +}
  6 +
  7 +.content_item {
  8 + background: #fff;
  9 + padding: 0 38rpx;
  10 + margin-top: 16rpx;
  11 +}
  12 +
  13 +.item_list {
  14 + width: 100%;
  15 + display: flex;
  16 + align-items: center;
  17 + border-bottom: 1rpx dashed #ebebeb;
  18 + padding: 23rpx 0;
  19 +}
  20 +
  21 +.list_icon {
  22 + font-size: 30rpx;
  23 + color: #f00;
  24 + margin-right: 10rpx;
  25 +}
  26 +
  27 +.list_title {
  28 + width: 170rpx;
  29 + font-size: 29rpx;
  30 + color: #000;
  31 +
  32 +}
  33 +
  34 +.list_label_title {
  35 + width: 140rpx;
  36 + font-size: 29rpx;
  37 + color: #000;
  38 +}
  39 +
  40 +.project {
  41 + background: none;
  42 +}
  43 +
  44 +.symbol_icon {
  45 + font-size: 27rpx;
  46 + color: red;
  47 +}
  48 +
  49 +.list_input {
  50 + width: 75%;
  51 + display: flex;
  52 + align-items: center;
  53 + justify-content: space-between;
  54 + font-size: 30rpx;
  55 + color: #000;
  56 +}
  57 +.list_input textarea{
  58 + height: 120rpx;
  59 + /* position: fixed; */
  60 +}
  61 +.list_input input {
  62 + border: 0;
  63 + outline: none;
  64 + font-size: 30rpx;
  65 + color: #000;
  66 + line-height: 1;
  67 +}
  68 +
  69 +.list_input .picker {
  70 + width: 100%;
  71 + height: 53rpx;
  72 + font-size: 30rpx;
  73 + color: #000;
  74 + line-height: 53rpx;
  75 +}
  76 +
  77 +.item_label_box {
  78 + align-items: flex-start;
  79 +}
  80 +
  81 +.list_label {
  82 + width: 75%;
  83 + display: flex;
  84 + align-items: center;
  85 + flex-wrap: wrap;
  86 +}
  87 +
  88 +.list_label .address_btn {
  89 + margin-bottom: 20rpx;
  90 +}
  91 +
  92 +.list_textarea {
  93 + width: 100%;
  94 +}
  95 +
  96 +.list_textarea textarea {
  97 + width: 100%;
  98 + padding: 30rpx 0;
  99 + box-sizing: border-box;
  100 + min-height: 140rpx;
  101 +
  102 +}
  103 +
  104 +.font_color {
  105 + font-size: 28rpx;
  106 + color: #999;
  107 +}
  108 +
  109 +.icon-add {
  110 + font-size: 32rpx;
  111 + color: #ccc;
  112 + text-align: center;
  113 + padding: 20rpx 0;
  114 +}
  115 +
  116 +.icon-jinru {
  117 + float: right;
  118 + color: #ccc;
  119 +}
  120 +
  121 +.item {
  122 + justify-content: space-between;
  123 +}
  124 +
  125 +.box {
  126 + padding: 0 32rpx;
  127 +}
  128 +
  129 +.upload_box {
  130 + font-size: 28rpx;
  131 + color: #1a1a1a;
  132 + background: #fff;
  133 + margin-top: 16rpx;
  134 + text-align: center;
  135 + /* padding: 36rpx 0; */
  136 + border-radius: 10rpx;
  137 + box-shadow: 2rpx 0rpx 3rpx rgba(235, 235, 235, 1);
  138 + overflow: hidden;
  139 +}
  140 +
  141 +.upload_box .icon-add {
  142 + font-size: 64rpx;
  143 +}
  144 +
  145 +.popup_img {
  146 + width: 100%;
  147 + height: 100%;
  148 + display: flex;
  149 + align-items: center;
  150 + justify-content: center;
  151 +}
  152 +
  153 +.popup_img image {
  154 + width: 100%;
  155 + /* height: 100%; */
  156 +}
  157 +
  158 +/* .icon-guanbi {
  159 + position: absolute;
  160 + top: 10rpx;
  161 + right: 20rpx;
  162 + color: #ccc;
  163 +} */
  164 +
  165 +.content_info {
  166 + font-size: 24rpx;
  167 + color: #999;
  168 + margin-top: 22rpx;
  169 +}
  170 +
  171 +.null_box {
  172 + width: 100%;
  173 + height: 120rpx;
  174 +}
  175 +
  176 +.bottom_box {
  177 + width: 100%;
  178 + height: 100rpx;
  179 + background: rgba(255, 255, 255, 1);
  180 + box-shadow: 1rpx 0rpx 1rpx rgba(235, 233, 232, 1);
  181 + display: flex;
  182 + align-items: center;
  183 + justify-content: flex-end;
  184 + position: fixed;
  185 + bottom: 0;
  186 + padding: 0 32rpx;
  187 + z-index: 5;
  188 + box-sizing: border-box;
  189 +}
  190 +
  191 +.bottom_btn {
  192 + width: 100%;
  193 + height: 80rpx;
  194 + font-size: 32rpx;
  195 + color: #fff;
  196 + background: rgba(2, 134, 255, 1);
  197 + border-radius: 44rpx;
  198 + display: flex;
  199 + align-items: center;
  200 + justify-content: center;
  201 +}
  202 +
  203 +.add_btn {
  204 + width: 260rpx;
  205 + height: 80rpx;
  206 + font-size: 32rpx;
  207 + color: #1a1a1a;
  208 + background: #fff;
  209 + border: 1rpx solid #ebebeb;
  210 + border-radius: 40rpx;
  211 + display: flex;
  212 + align-items: center;
  213 + justify-content: center;
  214 + margin-left: 200rpx;
  215 + margin-right: 20rpx;
  216 +}
  217 +
  218 +.addrisk {
  219 + width: 70%;
  220 + display: flex;
  221 + align-items: center;
  222 + justify-content: space-between;
  223 + text-align: left;
  224 +}
  225 +
  226 +.unit {
  227 + text-align: left;
  228 +}
  229 +
  230 +.address_btn {
  231 + background: none;
  232 + border: 1rpx solid #0286ff;
  233 + color: #0286ff;
  234 + font-size: 34rpx;
  235 + font-weight: bold;
  236 + border-radius: 40rpx;
  237 + display: flex;
  238 + align-items: center;
  239 + justify-content: center;
  240 + margin-right: 20rpx;
  241 + padding: 8rpx 30rpx;
  242 +}
  243 +
  244 +.unit_address {
  245 + color: #fff;
  246 + background: rgba(2, 134, 255, 1);
  247 +}
  1 +// pages/EntryInformation/EntryInformation.js
  2 +const app = getApp();
  3 +Page({
  4 + data: {
  5 + sexArray: ['女', '男'],
  6 + card_Array: ['身份证', '护照', '出生证', '军官证', '港澳通行证'],
  7 + birth_date: '',
  8 + addsess_current: 0,
  9 + label_list: [],
  10 + list: {
  11 + name: '',
  12 + sex: '',
  13 + family_role: '',
  14 + money: '',
  15 + mobile: '',
  16 + birthday: '',
  17 + work: '',
  18 + work_address: '',
  19 + address: '',
  20 + mid: 0,
  21 + user_status: '',
  22 + status_num: '',
  23 + text: '',
  24 + },
  25 + label_ids: [],
  26 + familyid: 0, //家庭ID
  27 + hasimg: '',
  28 + DefId: ''
  29 + },
  30 +
  31 + // 打电话
  32 + makePhoneCall() {
  33 + let that = this;
  34 + var list = that.data.list
  35 + var phoneNumber = list.mobile
  36 + wx.makePhoneCall({
  37 + phoneNumber: phoneNumber
  38 + })
  39 + },
  40 + //获取成员详细信息
  41 + getUserInfo() {
  42 + let that = this;
  43 + let url = 'counselor/deflist';
  44 + let params = {
  45 + DefId: that.data.DefId
  46 + }
  47 + app.post(url, params).then((res) => {
  48 + console.log(res)
  49 + if (res.data.code == 200) {
  50 + var list = res.data.data.list
  51 + if (res.data.data.list.picurl != '') {
  52 + this.setData({
  53 + hasimg: true
  54 + })
  55 + }
  56 + var label_ids = this.data.label_ids
  57 + var label_list = res.data.data.label_list
  58 + for (var i = 0; i < label_list.length; i++) {
  59 + for (var j = 0; j < label_list[i].data.length; j++) {
  60 + if (label_list[i].data[j].status == 1) {
  61 + label_ids.push(label_list[i].data[j].id)
  62 + }
  63 + }
  64 + }
  65 + var list = res.data.data.list;
  66 + list.sex = res.data.data.list.sex;
  67 + console.log(list.sex)
  68 + that.setData({
  69 + list: list,
  70 + label_list: res.data.data.label_list,
  71 + sex_index: res.data.data.list.sex,
  72 + card_index: parseInt(res.data.data.list.user_status) - 1,
  73 + addsess_current: res.data.data.list.mid,
  74 + label_ids: label_ids
  75 + })
  76 +
  77 + }
  78 + }).catch((errMsg) => {
  79 + console.log(errMsg)
  80 + })
  81 + },
  82 +
  83 +
  84 + /**
  85 + * 生命周期函数--监听页面加载
  86 + */
  87 + onLoad: function (options) {
  88 + this.setData({
  89 + DefId: options.DefId,
  90 + })
  91 + if (options.DefId == undefined) {
  92 + this.setData({
  93 + DefId: ''
  94 + })
  95 + } else {
  96 + this.setData({
  97 + DefId: options.DefId
  98 + })
  99 + this.getUserInfo();
  100 + }
  101 + },
  102 +
  103 + /**
  104 + * 生命周期函数--监听页面初次渲染完成
  105 + */
  106 + onReady: function () {
  107 +
  108 + },
  109 +
  110 + /**
  111 + * 生命周期函数--监听页面显示
  112 + */
  113 + onShow: function () {
  114 +
  115 + },
  116 +
  117 + /**
  118 + * 生命周期函数--监听页面隐藏
  119 + */
  120 + onHide: function () {
  121 +
  122 + },
  123 +
  124 + /**
  125 + * 生命周期函数--监听页面卸载
  126 + */
  127 + onUnload: function () {
  128 +
  129 + },
  130 +
  131 + /**
  132 + * 页面相关事件处理函数--监听用户下拉动作
  133 + */
  134 + onPullDownRefresh: function () {
  135 +
  136 + },
  137 +
  138 + /**
  139 + * 页面上拉触底事件的处理函数
  140 + */
  141 + onReachBottom: function () {
  142 +
  143 + },
  144 +
  145 + /**
  146 + * 用户点击右上角分享
  147 + */
  148 + onShareAppMessage: function () {
  149 +
  150 + }
  151 +})
  1 +{
  2 + "usingComponents": {}
  3 +}
  1 +<!--pages/EntryInformation/EntryInformation.wxml-->
  2 +<form bindsubmit='listVerify'>
  3 + <view class='content_item'>
  4 + <view class='item_list'>
  5 + <view class='list_title'>
  6 + <text>姓名</text>
  7 + </view>
  8 + <view class='list_input'>
  9 + <input type='text' placeholder='' value='{{list.name}}' disabled='true'></input>
  10 + </view>
  11 + </view>
  12 + <view class='item_list'>
  13 + <view class='list_title'>
  14 + <text>性别</text>
  15 + </view>
  16 + <view class='list_input'>
  17 + <view class='picker' range='{{sexArray}}' value='{{sex_index}}'>
  18 + <input placeholder='' value='{{sexArray[sex_index]}}' disabled='true'></input>
  19 + </view>
  20 + </view>
  21 + </view>
  22 + <view class='item_list'>
  23 + <view class='list_title'>
  24 + <text>家庭角色</text>
  25 + </view>
  26 + <view class='list_input'>
  27 + <input type='text' placeholder='' value='{{list.family_role}}' disabled='true' disabled='true'></input>
  28 + </view>
  29 + </view>
  30 + <view class='item_list'>
  31 + <view class='list_title'>个人年收入</view>
  32 + <view class='list_input'>
  33 + <!-- <input type='text' placeholder='' value='{{list.money}}' disabled='true' disabled='true'></input> -->
  34 + <text>{{list.money}}</text>
  35 + <text>万</text>
  36 + </view>
  37 + </view>
  38 + <view class='item_list' catchtap='makePhoneCall'>
  39 + <view class='list_title'>手机号 </view>
  40 + <view class='list_input'>
  41 + <input type='text' placeholder='' value='{{list.mobile}}' disabled='true' disabled='true'></input>
  42 + </view>
  43 + </view>
  44 +
  45 + <view class='item_list'>
  46 + <view class='list_title'>
  47 + <text>出生日期</text>
  48 + </view>
  49 + <view class='list_input'>
  50 + <view class='picker' mode="date" value='{{list.birthday}}'>
  51 + <input placeholder='' value='{{list.birthday}}' disabled='true'></input>
  52 + </view>
  53 + </view>
  54 + </view>
  55 + <view class='item_list'>
  56 + <view class='list_title'>单位名称 </view>
  57 + <view class='list_input'>
  58 + <input type='text' placeholder='' value='{{list.work}}' disabled='true' disabled='true'></input>
  59 + </view>
  60 + </view>
  61 + <view class='item_list'>
  62 + <view class='list_title'>单位地址 </view>
  63 + <view class='list_input'>
  64 + <input type='text' placeholder='' value='{{list.work_address}}' disabled='true' disabled='true'></input>
  65 + </view>
  66 + </view>
  67 + <view class='item_list' style='align-items:flex-start;'>
  68 + <view class='list_title'>家庭地址 </view>
  69 + <view class='list_input'>
  70 + <textarea type='text' placeholder='' value='{{list.address}}' disabled='true' disabled='true' style='height:120rpx;'></textarea>
  71 + </view>
  72 + </view>
  73 +
  74 + <view class='item_list'>
  75 + <view class='list_title'>通讯地址 </view>
  76 + <view class='list_input'>
  77 + <view class="address_btn {{addsess_current==1?'unit_address':''}}" data-current='1'>家庭地址</view>
  78 + <view class="address_btn {{addsess_current==2?'unit_address':''}}" data-current='2'>单位地址</view>
  79 + </view>
  80 + </view>
  81 +
  82 + <view class='item_list'>
  83 + <view class='list_title'>证件类型</view>
  84 + <view class='list_input'>
  85 + <view class='picker' range='{{card_Array}}' value='{{card_index}}'>
  86 + <input placeholder='' value='{{card_Array[card_index]}}' disabled='true'></input>
  87 + </view>
  88 + </view>
  89 + </view>
  90 + <view class='item_list'>
  91 + <view class='list_title'>证件号 </view>
  92 + <view class='list_input'>
  93 + <input type='text' placeholder='' value='{{list.status_num}}' disabled='true'></input>
  94 + </view>
  95 + </view>
  96 + </view>
  97 + <view class='box'>
  98 + <!-- 上传图片 -->
  99 + <view class='upload_box' wx:if='{{list.picurl}}'>
  100 + <view class='popup_img' >
  101 + <image src='{{list.picurl}}' mode="widthFix"></image>
  102 + </view>
  103 + </view>
  104 + </view>
  105 + <view class='content_item'>
  106 + <view class='item_list'>
  107 + <view class='list_title'>客户描述</view>
  108 + </view>
  109 + <view class='list_textarea'>
  110 + <textarea placeholder='' value='{{list.text}}' placeholder-class='font_color' bindinput='descript' disabled='true'></textarea>
  111 + </view>
  112 + </view>
  113 + <view class='content_item'>
  114 + <view class='item_list'>
  115 + <view class='list_title' style='width: 100%;text-align: center;'>客户画像</view>
  116 + </view>
  117 + <view class='item_list item_label_box' wx:for='{{label_list}}' wx:key='' wx:for-index='mindex'>
  118 + <view class='list_label_title'>{{item.label}} </view>
  119 + <view class='list_label'>
  120 + <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>
  121 + </view>
  122 + </view>
  123 + </view>
  124 +
  125 + <!-- 底部按钮 -->
  126 + <!-- <view class='null_box'></view>
  127 + <view class='bottom_box'>
  128 + <button class='bottom_btn' data-type='complete' formType='submit'>完成</button>
  129 + </view> -->
  130 +</form>
  1 +/* pages/my/listDetail/listDetail.wxss */
  2 +
  3 +page {
  4 + background: #f5f5fa;
  5 +}
  6 +
  7 +.content_item {
  8 + background: #fff;
  9 + padding: 0 38rpx;
  10 + margin-top: 16rpx;
  11 +}
  12 +
  13 +.item_list {
  14 + display: flex;
  15 + align-items: center;
  16 + border-bottom: 1rpx dashed #ebebeb;
  17 + padding: 23rpx 0;
  18 +}
  19 +
  20 +.list_icon {
  21 + font-size: 30rpx;
  22 + color: #f00;
  23 + margin-right: 10rpx;
  24 +}
  25 +
  26 +.list_title {
  27 + width: 185rpx;
  28 + font-size: 29rpx;
  29 + color: #000;
  30 +}
  31 +
  32 +.list_label_title {
  33 + width: 140rpx;
  34 + font-size: 29rpx;
  35 + color: #000;
  36 +}
  37 +
  38 +.project {
  39 + background: none;
  40 +}
  41 +
  42 +.symbol_icon {
  43 + font-size: 27rpx;
  44 + color: red;
  45 +}
  46 +
  47 +.list_input {
  48 + width: 75%;
  49 + display: flex;
  50 + align-items: center;
  51 + font-size: 29rpx;
  52 + color: #000;
  53 +}
  54 +
  55 +.list_input input {
  56 + border: 0;
  57 + outline: none;
  58 + font-size: 30rpx;
  59 + color: #000;
  60 +}
  61 +.list_input textarea{
  62 + overflow: scroll;
  63 +}
  64 +.list_input .picker {
  65 + width: 100%;
  66 + height: 53rpx;
  67 + font-size: 30rpx;
  68 + color: #000;
  69 + line-height: 53rpx;
  70 +}
  71 +
  72 +.item_label_box {
  73 + align-items: flex-start;
  74 +}
  75 +
  76 +.list_label {
  77 + width: 75%;
  78 + display: flex;
  79 + align-items: center;
  80 + flex-wrap: wrap;
  81 +}
  82 +
  83 +.list_label .address_btn {
  84 + margin-bottom: 20rpx;
  85 +}
  86 +
  87 +.list_textarea {
  88 + width: 100%;
  89 +}
  90 +
  91 +.list_textarea textarea {
  92 + width: 100%;
  93 + padding: 30rpx 0;
  94 + box-sizing: border-box;
  95 + min-height: 140rpx;
  96 +}
  97 +
  98 +.font_color {
  99 + font-size: 28rpx;
  100 + color: #999;
  101 +}
  102 +
  103 +.icon-add {
  104 + font-size: 32rpx;
  105 + color: #ccc;
  106 + text-align: center;
  107 + padding: 20rpx 0;
  108 +}
  109 +
  110 +.icon-jinru {
  111 + float: right;
  112 + color: #ccc;
  113 +}
  114 +
  115 +.item {
  116 + justify-content: space-between;
  117 +}
  118 +
  119 +.box {
  120 + padding: 0 32rpx;
  121 +}
  122 +
  123 +.upload_box {
  124 + font-size: 28rpx;
  125 + color: #1a1a1a;
  126 + background: #fff;
  127 + margin-top: 16rpx;
  128 + text-align: center;
  129 + /* padding: 36rpx 0; */
  130 + border-radius: 10rpx;
  131 + box-shadow: 2rpx 0rpx 3rpx rgba(235, 235, 235, 1);
  132 + overflow: hidden;
  133 +}
  134 +
  135 +.upload_box .icon-add {
  136 + font-size: 64rpx;
  137 +}
  138 +
  139 +.popup_img {
  140 + width: 100%;
  141 + height: 100%;
  142 + display: flex;
  143 + align-items: center;
  144 + justify-content: center;
  145 +}
  146 +
  147 +.popup_img image {
  148 + width: 100%;
  149 +}
  150 +/* .icon-guanbi {
  151 + position: absolute;
  152 + top: 10rpx;
  153 + right: 20rpx;
  154 + color: #ccc;
  155 +} */
  156 +
  157 +.upload_box .icon-add {
  158 + font-size: 64rpx;
  159 +}
  160 +
  161 +.content_info {
  162 + font-size: 24rpx;
  163 + color: #999;
  164 + margin-top: 22rpx;
  165 +}
  166 +
  167 +.null_box {
  168 + width: 100%;
  169 + height: 120rpx;
  170 +}
  171 +
  172 +.bottom_box {
  173 + width: 100%;
  174 + height: 100rpx;
  175 + background: rgba(255, 255, 255, 1);
  176 + box-shadow: 1rpx 0rpx 1rpx rgba(235, 233, 232, 1);
  177 + display: flex;
  178 + align-items: center;
  179 + justify-content: flex-end;
  180 + position: fixed;
  181 + bottom: 0;
  182 + padding: 0 32rpx;
  183 + z-index: 5;
  184 + box-sizing: border-box;
  185 +}
  186 +
  187 +.bottom_btn {
  188 + width: 100%;
  189 + height: 80rpx;
  190 + font-size: 32rpx;
  191 + color: #fff;
  192 + background: rgba(2, 134, 255, 1);
  193 + border-radius: 44rpx;
  194 + display: flex;
  195 + align-items: center;
  196 + justify-content: center;
  197 +}
  198 +
  199 +.add_btn {
  200 + width: 260rpx;
  201 + height: 80rpx;
  202 + font-size: 32rpx;
  203 + color: #1a1a1a;
  204 + background: #fff;
  205 + border: 1rpx solid #ebebeb;
  206 + border-radius: 40rpx;
  207 + display: flex;
  208 + align-items: center;
  209 + justify-content: center;
  210 + margin-left: 200rpx;
  211 + margin-right: 20rpx;
  212 +}
  213 +
  214 +.addrisk {
  215 + width: 70%;
  216 + display: flex;
  217 + align-items: center;
  218 + justify-content: space-between;
  219 + text-align: left;
  220 +}
  221 +
  222 +.unit {
  223 + text-align: left;
  224 +}
  225 +
  226 +.address_btn {
  227 + background: none;
  228 + border: 1rpx solid #0286ff;
  229 + color: #0286ff;
  230 + font-size: 32rpx;
  231 + border-radius: 40rpx;
  232 + display: flex;
  233 + align-items: center;
  234 + justify-content: center;
  235 + margin-right: 20rpx;
  236 + padding: 8rpx 30rpx;
  237 +}
  238 +
  239 +.unit_address {
  240 + color: #fff;
  241 + background: rgba(2, 134, 255, 1);
  242 +}
  1 +// pages/Program/Program.js
  2 +const app = getApp();
  3 +Page({
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 + list: [],
  9 + temobj: {
  10 + name: '',
  11 + firm: '',
  12 + text: '',
  13 + last_state: true,
  14 + add_state: false,
  15 + input_stete:false
  16 + },
  17 +
  18 + },
  19 +
  20 + //获取预设方案列表
  21 + getlist() {
  22 + let that = this;
  23 + // var list=this.data.list
  24 + // list.push({
  25 + // name: '',
  26 + // firm: '',
  27 + // text: '',
  28 + // id: 0,
  29 + // last_state: true
  30 + // })
  31 + // that.setData({
  32 + // list: list
  33 + // })
  34 + let url = 'counselor/SchemeList';
  35 + let params = {
  36 + userId: app.globalData.UserId
  37 + }
  38 + app.post(url, params).then((res) => {
  39 + console.log(res)
  40 + if (res.data.code == 200) {
  41 + var list = res.data.data.list
  42 + if (list.length == 0) {
  43 + list.push({
  44 + name: '',
  45 + firm: '',
  46 + text: '',
  47 + id: 0,
  48 + last_state: true
  49 + })
  50 + that.setData({
  51 + list: list
  52 + })
  53 + } else {
  54 + that.setData({
  55 + list: res.data.data.list
  56 + })
  57 + }
  58 + that.getLength()
  59 + }
  60 + }).catch((err) => {
  61 + // console.log(err)
  62 + })
  63 + },
  64 +
  65 + //设置名字
  66 + setName(e) {
  67 + let that = this;
  68 + let list = that.data.list;
  69 + let index = e.currentTarget.dataset.index;
  70 + list[index].name = e.detail.value;
  71 + that.setData({
  72 + list: list
  73 + })
  74 + },
  75 +
  76 + //设置公司名
  77 + setFirm(e) {
  78 + let that = this;
  79 + let list = that.data.list;
  80 + let index = e.currentTarget.dataset.index;
  81 + list[index].firm = e.detail.value;
  82 + that.setData({
  83 + list: list
  84 + })
  85 + },
  86 +
  87 + //保障内容
  88 + setText(e) {
  89 + let that = this;
  90 + let list = that.data.list;
  91 + let index = e.currentTarget.dataset.index;
  92 + list[index].text = e.detail.value;
  93 + that.setData({
  94 + list: list
  95 + })
  96 + },
  97 +
  98 + //添加方案
  99 + addPlan(e) {
  100 + let that = this;
  101 + let list = that.data.list;
  102 + let index = e.currentTarget.dataset.index;
  103 + list[index].add_state = false
  104 + list[index].input_stete=true
  105 + this.setData({
  106 + list: list
  107 + })
  108 + let url = 'counselor/SchemeSave';
  109 + let params = {
  110 + userId: app.globalData.UserId,
  111 + schemeId: e.currentTarget.dataset.id,
  112 + name: list[index].name,
  113 + firm: list[index].firm,
  114 + text: list[index].text
  115 + }
  116 + app.post(url, params).then((res) => {
  117 + console.log(res)
  118 + if (res.data.code == 200) {
  119 + list.push({
  120 + name: '',
  121 + firm: '',
  122 + text: '',
  123 + id: 0,
  124 + last_state: true,
  125 + add_state: false,
  126 + input_stete:false
  127 + })
  128 + that.setData({
  129 + list: list
  130 + })
  131 + that.getLength2();
  132 + }
  133 + })
  134 + },
  135 +
  136 + getLength() {
  137 + var list = this.data.list
  138 + list[list.length - 1].add_state = true
  139 + for (var obj in list) {
  140 + if (obj == list.length - 1) {
  141 + list[list.length - 1].last_state = false
  142 + } else {
  143 + list[obj].last_state = true
  144 + }
  145 + }
  146 + this.setData({
  147 + list: list
  148 + })
  149 + },
  150 +
  151 + getLength2() {
  152 + // this.getlist()
  153 + var list = this.data.list
  154 + list[list.length - 1].add_state = true
  155 + for (var obj in list) {
  156 + if (obj == list.length - 1) {
  157 + list[list.length - 1].last_state = false
  158 + } else {
  159 + list[obj].last_state = true
  160 + }
  161 + }
  162 + this.setData({
  163 + list: list
  164 + })
  165 +
  166 + },
  167 +
  168 + //保存按钮
  169 + del(e) {
  170 + let that = this;
  171 + let index = e.currentTarget.dataset.index;
  172 + let list = that.data.list;
  173 + let id = e.currentTarget.dataset.id;
  174 + if (list.length != 1) {
  175 + wx.showModal({
  176 + title: '提示',
  177 + content: '是否删除预设方案',
  178 + cancelColor: '#000000',
  179 + confirmColor: '#3cc51f',
  180 + showCancel: true,
  181 + cancelText: '取消',
  182 + confirmText: '确定',
  183 + success(res) {
  184 + if (res.confirm) {
  185 + let url = 'counselor/SchemeDelete';
  186 + let params = {
  187 + SchemeId: id
  188 + }
  189 + app.post(url, params).then((res) => {
  190 + // console.log(res)
  191 + that.getlist();
  192 + })
  193 + } else if (res.cancel) {
  194 + // console.log('用户点击取消')
  195 + }
  196 + }
  197 + })
  198 + } else {
  199 + this.setData({
  200 + last_state: false
  201 + })
  202 + }
  203 + },
  204 +
  205 +
  206 + settemname(e) {
  207 + let that = this;
  208 + let temobj = that.data.temobj;
  209 + temobj.name = e.detail.value;
  210 + that.setData({
  211 + temobj: temobj
  212 + })
  213 + },
  214 +
  215 + settemfirm(e) {
  216 + let that = this;
  217 + let temobj = that.data.temobj;
  218 + temobj.firm = e.detail.value;
  219 + that.setData({
  220 + temobj: temobj
  221 + })
  222 + },
  223 +
  224 + settemtext(e) {
  225 + let that = this;
  226 + let temobj = that.data.temobj;
  227 + temobj.text = e.detail.value;
  228 + that.setData({
  229 + temobj: temobj
  230 + })
  231 + },
  232 +
  233 + deltemobj() {
  234 + let that = this;
  235 + let temobj = {
  236 + name: '',
  237 + firm: '',
  238 + text: '',
  239 + }
  240 + that.setData({
  241 + temobj: temobj
  242 + })
  243 + },
  244 +
  245 +
  246 +
  247 + //保存所有
  248 + allsave() {
  249 + let that = this;
  250 + let list = this.data.list;
  251 + console.log(list[list.length - 1].name);
  252 + console.log(list[list.length - 1].id)
  253 + if (list[list.length - 1].name != '' && list[list.length - 1].id != 0) {
  254 + let url = 'counselor/SchemeSave';
  255 + let params = {
  256 + userId: app.globalData.UserId,
  257 + schemeId: list[list.length - 1].id,
  258 + name: list[list.length - 1].name,
  259 + firm: list[list.length - 1].firm,
  260 + text: list[list.length - 1].text
  261 + }
  262 + app.post(url, params).then((res) => {
  263 + console.log(res)
  264 + if (res.data.code == 200) {
  265 + // wx.showToast({
  266 + // title: '添加成功',
  267 + // })
  268 + wx.navigateBack({
  269 + delta: 1
  270 + })
  271 + }
  272 +
  273 + })
  274 + } else {
  275 + list.pop()
  276 + that.setData({
  277 + list: list
  278 + })
  279 + wx.navigateBack({
  280 +
  281 + })
  282 + }
  283 + that.getlist();
  284 + console.log(that.data.list)
  285 + },
  286 +
  287 + /**
  288 + * 生命周期函数--监听页面加载
  289 + */
  290 + onLoad: function(options) {
  291 + let that = this;
  292 + that.getlist();
  293 +
  294 + },
  295 +
  296 + /**
  297 + * 生命周期函数--监听页面初次渲染完成
  298 + */
  299 + onReady: function() {
  300 +
  301 + },
  302 +
  303 + /**
  304 + * 生命周期函数--监听页面显示
  305 + */
  306 + onShow: function() {
  307 + let that = this;
  308 + that.getlist();
  309 + },
  310 +
  311 + /**
  312 + * 生命周期函数--监听页面隐藏
  313 + */
  314 + onHide: function() {
  315 +
  316 + },
  317 +
  318 + /**
  319 + * 生命周期函数--监听页面卸载
  320 + */
  321 + onUnload: function() {
  322 +
  323 + },
  324 +
  325 + /**
  326 + * 页面相关事件处理函数--监听用户下拉动作
  327 + */
  328 + onPullDownRefresh: function() {
  329 +
  330 + },
  331 +
  332 + /**
  333 + * 页面上拉触底事件的处理函数
  334 + */
  335 + onReachBottom: function() {
  336 +
  337 + },
  338 +
  339 + /**
  340 + * 用户点击右上角分享
  341 + */
  342 + onShareAppMessage: function() {
  343 +
  344 + }
  345 +})
  1 +{
  2 + "navigationBarTitleText": "方案预设"
  3 +}
  1 +<!--pages/Program/Program.wxml-->
  2 +<view wx:for='{{list}}' wx:key>
  3 + <view class='line_box'></view>
  4 + <view class='content_box'>
  5 + <view class='item_list'>
  6 + <view>产品名称</view>
  7 + <view class='list_input'>
  8 + <input placeholder='请输入产品名称' value='{{item.name}}' bindinput='setName' data-index='{{index}}' placeholder-class='pl_style' disabled='{{item.last_state}}'></input>
  9 + </view>
  10 + </view>
  11 + <view class='item_list'>
  12 + <view>保险公司</view>
  13 + <view class='list_input'>
  14 + <input placeholder='请输入保险公司' value='{{item.firm}}' bindinput='setFirm' data-index='{{index}}' placeholder-class='pl_style' disabled='{{item.last_state}}'></input>
  15 + </view>
  16 + </view>
  17 + <view class='item_list'>
  18 + <view>保障内容</view>
  19 + <view class='list_input'>
  20 + <textarea placeholder='请输入保障内容' value='{{item.text}}' bindinput='setText' data-index='{{index}}' placeholder-class='pl_style' disabled='{{item.last_state}}'></textarea>
  21 + </view>
  22 + </view>
  23 + </view>
  24 + <view class='list_btn_box'>
  25 + <view class='list_btn' bindtap='del' data-id='{{item.id}}' wx:if='{{item.last_state}}'>删除方案</view>
  26 + <view class='list_btn add_btn' bindtap='addPlan' data-id='{{item.id}}' data-index='{{index}}' wx:if='{{item.add_state}}'>添加方案</view>
  27 + </view>
  28 + <!-- <view class='line_box'></view> -->
  29 +</view>
  30 +<!-- <view wx:if='{{}}'>
  31 + <view class='content_box'>
  32 + <view class='item_list'>
  33 + <view>产品名称</view>
  34 + <view class='list_input'>
  35 + <input placeholder='请输入产品名称' value='{{temobj.name}}' bindinput='settemname'></input>
  36 + </view>
  37 + </view>
  38 + <view class='item_list'>
  39 + <view>保险公司</view>
  40 + <view class='list_input'>
  41 + <input placeholder='请输入保险公司' value='{{temobj.firm}}' bindinput='settemfirm'></input>
  42 + </view>
  43 + </view>
  44 + <view class='item_list'>
  45 + <view>保障内容</view>
  46 + <view class='list_input'>
  47 + <textarea placeholder='请输入保障内容' value='{{temobj.text}}' bindinput='settemtext'></textarea>
  48 + </view>
  49 + </view>
  50 + </view>
  51 + <view class='list_btn_box'>
  52 + <view class='list_btn' bindtap='deltemobj'>删除方案</view>
  53 + <view class='list_btn add_btn' bindtap='addtemobj'>添加方案</view>
  54 + </view>
  55 +</view> -->
  56 +<view class='bottom_box'>
  57 + <view class='save_btn' bindtap='allsave'>保存</view>
  58 +</view>
  1 +/* pages/Program/Program.wxss */
  2 +
  3 +page {
  4 + padding: 0 0 150rpx 0;
  5 +}
  6 +
  7 +.line_box {
  8 + width: 100%;
  9 + height: 16rpx;
  10 + background: #e5e5e5;
  11 +}
  12 +
  13 +.content_box {
  14 + padding: 0 30rpx;
  15 +}
  16 +
  17 +.item_list {
  18 + display: flex;
  19 + align-items: flex-start;
  20 + font-size: 28rpx;
  21 + color: #000;
  22 + padding: 25rpx 0;
  23 + border-bottom: 1rpx solid #f5f5fa;
  24 +}
  25 +
  26 +.list_input {
  27 + width: 79%;
  28 + margin-left: 30rpx;
  29 + font-size: 28rpx;
  30 +}
  31 +
  32 +.list_input input {
  33 + width: 100%;
  34 + border: 0;
  35 + outline: none;
  36 + padding-bottom: 3rpx;
  37 + box-sizing: border-box;
  38 + font-size: 28rpx;
  39 +}
  40 +
  41 +.list_input textarea {
  42 + width: 100%;
  43 + height: 200rpx;
  44 + padding-top: 10rpx;
  45 + font-size: 28rpx;
  46 + box-sizing: border-box;
  47 +}
  48 +
  49 +.pl_style {
  50 + font-size: 28rpx;
  51 + color: #999;
  52 +}
  53 +
  54 +.list_btn_box {
  55 + padding: 13rpx 30rpx;
  56 + display: flex;
  57 + align-items: center;
  58 + justify-content: flex-end;
  59 +}
  60 +
  61 +.list_btn {
  62 + width: 182rpx;
  63 + height: 62rpx;
  64 + border: 1rpx solid rgba(226, 226, 226, 1);
  65 + border-radius: 30rpx;
  66 + font-size: 26rpx;
  67 + color: #000;
  68 + display: flex;
  69 + align-items: center;
  70 + justify-content: center;
  71 +}
  72 +
  73 +.add_btn {
  74 + border: 0;
  75 + background: #0286ff;
  76 + color: #fff;
  77 + margin-left: 20rpx;
  78 +}
  79 +
  80 +.bottom_box {
  81 + width: 100%;
  82 + padding: 30rpx;
  83 + position: fixed;
  84 + bottom: 0;
  85 + left: 0;
  86 + box-sizing: border-box;
  87 + z-index: 100;
  88 + background: #fff;
  89 +}
  90 +
  91 +.save_btn {
  92 + width: 100%;
  93 + height: 88rpx;
  94 + background: #0286ff;
  95 + border-radius: 44rpx;
  96 + font-size: 32rpx;
  97 + color: #fff;
  98 + display: flex;
  99 + align-items: center;
  100 + justify-content: center;
  101 +}
  1 +// pages/Suggest/Suggest.js
  2 +const app = getApp();
  3 +Page({
  4 +
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + list: []
  10 + },
  11 + setcontent(e) {
  12 + let list = this.data.list;
  13 + list.content = e.detail.value;
  14 + this.setData({
  15 + list: list
  16 + })
  17 + },
  18 + setreprt(e) {
  19 + let list = this.data.list;
  20 + list.report = e.detail.value;
  21 + this.setData({
  22 + list: list
  23 + })
  24 + },
  25 +
  26 + //查看预设建议列表
  27 + getAdviseLook() {
  28 + let that = this;
  29 + let url = 'counselor/AdviseLook';
  30 + app.post(url, {
  31 + userId: app.globalData.UserId
  32 + }).then((res) => {
  33 + if (res.data.code == 200) {
  34 + that.setData({
  35 + list: res.data.data
  36 + })
  37 + }
  38 + }).catch((err) => {
  39 + console.log(err)
  40 + })
  41 + },
  42 +
  43 + save_btn() {
  44 + let that = this;
  45 + let url = 'counselor/AdviseSave';
  46 + let params = {
  47 + userId: app.globalData.UserId,
  48 + report: that.data.list.report,
  49 + advise: that.data.list.content
  50 + }
  51 + app.post(url, params).then((res) => {
  52 + console.log(res)
  53 + if (res.data.code == 200) {
  54 + wx.showToast({
  55 + title: '保存成功',
  56 + icon: 'none',
  57 + duration: 2000,
  58 + })
  59 + setTimeout(function() {
  60 + wx.navigateBack({
  61 + delta: 1,
  62 + })
  63 + }, 1000)
  64 + }
  65 + }).catch((err) => {
  66 + console.log(err)
  67 + })
  68 +
  69 + },
  70 +
  71 + /**
  72 + * 生命周期函数--监听页面加载
  73 + */
  74 + onLoad: function(options) {
  75 + let that = this;
  76 + that.getAdviseLook();
  77 + },
  78 +
  79 + /**
  80 + * 生命周期函数--监听页面初次渲染完成
  81 + */
  82 + onReady: function() {
  83 +
  84 + },
  85 +
  86 + /**
  87 + * 生命周期函数--监听页面显示
  88 + */
  89 + onShow: function() {
  90 + let that = this;
  91 + that.getAdviseLook();
  92 + },
  93 +
  94 + /**
  95 + * 生命周期函数--监听页面隐藏
  96 + */
  97 + onHide: function() {
  98 +
  99 + },
  100 +
  101 + /**
  102 + * 生命周期函数--监听页面卸载
  103 + */
  104 + onUnload: function() {
  105 +
  106 + },
  107 +
  108 + /**
  109 + * 页面相关事件处理函数--监听用户下拉动作
  110 + */
  111 + onPullDownRefresh: function() {
  112 +
  113 + },
  114 +
  115 + /**
  116 + * 页面上拉触底事件的处理函数
  117 + */
  118 + onReachBottom: function() {
  119 +
  120 + },
  121 +
  122 + /**
  123 + * 用户点击右上角分享
  124 + */
  125 + onShareAppMessage: function() {
  126 +
  127 + }
  128 +})
  1 +{
  2 + "navigationBarTitleText": "建议预设"
  3 +}
  1 +<!--pages/Suggest/Suggest.wxml-->
  2 +<view class='line_box'></view>
  3 +<view class='content_box'>
  4 + <view class='list_title'>体检报告预设</view>
  5 + <view class='list_input'>
  6 + <textarea placeholder='请输入预设的体检报告' placeholder-class='pl_style' value='{{list.content}}' bindinput='setcontent'></textarea>
  7 + </view>
  8 +</view>
  9 +<view class='line_box'></view>
  10 +<view class='content_box'>
  11 + <view class='list_title'>建议预设</view>
  12 + <view class='list_input'>
  13 + <textarea placeholder='请输入预设的建议' bindinput='setreprt' placeholder-class='pl_style'
  14 + value='{{list.report}}'></textarea>
  15 + </view>
  16 +</view>
  17 +<view class='bottom_box'>
  18 + <view class='save_btn' bindtap='save_btn'>保存</view>
  19 +</view>
  1 +/* pages/Suggest/Suggest.wxss */
  2 +
  3 +.line_box {
  4 + width: 100%;
  5 + height: 16rpx;
  6 + background: #e5e5e5;
  7 +}
  8 +
  9 +.content_box {
  10 + /* margin-top: 16rpx; */
  11 + background: #fff;
  12 +}
  13 +
  14 +.list_title {
  15 + font-size: 30rpx;
  16 + font-weight: bold;
  17 + color: #1a1a1a;
  18 + padding: 25rpx 30rpx;
  19 + border-bottom: 1rpx solid #ebebeb;
  20 +}
  21 +
  22 +.list_input {
  23 + padding: 30rpx;
  24 +}
  25 +
  26 +.list_input textarea {
  27 + width: 100%;
  28 + border: 0;
  29 + outline: none;
  30 + font-size: 28rpx;
  31 + color: #1a1a1a;
  32 +}
  33 +
  34 +.pl_style {
  35 + font-size: 28rpx;
  36 + color: #999999;
  37 +}
  38 +
  39 +.bottom_box {
  40 + width: 100%;
  41 + padding: 30rpx;
  42 + position: fixed;
  43 + bottom: 0;
  44 + left: 0;
  45 + box-sizing: border-box;
  46 +}
  47 +
  48 +.save_btn {
  49 + width: 100%;
  50 + height: 88rpx;
  51 + background: #0286ff;
  52 + border-radius: 44rpx;
  53 + font-size: 32rpx;
  54 + color: #fff;
  55 + display: flex;
  56 + align-items: center;
  57 + justify-content: center;
  58 +}
  1 +// pages/index/TB/TB.js
  2 +const app = getApp();
  3 +var WxParse = require('../../../wxParse/wxParse.js');
  4 +Page({
  5 +
  6 + /**
  7 + * 页面的初始数据
  8 + */
  9 + data: {
  10 + popup_stete: false,
  11 + tlist: '',
  12 + Page: 0
  13 + },
  14 + //说明
  15 + instructionsInfo() {
  16 + this.setData({
  17 + popup_stete: true
  18 + })
  19 + },
  20 + //取消弹窗
  21 + setpopupflase() {
  22 + console.log(1);
  23 + this.setData({
  24 + popup_stete: false
  25 + })
  26 + },
  27 +
  28 + //个人中心T币接口
  29 + gettlist() {
  30 + let that = this;
  31 + let url = 'counselor/tlist';
  32 + let params = {
  33 + UserId: app.globalData.UserId,
  34 + Page: that.data.Page
  35 + }
  36 + app.post(url, params).then((res) => {
  37 + console.log(res);
  38 + if (res.data.code == 200) {
  39 + that.setData({
  40 + tlist: res.data.data
  41 + })
  42 + }
  43 + }).catch((err) => {
  44 + console.log(err)
  45 + })
  46 + },
  47 +
  48 +
  49 + //TB信息内容接口
  50 + aboutTB() {
  51 + let that = this;
  52 + let url = 'pubilc/about';
  53 + app.post(url, {
  54 + AboutType: 10
  55 + }).then((res) => {
  56 + if (res.data.code == 200) {
  57 + console.log(res)
  58 + console.log(res.data.data.post_content)
  59 + WxParse.wxParse('content', 'html', res.data.data.post_content, that, 5);
  60 + }
  61 + }).catch((err) => {
  62 + console.log(err)
  63 + })
  64 + },
  65 +
  66 + /**
  67 + * 生命周期函数--监听页面加载
  68 + */
  69 + onLoad: function(options) {
  70 +
  71 + },
  72 +
  73 + /**
  74 + * 生命周期函数--监听页面初次渲染完成
  75 + */
  76 + onReady: function() {
  77 +
  78 + },
  79 +
  80 + /**
  81 + * 生命周期函数--监听页面显示
  82 + */
  83 + onShow: function() {
  84 + let that = this;
  85 + that.gettlist();
  86 + that.aboutTB();
  87 +
  88 + },
  89 +
  90 + /**
  91 + * 生命周期函数--监听页面隐藏
  92 + */
  93 + onHide: function() {
  94 +
  95 + },
  96 +
  97 + /**
  98 + * 生命周期函数--监听页面卸载
  99 + */
  100 + onUnload: function() {
  101 +
  102 + },
  103 +
  104 + /**
  105 + * 页面相关事件处理函数--监听用户下拉动作
  106 + */
  107 + onPullDownRefresh: function() {
  108 +
  109 + },
  110 +
  111 + /**
  112 + * 页面上拉触底事件的处理函数
  113 + */
  114 + onReachBottom: function() {
  115 +
  116 + },
  117 +
  118 + /**
  119 + * 用户点击右上角分享
  120 + */
  121 + onShareAppMessage: function() {
  122 +
  123 + }
  124 +})
  1 +{
  2 + "navigationBarTitleText": "T币"
  3 +}
  1 +<!--pages/my/myConsultantPersonalCentre/myConsultantPersonalCentre.wxml-->
  2 +<view class='banner_box'>
  3 + <view class='banner_title'>
  4 + <view>我的T币</view>
  5 + <view bindtap='instructionsInfo'>
  6 + <text class='iconfont icon-shuoming'></text>
  7 + <text>说明</text>
  8 + </view>
  9 + </view>
  10 + <view class='money'>{{tlist.balance}}</view>
  11 +</view>
  12 +
  13 +<view class="content_item">
  14 + <view class='content_title'>
  15 + <text class='iconfont icon-jiaoyijilu'></text>
  16 + <text>交易记录</text>
  17 + </view>
  18 + <view class='scroll_box'>
  19 + <scroll-view scroll-y>
  20 + <view class="item_list" wx:for='{{tlist.payllist}}' wx:key>
  21 + <view class="list_content">
  22 + <view>{{item.description}}</view>
  23 + </view>
  24 + <view class='list_info'>
  25 + <view class=" ">{{item.text}}</view>
  26 + <view class=" ">{{item.time}}</view>
  27 + </view>
  28 + </view>
  29 + </scroll-view>
  30 + </view>
  31 +</view>
  32 +
  33 +<view class='mask_box' wx:if="{{popup_stete}}" bindtap='setpopupflase'>
  34 + <view class='tri'></view>
  35 + <view class='popup_box' catchtap='funvoid'>
  36 + <import src="../../../wxParse/wxParse.wxml" />
  37 + <template is="wxParse" data="{{wxParseData:content.nodes}}" />
  38 + </view>
  39 +</view>
  1 +/* pages/my/myConsultantPersonalCentre/myConsultantPersonalCentre.wxss */
  2 +
  3 +page {
  4 + background-color: #f5f5fa;
  5 +}
  6 +
  7 +.banner_box {
  8 + width: 100%;
  9 + height: 300rpx;
  10 + background-color: #0c8aff;
  11 + padding: 32rpx 34rpx;
  12 + box-sizing: border-box;
  13 + position: fixed;
  14 + top: 0;
  15 + left: 0;
  16 + z-index: 10;
  17 +}
  18 +
  19 +.banner_title {
  20 +
  21 + font-size: 26rpx;
  22 + color: #ffff;
  23 + display: flex;
  24 + justify-content: space-between;
  25 + align-items: center;
  26 +}
  27 +
  28 +.icon-shuoming {
  29 + margin-right: 10rpx;
  30 +}
  31 +
  32 +.money {
  33 + font-size: 120rpx;
  34 + color: #fff;
  35 + margin-top: 75rpx;
  36 +}
  37 +
  38 +.content_item {
  39 + background-color: #fff;
  40 + overflow: hidden;
  41 + position: relative;
  42 + margin-top: 320rpx;
  43 +}
  44 +
  45 +.content_title {
  46 + font-size: 26rpx;
  47 + color: #0286ff;
  48 + margin: 33rpx 0 20rpx 33rpx;
  49 +}
  50 +
  51 +.icon-jiaoyijilu {
  52 + margin-right: 11rpx;
  53 +}
  54 +
  55 +.item_list {
  56 + font-size: 30rpx;
  57 + color: #1a1a1a;
  58 + display: flex;
  59 + justify-content: space-between;
  60 + align-items: flex-start;
  61 + border-bottom: 1rpx solid #ebebeb;
  62 + padding: 33rpx 35rpx;
  63 +}
  64 +
  65 +.mask_box {
  66 + width: 100%;
  67 + height: 100%;
  68 + background-color: rgba(0, 0, 0, 0.8);
  69 + position: fixed;
  70 + top: 0;
  71 + left: 0;
  72 + z-index: 100;
  73 +}
  74 +
  75 +.popup_box {
  76 + width: 85%;
  77 + font-size: 28rpx;
  78 + color: #1a1a1a;
  79 + background: rgba(255, 255, 255, 1);
  80 + border-radius: 10rpx;
  81 + box-shadow: 0rpx 0rpx 5rpx rgba(0, 0, 0, 0.08);
  82 + padding: 21rpx;
  83 + position: fixed;
  84 + top: 78rpx;
  85 + left: 50%;
  86 + transform: translateX(-50%);
  87 +}
  88 +
  89 +.tri {
  90 + position: absolute;
  91 + top: 68rpx;
  92 + right: 84rpx;
  93 + width: 0;
  94 + height: 0;
  95 + border-left: 16rpx solid transparent;
  96 + border-right: 16rpx solid transparent;
  97 + border-bottom: 10rpx solid #fff;
  98 +}
  99 +
  100 +.list_info {
  101 + text-align: right;
  102 +}
  1 +// pages/VipRecharge/VipRecharge.js
  2 +const app = getApp();
  3 +Page({
  4 +
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + viplist: [],
  10 + toplist: [],
  11 + mainlist: []
  12 + },
  13 +
  14 + //选择支付方式
  15 + buyWay(e) {
  16 + wx.navigateTo({
  17 + url: '../payWay/payWay?id=' + e.currentTarget.id + '&moneyt=' + e.currentTarget.dataset.moneyt + '&money=' + e.currentTarget.dataset.money,
  18 + })
  19 + },
  20 +
  21 + getvip() {
  22 + let that = this;
  23 + let url = 'counselor/vip';
  24 + app.post(url, {}).then((res) => {
  25 + console.log(res)
  26 + if (res.data.code == 200) {
  27 + let viplist = res.data.data.viplist;
  28 + let toplist = [];
  29 + let mainlist = [];
  30 + for (let obj of viplist) {
  31 + if (obj.status == 1) {
  32 + mainlist.push(obj)
  33 + } else if (obj.status == 2) {
  34 + toplist.push(obj)
  35 + }
  36 + }
  37 + that.setData({
  38 + viplist: viplist,
  39 + toplist: toplist,
  40 + mainlist: mainlist
  41 + })
  42 +
  43 + }
  44 + }).catch((err) => {
  45 + console.log(err)
  46 + })
  47 +
  48 + },
  49 +
  50 + /**
  51 + * 生命周期函数--监听页面加载
  52 + */
  53 + onLoad: function(options) {
  54 +
  55 + },
  56 +
  57 + /**
  58 + * 生命周期函数--监听页面初次渲染完成
  59 + */
  60 + onReady: function() {
  61 +
  62 + },
  63 +
  64 + /**
  65 + * 生命周期函数--监听页面显示
  66 + */
  67 + onShow: function() {
  68 + let that = this;
  69 + that.getvip();
  70 +
  71 + },
  72 +
  73 + /**
  74 + * 生命周期函数--监听页面隐藏
  75 + */
  76 + onHide: function() {
  77 +
  78 + },
  79 +
  80 + /**
  81 + * 生命周期函数--监听页面卸载
  82 + */
  83 + onUnload: function() {
  84 +
  85 + },
  86 +
  87 + /**
  88 + * 页面相关事件处理函数--监听用户下拉动作
  89 + */
  90 + onPullDownRefresh: function() {
  91 +
  92 + },
  93 +
  94 + /**
  95 + * 页面上拉触底事件的处理函数
  96 + */
  97 + onReachBottom: function() {
  98 +
  99 + },
  100 +
  101 + /**
  102 + * 用户点击右上角分享
  103 + */
  104 + onShareAppMessage: function() {
  105 +
  106 + }
  107 +})
  1 +{
  2 + "navigationBarTitleText": "会员充值"
  3 +}
  1 +<view class='content_box'>
  2 + <view class='banner_box'>
  3 + <view class='banner_img'>
  4 + <image src='/images/ele@2x.png'></image>
  5 + </view>
  6 + <text class='banner_info'>{{toplist[0].t_title}}</text>
  7 + <view class='banner_title'>{{toplist[0].title}}</view>
  8 + <!-- <view class='banner_content'>完成新手任务,赠送{{toplist[0].title}}</view> -->
  9 + <view class='banner_content'>{{toplist[0].t_text}}</view>
  10 + <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>
  11 + </view>
  12 + <view class='item_list_box'>
  13 + <view class="item_list {{(index+1)%2==0?'year_list':''}}" wx:for='{{mainlist}}' wx:key>
  14 + <view class='list_title'>{{item.title}}</view>
  15 + <view class='list_content'>
  16 + <text>优惠价{{item.money}}</text>
  17 + <text>或{{item.moneyt}}T币</text>
  18 + </view>
  19 + <navigator class='list_btn month_card' hover-class="navigator-hover"
  20 + url='/pages/index/payWay/payWay?id={{item.id}}&moneyt={{item.moneyt}}&title={{item.title}}&money={{item.backt}}' >立即购买</navigator>
  21 + </view>
  22 + </view>
  23 +</view>
  1 +page {
  2 + background: #f5f5fa;
  3 +}
  4 +
  5 +.content_box {
  6 + padding: 49rpx 30rpx 30rpx 30rpx;
  7 +}
  8 +
  9 +.banner_box {
  10 + width: 100%;
  11 + min-height: 317rpx;
  12 + padding: 40rpx;
  13 + background: linear-gradient(-30deg, rgba(75, 135, 243, 1), rgba(83, 147, 250, 1));
  14 + box-shadow: 0rpx 15rpx 30rpx 0rpx rgba(75, 135, 243, 0.24);
  15 + border-radius: 16rpx;
  16 + box-sizing: border-box;
  17 + position: relative;
  18 + display: flex;
  19 + align-items: center;
  20 + justify-content: center;
  21 + flex-direction: column;
  22 +}
  23 +
  24 +.banner_info {
  25 + font-size: 26rpx;
  26 + font-weight: bold;
  27 + color: #fff;
  28 + position: absolute;
  29 + left: 50%;
  30 + top: -20rpx;
  31 + transform: translateX(-50%);
  32 + z-index: 20;
  33 +}
  34 +
  35 +.banner_img {
  36 + width: 300rpx;
  37 + height: 55rpx;
  38 + position: absolute;
  39 + left: 50%;
  40 + top: -20rpx;
  41 + transform: translateX(-50%);
  42 + z-index: 10;
  43 +}
  44 +
  45 +.banner_img image {
  46 + width: 100%;
  47 + height: 100%;
  48 +}
  49 +
  50 +.banner_title {
  51 + font-size: 36rpx;
  52 + font-weight: bold;
  53 + color: #fff;
  54 +}
  55 +
  56 +.banner_content {
  57 + font-size: 28rpx;
  58 + color: #fff;
  59 + margin: 30rpx 0;
  60 +}
  61 +
  62 +.item_list_box {
  63 + display: flex;
  64 + align-items: center;
  65 + justify-content: space-between;
  66 + flex-wrap: wrap;
  67 + margin-top: 36rpx;
  68 +}
  69 +
  70 +.item_list {
  71 + width: 326rpx;
  72 + height: 225rpx;
  73 + background: linear-gradient(-30deg, rgba(255, 92, 46, 1), rgba(255, 152, 116, 1));
  74 + box-shadow: 0rpx 15rpx 30rpx 0rpx rgba(75, 135, 243, 0.24);
  75 + border-radius: 16rpx;
  76 + box-sizing: border-box;
  77 + position: relative;
  78 + display: flex;
  79 + align-items: center;
  80 + justify-content: center;
  81 + flex-direction: column;
  82 + margin-bottom: 36rpx;
  83 +}
  84 +
  85 +.list_title {
  86 + font-size: 30rpx;
  87 + color: #fff;
  88 +}
  89 +
  90 +.list_content {
  91 + font-size: 28rpx;
  92 + color: #fff;
  93 + margin: 20rpx 0;
  94 +}
  95 +
  96 +.list_btn {
  97 + font-size: 28rpx;
  98 + color: #508ef7;
  99 + background: #fff;
  100 + border-radius: 30rpx;
  101 + padding: 10rpx 30rpx;
  102 +}
  103 +
  104 +.month_card {
  105 + color: #ff6b40;
  106 +}
  107 +
  108 +.year_list {
  109 + background: linear-gradient(to right, #f7a80a, #fcc200);
  110 +}
  111 +
  112 +.year_card {
  113 + color: #e7ad27;
  114 +}
  1 +// pages/index/about/about.js
  2 +Page({
  3 +
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 +
  9 + },
  10 +
  11 + /**
  12 + * 生命周期函数--监听页面加载
  13 + */
  14 + onLoad: function (options) {
  15 +
  16 + },
  17 +
  18 + /**
  19 + * 生命周期函数--监听页面初次渲染完成
  20 + */
  21 + onReady: function () {
  22 +
  23 + },
  24 +
  25 + /**
  26 + * 生命周期函数--监听页面显示
  27 + */
  28 + onShow: function () {
  29 +
  30 + },
  31 +
  32 + /**
  33 + * 生命周期函数--监听页面隐藏
  34 + */
  35 + onHide: function () {
  36 +
  37 + },
  38 +
  39 + /**
  40 + * 生命周期函数--监听页面卸载
  41 + */
  42 + onUnload: function () {
  43 +
  44 + },
  45 +
  46 + /**
  47 + * 页面相关事件处理函数--监听用户下拉动作
  48 + */
  49 + onPullDownRefresh: function () {
  50 +
  51 + },
  52 +
  53 + /**
  54 + * 页面上拉触底事件的处理函数
  55 + */
  56 + onReachBottom: function () {
  57 +
  58 + },
  59 +
  60 + /**
  61 + * 用户点击右上角分享
  62 + */
  63 + onShareAppMessage: function () {
  64 +
  65 + }
  66 +})
  1 +<!--pages/index/about/about.wxml-->
  2 +<text>pages/index/about/about.wxml</text>
  1 +/* pages/index/about/about.wxss */