作者 王军

套餐

@@ -33,7 +33,47 @@ App({ @@ -33,7 +33,47 @@ App({
33 } 33 }
34 }) 34 })
35 }, 35 },
  36 + post: function (url, data, headerParams) {
  37 + wx.showNavigationBarLoading()
  38 + var promise = new Promise((resolve, reject) => {
  39 + //init
  40 + let that = this;
  41 + let postData = data;
  42 + let baseUrl = 'http://mite.w.brotop.cn';
  43 + //网络请求
  44 + let header = {
  45 + // 'XX-Device-Type': 'wxapp',
  46 + 'token': wx.getStorageSync("token") || ''
  47 + }
  48 + header = Object.assign(header, headerParams)
  49 + //网络请求
  50 + wx.request({
  51 + url: baseUrl + url,
  52 + data: postData,
  53 + method: headerParams,
  54 + header: header,
  55 + success: function (res) { //返回取得的数据
  56 + if (res.data.code == '1') {
  57 + resolve(res.data.data);
  58 + } else if (res.data.code == '201') {
  59 + resolve(res.data);
  60 + } else {
  61 + reject(res)
  62 + }
  63 + },
  64 + fail: function (e) {
  65 + reject('网络出错');
  66 + // wx.hideLoading()
  67 + wx.hideNavigationBarLoading()
  68 + },
  69 + complete: function () {
  70 + wx.hideNavigationBarLoading()
  71 + },
  72 + })
  73 + });
  74 + return promise;
  75 + },
36 globalData: { 76 globalData: {
37 - userInfo: null 77 + userInfo: null,
38 } 78 }
39 }) 79 })
@@ -8,11 +8,11 @@ @@ -8,11 +8,11 @@
8 "pages/serviceexperience/serviceexperience", 8 "pages/serviceexperience/serviceexperience",
9 "pages/serviceintro/serviceintro", 9 "pages/serviceintro/serviceintro",
10 "pages/companyintro/companyintro", 10 "pages/companyintro/companyintro",
11 -  
12 "pages/myguanjia/myguanjia", 11 "pages/myguanjia/myguanjia",
13 "pages/index/index", 12 "pages/index/index",
14 - "pages/logs/logs"  
15 - 13 + "pages/logs/logs",
  14 + "pages/star/star",
  15 + "pages/register/register"
