Authored by lijing

app打开增加复制功能

@@ -216,7 +216,7 @@ const payCod = (req, res, next) => { @@ -216,7 +216,7 @@ const payCod = (req, res, next) => {
216 216
217 payModel.getPayCod(param).then(result => { 217 payModel.getPayCod(param).then(result => {
218 if (result.match === true) { 218 if (result.match === true) {
219 - aboutModel.about().then(resu => { 219 + aboutModel.about(req).then(resu => {
220 res.render('pay/pay-cod', Object.assign(responseData, result, {wxFooter: resu})); 220 res.render('pay/pay-cod', Object.assign(responseData, result, {wxFooter: resu}));
221 }); 221 });
222 } else { 222 } else {
@@ -269,7 +269,7 @@ const payAli = (req, res, next) => { @@ -269,7 +269,7 @@ const payAli = (req, res, next) => {
269 269
270 payModel.getPayAli(param).then(result => { 270 payModel.getPayAli(param).then(result => {
271 if (result.match === true) { 271 if (result.match === true) {
272 - aboutModel.about().then(resu => { 272 + aboutModel.about(req).then(resu => {
273 res.render('pay/pay-ali', Object.assign(responseData, result, {wxFooter: resu})); 273 res.render('pay/pay-ali', Object.assign(responseData, result, {wxFooter: resu}));
274 }); 274 });
275 } else { 275 } else {
@@ -441,7 +441,7 @@ const index = (req, res, next) => { @@ -441,7 +441,7 @@ const index = (req, res, next) => {
441 // 标识有微信分享 441 // 标识有微信分享
442 data.hasWxShare = true; 442 data.hasWxShare = true;
443 443
444 - aboutModel.about().then((resu) => { 444 + aboutModel.about(req).then((resu) => {
445 data.guang.wxFooter = resu; 445 data.guang.wxFooter = resu;
446 res.render('info/index', Object.assign({ 446 res.render('info/index', Object.assign({
447 page: 'info-index', 447 page: 'info-index',
@@ -65,7 +65,7 @@ const about = (req, res, next) => { @@ -65,7 +65,7 @@ const about = (req, res, next) => {
65 width750: true 65 width750: true
66 }; 66 };
67 67
68 - aboutModel.about().then(result => { 68 + aboutModel.about(req).then(result => {
69 res.render('agreement/about', Object.assign(responseData, {wxFooter: result})); 69 res.render('agreement/about', Object.assign(responseData, {wxFooter: result}));
70 }).catch(next); 70 }).catch(next);
71 }; 71 };
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 2
3 const api = global.yoho.API; 3 const api = global.yoho.API;
4 4
5 -const about = () => { 5 +const about = (res) => {
6 return api.get('', { 6 return api.get('', {
7 method: 'app.document.config' 7 method: 'app.document.config'
8 }, { 8 }, {
@@ -13,9 +13,11 @@ const about = () => { @@ -13,9 +13,11 @@ const about = () => {
13 if (result && result.data) { 13 if (result && result.data) {
14 resu = { 14 resu = {
15 wxTitle: result.data.wechatAtten, 15 wxTitle: result.data.wechatAtten,
16 - wxTip: result.data.wechatAttenSub 16 + wxTip: result.data.wechatAttenSub,
  17 + wxCopy: result.data.wechatCopy
17 }; 18 };
18 } 19 }
  20 + resu.isApp = res.yoho.isApp;
19 return resu; 21 return resu;
20 }); 22 });
21 }; 23 };
@@ -6,4 +6,9 @@ @@ -6,4 +6,9 @@
6 <div class="wx-title">{{wxTitle}}</div> 6 <div class="wx-title">{{wxTitle}}</div>
7 <div class="wx-tip">{{wxTip}}</div> 7 <div class="wx-tip">{{wxTip}}</div>
8 </div> 8 </div>
  9 + {{#if isApp}}
  10 + <a class="wx-btn" href='//m.yohobuy.com/?openby:yohobuy={"action":"go.copy","params":{"text":"{{wxCopy}}"}}'>
  11 + 复制
  12 + </a>
  13 + {{/if}}
9 </div> 14 </div>
@@ -236,7 +236,7 @@ button { @@ -236,7 +236,7 @@ button {
236 236
237 .wx-text { 237 .wx-text {
238 float: left; 238 float: left;
239 - width: 85%; 239 + width: 73%;
240 240
241 .wx-title { 241 .wx-title {
242 font-size: 28px; 242 font-size: 28px;
@@ -248,4 +248,18 @@ button { @@ -248,4 +248,18 @@ button {
248 color: #b0b0b0; 248 color: #b0b0b0;
249 } 249 }
250 } 250 }
  251 +
  252 + .wx-btn {
  253 + margin-top: 10px;
  254 + width: 10%;
  255 + text-align: center;
  256 + line-height: 35px;
  257 + height: 35px;
  258 + display: block;
  259 + background-color: #444;
  260 + color: #fff;
  261 + font-size: 24px;
  262 + border-radius: 3px;
  263 + float: left;
  264 + }
251 } 265 }