作者 燕成杰

修改bug

@@ -12,10 +12,10 @@ @@ -12,10 +12,10 @@
12 12
13 if (!openId && !e.query.code) { 13 if (!openId && !e.query.code) {
14 console.log('获取code'); 14 console.log('获取code');
15 - // getApp().authorization() 15 + getApp().authorization()
16 } else if (e.query.code) { 16 } else if (e.query.code) {
17 console.log(2); 17 console.log(2);
18 - // getApp().getOpenid(e.query.code) 18 + getApp().getOpenid(e.query.code)
19 } 19 }
20 // else { 20 // else {
21 // uni.showModal({ 21 // uni.showModal({
@@ -15,7 +15,7 @@ export const arcList = () => request({url: 'index/arc_list',method: 'post',data @@ -15,7 +15,7 @@ export const arcList = () => request({url: 'index/arc_list',method: 'post',data
15 export const product_list = (data) => request({url: 'product/product_list',method: 'post',data: data}) 15 export const product_list = (data) => request({url: 'product/product_list',method: 'post',data: data})
16 16
17 // 首页产品详情 17 // 首页产品详情
18 -export const product_detail = (product_id) => request({url: 'product/product_detail',method: 'post',data: {product_id}}) 18 +export const product_detail = (product_id,url) => request({url: 'product/product_detail',method: 'post',data: {product_id,url}})
19 19
20 // 首页产品下单 20 // 首页产品下单
21 export const product_buy = (data) => request({url: 'product/product_buy',method: 'post',data: data}) 21 export const product_buy = (data) => request({url: 'product/product_buy',method: 'post',data: data})
@@ -126,6 +126,7 @@ @@ -126,6 +126,7 @@
126 </view> 126 </view>
127 </view> 127 </view>
128 </u-popup> 128 </u-popup>
  129 + <image class="home" @click="goHome" src="/static/home.png" mode=""></image>
129 <view class="share" v-if="shareModel" @click="shareModel=false"> 130 <view class="share" v-if="shareModel" @click="shareModel=false">
130 <image src="../../static/detailShare.png" mode=""></image> 131 <image src="../../static/detailShare.png" mode=""></image>
131 <view class=""> 132 <view class="">
@@ -191,6 +192,11 @@ @@ -191,6 +192,11 @@
191 this.report_list() 192 this.report_list()
192 }, 193 },
193 methods: { 194 methods: {
  195 + goHome(){
  196 + uni.reLaunch({
  197 + url:'/pages/index/index'
  198 + })
  199 + },
194 share(){ 200 share(){
195 let that = this; 201 let that = this;
196 jweixin.config({ 202 jweixin.config({
@@ -338,7 +344,7 @@ @@ -338,7 +344,7 @@
338 //详情 344 //详情
339 async product_detail() { 345 async product_detail() {
340 try { 346 try {
341 - const res = await product_detail(this.id) 347 + const res = await product_detail(this.id,window.location.href)
342 console.log('product_detail', res) 348 console.log('product_detail', res)
343 this.detail = res.detail 349 this.detail = res.detail
344 this.jssdk = res.jssdk 350 this.jssdk = res.jssdk
@@ -359,6 +365,7 @@ @@ -359,6 +365,7 @@
359 url: "/pages/index/buy?id=" + this.id 365 url: "/pages/index/buy?id=" + this.id
360 }) 366 })
361 }, 367 },
  368 +
362 }, 369 },
363 } 370 }
364 </script> 371 </script>
@@ -686,4 +693,11 @@ @@ -686,4 +693,11 @@
686 font-weight: 700; 693 font-weight: 700;
687 } 694 }
688 } 695 }
  696 + .home {
  697 + width: 96rpx;
  698 + height: 96rpx;
  699 + position: fixed;
  700 + right: 28rpx;
  701 + bottom: 186rpx;
  702 + }
689 </style> 703 </style>
@@ -100,6 +100,7 @@ @@ -100,6 +100,7 @@
100 </view> 100 </view>
101 </view> 101 </view>
102 </view> 102 </view>
  103 + <image class="goTop" @click="goTop" src="/static/top.png" mode=""></image>
103 <Botton :flag="1"></Botton> 104 <Botton :flag="1"></Botton>
104 </view> 105 </view>
105 </template> 106 </template>
@@ -137,16 +138,20 @@ @@ -137,16 +138,20 @@
137 }, 138 },
138 onShow() { 139 onShow() {
139 this.initial() 140 this.initial()
140 - this.product_list(true)  
141 }, 141 },
142 onLoad() { 142 onLoad() {
143 - 143 + this.product_list(true)
144 }, 144 },
145 onReachBottom() { 145 onReachBottom() {
146 this.currentpage++ 146 this.currentpage++
147 this.product_list() 147 this.product_list()
148 }, 148 },
149 methods: { 149 methods: {
  150 + goTop(){
  151 + uni.pageScrollTo({
  152 + scrollTop: 0
  153 + });
  154 + },
150 // 资讯详情 155 // 资讯详情
151 oncusdetail(e) { 156 oncusdetail(e) {
152 uni.navigateTo({ 157 uni.navigateTo({
@@ -602,4 +607,11 @@ @@ -602,4 +607,11 @@
602 } 607 }
603 } 608 }
604 } 609 }
  610 + .goTop {
  611 + width: 96rpx;
  612 + height: 96rpx;
  613 + position: fixed;
  614 + right: 28rpx;
  615 + bottom: 186rpx;
  616 + }
605 </style> 617 </style>
@@ -171,7 +171,7 @@ @@ -171,7 +171,7 @@
171 }, 171 },
172 openshowBuyer(item) { 172 openshowBuyer(item) {
173 this.showBuyer = true 173 this.showBuyer = true
174 - this.code = item.buyer_name 174 + this.code = item.buyer_package
175 this.wechart = item.buyer_wechat 175 this.wechart = item.buyer_wechat
176 this.name = item.buyer_name 176 this.name = item.buyer_name
177 this.phone = item.buyer_mobile 177 this.phone = item.buyer_mobile
1 <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>元届印象</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)')) 1 <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>元届印象</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
2 - document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.f3bf79df.js></script><script src=/static/js/index.2e082368.js></script></body></html>  
  2 + document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.f3bf79df.js></script><script src=/static/js/index.ce24accb.js></script></body></html>