16 ], 16 ],
17 "window": { 17 "window": {
18 "backgroundTextStyle": "light", 18 "backgroundTextStyle": "light",
1 // pages/companyintro/companyintro.js 1 // pages/companyintro/companyintro.js
  2 +const app = getApp();
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
8 - 9 + image:"",
  10 + content:"",
  11 + },
  12 + // 获取公司详情
  13 + getCompanyDetail(){
  14 + let t = this;
  15 + let url = "/api/index/introduceDetail";
  16 + app.post(url)
  17 + .then(res=>{
  18 + t.setData({
  19 + image: res.image,
  20 + content:res.content
  21 + })
  22 + })
9 }, 23 },
10 -  
11 /** 24 /**
12 * 生命周期函数--监听页面加载 25 * 生命周期函数--监听页面加载
13 */ 26 */
14 onLoad: function (options) { 27 onLoad: function (options) {
15 - 28 + // 获取公司详情
  29 + this.getCompanyDetail()
16 }, 30 },
17 31
18 /** 32 /**
1 <view class="top"> 1 <view class="top">
2 - <image src="/img/headimg.png"></image>  
3 - <view class="topimg">  
4 - <image src="/img/banner.png"></image>  
5 - </view>  
6 -</view> 2 + <image src="/img/headimg.png"></image>
  3 + <view class="topimg">
  4 + <image src="{{image}}"></image>
  5 + </view>
  6 +</view>
7 7
8 <view class="textbox"> 8 <view class="textbox">
9 - <view class="textboxword">  
10 - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus pronin sapien nunc accuan eget.  
11 -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus pronin sapien nunc accuan eget.  
12 - </view>  
13 -  
14 - <view class="textboximg">  
15 - <image src="/img/people.png"></image>  
16 - </view>  
17 -</view> 9 + <rich-text class="textboxword" nodes="{{content}}"></rich-text>
  10 +</view>
1 // pages/homeindex/homeindex.js 1 // pages/homeindex/homeindex.js
  2 +const app = getApp()
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
8 - imgUrls: [  
9 - '/img/banner.png',  
10 - '/img/banner.png',  
11 - '/img/banner.png',  
12 - '/img/banner.png'  
13 - ], 9 + imgUrls: [],
14 indicatorDots: false, 10 indicatorDots: false,
15 autoplay: false, 11 autoplay: false,
16 interval: 2000, 12 interval: 2000,
17 duration: 1000, 13 duration: 1000,
18 currentSwiper: 0, 14 currentSwiper: 0,
19 - currentpage:1 15 + currentpage:1,
  16 + // 公司简介
  17 + companyImg:"",
  18 + // 服务介绍
  19 + introImg:"",
  20 + // 服务体验
  21 + experImg:"",
  22 + // 个人中心
  23 + personalImg:"",
  24 + // 会员注册
  25 + registerImg:"",
  26 + // 一键预约
  27 + reservaImg:"",
  28 + isVip:"",// 是否为vip 0:否 1:是
20 }, 29 },
21 30
22 /** 31 /**
23 * 生命周期函数--监听页面加载 32 * 生命周期函数--监听页面加载
24 */ 33 */
25 onLoad: function (options) { 34 onLoad: function (options) {
26 - 35 + this.getPersonMsg();
  36 + // this.setData({
  37 + // isVip:wx.getStorageSync("is_vip")
  38 + // })
  39 + // 获取首页信息
  40 + this.getIndexMsg();
  41 + },
  42 + // 获取个人信息
  43 + getPersonMsg(){
  44 + let url = "/api/user/info";
  45 + app.post(url)
  46 + .then(res=>{
  47 + this.setData({
  48 + isVip:res.is_vip
  49 + })
  50 + wx.setStorageSync("is_vip",res.is_vip)
  51 + })
  52 + },
  53 + // 获取首页数据
  54 + getIndexMsg(){
  55 + console.log(111)
  56 + let t = this;
  57 + let url = "/api/index/index";
  58 + app.post(url)
  59 + .then((res)=>{
  60 + t.setData({
  61 + imgUrls:res.banner,
  62 + companyImg: res.thumbnail.introduce,
  63 + introImg: res.thumbnail.service,
  64 + experImg: res.thumbnail.experience,
  65 + personalImg: res.thumbnail.center,
  66 + registerImg: res.thumbnail.register,
  67 + reservaImg: res.thumbnail.reserve
  68 + })
  69 + })
27 }, 70 },
28 -  
29 // 公司简介 71 // 公司简介
30 company(){ 72 company(){
31 wx.navigateTo({ 73 wx.navigateTo({
@@ -46,14 +88,14 @@ Page({ @@ -46,14 +88,14 @@ Page({
46 url: '/pages/serviceexperience/serviceexperience', 88 url: '/pages/serviceexperience/serviceexperience',
47 }) 89 })
48 }, 90 },
49 - 91 + // 会员注册
  92 + toRegister(){},
50 // 会员中心 93 // 会员中心
51 vipmember(){ 94 vipmember(){
52 wx.navigateTo({ 95 wx.navigateTo({
53 url: '/pages/membercenter/membercenter', 96 url: '/pages/membercenter/membercenter',
54 }) 97 })
55 }, 98 },
56 -  
57 swiperChange: function (e) { 99 swiperChange: function (e) {
58 this.setData({ 100 this.setData({
59 currentSwiper: e.detail.current, 101 currentSwiper: e.detail.current,
@@ -10,16 +10,10 @@ @@ -10,16 +10,10 @@
10 <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" class="swiper_item_img" bindchange="swiperChange"> 10 <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" class="swiper_item_img" bindchange="swiperChange">
11 <block wx:for="{{imgUrls}}" wx:key="doct"> 11 <block wx:for="{{imgUrls}}" wx:key="doct">
12 <swiper-item> 12 <swiper-item>
13 - <image src="{{item}}" data-index='{{index}}' class="slide-image" bindtap='viewImg' width="355" height="150" /> 13 + <image src="{{item.image}}" data-index='{{index}}' class="slide-image" bindtap='viewImg' width="355" height="150" />
14 </swiper-item> 14 </swiper-item>
15 </block> 15 </block>
16 </swiper> 16 </swiper>
17 -  
18 - <!-- <view class="dots">  
19 - <block wx:for="{{imgUrls}}" wx:key="">  
20 - <view class="dot{{index == currentSwiper ? ' active' : ''}}"></view>  
21 - </block>  
22 - </view> -->  
23 <view class="swiperdot">{{currentpage}}/{{imgUrls.length}}</view> 17 <view class="swiperdot">{{currentpage}}/{{imgUrls.length}}</view>
24 18
25 </view> 19 </view>
@@ -31,56 +25,71 @@ @@ -31,56 +25,71 @@
31 <view class="boximg"> 25 <view class="boximg">
32 <view class="topbox"> 26 <view class="topbox">
33 <view class="topboxleft" bindtap="company"> 27 <view class="topboxleft" bindtap="company">
34 - <image src="/img/company.png"></image>  
35 - 28 + <image src="{{companyImg}}"></image>
36 <view class="textbox"> 29 <view class="textbox">
37 <view class="textboxtop">Company profile</view> 30 <view class="textboxtop">Company profile</view>
38 <view class="textboxbottom">公司简介</view> 31 <view class="textboxbottom">公司简介</view>
39 </view> 32 </view>
40 -  
41 <view class="yourow"> 33 <view class="yourow">
42 - <image src="/img/row.png"></image> 34 + <image src="/img/row.png"></image>
43 </view> 35 </view>
44 </view> 36 </view>
45 37
46 - <view class="topboxright" bindtap="serviceinto">  
47 - <image src="/img/intro.png"></image>  
48 - 38 + <view class="topboxright_t" bindtap="serviceinto">
  39 + <image src="{{introImg}}"></image>
49 <view class="servicetext"> 40 <view class="servicetext">
50 <view class="serviceword">Service</view> 41 <view class="serviceword">Service</view>
51 <view class="serviceword">introduction</view> 42 <view class="serviceword">introduction</view>
52 <view class="serviceword">服务介绍</view> 43 <view class="serviceword">服务介绍</view>
53 </view> 44 </view>
54 - <view class="yourow">  
55 - <image src="/img/row.png"></image> 45 + <view class="yourow">
  46 + <image src="/img/row.png"></image>
56 </view> 47 </view>
57 </view> 48 </view>
58 </view> 49 </view>
59 50
60 <view class="topbox xiabox"> 51 <view class="topbox xiabox">
61 <view class="topboxright" bindtap="serviceexperience"> 52 <view class="topboxright" bindtap="serviceexperience">
62 - <image src="/img/fuwu.png"></image>  
63 - 53 + <image src="{{experImg}}"></image>
64 <view class="servicetext"> 54 <view class="servicetext">
65 <view class="serviceword">Service</view> 55 <view class="serviceword">Service</view>
66 <view class="serviceword">experience</view> 56 <view class="serviceword">experience</view>
67 <view class="serviceword">服务体验</view> 57 <view class="serviceword">服务体验</view>
68 </view> 58 </view>
69 - <view class="yourow">  
70 - <image src="/img/row.png"></image> 59 + <view class="yourow">
  60 + <image src="/img/row.png"></image>
71 </view> 61 </view>
72 </view> 62 </view>
73 -  
74 - <view class="topboxleft" bindtap="vipmember">  
75 - <image src="/img/member.png"></image>  
76 - 63 + <view class="topboxright" bindtap="toRegister" wx:if="{{isVip == 0}}">
  64 + <image src="{{registerImg}}"></image>
  65 + <view class="servicetext">
  66 + <view class="serviceword">Member</view>
  67 + <view class="serviceword">registration</view>
  68 + <view class="serviceword">会员注册</view>
  69 + </view>
  70 + <view class="yourow">
  71 + <image src="/img/row.png"></image>
  72 + </view>
  73 + </view>
  74 + <view class="topboxright" bindtap="vipmember" wx:if="{{isVip == 0}}">
  75 + <image src="{{personalImg}}"></image>
  76 + <view class="servicetext">
  77 + <view class="serviceword">Personal</view>
  78 + <view class="serviceword">center</view>
  79 + <view class="serviceword">个人中心</view>
  80 + </view>
  81 + <view class="yourow">
  82 + <image src="/img/row.png"></image>
  83 + </view>
  84 + </view>
  85 + <view class="topboxleft" bindtap="vipmember" wx:if="{{isVip == 1}}">
  86 + <image src="{{reservaImg}}"></image>
77 <view class="textbox"> 87 <view class="textbox">
78 - <view class="textboxtop">Member Center</view> 88 + <view class="textboxtop">Immediately reservation</view>
79 <view class="textboxbottom">会员中心</view> 89 <view class="textboxbottom">会员中心</view>
80 </view> 90 </view>
81 -  
82 - <view class="yourow">  
83 - <image src="/img/row.png"></image> 91 + <view class="yourow">
  92 + <image src="/img/row.png"></image>
84 </view> 93 </view>
85 </view> 94 </view>
86 </view> 95 </view>
@@ -88,5 +97,5 @@ @@ -88,5 +97,5 @@
88 </view> 97 </view>
89 98
90 <view class="bottomimg"> 99 <view class="bottomimg">
91 - <image src="/img/bottom.png"></image> 100 + <image src="/img/bottom.png"></image>
92 </view> 101 </view>
@@ -125,16 +125,22 @@ image { @@ -125,16 +125,22 @@ image {
125 font-size: 0; 125 font-size: 0;
126 position: relative 126 position: relative
127 } 127 }
128 -.topboxright{ 128 +/* 服务介绍 */
  129 +.topboxright_t{
129 width:244rpx; 130 width:244rpx;
130 height:244rpx; 131 height:244rpx;
131 font-size:0; 132 font-size:0;
132 position: relative 133 position: relative
133 } 134 }
  135 +.topboxright{
  136 + width:214rpx;
  137 + height:214rpx;
  138 + font-size:0;
  139 + position: relative
  140 +}
134 .boximg{ 141 .boximg{
135 padding: 34rpx 32rpx; 142 padding: 34rpx 32rpx;
136 box-sizing: border-box 143 box-sizing: border-box
137 -  
138 } 144 }
139 .textbox{ 145 .textbox{
140 position:absolute; 146 position:absolute;
@@ -144,8 +150,8 @@ image { @@ -144,8 +150,8 @@ image {
144 } 150 }
145 .servicetext{ 151 .servicetext{
146 position: absolute; 152 position: absolute;
147 - top:42rpx;  
148 - left:24rpx; 153 + top:20rpx;
  154 + left:20rpx;
149 } 155 }
150 .textboxtop{ 156 .textboxtop{
151 color:#FFFFFF; 157 color:#FFFFFF;
@@ -160,7 +166,7 @@ image { @@ -160,7 +166,7 @@ image {
160 } 166 }
161 .serviceword{ 167 .serviceword{
162 color:#FFFFFF; 168 color:#FFFFFF;
163 - font-size: 32rpx; 169 + font-size: 30rpx;
164 font-weight: bold; 170 font-weight: bold;
165 margin-bottom:10rpx; 171 margin-bottom:10rpx;
166 } 172 }
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 <image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image> 6 <image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
7 <text class="userinfo-nickname">{{userInfo.nickName}}</text> 7 <text class="userinfo-nickname">{{userInfo.nickName}}</text>
8 </block> 8 </block>
9 - </view> 9 + </view>
10 <view class="usermotto"> 10 <view class="usermotto">
11 <text class="user-motto">{{motto}}</text> 11 <text class="user-motto">{{motto}}</text>
12 </view> 12 </view>
@@ -6,14 +6,21 @@ Page({ @@ -6,14 +6,21 @@ Page({
6 */ 6 */
7 data: { 7 data: {
8 yuyuecancel:false, 8 yuyuecancel:false,
9 - yuyuesuccess:false 9 + yuyuesuccess:false,
  10 + nickName:"",
  11 + avatar:"",
  12 + token:"",
10 }, 13 },
11 14
12 /** 15 /**
13 * 生命周期函数--监听页面加载 16 * 生命周期函数--监听页面加载
14 */ 17 */
15 onLoad: function (options) { 18 onLoad: function (options) {
16 - 19 + this.setData({
  20 + token:wx.getStorageSync("token"),
  21 + avatar:wx.getStorageSync("avatarUrl"),
  22 + nickName:wx.getStorageSync("nickName")
  23 + })
17 }, 24 },
18 cancelyuyue(){ 25 cancelyuyue(){
19 this.setData({ 26 this.setData({
@@ -3,9 +3,9 @@ @@ -3,9 +3,9 @@
3 3
4 <view class="login"> 4 <view class="login">
5 <view class="loginleft"> 5 <view class="loginleft">
6 - <image src="/img/morenhead.png"></image> 6 + <image src="{{avatar}}"></image>
7 </view> 7 </view>
8 - <view class="loginright">登录</view> 8 + <view class="loginright">{{nickName}}</view>
9 </view> 9 </view>
10 <view class="servicebox"> 10 <view class="servicebox">
11 11
@@ -65,7 +65,7 @@ @@ -65,7 +65,7 @@
65 65
66 66
67 67
68 - <view class="queren">一键预约</view> 68 + <!-- <view class="queren">一键预约</view> -->
69 </view> 69 </view>
70 </view> 70 </view>
71 71
@@ -126,6 +126,9 @@ image { @@ -126,6 +126,9 @@ image {
126 font-size: 0; 126 font-size: 0;
127 border-radius: 50% 127 border-radius: 50%
128 } 128 }
  129 +.loginleft image{
  130 + border-radius: 50%
  131 +}
129 .loginright{ 132 .loginright{
130 color:#FFFFFF; 133 color:#FFFFFF;
131 font-size: 36rpx; 134 font-size: 36rpx;
1 // pages/myservice/myservice.js 1 // pages/myservice/myservice.js
  2 +const app = getApp();
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
8 - 9 + list:[],
  10 + page:1,
9 }, 11 },
10 12
11 /** 13 /**
12 * 生命周期函数--监听页面加载 14 * 生命周期函数--监听页面加载
13 */ 15 */
14 onLoad: function (options) { 16 onLoad: function (options) {
15 - 17 + this.getMyService()
  18 + },
  19 + // 获取我的服务
  20 + getMyService(){
  21 + let t = this;
  22 + let url = "/api/user/myService";
  23 + let params = {
  24 + page:t.data.page
  25 + };
  26 + app.post(url,params)
  27 + .then(res=>{
  28 + t.setData({
  29 + list:res.data
  30 + })
  31 + })
16 }, 32 },
17 -  
18 /** 33 /**
19 * 生命周期函数--监听页面初次渲染完成 34 * 生命周期函数--监听页面初次渲染完成
20 */ 35 */
1 <view class="servicetop"> 1 <view class="servicetop">
2 - <image src="/img/headimg.png"></image>  
3 - 2 + <image src="/img/headimg.png"></image>
  3 +
4 </view> 4 </view>
5 - <view class="servicebox">  
6 - <view class="serviceboxitem">  
7 - <view class="serviceitemtop">2019-10-10 20:30:30</view>  
8 - <view class="serviceitemlist">  
9 - <view class="serviceitemlistleft">服务单号:</view>  
10 - <view class="serviceitemlistright">L548796631457</view>  
11 - </view>  
12 - <view class="serviceitemlist">  
13 - <view class="serviceitemlistleft">服务项目:</view>  
14 - <view class="serviceitemlistright">别墅除螨</view>  
15 - </view>  
16 - <view class="serviceitemlist">  
17 - <view class="serviceitemlistleft">服务人员:</view>  
18 - <view class="serviceitemlistright">李功虎师傅</view>  
19 - </view>  
20 - <view class="serviceitemlist">  
21 - <view class="serviceitemlistleft">服务评价:</view>  
22 - <view class="serviceitemlistright">A</view>  
23 - </view>  
24 - <view class="serviceitemlist">  
25 - <view class="serviceitemlistleft">备注:</view>  
26 - <view class="serviceitemlistright">xxxxxxxx</view>  
27 - </view>  
28 - </view> 5 +<view class="servicebox">
  6 + <view class="serviceboxitem" wx:for="{{list}}" wx:key="{{index}}">
  7 + <view class="serviceitemtop">{{item.service_time}}</view>
  8 + <view class="serviceitemlist">
  9 + <view class="serviceitemlistleft">服务单号:</view>
  10 + <view class="serviceitemlistright">{{item.order_sn}}</view>
  11 + </view>
  12 + <view class="serviceitemlist">
  13 + <view class="serviceitemlistleft">服务项目:</view>
  14 + <view class="serviceitemlistright">{{item.service_content}}</view>
  15 + </view>
  16 + <view class="serviceitemlist">
  17 + <view class="serviceitemlistleft">服务人员:</view>
  18 + <view class="serviceitemlistright">{{item.service_name}}</view>
  19 + </view>
  20 + <view class="serviceitemlist">
  21 + <view class="serviceitemlistleft">服务评价:</view>
  22 + <view class="serviceitemlistright">{{item.assess}}</view>
  23 + </view>
  24 + <view class="serviceitemlist">
  25 + <view class="serviceitemlistleft">备注:</view>
  26 + <view class="serviceitemlistright">{{item.mark}}</view>
  27 + </view>
  28 + </view>
29 29
30 - <view class="serviceboxitem">  
31 - <view class="serviceitemtop">2019-10-10 20:30:30</view>  
32 - <view class="serviceitemlist">  
33 - <view class="serviceitemlistleft">服务单号:</view>  
34 - <view class="serviceitemlistright">L548796631457</view>  
35 - </view>  
36 - <view class="serviceitemlist">  
37 - <view class="serviceitemlistleft">服务项目:</view>  
38 - <view class="serviceitemlistright">别墅除螨</view>  
39 - </view>  
40 - <view class="serviceitemlist">  
41 - <view class="serviceitemlistleft">服务人员:</view>  
42 - <view class="serviceitemlistright">李功虎师傅</view>  
43 - </view>  
44 - <view class="serviceitemlist">  
45 - <view class="serviceitemlistleft">服务评价:</view>  
46 - <view class="serviceitemlistright">A</view>  
47 - </view>  
48 - <view class="serviceitemlist">  
49 - <view class="serviceitemlistleft">备注:</view>  
50 - <view class="serviceitemlistright">xxxxxxxx</view>  
51 - </view>  
52 - </view>  
53 - <view class="serviceboxitem">  
54 - <view class="serviceitemtop">2019-10-10 20:30:30</view>  
55 - <view class="serviceitemlist">  
56 - <view class="serviceitemlistleft">服务单号:</view>  
57 - <view class="serviceitemlistright">L548796631457</view>  
58 - </view>  
59 - <view class="serviceitemlist">  
60 - <view class="serviceitemlistleft">服务项目:</view>  
61 - <view class="serviceitemlistright">别墅除螨</view>  
62 - </view>  
63 - <view class="serviceitemlist">  
64 - <view class="serviceitemlistleft">服务人员:</view>  
65 - <view class="serviceitemlistright">李功虎师傅</view>  
66 - </view>  
67 - <view class="serviceitemlist">  
68 - <view class="serviceitemlistleft">服务评价:</view>  
69 - <view class="serviceitemlistright">A</view>  
70 - </view>  
71 - <view class="serviceitemlist">  
72 - <view class="serviceitemlistleft">备注:</view>  
73 - <view class="serviceitemlistright">xxxxxxxx</view>  
74 - </view>  
75 - </view>  
76 - <view class="serviceboxitem">  
77 - <view class="serviceitemtop">2019-10-10 20:30:30</view>  
78 - <view class="serviceitemlist">  
79 - <view class="serviceitemlistleft">服务单号:</view>  
80 - <view class="serviceitemlistright">L548796631457</view>  
81 - </view>  
82 - <view class="serviceitemlist">  
83 - <view class="serviceitemlistleft">服务项目:</view>  
84 - <view class="serviceitemlistright">别墅除螨</view>  
85 - </view>  
86 - <view class="serviceitemlist">  
87 - <view class="serviceitemlistleft">服务人员:</view>  
88 - <view class="serviceitemlistright">李功虎师傅</view>  
89 - </view>  
90 - <view class="serviceitemlist">  
91 - <view class="serviceitemlistleft">服务评价:</view>  
92 - <view class="serviceitemlistright">A</view>  
93 - </view>  
94 - <view class="serviceitemlist">  
95 - <view class="serviceitemlistleft">备注:</view>  
96 - <view class="serviceitemlistright">xxxxxxxx</view>  
97 - </view>  
98 - </view>  
99 -  
100 - </view>  
  30 +</view>
1 // pages/mytaocan/mytaocan.js 1 // pages/mytaocan/mytaocan.js
  2 +const app = getApp();
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
8 - 9 + name:"",
  10 + phone:"",
  11 + address:"",
  12 + content:"",
  13 + tableList:[],
  14 + page:1,
  15 + totalPage:""
9 }, 16 },
10 17
11 /** 18 /**
12 * 生命周期函数--监听页面加载 19 * 生命周期函数--监听页面加载
13 */ 20 */
14 onLoad: function (options) { 21 onLoad: function (options) {
15 - 22 + this.getMyorder();
  23 + },
  24 + // 获取我的套餐
  25 + getMyorder(){
  26 + let t = this;
  27 + let url = "/api/user/myOrder";
  28 + let params = {
  29 + page:t.data.page
  30 + };
  31 + app.post(url,params)
  32 + .then(res=>{
  33 + t.setData({
  34 + name:res.user.user_name,
  35 + phone:res.user.mobile,
  36 + address:res.user.province+res.user.city+res.user.district,
  37 + content:res.user.mark,
  38 + tableList:res.data
  39 + })
  40 + })
16 }, 41 },
17 -  
18 /** 42 /**
19 * 生命周期函数--监听页面初次渲染完成 43 * 生命周期函数--监听页面初次渲染完成
20 */ 44 */
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <image src="/img/ren.png"></image> 8 <image src="/img/ren.png"></image>
9 </view> 9 </view>
10 10
11 - <view class="taocanboxitemright">李宝杰</view> 11 + <view class="taocanboxitemright">{{name}}</view>
12 </view> 12 </view>
13 13
14 <view class="taocanboxitem"> 14 <view class="taocanboxitem">
@@ -16,14 +16,14 @@ @@ -16,14 +16,14 @@
16 <image src="/img/bigphone.png"></image> 16 <image src="/img/bigphone.png"></image>
17 </view> 17 </view>
18 18
19 - <view class="taocanboxitemright">15888888888</view> 19 + <view class="taocanboxitemright">{{phone}}</view>
20 </view> 20 </view>
21 <view class="taocanboxitem"> 21 <view class="taocanboxitem">
22 <view class="taocanboxitemleft"> 22 <view class="taocanboxitemleft">
23 <image src="/img/house.png"></image> 23 <image src="/img/house.png"></image>
24 </view> 24 </view>
25 25
26 - <view class="taocanboxitemright">天津市西青区南山公寓4号楼5门311</view> 26 + <view class="taocanboxitemright">{{address}}</view>
27 </view> 27 </view>
28 28
29 <view class="taocanboxitem"> 29 <view class="taocanboxitem">
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 <image src="/img/mark.png"></image> 31 <image src="/img/mark.png"></image>
32 </view> 32 </view>
33 33
34 - <view class="taocanboxitemright">备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注</view> 34 + <view class="taocanboxitemright">{{content}}</view>
35 </view> 35 </view>
36 36
37 37
@@ -49,35 +49,11 @@ @@ -49,35 +49,11 @@
49 </view> 49 </view>
50 50
51 <view class="orderbox"> 51 <view class="orderbox">
52 - <view class="orderboxitem">  
53 - <view class="boxitemleft">No.5565890</view>  
54 - <view class="boxitemmiddle">内容内容内容内容 内容内容内容内容 52 + <view class="orderboxitem" wx:for="{{tableList}}" wx:key="index">
  53 + <view class="boxitemleft">{{item.order_sn}}</view>
  54 + <view class="boxitemmiddle">{{item.content}}
55 </view> 55 </view>
56 - <view class="boxitemright">3</view>  
57 - </view>  
58 - <view class="orderboxitem">  
59 - <view class="boxitemleft">No.5565890</view>  
60 - <view class="boxitemmiddle">内容内容内容内容 内容内容内容内容  
61 - </view>  
62 - <view class="boxitemright">3</view>  
63 - </view>  
64 - <view class="orderboxitem">  
65 - <view class="boxitemleft">No.5565890</view>  
66 - <view class="boxitemmiddle">内容内容内容内容 内容内容内容内容  
67 - </view>  
68 - <view class="boxitemright">3</view>  
69 - </view>  
70 - <view class="orderboxitem">  
71 - <view class="boxitemleft">No.5565890</view>  
72 - <view class="boxitemmiddle">内容内容内容内容 内容内容内容内容  
73 - </view>  
74 - <view class="boxitemright">3</view>  
75 - </view>  
76 - <view class="orderboxitem">  
77 - <view class="boxitemleft">No.5565890</view>  
78 - <view class="boxitemmiddle">内容内容内容内容 内容内容内容内容  
79 - </view>  
80 - <view class="boxitemright">3</view> 56 + <view class="boxitemright">{{item.total_num}}</view>
81 </view> 57 </view>
82 </view> 58 </view>
83 </view> 59 </view>
  1 +// pages/register/register.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 +{
  2 + "usingComponents": {}
  3 +}
  1 +/* pages/register/register.wxss */
1 // pages/serviceexperience/serviceexperience.js 1 // pages/serviceexperience/serviceexperience.js
  2 +const app = getApp();
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
8 - region: ['北京市', '北京市', '东城区'],  
9 - place:'请选择省市区' 9 + region: [],
  10 + place: '请选择省市区',
  11 + content: "",
  12 + name: "",
  13 + phone: "",
  14 + address: "",
  15 + token: "",
10 }, 16 },
11 17
12 /** 18 /**
13 * 生命周期函数--监听页面加载 19 * 生命周期函数--监听页面加载
14 */ 20 */
15 - onLoad: function (options) { 21 + onLoad: function(options) {
  22 + this.setData({
  23 + token: wx.getStorageSync("token")
  24 + })
  25 + // 获取服务介绍详情
  26 + this.getServeiceDetail();
  27 +
  28 + },
  29 + // 获取服务介绍详情
  30 + getServeiceDetail() {
  31 + let t = this;
  32 + let url = "/api/index/experienceDetail";
  33 + app.post(url)
  34 + .then(res => {
  35 + t.setData({
  36 + content: res.content
  37 + })
  38 + })
  39 + },
  40 + // 获取姓名
  41 + getName(e) {
  42 + this.setData({
  43 + name: e.detail.value
  44 + })
  45 + },
  46 + // 获取手机号
  47 + getPhone(e) {
  48 + this.setData({
  49 + phone: e.detail.value
  50 + })
  51 + },
  52 + // 获取详细地址
  53 + getAddress(e) {
  54 + this.setData({
  55 + address: e.detail.value
  56 + })
  57 + },
  58 + // 免费预约
  59 + submit() {
  60 + // 判断是否登录
  61 + let t = this;
  62 + if (t.data.token) {
  63 + if (t.data.region.length > 0 && t.data.name && t.data.phone && t.data.address) {
  64 + let url = "/api/user/freeBook";
  65 + let params = {
  66 + user_name: t.data.name,
  67 + mobile: t.data.phone,
  68 + address: t.data.address,
  69 + province: t.data.region[0],
  70 + city: t.data.region[1],
  71 + district: t.data.region[2]
  72 + };
  73 + app.post(url, params,"post")
  74 + .then(res => {
  75 + wx.showToast({
  76 + title: '预约成功',
  77 + icon:"success",
  78 + duration:1500,
  79 + })
  80 + setTimeout(function(){
  81 + wx.navigateBack({
  82 + delta:1
  83 + })
  84 + },1500)
  85 + })
  86 + } else {
  87 + wx.showToast({
  88 + title: '请输入完整信息',
  89 + icon: "none"
  90 + })
  91 + }
  92 + }else{
  93 + // 未登录
  94 + wx.navigateTo({
  95 + url: '/pages/star/star',
  96 + })
  97 + }
  98 +
  99 +
16 100
17 }, 101 },
18 - bindRegionChange: function (e) {  
19 - console.log('picker发送选择改变,携带值为', e.detail.value) 102 + bindRegionChange: function(e) {
20 this.setData({ 103 this.setData({
21 region: e.detail.value, 104 region: e.detail.value,
22 - place:e.detail.value[0] + e.detail.value[1] + e.detail.value[2] 105 + place: e.detail.value[0] + '、' + e.detail.value[1] + '、' + e.detail.value[2]
23 }) 106 })
24 }, 107 },
25 /** 108 /**
26 * 生命周期函数--监听页面初次渲染完成 109 * 生命周期函数--监听页面初次渲染完成
27 */ 110 */
28 - onReady: function () { 111 + onReady: function() {
29 112
30 }, 113 },
31 114
32 /** 115 /**
33 * 生命周期函数--监听页面显示 116 * 生命周期函数--监听页面显示
34 */ 117 */
35 - onShow: function () { 118 + onShow: function() {
36 119
37 }, 120 },
38 121
39 /** 122 /**
40 * 生命周期函数--监听页面隐藏 123 * 生命周期函数--监听页面隐藏
41 */ 124 */
42 - onHide: function () { 125 + onHide: function() {
43 126
44 }, 127 },
45 128
46 /** 129 /**
47 * 生命周期函数--监听页面卸载 130 * 生命周期函数--监听页面卸载
48 */ 131 */
49 - onUnload: function () { 132 + onUnload: function() {
50 133
51 }, 134 },
52 135
53 /** 136 /**
54 * 页面相关事件处理函数--监听用户下拉动作 137 * 页面相关事件处理函数--监听用户下拉动作
55 */ 138 */
56 - onPullDownRefresh: function () { 139 + onPullDownRefresh: function() {
57 140
58 }, 141 },
59 142
60 /** 143 /**
61 * 页面上拉触底事件的处理函数 144 * 页面上拉触底事件的处理函数
62 */ 145 */
63 - onReachBottom: function () { 146 + onReachBottom: function() {
64 147
65 }, 148 },
66 149
67 /** 150 /**
68 * 用户点击右上角分享 151 * 用户点击右上角分享
69 */ 152 */
70 - onShareAppMessage: function () { 153 + onShareAppMessage: function() {
71 154
72 } 155 }
73 }) 156 })
@@ -6,8 +6,7 @@ @@ -6,8 +6,7 @@
6 </view> 6 </view>
7 7
8 <view class="servicetext"> 8 <view class="servicetext">
9 - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proingravida dolor sit amet lacus accumsan et viverra commodo. Proin sodales pulvinar sic tempor. Sociis natoque bibendum laoreet. Proin gravida dolor sit amet lacus  
10 - accumsan et viverra justo commodo. 9 + <rich-text nodes="{{content}}"></rich-text>
11 </view> 10 </view>
12 11
13 <view class="servicebox"> 12 <view class="servicebox">
@@ -19,7 +18,7 @@ @@ -19,7 +18,7 @@
19 <image src="/img/renyuan.png"></image> 18 <image src="/img/renyuan.png"></image>
20 </view> 19 </view>
21 <view class="servicelistright"> 20 <view class="servicelistright">
22 - <input placeholder='请输入您的姓名' placeholder-class='entertext' /> 21 + <input placeholder='请输入您的姓名' value="{{name}}" bindinput='getName' placeholder-class='entertext' />
23 </view> 22 </view>
24 </view> 23 </view>
25 <view class="servicelistitem"> 24 <view class="servicelistitem">
@@ -27,15 +26,11 @@ @@ -27,15 +26,11 @@
27 <image src="/img/shouji.png"></image> 26 <image src="/img/shouji.png"></image>
28 </view> 27 </view>
29 <view class="servicelistright"> 28 <view class="servicelistright">
30 - <input placeholder='请输入您的手机号' placeholder-class='entertext' /> 29 + <input placeholder='请输入您的手机号' maxlength='11' value="{{phone}}" bindinput='getPhone' placeholder-class='entertext' />
31 </view> 30 </view>
32 </view> 31 </view>
33 32
34 <picker mode="region" bindchange="bindRegionChange" value="{{region}}" custom-item="{{customItem}}"> 33 <picker mode="region" bindchange="bindRegionChange" value="{{region}}" custom-item="{{customItem}}">
35 - <!-- <view class="picker">  
36 - 当前选择:{{region[0]}},{{region[1]}},{{region[2]}}  
37 - </view> -->  
38 -  
39 <view class="servicelistitem"> 34 <view class="servicelistitem">
40 <view class="servicelsitleft"> 35 <view class="servicelsitleft">
41 <image src="/img/map.png"></image> 36 <image src="/img/map.png"></image>
@@ -56,11 +51,11 @@ @@ -56,11 +51,11 @@
56 <image src="/img/index.png"></image> 51 <image src="/img/index.png"></image>
57 </view> 52 </view>
58 <view class="servicelistright"> 53 <view class="servicelistright">
59 - <input placeholder='请输入详细地址' placeholder-class='entertext' /> 54 + <input placeholder='请输入详细地址' value="{{address}}" bindinput='getAddress' placeholder-class='entertext' />
60 </view> 55 </view>
61 </view> 56 </view>
62 57
63 - <view class="queren">确认</view> 58 + <view class="queren" bindtap='submit'>确认</view>
64 </view> 59 </view>
65 </view> 60 </view>
66 </view> 61 </view>
1 // pages/serviceintro/serviceintro.js 1 // pages/serviceintro/serviceintro.js
  2 +const app = getApp();
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
8 - 9 + image: "",
  10 + content: "",
9 }, 11 },
10 12
11 /** 13 /**
12 * 生命周期函数--监听页面加载 14 * 生命周期函数--监听页面加载
13 */ 15 */
14 - onLoad: function (options) {  
15 - 16 + onLoad: function(options) {
  17 + // 获取服务介绍
  18 + this.getIntro();
  19 + },
  20 + // 获取服务介绍
  21 + getIntro() {
  22 + let t = this;
  23 + let url = "/api/index/serviceDetail";
  24 + app.post(url)
  25 + .then(res => {
  26 + t.setData({
  27 + image: res.image,
  28 + content: res.content
  29 + })
  30 + })
16 }, 31 },
17 -  
18 /** 32 /**
19 * 生命周期函数--监听页面初次渲染完成 33 * 生命周期函数--监听页面初次渲染完成
20 */ 34 */
21 - onReady: function () { 35 + onReady: function() {
22 36
23 }, 37 },
24 38
25 /** 39 /**
26 * 生命周期函数--监听页面显示 40 * 生命周期函数--监听页面显示
27 */ 41 */
28 - onShow: function () { 42 + onShow: function() {
29 43
30 }, 44 },
31 45
32 /** 46 /**
33 * 生命周期函数--监听页面隐藏 47 * 生命周期函数--监听页面隐藏
34 */ 48 */
35 - onHide: function () { 49 + onHide: function() {
36 50
37 }, 51 },
38 52
39 /** 53 /**
40 * 生命周期函数--监听页面卸载 54 * 生命周期函数--监听页面卸载
41 */ 55 */
42 - onUnload: function () { 56 + onUnload: function() {
43 57
44 }, 58 },
45 59
46 /** 60 /**
47 * 页面相关事件处理函数--监听用户下拉动作 61 * 页面相关事件处理函数--监听用户下拉动作
48 */ 62 */
49 - onPullDownRefresh: function () { 63 + onPullDownRefresh: function() {
50 64
51 }, 65 },
52 66
53 /** 67 /**
54 * 页面上拉触底事件的处理函数 68 * 页面上拉触底事件的处理函数
55 */ 69 */
56 - onReachBottom: function () { 70 + onReachBottom: function() {
57 71
58 }, 72 },
59 73
60 /** 74 /**
61 * 用户点击右上角分享 75 * 用户点击右上角分享
62 */ 76 */
63 - onShareAppMessage: function () { 77 + onShareAppMessage: function() {
64 78
65 } 79 }
66 }) 80 })
1 <view class="top"> 1 <view class="top">
2 - <image src="/img/headimg.png"></image>  
3 - <view class="topimg">  
4 - <image src="/img/banner.png"></image>  
5 - </view>  
6 -</view> 2 + <image src="/img/headimg.png"></image>
  3 + <view class="topimg">
  4 + <image src="{{image}}"></image>
  5 + </view>
  6 +</view>
7 7
8 <view class="textbox"> 8 <view class="textbox">
9 - <view class="textboxword">  
10 - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus pronin sapien nunc accuan eget.  
11 -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus pronin sapien nunc accuan eget.  
12 - </view>  
13 -  
14 - <view class="textboximg">  
15 - <image src="/img/people.png"></image>  
16 - </view>  
17 -</view> 9 + <rich-text class="textboxword" nodes="{{content}}"></rich-text>
  10 +</view>
  1 +// pages/star/star.js
  2 +const app = getApp();
  3 +Page({
  4 +
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + // 用来换取token的四个必传参数
  10 + // code换取的'session_key'和'openid'
  11 + code:"",
  12 + nickName:"",
  13 + avatar:"",
  14 + },
  15 + // 获取用户信息(授权)
  16 + star(e) {
  17 + // console.log(e); // 此处会返回换取token必须的'encryptedData'和'iv'两个参数,
  18 + // this.setData({
  19 + // encryptedData: e.detail.encryptedData,
  20 + // iv: e.detail.iv
  21 + // });
  22 + this.setData({
  23 + nickName: e.detail.userInfo.nickName,
  24 + avatar: e.detail.userInfo.avatarUrl
  25 + })
  26 + wx.setStorageSync('avatarUrl', e.detail.userInfo.avatarUrl);
  27 + wx.setStorageSync('nickName', e.detail.userInfo.nickName);
  28 + // 授权之后需要调取登录的方法
  29 + this.login()
  30 + },
  31 + // 登录
  32 + login() {
  33 + let t = this;
  34 + // let url = "用{'session_key','openid','encryptedData','iv'}换取token的接口";
  35 + let url = "/api/user/login";
  36 + // 此处是获取token需要传递的参数
  37 + let params = {
  38 + code:t.data.code,
  39 + nickname:t.data.nickName,
  40 + avatar:t.data.avatar
  41 + }
  42 + app.post(url, params,"post").then(r => {
  43 + console.log(r) // 此处会返回一个token => (小程序登录的唯一标识)
  44 + // 需要将token存在缓存中,(以备需要);
  45 + wx.setStorageSync("token", r.token) // =>存入的是一个键值
  46 + // 获取个人信息
  47 + let url = "/api/user/info";
  48 + app.post(url)
  49 + .then(res=>{
  50 + wx.setStorageSync("token", res.token);
  51 + wx.setStorageSync("is_vip", res.is_vip) //是否为vip
  52 + // 之后跳转页面/执行方法
  53 + wx.redirectTo({
  54 + url: '/pages/homeindex/homeindex',
  55 + })
  56 + })
  57 +
  58 + }).catch(err => {
  59 + console.log(err)
  60 + })
  61 + },
  62 + /**
  63 + * 生命周期函数--监听页面加载
  64 + */
  65 + onLoad: function(options) {
  66 + wx.login({
  67 + success: (res) => {
  68 + this.setData({
  69 + code:res.code
  70 + })
  71 + console.log(res, "此处会返回一个code");
  72 + // var url = "用code换取'session_key'和'openid'的接口";
  73 + // let url = "api/user/getSessionKey";
  74 + // var params = {
  75 + // code: res.code //这是wx.login的方法返回的code
  76 + // };
  77 + // app.post(url, params).then(r => {
  78 + // console.log(r) //此处会返回用code换取的'session_key'和'openid'
  79 + // // 之后将他们赋值到data中,方便调用
  80 + // this.setData({
  81 + // session_key: r.session_key,
  82 + // openid: r.openid
  83 + // })
  84 + // }).catch(err => {
  85 + // console.log(err)
  86 + // })
  87 + }
  88 + })
  89 + },
  90 +
  91 + /**
  92 + * 生命周期函数--监听页面初次渲染完成
  93 + */
  94 + onReady: function() {
  95 +
  96 + },
  97 +
  98 + /**
  99 + * 生命周期函数--监听页面显示
  100 + */
  101 + onShow: function() {
  102 +
  103 + },
  104 +
  105 + /**
  106 + * 生命周期函数--监听页面隐藏
  107 + */
  108 + onHide: function() {
  109 +
  110 + },
  111 +
  112 + /**
  113 + * 生命周期函数--监听页面卸载
  114 + */
  115 + onUnload: function() {
  116 +
  117 + },
  118 +
  119 + /**
  120 + * 页面相关事件处理函数--监听用户下拉动作
  121 + */
  122 + onPullDownRefresh: function() {
  123 +
  124 + },
  125 +
  126 + /**
  127 + * 页面上拉触底事件的处理函数
  128 + */
  129 + onReachBottom: function() {
  130 +
  131 + },
  132 +
  133 + /**
  134 + * 用户点击右上角分享
  135 + */
  136 + onShareAppMessage: function() {
  137 +
  138 + }
  139 +})
  1 +{
  2 + "navigationBarBackgroundColor": "#fff",
  3 + "navigationBarTextStyle": "black",
  4 + "navigationBarTitleText": "启动",
  5 + "backgroundColor": "#fff",
  6 + "backgroundTextStyle": "light",
  7 + "enablePullDownRefresh": false
  8 +}
  1 +<!-- 获取用户信息 -->
  2 +<view class='contant'>
  3 + <view class='img'>
  4 + <image src='../../images/poster.png'></image>
  5 + </view>
  6 + <view class='button'>
  7 + <button class="button_top" open-type="getUserInfo" bindgetuserinfo="star">授权登录</button>
  8 + <view class="button_bot" bindtap="noLogin" >暂不授权</view>
  9 + </view>
  10 +</view>
  1 +/* page/Modify/modify.wxss */
  2 +
  3 +.contant {
  4 + width: 100%;
  5 + padding: 100rpx 50rpx 0;
  6 + box-sizing: border-box;
  7 +}
  8 +
  9 +.img {
  10 + width: 100%;
  11 + height: 1000rpx;
  12 + font-size: 0;
  13 +}
  14 +
  15 +.img image {
  16 + width: 100%;
  17 + height: 100%;
  18 +}
  19 +
  20 +.button {
  21 + width: 100%;
  22 + padding: 0 60rpx;
  23 + box-sizing: border-box;
  24 + position: fixed;
  25 + bottom: 200rpx;
  26 + left: 50%;
  27 + transform: translate(-50%, 0);
  28 +}
  29 +
  30 +.button_top {
  31 + width: 100%;
  32 + background:rgba(39,53,116,1);
  33 +box-shadow:0px 6px 6px rgba(0,0,0,0.16);
  34 + color: rgba(255, 255, 255, 1);
  35 + margin-bottom:20rpx
  36 +}
  37 +.button_bot{
  38 + text-align: center
  39 +}
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 "ignore": [] 4 "ignore": []
5 }, 5 },
6 "setting": { 6 "setting": {
7 - "urlCheck": true, 7 + "urlCheck": false,
8 "es6": true, 8 "es6": true,
9 "postcss": true, 9 "postcss": true,
10 "minified": true, 10 "minified": true,
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 }, 13 },
14 "compileType": "miniprogram", 14 "compileType": "miniprogram",
15 "libVersion": "2.10.0", 15 "libVersion": "2.10.0",
16 - "appid": "wx1f51f42105b63343", 16 + "appid": "wxf6853676224588fe",
17 "projectname": "chuman", 17 "projectname": "chuman",
18 "debugOptions": { 18 "debugOptions": {
19 "hidedInDevtools": [] 19 "hidedInDevtools": []
@@ -39,12 +39,54 @@ @@ -39,12 +39,54 @@
39 "list": [] 39 "list": []
40 }, 40 },
41 "miniprogram": { 41 "miniprogram": {
42 - "current": 0, 42 + "current": 6,
43 "list": [ 43 "list": [
44 { 44 {
45 "id": -1, 45 "id": -1,
46 "name": "会员中心", 46 "name": "会员中心",
47 "pathName": "pages/membercenter/membercenter", 47 "pathName": "pages/membercenter/membercenter",
  48 + "query": "",
  49 + "scene": null
  50 + },
  51 + {
  52 + "id": -1,
  53 + "name": "公司简介",
  54 + "pathName": "pages/companyintro/companyintro",
  55 + "query": "",
  56 + "scene": null
  57 + },
  58 + {
  59 + "id": -1,
  60 + "name": "服务体验",
  61 + "pathName": "pages/serviceexperience/serviceexperience",
  62 + "query": "",
  63 + "scene": null
  64 + },
  65 + {
  66 + "id": -1,
  67 + "name": "授权",
  68 + "pathName": "pages/star/star",
  69 + "query": "",
  70 + "scene": null
  71 + },
  72 + {
  73 + "id": -1,
  74 + "name": "会员中心",
  75 + "pathName": "pages/membercenter/membercenter",
  76 + "query": "",
  77 + "scene": null
  78 + },
  79 + {
  80 + "id": -1,
  81 + "name": "我的套餐",
  82 + "pathName": "pages/mytaocan/mytaocan",
  83 + "query": "",
  84 + "scene": null
  85 + },
  86 + {
  87 + "id": -1,
  88 + "name": "我的服务",
  89 + "pathName": "pages/myservice/myservice",
48 "scene": null 90 "scene": null
49 } 91 }
50 ] 92 ]