Commit c74e568c authored by 罗超's avatar 罗超

调整分享

parent d4cb3a43
......@@ -5,7 +5,7 @@
>
<view
class="ad-chi"
v-for="(item, index) in ad.list"
v-for="(item, index) in adtemp"
:key="index"
:style="[item.formatStyle]"
@click="clickHandler(item.link[0].new_link_url)"
......@@ -18,6 +18,11 @@
<script>
export default {
props: ["ad"],
data() {
return {
adtemp:[]
}
},
created() {
this.ad.list.forEach((x) => {
x.formatStyle = {
......@@ -33,6 +38,7 @@ export default {
if (this.ad.height == "auto") {
x.formatStyle.position = "unset";
}
this.adtemp.push(x)
});
},
methods: {
......
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
})
</script>
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
</head>
<body>
<noscript>
<strong>Please enable JavaScript to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
\ No newline at end of file
......@@ -84,5 +84,19 @@
},
"uniStatistics" : {
"enable" : false
},
"h5" : {
"router" : {
"mode" : "history",
"base" : "/h5/"
},
"template" : "h5.html",
"sdkConfigs" : {
"maps" : {
"qqmap" : {
"key" : "ZAPBZ-SVBWR-OAMWM-WC45H-AKFU3-FIBP3"
}
}
}
}
}
......@@ -3,7 +3,8 @@
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"pages": [{
"path": "pages/index/index"
"path": "pages/index/index",
"enablePullDownRefresh": true
},
{
"path": "pages/cart/cart"
......@@ -29,7 +30,7 @@
{
"path": "pages/webbox/webbox"
}
],
"subPackages": [{
"root": "pages/goods",
......@@ -48,22 +49,22 @@
}
]
},
// {
// "root": "pages/member",
// "pages": [{
// "path": "index/index"
// },
// {
// "path": "privilege"
// }
// ]
// },
// {
// "root": "pages/member",
// "pages": [{
// "path": "index/index"
// },
// {
// "path": "privilege"
// }
// ]
// },
{
"root": "pages/balance",
"pages": [
// {
// "path": "recharge"
// },
// {
// "path": "recharge"
// },
{
"path": "balance"
},
......@@ -74,20 +75,18 @@
}
]
},
{
"root": "pages/live",
"plugins": {
"live-player-plugin": {
"version": "1.0.18",
"provider": "wx2b03c6e691cd7370"
}
},
"pages": [
{
"path": "index"
}
]
},
{
"root": "pages/live",
"plugins": {
"live-player-plugin": {
"version": "1.0.18",
"provider": "wx2b03c6e691cd7370"
}
},
"pages": [{
"path": "index"
}]
},
{
"root": "pages/user-center",
"pages": [{
......@@ -109,12 +108,12 @@
{
"path": "cash/cash"
},
{
"path": "level/level"
},
{
"path": "examine"
}
{
"path": "level/level"
},
{
"path": "examine"
}
]
},
......@@ -210,15 +209,15 @@
]
}
],
// "rules": [{
// "action": "allow",
// "page": "*"
// }],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
"backgroundColor": "#F8F8F8",
"app-plus": {
//#ifdef H5
"titleNView": false
//#endif
}
}
}
\ No newline at end of file
......@@ -12,17 +12,24 @@
@click="previewImage"
></u-swiper>
<!-- TODO 分销价格未做 is_share_price -->
<view class="is_share" v-if="g.share>0">
<view class="is_share" v-if="g.share > 0">
<image
src="@/static/images/icon/WechatIMG424.png"
style="width: 20px;margin-left: 12px;opacity: 1;"
style="width: 20px; margin-left: 12px; opacity: 1;"
mode="widthFix"
/>
<view
style="display: flex;flex-direction: column;margin-left: 8px;font-size: 11px;color: #fff;opacity: 1;"
style="
display: flex;
flex-direction: column;
margin-left: 8px;
font-size: 11px;
color: #fff;
opacity: 1;
"
>
<Text>分销最高可赚</Text>
<Text>{{g.share}}</Text>
<Text>{{ g.share }}</Text>
</view>
</view>
</view>
......@@ -34,9 +41,9 @@
<text class="small"></text>
<text class="numfont">
{{
g.price_min == g.price_max
? g.price_min
: g.price_min + "-" + g.price_max
g.price_min == g.price_max
? g.price_min
: g.price_min + "-" + g.price_max
}}
</text>
</view>
......@@ -44,33 +51,46 @@
<!-- TODO is_member_user_member_price 会员用户会员价 -->
<view class="sell u-skeleton-rect">
<text class="oprice" v-if="setting.is_underline_price == 1">
{{
g.original_price
}}
{{ g.original_price }}
</text>
<text v-if="setting.is_sales == 1">已售出{{ g.sales }}{{ g.unit }}</text>
<text v-if="setting.is_sales == 1"
>已售出{{ g.sales }}{{ g.unit }}</text
>
</view>
</view>
<view class="right u-skeleton-rect" @click="openShare">
<image src="@/static/images/icon/icon-share.png" class="share-icon" />
<image
src="@/static/images/icon/icon-share.png"
class="share-icon"
/>
<text>分享</text>
</view>
</view>
</view>
<view class="sku-box u-skeleton-rect" v-if="g.goods_marketing_award.integral.title != ''">
<view
class="sku-box u-skeleton-rect"
v-if="g.goods_marketing_award.integral.title != ''"
>
<view class="label">活动</view>
<view class="content">
<u-tag text="送积分" type="error" />
<text
style="margin-left: 5px; font-size: 12px;"
>{{ g.goods_marketing_award.integral.title }}</text>
<text style="margin-left: 5px; font-size: 12px;">{{
g.goods_marketing_award.integral.title
}}</text>
</view>
</view>
<view class="sku-box u-skeleton-rect" style="align-items: flex-start;" v-if="sku.length > 0">
<view
class="sku-box u-skeleton-rect"
style="align-items: flex-start;"
v-if="sku.length > 0"
>
<view class="label">选择</view>
<view class="content">
<view class="sku-chosen" @click="chosenSku">
<view class="sku">{{ currentSku.attr_list.length > 0 ? "已" : "请" }}选择 {{ sku }}</view>
<view class="sku"
>{{ currentSku.attr_list.length > 0 ? "已" : "请" }}选择
{{ sku }}</view
>
<view class="arrow">
<u-icon name="arrow" :size="32" color="#111"></u-icon>
</view>
......@@ -87,7 +107,7 @@
</view>
<view class="item" v-if="g.attr_groups[0].attr_list.length > 1">
{{ g.attr_groups[0].attr_list.length }}{{
g.attr_groups[0].attr_group_name
g.attr_groups[0].attr_group_name
}}可选
</view>
</template>
......@@ -98,12 +118,13 @@
v-if="i < 5"
:key="i"
style="margin-bottom: 5px;"
>{{ x.attr_name }}</view>
>{{ x.attr_name }}</view
>
</template>
<view class="item" v-if="g.attr_groups[0].attr_list.length > 1">
共{{ g.attr_groups[0].attr_list.length }}种{{
g.attr_groups[0].attr_group_name
g.attr_groups[0].attr_group_name
}}可选
</view>
</template>
......@@ -113,7 +134,9 @@
<view class="sku-box u-skeleton-rect" v-if="setting.is_express == '1'">
<view class="label">快递</view>
<view class="content">{{ g.express == "" ? "免运费" :('¥'+ g.express) }}</view>
<view class="content">{{
g.express == "" ? "免运费" : "¥" + g.express
}}</view>
</view>
<view
class="sku-box u-skeleton-rect"
......@@ -132,7 +155,10 @@
<view class="content">{{ g.goods_marketing.limit }}</view>
</view>
<view class="sku-box u-skeleton-rect" v-if="comments.length == 0 && setting.is_comment == 1">
<view
class="sku-box u-skeleton-rect"
v-if="comments.length == 0 && setting.is_comment == 1"
>
<view class="label">暂无评论信息</view>
</view>
<view class="comment" v-if="comments.length > 0">
......@@ -152,9 +178,7 @@
<view class="user">
<u-avatar :src="comments[0].UserPhotoPath" :size="50"></u-avatar>
<text style="margin-left: 10px;">
{{
comments[0].UserName
}}
{{ comments[0].UserName }}
</text>
</view>
<view class="timer">{{ comments[0].CreateDate }}</view>
......@@ -162,17 +186,31 @@
<view class="ucontent">{{ comments[0].Content }}</view>
</view>
</view>
<u-divider :margin-top="20" :margin-bottom="20" bg-color="transparent">商品详情</u-divider>
<u-divider :margin-top="20" :margin-bottom="20" bg-color="transparent"
>商品详情</u-divider
>
<view class="details">
<!-- <rich-text :nodes="detailContent" @click="clickDescription"></rich-text> -->
<h-parse :content="detailContent" @navigate="clickDescription"></h-parse>
<h-parse
:content="detailContent"
@navigate="clickDescription"
></h-parse>
</view>
<u-divider :margin-top="20" :margin-bottom="20" bg-color="transparent">或许你喜欢</u-divider>
<view style="width: calc(100vw - 20px); margin-left: 10px; overflow: hidden;">
<u-divider :margin-top="20" :margin-bottom="20" bg-color="transparent"
>或许你喜欢</u-divider
>
<view
style="width: calc(100vw - 20px); margin-left: 10px; overflow: hidden;"
>
<goodlist :list="recommend"></goodlist>
</view>
<u-skeleton v-if="loading" :loading="true" :animation="true" bgcolor="#FFF"></u-skeleton>
<u-skeleton
v-if="loading"
:loading="true"
:animation="true"
bgcolor="#FFF"
></u-skeleton>
<goodsaction
v-if="!loading"
:good-name="g.name"
......@@ -194,7 +232,11 @@
@close="closeSkuChosen"
></goodsku>
</view>
<u-empty text="没有找到商品,或商品已下架" mode="favor" v-if="!isExsitGoods"></u-empty>
<u-empty
text="没有找到商品,或商品已下架"
mode="favor"
v-if="!isExsitGoods"
></u-empty>
<share
:good-id="id"
v-if="showShare"
......@@ -202,7 +244,11 @@
:images="g.pic_url"
@close="closeShare"
></share>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
<auth
v-if="showAuth"
@changeuserinfo="reloadUserinfo"
@gbAuth="gbAuth"
></auth>
</view>
</template>
......@@ -215,7 +261,7 @@ import goodsaction from "./components/goodsaction";
import goodsku from "@/components/goods/goodsku";
import auth from "@/components/auth/index";
import share from "./components/share/share";
import hParse from "./components/u-parse/parse.vue"
import hParse from "./components/u-parse/parse.vue";
export default {
data() {
return {
......@@ -244,10 +290,10 @@ export default {
pageIndex: 1,
pageSize: 20,
GoodsId: 0,
CommentGrade: 0
CommentGrade: 0,
},
showAuth: false,
u: {}
u: {},
};
},
components: {
......@@ -256,7 +302,7 @@ export default {
goodsku,
auth,
share,
hParse
hParse,
},
onLoad(option) {
this.opTionObj = option;
......@@ -273,7 +319,7 @@ export default {
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
avatarUrl: "",
};
this.showAuth = true;
} else {
......@@ -288,19 +334,17 @@ export default {
},
onShareAppMessage(res) {
let u = uni.getStorageSync("mall_UserInfo");
let uid = u.UserId ? u.UserId : 0;
return {
title:
this.g.app_share_title != null && this.g.app_share_title != ""
? this.g.app_share_title
: this.g.name,
path:
"/pages/goods/goods?id=" + this.id + "&user_id=" + u.UserId
? u.UserId
: 0,
path: "/pages/goods/goods?id=" + this.id + "&user_id=" + uid,
imageUrl:
this.g.app_share_pic != null && this.g.app_share_pic != ""
? this.g.app_share_pic
: this.g.pic_url[0].pic_url
: this.g.pic_url[0].pic_url,
};
},
mounted() {
......@@ -315,9 +359,12 @@ export default {
initImages() {
// let that = this;
let info = uni.createSelectorQuery().in(this);
info.select('.goods').boundingClientRect(data => {
console.log("得到布局位置信息" + JSON.stringify(data));
}).exec();
info
.select(".goods")
.boundingClientRect((data) => {
console.log("得到布局位置信息" + JSON.stringify(data));
})
.exec();
// info
// .boundingClientRect(function (data) {
// console.log(data)
......@@ -347,18 +394,18 @@ export default {
let pages = uni.getStorageSync("basedata")
? uni.getStorageSync("basedata").bar_title
: [];
pages.forEach(x => {
pages.forEach((x) => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: this.pageTitle
title: this.pageTitle,
});
},
clickCommentHandler() {
uni.navigateTo({
url: "/pages/goods/comment-list?id=" + this.id
url: "/pages/goods/comment-list?id=" + this.id,
});
},
init() {
......@@ -367,14 +414,14 @@ export default {
{
url: "/api/AppletGoods/GetAppletGoodsInfo",
data: {
GoodsId: this.id
}
GoodsId: this.id,
},
},
res => {
(res) => {
console.log(res, "详情");
if (res.resultCode == 1) {
this.g = res.data.goods;
this.g.pic_url.forEach(x => {
this.g.pic_url.forEach((x) => {
this.imgs.push(x.pic_url);
});
if (this.g.attr_groups.length > 0) {
......@@ -384,7 +431,7 @@ export default {
}
this.sku += x.attr_group_name;
});
this.g.attr_groups[0].attr_list.forEach(x => {
this.g.attr_groups[0].attr_list.forEach((x) => {
if (x.pic_url) {
this.skuimage.push(x.pic_url);
}
......@@ -413,7 +460,7 @@ export default {
current: i,
longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"],
success: function(data) {
success: function (data) {
console.log(
"选中了第" +
(data.tapIndex + 1) +
......@@ -422,10 +469,10 @@ export default {
"张图片"
);
},
fail: function(err) {
fail: function (err) {
console.log(err.errMsg);
}
}
},
},
});
},
initComments() {
......@@ -434,9 +481,9 @@ export default {
this.request2(
{
url: "/api/AppletOrder/GetAppletGoodsCommentPageList",
data: this.msg
data: this.msg,
},
res => {
(res) => {
console.log(res, "pinglun");
this.comments = res.data.pageData;
// this.initRecommend();
......@@ -448,10 +495,10 @@ export default {
{
url: "/api/AppletGoods/GetAppletGoodsRecommendListForZY",
data: {
RecommendType: 1
}
RecommendType: 1,
},
},
res => {
(res) => {
this.recommend = res.data.List;
console.log(this.recommend, "recommeds");
}
......@@ -462,10 +509,10 @@ export default {
{
url: "/api/AppletUser/SetUserFootMarkInfo",
data: {
GoodsId: id
}
GoodsId: id,
},
},
res => {}
(res) => {}
);
},
joinCar() {
......@@ -504,8 +551,8 @@ export default {
},
openShare() {
this.showShare = true;
}
}
},
},
};
</script>
......
<template>
<view class="content" :style="{ 'padding-bottom': showtabs==ture? '100rpx':0 }">
<view class="content" v-if="myPageData.home_pages" :style="{ 'padding-bottom': showtabs==ture? '100rpx':0 }">
<u-tabs
v-if="myPageData.home_pages.navs.length > 1"
v-if="myPageData.home_pages && myPageData.home_pages.navs.length > 1"
name="name"
:list="myPageData.home_pages.navs"
:is-scroll="true"
......@@ -173,9 +173,10 @@ export default {
uni.showNavigationBarLoading();
},
onShareAppMessage(res) {
let uid=uni.getStorageSync('mall_UserInfo') ?uni.getStorageSync('mall_UserInfo').UserId:0
return {
title:this.setting.share_title?this.setting.share_title:uni.getStorageSync("basedata").mall.name,
path: "/pages/index/index?user_id=" + uni.getStorageSync('mall_UserInfo') ?uni.getStorageSync('mall_UserInfo').UserId:0,
path: "/pages/index/index?user_id=" + uid,
imageUrl: this.setting.share_pic?this.setting.share_pic:'',
};
},
......
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