Commit f6ca68cc by 李嘉林

分享

parent abb552d8
...@@ -54,12 +54,13 @@ ...@@ -54,12 +54,13 @@
</template> </template>
<script> <script>
import shop from "@/api/shop";
import links from '@/components/basicTool/link/index.vue' import links from '@/components/basicTool/link/index.vue'
import interval from '@/components/basicTool/interval/index.vue' import interval from '@/components/basicTool/interval/index.vue'
import partition from '@/components/basicTool/partition/index.vue' import partition from '@/components/basicTool/partition/index.vue'
import shopPopup from '@/components/basicTool/shop-popup/index.vue' import shopPopup from '@/components/basicTool/shop-popup/index.vue'
import { setTabBarActive, checkTabbarPage } from "../../utils/mayi.js"; import { setTabBarActive, checkTabbarPage } from "../../utils/mayi.js";
const app = getApp();
export default { export default {
data() { data() {
return { return {
...@@ -73,18 +74,40 @@ export default { ...@@ -73,18 +74,40 @@ export default {
partition, partition,
shopPopup, shopPopup,
}, },
onShareAppMessage: function(res) { onShareAppMessage(res) {
let shareVal={};
if (res.from === "button") { if (res.from === "button") {
console.log(res.target,'-----------78'); console.log(res.target,'-----------78');
return new Promise((resolve,reject)=>{
shop.getShopInfo({ shopMixId: "antgood" }).then(res=>{
if(res.data.code ==200){
let {shopName} = res.data.data;
let logoUrl = app.DFSImg(res.data.data.logoUrl,500,400,0);
resolve({
title: shopName,
path: "page/home/main",
imageUrl:logoUrl,
success: function(res) {
console.log("成功", res);
}
});
}
})
}).then(res=>{
return {
...res,
}
})
} }
return { // return {
title: "分享1", // title: shareVal.title,
path: "", // path: "page/home/main",
imageUrl:"http://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/png/18d0044d-9634-4c89-8321-3e8ff8e94cce.png", // imageUrl:shareVal.imageUrl,
success: function(res) { // success: function(res) {
console.log("成功", res); // console.log("成功", res);
} // }
}; // };
}, },
onLoad(options) { onLoad(options) {
let that = this; let that = this;
......
...@@ -72,7 +72,7 @@ const componentOptions = { ...@@ -72,7 +72,7 @@ const componentOptions = {
copyText(e) { copyText(e) {
let { text } = e.currentTarget.dataset; let { text } = e.currentTarget.dataset;
let pagePath = getCurrentPages()[0].route; let pagePath = getCurrentPages()[0].route;
let copyVal = pagePath + text; // let copyVal = pagePath + text;
wx.setClipboardData({ wx.setClipboardData({
data: copyVal, data: copyVal,
success: function(res) { success: function(res) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment