Commit 2f9e39aab5a32c40e527066c819b39540a3d7062

Authored by yiren
1 parent e0604ee7

”新邀请函默认样式”

@@ -71,7 +71,6 @@ Page({ @@ -71,7 +71,6 @@ Page({
71 * 生命周期函数--监听页面显示 71 * 生命周期函数--监听页面显示
72 */ 72 */
73 onShow: function () { 73 onShow: function () {
74 - this.getSellerTemplateConf();  
75 this.getDetail(); 74 this.getDetail();
76 }, 75 },
77 cli() { 76 cli() {
@@ -147,8 +146,10 @@ Page({ @@ -147,8 +146,10 @@ Page({
147 soltName: reserev.soltName 146 soltName: reserev.soltName
148 } 147 }
149 }) 148 })
  149 + console.log(reserev,'reserevreserevreserevreserevreserev');
150 console.log(this.data.seller,'sellersellersellerseller'); 150 console.log(this.data.seller,'sellersellersellerseller');
151 console.log(this.data.detail,'detaildetaildetaildetail'); 151 console.log(this.data.detail,'detaildetaildetaildetail');
  152 + this.getSellerTemplateConf(reserev.sid);
152 }) 153 })
153 }, 154 },
154 cookbook() { 155 cookbook() {
@@ -225,9 +226,9 @@ Page({ @@ -225,9 +226,9 @@ Page({
225 } 226 }
226 return detail; 227 return detail;
227 }, 228 },
228 - getSellerTemplateConf() { 229 + getSellerTemplateConf(sid) {
229 App.Seller.GetSellerTemplateConf({ 230 App.Seller.GetSellerTemplateConf({
230 - sid: '4352' 231 + sid
231 }).then(res => { 232 }).then(res => {
232 let home = JSON.parse(res.data.home) 233 let home = JSON.parse(res.data.home)
233 let chef = JSON.parse(res.data.chef) 234 let chef = JSON.parse(res.data.chef)
@@ -242,6 +243,13 @@ Page({ @@ -242,6 +243,13 @@ Page({
242 between: true 243 between: true
243 }) 244 })
244 } 245 }
  246 + let homeColor;
  247 + if(home.red && home.green && home.blue && home.alpha){
  248 + homeColor=home.red + ',' + home.green + ',' + home.blue + ',' + home.alpha
  249 + }else{
  250 + homeColor ='67,142,147,1'
  251 + }
  252 + console.log(homeColor,'homeColorhomeColorhomeColor');
245 this.setData({ 253 this.setData({
246 chef, 254 chef,
247 marketing, 255 marketing,
@@ -249,7 +257,7 @@ Page({ @@ -249,7 +257,7 @@ Page({
249 reserve, 257 reserve,
250 signboard, 258 signboard,
251 store, 259 store,
252 - homeColor: home.red + ',' + home.green + ',' + home.blue + ',' + home.alpha, //home主题颜色 260 + homeColor //home主题颜色
253 }) 261 })
254 if (home.red == '1' && home.green == '67' && home.blue == '163') { 262 if (home.red == '1' && home.green == '67' && home.blue == '163') {
255 this.setData({ 263 this.setData({
@@ -273,8 +281,11 @@ Page({ @@ -273,8 +281,11 @@ Page({
273 console.log('signboard', JSON.parse(res.data.signboard)); 281 console.log('signboard', JSON.parse(res.data.signboard));
274 console.log('store', store); 282 console.log('store', store);
275 }).catch(res=>{ 283 }).catch(res=>{
276 - this.theme = 'green';  
277 - 284 + this.setData({
  285 + theme:'green',
  286 + homeColor:'67,142,147,1'
  287 + })
  288 + console.log(this.data.homeColor,'homeColorhomeColorhomeColor111');
278 }) 289 })
279 }, 290 },
280 secondbook() { 291 secondbook() {