正在显示
15 个修改的文件
包含
460 行增加
和
323 行删除
@@ -176,21 +176,10 @@ var app = new Vue({ | @@ -176,21 +176,10 @@ var app = new Vue({ | ||
176 | }; | 176 | }; |
177 | getRequest('post', 'user/index/getOrg', null, heder).then(function (res) { | 177 | getRequest('post', 'user/index/getOrg', null, heder).then(function (res) { |
178 | 178 | ||
179 | - if (res.data.code == 1) { | ||
180 | - | ||
181 | - | ||
182 | - for (var i=0 ;i< res.data.data.length;i++) { | ||
183 | - app.org_list.push({ | ||
184 | - value: res.data.data[i].id, | ||
185 | - label: res.data.data[i].name | ||
186 | - }) | ||
187 | - } | ||
188 | - | ||
189 | - loadEnd() | ||
190 | - } | ||
191 | }) | 179 | }) |
192 | }, | 180 | }, |
193 | // 选择类别 | 181 | // 选择类别 |
182 | + | ||
194 | choose_item: function () { | 183 | choose_item: function () { |
195 | weui.picker(app.Illness_list, { | 184 | weui.picker(app.Illness_list, { |
196 | onChange: function (result) { | 185 | onChange: function (result) { |
@@ -15,40 +15,46 @@ function openWin(winName, url) { | @@ -15,40 +15,46 @@ function openWin(winName, url) { | ||
15 | } | 15 | } |
16 | 16 | ||
17 | function openView(fmName, fmUrl, winTitle, winName, winUrl, fmParams, winParams) { | 17 | function openView(fmName, fmUrl, winTitle, winName, winUrl, fmParams, winParams) { |
18 | - var options = { | ||
19 | - name: '', | ||
20 | - url: '', | ||
21 | - pageParam: { | ||
22 | - winTitle: '', | ||
23 | - win: {}, | ||
24 | - fmName: '', | ||
25 | - fmUrl: '', | ||
26 | - fm: {}, | ||
27 | - }, | ||
28 | - slidBackEnabled: false | ||
29 | - }; | ||
30 | - options.pageParam.fmName = fmName; | ||
31 | - options.pageParam.fmUrl = 'widget://html/' + fmUrl + '.html'; | ||
32 | - if (winName) { | ||
33 | - options.name = winName; | ||
34 | - } else { | ||
35 | - options.name = fmName; | ||
36 | - } | ||
37 | - if (winUrl) { | ||
38 | - options.url = 'widget://html/' + winUrl + '.html'; | ||
39 | - } else { | ||
40 | - options.url = 'widget://html/common/win/win.html'; | ||
41 | - } | ||
42 | - options.pageParam.winTitle = winTitle || ''; | ||
43 | - options.pageParam.winTitle = winTitle; | ||
44 | - | ||
45 | - if (winParams != undefined && winParams != null && winParams != {} && winParams != 'undefined') { | ||
46 | - options.pageParam.win = JSON.stringify(winParams); | ||
47 | - } | ||
48 | - if (fmParams != undefined && fmParams != null && fmParams != {} && fmParams != 'undefined') { | ||
49 | - options.pageParam.fm = JSON.stringify(fmParams); | 18 | + if(winParams){ |
19 | + for (var item in winParams) { | ||
20 | + localStorage.setItem(item,winParams[item]) | ||
21 | + } | ||
50 | } | 22 | } |
51 | - api.openWin(options); | 23 | + window.location.href = winName+'.html' |
24 | + // var options = { | ||
25 | + // name: '', | ||
26 | + // url: '', | ||
27 | + // pageParam: { | ||
28 | + // winTitle: '', | ||
29 | + // win: {}, | ||
30 | + // fmName: '', | ||
31 | + // fmUrl: '', | ||
32 | + // fm: {}, | ||
33 | + // }, | ||
34 | + // slidBackEnabled: false | ||
35 | + // }; | ||
36 | + // options.pageParam.fmName = fmName; | ||
37 | + // options.pageParam.fmUrl = 'widget://html/' + fmUrl + '.html'; | ||
38 | + // if (winName) { | ||
39 | + // options.name = winName; | ||
40 | + // } else { | ||
41 | + // options.name = fmName; | ||
42 | + // } | ||
43 | + // if (winUrl) { | ||
44 | + // options.url = 'widget://html/' + winUrl + '.html'; | ||
45 | + // } else { | ||
46 | + // options.url = 'widget://html/common/win/win.html'; | ||
47 | + // } | ||
48 | + // options.pageParam.winTitle = winTitle || ''; | ||
49 | + // options.pageParam.winTitle = winTitle; | ||
50 | + // | ||
51 | + // if (winParams != undefined && winParams != null && winParams != {} && winParams != 'undefined') { | ||
52 | + // options.pageParam.win = JSON.stringify(winParams); | ||
53 | + // } | ||
54 | + // if (fmParams != undefined && fmParams != null && fmParams != {} && fmParams != 'undefined') { | ||
55 | + // options.pageParam.fm = JSON.stringify(fmParams); | ||
56 | + // } | ||
57 | + // api.openWin(options); | ||
52 | } | 58 | } |
53 | 59 | ||
54 | function closeWindow(winName) { | 60 | function closeWindow(winName) { |
@@ -59,7 +65,7 @@ function closeWindow(winName) { | @@ -59,7 +65,7 @@ function closeWindow(winName) { | ||
59 | function getHeight(id) { | 65 | function getHeight(id) { |
60 | return document.getElementById(id).offsetHeight; | 66 | return document.getElementById(id).offsetHeight; |
61 | } | 67 | } |
62 | - | 68 | + |
63 | 69 | ||
64 | function openFm(fmName, url) { | 70 | function openFm(fmName, url) { |
65 | var posY = $api.offset($api.dom("header")).h; | 71 | var posY = $api.offset($api.dom("header")).h; |
@@ -84,41 +84,52 @@ | @@ -84,41 +84,52 @@ | ||
84 | </head> | 84 | </head> |
85 | <body> | 85 | <body> |
86 | <div id="loadStart"></div> | 86 | <div id="loadStart"></div> |
87 | + | ||
87 | <div id="app" v-cloak> | 88 | <div id="app" v-cloak> |
88 | - <div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}"> | ||
89 | - <!--<div class="nurse_text">{{post_title}}</div>--> | ||
90 | - </div> | ||
91 | - <div class="img_p"> | ||
92 | - <div v-html="price_table"></div> | ||
93 | - </div> | ||
94 | - <div class="img_p"> | ||
95 | - <div v-html="problems"></div> | ||
96 | - </div> | ||
97 | - <div class="img_p"> | ||
98 | - <div class="care_title" @click="imgshow=!imgshow"><span>— 服务详情 —</span><span class="iconfont " | ||
99 | - :class="{'icon-ziyuan':imgshow,'icon-shangla':!imgshow}"></span> | 89 | + <header id="header"> |
90 | + <div class="index_header"> | ||
91 | + <div class="close_left" onclick="closeWindow()"><span class="iconfont icon-fanhui"></span></div> | ||
92 | + <span>{{post_title}}</span> | ||
93 | + <span class="iconfont icon-fenxiang-tianchong" ></span> | ||
100 | </div> | 94 | </div> |
101 | - <div v-html="service_info" v-show="imgshow"></div> | ||
102 | - </div> | ||
103 | - <div class="img_p"> | ||
104 | - <div class="care_title" @click="img_show=!img_show"><span>— 服务须知 —</span> | ||
105 | - <span class="iconfont" :class="{'icon-ziyuan':img_show,'icon-shangla':!img_show}"></span> | 95 | + </header> |
96 | + <div class="warp"> | ||
97 | + <div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}"> | ||
98 | + <!--<div class="nurse_text">{{post_title}}</div>--> | ||
106 | </div> | 99 | </div> |
107 | - </div> | ||
108 | - <div v-show="!img_show"> | ||
109 | <div class="img_p"> | 100 | <div class="img_p"> |
110 | - <div v-html="service_notice"></div> | 101 | + <div v-html="price_table"></div> |
102 | + </div> | ||
103 | + <div class="img_p"> | ||
104 | + <div v-html="problems"></div> | ||
105 | + </div> | ||
106 | + <div class="img_p"> | ||
107 | + <div class="care_title" @click="imgshow=!imgshow"><span>— 服务详情 —</span><span class="iconfont " | ||
108 | + :class="{'icon-ziyuan':imgshow,'icon-shangla':!imgshow}"></span> | ||
109 | + </div> | ||
110 | + <div v-html="service_info" v-show="imgshow"></div> | ||
111 | + </div> | ||
112 | + <div class="img_p"> | ||
113 | + <div class="care_title" @click="img_show=!img_show"><span>— 服务须知 —</span> | ||
114 | + <span class="iconfont" :class="{'icon-ziyuan':img_show,'icon-shangla':!img_show}"></span> | ||
115 | + </div> | ||
116 | + </div> | ||
117 | + <div v-show="!img_show"> | ||
118 | + <div class="img_p"> | ||
119 | + <div v-html="service_notice"></div> | ||
120 | + </div> | ||
121 | + </div> | ||
122 | + <div class="img_p"> | ||
123 | + <div v-html="advantage"></div> | ||
124 | + </div> | ||
125 | + <div class="img_p"> | ||
126 | + <div v-html="service_step"></div> | ||
127 | + </div> | ||
128 | + <div class="care_faq" @click="question"> | ||
129 | + <span>常见问题</span><span class="iconfont icon-xiangyou"></span> | ||
111 | </div> | 130 | </div> |
112 | </div> | 131 | </div> |
113 | - <div class="img_p"> | ||
114 | - <div v-html="advantage"></div> | ||
115 | - </div> | ||
116 | - <div class="img_p"> | ||
117 | - <div v-html="service_step"></div> | ||
118 | - </div> | ||
119 | - <div class="care_faq" @click="question"> | ||
120 | - <span>常见问题</span><span class="iconfont icon-xiangyou"></span> | ||
121 | - </div> | 132 | + |
122 | <footer class="doc_footer" id="footer"> | 133 | <footer class="doc_footer" id="footer"> |
123 | <div class="doc_left"><span class="rmb">¥</span><span class="doc_price">{{price?price:0}}</span><span | 134 | <div class="doc_left"><span class="rmb">¥</span><span class="doc_price">{{price?price:0}}</span><span |
124 | class="doc_qi">起</span> | 135 | class="doc_qi">起</span> |
@@ -162,19 +173,19 @@ | @@ -162,19 +173,19 @@ | ||
162 | userId: '', | 173 | userId: '', |
163 | }, | 174 | }, |
164 | created: function () { | 175 | created: function () { |
165 | - apiready = function () { | 176 | + var app = this |
166 | // alert('预约' + api.pageParam.id) | 177 | // alert('预约' + api.pageParam.id) |
167 | - app.cid = api.pageParam.cid; | ||
168 | - app.id = api.pageParam.id; | ||
169 | - app.care_name = api.pageParam.care_name; | ||
170 | - app.cityname = api.pageParam.cityname; | ||
171 | - app.proCareInfoInfo(); | ||
172 | - app.getUserIndexInfo(); | ||
173 | - } | 178 | + app.cid = localStorage.getItem('cid'); |
179 | + app.id = localStorage.getItem('id'); | ||
180 | + app.care_name = localStorage.getItem('care_name'); | ||
181 | + app.cityname = localStorage.getItem('cityname'); | ||
182 | + app.proCareInfoInfo(); | ||
183 | + app.getUserIndexInfo(); | ||
174 | }, | 184 | }, |
175 | methods: { | 185 | methods: { |
176 | // 去预约 | 186 | // 去预约 |
177 | appointment: function () { | 187 | appointment: function () { |
188 | + var app = this | ||
178 | if (app.cid == 5 || app.cid == 7 || app.cid == 8 || app.cid == 10) { | 189 | if (app.cid == 5 || app.cid == 7 || app.cid == 8 || app.cid == 10) { |
179 | openView('doc_package_f', 'index/doc_package_f', app.care_name, 'doc_package_f', false, { | 190 | openView('doc_package_f', 'index/doc_package_f', app.care_name, 'doc_package_f', false, { |
180 | id: app.id, | 191 | id: app.id, |
@@ -185,23 +196,24 @@ | @@ -185,23 +196,24 @@ | ||
185 | openView('pay_form_f', 'index/pay_form_f', app.care_name, 'pay_form_f', false, { | 196 | openView('pay_form_f', 'index/pay_form_f', app.care_name, 'pay_form_f', false, { |
186 | id: app.id, | 197 | id: app.id, |
187 | cityname: app.cityname, | 198 | cityname: app.cityname, |
188 | - cid: app.cid, | 199 | + cid: app.cid |
189 | }) | 200 | }) |
190 | } | 201 | } |
191 | }, | 202 | }, |
192 | // 去常见问题 | 203 | // 去常见问题 |
193 | question: function () { | 204 | question: function () { |
205 | + var app = this | ||
194 | openView('my_que', 'my/my_que', '常见问题', 'my_que', false, { | 206 | openView('my_que', 'my/my_que', '常见问题', 'my_que', false, { |
195 | id: app.id | 207 | id: app.id |
196 | }) | 208 | }) |
197 | }, | 209 | }, |
198 | // 获取详情 | 210 | // 获取详情 |
199 | proCareInfoInfo: function () { | 211 | proCareInfoInfo: function () { |
212 | + var app = this | ||
200 | var post = { | 213 | var post = { |
201 | id: app.id | 214 | id: app.id |
202 | }; | 215 | }; |
203 | getRequest('post', 'portal/Goods/proCareInfo', post, null).then(function (res) { | 216 | getRequest('post', 'portal/Goods/proCareInfo', post, null).then(function (res) { |
204 | - // alert(JSON.stringify(res)) | ||
205 | if (res.data.code == 1) { | 217 | if (res.data.code == 1) { |
206 | app.banner = res.data.data.banner; | 218 | app.banner = res.data.data.banner; |
207 | app.post_title = res.data.data.post_title; | 219 | app.post_title = res.data.data.post_title; |
@@ -219,6 +231,7 @@ | @@ -219,6 +231,7 @@ | ||
219 | }, | 231 | }, |
220 | // 获取个人的基本信息 | 232 | // 获取个人的基本信息 |
221 | getUserIndexInfo: function () { | 233 | getUserIndexInfo: function () { |
234 | + var app = this | ||
222 | var header = { | 235 | var header = { |
223 | "XX-Device-Type": getDevice(), | 236 | "XX-Device-Type": getDevice(), |
224 | 'XX-Token': getToken() | 237 | 'XX-Token': getToken() |
@@ -233,9 +246,10 @@ | @@ -233,9 +246,10 @@ | ||
233 | }, | 246 | }, |
234 | // 打开客服 | 247 | // 打开客服 |
235 | openSever: function () { | 248 | openSever: function () { |
249 | + var app = this | ||
236 | api.openWin({ | 250 | api.openWin({ |
237 | name: 'cs_win', | 251 | name: 'cs_win', |
238 | - url: '../common/cs_win.html', | 252 | + url: '../common/cs_win.html' |
239 | }); | 253 | }); |
240 | }, | 254 | }, |
241 | } | 255 | } |
@@ -28,8 +28,6 @@ | @@ -28,8 +28,6 @@ | ||
28 | align-items: center; | 28 | align-items: center; |
29 | justify-content: center; | 29 | justify-content: center; |
30 | } | 30 | } |
31 | - | ||
32 | - | ||
33 | .doc_content_img img { | 31 | .doc_content_img img { |
34 | width: 100%; | 32 | width: 100%; |
35 | } | 33 | } |
@@ -37,19 +35,29 @@ | @@ -37,19 +35,29 @@ | ||
37 | <body> | 35 | <body> |
38 | <div id="loadStart"></div> | 36 | <div id="loadStart"></div> |
39 | <div id="app"> | 37 | <div id="app"> |
40 | - <div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}"> | 38 | + <header id="header"> |
39 | + <div class="index_header"> | ||
40 | + <span class="iconfont icon-fanhui" onclick="closeWindow()"></span> | ||
41 | + <span>家庭医生</span> | ||
42 | + <span class="iconfont icon-fenxiang-tianchong" ></span> | ||
43 | + </div> | ||
44 | + </header> | ||
45 | + <div class="warp"> | ||
46 | + <div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}"> | ||
41 | <!--<div class="nurse_text">{{name}}</div>--> | 47 | <!--<div class="nurse_text">{{name}}</div>--> |
48 | + </div> | ||
49 | + <!--<div class="nurse_banner" style='background-image: url("../../assets/image/nurse.png")'></div>--> | ||
50 | + <!--<img class="doc_content_img" src="../../assets/image/dc_02.jpg"/>--> | ||
51 | + <div class="doc_box"> | ||
52 | + <div v-html="price_table" class="doc_content_img"></div> | ||
53 | + <div v-html="problems" class="doc_content_img"></div> | ||
54 | + <div v-html="service_info" class="doc_content_img"></div> | ||
55 | + <div v-html="advantage" class="doc_content_img"></div> | ||
56 | + <div v-html="service_notice" class="doc_content_img"></div> | ||
57 | + <div v-html="service_step" class="doc_content_img"></div> | ||
58 | + </div> | ||
42 | </div> | 59 | </div> |
43 | - <!--<div class="nurse_banner" style='background-image: url("../../assets/image/nurse.png")'></div>--> | ||
44 | - <!--<img class="doc_content_img" src="../../assets/image/dc_02.jpg"/>--> | ||
45 | - <div class="doc_box"> | ||
46 | - <div v-html="price_table" class="doc_content_img"></div> | ||
47 | - <div v-html="problems" class="doc_content_img"></div> | ||
48 | - <div v-html="service_info" class="doc_content_img"></div> | ||
49 | - <div v-html="advantage" class="doc_content_img"></div> | ||
50 | - <div v-html="service_notice" class="doc_content_img"></div> | ||
51 | - <div v-html="service_step" class="doc_content_img"></div> | ||
52 | - </div> | 60 | + |
53 | <footer class="doc_footer" id="footer"> | 61 | <footer class="doc_footer" id="footer"> |
54 | <div class="doc_left"> | 62 | <div class="doc_left"> |
55 | <span class="rmb">¥</span> | 63 | <span class="rmb">¥</span> |
@@ -92,14 +100,15 @@ | @@ -92,14 +100,15 @@ | ||
92 | userId:'' | 100 | userId:'' |
93 | }, | 101 | }, |
94 | created: function () { | 102 | created: function () { |
95 | - apiready = function () { | ||
96 | - app.cid = api.pageParam.cid; | ||
97 | - app.getDoctor(); | ||
98 | - app.getUserIndexInfo(); | ||
99 | - } | 103 | + // apiready = function () { |
104 | + this.cid = localStorage.getItem('cid'); | ||
105 | + this.getDoctor(); | ||
106 | + this.getUserIndexInfo(); | ||
107 | + // } | ||
100 | }, | 108 | }, |
101 | methods: { | 109 | methods: { |
102 | getDoctor: function () { | 110 | getDoctor: function () { |
111 | + var that = this | ||
103 | var header = { | 112 | var header = { |
104 | "XX-Device-Type": getDevice(), | 113 | "XX-Device-Type": getDevice(), |
105 | 'XX-Token': getToken() | 114 | 'XX-Token': getToken() |
@@ -107,16 +116,16 @@ | @@ -107,16 +116,16 @@ | ||
107 | getRequest('post', 'portal/Goods/getDoctor', null, header).then(function (res) { | 116 | getRequest('post', 'portal/Goods/getDoctor', null, header).then(function (res) { |
108 | // alert(JSON.stringify(res)); | 117 | // alert(JSON.stringify(res)); |
109 | if (res.data.code == 1) { | 118 | if (res.data.code == 1) { |
110 | - app.banner = res.data.data.banner; | ||
111 | - app.price_table = res.data.data.price_table; | ||
112 | - app.problems = res.data.data.problems; | ||
113 | - app.service_notice = res.data.data.service_notice; | ||
114 | - app.advantage = res.data.data.advantage; | ||
115 | - app.service_step = res.data.data.service_step; | ||
116 | - app.post_title = res.data.data.post_title; | ||
117 | - app.service_info = res.data.data.service_info; | ||
118 | - app.id = res.data.data.id; | ||
119 | - app.price = res.data.data.price; | 119 | + that.banner = res.data.data.banner; |
120 | + that.price_table = res.data.data.price_table; | ||
121 | + that.problems = res.data.data.problems; | ||
122 | + that.service_notice = res.data.data.service_notice; | ||
123 | + that.advantage = res.data.data.advantage; | ||
124 | + that.service_step = res.data.data.service_step; | ||
125 | + that.post_title = res.data.data.post_title; | ||
126 | + that.service_info = res.data.data.service_info; | ||
127 | + that.id = res.data.data.id; | ||
128 | + that.price = res.data.data.price; | ||
120 | loadEnd(); | 129 | loadEnd(); |
121 | } else { | 130 | } else { |
122 | toastMsg(res.data.msg) | 131 | toastMsg(res.data.msg) |
@@ -169,6 +178,7 @@ | @@ -169,6 +178,7 @@ | ||
169 | }, | 178 | }, |
170 | // 获取个人的基本信息 | 179 | // 获取个人的基本信息 |
171 | getUserIndexInfo: function () { | 180 | getUserIndexInfo: function () { |
181 | + var app = this | ||
172 | var header = { | 182 | var header = { |
173 | "XX-Device-Type": getDevice(), | 183 | "XX-Device-Type": getDevice(), |
174 | 'XX-Token': getToken() | 184 | 'XX-Token': getToken() |
@@ -183,6 +193,7 @@ | @@ -183,6 +193,7 @@ | ||
183 | }, | 193 | }, |
184 | // 获取客服token | 194 | // 获取客服token |
185 | getRongYunToken: function () { | 195 | getRongYunToken: function () { |
196 | + var app = this | ||
186 | var header = { | 197 | var header = { |
187 | "XX-Device-Type": getDevice(), | 198 | "XX-Device-Type": getDevice(), |
188 | 'XX-Token': getToken() | 199 | 'XX-Token': getToken() |
@@ -21,6 +21,9 @@ | @@ -21,6 +21,9 @@ | ||
21 | <span class="iconfont icon-fenxiang-tianchong" @click="share"></span> | 21 | <span class="iconfont icon-fenxiang-tianchong" @click="share"></span> |
22 | </div> | 22 | </div> |
23 | </header> | 23 | </header> |
24 | + <div class="warp"> | ||
25 | + | ||
26 | + </div> | ||
24 | 27 | ||
25 | </div> | 28 | </div> |
26 | </body> | 29 | </body> |
@@ -43,7 +46,7 @@ | @@ -43,7 +46,7 @@ | ||
43 | cid: '' | 46 | cid: '' |
44 | }, | 47 | }, |
45 | created: function () { | 48 | created: function () { |
46 | - apiready = function () { | 49 | + // apiready = function () { |
47 | app.cid = api.pageParam.cid; | 50 | app.cid = api.pageParam.cid; |
48 | $api.fixStatusBar($api.dom('header')); | 51 | $api.fixStatusBar($api.dom('header')); |
49 | api.setStatusBarStyle({ | 52 | api.setStatusBarStyle({ |
@@ -65,7 +68,7 @@ | @@ -65,7 +68,7 @@ | ||
65 | cityname: app.cityname | 68 | cityname: app.cityname |
66 | } | 69 | } |
67 | }); | 70 | }); |
68 | - } | 71 | + // } |
69 | }, | 72 | }, |
70 | methods: { | 73 | methods: { |
71 | share: function () { | 74 | share: function () { |
@@ -42,9 +42,18 @@ | @@ -42,9 +42,18 @@ | ||
42 | } | 42 | } |
43 | 43 | ||
44 | .examination_box { | 44 | .examination_box { |
45 | + flex:1; | ||
46 | + height: 100%; | ||
45 | margin: 0.1rem 0; | 47 | margin: 0.1rem 0; |
46 | background-color: #fff; | 48 | background-color: #fff; |
47 | box-shadow: 0.01rem 0.02rem 0.05rem #C8C6C6; | 49 | box-shadow: 0.01rem 0.02rem 0.05rem #C8C6C6; |
50 | + display: flex; | ||
51 | + display: -webkit-flex; | ||
52 | + display: -webkit-box; | ||
53 | + flex-flow: column; | ||
54 | + -webkit-flex-flow: column; | ||
55 | + -webkit-box-orient: vertical; | ||
56 | + overflow-x: hidden; | ||
48 | } | 57 | } |
49 | 58 | ||
50 | .old_price { | 59 | .old_price { |
@@ -58,54 +67,72 @@ | @@ -58,54 +67,72 @@ | ||
58 | /*padding: 0.28rem 0.25rem;*/ | 67 | /*padding: 0.28rem 0.25rem;*/ |
59 | } | 68 | } |
60 | .warp{ | 69 | .warp{ |
61 | - width: 100%; | ||
62 | - height: 100%; | ||
63 | - } | ||
64 | - svg{ | ||
65 | - width: 100%; | ||
66 | - height: 100%; | 70 | + display: flex; |
71 | + display: -webkit-flex; | ||
72 | + display: -webkit-box; | ||
73 | + flex-flow: column; | ||
74 | + -webkit-flex-flow: column; | ||
75 | + -webkit-box-orient: vertical; | ||
76 | + overflow-x: hidden; | ||
67 | } | 77 | } |
78 | + | ||
79 | + | ||
68 | </style> | 80 | </style> |
69 | </head> | 81 | </head> |
70 | <body> | 82 | <body> |
71 | <!-- 背景充满 --> | 83 | <!-- 背景充满 --> |
72 | <div id="loadStart"></div> | 84 | <div id="loadStart"></div> |
73 | -<div id="app" class="warp" > | ||
74 | - <!-- {{JSON.stringify(banner)}} --> | 85 | +<div id="app"> |
86 | + <header id="header"> | ||
87 | + <div class="index_header white_bg"> | ||
88 | + <div class="close_left" onclick="closeWindow()"> | ||
89 | + <span class="iconfont icon-fanhui"></span> | ||
90 | + </div> | ||
91 | + <div class="win_mid">{{winTitle}}</div> | ||
92 | + <div></div> | ||
93 | + </div> | ||
94 | + </header> | ||
75 | <div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}"> | 95 | <div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}"> |
76 | <div class="nurse_text">{{name}}</div> | 96 | <div class="nurse_text">{{name}}</div> |
77 | </div> | 97 | </div> |
78 | - <div class="examination_box"> | ||
79 | - <div class="examination_swiper"> | ||
80 | - <div class="swiper-container"> | ||
81 | - <div class="swiper-wrapper"> | ||
82 | - <div class="swiper-slide" v-for="(item,index) in navs"> | ||
83 | - <span v-text="item" :class="{'examination_active':index==ind}" | ||
84 | - @click="changeSwiper(index)"></span> | 98 | + <div class="warp"> |
99 | + <!-- {{JSON.stringify(banner)}} --> | ||
100 | + | ||
101 | + <div class="examination_box"> | ||
102 | + <div class="examination_swiper"> | ||
103 | + <div class="swiper-container"> | ||
104 | + <div class="swiper-wrapper"> | ||
105 | + <div class="swiper-slide" v-for="(item,index) in navs"> | ||
106 | + <span v-text="item" :class="{'examination_active':index==ind}" @click="changeSwiper(index)"></span> | ||
107 | + </div> | ||
85 | </div> | 108 | </div> |
86 | </div> | 109 | </div> |
87 | </div> | 110 | </div> |
88 | - </div> | ||
89 | - <div class="examination_content_swiper"> | ||
90 | - <div class="swiper-container "> | ||
91 | - <div class="swiper-wrapper"> | ||
92 | - <div class="swiper-slide" v-for="(item,index) in goods"> | ||
93 | - <div class="swiper_list"> | ||
94 | - <div class="swiper_item nodata" v-if="item.goods.length==0">暂无信息</div> | ||
95 | - <div class="swiper_item" v-else @click="openDoc(i.good_id)" | ||
96 | - v-for="(i,iindex) in item.goods"> | ||
97 | - <div class="swiper_item_img"><img :src="i.img" alt=""></div> | ||
98 | - <div class="swiper_item_right"> | ||
99 | - <div class="swiper_item_title">{{i.post_title}}</div> | ||
100 | - <div class="swiper_item_content">{{i.other_title}}</div> | ||
101 | - <div class="swiper_item_type"> | ||
102 | - <div class="swiper_item_type1" v-for="(j,item2_index) in i.tag"> | ||
103 | - <div class="icon_img"><img :src="j.url" alt=""></div> | ||
104 | - <span>{{j.text}}</span> | ||
105 | - </div> | 111 | + <div class="examination_content_swiper warp"> |
112 | + <div class="swiper-container "> | ||
113 | + <div class="swiper-wrapper"> | ||
114 | + <div class="swiper-slide" v-for="(item,index) in goods"> | ||
115 | + <div class="swiper_list"> | ||
116 | + <div class="swiper_item nodata" v-if="item.goods.length==0">暂无信息</div> | ||
117 | + <div class="swiper_item" v-else @click="openDoc(i.good_id)" v-for="(i,iindex) in item.goods"> | ||
118 | + <div class="swiper_item_img"> | ||
119 | + <img :src="i.img" alt=""> | ||
106 | </div> | 120 | </div> |
107 | - <div class="swiper_item_money"><span>¥{{i.real_price?i.real_price:0}}</span><span | ||
108 | - class="old_price">¥{{i.price?i.price:0}}</span> | 121 | + <div class="swiper_item_right"> |
122 | + <div class="swiper_item_title">{{i.post_title}}</div> | ||
123 | + <div class="swiper_item_content">{{i.other_title}}</div> | ||
124 | + <div class="swiper_item_type"> | ||
125 | + <div class="swiper_item_type1" v-for="(j,item2_index) in i.tag"> | ||
126 | + <div class="icon_img"> | ||
127 | + <img :src="j.url" alt=""> | ||
128 | + </div> | ||
129 | + <span>{{j.text}}</span> | ||
130 | + </div> | ||
131 | + </div> | ||
132 | + <div class="swiper_item_money"> | ||
133 | + <span>¥{{i.real_price?i.real_price:0}}</span> | ||
134 | + <span class="old_price">¥{{i.price?i.price:0}}</span> | ||
135 | + </div> | ||
109 | </div> | 136 | </div> |
110 | </div> | 137 | </div> |
111 | </div> | 138 | </div> |
@@ -116,6 +143,7 @@ | @@ -116,6 +143,7 @@ | ||
116 | </div> | 143 | </div> |
117 | </div> | 144 | </div> |
118 | </div> | 145 | </div> |
146 | + | ||
119 | </body> | 147 | </body> |
120 | </html> | 148 | </html> |
121 | <script type="text/javascript" src="../../assets/js/api.js"></script> | 149 | <script type="text/javascript" src="../../assets/js/api.js"></script> |
@@ -149,6 +177,7 @@ | @@ -149,6 +177,7 @@ | ||
149 | }, | 177 | }, |
150 | created: function () { | 178 | created: function () { |
151 | this.cid = localStorage.getItem('cid') | 179 | this.cid = localStorage.getItem('cid') |
180 | + this.winTitle = localStorage.getItem('winTitle') | ||
152 | this.getCatInfo3(); | 181 | this.getCatInfo3(); |
153 | this.mySwiper = new Swiper('.examination_swiper .swiper-container', { | 182 | this.mySwiper = new Swiper('.examination_swiper .swiper-container', { |
154 | slidesPerView: 'auto', | 183 | slidesPerView: 'auto', |
@@ -439,14 +439,17 @@ | @@ -439,14 +439,17 @@ | ||
439 | }, | 439 | }, |
440 | // 轮播图跳转详情 | 440 | // 轮播图跳转详情 |
441 | care: function (id, care_name) { | 441 | care: function (id, care_name) { |
442 | - api.openWin({ | ||
443 | - name: 'care_w', | ||
444 | - url: './care_w.html', | ||
445 | - pageParam: { | ||
446 | - id: id, | ||
447 | - care_name: care_name | ||
448 | - } | ||
449 | - }) | 442 | + window.location.href = 'care_f.html'; |
443 | + localStorage.setItem('id',id); | ||
444 | + localStorage.setItem('care_name',care_name); | ||
445 | + // api.openWin({ | ||
446 | + // name: 'care_w', | ||
447 | + // url: './care_w.html', | ||
448 | + // pageParam: { | ||
449 | + // id: id, | ||
450 | + // care_name: care_name | ||
451 | + // } | ||
452 | + // }) | ||
450 | }, | 453 | }, |
451 | getUserIndexInfo: function () { | 454 | getUserIndexInfo: function () { |
452 | var header = { | 455 | var header = { |
@@ -501,7 +504,7 @@ | @@ -501,7 +504,7 @@ | ||
501 | // }); | 504 | // }); |
502 | break; | 505 | break; |
503 | case 5: | 506 | case 5: |
504 | - url = 'doc_home_w' | 507 | + url = 'doc_home_f' |
505 | break; | 508 | break; |
506 | case 6: | 509 | case 6: |
507 | url = 'disease_f' | 510 | url = 'disease_f' |
@@ -536,7 +539,7 @@ | @@ -536,7 +539,7 @@ | ||
536 | // }); | 539 | // }); |
537 | break; | 540 | break; |
538 | case 10: | 541 | case 10: |
539 | - url = 'tral_w' | 542 | + url = 'tral_f' |
540 | // api.openWin({ | 543 | // api.openWin({ |
541 | // name: 'tral_w', | 544 | // name: 'tral_w', |
542 | // url: './tral_w.html', | 545 | // url: './tral_w.html', |
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | <style> | 16 | <style> |
17 | body { | 17 | body { |
18 | background-color: #f5f5f5; | 18 | background-color: #f5f5f5; |
19 | - padding-bottom: 75px; | 19 | + padding-bottom: 15px; |
20 | margin: 0; | 20 | margin: 0; |
21 | /*width: 350px;*/ | 21 | /*width: 350px;*/ |
22 | } | 22 | } |
@@ -204,10 +204,12 @@ | @@ -204,10 +204,12 @@ | ||
204 | top: 0; | 204 | top: 0; |
205 | left: 0; | 205 | left: 0; |
206 | z-index: 5; | 206 | z-index: 5; |
207 | - background: none; | ||
208 | color: #fff; | 207 | color: #fff; |
209 | line-height: 44px; | 208 | line-height: 44px; |
210 | - padding: 10px 20px 0 20px; | 209 | + padding: 0 15px; |
210 | + justify-content: space-between; | ||
211 | + box-sizing: border-box; | ||
212 | + background-color: rgba(219,178,95,1); | ||
211 | } | 213 | } |
212 | 214 | ||
213 | .index_on { | 215 | .index_on { |
@@ -305,15 +307,18 @@ | @@ -305,15 +307,18 @@ | ||
305 | .tral_fee_box{ | 307 | .tral_fee_box{ |
306 | background-color: #fff; | 308 | background-color: #fff; |
307 | } | 309 | } |
310 | + .swiper-container{ | ||
311 | + margin-top: 44px; | ||
312 | + } | ||
308 | </style> | 313 | </style> |
309 | </head> | 314 | </head> |
310 | <body> | 315 | <body> |
311 | <div id="loadStart"></div> | 316 | <div id="loadStart"></div> |
312 | <div id="app" v-cloak> | 317 | <div id="app" v-cloak> |
313 | <div class="health_swiper"> | 318 | <div class="health_swiper"> |
314 | - <header id="header" class="border0"> | 319 | + <header id="header" class="border0 index_header"> |
315 | <div :class="['index_header',color_change?'index_on':'','border0']"> | 320 | <div :class="['index_header',color_change?'index_on':'','border0']"> |
316 | - <span class="iconfont icon-fanhui" @click="api.closeWin()"></span> | 321 | + <span class="iconfont icon-fanhui" onclick="closeWindow()"></span> |
317 | <span>健康旅游</span> | 322 | <span>健康旅游</span> |
318 | <span class="iconfont icon-fenxiang-tianchong" @click="share"></span> | 323 | <span class="iconfont icon-fenxiang-tianchong" @click="share"></span> |
319 | </div> | 324 | </div> |
@@ -459,33 +464,34 @@ | @@ -459,33 +464,34 @@ | ||
459 | cid: '' | 464 | cid: '' |
460 | }, | 465 | }, |
461 | created: function () { | 466 | created: function () { |
462 | - apiready = function () { | ||
463 | - app.cid = api.pageParam.cid; | ||
464 | - app.health_swiper = new Swiper('.swiper-container', { | ||
465 | - effect: 'fade', | ||
466 | - fade: { | ||
467 | - crossFade: true, | ||
468 | - }, | ||
469 | - autoplay: 3000, | ||
470 | - pagination: '.swiper-pagination', | ||
471 | - paginationClickable: true, | ||
472 | - observer: true, | ||
473 | - observeParents: true, | ||
474 | - }); | ||
475 | - app.travel() | ||
476 | - } | 467 | + var app = this; |
468 | + app.cid = localStorage.getItem('cid'); | ||
469 | + app.health_swiper = new Swiper('.swiper-container', { | ||
470 | + effect: 'fade', | ||
471 | + fade: { | ||
472 | + crossFade: true, | ||
473 | + }, | ||
474 | + autoplay: 3000, | ||
475 | + pagination: '.swiper-pagination', | ||
476 | + paginationClickable: true, | ||
477 | + observer: true, | ||
478 | + observeParents: true, | ||
479 | + }); | ||
480 | + app.travel() | ||
477 | }, | 481 | }, |
478 | mounted: function () { | 482 | mounted: function () { |
479 | window.addEventListener('scroll', this.handleScroll) | 483 | window.addEventListener('scroll', this.handleScroll) |
480 | }, | 484 | }, |
481 | methods: { | 485 | methods: { |
482 | appointment: function () { | 486 | appointment: function () { |
487 | + var app = this; | ||
483 | openView('doc_package_f', 'index/doc_package_f', '旅游套餐', 'doc_package_f', false, { | 488 | openView('doc_package_f', 'index/doc_package_f', '旅游套餐', 'doc_package_f', false, { |
484 | cid: app.cid, | 489 | cid: app.cid, |
485 | id: app.id | 490 | id: app.id |
486 | }) | 491 | }) |
487 | }, | 492 | }, |
488 | travel: function () { | 493 | travel: function () { |
494 | + var app = this | ||
489 | var header = { | 495 | var header = { |
490 | "XX-Device-Type": getDevice(), | 496 | "XX-Device-Type": getDevice(), |
491 | 'XX-Token': getToken() | 497 | 'XX-Token': getToken() |
@@ -529,6 +535,7 @@ | @@ -529,6 +535,7 @@ | ||
529 | }); | 535 | }); |
530 | }, | 536 | }, |
531 | handleScroll: function () { | 537 | handleScroll: function () { |
538 | + var app = this | ||
532 | var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; | 539 | var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; |
533 | var offsetTop = document.querySelector('#main').offsetTop; | 540 | var offsetTop = document.querySelector('#main').offsetTop; |
534 | if (scrollTop > offsetTop) { | 541 | if (scrollTop > offsetTop) { |
@@ -538,6 +545,7 @@ | @@ -538,6 +545,7 @@ | ||
538 | } | 545 | } |
539 | }, | 546 | }, |
540 | show: function (index) { | 547 | show: function (index) { |
548 | + var app = this | ||
541 | if (app.body_show == index) { | 549 | if (app.body_show == index) { |
542 | app.body_show = -1 | 550 | app.body_show = -1 |
543 | } else { | 551 | } else { |
@@ -49,6 +49,7 @@ | @@ -49,6 +49,7 @@ | ||
49 | .detail_item_right { | 49 | .detail_item_right { |
50 | display: flex; | 50 | display: flex; |
51 | align-items: center; | 51 | align-items: center; |
52 | + position: relative; | ||
52 | } | 53 | } |
53 | 54 | ||
54 | .detail_item_right .iconfont { | 55 | .detail_item_right .iconfont { |
@@ -90,6 +91,14 @@ | @@ -90,6 +91,14 @@ | ||
90 | position: fixed; | 91 | position: fixed; |
91 | /*margin: 0.3rem 0 0 0;*/ | 92 | /*margin: 0.3rem 0 0 0;*/ |
92 | } | 93 | } |
94 | + .img_input{ | ||
95 | + position: absolute; | ||
96 | + width: 100%; | ||
97 | + height: 100%; | ||
98 | + left: 0; | ||
99 | + top: 0; | ||
100 | + opacity: 0; | ||
101 | + } | ||
93 | 102 | ||
94 | </style> | 103 | </style> |
95 | </head> | 104 | </head> |
@@ -99,11 +108,12 @@ | @@ -99,11 +108,12 @@ | ||
99 | <div class="detail_top"> | 108 | <div class="detail_top"> |
100 | <div class="detail_item"> | 109 | <div class="detail_item"> |
101 | <div>头像</div> | 110 | <div>头像</div> |
102 | - <div class="detail_item_right" @click="popupVisible_head_img=true"> | 111 | + <div class="detail_item_right" > |
103 | <span class="detail_item_img padding0"> | 112 | <span class="detail_item_img padding0"> |
104 | <img :src="head_img?head_img:'../../assets/image/default_img.png'" alt=""> | 113 | <img :src="head_img?head_img:'../../assets/image/default_img.png'" alt=""> |
105 | </span> | 114 | </span> |
106 | <span class="iconfont icon-xiangyou"></span> | 115 | <span class="iconfont icon-xiangyou"></span> |
116 | + <input type="file" @change="takePhotos" accept="image/jpeg,image/x-png,image/gif" id="" value="" class="img_input"> | ||
107 | </div> | 117 | </div> |
108 | <mt-popup v-model="popupVisible_head_img" position="bottom"> | 118 | <mt-popup v-model="popupVisible_head_img" position="bottom"> |
109 | <ul class="moreoul"> | 119 | <ul class="moreoul"> |
@@ -276,37 +286,37 @@ | @@ -276,37 +286,37 @@ | ||
276 | user_type_name: '' | 286 | user_type_name: '' |
277 | }, | 287 | }, |
278 | created: function () { | 288 | created: function () { |
279 | - apiready = function () { | ||
280 | - for (var i = 0; i < 300; i++) { | ||
281 | - app.weight_list.push({ | ||
282 | - "label": i + 'kg', | ||
283 | - "value": i, | ||
284 | - }) | ||
285 | - } | ||
286 | - for (var j = 50; j < 300; j++) { | ||
287 | - app.height_list.push( | ||
288 | - { | ||
289 | - "label": j + 'cm', | ||
290 | - "value": j, | ||
291 | - } | ||
292 | - ) | ||
293 | - } | ||
294 | - app.user_type_name = api.pageParam.name; | ||
295 | - app.rid = api.pageParam.rid; | ||
296 | - // alert(app.rid) | ||
297 | - app.type = api.pageParam.type; | ||
298 | - if (app.type == 0) { | ||
299 | - app.getUserinfo(); | ||
300 | - } | ||
301 | - app.getJob(); | ||
302 | - app.getCulture(); | ||
303 | - app.getMedical(); | ||
304 | - app.getRelationship(); | 289 | + var app = this; |
290 | + for (var i = 0; i < 300; i++) { | ||
291 | + app.weight_list.push({ | ||
292 | + "label": i + 'kg', | ||
293 | + "value": i, | ||
294 | + }) | ||
305 | } | 295 | } |
296 | + for (var j = 50; j < 300; j++) { | ||
297 | + app.height_list.push( | ||
298 | + { | ||
299 | + "label": j + 'cm', | ||
300 | + "value": j, | ||
301 | + } | ||
302 | + ) | ||
303 | + } | ||
304 | + app.user_type_name = localStorage.getItem('name'); | ||
305 | + app.rid = localStorage.getItem('rid'); | ||
306 | + // alert(app.rid) | ||
307 | + app.type = localStorage.getItem('type'); | ||
308 | + if (app.type == 0) { | ||
309 | + app.getUserinfo(); | ||
310 | + } | ||
311 | + app.getJob(); | ||
312 | + app.getCulture(); | ||
313 | + app.getMedical(); | ||
314 | + app.getRelationship(); | ||
306 | }, | 315 | }, |
307 | methods: { | 316 | methods: { |
308 | // 获取个人信息 | 317 | // 获取个人信息 |
309 | getUserinfo: function () { | 318 | getUserinfo: function () { |
319 | + var app = this; | ||
310 | var post = { | 320 | var post = { |
311 | rid: app.rid | 321 | rid: app.rid |
312 | }; | 322 | }; |
@@ -318,7 +328,7 @@ | @@ -318,7 +328,7 @@ | ||
318 | if (res.data.code == 1) { | 328 | if (res.data.code == 1) { |
319 | // alert(JSON.stringify(res)); | 329 | // alert(JSON.stringify(res)); |
320 | app.user_info = res.data.data; | 330 | app.user_info = res.data.data; |
321 | - app.head_img = app.user_info.avatar; | 331 | + app.head_img = 'http://wx.cijievip.com/'+app.user_info.avatar; |
322 | app.name = app.user_info.name ? app.user_info.name : ''; | 332 | app.name = app.user_info.name ? app.user_info.name : ''; |
323 | app.user_info.sex == 1 ? app.checked_male = true : app.checked_male = false; | 333 | app.user_info.sex == 1 ? app.checked_male = true : app.checked_male = false; |
324 | app.phone = app.user_info.mobile; | 334 | app.phone = app.user_info.mobile; |
@@ -342,48 +352,72 @@ | @@ -342,48 +352,72 @@ | ||
342 | }) | 352 | }) |
343 | }, | 353 | }, |
344 | // 选择头像 | 354 | // 选择头像 |
345 | - takePhotos: function (type) { | ||
346 | - api.getPicture({ | ||
347 | - sourceType: type, | ||
348 | - encodingType: 'jpg', | ||
349 | - mediaValue: 'pic', | ||
350 | - destinationType: 'url', | ||
351 | - allowEdit: true, | ||
352 | - quality: 50, | ||
353 | - targetWidth: 100, | ||
354 | - targetHeight: 100, | ||
355 | - saveToPhotoAlbum: false | ||
356 | - }, function (ret, err) { | ||
357 | - if (ret) { | ||
358 | - api.ajax({ | ||
359 | - url: baseurl + "user/index/upAvatar", | ||
360 | - method: 'post', | ||
361 | - data: { | ||
362 | - files: { | ||
363 | - file: ret.data | ||
364 | - } | ||
365 | - }, | 355 | + takePhotos: function () { |
356 | + var app = this; | ||
357 | + var file = e.target.files[0];e | ||
358 | + var imgSize=file.size/1024; | ||
359 | + if(imgSize>200){ | ||
360 | + alert('请上传大小不要超过200KB的图片') | ||
361 | + }else{ | ||
362 | + var reader = new FileReader(); | ||
363 | + reader.readAsDataURL(file); // 读出 base64 | ||
364 | + reader.onloadend = function () { | ||
365 | + // 图片的 base64 格式, 可以直接当成 img 的 src 属性值 | ||
366 | + var dataURL = reader.result; | ||
367 | + // 下面逻辑处理 | ||
368 | + $.ajax({ | ||
369 | + type:"post", | ||
370 | + url:baseurl + "user/index/upAvatar", | ||
366 | headers: { | 371 | headers: { |
367 | "XX-Device-Type": getDevice(), | 372 | "XX-Device-Type": getDevice(), |
368 | "XX-Token": getToken() | 373 | "XX-Token": getToken() |
374 | + }, | ||
375 | + async:true, | ||
376 | + data:{ | ||
377 | + avatar:dataURL, | ||
378 | + avatar_wx:1, | ||
379 | + token:token, | ||
380 | + uid:uid | ||
381 | + }, | ||
382 | + success:function(e){ | ||
383 | + that.avatar=dataURL; | ||
384 | + alert('修改成功'); | ||
385 | + $(".tsk").show().delay(1500).hide(0); | ||
369 | } | 386 | } |
370 | - }, function (res, err) { | ||
371 | - // alert(JSON.stringify(res)); | ||
372 | - if (res) { | ||
373 | - app.head_img = res.data.url | ||
374 | - } else { | 387 | + }); |
388 | + }; | ||
389 | + } | ||
375 | 390 | ||
391 | + } | ||
392 | + if (ret) { | ||
393 | + api.ajax({ | ||
394 | + url: baseurl + "user/index/upAvatar", | ||
395 | + method: 'post', | ||
396 | + data: { | ||
397 | + files: { | ||
398 | + file: ret.data | ||
376 | } | 399 | } |
377 | - }); | ||
378 | - } else { | ||
379 | - // alert(JSON.stringify(err)); | ||
380 | - toastMsg('取消') | ||
381 | - } | ||
382 | - }); | ||
383 | - app.popupVisible_head_img = false; | 400 | + }, |
401 | + headers: { | ||
402 | + "XX-Device-Type": getDevice(), | ||
403 | + "XX-Token": getToken() | ||
404 | + } | ||
405 | + }, function (res, err) { | ||
406 | + // alert(JSON.stringify(res)); | ||
407 | + if (res) { | ||
408 | + app.head_img = res.data.url | ||
409 | + } else { | ||
410 | + | ||
411 | + } | ||
412 | + }); | ||
413 | + } else { | ||
414 | + // alert(JSON.stringify(err)); | ||
415 | + toastMsg('取消') | ||
416 | + } | ||
384 | }, | 417 | }, |
385 | // 选择生日 | 418 | // 选择生日 |
386 | broSelect: function () { | 419 | broSelect: function () { |
420 | + var app = this; | ||
387 | api.openPicker({ | 421 | api.openPicker({ |
388 | type: 'date', | 422 | type: 'date', |
389 | title: '选择出生日期' | 423 | title: '选择出生日期' |
@@ -406,6 +440,7 @@ | @@ -406,6 +440,7 @@ | ||
406 | }, | 440 | }, |
407 | // 选择身高 | 441 | // 选择身高 |
408 | heightSelect: function () { | 442 | heightSelect: function () { |
443 | + var app = this; | ||
409 | weui.picker(app.height_list, { | 444 | weui.picker(app.height_list, { |
410 | defaultValue: [170], | 445 | defaultValue: [170], |
411 | onChange: function (result) { | 446 | onChange: function (result) { |
@@ -417,6 +452,7 @@ | @@ -417,6 +452,7 @@ | ||
417 | }, | 452 | }, |
418 | // 选择体重 | 453 | // 选择体重 |
419 | weightSelect: function () { | 454 | weightSelect: function () { |
455 | + var app = this; | ||
420 | weui.picker(app.weight_list, | 456 | weui.picker(app.weight_list, |
421 | { | 457 | { |
422 | defaultValue: [50], | 458 | defaultValue: [50], |
@@ -430,6 +466,7 @@ | @@ -430,6 +466,7 @@ | ||
430 | }, | 466 | }, |
431 | // 选择婚姻状况 | 467 | // 选择婚姻状况 |
432 | getMarry: function () { | 468 | getMarry: function () { |
469 | + var app = this; | ||
433 | weui.picker(app.merry_list, { | 470 | weui.picker(app.merry_list, { |
434 | onChange: function (result) { | 471 | onChange: function (result) { |
435 | }, | 472 | }, |
@@ -441,6 +478,7 @@ | @@ -441,6 +478,7 @@ | ||
441 | 478 | ||
442 | // 获取文化程度 | 479 | // 获取文化程度 |
443 | getCulture: function () { | 480 | getCulture: function () { |
481 | + var app = this; | ||
444 | var header = { | 482 | var header = { |
445 | 'XX-Device-Type': getDevice(), | 483 | 'XX-Device-Type': getDevice(), |
446 | 'XX-Token': getToken() | 484 | 'XX-Token': getToken() |
@@ -462,6 +500,7 @@ | @@ -462,6 +500,7 @@ | ||
462 | }, | 500 | }, |
463 | // 选择文化程度 | 501 | // 选择文化程度 |
464 | educations: function () { | 502 | educations: function () { |
503 | + var app = this; | ||
465 | weui.picker(app.getCulture_data, { | 504 | weui.picker(app.getCulture_data, { |
466 | onChange: function (result) { | 505 | onChange: function (result) { |
467 | }, | 506 | }, |
@@ -473,6 +512,7 @@ | @@ -473,6 +512,7 @@ | ||
473 | }, | 512 | }, |
474 | // 获取职业 | 513 | // 获取职业 |
475 | getJob: function () { | 514 | getJob: function () { |
515 | + var app = this; | ||
476 | var header = { | 516 | var header = { |
477 | 'XX-Device-Type': getDevice(), | 517 | 'XX-Device-Type': getDevice(), |
478 | 'XX-Token': getToken() | 518 | 'XX-Token': getToken() |
@@ -495,6 +535,7 @@ | @@ -495,6 +535,7 @@ | ||
495 | }, | 535 | }, |
496 | // 选择职业 | 536 | // 选择职业 |
497 | getPosition: function () { | 537 | getPosition: function () { |
538 | + var app = this; | ||
498 | weui.picker(app.position_list, { | 539 | weui.picker(app.position_list, { |
499 | onChange: function (result) { | 540 | onChange: function (result) { |
500 | }, | 541 | }, |
@@ -506,6 +547,7 @@ | @@ -506,6 +547,7 @@ | ||
506 | }, | 547 | }, |
507 | // 获取医保类型数据 | 548 | // 获取医保类型数据 |
508 | getMedical: function () { | 549 | getMedical: function () { |
550 | + var app = this; | ||
509 | var header = { | 551 | var header = { |
510 | 'XX-Device-Type': getDevice(), | 552 | 'XX-Device-Type': getDevice(), |
511 | 'XX-Token': getToken() | 553 | 'XX-Token': getToken() |
@@ -527,6 +569,7 @@ | @@ -527,6 +569,7 @@ | ||
527 | }, | 569 | }, |
528 | // 选择医保类型 | 570 | // 选择医保类型 |
529 | doctors: function () { | 571 | doctors: function () { |
572 | + var app = this; | ||
530 | weui.picker(app.getMedical_data, | 573 | weui.picker(app.getMedical_data, |
531 | { | 574 | { |
532 | onChange: function (result) { | 575 | onChange: function (result) { |
@@ -540,6 +583,7 @@ | @@ -540,6 +583,7 @@ | ||
540 | 583 | ||
541 | // 获取亲友关系 | 584 | // 获取亲友关系 |
542 | getRelationship: function () { | 585 | getRelationship: function () { |
586 | + var app = this; | ||
543 | var header = { | 587 | var header = { |
544 | 'XX-Device-Type': getDevice(), | 588 | 'XX-Device-Type': getDevice(), |
545 | 'XX-Token': getToken() | 589 | 'XX-Token': getToken() |
@@ -560,6 +604,7 @@ | @@ -560,6 +604,7 @@ | ||
560 | }, | 604 | }, |
561 | // 选择亲友关系 | 605 | // 选择亲友关系 |
562 | relation_fun: function () { | 606 | relation_fun: function () { |
607 | + var app = this; | ||
563 | weui.picker(app.relationShip, | 608 | weui.picker(app.relationShip, |
564 | { | 609 | { |
565 | onChange: function (result) { | 610 | onChange: function (result) { |
@@ -572,6 +617,7 @@ | @@ -572,6 +617,7 @@ | ||
572 | }, | 617 | }, |
573 | // 添加亲友 | 618 | // 添加亲友 |
574 | newRecord: function () { | 619 | newRecord: function () { |
620 | + var app = this; | ||
575 | var post = { | 621 | var post = { |
576 | rid: app.rid, | 622 | rid: app.rid, |
577 | relation: app.relation_value, | 623 | relation: app.relation_value, |
@@ -333,6 +333,7 @@ | @@ -333,6 +333,7 @@ | ||
333 | methods: { | 333 | methods: { |
334 | // 个人资料 | 334 | // 个人资料 |
335 | my_detail: function() { | 335 | my_detail: function() { |
336 | + var app = this; | ||
336 | if(app.user_type == '') { | 337 | if(app.user_type == '') { |
337 | toastMsg('未登录') | 338 | toastMsg('未登录') |
338 | } else { | 339 | } else { |
@@ -344,36 +345,45 @@ | @@ -344,36 +345,45 @@ | ||
344 | }, | 345 | }, |
345 | // 设置 | 346 | // 设置 |
346 | set: function() { | 347 | set: function() { |
347 | - openView('my_set', 'my/my_set', '设置', 'my_set', false, false, false) | 348 | + window.location.href = 'my_set.html' |
349 | + // openView('my_set', 'my/my_set', '设置', 'my_set', false, false, false) | ||
348 | }, | 350 | }, |
349 | // 常见问题 | 351 | // 常见问题 |
350 | question: function() { | 352 | question: function() { |
353 | + var app = this; | ||
351 | if(app.user_type == '') { | 354 | if(app.user_type == '') { |
352 | toastMsg('未登录') | 355 | toastMsg('未登录') |
353 | } else { | 356 | } else { |
354 | - openView('my_que', 'my/my_que', '常见问题', 'my_que', false, false, false) | 357 | + window.location.href = 'my_que.html' |
358 | + // openView('my_que', 'my/my_que', '常见问题', 'my_que', false, false, false) | ||
355 | } | 359 | } |
356 | }, | 360 | }, |
357 | // 邀友有赚 | 361 | // 邀友有赚 |
358 | friend: function() { | 362 | friend: function() { |
363 | + var app = this; | ||
359 | if(app.user_type == '') { | 364 | if(app.user_type == '') { |
360 | toastMsg('未登录') | 365 | toastMsg('未登录') |
361 | } else { | 366 | } else { |
362 | - openView('my_invite', 'my/my_invite', '邀请好友', 'my_invite', false, { | ||
363 | - invite_type: 0 | ||
364 | - }) | 367 | + localStorage.setItem('invite_type','0'); |
368 | + window.location.href = 'my_invite.html'; | ||
369 | + // openView('my_invite', 'my/my_invite', '邀请好友', 'my_invite', false, { | ||
370 | + // invite_type: 0 | ||
371 | + // }) | ||
365 | } | 372 | } |
366 | }, | 373 | }, |
367 | // 我的订单 | 374 | // 我的订单 |
368 | goPay: function() { | 375 | goPay: function() { |
376 | + var app = this; | ||
369 | if(app.user_type == '') { | 377 | if(app.user_type == '') { |
370 | toastMsg('未登录') | 378 | toastMsg('未登录') |
371 | } else { | 379 | } else { |
372 | - openView('my_orderlist', 'my/my_orderlist', '我的订单', 'my_orderlist', false, false, false); | 380 | + window.location.href = 'my_orderlist.html'; |
381 | + // openView('my_orderlist', 'my/my_orderlist', '我的订单', 'my_orderlist', false, false, false); | ||
373 | } | 382 | } |
374 | }, | 383 | }, |
375 | // 我的消息 | 384 | // 我的消息 |
376 | my_news: function() { | 385 | my_news: function() { |
386 | + var app = this; | ||
377 | if(app.user_type == '') { | 387 | if(app.user_type == '') { |
378 | toastMsg('未登录') | 388 | toastMsg('未登录') |
379 | } else { | 389 | } else { |
@@ -384,6 +394,7 @@ | @@ -384,6 +394,7 @@ | ||
384 | }, | 394 | }, |
385 | // 有无消息判断 | 395 | // 有无消息判断 |
386 | getNews: function() { | 396 | getNews: function() { |
397 | + var app = this; | ||
387 | var header = { | 398 | var header = { |
388 | "XX-Device-Type": getDevice(), | 399 | "XX-Device-Type": getDevice(), |
389 | 'XX-Token': getToken() | 400 | 'XX-Token': getToken() |
@@ -399,6 +410,7 @@ | @@ -399,6 +410,7 @@ | ||
399 | }, | 410 | }, |
400 | // 我的账号 | 411 | // 我的账号 |
401 | my_balance: function() { | 412 | my_balance: function() { |
413 | + var app = this; | ||
402 | if(app.user_type == '') { | 414 | if(app.user_type == '') { |
403 | toastMsg('未登录') | 415 | toastMsg('未登录') |
404 | } else { | 416 | } else { |
@@ -407,6 +419,7 @@ | @@ -407,6 +419,7 @@ | ||
407 | }, | 419 | }, |
408 | // 我的消费金 | 420 | // 我的消费金 |
409 | my_consumption: function() { | 421 | my_consumption: function() { |
422 | + var app = this; | ||
410 | if(app.user_type == '') { | 423 | if(app.user_type == '') { |
411 | toastMsg('未登录') | 424 | toastMsg('未登录') |
412 | } else { | 425 | } else { |
@@ -415,6 +428,7 @@ | @@ -415,6 +428,7 @@ | ||
415 | }, | 428 | }, |
416 | // 我的权益 | 429 | // 我的权益 |
417 | my_power: function() { | 430 | my_power: function() { |
431 | + var app = this; | ||
418 | var header = { | 432 | var header = { |
419 | "XX-Device-Type": getDevice(), | 433 | "XX-Device-Type": getDevice(), |
420 | 'XX-Token': getToken() | 434 | 'XX-Token': getToken() |
@@ -424,7 +438,8 @@ | @@ -424,7 +438,8 @@ | ||
424 | } else { | 438 | } else { |
425 | getRequest('post', 'user/index/myRights', null, header).then(function(res) { | 439 | getRequest('post', 'user/index/myRights', null, header).then(function(res) { |
426 | if(res.data.code == 1) { | 440 | if(res.data.code == 1) { |
427 | - openView('my_benefit', 'my/my_benefit', '我的权益', 'my_benefit', false, false, false) | 441 | + window.location.href = 'my_benefit.html' |
442 | + // openView('my_benefit', 'my/my_benefit', '我的权益', 'my_benefit', false, false, false) | ||
428 | } else { | 443 | } else { |
429 | toastMsg(res.data.msg); | 444 | toastMsg(res.data.msg); |
430 | } | 445 | } |
@@ -433,28 +448,33 @@ | @@ -433,28 +448,33 @@ | ||
433 | }, | 448 | }, |
434 | // 健康档案 | 449 | // 健康档案 |
435 | go_hearth: function() { | 450 | go_hearth: function() { |
451 | + var app = this; | ||
436 | if(app.user_type == '') { | 452 | if(app.user_type == '') { |
437 | toastMsg('未登录') | 453 | toastMsg('未登录') |
438 | } else { | 454 | } else { |
439 | - api.openFrame({ | ||
440 | - name: 'my_health', | ||
441 | - url: './my_health.html', | ||
442 | - // bounces: true, | ||
443 | - rect: { | ||
444 | - x: 0, | ||
445 | - y: 0, | ||
446 | - w: 'auto', | ||
447 | - h: 'auto', | ||
448 | - }, | ||
449 | - pageParam: { | ||
450 | - rid: 0, | ||
451 | - type: 0 | ||
452 | - } | ||
453 | - }); | 455 | + localStorage.setItem('rid','0'); |
456 | + localStorage.setItem('Htype','0'); | ||
457 | + window.location.href = 'my_health.html'; | ||
458 | + // api.openFrame({ | ||
459 | + // name: 'my_health', | ||
460 | + // url: './my_health.html', | ||
461 | + // // bounces: true, | ||
462 | + // rect: { | ||
463 | + // x: 0, | ||
464 | + // y: 0, | ||
465 | + // w: 'auto', | ||
466 | + // h: 'auto', | ||
467 | + // }, | ||
468 | + // pageParam: { | ||
469 | + // rid: 0, | ||
470 | + // type: 0 | ||
471 | + // } | ||
472 | + // }); | ||
454 | } | 473 | } |
455 | }, | 474 | }, |
456 | // 获取个人信息 | 475 | // 获取个人信息 |
457 | getUserIndexInfo: function() { | 476 | getUserIndexInfo: function() { |
477 | + var app = this; | ||
458 | var header = { | 478 | var header = { |
459 | "XX-Device-Type": getDevice(), | 479 | "XX-Device-Type": getDevice(), |
460 | 'XX-Token': getToken() | 480 | 'XX-Token': getToken() |
@@ -426,29 +426,29 @@ | @@ -426,29 +426,29 @@ | ||
426 | // left_opacity: 1 | 426 | // left_opacity: 1 |
427 | }, | 427 | }, |
428 | created: function () { | 428 | created: function () { |
429 | - apiready = function () { | ||
430 | - app.rid = api.pageParam.rid; | ||
431 | - app.type = api.pageParam.type ? api.pageParam.type : 0; | ||
432 | - app.record(); | ||
433 | - app.getHeathlyRecord(); | ||
434 | - api.addEventListener({ | ||
435 | - name: 'changeInfo' | ||
436 | - }, function (ret, err) { | ||
437 | - app.record(); | ||
438 | - app.getHeathlyRecord(); | ||
439 | - }); | ||
440 | - api.addEventListener({ | ||
441 | - name: 'add_success' | ||
442 | - }, function (ret, err) { | ||
443 | - app.record(); | ||
444 | - app.getHeathlyRecord(); | ||
445 | - }); | ||
446 | - api.addEventListener({ | ||
447 | - name: 'showlist' | ||
448 | - }, function (ret, err) { | ||
449 | - app.img_active = ret.value.img_active; | ||
450 | - }); | ||
451 | - } | 429 | + var app = this ; |
430 | + app.rid = localStorage.getItem('rid'); | ||
431 | + var Htype = localStorage.getItem('Htype'); | ||
432 | + app.type = Htype ? Htype : 0; | ||
433 | + app.record(); | ||
434 | + app.getHeathlyRecord(); | ||
435 | + // api.addEventListener({ | ||
436 | + // name: 'changeInfo' | ||
437 | + // }, function (ret, err) { | ||
438 | + // app.record(); | ||
439 | + // app.getHeathlyRecord(); | ||
440 | + // }); | ||
441 | + // api.addEventListener({ | ||
442 | + // name: 'add_success' | ||
443 | + // }, function (ret, err) { | ||
444 | + // app.record(); | ||
445 | + // app.getHeathlyRecord(); | ||
446 | + // }); | ||
447 | + // api.addEventListener({ | ||
448 | + // name: 'showlist' | ||
449 | + // }, function (ret, err) { | ||
450 | + // app.img_active = ret.value.img_active; | ||
451 | + // }); | ||
452 | }, | 452 | }, |
453 | methods: { | 453 | methods: { |
454 | // close: function () { | 454 | // close: function () { |
@@ -459,6 +459,7 @@ | @@ -459,6 +459,7 @@ | ||
459 | // }, | 459 | // }, |
460 | // 个人资料 | 460 | // 个人资料 |
461 | openPerson: function () { | 461 | openPerson: function () { |
462 | + var app = this; | ||
462 | var name = ''; | 463 | var name = ''; |
463 | if (app.rid == 0) { | 464 | if (app.rid == 0) { |
464 | name = '个人资料' | 465 | name = '个人资料' |
@@ -473,6 +474,7 @@ | @@ -473,6 +474,7 @@ | ||
473 | }, | 474 | }, |
474 | // 添加亲友 | 475 | // 添加亲友 |
475 | addPerson: function () { | 476 | addPerson: function () { |
477 | + var app = this; | ||
476 | app.img_active = false; | 478 | app.img_active = false; |
477 | api.sendEvent({ | 479 | api.sendEvent({ |
478 | name: 'hidelist', | 480 | name: 'hidelist', |
@@ -484,6 +486,7 @@ | @@ -484,6 +486,7 @@ | ||
484 | }, | 486 | }, |
485 | // 健康数据 | 487 | // 健康数据 |
486 | openData: function () { | 488 | openData: function () { |
489 | + var app = this; | ||
487 | app.img_active = false; | 490 | app.img_active = false; |
488 | api.sendEvent({ | 491 | api.sendEvent({ |
489 | name: 'hidelist', | 492 | name: 'hidelist', |
@@ -495,16 +498,19 @@ | @@ -495,16 +498,19 @@ | ||
495 | }, | 498 | }, |
496 | // 健康史 | 499 | // 健康史 |
497 | openHistory: function () { | 500 | openHistory: function () { |
501 | + var app = this; | ||
498 | app.img_active = false; | 502 | app.img_active = false; |
499 | openView('my_history', 'my/my_history', '健康史', 'my_history', false, {rid: app.rid}); | 503 | openView('my_history', 'my/my_history', '健康史', 'my_history', false, {rid: app.rid}); |
500 | }, | 504 | }, |
501 | // 亲友档案 | 505 | // 亲友档案 |
502 | openFriend: function () { | 506 | openFriend: function () { |
507 | + var app = this; | ||
503 | app.img_active = false; | 508 | app.img_active = false; |
504 | openView('my_fri', 'my/my_fri', '亲友健康档案', 'my_fri', false, false, false); | 509 | openView('my_fri', 'my/my_fri', '亲友健康档案', 'my_fri', false, false, false); |
505 | }, | 510 | }, |
506 | // 获取个人档案完善情况 | 511 | // 获取个人档案完善情况 |
507 | record: function () { | 512 | record: function () { |
513 | + var app = this; | ||
508 | var header = { | 514 | var header = { |
509 | "XX-Device-Type": getDevice(), | 515 | "XX-Device-Type": getDevice(), |
510 | 'XX-Token': getToken(), | 516 | 'XX-Token': getToken(), |
@@ -535,6 +541,7 @@ | @@ -535,6 +541,7 @@ | ||
535 | }, | 541 | }, |
536 | // 健康记录详情页面 | 542 | // 健康记录详情页面 |
537 | openLife: function (r_type, id, img, name) { | 543 | openLife: function (r_type, id, img, name) { |
544 | + var app = this; | ||
538 | switch (r_type) { | 545 | switch (r_type) { |
539 | case '1': | 546 | case '1': |
540 | case '2': | 547 | case '2': |
@@ -572,6 +579,7 @@ | @@ -572,6 +579,7 @@ | ||
572 | }, | 579 | }, |
573 | // 获取全生命周期记录 | 580 | // 获取全生命周期记录 |
574 | getHeathlyRecord: function () { | 581 | getHeathlyRecord: function () { |
582 | + var app = this; | ||
575 | var header = { | 583 | var header = { |
576 | "XX-Device-Type": getDevice(), | 584 | "XX-Device-Type": getDevice(), |
577 | 'XX-Token': getToken(), | 585 | 'XX-Token': getToken(), |
@@ -126,20 +126,15 @@ | @@ -126,20 +126,15 @@ | ||
126 | rid: '', | 126 | rid: '', |
127 | }, | 127 | }, |
128 | created: function () { | 128 | created: function () { |
129 | - apiready = function () { | ||
130 | - app.rid = api.pageParam.rid; | ||
131 | - // alert(app.rid); | ||
132 | - app.question(); | ||
133 | - api.addEventListener({ | ||
134 | - name: 'history' | ||
135 | - }, function (ret, err) { | ||
136 | - app.question() | ||
137 | - }); | ||
138 | - } | 129 | + var app = this; |
130 | + app.rid = localStorage.getItem('rid'); | ||
131 | + // alert(app.rid); | ||
132 | + app.question(); | ||
139 | }, | 133 | }, |
140 | methods: { | 134 | methods: { |
141 | // 打开详情 | 135 | // 打开详情 |
142 | openHome: function (name, index) { | 136 | openHome: function (name, index) { |
137 | + var app = this; | ||
143 | openView('history_detail', 'my/history_detail', name, 'history_detail', false, { | 138 | openView('history_detail', 'my/history_detail', name, 'history_detail', false, { |
144 | rid: app.rid, | 139 | rid: app.rid, |
145 | id: index | 140 | id: index |
@@ -147,6 +142,7 @@ | @@ -147,6 +142,7 @@ | ||
147 | }, | 142 | }, |
148 | // 获取完善情况 | 143 | // 获取完善情况 |
149 | question: function () { | 144 | question: function () { |
145 | + var app = this; | ||
150 | var header = { | 146 | var header = { |
151 | 'XX-Device-Type': getDevice(), | 147 | 'XX-Device-Type': getDevice(), |
152 | 'XX-Token': getToken() | 148 | 'XX-Token': getToken() |
@@ -167,19 +167,19 @@ | @@ -167,19 +167,19 @@ | ||
167 | invite_type: '' | 167 | invite_type: '' |
168 | }, | 168 | }, |
169 | created: function () { | 169 | created: function () { |
170 | - apiready = function () { | ||
171 | - app.getUserIndexInfo(); | ||
172 | - app.invite_type = api.pageParam.invite_type; | ||
173 | - if (app.invite_type == 0) { | ||
174 | - app.myInvited(); | ||
175 | - } else { | ||
176 | - app.myInvited2(); | ||
177 | - } | 170 | + var app = this; |
171 | + app.getUserIndexInfo(); | ||
172 | + app.invite_type = localStorage.getItem('invite_type'); | ||
173 | + if (app.invite_type == 0) { | ||
174 | + app.myInvited(); | ||
175 | + } else { | ||
176 | + app.myInvited2(); | ||
178 | } | 177 | } |
179 | }, | 178 | }, |
180 | methods: { | 179 | methods: { |
181 | // 邀友有转 | 180 | // 邀友有转 |
182 | friend: function () { | 181 | friend: function () { |
182 | + var app = this; | ||
183 | api.openFrame({ | 183 | api.openFrame({ |
184 | bgColor: 'rgba(0,0,0,0.05)', | 184 | bgColor: 'rgba(0,0,0,0.05)', |
185 | name: 'invited', | 185 | name: 'invited', |
@@ -216,27 +216,27 @@ | @@ -216,27 +216,27 @@ | ||
216 | } | 216 | } |
217 | }, | 217 | }, |
218 | created: function () { | 218 | created: function () { |
219 | - apiready = function () { | ||
220 | - app.myOrder(); | ||
221 | - api.addEventListener({ | ||
222 | - name: 'cancel_order' | ||
223 | - }, function (ret, err) { | ||
224 | - if (ret) { | ||
225 | - app.myOrder(); | ||
226 | - } | ||
227 | - }); | ||
228 | - api.addEventListener({ | ||
229 | - name: 're_money' | ||
230 | - }, function (ret, err) { | ||
231 | - if (ret) { | ||
232 | - app.myOrder(); | ||
233 | - } | ||
234 | - }); | ||
235 | - } | 219 | + var app = this; |
220 | + app.myOrder(); | ||
221 | + api.addEventListener({ | ||
222 | + name: 'cancel_order' | ||
223 | + }, function (ret, err) { | ||
224 | + if (ret) { | ||
225 | + app.myOrder(); | ||
226 | + } | ||
227 | + }); | ||
228 | + api.addEventListener({ | ||
229 | + name: 're_money' | ||
230 | + }, function (ret, err) { | ||
231 | + if (ret) { | ||
232 | + app.myOrder(); | ||
233 | + } | ||
234 | + }); | ||
236 | }, | 235 | }, |
237 | methods: { | 236 | methods: { |
238 | // 去详情页 | 237 | // 去详情页 |
239 | go_detail: function (order_id, order_type, goods_type) { | 238 | go_detail: function (order_id, order_type, goods_type) { |
239 | + var app = this; | ||
240 | // alert(goods_type); | 240 | // alert(goods_type); |
241 | if (goods_type == 2) { | 241 | if (goods_type == 2) { |
242 | openView('my_order', 'my/my_order', '订单详情', 'my_order', false, { | 242 | openView('my_order', 'my/my_order', '订单详情', 'my_order', false, { |
@@ -264,24 +264,28 @@ | @@ -264,24 +264,28 @@ | ||
264 | } | 264 | } |
265 | }, | 265 | }, |
266 | all_show: function () { | 266 | all_show: function () { |
267 | + var app = this; | ||
267 | app.all = true; | 268 | app.all = true; |
268 | app.paying = false; | 269 | app.paying = false; |
269 | app.pay = false; | 270 | app.pay = false; |
270 | app.paied = false; | 271 | app.paied = false; |
271 | }, | 272 | }, |
272 | paying_show: function () { | 273 | paying_show: function () { |
274 | + var app = this; | ||
273 | app.all = false; | 275 | app.all = false; |
274 | app.paying = true; | 276 | app.paying = true; |
275 | app.pay = false; | 277 | app.pay = false; |
276 | app.paied = false; | 278 | app.paied = false; |
277 | }, | 279 | }, |
278 | pay_show: function () { | 280 | pay_show: function () { |
281 | + var app = this; | ||
279 | app.pay = true; | 282 | app.pay = true; |
280 | app.all = false; | 283 | app.all = false; |
281 | app.paying = false; | 284 | app.paying = false; |
282 | app.paied = false; | 285 | app.paied = false; |
283 | }, | 286 | }, |
284 | paied_show: function () { | 287 | paied_show: function () { |
288 | + var app = this; | ||
285 | app.pay = false; | 289 | app.pay = false; |
286 | app.all = false; | 290 | app.all = false; |
287 | app.paying = false; | 291 | app.paying = false; |
@@ -289,6 +293,7 @@ | @@ -289,6 +293,7 @@ | ||
289 | }, | 293 | }, |
290 | // 获取我的订单列表 | 294 | // 获取我的订单列表 |
291 | myOrder: function () { | 295 | myOrder: function () { |
296 | + var app = this; | ||
292 | var header = { | 297 | var header = { |
293 | "XX-Device-Type": getDevice(), | 298 | "XX-Device-Type": getDevice(), |
294 | 'XX-Token': getToken() | 299 | 'XX-Token': getToken() |
@@ -13,7 +13,6 @@ function apiadapter(payload) { | @@ -13,7 +13,6 @@ function apiadapter(payload) { | ||
13 | if (moduleName === 'db') { | 13 | if (moduleName === 'db') { |
14 | if (method === 'openDatabase') { | 14 | if (method === 'openDatabase') { |
15 | callback(cbId, { status: true }, null, true); | 15 | callback(cbId, { status: true }, null, true); |
16 | - | ||
17 | return; | 16 | return; |
18 | } | 17 | } |
19 | 18 |
-
请 注册 或 登录 后发表评论