Commit 3eaa2429 authored by 王建威's avatar 王建威

merge master

parents d3083f70 9034a2a3
No preview for this file type
import { php } from './host.js';
import Clipboard from 'clipboard';
export function login() {
location.href = php + 'app=member&act=login';
......@@ -53,4 +54,26 @@ export function getCache (key){
return tmp[0] || "";
}
}
}
// H5复制
export function handleClipboard (text, event, onSuccess, onError) {
event = event || {}
const clipboard = new Clipboard(event.target, {
text: () => text
})
clipboard.on('success', () => {
onSuccess()
clipboard.off('error')
clipboard.off('success')
clipboard.destroy()
})
clipboard.on('error', () => {
onError()
clipboard.off('error')
clipboard.off('success')
clipboard.destroy()
})
clipboard.onClick(event)
}
\ No newline at end of file
// 微信分享 公共方法
var jweixin = require('jweixin-module');
// var jweixin = require('jweixin-module');
export default {
// 是否在微信中
......@@ -22,7 +22,7 @@ export default {
success: (res) => {
const { data } = res;
if(data.code === 0){
jweixin.config({
jWeixin.config({
debug: false,
appId: data.data.appId,
timestamp: data.data.timestamp,
......@@ -59,7 +59,7 @@ export default {
}
//每次都需要重新初始化配置,才可以进行分享
this.initJssdkShare(function(){
jweixin.ready(function() {
jWeixin.ready(function() {
var shareData = {
title: data && data.title ? data.title : '谛宝多多商城',
desc: data && data.desc ? data.desc : '宠物行业一站式B2B采购平台',
......@@ -72,14 +72,35 @@ export default {
cancel: function(res) {}
};
//分享给朋友接口
jweixin.onMenuShareAppMessage(shareData);
jWeixin.onMenuShareAppMessage(shareData);
//分享到朋友圈接口
jweixin.onMenuShareTimeline(shareData);
jWeixin.onMenuShareTimeline(shareData);
// 分享到QQ
jweixin.onMenuShareQQ(shareData);
jWeixin.onMenuShareQQ(shareData);
// 分享到微博
jweixin.onMenuShareWeibo(shareData);
jWeixin.onMenuShareWeibo(shareData);
});
}, url);
},
// 向小程序发送分享的数据
postData: function(t){
// imgUrl: image || 'https://dbc-static.oss-cn-beijing.aliyuncs.com/wx/logo.jpg'
const postData = {
link: window.location.href,
title: t
}
jWeixin.miniProgram.postMessage({ data: JSON.stringify(postData) });
},
isMini: function(){
jWeixin.miniProgram.getEnv(function (res) {
//获取当前环境
if(res.miniprogram){
// true 在微信小程序中
return true;
}else{
// false 在微信公众号里
return false;
}
});
}
}
\ No newline at end of file
......@@ -22,8 +22,9 @@
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script src="https://dbc-static.oss-cn-beijing.aliyuncs.com/dbc-shop/lib/draggabilly.min.js"></script>
<script src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<!-- WPA start -->
<script id="qd28857712162361a518c852fc82fde1e5eab730ba68" src="https://wp.qiye.qq.com/qidian/2885771216/2361a518c852fc82fde1e5eab730ba68" charset="utf-8" async defer></script>
<!-- <script id="qd28857712162361a518c852fc82fde1e5eab730ba68" src="https://wp.qiye.qq.com/qidian/2885771216/2361a518c852fc82fde1e5eab730ba68" charset="utf-8" async defer ></script> -->
<!-- WPA end -->
</head>
<body>
......@@ -31,7 +32,7 @@
<strong>Please enable JavaScript to continue.</strong>
</noscript>
<div id="app"></div>
<div class='draggable is-pointer-down is-dragging' id='qidian_dom'><span></span></div>
<div class="draggable is-pointer-down is-dragging" id="qidian_dom" style="display: none;"><span></span></div>
<script>
var _hmt = _hmt || [];
(function() {
......@@ -40,7 +41,39 @@
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
const ua = window.navigator.userAgent.toLowerCase();
if (ua.match(/micromessenger/i) == 'micromessenger') {
isMiniProgram();
} else {
const dom = document.getElementById('qidian_dom');
dom.style.display = 'block';
const script_dom = document.createElement('script');
script_dom.src = "https://wp.qiye.qq.com/qidian/2885771216/2361a518c852fc82fde1e5eab730ba68";
script_dom.language = 'javascript';
script_dom.id = 'qd28857712162361a518c852fc82fde1e5eab730ba68';
script_dom.type = 'text/javascript';
const head = document.getElementsByTagName('head').item(0);//这个是往本页面动态加载js脚本
head.appendChild(script_dom);
}
function isMiniProgram(){
jWeixin.miniProgram.getEnv(function (res) {
//获取当前环境
const dom = document.getElementById('qidian_dom');
if(res.miniprogram){
dom.style.display = 'none';
}else{
dom.style.display = 'block';
const script_dom = document.createElement('script');
script_dom.src = "https://wp.qiye.qq.com/qidian/2885771216/2361a518c852fc82fde1e5eab730ba68";
script_dom.language = 'javascript';
script_dom.id = 'qd28857712162361a518c852fc82fde1e5eab730ba68';
script_dom.type = 'text/javascript';
const head = document.getElementsByTagName('head').item(0);//这个是往本页面动态加载js脚本
head.appendChild(script_dom);
}
});
}
var $draggable = $('.draggable').draggabilly({
containment: true
});
......
......@@ -12,10 +12,11 @@ import {
// 微信分享公共接口
// #ifdef H5
import wechat from './common/wechat.js';
if (wechat.isWechat()) {
Vue.prototype.$wechat = wechat;
}
import wechat from './common/wechat.js';
Vue.prototype.$wechat = wechat;
// if (wechat.isWechat() || wechat.isMini()) {
// Vue.prototype.$wechat = wechat;
// }
// #endif
Vue.config.productionTip = false;
......
......@@ -2,7 +2,7 @@
"name": "shop_mobile_uni",
"appid": "__UNI__F904656",
"description": "",
"versionName": "1.0.13",
"versionName": "1.0.15",
"versionCode": "100",
"transformPx": false,
"app-plus": {
......@@ -51,7 +51,7 @@
"mode": "history",
"base": "/uni"
},
"publicPath": "https://dbc-static.oss-cn-beijing.aliyuncs.com/dbc-shop/uni/test/1.0.13/",
"publicPath": "https://dbc-static.oss-cn-beijing.aliyuncs.com/dbc-shop/uni/test/1.0.15/",
"optimization": {
"treeShaking": {
"enable": true
......@@ -62,7 +62,7 @@
"disableHostCheck": true,
"proxy": {
"/uni/api": {
"target": "http://10.0.0.52:6564/",
"target": "http://39.96.85.45:9093/",
"changeOrigin": true,
"secure": false,
"pathRewrite": {
......
{
"name": "shop_mobile_uni",
"version": "1.0.7",
"version": "1.0.13",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......@@ -562,6 +562,16 @@
}
}
},
"clipboard": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.6.tgz",
"integrity": "sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg==",
"requires": {
"good-listener": "^1.2.2",
"select": "^1.1.2",
"tiny-emitter": "^2.0.0"
}
},
"cliui": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
......@@ -821,6 +831,11 @@
}
}
},
"delegate": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz",
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
},
"detect-file": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
......@@ -1932,6 +1947,14 @@
"sparkles": "^1.0.0"
}
},
"good-listener": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz",
"integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=",
"requires": {
"delegate": "^3.1.2"
}
},
"graceful-fs": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
......@@ -3469,6 +3492,11 @@
"integrity": "sha1-VjsZx8HeiS4Jv8Ty/DDjwn8JUrk=",
"dev": true
},
"select": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz",
"integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0="
},
"semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
......@@ -3872,6 +3900,11 @@
"integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=",
"dev": true
},
"tiny-emitter": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
},
"to-absolute-glob": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz",
......
......@@ -25,6 +25,7 @@
"minimist": "^1.2.0"
},
"dependencies": {
"clipboard": "^2.0.6",
"jweixin-module": "^1.6.0",
"md5": "^2.2.1",
"moment": "^2.24.0"
......
......@@ -127,6 +127,12 @@
"navigationBarTitleText": "支付状态-谛宝多多商城"
}
},
{
"path": "pages/logistics/logistics",
"style": {
"navigationBarTitleText": "物流查询-谛宝多多商城"
}
},
{
"path": "pages/setaccount/setaccount",
"style": {
......
......@@ -75,6 +75,7 @@
if (this.$wechat && this.$wechat.isWechat()) {
this.$wechat.share({titie: this.$getNavigationBarTitle()});
}
this.postData();
// #endif
},
onPullDownRefresh() {
......@@ -97,6 +98,20 @@
goBack() {
this.$backup();
},
// 向小程序发送数据
postData(){
jWeixin.miniProgram.getEnv(function (res) {
//获取当前环境
if(res.miniprogram){
// this.$wechat.postData('谛宝多多商城-首页');
const postData = {
link: window.location.href,
title: '谛宝多多商城-首页'
}
jWeixin.miniProgram.postMessage({ data: JSON.stringify(postData) });
}
});
},
getData(params) {
uni.request({
url: '/uni/api/credit_goods/get_credit_second_goods',
......
......@@ -75,6 +75,7 @@
if (this.$wechat && this.$wechat.isWechat()) {
this.$wechat.share({titie: this.$getNavigationBarTitle()});
}
this.postData();
// #endif
},
onPullDownRefresh() {
......@@ -97,6 +98,20 @@
goBack() {
this.$backup();
},
// 向小程序发送数据
postData(){
jWeixin.miniProgram.getEnv(function (res) {
//获取当前环境
if(res.miniprogram){
// this.$wechat.postData('谛宝多多商城-首页');
const postData = {
link: window.location.href,
title: '谛宝多多商城'
}
jWeixin.miniProgram.postMessage({ data: JSON.stringify(postData) });
}
});
},
getData(params) {
uni.request({
url: '/uni/api/credit_goods/get_credit_all_goods',
......
......@@ -98,6 +98,7 @@
if (this.$wechat && this.$wechat.isWechat()) {
this.$wechat.share({titie: this.$getNavigationBarTitle()});
}
this.postData();
// #endif
},
methods: {
......@@ -161,6 +162,20 @@
backHome(){
this.$jump('/pages/home/home', 2);
},
// 向小程序发送数据
postData(){
jWeixin.miniProgram.getEnv(function (res) {
//获取当前环境
if(res.miniprogram){
// this.$wechat.postData('谛宝多多商城-首页');
const postData = {
link: window.location.href,
title: '谛宝多多商城'
}
jWeixin.miniProgram.postMessage({ data: JSON.stringify(postData) });
}
});
},
navigate(url) {
uni.navigateTo({
url: url
......
......@@ -70,6 +70,7 @@
if (this.$wechat && this.$wechat.isWechat()) {
this.$wechat.share({titie: this.$getNavigationBarTitle()});
}
this.postData();
// #endif
},
onPageScroll() {
......@@ -120,6 +121,20 @@
this.$jump(`${origin}/mobile/index.php?app=coupon&act=view&id=${this.COUPON_ID}`);
this.$refs.popup.close();
},
// 向小程序发送数据
postData(){
jWeixin.miniProgram.getEnv(function (res) {
//获取当前环境
if(res.miniprogram){
// this.$wechat.postData('谛宝多多商城-首页');
const postData = {
link: window.location.href,
title: '谛宝多多商城-首页'
}
jWeixin.miniProgram.postMessage({ data: JSON.stringify(postData) });
}
});
},
get_coupon(reg_time){
// 打开广告弹窗
const timestamp = new Date('2020/05/19 00:00:00').getTime() / 1000;
......
......@@ -122,6 +122,7 @@
if (this.$wechat && this.$wechat.isWechat()) {
this.$wechat.share({titie: this.$getNavigationBarTitle()});
}
this.postData();
// #endif
},
components: {
......@@ -136,6 +137,20 @@
search() {
window.location.href = `${php}app=search&act=index&keyword=${this.keyword}`
},
// 向小程序发送数据
postData(){
jWeixin.miniProgram.getEnv(function (res) {
//获取当前环境
if(res.miniprogram){
// this.$wechat.postData('谛宝多多商城-首页');
const postData = {
link: window.location.href,
title: '谛宝多多商城'
}
jWeixin.miniProgram.postMessage({ data: JSON.stringify(postData) });
}
});
},
changeCurrent(index) {
this.current = index;
},
......
<template>
<view style="padding-top: 80rpx;">
<TopBar title="物流查询"/>
<view v-if="data.list.length">
<view class="logistics_tip" v-if="data.deliverystatus !== '3' && data.deliverystatus !== '4' && data.deliverystatus !== '5' && data.deliverystatus !== '6'">
<text class="horn_icon"></text>
<text>您的货品正在向您飞奔而来,请耐心等待!</text>
</view>
<view class="logistics_info" v-if="!data.courier">
<image :src="data.logo" class="logistics_icon"></image>
<view class="flex logistics_view">
<text class="logistics_name">{{data.expName}}</text>
<text class="logistics_no">运单号:{{data.number}}
<text class="copy_icon" @click="copy(data.number)"></text>
<text class="vertical_line"></text>
<text>官方电话</text>
<text class="phone_icon" @click="phoneCall(data.expPhone)"></text>
</text>
</view>
</view>
<view class="logistics_info logistics_info2" v-else>
<view style="display: flex;">
<image :src="data.logo" class="logistics_icon"></image>
<view class="flex logistics_view">
<text class="logistics_name">{{data.courier}}</text>
<text class="logistics_no">运单号:{{data.number}}
<text class="copy_icon" @click="copy(data.number)"></text>
</text>
</view>
</view>
<view class="view2">
<text class="courierPhone_icon" @click="phoneCall(data.Phone)"></text>
<text class="courierPhone_title">电话</text>
</view>
</view>
<view class="color_bar"></view>
<view class="logistics_list_box">
<view class="vertical_line2"></view>
<view class="logistics_address">
<text class="get" :class="{'get_icon': data.deliverystatus !== '3', 'get_icon_act': data.deliverystatus === '3'}">收</text>
【收货地址】{{region_name + ' ' + address}}
</view>
<view class="logistics_list_item" v-for="(item, index) in data.list" :key="index" :class="{
'important': index !== 0
}">
<view class="flex item_left_view">
<text class="item_time1">{{item.time.substr(5,5)}}</text>
<text class="item_time2">{{item.time.substr(11,5)}}</text>
</view>
<view class="flex item_left_right" :class="{'no_point': index===0}">
<text v-if="index === 0" class="list_icon" :class="{
'porting_icon_act': data.deliverystatus === '1',
'transport_icon_act': data.deliverystatus === '0',
'distribution_icon_act': data.deliverystatus === '2',
'distribution_get_act': data.deliverystatus === '3'
}"></text>
<text v-if="index === 0">
<text v-if="data.deliverystatus === '0'" class="item_status">已揽件</text>
<text v-if="data.deliverystatus === '1'" class="item_status">运输中</text>
<text v-if="data.deliverystatus === '2'" class="item_status">派件中</text>
<text v-if="data.deliverystatus === '3'" class="item_status">已签收</text>
<text v-if="data.deliverystatus === '4'" class="item_status">派送失败</text>
<text v-if="data.deliverystatus === '5'" class="item_status">疑难件</text>
<text v-if="data.deliverystatus === '6'" class="item_status">退件签收</text>
</text>
<text class="item_detail" v-html="item.status"></text>
</view>
</view>
</view>
</view>
<view v-else class="no_logistics">
暂无物流信息
</view>
<view class="recommend_box">
<view class="flex_title">
<text class="t_point1"></text>
<view>
<view class="title1">更多推荐</view>
<view class="title2">猜你喜欢 商品推荐</view>
</view>
<text class="t_point2"></text>
</view>
<view class="recommend_list">
<view v-for="(item, index) in recommend_goods" :key="index" class="recomment_item">
<image :src="item.default_image || $noGoodsImg" @click="$jumpGoodDetail(item.goods_id)"></image>
<view class="recomment_goods_name">{{item.goods_name}}</view>
<view class="recommend_flex">
<text class="symbol"><text class="price">{{item.price}}</text></text>
<text class="shopcart_icon" @click="$addCart(item.spec_id, 1,isLogin)"></text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
handleClipboard
} from '../../common/util.js';
import TopBar from '@/components/TopBar/TopBar.vue';
export default {
data() {
return {
data: {
expName: '',
number: '',
logo: '',
deliverystatus: '',
list: [],
courier: '',
courierPhone: '',
},
address: '',
region_name: '',
recommend_goods: [],
isLogin: ''
}
},
onLoad(options) {
let num = options.invoice_no,
order_id = options.order_id;
uni.request({
url: '/uni/api/alibaba/get_express_info',
method: 'POST',
data: {
no: num,
order_id: order_id
},
dataType: 'json',
success: (res) => {
if(res.data.data.result) {
// #ifdef H5
if(res.data.data.result.deliverystatus === '2' || res.data.data.result.deliverystatus === '3' || res.data.data.result.deliverystatus === '4') {
let reg = /(\d{11})/g,
str = res.data.data.result.list[0]['status'];
res.data.data.result.list[0]['status'] = str.replace(reg,`<a style="color:red;" href="tel:${"$1"}">${"$1"}</a>`);
}
// #endif
this.data = res.data.data.result;
this.address = res.data.data.address;
this.region_name = res.data.data.region_name;
}
this.recommend_goods = res.data.data.recommend_goods;
this.isLogin = res.data.data.login_flg;
}
});
},
methods: {
phoneCall(num) {
uni.makePhoneCall({
phoneNumber: num
});
},
copy(data) {
// #ifdef H5
handleClipboard(data, event, () => {
uni.showToast({
icon: 'none',
title: '单号已复制'
})
}, () => {
uni.showToast({
icon: 'none',
title: '复制失败'
})
})
// #endif
// #ifndef H5
uni.setClipboardData({
data: data,
success: function() {
uni.showToast({
title: '单号已复制',
icon: 'none',
})
}
});
// #endif
}
},
components: {
TopBar
}
}
</script>
<style lang="less" scoped>
.flex {
display: flex;
}
.logistics_tip {
width: 686rpx;
height: 64rpx;
border-radius: 32rpx;
background-color: #FFF8DD;
margin: 8rpx auto;
font-size: 28rpx;
color: #F0AB00;
display: flex;
align-items: center;
.horn_icon {
width: 40rpx;
height: 40rpx;
margin: 0 12rpx 0 24rpx;
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAAH7+Yj7AAAAAXNSR0IArs4c6QAABQ9JREFUWAntWF1oXEUU/u7+tGnS7BYrRYkItsEqLaXWHxBRMAqiJaQmGysiYvsiFoUiFh/0QQVBpX3wQUXBB32pNn/GoAQKFsFfkKIV0Vq0VKFoaWV/0tDGvXv9zmTP7Oy9u9nNdgkKubB7zpzzzZkzZ+acO3OBhZ4gQFz1CWGyIwhyo0bk5SbRG1OtpT56Ld88I3YVHZOGCrKjeFwUMc9DURHxAD8pb6iiq4SNGp4Cwr3XDMPoRC68mWQY5HbWDgYoDTp7gib+VJBQkdcz4uKWmqdPs+oXl/ZhHd+EIDeCn7kwG1UoNH05VpEkvDsxI20z6zBIFPlzOCYgWi1ZoDDhJ+mhT2TcbmZUYzEMkvZcCb+U5ZWh2WcPA/6r24HB7syP41bSblduefr0vs7a3eUW8N9l8qPYzXX5sZGHJmHrgbJjeJmr8ozoSzb1KuhybB5gAEdUatZGGkzKMebroCrq0XQXOnLnc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4+8SfjVTD52mpAryKUyILNtL/fUi6xt82d/FxDi6ZBP0S5XLCfzoIBvaesaOjfN2869rt7lIw66ylp8ecAD1MkPPIg/ypvjAUai4V1X7dG5t+hYZyKGG7uGcFTltShx7Xt4l+5ner7ByF4lVrl/buMZfMEbbftGX7b0P43Av4N9hjRSE72fAAAAAElFTkSuQmCC') no-repeat;
background-size: 100% 100%;
}
}
.logistics_info {
padding: 24rpx 32rpx;
height: 140rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: flex-start;
.view2 {
display: flex;
flex-direction: column;
}
.courierPhone_icon {
width: 48rpx;
height: 48rpx;
background: url(../../static/logistics/icon_dianhua_big.png) no-repeat;
background-size: 100% 100%;
}
.courierPhone_title {
font-size: 24rpx;
color: #979797;
}
.logistics_icon {
width: 84rpx;
height: 84rpx;
margin-right: 24rpx;
}
.logistics_view {
flex-direction: column;
justify-content: center;
}
.logistics_name {
font-size: 30rpx;
color: #212121;
font-family: PingFangSC-Medium;
margin-bottom: 8rpx;
line-height: 42rpx;
}
.logistics_no {
font-size: 24rpx;
color: #979797;
line-height: 34rpx;
}
.copy_icon,
.phone_icon {
display: inline-block;
width: 28rpx;
height: 28rpx;
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAEFCu8CAAAAAXNSR0IArs4c6QAABBNJREFUSA3FVktIm0EQ3sRojE8UX2BpvRR7aKWiuXirvaSgQkWQgogeWntoULC0UOhFFFEvxhe0BUGFth7Eogcf0IroKX1cUqF4k4qIetDEGB8xf7/Z5N/s/+dvCVbahfw7O++ZzMwuY7plonNvb69Ce3t7+2OOoIPf73+RnJy8RzAbGBhQ+vv7ORdHiM/Z2ZnS3d0dpkxPT3Ngb29v3VJYWOgjuZycHJPQSnKHh4fe4+PjDYKzsrIGaWeqKMFkmvbz8/MWMwFGKyEh4ZURPhY3Pj6uwCMP/To7O7mHXC3Fvb6+zkZHR28mJibesFqtXNpC36ampi95eXl2gkEQoXMiIdV1dHRE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-size: 100% 100%;
position: relative;
top: 4rpx;
margin-left: 8rpx;
}
.phone_icon {
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAEFCu8CAAAAAXNSR0IArs4c6QAAA0ZJREFUSA3Nlk1IVFEUx33z6WimtZBahLtIW1hIucldZbQIol1UIGrRByWRGDkOgyNMJjkRYUgWtAjBCCIKgtr1AdEXLYtIbBZjNFFQDqPMR78zeh9v3sx7fhF24XnPved/zv+cc8+9Y0mJ1fD7/UOicyiApmlpJZf09PSM64v5hWAwWJpDYfejKBzEapR+UeqUCunxeLzI62WtqU0s9qTT6SbWp0OhUIXaX/hMitmiaFyXicISgOKayikv2kAg0ILhZpRJ3TV53ZQFm3lgtZjA3RmUGd3inwqEMzUXzg7kl4pMhaPWBXM2my3r6+urIdTnKKMFAKsNWHKnTp6/jBj9LNUmgLfI9fRaE2z3XC7X3lQqdQLWowpTMONdD2VsbMyJk8VVcnBw0FfgdcU3Copjjog8P7BXS5HKOJKU0tueI8B1VPcNFfVQ2U/KSGZbQ8BfuGatcwanBgYGypWxraHD4bhEqM8EDPP5zs7OXPvJ2tawt7c3CGabABm1s9PsX1tDclwL7AWNEfH5fJuMhrYyYeYeBObPZmDeccBQRUF+kttl+vSY1+utSyaTH6lq7uEwGueFilEckMaLFhGj6enpIc5vu9GgQCaPu8ZNwhvhoWk37hllPVRC0wDOoDyMfIVwW6nqIyPYVibUDbaAlVLqKS4ngOHhYXcsFmtwu93j3d3d3+x8LZuQc7iYyWTOcQUOQtTI18GZvOP0D9BOX83kyyKkQ65CJH25EXlCOUfeh3y/srKywngPRZ/Xp8pgIXN/f38FZMfJZpT+1t9isWW/ji9mJhPdkgm7urp+8xS5aecn/AcwRVavxSFlrCOIMIQdsjaPJRMqRziv4SuFoE2eAMhfEUSIO5V3QRXepYSlzNz665C10yD12Gcg+846QOZhK3/zEs61fCNOo6ox6MxmHD/E6fvq6uryeDx+iE4dAbOLLJ9akcm+ZZcKUTQafQymgXI1M8sDHoGoinkC5zuZ42Qlv/gzTqezAbIEsu0oSkipjuD4NpZnebIiZg/oNDA3CKQFeT+YB2aM1dqqpPILI6OWqFfx/ZFFOBxek0gk7kC2m8Y4SWO0yf5iRtEMlQMcbyWDW6y3kE0SeZRSXiCASYX57+e/z3lZSO3+ki0AAAAASUVORK5CYII=') no-repeat;
background-size: 100% 100%;
}
.vertical_line {
display: inline-block;
width: 1Px;
height: 24rpx;
background-color: #d8d8d8;
margin: 0 24rpx;
vertical-align: middle;
}
}
.logistics_info2 {
display: flex;
justify-content: space-between;
align-items: center;
}
.color_bar {
height: 20rpx;
background-color: #f5f5f5;
}
.recommend_box {
background-color: #f5f5f5;
.flex_title {
display: flex;
justify-content: center;
align-items: center;
padding: 60rpx 0 20rpx;
}
.title1 {
font-size: 32rpx;
color: #3C3F49;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
line-height: 44rpx;
margin-bottom: 4rpx;
text-align: center;
}
.title2 {
text-align: center;
font-size: 20rpx;
color: #AEAEAE;
line-height: 28rpx;
}
.t_point1 {
width: 48rpx;
height: 12rpx;
background: url(../../static/logistics/Group14@2x.png) no-repeat;
background-size: 100% 100%;
margin-right: 4rpx;
}
.t_point2 {
width: 48rpx;
height: 12rpx;
background: url(../../static/logistics/Group2@2x.png) no-repeat;
background-size: 100% 100%;
margin-left: 4rpx;
}
.recommend_list {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
width: 702rpx;
margin: 0 auto;
}
.recomment_item {
width: 346rpx;
height: 514rpx;
background: #fff;
border-radius: 16rpx;
text-align: center;
overflow: hidden;
margin-bottom: 20rpx;
image {
margin: 24rpx 0 20rpx;
width: 300rpx;
height: 300rpx;
}
.recomment_goods_name {
font-size: 26rpx;
color: #212121;
line-height: 28rpx;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
width: 300rpx;
margin: 0 auto 14rpx;
text-align: left;
}
.recommend_flex {
display: flex;
justify-content: space-between;
align-items: center;
width: 300rpx;
margin: 0 auto;
}
.symbol {
font-size: 26rpx;
font-family: PingFangSC-Semibold;
color: #F46B33;
}
.price {
font-size: 36rpx;
}
.shopcart_icon {
width: 56rpx;
height: 56rpx;
background: url(../../static/common/icon_gouwuche@2x2.png) no-repeat;
background-size: 100% 100%;
}
}
}
.logistics_list_box {
padding: 44rpx 0 0 32rpx;
position: relative;
.logistics_address {
font-size: 26rpx;
color: #aeaeae;
line-height: 34rpx;
padding-left: 30rpx;
padding-right: 32rpx;
margin-left: 116rpx;
position: relative;
.get {
width: 36rpx;
height: 36rpx;
text-align: center;
line-height: 36rpx;
border-radius: 50%;
font-size: 20rpx;
font-family: PingFangSC-Medium;
position: absolute;
left: -18rpx;
z-index: 10;
}
.get_icon {
background-color: #d2d2d2;
color: #fff;
}
.get_icon_act {
background-color: #FFCD00;
color: #000;
}
}
.logistics_list_item {
display: flex;
justify-content: flex-start;
align-items: center;
margin: 40rpx 0;
.item_left_view {
flex-direction: column;
justify-content: center;
}
.item_time1 {
font-size: 28rpx;
color: #212121;
font-family: PingFangSC-Medium;
line-height: 40rpx;
width: 86rpx;
text-align: right;
}
.item_time2 {
font-size: 24rpx;
color: #464646;
line-height: 24rpx;
text-align: right;
}
.item_left_right {
flex-direction: column;
justify-content: center;
margin-left: 30rpx;
padding-left: 30rpx;
padding-right: 32rpx;
position: relative;
}
.item_left_right::after {
width: 12rpx;
height: 12rpx;
background: #d2d2d2;
border-radius: 50%;
z-index: 10;
content: '';
position: absolute;
left: -6rpx;
top: 14rpx;
}
.no_point::after {
display: none;
}
.item_status {
font-family: PingFangSC-Medium;
font-size: 28rpx;
line-height: 40rpx;
color: #212121;
}
.item_detail {
font-size: 26rpx;
color: #464646;
line-height: 36rpx;
}
}
.important {
view,
text {
color: #aeaeae !important;
}
}
}
.vertical_line2 {
width: 1px;
height: 100%;
background-color: red;
position: absolute;
left: 146rpx;
z-index: 5;
background-color: #ececec;
}
.list_icon {
position: absolute;
left: -20rpx;
top: 10rpx;
width: 40rpx;
height: 40rpx;
z-index: 10;
}
.porting_icon_act {
background: url(../../static/logistics/icon_yunshuzhong_xuanzhong.png);
background-size: 100%;
}
.transport_icon_act {
background: url(../../static/logistics/icon_yilaanjian_xuanzhong.png);
background-size: 100%;
}
.distribution_icon_act {
background: url(../../static/logistics/icon_paisong_xuanzhong.png);
background-size: 100%;
}
.distribution_get_act {
background: url(../../static/logistics/icon_qianshou.png);
background-size: 100%;
}
.no_logistics {
font-size: 40rpx;
text-align: center;
padding: 40rpx 0;
}
</style>
......@@ -48,7 +48,7 @@
<view class="image-outer" @click="jumpPhpPage(`app=goods&id=${item._source.goods_id}`)">
<image :src="item._source.default_image || $noGoodsImg" lazy-load @error="$__reloadResource(item)" mode="aspectFill"></image>
</view>
<view class="title">{{item._source.goods_name}}</view>
<view class="title">{{item._source.brand}} {{item._source.goods_name}}</view>
<view class="sub-title">{{item._source.goods_subname}}</view>
<view v-if="isLogin">
<view v-if="item._source.is_pro === 1">
......@@ -111,6 +111,7 @@
if (this.$wechat && this.$wechat.isWechat()) {
this.$wechat.share({titie: this.$getNavigationBarTitle()});
}
this.postData();
// #endif
this.param = {...this.param, ...option};
this.searchVal = option.keyword;
......@@ -138,6 +139,20 @@
url: '/pages/home/home'
})
},
// 向小程序发送数据
postData(){
jWeixin.miniProgram.getEnv(function (res) {
//获取当前环境
if(res.miniprogram){
// this.$wechat.postData('谛宝多多商城-首页');
const postData = {
link: window.location.href,
title: '谛宝多多商城'
}
jWeixin.miniProgram.postMessage({ data: JSON.stringify(postData) });
}
});
},
// 加入购物车
addCart(spec_id, quantity) {
this.$addCart(spec_id, quantity, this.isLogin);
......@@ -180,7 +195,7 @@
if(type === 'refresh'){
this.goods_list = [];
}
this.goods_list = this.goods_list.concat(data.data);
this.goods_list = this.goods_list.concat(data.data || []);
this.goods_list.map((item, key) => {
if(item._source.is_pro === 1 && new Date(item._source.end_time).getTime() < new Date().getTime())
item._source.is_pro = 0;
......
......@@ -90,7 +90,7 @@
success: (res) => {
const {data} = res;
if(data.code == 0){
this.goods_names = data.data;
this.goods_names = data.data || [];
}
}
});
......
No preview for this file type
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