Showing
15 changed files
with
122 additions
and
13 deletions
| @@ -69,7 +69,8 @@ | @@ -69,7 +69,8 @@ | ||
| 69 | "pages/customer/detail_owner_invitation8", | 69 | "pages/customer/detail_owner_invitation8", |
| 70 | "pages/reserve/shopHome", | 70 | "pages/reserve/shopHome", |
| 71 | "pages/customer/joinSeller", | 71 | "pages/customer/joinSeller", |
| 72 | - "pages/customer/collectSeller" | 72 | + "pages/customer/collectSeller", |
| 73 | + "pages/customer/detail_owner_invitation_new" | ||
| 73 | ], | 74 | ], |
| 74 | "requiredPrivateInfos": [ | 75 | "requiredPrivateInfos": [ |
| 75 | "getLocation", | 76 | "getLocation", |
| @@ -342,8 +342,8 @@ Page({ | @@ -342,8 +342,8 @@ Page({ | ||
| 342 | this.setData({ | 342 | this.setData({ |
| 343 | cookbooklist, | 343 | cookbooklist, |
| 344 | noData:((num*1)>0 && !this.data.isOrder)?false:true,//菜品数量大于0 && 在当前预订的餐段时间内 | 344 | noData:((num*1)>0 && !this.data.isOrder)?false:true,//菜品数量大于0 && 在当前预订的餐段时间内 |
| 345 | - probablyPrice:probablyPrice.toFixed(1), | ||
| 346 | - vipProbablyPrice:vipProbablyPrice.toFixed(1), | 345 | + probablyPrice:probablyPrice.toFixed(2), |
| 346 | + vipProbablyPrice:vipProbablyPrice.toFixed(2), | ||
| 347 | }) | 347 | }) |
| 348 | return cookbooklist | 348 | return cookbooklist |
| 349 | }, | 349 | }, |
| @@ -352,8 +352,8 @@ Page({ | @@ -352,8 +352,8 @@ Page({ | ||
| 352 | console.log(cookbooklist); | 352 | console.log(cookbooklist); |
| 353 | this.setData({ | 353 | this.setData({ |
| 354 | noData: true, | 354 | noData: true, |
| 355 | - probablyPrice:probablyPrice.toFixed(1), | ||
| 356 | - vipProbablyPrice:vipProbablyPrice.toFixed(1), | 355 | + probablyPrice:probablyPrice.toFixed(2), |
| 356 | + vipProbablyPrice:vipProbablyPrice.toFixed(2), | ||
| 357 | }) | 357 | }) |
| 358 | return cookbooklist | 358 | return cookbooklist |
| 359 | }, | 359 | }, |
| @@ -400,7 +400,7 @@ Page({ | @@ -400,7 +400,7 @@ Page({ | ||
| 400 | } | 400 | } |
| 401 | return { | 401 | return { |
| 402 | title: this.data.tpls[0].shareTitle, | 402 | title: this.data.tpls[0].shareTitle, |
| 403 | - path: util.http_build_query(parmdata, '/pages/customer/index'), | 403 | + path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), |
| 404 | imageUrl: this.data.tpls[0].shareImage, | 404 | imageUrl: this.data.tpls[0].shareImage, |
| 405 | } | 405 | } |
| 406 | }, | 406 | }, |
| @@ -384,7 +384,7 @@ Page({ | @@ -384,7 +384,7 @@ Page({ | ||
| 384 | console.log('seller_imageseller_imageseller_imageseller_imageseller_image', this.data.detail.seller.seller_image); | 384 | console.log('seller_imageseller_imageseller_imageseller_imageseller_image', this.data.detail.seller.seller_image); |
| 385 | return { | 385 | return { |
| 386 | title: '邀请您于' + this.data.seller.date + '一起共进' + this.data.seller.soltName + '。点击查看详情', | 386 | title: '邀请您于' + this.data.seller.date + '一起共进' + this.data.seller.soltName + '。点击查看详情', |
| 387 | - path: util.http_build_query(parmdata, '/pages/customer/index'), | 387 | + path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), |
| 388 | imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | 388 | imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', |
| 389 | } | 389 | } |
| 390 | }, | 390 | }, |
| @@ -385,7 +385,7 @@ Page({ | @@ -385,7 +385,7 @@ Page({ | ||
| 385 | console.log('seller_imageseller_imageseller_imageseller_imageseller_image', this.data.detail.seller.seller_image); | 385 | console.log('seller_imageseller_imageseller_imageseller_imageseller_image', this.data.detail.seller.seller_image); |
| 386 | return { | 386 | return { |
| 387 | title: '邀请您于' + this.data.seller.date + '一起共进' + this.data.seller.soltName + '。点击查看详情', | 387 | title: '邀请您于' + this.data.seller.date + '一起共进' + this.data.seller.soltName + '。点击查看详情', |
| 388 | - path: util.http_build_query(parmdata, '/pages/customer/index'), | 388 | + path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), |
| 389 | imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | 389 | imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', |
| 390 | } | 390 | } |
| 391 | }, | 391 | }, |
| @@ -385,7 +385,7 @@ Page({ | @@ -385,7 +385,7 @@ Page({ | ||
| 385 | console.log('seller_imageseller_imageseller_imageseller_imageseller_image', this.data.detail.seller.seller_image); | 385 | console.log('seller_imageseller_imageseller_imageseller_imageseller_image', this.data.detail.seller.seller_image); |
| 386 | return { | 386 | return { |
| 387 | title: '邀请您于' + this.data.seller.date + '一起共进' + this.data.seller.soltName + '。点击查看详情', | 387 | title: '邀请您于' + this.data.seller.date + '一起共进' + this.data.seller.soltName + '。点击查看详情', |
| 388 | - path: util.http_build_query(parmdata, '/pages/customer/index'), | 388 | + path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), |
| 389 | imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | 389 | imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', |
| 390 | } | 390 | } |
| 391 | }, | 391 | }, |
| @@ -384,7 +384,7 @@ Page({ | @@ -384,7 +384,7 @@ Page({ | ||
| 384 | console.log('seller_imageseller_imageseller_imageseller_imageseller_image', this.data.detail.seller.seller_image); | 384 | console.log('seller_imageseller_imageseller_imageseller_imageseller_image', this.data.detail.seller.seller_image); |
| 385 | return { | 385 | return { |
| 386 | title: '邀请您于' + this.data.seller.date + '一起共进' + this.data.seller.soltName + '。点击查看详情', | 386 | title: '邀请您于' + this.data.seller.date + '一起共进' + this.data.seller.soltName + '。点击查看详情', |
| 387 | - path: util.http_build_query(parmdata, '/pages/customer/index'), | 387 | + path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), |
| 388 | imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | 388 | imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', |
| 389 | } | 389 | } |
| 390 | }, | 390 | }, |
| @@ -335,7 +335,7 @@ Page({ | @@ -335,7 +335,7 @@ Page({ | ||
| 335 | console.log('seller_imageseller_imageseller_imageseller_imageseller_image', this.data.detail.seller.seller_image); | 335 | console.log('seller_imageseller_imageseller_imageseller_imageseller_image', this.data.detail.seller.seller_image); |
| 336 | return { | 336 | return { |
| 337 | title: '邀请您于' + this.data.seller.date + '一起共进' + this.data.seller.soltName + '。点击查看详情', | 337 | title: '邀请您于' + this.data.seller.date + '一起共进' + this.data.seller.soltName + '。点击查看详情', |
| 338 | - path: util.http_build_query(parmdata, '/pages/customer/index'), | 338 | + path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), |
| 339 | imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | 339 | imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', |
| 340 | } | 340 | } |
| 341 | }, | 341 | }, |
| @@ -384,7 +384,7 @@ Page({ | @@ -384,7 +384,7 @@ Page({ | ||
| 384 | console.log('seller_imageseller_imageseller_imageseller_imageseller_image', this.data.detail.seller.seller_image); | 384 | console.log('seller_imageseller_imageseller_imageseller_imageseller_image', this.data.detail.seller.seller_image); |
| 385 | return { | 385 | return { |
| 386 | title: '邀请您于' + this.data.seller.date + '一起共进' + this.data.seller.soltName + '。点击查看详情', | 386 | title: '邀请您于' + this.data.seller.date + '一起共进' + this.data.seller.soltName + '。点击查看详情', |
| 387 | - path: util.http_build_query(parmdata, '/pages/customer/index'), | 387 | + path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), |
| 388 | imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | 388 | imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', |
| 389 | } | 389 | } |
| 390 | }, | 390 | }, |
| @@ -383,7 +383,7 @@ Page({ | @@ -383,7 +383,7 @@ Page({ | ||
| 383 | console.log('seller_imageseller_imageseller_imageseller_imageseller_image', this.data.detail.seller.seller_image); | 383 | console.log('seller_imageseller_imageseller_imageseller_imageseller_image', this.data.detail.seller.seller_image); |
| 384 | return { | 384 | return { |
| 385 | title: '邀请您于' + this.data.seller.date + '一起共进' + this.data.seller.soltName + '。点击查看详情', | 385 | title: '邀请您于' + this.data.seller.date + '一起共进' + this.data.seller.soltName + '。点击查看详情', |
| 386 | - path: util.http_build_query(parmdata, '/pages/customer/index'), | 386 | + path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), |
| 387 | imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | 387 | imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', |
| 388 | } | 388 | } |
| 389 | }, | 389 | }, |
| 1 | +// pages/customer/detail_owner_invitation2.js | ||
| 2 | +import App from '../../utils/api'; | ||
| 3 | +import TP from '../../utils/tpls'; | ||
| 4 | +import RS from '../../utils/reserveStatus' | ||
| 5 | +Page({ | ||
| 6 | + /** | ||
| 7 | + * 页面的初始数据 | ||
| 8 | + */ | ||
| 9 | + data: { | ||
| 10 | + options: { | ||
| 11 | + tplid: '' | ||
| 12 | + }, | ||
| 13 | + }, | ||
| 14 | + /** | ||
| 15 | + * 生命周期函数--监听页面加载 | ||
| 16 | + */ | ||
| 17 | + onLoad(options) { | ||
| 18 | + let param = { | ||
| 19 | + options: options, | ||
| 20 | + } | ||
| 21 | + param.tpls = [TP.tpls(options.tplid)] | ||
| 22 | + console.log(param); | ||
| 23 | + console.log(options); | ||
| 24 | + this.setData(param) | ||
| 25 | + this.getDetail() | ||
| 26 | + }, | ||
| 27 | + // 页面滚动事件 | ||
| 28 | + onPageScroll: function (event) {}, | ||
| 29 | + /** | ||
| 30 | + * 用户点击右上角分享 | ||
| 31 | + */ | ||
| 32 | + onShareAppMessage: function () {}, | ||
| 33 | + /** | ||
| 34 | + * 监听用户点击分享到朋友圈按钮的操作 | ||
| 35 | + */ | ||
| 36 | + onShareTimeline() {}, | ||
| 37 | + /** | ||
| 38 | + * 生命周期函数--监听页面显示 | ||
| 39 | + */ | ||
| 40 | + onShow: function () {}, | ||
| 41 | + // 获取店铺详情 | ||
| 42 | + getDetail() { | ||
| 43 | + App.Reserve.Detail({ | ||
| 44 | + openid: getApp().openid, | ||
| 45 | + rid: this.data.options.id | ||
| 46 | + }).then(res => { | ||
| 47 | + this.getSellerTemplateConfFun(RS.reserve(res.data).sid); | ||
| 48 | + }).catch(res => { | ||
| 49 | + console.log(res, '详情请求失败'); | ||
| 50 | + }) | ||
| 51 | + }, | ||
| 52 | + // 获取商家设置营销信息 | ||
| 53 | + getSellerTemplateConfFun(sid) { | ||
| 54 | + App.Seller.GetSellerTemplateConf({ | ||
| 55 | + sid | ||
| 56 | + }).then(res => { | ||
| 57 | + let data = res.data | ||
| 58 | + let url = ''; | ||
| 59 | + if (data.type) { | ||
| 60 | + url = '/pages/customer/detail_owner_invitation' + data.type; | ||
| 61 | + } else { | ||
| 62 | + url = '/pages/customer/detail_owner_invitation6'; | ||
| 63 | + } | ||
| 64 | + url += '?id=' + this.data.options.id + '&tplid=' + this.data.options.tplid; | ||
| 65 | + console.log('url', url); | ||
| 66 | + wx.redirectTo({ | ||
| 67 | + url | ||
| 68 | + }) | ||
| 69 | + }).catch(res => { | ||
| 70 | + console.log('GetSellerTemplateConf请求失败'); | ||
| 71 | + }) | ||
| 72 | + }, | ||
| 73 | + /** | ||
| 74 | + * 生命周期函数--监听页面隐藏 | ||
| 75 | + */ | ||
| 76 | + onHide() {}, | ||
| 77 | + | ||
| 78 | + /** | ||
| 79 | + * 生命周期函数--监听页面卸载 | ||
| 80 | + */ | ||
| 81 | + onUnload() { | ||
| 82 | + | ||
| 83 | + }, | ||
| 84 | + | ||
| 85 | + /** | ||
| 86 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
| 87 | + */ | ||
| 88 | + onPullDownRefresh() { | ||
| 89 | + | ||
| 90 | + }, | ||
| 91 | + | ||
| 92 | + /** | ||
| 93 | + * 页面上拉触底事件的处理函数 | ||
| 94 | + */ | ||
| 95 | + onReachBottom() { | ||
| 96 | + | ||
| 97 | + }, | ||
| 98 | +}) |
| 1 | +<!--pages/customer/detail_owner_invitation_new.wxml--> |
| 1 | +/* pages/customer/detail_owner_invitation_new.wxss */ |
-
Please register or login to post a comment