diff --git a/app.json b/app.json
index 4c3c56d..3dcef98 100644
--- a/app.json
+++ b/app.json
@@ -36,7 +36,9 @@
"pages/ad/ad",
"pages/service/detail/detail",
"pages/service/settle/settle",
- "pages/service/service"
+ "pages/service/service",
+ "pages/service/myService/myService",
+ "pages/service/vipCard/vipCard"
],
"window": {
"backgroundTextStyle": "light",
diff --git a/pages/service/detail/detail.js b/pages/service/detail/detail.js
index 90ac151..7d56772 100644
--- a/pages/service/detail/detail.js
+++ b/pages/service/detail/detail.js
@@ -1,31 +1,53 @@
// pages/service/detail/detail.js
-import { TopicModel } from '../../../models/topic.js'
var WxParse = require('../../../components/wxParse/wxParse.js');
+import { TopicModel } from '../../../models/topic.js'
let topicModel = new TopicModel()
+
+import { ServiceModel } from '../../../models/service.js'
+let serviceModel = new ServiceModel()
Page({
/**
* 页面的初始数据
*/
data: {
- show:true,
+ show:false,
+ classify:null,
+ code:'',
+ departList:[]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
- var id = '7d986b726945d3201adf4ed8dadd2db4'
- topicModel.getResourceDetail(id,res=>{
- wx.setNavigationBarTitle({ title:res.result.typeName})
+ this.setData({
+ code:options.code
+ })
+ serviceModel.serviceDetail(options.code,res=>{
+
+ var detail = res.result
+ wx.setNavigationBarTitle({ title:detail.server_name})
+ WxParse.wxParse('content', 'html', detail.server_text, this, 5);
+ WxParse.wxParse('explain', 'html', detail.appointment_text, this, 5);
+
+ this.setData({
+ classify:detail.smallServer,
+ departList:detail.departList
+ })
+
+ })
+ // var id = '7d986b726945d3201adf4ed8dadd2db4'
+ // topicModel.getResourceDetail(id,res=>{
+ // wx.setNavigationBarTitle({ title:res.result.typeName})
- this.setData({
- detail:res.result,
- })
+ // this.setData({
+ // detail:res.result,
+ // })
- WxParse.wxParse('article', 'html', this.data.detail.content, this, 5);
+ // WxParse.wxParse('article', 'html', this.data.detail.content, this, 5);
- })
+ // })
},
/**
@@ -77,15 +99,18 @@ Page({
},
onTap:function(){
- // wx.navigateTo({
- // url: '/pages/service/settle/settle',
- // })
+ if(!this.data.classify){
+ wx.navigateTo({
+ url: '/pages/service/settle/settle?code=' + this.data.code,
+ })
+ return
+ }
this.setData({ show: true });
},
- settle:function(){
+ settle:function(e){
wx.navigateTo({
- url: '/pages/service/settle/settle',
+ url: '/pages/service/settle/settle?code=' + this.data.code + '&tp=' + e.currentTarget.dataset.code,
})
},
onClose:function(){
diff --git a/pages/service/detail/detail.wxml b/pages/service/detail/detail.wxml
index 6490fdc..b1d3f13 100644
--- a/pages/service/detail/detail.wxml
+++ b/pages/service/detail/detail.wxml
@@ -7,7 +7,7 @@
-
+
@@ -18,32 +18,59 @@
- 市北区人社局
- 电话:0532-58771882
+
+ {{item.departName}}
+ 电话:{{item.mobile}}
+
+
+
+ 预约说明
+
-
-
- 预约
-
+
+
+
+
+
+
+
+
+
+ 申请
+
+
+ 预约
+
+
+
+
+
+
-
-
-
\ No newline at end of file
+
+
+
diff --git a/pages/service/settle/settle.js b/pages/service/settle/settle.js
index 1ce2182..68e4a74 100644
--- a/pages/service/settle/settle.js
+++ b/pages/service/settle/settle.js
@@ -1,27 +1,62 @@
// pages/service/settle/settle.js
+
+import { ServiceModel } from '../../../models/service.js'
+let serviceModel = new ServiceModel()
Page({
/**
* 页面的初始数据
*/
data: {
- detail:'',
+ info:'',
text:true,
imgUrl:[],
img:[],
message:0,
save:true,
- type:9,
- tp:1,
+ code:1,
+ tp:'',
array: ['融创', '时代国际'],
- index:''
+ index:'',
+ departIndex:'',
+ department:[],
+ departArray:[],
+ demand:'', // 服务需求
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
+ console.log(options.code)
+ console.log(options.tp)
+ this.setData({
+ code:options.code,
+ tp:options.tp
+ })
+
+ serviceModel.getUserInfo(res=>{
+ this.setData({
+ info:res.result
+ })
+ })
+
+ if(this.data.code == 'zwfw'){
+ serviceModel.getDepartList(this.data.code,res=>{
+ var departArray = []
+ for(let i = 0;i < res.result.length; i++){
+ departArray.push(res.result[i]['depart_name'])
+ }
+
+ this.setData({
+ department:res.result,
+ departArray:departArray
+ })
+
+ })
+ }
+
},
/**
@@ -117,4 +152,17 @@ Page({
},
+ inputDemand:function(e){
+ console.log(e)
+ this.setData({
+ demand:e.detail.value
+ })
+ },
+ bindDepartChange:function(e){ // 办理部门
+ console.log(e)
+ this.setData({
+ departIndex:e.detail.value
+ })
+ }
+
})
\ No newline at end of file
diff --git a/pages/service/settle/settle.json b/pages/service/settle/settle.json
index 55557f8..a2bd8bd 100644
--- a/pages/service/settle/settle.json
+++ b/pages/service/settle/settle.json
@@ -5,5 +5,6 @@
"mp-cell": "/components/weui/cell/cell",
"mp-uploader": "/components/weui/uploader/uploader",
"e-ibutton": "/components/image-button/index"
- }
+ },
+ "navigationBarTitleText": "预约"
}
\ No newline at end of file
diff --git a/pages/service/settle/settle.wxml b/pages/service/settle/settle.wxml
index c75e150..3509668 100644
--- a/pages/service/settle/settle.wxml
+++ b/pages/service/settle/settle.wxml
@@ -1,69 +1,12 @@
-
-
-
-
- 姓名
- 陈二狗
-
-
-
-
- 身份证号
- 3706868156116513521
-
-
-
-
- 联系电话
- 15212121212
-
-
-
-
- 服务需求
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
姓名
- 陈二狗
+ {{info.name}}
@@ -81,16 +24,16 @@
身份证号
- 3706868156116513521
+ {{info.idCard}}
联系电话
- 15055656565
+ {{info.phone}}
-
+
@@ -126,7 +69,7 @@
-
+
@@ -157,17 +100,18 @@
-
+
+
姓名
- 陈二狗
+ {{info.name}}
联系电话
- 15151515151
+ {{info.phone}}
@@ -181,11 +125,19 @@
-
+
办理部门
-
+
+
+ 请选择
+
+
+ {{departArray[departIndex]}}
+
+
+
@@ -206,17 +158,17 @@
-
+
姓名
- 陈二狗
+ {{info.name}}
联系电话
- 15151515151
+ {{info.phone}}
@@ -256,17 +208,17 @@
-
+
姓名
- 陈二狗
+ {{info.name}}
联系电话
- 15151515151
+ {{info.phone}}
@@ -298,26 +250,27 @@
-
+
+
姓名
- 陈二狗
+ {{info.name}}
身份证号
- 3706868156116513521
+ {{info.idCard}}
联系电话
- 15212121212
+ {{info.phone}}
-
+
入学证明(入学通知书、学校证明等)
@@ -370,7 +323,7 @@
-
+
参加活动证明(报名证明、邀请函等)
@@ -425,17 +378,17 @@
-
+
姓名
- 陈二狗
+ {{info.name}}
联系电话
- 15151515151
+ {{info.phone}}
@@ -486,24 +439,24 @@
-
+
姓名
- 陈二狗
+ {{info.name}}
身份证号
- 3706868156116513521
+ {{info.idCard}}
联系电话
- 15212121212
+ {{info.phone}}
@@ -610,7 +563,7 @@
-
+
薪酬证明
@@ -640,22 +593,22 @@
-
+
姓名
- 陈二狗
+ {{info.name}}
联系电话
- 15212121212
+ {{info.phone}}
- 联系电话
+ 车牌号码
@@ -699,6 +652,66 @@
+
+
+
+
+ 姓名
+ {{info.name}}
+
+
+
+
+ 身份证号
+ {{info.idCard}}
+
+
+
+
+ 联系电话
+ {{info.phone}}
+
+
+
+
+ 服务需求
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/user/index.js b/pages/user/index.js
index 13cd1e3..436cf0c 100644
--- a/pages/user/index.js
+++ b/pages/user/index.js
@@ -7,6 +7,9 @@ import { UserModel } from '../../models/user.js'
let userModel = new UserModel()
import { AuthModel } from '../../models/auth.js'
let authModel = new AuthModel()
+
+import { ServiceModel } from '../../models/service.js'
+let serviceModel = new ServiceModel()
const app = getApp()
Page({
@@ -51,6 +54,27 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
+ serviceModel.getService(res => {
+ var serviceList = res.result
+ var service = []
+ var list = []
+ let j = 1;
+ for(var i = 0;i < serviceList.length;i++){
+ list.push(serviceList[i])
+ if(j == 10){
+ j = 1;
+ service.push(list)
+ list = []
+ }else{
+ j++;
+ }
+ }
+
+ // console.log(service)
+ this.setData({
+ service:service
+ })
+ })
},
onShow: function () {
@@ -232,5 +256,24 @@ Page({
url: '/pages/service/service',
})
+ },
+ vip:function(){
+ wx.navigateTo({
+ url: '/pages/service/vipCard/vipCard',
+ })
+ },
+ jump:function(e){
+ wx.navigateToMiniProgram({
+ appId: e.currentTarget.dataset.appid,
+ // path: 'page/index/index?id=123',
+ extraData: {
+ // foo: 'bar'
+ },
+ envVersion: 'release',
+ success(res) {
+ // 打开成功
+ }
+ })
+ return;
}
})
\ No newline at end of file
diff --git a/pages/user/index.wxml b/pages/user/index.wxml
index f1ce813..817c7a9 100644
--- a/pages/user/index.wxml
+++ b/pages/user/index.wxml
@@ -1,18 +1,35 @@
-
+
+
人才服务
@@ -24,12 +41,23 @@
-
-
-
-
- {{it.name}}
-
+
+
+
+
+
+ {{it.server_name}}
+
+
+
+
+
+
+
+ {{it.server_name}}
+
+
+
diff --git a/pages/user/index.wxss b/pages/user/index.wxss
index 76006c1..929f239 100644
--- a/pages/user/index.wxss
+++ b/pages/user/index.wxss
@@ -124,4 +124,21 @@ page{
align-items: center;
font-size: 12px;
color:rgb(106,106,106);
-}
\ No newline at end of file
+}
+.header{
+ width: 100%;
+ height:150px;
+ display:flex;
+ align-items: center;
+ justify-content: center;
+ background-color: white;
+ margin-bottom: 10px;
+}
+
+.column{
+ width: 90%;
+ display:flex;
+ align-items: center;
+ justify-content: space-between;
+}
+