diff --git a/src/App.vue b/src/App.vue
index b52bd72..bd395d3 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,61 +1,59 @@
-
-
-
-
- {{tab.title}}
-
-
-
-
-
-
+
+
+
+
+ {{ tab.title }}
+
+
+
+
+
+
diff --git a/src/api/index.js b/src/api/index.js
index 263992d..2a386ac 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -114,7 +114,7 @@ const getDynamicDetail = (dynamic_id) => service.get(`/api/dynamic/detail?id=${d
const getCommonGoods = (temple_id, page, size = 10) => service.get(`/api/common/get-list?temple_id=${temple_id}&page=${page}&size=${size}`);
// 获取订单榜
-const getOrderCompare = (temple_id, type = '', goods_id = '', goods_type = '') => service.get(`/api/order/get-compare?temple_id=${temple_id}&type=${type}&goods_id=${goods_id}&goods_type=${goods_type}`);
+const getOrderCompare = (temple_id = '1', type = '', goods_id = '', goods_type = '') => service.get(`/api/order/get-compare?temple_id=${temple_id}&type=${type}&goods_id=${goods_id}&goods_type=${goods_type}`);
// 寺院列表
const getTempleList = (keywords = '', lng = '', lat = '', page = 1, size = 10) => service.get(`/api/temple/get-List?keywords=${keywords}&lng=${lng}&lat=${lat}&page=${page}&size=${size}`)
@@ -131,7 +131,11 @@ const getCustomerList = () => service.get(`/api/customer/get-list`);
// 功德证书
const getCertList = () => service.get(`/api/user/get-cert-list`);
+// 热门搜索
+const getHotWords = () => service.get(`/api/keywords/get-list`);
+
export {
+ getHotWords,
getMonkAppellation,
getRegion,
postTemple,
diff --git a/src/common/vant.js b/src/common/vant.js
index 8f82233..3cc227c 100644
--- a/src/common/vant.js
+++ b/src/common/vant.js
@@ -27,6 +27,7 @@ import {
Switch,
Cascader,
ActionSheet,
+ ShareSheet,
Dialog
} from "vant";
@@ -35,8 +36,9 @@ Vue.use(NavBar);
Vue.use(Search);
Vue.use(Swipe);
Vue.use(SwipeItem);
-Vue.use(Grid);
Vue.use(GridItem);
+Vue.use(Grid);
+Vue.use(ShareSheet);
Vue.use(NoticeBar);
Vue.use(Tabbar);
Vue.use(TabbarItem);
diff --git a/src/common/wechat-web.js b/src/common/wechat-web.js
index 9f17ddc..b7e8aa3 100644
--- a/src/common/wechat-web.js
+++ b/src/common/wechat-web.js
@@ -1,39 +1,44 @@
-
let wechatInstance;
-function signToWechat(config){
- if(!wx){
+function signToWechat(config) {
+ if (!wx) {
console.warn('请安装微信网页JS-SDK, url: https://res2.wx.qq.com/open/js/jweixin-1.6.0.js');
}
const defaultConfig = {
- debug: true,
- }
+ ...config,
+ jsApiList: [
+ 'onMenuShareTimeline',
+ 'onMenuShareAppMessage',
+ 'scanQRCode',
+ 'getLocation',
+ 'openLocation',
+ 'updateAppMessageShareData',
+ 'updateTimelineShareData'
+ ],
+ };
return new Promise((resolve) => {
- wx.config({
- ...defaultConfig,
- debug: true,
- ...config,
- })
- wx.ready(function(){
- console.warn('wechat sdk config success')
+ console.log('defaultConfig', defaultConfig);
+ wx.config(defaultConfig);
+ wx.ready(function() {
+ console.warn('wechat sdk config success');
wechatInstance = wx;
- resolve(wx)
- })
- })
+ resolve(wx);
+ });
+ });
}
-function getLocation(){
+function getLocation() {
return new Promise(resolve => {
wechatInstance.getLocation({
type: 'wgs84',
success: res => {
- resolve(res)
+ resolve(res);
}
- })
- })
+ });
+ });
}
-function requestPayment(paymentConfig){
+function requestPayment(paymentConfig) {
return new Promise(resolve => {
wechatInstance.chooseWXPay({
timestamp: paymentConfig.timestamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
@@ -41,18 +46,50 @@ function requestPayment(paymentConfig){
package: paymentConfig.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)
signType: paymentConfig.signType, // 微信支付V3的传入RSA,微信支付V2的传入格式与V2统一下单的签名格式保持一致
paySign: paymentConfig.paySign, // 支付签名
- success: function (res) {
- // 支付成功后的回调函数
- resolve(res)
+ success: function(res) {
+ // 支付成功后的回调函数
+ resolve(res);
},
- fail(res){
- alert(JSON.stringify(res))
+ fail(res) {
+ alert(JSON.stringify(res));
}
});
- })
+ });
}
-function openLocation(config){
- return wechatInstance.openLocation(config)
+function openLocation(config) {
+ return wechatInstance.openLocation(config);
}
-export { signToWechat, getLocation, requestPayment, openLocation };
\ No newline at end of file
+
+// 分享给朋友
+function updateAppMessageShareData(title = '', desc = '', link = '', imgUrl = '') {
+ return new Promise((resolve) => {
+ wechatInstance.updateAppMessageShareData({
+ title,
+ desc,
+ link,
+ imgUrl,
+ complete: res => {
+ resolve(res);
+ }
+ });
+ });
+}
+
+// 分享到朋友圈
+function updateTimelineShareData(title = '', desc = '', link = '', imgUrl = '') {
+ return new Promise((resolve) => {
+ wechatInstance.updateTimelineShareData({
+ title,
+ desc,
+ link,
+ imgUrl,
+ complete: res => {
+ resolve(res);
+ }
+ });
+ });
+}
+
+
+export { signToWechat, getLocation, requestPayment, openLocation, updateAppMessageShareData, updateTimelineShareData };
\ No newline at end of file
diff --git a/src/components/Thanksgiving/index.vue b/src/components/Thanksgiving/index.vue
index 7962c58..b8b6880 100644
--- a/src/components/Thanksgiving/index.vue
+++ b/src/components/Thanksgiving/index.vue
@@ -3,17 +3,17 @@
感恩功德
- {{ nav.title }}
+ {{ nav.title }}
@@ -48,10 +48,11 @@ export default {
{ id: 3, title: "总榜", list: [] },
],
swiperOptions: {
- onSlideChangeEnd: ({realIndex}) => {
- this.type_id = this.type_nav[realIndex].id;
- this.getOrderCompare();
- }
+
+ // onSlideChangeEnd: ({realIndex}) => {
+ // this.type_id = this.type_nav[realIndex].id;
+ // this.getOrderCompare();
+ // }
}
}
},
@@ -59,9 +60,12 @@ export default {
this.getOrderCompare();
},
methods: {
+ onSetType(type){
+ this.type_id = type.id;
+ this.getOrderCompare();
+ },
async getOrderCompare(){
- const res = await getOrderCompare(this.templeId, this.type_id, this.goodsId, this.goodsType)
- console.log(res)
+ const res = await getOrderCompare(this.templeId || '1', this.type_id, this.goodsId, this.goodsType)
const current = this.type_nav.find(item => item.id === this.type_id);
current.list = res.list
},
diff --git a/src/components/buddha-process/index.vue b/src/components/buddha-process/index.vue
index 40a0935..5c78951 100644
--- a/src/components/buddha-process/index.vue
+++ b/src/components/buddha-process/index.vue
@@ -12,7 +12,7 @@
已有{{ privateData.sales }}人参与
-
+
关注
diff --git a/src/components/user-merit/index.vue b/src/components/user-merit/index.vue
index 72a33db..e314b2d 100644
--- a/src/components/user-merit/index.vue
+++ b/src/components/user-merit/index.vue
@@ -1,5 +1,5 @@
-
+
![]()
{{data.user_info.nickname}}
{{data.user_info.region}}
-
{{data.goods_name}}
+
{{data.goods_name}}
@@ -27,7 +27,7 @@ export default {
};
-