作者 燕成杰

合并分支 'yan' 到 'master'

Yan



查看合并请求 !18
... ... @@ -12,10 +12,10 @@
if (!openId && !e.query.code) {
console.log('获取code');
// getApp().authorization()
getApp().authorization()
} else if (e.query.code) {
console.log(2);
// getApp().getOpenid(e.query.code)
getApp().getOpenid(e.query.code)
}
// else {
// uni.showModal({
... ...
... ... @@ -15,7 +15,7 @@ export const arcList = () => request({url: 'index/arc_list',method: 'post',data
export const product_list = (data) => request({url: 'product/product_list',method: 'post',data: data})
// 首页产品详情
export const product_detail = (product_id) => request({url: 'product/product_detail',method: 'post',data: {product_id}})
export const product_detail = (product_id,url) => request({url: 'product/product_detail',method: 'post',data: {product_id,url}})
// 首页产品下单
export const product_buy = (data) => request({url: 'product/product_buy',method: 'post',data: data})
... ...
... ... @@ -126,6 +126,7 @@
</view>
</view>
</u-popup>
<image class="home" @click="goHome" src="/static/home.png" mode=""></image>
<view class="share" v-if="shareModel" @click="shareModel=false">
<image src="../../static/detailShare.png" mode=""></image>
<view class="">
... ... @@ -136,7 +137,7 @@
</template>
<script>
var jweixin = require('jweixin-module');
var jweixin = require('jweixin-module');
import {
product_detail,
product_favorite,
... ... @@ -158,7 +159,8 @@
sort: {
name: ""
}
},
},
jssdk:{},
list1: [], //轮播图
range: [{
value: 0,
... ... @@ -190,9 +192,27 @@
this.report_list()
},
methods: {
goHome(){
uni.reLaunch({
url:'/pages/index/index'
})
},
share(){
let that = this;
jweixin.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId: that.jssdk.appId, // 必填,公众号的唯一标识
timestamp: that.jssdk.timestamp, // 必填,生成签名的时间戳
nonceStr: that.jssdk.nonceStr, // 必填,生成签名的随机串
signature: that.jssdk.signature, // 必填,签名
jsApiList: that.jssdk.jsApiList // 必填,需要使用的JS接口列表
})
jweixin.error(function(res) {
console.log(res, '错误')
});
console.log('分享了',that.jssdk.signature);
jweixin.ready(function() {
//分享给朋友
jweixin.onMenuShareAppMessage({
title: that.detail.name, // 分享标题
... ... @@ -257,7 +277,7 @@
this.show = false
},
change(e) {
console.log("e:", e);
// console.log("e:", e);
},
//选中效果
choosritem(name, id) {
... ... @@ -322,11 +342,12 @@
}
},
//详情
async product_detail() {
async product_detail() {
try {
const res = await product_detail(this.id)
const res = await product_detail(this.id,window.location.href)
console.log('product_detail', res)
this.detail = res.detail
this.detail = res.detail
this.jssdk = res.jssdk
this.list1 = res.detail.images_preview
this.share()
// 保存数据
... ... @@ -343,7 +364,8 @@
uni.navigateTo({
url: "/pages/index/buy?id=" + this.id
})
},
},
},
}
</script>
... ... @@ -670,5 +692,12 @@
font-size: 36rpx;
font-weight: 700;
}
}
.home {
width: 96rpx;
height: 96rpx;
position: fixed;
right: 28rpx;
bottom: 186rpx;
}
</style>
... ...
... ... @@ -100,6 +100,7 @@
</view>
</view>
</view>
<image class="goTop" @click="goTop" src="/static/top.png" mode=""></image>
<Botton :flag="1"></Botton>
</view>
</template>
... ... @@ -137,16 +138,20 @@
},
onShow() {
this.initial()
this.product_list(true)
},
onLoad() {
this.product_list(true)
},
onReachBottom() {
this.currentpage++
this.product_list()
},
methods: {
goTop(){
uni.pageScrollTo({
scrollTop: 0
});
},
// 资讯详情
oncusdetail(e) {
uni.navigateTo({
... ... @@ -602,4 +607,11 @@
}
}
}
.goTop {
width: 96rpx;
height: 96rpx;
position: fixed;
right: 28rpx;
bottom: 186rpx;
}
</style>
... ...
... ... @@ -171,7 +171,7 @@
},
openshowBuyer(item) {
this.showBuyer = true
this.code = item.buyer_name
this.code = item.buyer_package
this.wechart = item.buyer_wechat
this.name = item.buyer_name
this.phone = item.buyer_mobile
... ...
<!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)'))
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.bdc7f535.js></script></body></html>
\ No newline at end of file
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>
\ No newline at end of file
... ...