mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-02-05 00:49:49 +08:00
【新增】新增微信扫码支付功能,对接PC端。
【新增】增加DTO类库,将逐步完善dto层。 【修复】修复【分类】切换后,切换回来未清零原始数据,导致更新数据重复的问题。 【调整】移除模板库功能,防止出现审核因为模板库页面存在而导致的审核失败。暂将模板库的代码存放到会员QQ群内,方便下载使用。 【调整】代码生成器【Repository.tpl】移除Cache手动增删改,【SqlSugarSetup】增加sqlsugar自动检测增删改后清理二级缓存。 【调整】后端新增秒杀独立组件,用于区分团购及秒杀的差异,首页新增秒杀组件。 【优化】重写首页所有组件样式及接口数据获取效率。 【优化】优化拼团,秒杀,团购,接龙数据获取逻辑,提升列表及详情页面数据获取效率。 【优化】调整拼团,秒杀,团购,服务商品推广海报为新式海报效果。增加服务商品推广海报。 【优化】清理h5相关代码判断,移除h5支付组件,提高响应速度。 【优化】移除小程序前端冗余代码。加快代码执行效率。
This commit is contained in:
@@ -10,6 +10,14 @@
|
||||
showLoginTip: false,
|
||||
},
|
||||
onLaunch() {
|
||||
|
||||
// 此版本发布于2022-10-23
|
||||
const version = '0.6.4'
|
||||
// 开发环境才提示,生产环境不会提示
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
console.log(`\n %c \u6838\u5fc3\u5546\u57ce\u7cfb\u7edf\u0020\u0043\u006f\u0072\u0065\u0053\u0068\u006f\u0070 V${version} %c \u0068\u0074\u0074\u0070\u0073\u003a\u002f\u002f\u0077\u0077\u0077\u002e\u0063\u006f\u0072\u0065\u0073\u0068\u006f\u0070\u002e\u0063\u006e\u002f \n\n`, 'color: #ffffff; background: #3c9cff; padding:5px 0;', 'color: #3c9cff;background: #f1f1f1; padding:5px 0;');
|
||||
}
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
this.autoUpdate();
|
||||
// #endif
|
||||
@@ -21,14 +29,6 @@
|
||||
// 获取店铺配置信息 全局只请求一次
|
||||
this.$u.api.shopConfigV2().then(res => {
|
||||
this.$store.commit('config', res.data)
|
||||
// #ifdef H5
|
||||
//百度统计
|
||||
if (res.data.statistics) {
|
||||
var script = document.createElement("script");
|
||||
script.innerHTML = res.data.statistics;
|
||||
document.getElementsByTagName("body")[0].appendChild(script);
|
||||
}
|
||||
// #endif
|
||||
})
|
||||
//获取三级联动城市信息
|
||||
this.$u.api.getAreaList().then(res => {
|
||||
@@ -36,12 +36,11 @@
|
||||
this.$db.set('areaList', res.data)
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
onShow: function (obj) {
|
||||
// #ifdef MP-WEIXIN
|
||||
this.$store.commit('scene', obj.scene)
|
||||
console.log(obj);
|
||||
//console.log(obj);
|
||||
// #endif
|
||||
//console.log('App Show')
|
||||
},
|
||||
@@ -170,7 +169,7 @@
|
||||
|
||||
// vue App的样式
|
||||
/* #ifdef APP-PLUS */
|
||||
@import "@/static/style/style.vue.scss";
|
||||
@import "@/static/style/style.app.scss";
|
||||
/* #endif */
|
||||
|
||||
// 小程序特有的样式
|
||||
|
||||
@@ -160,21 +160,25 @@ module.exports = {
|
||||
this.$u.route(url)
|
||||
},
|
||||
// 秒杀详情
|
||||
goSeckillDetail(id, groupId) {
|
||||
this.$u.route('/pages/activity/seckill/seckillDetails/seckillDetails', { id: id, groupId: groupId, });
|
||||
goSeckillDetail(id) {
|
||||
this.$u.route('/pages/activity/seckill/seckillDetails/seckillDetails', { id: id });
|
||||
},
|
||||
// 团购详情
|
||||
goGroupBuyingDetail(id, groupId) {
|
||||
this.$u.route('/pages/activity/groupBuying/groupBuyingDetails/groupBuyingDetails', { id: id, groupId: groupId, });
|
||||
goGroupBuyingDetail(id) {
|
||||
this.$u.route('/pages/activity/groupBuying/groupBuyingDetails/groupBuyingDetails', { id: id });
|
||||
},
|
||||
//拼团详情页
|
||||
goPinTuanDetail(id, pinTuanId, teamId) {
|
||||
goPinTuanDetail(id, teamId) {
|
||||
if (teamId) {
|
||||
this.$u.route('/pages/activity/pinTuan/pinTuanDetails/pinTuanDetails', { id: id, pinTuanId: pinTuanId, teamId: teamId, });
|
||||
this.$u.route('/pages/activity/pinTuan/pinTuanDetails/pinTuanDetails', { id: id, teamId: teamId, });
|
||||
} else {
|
||||
this.$u.route('/pages/activity/pinTuan/pinTuanDetails/pinTuanDetails', { id: id, pinTuanId: pinTuanId });
|
||||
this.$u.route('/pages/activity/pinTuan/pinTuanDetails/pinTuanDetails', { id: id });
|
||||
}
|
||||
},
|
||||
// 查看团购列表
|
||||
goGroupPurchase() {
|
||||
this.$u.route('/pages/activity/groupBuying/list/list')
|
||||
},
|
||||
// 查看秒杀列表
|
||||
goSeckillList() {
|
||||
this.$u.route('/pages/activity/seckill/list/list')
|
||||
@@ -189,7 +193,10 @@ module.exports = {
|
||||
* 文章接口
|
||||
*/
|
||||
|
||||
// 查看文章总列表
|
||||
// 查看文章分类
|
||||
goArticleClassify(id) {
|
||||
this.$u.route('/pages/article/list/list', { id: id });
|
||||
},
|
||||
goArticleList() {
|
||||
this.$u.route('/pages/article/list/list')
|
||||
},
|
||||
@@ -231,7 +238,7 @@ module.exports = {
|
||||
* 接龙接口信息
|
||||
*/
|
||||
|
||||
// 查看服务详情
|
||||
// 查看接龙详情
|
||||
goSolitaireDetail(id) {
|
||||
this.$u.route('/pages/activity/solitaire/solitaireDetails/solitaireDetails', { id: id });
|
||||
},
|
||||
@@ -241,7 +248,6 @@ module.exports = {
|
||||
},
|
||||
|
||||
//服务接口信息
|
||||
// 查看服务详情
|
||||
goServicesDetail(serviceId) {
|
||||
this.$u.route('/pages/serviceGoods/details/details', { id: serviceId });
|
||||
},
|
||||
@@ -266,14 +272,11 @@ module.exports = {
|
||||
}
|
||||
if (type == navLinkType.urlLink) {
|
||||
if (val.indexOf('http') != -1) {
|
||||
// #ifdef H5
|
||||
window.location.href = val
|
||||
// #endif
|
||||
// #ifdef H5 || APP-PLUS || APP-PLUS-NVUE || MP
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE || MP
|
||||
this.$u.route('/pages/webview/webview', { src: val });
|
||||
// #endif
|
||||
} else {
|
||||
// #ifdef H5 || APP-PLUS || APP-PLUS-NVUE || MP
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE || MP
|
||||
if (val == '/pages/index/default/default' || val == '/pages/category/index/index' || val == '/pages/index/cart/cart' || val == '/pages/index/member/member') {
|
||||
this.$u.route({ type: 'switchTab', url: val });
|
||||
return;
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
const install = (Vue, vm) => {
|
||||
|
||||
// 获取店铺配置
|
||||
//let shopConfig = (params, config = {}) => http.post('/Api/Common/GetConfig', params, { custom: { methodName: 'common.shopConfig', needToken: false } });
|
||||
let shopConfigV2 = (params, config = {}) => http.post('/Api/Common/GetConfigV2', params, { custom: { methodName: 'common.shopConfigV2', needToken: false } });
|
||||
//获取商城关键词说明
|
||||
let getServiceDescription = (params, config = {}) => http.post('/Api/Common/GetServiceDescription', params, { custom: { methodName: 'common.getServiceDescription', needToken: false } });
|
||||
@@ -399,24 +398,11 @@ const install = (Vue, vm) => {
|
||||
let serviceVerificationTicket = (params, config = {}) => http.post('/Api/Service/VerificationTicket', params, { custom: { methodName: 'service.verificationTicket', needToken: true } });
|
||||
|
||||
|
||||
|
||||
//获取接龙列表
|
||||
let getSolitairePageList = (params, config = {}) => http.post('/Api/Solitaire/GetList', params, { custom: { methodName: 'solitaire.getList', needToken: false } });
|
||||
let getSolitaireDetail = (params, config = {}) => http.post('/Api/Solitaire/GetDetail', params, { custom: { methodName: 'solitaire.getDetail', needToken: false } });
|
||||
|
||||
|
||||
|
||||
// 用户注册(废弃,改为自动获取app数据及使用短信验证码登录)建议直接使用smsLogin接口
|
||||
//let reg = (params, config = {}) => http.post('/Api/Common/InterFaceTest', params, { custom: { methodName: 'user.reg', needToken: true } });
|
||||
// 用户登录(废弃,改为短信验证码登录)
|
||||
//let login = (params, config = {}) => http.post('/Api/Common/InterFaceTest', params, { custom: { methodName: 'user.login', needToken: true } });
|
||||
// 获取用户信息(废弃)
|
||||
// let trustLogin = (params, config = {}) => http.post('/Api/Common/InterFaceTest', params, { custom: { methodName: 'user.trustcallback', needToken: true } });
|
||||
// 订单售后状态(废弃方法,建议直接用order.details接口)
|
||||
// let afterSalesStatus = (params, config = {}) => http.post('/Api/Common/InterFaceTest', params, { custom: { methodName: 'order.aftersalesstatus', needToken: true } });
|
||||
// 我的积分(弃用)
|
||||
//let myPoint = (params, config = {}) => http.post('/Api/Common/InterFaceTest', params, { custom: { methodName: 'user.mypoint', needToken: true } });
|
||||
|
||||
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
|
||||
vm.$u.api = {
|
||||
shopConfigV2,
|
||||
@@ -485,8 +471,7 @@ const install = (Vue, vm) => {
|
||||
paymentInfo,
|
||||
pay,
|
||||
orderEvaluate,
|
||||
//isSign,
|
||||
//sign,
|
||||
|
||||
userCheckIn,
|
||||
getUserCheckByMonth,
|
||||
getUserCheckCount,
|
||||
|
||||
@@ -17,16 +17,12 @@ module.exports = (vm) => {
|
||||
// #endif
|
||||
// 注:如果局部custom与全局custom有同名属性,则后面的属性会覆盖前面的属性,相当于Object.assign(全局,局部)
|
||||
//defaultConfig.custom = {}; // 全局自定义参数默认值
|
||||
// #ifdef H5 || APP-PLUS || MP-ALIPAY || MP-WEIXIN
|
||||
// #ifdef APP-PLUS || MP-ALIPAY || MP-WEIXIN
|
||||
defaultConfig.timeout = 60000;
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
defaultConfig.sslVerify = true;
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
// 跨域请求时是否携带凭证(cookies)仅H5支持(HBuilderX 2.6.15+)
|
||||
defaultConfig.withCredentials = false;
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
defaultConfig.firstIpv4 = false; // DNS解析时优先使用ipv4 仅 App-Android 支持 (HBuilderX 2.8.0+)
|
||||
// #endif
|
||||
@@ -84,7 +80,7 @@ module.exports = (vm) => {
|
||||
//console.log(page.route);
|
||||
// 登录信息过期或者未登录
|
||||
if (data.data === 14007 || data.data === 14006) {
|
||||
// #ifdef H5 || APP-PLUS || APP-PLUS-NVUE
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
if (page.route.indexOf('pages/login/loginBySMS/loginBySMS') < 0) {
|
||||
db.del("userToken");
|
||||
uni.showToast({
|
||||
|
||||
@@ -1,20 +1,14 @@
|
||||
/**
|
||||
* 全局配置文件
|
||||
* @version 0.6.2
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
//接口请求地址,如果需要不部署接口端的情况下测试uni-app,可以直接替换为官方测试接口:https://api.demo.coreshop.cn
|
||||
//export const apiBaseUrl = 'https://api.pro.coreshop.cn';
|
||||
export const apiBaseUrl = 'http://localhost:2015';
|
||||
export const apiBaseUrl = process.env.NODE_ENV === 'development' ? 'https://api.nsts.mvccms.cn' : 'https://api.nsts.mvccms.cn';
|
||||
|
||||
//项目静态资源请求地址,如果使用官方的静态文件地址可以直接替换为:https://files.cdn.coreshop.cn
|
||||
export const apiFilesUrl = 'https://files.cdn.coreshop.cn';
|
||||
|
||||
export const h5Url = apiBaseUrl + "/wap/"; //H5端网站地址,
|
||||
|
||||
// #ifdef H5
|
||||
export const baseUrl = process.env.NODE_ENV === 'development' ? window.location.origin + '/' : apiBaseUrl
|
||||
// #endif
|
||||
|
||||
//支付单类型
|
||||
export const paymentType = {
|
||||
//普通订单
|
||||
@@ -25,7 +19,6 @@ export const paymentType = {
|
||||
group: 3,
|
||||
//秒杀订单
|
||||
seckill: 4,
|
||||
|
||||
//砍价
|
||||
bargain: 6,
|
||||
//赠品
|
||||
@@ -34,10 +27,8 @@ export const paymentType = {
|
||||
solitaire: 8,
|
||||
//交易组件
|
||||
transactionComponent: 10,
|
||||
|
||||
//充值
|
||||
recharge: 201,
|
||||
|
||||
//服务订单
|
||||
serviceOrder: 501,
|
||||
//表单付款码
|
||||
@@ -46,7 +37,6 @@ export const paymentType = {
|
||||
formOrder: 302,
|
||||
};
|
||||
|
||||
|
||||
//分享链接及海报类型
|
||||
export const shareType = {
|
||||
// 首页
|
||||
@@ -55,7 +45,7 @@ export const shareType = {
|
||||
goods: 2,
|
||||
// 3拼团详情页
|
||||
pinTuan: 3,
|
||||
// 4店铺邀请
|
||||
// 4分销店铺
|
||||
inv: 4,
|
||||
// 5文章页面
|
||||
article: 5,
|
||||
@@ -69,15 +59,54 @@ export const shareType = {
|
||||
group: 9,
|
||||
// 10秒杀
|
||||
seckill: 10,
|
||||
// 11代理
|
||||
// 11代理店铺
|
||||
agent: 11,
|
||||
// 12接龙
|
||||
solitaire: 12,
|
||||
// 13 服务商品
|
||||
serviceGoods: 13
|
||||
};
|
||||
|
||||
//分享终端
|
||||
export const shareClient = {
|
||||
// 普通h5
|
||||
h5: 1,
|
||||
// 微信小程序
|
||||
wxMiNiProgram: 2,
|
||||
// 微信公众号(h5)
|
||||
wxOfficial: 3,
|
||||
// 头条系小程序
|
||||
ttMiNiProgram: 4,
|
||||
// 电脑pc端
|
||||
pc: 5,
|
||||
// 阿里小程序
|
||||
aLiMiNiProgram: 6,
|
||||
};
|
||||
|
||||
|
||||
//分享终端
|
||||
export const shareModel = {
|
||||
// 链接分享
|
||||
url: 1,
|
||||
// 二维码
|
||||
qrCode: 2,
|
||||
// 海报
|
||||
poster: 3,
|
||||
};
|
||||
|
||||
export const shareUrl = 'pages/share/jump/jump'; //分享初始化地址
|
||||
|
||||
|
||||
//列表加载状态
|
||||
export const loadStatus = {
|
||||
// 加载前的状态
|
||||
loadMore: 'loadmore',
|
||||
// 加载中的状态
|
||||
loading: 'loading',
|
||||
// 没有更多的状态
|
||||
noMore: 'nomore',
|
||||
};
|
||||
|
||||
|
||||
//nav页面导航类型
|
||||
export const navLinkType = {
|
||||
@@ -87,3 +116,5 @@ export const navLinkType = {
|
||||
articleCategory: 4,// "文章分类",
|
||||
intelligentForms: 5// "智能表单"
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
/**
|
||||
* 很多无法css实现的换肤效果,通过此模块实现
|
||||
* 使用方法,在代码中直接使用 this.$coreTheme.mainNabBar.background
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
//通用头部背景样式
|
||||
export const mainNabBar = {
|
||||
background: {
|
||||
//颜色
|
||||
backgroundColor: '#e54d42',
|
||||
// 导航栏背景图
|
||||
// background: 'url(https://cdn.uviewui.com/uview/swiper/1.jpg) no-repeat',
|
||||
// 还可以设置背景图size属性
|
||||
// backgroundSize: 'cover',
|
||||
|
||||
// 渐变色
|
||||
//backgroundImage: 'linear-gradient(45deg, rgb(28, 187, 180), rgb(141, 198, 63))'
|
||||
},
|
||||
//通用头部文字颜色
|
||||
titleColor: "#fff",
|
||||
//通用头部文字颜色
|
||||
backIconColor: "#fff",
|
||||
};
|
||||
|
||||
@@ -29,26 +29,8 @@ function modelShow(
|
||||
};
|
||||
|
||||
|
||||
//时间差转倒计时数据
|
||||
function timeToDateObj(micro_second) {
|
||||
var time = {}
|
||||
// 总秒数
|
||||
var second = Math.floor(micro_second)
|
||||
// 天数
|
||||
time.day = Math.floor(second / 3600 / 24)
|
||||
// 小时
|
||||
time.hour = Math.floor((second / 3600) % 24)
|
||||
// 分钟
|
||||
time.minute = Math.floor((second / 60) % 60)
|
||||
// 秒
|
||||
time.second = Math.floor(second % 60)
|
||||
return time
|
||||
};
|
||||
|
||||
//货币格式化
|
||||
function formatMoney(number, places, symbol, thousand, decimal) {
|
||||
// console.log(number)
|
||||
// console.log(places)
|
||||
number = number || 0
|
||||
places = !isNaN((places = Math.abs(places))) ? places : 2
|
||||
symbol = symbol !== undefined ? symbol : '¥'
|
||||
@@ -71,41 +53,6 @@ function formatMoney(number, places, symbol, thousand, decimal) {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取url参数
|
||||
*
|
||||
* @param {*} name
|
||||
* @param {*} [url=window.location.serach]
|
||||
* @returns
|
||||
*/
|
||||
function getQueryString(name, url) {
|
||||
var url = url || window.location.href
|
||||
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
|
||||
var r = url.substr(1).match(reg)
|
||||
if (r != null) {
|
||||
return r[2]
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 判断是否在微信浏览器 true是
|
||||
*/
|
||||
function isWeiXinBrowser() {
|
||||
// #ifdef H5
|
||||
// window.navigator.userAgent属性包含了浏览器类型、版本、操作系统类型、浏览器引擎类型等信息,这个属性可以用来判断浏览器类型
|
||||
let ua = window.navigator.userAgent.toLowerCase()
|
||||
// 通过正则表达式匹配ua中是否含有MicroMessenger字符串
|
||||
if (ua.match(/MicroMessenger/i) == 'micromessenger') {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
// #endif
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* 金额相加
|
||||
* @param {Object} value1
|
||||
@@ -125,29 +72,9 @@ function moneySub(value1, value2) {
|
||||
}
|
||||
|
||||
|
||||
//设置手机通知栏字体颜色
|
||||
function setBarColor(black = false) {
|
||||
if (black) {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#000000',
|
||||
backgroundColor: '#FAFAFA'
|
||||
});
|
||||
} else {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#ffffff',
|
||||
backgroundColor: '#FAFAFA'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export {
|
||||
formatMoney,
|
||||
modelShow,
|
||||
isWeiXinBrowser,
|
||||
getQueryString,
|
||||
timeToDateObj,
|
||||
moneySum,
|
||||
moneySub,
|
||||
setBarColor
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
* @property {Boolean} value=showLoginTip - 由v-model控制显示隐藏。
|
||||
* @property {Boolean} forceOauth - 小程序端特制的全屏登录提示。
|
||||
*/
|
||||
import { mapMutations, mapActions, mapState } from 'vuex';
|
||||
import { mapState } from 'vuex';
|
||||
export default {
|
||||
name: 'coreshopLoginModal',
|
||||
components: {},
|
||||
|
||||
@@ -1,33 +1,57 @@
|
||||
<template>
|
||||
<view class='coreshop-index-article coreshop-margin-left-10 coreshop-margin-right-10 coreshop-margin-bottom-10 coreshop-margin-top-10 coreshop-bg-white' v-if="coreshopdata.parameters.list && count">
|
||||
<view class='coreshop-cell-item' v-for="item in coreshopdata.parameters.list" :key="item.id" @click="articleDetail(item.id)">
|
||||
<view class="coreshop-cell-item-bd">
|
||||
<view class="article-title ">
|
||||
{{ item.title }}
|
||||
|
||||
<view class="coreshop-padding-10 coreshop-margin-10 coreshop-bg-white coreshop-border-radius-trbl-18" v-if="count">
|
||||
<u-toast ref="uToast" />
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between coreshop-min-height-30">
|
||||
<view class="coreshop-font-16 coreshop-text-black coreshop-font-weight-bold">{{title}}</view>
|
||||
<u-icon name="arrow-right-double" size="12" label="查看更多" labelSize="12" labelPos="left" @click="articleDetail(id)"></u-icon>
|
||||
</view>
|
||||
<view class="coreshop-divider">
|
||||
<view class="complete"></view>
|
||||
</view>
|
||||
<view class="coreshop-margin-bottom-10 coreshop-bg-main coreshop-text-black coreshop-index-article">
|
||||
<view class='coreshop-cell-item'>
|
||||
<view class="coreshop-cell-item-bd">
|
||||
<view class="article-des u-line-5">
|
||||
{{ brief }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="article-des u-line-2">
|
||||
{{ item.brief }}
|
||||
<view class="cell-title-img">
|
||||
<image :src="coverImage" mode="aspectFill" class="coverImage"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cell-title-img">
|
||||
<image :src="item.coverImage" mode="aspectFill" class="coverImage"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "coreshoparticle",
|
||||
name: "coreshopArticle",
|
||||
props: {
|
||||
coreshopdata: {
|
||||
coreshopData: {
|
||||
// type: Array,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: "",
|
||||
brief: "",
|
||||
coverImage: "",
|
||||
id: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.coreshopData.parameters.list.length > 0) {
|
||||
this.title = this.coreshopData.parameters.list[0].title;
|
||||
this.brief = this.coreshopData.parameters.list[0].brief;
|
||||
this.coverImage = this.coreshopData.parameters.list[0].coverImage;
|
||||
this.id = this.coreshopData.parameters.list[0].id;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
count() {
|
||||
return (this.coreshopdata.parameters.list.length > 0)
|
||||
return (this.coreshopData.parameters.list.length > 0)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -40,14 +64,13 @@
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.coreshop-index-article { border-radius: 8px; padding: 0px 10px; background: #FFFFFF !important; color: #333333 !important; overflow: hidden;
|
||||
.coreshop-index-article { background: #FFFFFF !important; color: #333333 !important; overflow: hidden;
|
||||
.coreshop-cell-item { padding: 5px 0px 5px 0; float: left; width: 100%; border-bottom: 1px solid #f3f3f3;
|
||||
.coreshop-cell-item-bd { float: left; width: calc(100% - 100px);
|
||||
.article-title { font-size: 14px; color: #333; width: 100%; overflow: hidden; float: left; margin-bottom: 5px; }
|
||||
.article-des { font-size: 14px; color: #999; overflow: hidden; float: left; line-height: 20px; }
|
||||
}
|
||||
.cell-title-img { width: 80px; height: 80px; float: right;
|
||||
.coverImage { width: 80px; height: 80px; }
|
||||
.coverImage { width: 80px; height: 80px; border-radius: 2px; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,27 @@
|
||||
<template>
|
||||
<view class='coreshop-index-article coreshop-cell-group coreshop-margin-left-10 coreshop-margin-right-10 coreshop-margin-bottom-10 coreshop-margin-top-10 coreshop-bg-white' v-if="coreshopdata.parameters.list && count">
|
||||
<view class='coreshop-cell-item' v-for="item in coreshopdata.parameters.list" :key="item.id" @click="articleDetail(item.id)">
|
||||
<view class="coreshop-cell-item-bd">
|
||||
<view class="article-title">
|
||||
{{ item.title }}
|
||||
<view class="coreshop-padding-10 coreshop-margin-10 coreshop-bg-white coreshop-border-radius-trbl-18" v-if="count">
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between coreshop-min-height-30">
|
||||
<view class="coreshop-font-16 coreshop-text-black coreshop-font-weight-bold">{{coreshopData.parameters.articleClassifyObj.name}}</view>
|
||||
<u-icon name="arrow-right-double" size="12" label="查看更多" labelSize="12" labelPos="left" @click="goArticleClassify(coreshopData.parameters.articleClassifyObj.id)"></u-icon>
|
||||
</view>
|
||||
<view class="coreshop-divider">
|
||||
<view class="complete"></view>
|
||||
</view>
|
||||
<view class="coreshop-bg-main coreshop-text-black">
|
||||
<view class='coreshop-index-article coreshop-cell-group coreshop-margin-bottom-10 coreshop-margin-top-10 coreshop-bg-white' v-if="coreshopData.parameters.list && count">
|
||||
<view class='coreshop-cell-item' v-for="item in coreshopData.parameters.list" :key="item.id" @click="articleDetail(item.id)">
|
||||
<view class="coreshop-cell-item-bd">
|
||||
<view class="article-title">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
<view class="article-des u-line-2">
|
||||
{{ item.brief }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="cell-title-img">
|
||||
<image :src="item.coverImage" mode="aspectFill" class="coverImage"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="article-des u-line-2">
|
||||
{{ item.brief }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="cell-title-img">
|
||||
<image :src="item.coverImage" mode="aspectFill" class="coverImage"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -18,19 +29,19 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "coreshoparticleclassify",
|
||||
name: "coreshopArticleclassify",
|
||||
props: {
|
||||
coreshopdata: {
|
||||
coreshopData: {
|
||||
// type: Array,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
count() {
|
||||
if (!this.coreshopdata.parameters.list) {
|
||||
if (!this.coreshopData.parameters.list) {
|
||||
return false;
|
||||
}
|
||||
return (this.coreshopdata.parameters.list.length > 0)
|
||||
return (this.coreshopData.parameters.list.length > 0)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -43,14 +54,14 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.coreshop-index-article { border-radius: 8px; padding: 0px 10px; background: #FFFFFF !important; color: #333333 !important; overflow: hidden;
|
||||
.coreshop-cell-item { padding: 5px 0px 5px 0; float: left; width: 100%; border-bottom: 1px solid #f3f3f3;
|
||||
.coreshop-index-article { border-radius: 8px; background: #FFFFFF !important; color: #333333 !important; overflow: hidden;
|
||||
.coreshop-cell-item { padding: 8px 0px 8px 0; float: left; width: 100%; border-bottom: 1px solid #f3f3f3;
|
||||
.coreshop-cell-item-bd { float: left; display: flex; flex-direction: column;
|
||||
.article-title { font-size: 14px; color: #333; width: 100%; overflow: hidden; float: left; margin-bottom: 5px; }
|
||||
.article-des { font-size: 12px; color: #999; overflow: hidden; float: left; line-height: 20px; }
|
||||
}
|
||||
.cell-title-img { width: 80px; height: 80px; float: right;
|
||||
.coverImage { width: 80px; height: 80px; }
|
||||
.coverImage { width: 80px; height: 80px; border-radius: 2px; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<view class="coreshop-padding-10 coreshop-margin-left-10 coreshop-margin-right-10 coreshop-margin-bottom-10 coreshop-margin-top-10 coreshop-bg-white">
|
||||
<u-gap :height="coreshopdata.parameters.height * 2" :bg-color="coreshopdata.parameters.backgroundColor"></u-gap>
|
||||
<view>
|
||||
<u-gap :height="coreshopData.parameters.height * 2" :bg-color="coreshopData.parameters.backgroundColor"></u-gap>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "coreshopblank",
|
||||
name: "coreshopBlank",
|
||||
props: {
|
||||
coreshopdata: {
|
||||
coreshopData: {
|
||||
// type: Array,
|
||||
required: true,
|
||||
}
|
||||
@@ -17,7 +17,4 @@
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
</script>
|
||||
@@ -12,15 +12,6 @@
|
||||
content: {
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
created() { },
|
||||
methods: {
|
||||
preview(src, e) {
|
||||
// do something
|
||||
},
|
||||
navigate(href, e) {
|
||||
// do something
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,94 +1,71 @@
|
||||
<template>
|
||||
<!-- 首页优惠券卡片 -->
|
||||
<view class="coupon-box coreshop-margin-bottom-5 coreshop-padding-10" v-if="count">
|
||||
<!--提示框组件-->
|
||||
<view class="coreshop-padding-10 coreshop-margin-10 coreshop-bg-white coreshop-border-radius-trbl-18" v-if="count">
|
||||
<u-toast ref="uToast" />
|
||||
<view class="head-box coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between coreshop-margin-bottom-10">
|
||||
<view class="head-title u-ellipsis-1">领券专区</view>
|
||||
<u-icon name="arrow-right-double" size="12" label="查看更多" labelSize="12" labelPos="left" @tap="$u.route('/pages/coupon/coupon')"></u-icon>
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between coreshop-min-height-30">
|
||||
<view class="coreshop-font-16 coreshop-text-black coreshop-font-weight-bold">领券专区</view>
|
||||
<u-icon name="arrow-right-double" size="12" label="查看更多" labelSize="12" labelPos="left" @tap="$u.route('/pages/coupon/coupon')"></u-icon>
|
||||
</view>
|
||||
<scroll-view class="groupon-scroll" enable-flex scroll-anchoring scroll-x scroll-with-animation>
|
||||
<view class="groupon-card-wrap coreshop-flex coreshop-align-center">
|
||||
<view v-for="(item, index) in coreshopdata.parameters.list" :key="item.id">
|
||||
<!-- mini -->
|
||||
<!--<view class="coupon-card u-flex u-row-between u-m-r-16" v-if="couponType === 2" :style="{ background: `linear-gradient(to right, ${bgColor1}, ${bgColor2})` }">
|
||||
<view class="card-left u-flex-col u-row-center u-p-l-30">
|
||||
<view class="price coreshop-margin-bottom-10" :style="{ color: priceColor }">{{ item.amount }}</view>
|
||||
<view class="notice" :style="{ color: color }">满{{ item.enough }}元可用</view>
|
||||
<view class="notice coreshop-margin-bottom-10" :style="{ color: color }">仅剩{{ item.stock }}张</view>
|
||||
</view>
|
||||
<view class="card-right u-p-y-20 u-p-r-10 u-flex-col u-row-center u-col-center">
|
||||
<button class="u-reset-button get-btn coreshop-margin-bottom-10" :style="{ color: color }" @tap="getCoupon(item.id, index)">
|
||||
{{ item.status_code === 'cannot_get' ? '不可领取' : '领券购买' }}
|
||||
</button>
|
||||
</view>
|
||||
</view>-->
|
||||
<!-- big -->
|
||||
<view class="coreshop-padding-right-5">
|
||||
<view class="coupon-wrap " :style="{ background: `linear-gradient(to right, ${bgColor1}, ${bgColor2})` }">
|
||||
<view class="coupon-item coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between">
|
||||
<view class="coupon-left coreshop-flex coreshop-flex-direction">
|
||||
<view class="sum-box">
|
||||
<text class="unit" style="color: #6b3f12">¥</text>
|
||||
<!--<text class="sum " style="color: #6b3f12">{{ item.name }}</text>-->
|
||||
<text class="sub" style="color: #6b3f12">{{ item.name }}</text>
|
||||
<view class="coreshop-divider">
|
||||
<view class="complete"></view>
|
||||
</view>
|
||||
<view class="coreshop-margin-bottom-10 coreshop-bg-main coreshop-text-black">
|
||||
<scroll-view class="groupon-scroll" enable-flex scroll-anchoring scroll-x scroll-with-animation>
|
||||
<view class="groupon-card-wrap coreshop-flex coreshop-align-center">
|
||||
<view v-for="(item, index) in coreshopData.parameters.list" :key="item.id">
|
||||
<view class="coreshop-padding-right-5">
|
||||
<view class="coupon-wrap " :style="{ background: `linear-gradient(to right, ${bgColor1}, ${bgColor2})` }">
|
||||
<view class="coupon-item coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between">
|
||||
<view class="coupon-left coreshop-flex coreshop-flex-direction">
|
||||
<view class="sum-box">
|
||||
<text class="unit" style="color: #6b3f12">¥</text>
|
||||
<text class="sub" style="color: #6b3f12">{{ item.name }}</text>
|
||||
</view>
|
||||
<view class="notice " style="color: #9d6d25">
|
||||
<text v-for="(itemCondition, index) in item.conditions" :key="index">【{{itemCondition}}】</text>
|
||||
</view>
|
||||
<view class="notice" style="color: #9d6d25">
|
||||
有效期:{{$u.timeFormat(item.startTime, 'yyyy-mm-dd')}} 至 {{$u.timeFormat(item.endTime, 'yyyy-mm-dd')}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="notice " style="color: #9d6d25">
|
||||
<text v-for="(itemCondition, index) in item.conditions" :key="index">【{{itemCondition}}】</text>
|
||||
</view>
|
||||
<view class="notice" style="color: #9d6d25">
|
||||
有效期:{{$u.timeFormat(item.startTime, 'yyyy-mm-dd')}} 至 {{$u.timeFormat(item.endTime, 'yyyy-mm-dd')}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="coupon-right coreshop-flex coreshop-flex-direction">
|
||||
<button class="get-btn" :style="{ color: bgColor1 }" @tap.stop="receiveCoupon(item.id)">立即领取</button>
|
||||
<view class="surplus-num" style="color: #9d6d25">
|
||||
<text v-for="(itemResult, index) in item.results" :key="index">{{itemResult}}</text>
|
||||
<view class="coupon-right coreshop-flex coreshop-flex-direction">
|
||||
<button class="get-btn" :style="{ color: bgColor1 }" @tap.stop="receiveCoupon(item.id)">立即领取</button>
|
||||
<view class="surplus-num" style="color: #9d6d25">
|
||||
<text v-for="(itemResult, index) in item.results" :key="index">{{itemResult}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "coreshopcoupon",
|
||||
name: "coreshopCoupon",
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
coreshopdata: {
|
||||
// type: Array,
|
||||
coreshopData: {
|
||||
type: Object,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
count() {
|
||||
if (!this.coreshopdata) {
|
||||
if (!this.coreshopData) {
|
||||
return false;
|
||||
}
|
||||
if (!this.coreshopdata.parameters) {
|
||||
if (!this.coreshopData.parameters) {
|
||||
return false;
|
||||
}
|
||||
if (!this.coreshopdata.parameters.list) {
|
||||
if (!this.coreshopData.parameters.list) {
|
||||
return false;
|
||||
}
|
||||
return (this.coreshopdata.parameters.list.length > 0)
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
coupons: [
|
||||
{
|
||||
color: '#9F6DFA', ltBg: "#FFFFFF", height: '90px',
|
||||
unit: "¥", number: 5, txt: "满50元可用", title: "全场通用券", desc: "有效期至 2018-05-20",
|
||||
btn: "领取", drawed: "已抢2100张"
|
||||
}
|
||||
]
|
||||
return (this.coreshopData.parameters.list.length > 0)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -99,32 +76,6 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 失效
|
||||
.gray-wrap { filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1) !important; -webkit-filter: grayscale(100%) !important; -moz-filter: grayscale(100%) !important; -ms-filter: grayscale(100%) !important; -o-filter: grayscale(100%) !important; filter: grayscale(100%) !important; filter: gray !important; }
|
||||
.groupon-scroll { height: 100px;
|
||||
.groupon-card-wrap { height: 100px; }
|
||||
}
|
||||
.coupon-box { background-color: #fff;
|
||||
.head-box {
|
||||
.head-title { width: 150px; font-size: 16px; font-weight: bold; color: #333333; }
|
||||
.head-more {
|
||||
.more-text { font-size: 11px; font-weight: 500; color: #333333; }
|
||||
.more-icon { color: #333333; font-size: 12px; }
|
||||
}
|
||||
}
|
||||
.coupon-card { width: 171.5px; height: 100px; background: linear-gradient(90deg, #f8dca5, #efc480); border-radius: 5px; mask: url($apiFilesUrl+'/static/images/coupon/coupon_mini_bg.png'); -webkit-mask-box-image: url($apiFilesUrl+'/static/images/coupon/coupon_mini_bg.png'); mask-size: 100% 100%;
|
||||
.card-left { height: 100%; width: 130px;
|
||||
.price { color: #4f3a1e; font-size: 15px; font-weight: bold;
|
||||
&::before { content: '¥'; font-size: 10px; }
|
||||
}
|
||||
.notice { font-size: 11px; font-weight: 500; color: #a8700d; }
|
||||
}
|
||||
.card-right { height: 100%; width: 30px;
|
||||
.get-btn { font-size: 12px; font-weight: 500; text-align: right; color: #a8700d; writing-mode: vertical-lr; /*从左向右 从右向左是 writing-mode: vertical-rl;*/ writing-mode: tb-lr; /*IE浏览器的从左向右 从右向左是 writing-mode: tb-rl;*/ }
|
||||
}
|
||||
}
|
||||
}
|
||||
// 未领取,已领取
|
||||
.coupon-wrap { mask: url($apiFilesUrl+'/static/images/coupon/coupon_bg1.png'); -webkit-mask-box-image: url($apiFilesUrl+'/static/images/coupon/coupon_bg1.png'); mask-size: 100% 100%; position: relative; border-radius: 5px; width: 355px; height: 100px; background: linear-gradient(to right, $u-type-warning-disabled, $u-type-warning);
|
||||
.coupon-item { width: 100%; height: 100%; border-radius: 5px;
|
||||
.coupon-left { justify-content: center; padding-left: 10px; padding-right: 5px;
|
||||
|
||||
@@ -1,91 +1,135 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="coreshop-padding-10 coreshop-margin-10 coreshop-bg-white coreshop-border-radius-trbl-18">
|
||||
<u-tabs :list="nameList" :current="current" @change="onChange"></u-tabs>
|
||||
<view class="coreshop-divider">
|
||||
<view class="complete"></view>
|
||||
</view>
|
||||
|
||||
<u-tabs :list="nameList" :current="current" @change="change"></u-tabs>
|
||||
|
||||
<view v-for="(child,indexP) in newData.parameters.list" :key="indexP">
|
||||
<view class="goodsBox" v-show="child.isShow==true">
|
||||
<!-- 列表平铺两列三列 -->
|
||||
<view v-if="child.column == '2' || child.column == '3' " v-bind:class="'column'+child.column">
|
||||
<view class="" v-if="child.list">
|
||||
<u-grid :col="child.column" :border="false" align="left">
|
||||
<u-grid-item bg-color="transparent" :custom-style="{padding: '0rpx'}" v-for="(item, index) in child.list" :key="index" @click="goGoodsDetail(item.id)">
|
||||
<view class="good_box">
|
||||
<u--image :src="item.image" mode="widthFix" width="100%" :height="child.column==2?'164px':'104px'" radius="10"></u--image>
|
||||
<view class="good_title u-line-2">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="good-price coreshop-display-block">
|
||||
{{item.price}}元 <span class="coreshop-font-xs coreshop-text-through coreshop-margin-left-5 coreshop-text-gray">{{item.mktprice}}元</span>
|
||||
</view>
|
||||
<view class="good-tag-recommend" v-if="item.isRecommend">
|
||||
推荐
|
||||
</view>
|
||||
<view class="good-tag-hot" v-if="item.isHot">
|
||||
热门
|
||||
</view>
|
||||
</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
<view v-else-if="!count && !child.listAjax">
|
||||
<u-grid col="3" border="false" align="center">
|
||||
<u-grid-item bg-color="transparent" :custom-style="{padding: '0rpx'}" v-for="item in 3" :key="item" @click="goGoodsDetail(item.id)">
|
||||
<view class="good_box">
|
||||
<u--image src="/static/images/common/empty.png" mode="widthFix" width="100%" radius="10"></u--image>
|
||||
<view class="good_title u-line-2">
|
||||
无
|
||||
</view>
|
||||
<view class="good-price">
|
||||
0元
|
||||
</view>
|
||||
<view class="good-tag-recommend">
|
||||
推荐
|
||||
</view>
|
||||
<view class="good-tag-hot">
|
||||
热门
|
||||
</view>
|
||||
</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
<view class="coreshop-text-black">
|
||||
<custom-waterfalls-flow :value="newData.list" :column="newData.column" @wapperClick="wapperClick" @imageClick="imageClick" v-if="newData.column>1">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="goods coreshop-padding-bottom-10 coreshop-bg-main" v-for="(item,index) in newData.list" :key="index" slot="slot{{index}}">
|
||||
<view class="coreshop-padding-top-6 coreshop-padding-bottom-3 coreshop-padding-left-8 coreshop-padding-right-8 coreshop-bg-main coreshop-border-radius-bl-18">
|
||||
<view class="coreshop-multiple-line-clamp">
|
||||
<text class="coreshop-font-14">{{item.name}}</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-8 coreshop-flex coreshop-justify-between coreshop-align-center coreshop-margin-bottom-5">
|
||||
<view class="coreshop-text-red coreshop-font-weight-bold">
|
||||
<text class="coreshop-font-12">¥</text>
|
||||
<text class="coreshop-font-16">{{item.price}}</text>
|
||||
<span class="coreshop-font-xs coreshop-text-through coreshop-margin-left-6 coreshop-text-gray" v-if="newData.column==2">{{item.mktprice}}元</span>
|
||||
</view>
|
||||
<view>
|
||||
<text class="coreshop-font-10 coreshop-text-gray">{{item.buyCount+'人付款'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-divider" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.pointsDeduction > 0">
|
||||
<view class="complete"></view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-font-11 coreshop-margin-top-10 coreshop-margin-bottom-5" :class="newData.column>2?'coreshop-flex-direction-column':'coreshop-flex-direction-row'" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.pointsDeduction > 0">
|
||||
<view>
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price,item.pointsDeduction).toFixed(2)}} 元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5 coreshop-margin-bottom-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
<view>
|
||||
购买赠送:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{item.points}}{{ pointShowName}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 列表平铺单列 -->
|
||||
<view v-if="child.column == '1'">
|
||||
<view v-if="child.list">
|
||||
<u-grid :col="1" :border="false" align="left">
|
||||
<u-grid-item bg-color="transparent" :custom-style="{padding: '0rpx'}" v-for="item in child.list" :key="item.id" @click="goGoodsDetail(item.id)">
|
||||
<view class="good_box">
|
||||
<u-row gutter="5" justify="space-between">
|
||||
<u-col span="4">
|
||||
<u--image :src="item.image" mode="widthFix" width="100%" radius="10"></u--image>
|
||||
<view class="good-tag-recommend2" v-if="item.isRecommend">
|
||||
推荐
|
||||
</view>
|
||||
<view class="good-tag-hot" v-if="item.isHot">
|
||||
热门
|
||||
</view>
|
||||
</u-col>
|
||||
<u-col span="8">
|
||||
<view class="good_title-xl u-line-3 u-padding-10">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="good-price u-padding-10">
|
||||
{{item.price}}元 <span class="u-font-xs coreshop-text-through u-margin-left-15 coreshop-text-gray">{{item.mktprice}}元</span>
|
||||
</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<template v-slot:default="item">
|
||||
<view class="goods">
|
||||
<view class="coreshop-padding-top-6 coreshop-padding-bottom-3 coreshop-padding-left-8 coreshop-padding-right-8 coreshop-bg-white coreshop-border-radius-bl-18">
|
||||
<view class="coreshop-multiple-line-clamp">
|
||||
<text class="coreshop-font-14">{{item.name}}</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-8 coreshop-flex coreshop-justify-between coreshop-align-center coreshop-margin-bottom-5">
|
||||
<view class="coreshop-text-red coreshop-font-weight-bold">
|
||||
<text class="coreshop-font-12">¥</text>
|
||||
<text class="coreshop-font-16">{{item.price}}</text>
|
||||
<span class="coreshop-font-xs coreshop-text-through coreshop-margin-left-6 coreshop-text-gray" v-if="newData.column==2">{{item.mktprice}}元</span>
|
||||
</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
<view>
|
||||
<text class="coreshop-font-10 coreshop-text-gray">{{item.buyCount+'人付款'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-divider" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.pointsDeduction > 0">
|
||||
<view class="complete"></view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-font-11 coreshop-margin-top-10 coreshop-margin-bottom-5" :class="newData.column>2?'coreshop-flex-direction-column':'coreshop-flex-direction-row'" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.pointsDeduction > 0">
|
||||
<view>
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price,item.pointsDeduction).toFixed(2)}} 元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5 coreshop-margin-bottom-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
<view>
|
||||
购买赠送:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{item.points}}{{ pointShowName}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-none" v-else>
|
||||
<u-empty :icon="$globalConstVars.apiFilesUrl+'/static/images/empty/order.png'" icon-size="150" text="暂无" mode="list"></u-empty>
|
||||
</template>
|
||||
<!-- #endif -->
|
||||
</custom-waterfalls-flow>
|
||||
|
||||
<view class="coreshop-text-black" v-for="(item, index) in newData.list" :key="item.id" v-if="newData.column==1">
|
||||
<view class="coreshop-flex coreshop-justify-start coreshop-padding-top-10 coreshop-padding-bottom-10" v-if="newData.list.length">
|
||||
<view>
|
||||
<u--image :src="item.image" mode="widthFix" width="130px" height="130px" radius="8"></u--image>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction coreshop-padding-left-10">
|
||||
<view class="coreshop-font-14 u-line-2 coreshop-text-black">{{ item.name }}</view>
|
||||
<view class="coreshop-font-11 coreshop-padding-top-5 coreshop-padding-bottom-3 u-line-2 coreshop-text-brown">{{ item.brief }}</view>
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-padding-top-10 coreshop-padding-bottom-10">
|
||||
<view class="coreshop-font-11 coreshop-bg-orange coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10">已售{{item.buyCount}}{{item.unit}}</view>
|
||||
<view class="coreshop-font-11 coreshop-bg-olive coreshop-padding-2 coreshop-border-radius-4">{{item.viewCount}}人访问</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-flex-direction-row coreshop-align-center">
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<view class="coreshop-font-14 coreshop-text-red">¥{{ item.price }}</view>
|
||||
<view class="coreshop-font-12 coreshop-text-gray coreshop-text-through">¥{{ item.mktprice }}</view>
|
||||
</view>
|
||||
<view class="coreshop-buy-btn" @tap="goPinTuanDetail(item.id,item.pinTuanRule.id)">立即购</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.pointsDeduction > 0">
|
||||
<view>
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price,item.pointsDeduction).toFixed(2)}} 元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
<view>
|
||||
购买赠送:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{item.points}}{{ pointShowName}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-none" v-else>
|
||||
<u-empty :icon="$globalConstVars.apiFilesUrl+'/static/images/empty/order.png'" icon-size="150" text="暂无" mode="list"></u-empty>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -98,41 +142,55 @@
|
||||
newData: {}
|
||||
};
|
||||
},
|
||||
name: "coreshopgoodTabBar",
|
||||
name: "coreshopGoodTabBar",
|
||||
props: {
|
||||
coreshopdata: {
|
||||
coreshopData: {
|
||||
// type: Array,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
var _this = this;
|
||||
this.newData = this.coreshopdata;
|
||||
for (var i = 0; i < this.newData.parameters.list.length; i++) {
|
||||
this.newData = this.coreshopData;
|
||||
for (var i = 0; i < this.coreshopData.parameters.list.length; i++) {
|
||||
let item = {
|
||||
name: this.newData.parameters.list[i].title
|
||||
name: this.coreshopData.parameters.list[i].title
|
||||
}
|
||||
this.nameList.push(item);
|
||||
|
||||
if (_this.current == i) {
|
||||
_this.newData.parameters.list[i].isShow = true;
|
||||
} else {
|
||||
_this.newData.parameters.list[i].isShow = false;
|
||||
_this.newData = this.coreshopData.parameters.list[i];
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
pointSwitch() { return this.$store.state.config.pointSwitch },
|
||||
pointShowExchangePrice() { return this.$store.state.config.pointShowExchangePrice },
|
||||
pointDiscountedProportion() { return this.$store.state.config.pointDiscountedProportion },
|
||||
pointExchangeModel() { return this.$store.state.config.pointExchangeModel },
|
||||
pointShowName() { return this.$store.state.config.pointShowName },
|
||||
pointGetModel() { return this.$store.state.config.pointGetModel },
|
||||
pointShowPoint() { return this.$store.state.config.pointShowPoint },
|
||||
},
|
||||
methods: {
|
||||
change(item) {
|
||||
wapperClick(item) {
|
||||
this.goGoodsDetail(item.id)
|
||||
},
|
||||
imageClick(item) {
|
||||
this.goGoodsDetail(item.id)
|
||||
},
|
||||
onChange(item) {
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
});
|
||||
var _this = this;
|
||||
this.current = item.index;
|
||||
for (var i = 0; i < _this.newData.parameters.list.length; i++) {
|
||||
for (var i = 0; i < _this.coreshopData.parameters.list.length; i++) {
|
||||
if (_this.current == i) {
|
||||
_this.newData.parameters.list[i].isShow = true;
|
||||
} else {
|
||||
_this.newData.parameters.list[i].isShow = false;
|
||||
_this.newData = this.coreshopData.parameters.list[i];
|
||||
setTimeout(function () {
|
||||
uni.hideLoading();
|
||||
}, 300);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -156,4 +214,5 @@
|
||||
.indicator-dots-active { background-color: $u-type-primary; }
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
<template>
|
||||
|
||||
<view class="goodsBox coreshop-margin-bottom-10 coreshop-padding-top-5">
|
||||
<view>
|
||||
<!-- 列表平铺两列三列 -->
|
||||
<view v-if="coreshopdata.parameters.column == '2' && coreshopdata.parameters.display == 'list' || coreshopdata.parameters.column == '3' && coreshopdata.parameters.display == 'list'" v-bind:class="'column'+coreshopdata.parameters.column">
|
||||
<view class="coreshop-margin-left-5 coreshop-margin-right-5 coreshop-margin-top-10 coreshop-margin-bottom-10 " v-if="coreshopdata.parameters.lookTitle == 'true'">
|
||||
<coreshop-section font-size="15" :title="coreshopdata.parameters.title" v-if="coreshopdata.parameters.title != '' && coreshopdata.parameters.lookTitle == 'true'" @click="coreshopdata.parameters.lookMore == 'true' ? goGoodsList({catId: coreshopdata.parameters.classifyId,brandId:coreshopdata.parameters.brandId}) :''" :arrow="coreshopdata.parameters.lookMore == 'true'" :sub-title="coreshopdata.parameters.lookMore == 'true'?'更多':''"></coreshop-section>
|
||||
<view class="coreshop-padding-10 coreshop-margin-10 coreshop-bg-white coreshop-border-radius-trbl-18" v-if="coreshopData.parameters.column == '2' && coreshopData.parameters.display == 'list' || coreshopData.parameters.column == '3' && coreshopData.parameters.display == 'list'">
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between coreshop-min-height-30" v-if="coreshopData.parameters.lookTitle == 'true'">
|
||||
<view class="coreshop-font-16 coreshop-text-black coreshop-font-weight-bold">{{coreshopData.parameters.title}}</view>
|
||||
<u-icon name="arrow-right-double" size="12" label="查看更多" labelSize="12" labelPos="left" v-if="coreshopData.parameters.lookMore == 'true'" @click="goGoodsList({catId: coreshopData.parameters.classifyId,brandId:coreshopData.parameters.brandId})"></u-icon>
|
||||
</view>
|
||||
<view class=" coreshop-margin-bottom-10 coreshop-margin-top-10" v-if="count">
|
||||
<custom-waterfalls-flow :value="coreshopdata.parameters.list" :column="coreshopdata.parameters.column" @wapperClick="wapperClick" @imageClick="imageClick">
|
||||
<view class="coreshop-divider">
|
||||
<view class="complete"></view>
|
||||
</view>
|
||||
<view class="coreshop-text-black">
|
||||
<custom-waterfalls-flow :value="coreshopData.parameters.list" :column="coreshopData.parameters.column" @wapperClick="wapperClick" @imageClick="imageClick">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="goods" v-for="(item,index) in coreshopdata.parameters.list" :key="index" slot="slot{{index}}">
|
||||
<view class="coreshop-padding-top-6 coreshop-padding-bottom-3 coreshop-padding-left-8 coreshop-padding-right-8 coreshop-bg-white coreshop-border-radius-bl-18">
|
||||
<view class="goods coreshop-padding-bottom-10 coreshop-bg-main" v-for="(item,index) in coreshopData.parameters.list" :key="index" slot="slot{{index}}">
|
||||
<view class="coreshop-padding-top-6 coreshop-padding-bottom-3 coreshop-padding-left-8 coreshop-padding-right-8 coreshop-bg-main coreshop-border-radius-bl-18">
|
||||
<view class="coreshop-multiple-line-clamp">
|
||||
<text class="coreshop-font-14">{{item.name}}</text>
|
||||
</view>
|
||||
@@ -18,18 +21,21 @@
|
||||
<view class="coreshop-text-red coreshop-font-weight-bold">
|
||||
<text class="coreshop-font-12">¥</text>
|
||||
<text class="coreshop-font-16">{{item.price}}</text>
|
||||
<span class="coreshop-font-xs coreshop-text-through coreshop-margin-left-6 coreshop-text-gray" v-if="coreshopdata.parameters.column==2">{{item.mktprice}}元</span>
|
||||
<span class="coreshop-font-xs coreshop-text-through coreshop-margin-left-6 coreshop-text-gray" v-if="coreshopData.parameters.column==2">{{item.mktprice}}元</span>
|
||||
</view>
|
||||
<view>
|
||||
<text class="coreshop-font-10 coreshop-text-gray">{{item.buyCount+'人付款'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-font-11 coreshop-margin-top-10 coreshop-padding-top-10 coreshop-solid-top coreshop-margin-bottom-5" :class="coreshopdata.parameters.column>2?'coreshop-flex-direction-column':'coreshop-flex-direction-row'" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.pointsDeduction > 0">
|
||||
<view class="coreshop-divider" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.pointsDeduction > 0">
|
||||
<view class="complete"></view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-font-11 coreshop-margin-top-10 coreshop-margin-bottom-5" :class="coreshopData.parameters.column>2?'coreshop-flex-direction-column':'coreshop-flex-direction-row'" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.pointsDeduction > 0">
|
||||
<view>
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ $common.formatMoney(item.price - item.pointsDeduction, 2, '')}}元
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price,item.pointsDeduction).toFixed(2)}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5 coreshop-margin-bottom-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
@@ -54,18 +60,21 @@
|
||||
<view class="coreshop-text-red coreshop-font-weight-bold">
|
||||
<text class="coreshop-font-12">¥</text>
|
||||
<text class="coreshop-font-16">{{item.price}}</text>
|
||||
<span class="coreshop-font-xs coreshop-text-through coreshop-margin-left-6 coreshop-text-gray" v-if="coreshopdata.parameters.column==2">{{item.mktprice}}元</span>
|
||||
<span class="coreshop-font-xs coreshop-text-through coreshop-margin-left-6 coreshop-text-gray" v-if="coreshopData.parameters.column==2">{{item.mktprice}}元</span>
|
||||
</view>
|
||||
<view>
|
||||
<text class="coreshop-font-10 coreshop-text-gray">{{item.buyCount+'人付款'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-font-11 coreshop-margin-top-10 coreshop-padding-top-10 coreshop-solid-top coreshop-margin-bottom-5" :class="coreshopdata.parameters.column>2?'coreshop-flex-direction-column':'coreshop-flex-direction-row'" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.pointsDeduction > 0">
|
||||
<view class="coreshop-divider" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.pointsDeduction > 0">
|
||||
<view class="complete"></view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-font-11 coreshop-margin-top-10 coreshop-margin-bottom-5" :class="coreshopData.parameters.column>2?'coreshop-flex-direction-column':'coreshop-flex-direction-row'" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.pointsDeduction > 0">
|
||||
<view>
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ $common.formatMoney(item.price - item.pointsDeduction, 2, '')}}元
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price,item.pointsDeduction).toFixed(2)}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5 coreshop-margin-bottom-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
@@ -81,54 +90,55 @@
|
||||
</template>
|
||||
<!-- #endif -->
|
||||
</custom-waterfalls-flow>
|
||||
|
||||
|
||||
</view>
|
||||
<view v-else-if="!count && !coreshopdata.parameters.listAjax">
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 列表平铺单列 -->
|
||||
<view v-if="coreshopdata.parameters.column == '1' && coreshopdata.parameters.display == 'list'">
|
||||
<view class="coreshop-margin-left-5 coreshop-margin-right-5 coreshop-margin-top-10 coreshop-margin-bottom-10 ">
|
||||
<coreshop-section font-size="15" :title="coreshopdata.parameters.title" v-if="coreshopdata.parameters.title != '' && coreshopdata.parameters.lookTitle == 'true'" @click="coreshopdata.parameters.lookMore == 'true' ? goGoodsList({catId: coreshopdata.parameters.classifyId,brandId:coreshopdata.parameters.brandId}) :''" :arrow="coreshopdata.parameters.lookMore == 'true'" :sub-title="coreshopdata.parameters.lookMore == 'true'?'更多':''"></coreshop-section>
|
||||
<view class="coreshop-padding-10 coreshop-margin-10 coreshop-bg-white coreshop-border-radius-trbl-18" v-if="coreshopData.parameters.column == '1' && coreshopData.parameters.display == 'list'">
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between coreshop-min-height-30" v-if="coreshopData.parameters.lookTitle == 'true'">
|
||||
<view class="coreshop-font-16 coreshop-text-black coreshop-font-weight-bold">{{coreshopData.parameters.title}}</view>
|
||||
<u-icon name="arrow-right-double" size="12" label="查看更多" labelSize="12" labelPos="left" v-if="coreshopData.parameters.lookMore == 'true'" @click="goGoodsList({catId: coreshopData.parameters.classifyId,brandId:coreshopData.parameters.brandId})"></u-icon>
|
||||
</view>
|
||||
<view v-if="count">
|
||||
<u-grid :col="1" :border="false" align="left">
|
||||
<u-grid-item :custom-style="{padding: '0px'}" v-for="item in coreshopdata.parameters.list" :key="item.id">
|
||||
<view class="good_box" @click="goGoodsDetail(item.id)">
|
||||
<u--image :src="item.image" width="100%" radius="10"></u--image>
|
||||
<view class="good_title u-line-2">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="good-price coreshop-display-block">
|
||||
{{item.price}}元 <span class="coreshop-font-xs coreshop-text-through coreshop-margin-left-5 coreshop-text-gray">{{item.mktprice}}元</span>
|
||||
</view>
|
||||
<view class="good-tag-recommend" v-if="item.isRecommend">
|
||||
推荐
|
||||
</view>
|
||||
<view class="good-tag-hot" v-if="item.isHot">
|
||||
热门
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.pointsDeduction > 0">
|
||||
<view>
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ item.price - item.pointsDeduction}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
<view>
|
||||
购买赠送:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{item.points}}{{ pointShowName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-divider">
|
||||
<view class="complete"></view>
|
||||
</view>
|
||||
<view class="coreshop-text-black" v-for="(item, index) in coreshopData.parameters.list" :key="item.id" v-if="count">
|
||||
<view class="coreshop-flex coreshop-justify-start coreshop-padding-top-10 coreshop-padding-bottom-10">
|
||||
<view>
|
||||
<u--image :src="item.image" mode="widthFix" width="130px" height="130px" radius="8"></u--image>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction coreshop-padding-left-10 coreshop-percent-100">
|
||||
<view class="coreshop-font-14 u-line-2 coreshop-text-black">{{ item.name }}</view>
|
||||
<view class="coreshop-font-11 coreshop-padding-top-5 coreshop-padding-bottom-3 u-line-2 coreshop-text-brown">{{ item.brief }}</view>
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-padding-top-10 coreshop-padding-bottom-10">
|
||||
<view class="coreshop-font-11 coreshop-bg-orange coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10">已售{{item.buyCount}}{{item.unit}}</view>
|
||||
<view class="coreshop-font-11 coreshop-bg-olive coreshop-padding-2 coreshop-border-radius-4">{{item.viewCount}}人访问</view>
|
||||
</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-flex-direction-row coreshop-align-center">
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<view class="coreshop-font-14 coreshop-text-red">¥{{ item.price }}</view>
|
||||
<view class="coreshop-font-12 coreshop-text-gray coreshop-text-through">¥{{ item.mktprice }}</view>
|
||||
</view>
|
||||
<view class="coreshop-buy-btn" @tap="goGoodsDetail(item.id)">马上抢</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.pointsDeduction > 0">
|
||||
<view>
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price,item.pointsDeduction).toFixed(2)}} 元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
<view>
|
||||
购买赠送:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{item.points}}{{ pointShowName}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-none" v-else>
|
||||
<u-empty :icon="$globalConstVars.apiFilesUrl+'/static/images/empty/order.png'" icon-size="150" text="暂无" mode="list"></u-empty>
|
||||
@@ -136,18 +146,21 @@
|
||||
</view>
|
||||
|
||||
<!-- 横向滚动 -->
|
||||
<block v-if="coreshopdata.parameters.display == 'slide'"
|
||||
v-bind:class="'slide'+coreshopdata.parameters.column">
|
||||
<view class="coreshop-margin-left-15 coreshop-margin-right-15 coreshop-margin-top-15 coreshop-margin-bottom-15" v-if="coreshopdata.parameters.lookTitle == 'true'">
|
||||
<coreshop-section font-size="15" :title="coreshopdata.parameters.title" v-if="coreshopdata.parameters.title != '' && coreshopdata.parameters.lookTitle == 'true'" @click="coreshopdata.parameters.lookMore == 'true' ? goGoodsList({catId: coreshopdata.parameters.classifyId,brandId:coreshopdata.parameters.brandId}) :''" :arrow="coreshopdata.parameters.lookMore == 'true'" :sub-title="coreshopdata.parameters.lookMore == 'true'?'更多':''"></coreshop-section>
|
||||
<view class="coreshop-padding-10 coreshop-margin-10 coreshop-bg-white coreshop-border-radius-trbl-18" v-if="coreshopData.parameters.display == 'slide'">
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between coreshop-min-height-30" v-if="coreshopData.parameters.lookTitle == 'true'">
|
||||
<view class="coreshop-font-16 coreshop-text-black coreshop-font-weight-bold">{{coreshopData.parameters.title}}</view>
|
||||
<u-icon name="arrow-right-double" size="12" label="查看更多" labelSize="12" labelPos="left" v-if="coreshopData.parameters.lookMore == 'true'" @click="goGoodsList({catId: coreshopData.parameters.classifyId,brandId:coreshopData.parameters.brandId})"></u-icon>
|
||||
</view>
|
||||
<block v-if="count">
|
||||
<swiper :class="coreshopdata.parameters.column==3?'swiper3':coreshopdata.parameters.column==2?'swiper2':''" @change="change">
|
||||
<view class="coreshop-divider">
|
||||
<view class="complete"></view>
|
||||
</view>
|
||||
<view v-if="count">
|
||||
<swiper :class="coreshopData.parameters.column==3?'swiper3':coreshopData.parameters.column==2?'swiper2':''" @change="change">
|
||||
<swiper-item v-for="no of pageCount" :key="no">
|
||||
<u-grid :col="coreshopdata.parameters.column" :border="false" align="left" :data-id="no">
|
||||
<u-grid-item v-for="(item, index) in coreshopdata.parameters.list" v-if="index >=coreshopdata.parameters.column*no && index <coreshopdata.parameters.column*(no+1)" :key="index" @click="goGoodsDetail(item.id)">
|
||||
<u-grid :col="coreshopData.parameters.column" :border="false" align="left" :data-id="no">
|
||||
<u-grid-item v-for="(item, index) in coreshopData.parameters.list" v-if="index >=coreshopData.parameters.column*no && index <coreshopData.parameters.column*(no+1)" :key="index" @click="goGoodsDetail(item.id)">
|
||||
<view class="good_box">
|
||||
<u-image :src="item.image" :index="item.id" mode="widthFit" width="100%" :height="coreshopdata.parameters.column==3?'104px':coreshopdata.parameters.column==2?'164px':'104px'" radius="10">
|
||||
<u-image :src="item.image" :index="item.id" mode="widthFit" width="100%" :height="coreshopData.parameters.column==3?'104px':coreshopData.parameters.column==2?'164px':'104px'" radius="10">
|
||||
</u-image>
|
||||
<view class="good_title u-line-2">
|
||||
{{item.name}}
|
||||
@@ -166,7 +179,7 @@
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ item.price - item.pointsDeduction}}元
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price,item.pointsDeduction).toFixed(2)}} 元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
@@ -186,12 +199,15 @@
|
||||
<view class="indicator-dots-item" v-for="no of pageCount" :key="no" :class="[current == no ? 'indicator-dots-active' : '']">
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view v-else="">
|
||||
<scroll-view class='swiper-list' scroll-x="true"></scroll-view>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -204,20 +220,9 @@
|
||||
count: false
|
||||
};
|
||||
},
|
||||
filters: {
|
||||
substr(val) {
|
||||
if (val.length == 0 || val == undefined) {
|
||||
return false;
|
||||
} else if (val.length > 13) {
|
||||
return val.substring(0, 13) + "...";
|
||||
} else {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
},
|
||||
name: "coreshopgoods",
|
||||
name: "coreshopGoods",
|
||||
props: {
|
||||
coreshopdata: {
|
||||
coreshopData: {
|
||||
// type: Array,
|
||||
required: true,
|
||||
}
|
||||
@@ -243,9 +248,9 @@
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.count = this.coreshopdata.parameters.list.length > 0;
|
||||
var page = Number(this.coreshopdata.parameters.list.length / this.coreshopdata.parameters.column).toFixed(0);
|
||||
if (this.coreshopdata.parameters.column * page < this.coreshopdata.parameters.list.length) {
|
||||
this.count = this.coreshopData.parameters.list.length > 0;
|
||||
var page = Number(this.coreshopData.parameters.list.length / this.coreshopData.parameters.column).toFixed(0);
|
||||
if (this.coreshopData.parameters.column * page < this.coreshopData.parameters.list.length) {
|
||||
page = Number(page) + 1;
|
||||
}
|
||||
for (var i = 0; i < page; i++) {
|
||||
@@ -256,20 +261,17 @@
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.goodsBox { color: #333333 !important; padding: 0 5px; overflow: hidden;
|
||||
.good_box { border-radius: 8px; margin: 3px; background-color: #ffffff; padding: 5px; position: relative; width: 100%;
|
||||
.good_title { font-size: 13px; margin-top: 5px; color: $u-main-color; }
|
||||
.good_title-xl { font-size: 14px; margin-top: 5px; color: $u-main-color; }
|
||||
.good-tag-hot { display: flex; margin-top: 5px; position: absolute; top: 7.5px; left: 7.5px; background-color: $u-type-error; color: #FFFFFF; display: flex; align-items: center; padding: 2px 7px; border-radius: 25px; font-size: 10px; line-height: 1; }
|
||||
.good-tag-recommend { display: flex; margin-top: 5px; position: absolute; top: 7.5px; right: 7.5px; background-color: $u-type-primary; color: #FFFFFF; margin-left: 10px; border-radius: 25px; line-height: 1; padding: 2px 7px; display: flex; align-items: center; border-radius: 25px; font-size: 10px; }
|
||||
.good-tag-recommend2 { display: flex; margin-top: 5px; position: absolute; bottom: 7.5px; left: 7.5px; background-color: $u-type-primary; color: #FFFFFF; border-radius: 25px; line-height: 1; padding: 2px 7px; display: flex; align-items: center; border-radius: 25px; font-size: 10px; }
|
||||
.good-price { font-size: 15px; color: $u-type-error; margin-top: 5px; }
|
||||
}
|
||||
.good_box { border-radius: 8px; background-color: #ffffff; padding: 5px; position: relative; width: 100%;
|
||||
.good_title { font-size: 14px; margin-top: 5px; color: $u-main-color; }
|
||||
.good-tag-hot { display: flex; margin-top: 5px; position: absolute; top: 7.5px; left: 7.5px; background-color: $u-type-error; color: #FFFFFF; display: flex; align-items: center; padding: 2px 7px; border-radius: 25px; font-size: 10px; line-height: 1; }
|
||||
.good-tag-recommend { display: flex; margin-top: 5px; position: absolute; top: 7.5px; right: 7.5px; background-color: $u-type-primary; color: #FFFFFF; margin-left: 10px; border-radius: 25px; line-height: 1; padding: 2px 7px; display: flex; align-items: center; border-radius: 25px; font-size: 10px; }
|
||||
.good-tag-recommend2 { display: flex; margin-top: 5px; position: absolute; bottom: 7.5px; left: 7.5px; background-color: $u-type-primary; color: #FFFFFF; border-radius: 25px; line-height: 1; padding: 2px 7px; display: flex; align-items: center; border-radius: 25px; font-size: 10px; }
|
||||
.good-price { font-size: 15px; color: $u-type-error; margin-top: 5px; }
|
||||
}
|
||||
|
||||
.indicator-dots { margin-top: 10px; margin-bottom: 10px; display: flex; justify-content: center; align-items: center; flex-direction: row;
|
||||
.indicator-dots-item { background-color: $u-tips-color; height: 6px; width: 6px; border-radius: 10px; margin: 0 3px; }
|
||||
.indicator-dots-active { background-color: $u-type-primary; }
|
||||
}
|
||||
.indicator-dots { margin-top: 10px; margin-bottom: 10px; display: flex; justify-content: center; align-items: center; flex-direction: row;
|
||||
.indicator-dots-item { background-color: $u-tips-color; height: 6px; width: 6px; border-radius: 10px; margin: 0 3px; }
|
||||
.indicator-dots-active { background-color: $u-type-primary; }
|
||||
}
|
||||
.swiper3 { height: 200px; }
|
||||
.swiper2 { height: 270px; }
|
||||
|
||||
@@ -1,75 +1,132 @@
|
||||
<template>
|
||||
<!-- 团购秒杀 -->
|
||||
<view v-if="count">
|
||||
<view class="coreshop-margin-left-10 coreshop-margin-right-10 coreshop-margin-top-10 coreshop-margin-bottom-10">
|
||||
<coreshop-section font-size="15" :title="coreshopdata.parameters.title" @click="goSeckillList()"></coreshop-section>
|
||||
<view class="coreshop-padding-10 coreshop-margin-10 coreshop-bg-white coreshop-border-radius-trbl-18" v-if="listData && count">
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between coreshop-min-height-30">
|
||||
<view class="coreshop-font-16 coreshop-text-black coreshop-font-weight-bold">{{coreshopData.parameters.title}}</view>
|
||||
<u-icon name="arrow-right-double" size="12" label="查看更多" labelSize="12" labelPos="left" @tap="goGroupPurchase()"></u-icon>
|
||||
</view>
|
||||
<view class="coreshop-margin-left-15 coreshop-margin-right-15" v-if="coreshopdata.parameters.list && count">
|
||||
<view class="img-list-item" v-if="item.id !== 'undefined' && item.id" v-for="(item, key) in coreshopdata.parameters.list" :key="key" @click="goSeckillDetail(item.goods.id, item.goods.groupId)">
|
||||
<view class="img-list-item-l">
|
||||
<u-image :src="item.goods.image" :index="item.id" :showLoading="true" width="100%" height="96px"></u-image>
|
||||
<view class="coreshop-divider">
|
||||
<view class="complete"></view>
|
||||
</view>
|
||||
<view class="coreshop-flex-direction-row coreshop-margin-bottom-10 coreshop-text-black" v-for="(item, key) in listData" :key="key">
|
||||
<view class="coreshop-flex coreshop-justify-start">
|
||||
<view>
|
||||
<u--image :src="item.goods.image" mode="widthFix" width="96px" height="96px" radius="8"></u--image>
|
||||
</view>
|
||||
<view class="img-list-item-r">
|
||||
<view class="coreshop-font-18 u-line-1">{{item.name}}</view>
|
||||
<view class="u-line-2 coreshop-margin-top-5 coreshop-margin-bottom-5">{{item.goods.name}}</view>
|
||||
<view class="item-c coreshop-flex coreshop-justify-between">
|
||||
<view class="red-price coreshop-justify-between">
|
||||
¥{{item.goods.product.price}}
|
||||
<span class="coreshop-font-xs coreshop-text-through coreshop-margin-left-5">{{item.goods.product.mktprice}}元</span>
|
||||
<view class="coreshop-flex coreshop-flex-direction coreshop-padding-left-10 coreshop-percent-100">
|
||||
<view class="coreshop-font-15 u-line-2 coreshop-text-black">{{ item.name }}</view>
|
||||
<view class="coreshop-font-11 coreshop-padding-top-5 coreshop-padding-bottom-3 u-line-2 coreshop-text-brown">{{ item.goods.name }}</view>
|
||||
<!--<view class="coreshop-flex coreshop-align-center coreshop-padding-top-10 coreshop-padding-bottom-5">
|
||||
<view class="coreshop-font-11 coreshop-bg-orange coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10" v-if="item.maxBuyNumber>0">限购{{item.maxBuyNumber}}</view>
|
||||
<view class="coreshop-font-11 coreshop-bg-green coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10" v-if="item.maxBuyNumber==0">不限购</view>
|
||||
<view class="coreshop-font-11 coreshop-bg-olive coreshop-padding-2 coreshop-border-radius-4">{{item.ticketNumber}}张券</view>
|
||||
</view>-->
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-flex-direction-row coreshop-align-center" v-if="(item.startStatus == 1) && item.lastTime">
|
||||
<view class="coreshop-text-right coreshop-time-right coreshop-margin-top-10" v-if="(item.startStatus == 1) && item.lastTime">
|
||||
<u-count-down :time="item.lastTime*1000" :autoStart="true" format="DD天HH时mm秒ss" @change="onChange($event,key)">
|
||||
<view class="time coreshop-font-11">
|
||||
<view class="coreshop-font-12">仅剩:</view>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.days }}</text>
|
||||
</view>
|
||||
<text class="time__doc">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.hours >= 10 ? item.timeData.hours :'0' +item.timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.minutes }}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.seconds }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-justify-between">
|
||||
<view class="red-price coreshop-font-15 coreshop-flex-direction-row" v-if="(item.startStatus == 1) && item.lastTime">
|
||||
<u-count-down :time="item.lastTime" format="HH:mm:ss"></u-count-down>
|
||||
</view>
|
||||
<view class="coreshop-font-12 red-price" v-if="item.startStatus == 3">已结束</view>
|
||||
<view class="coreshop-font-12 red-price" v-if="item.startStatus == 2">即将开始</view>
|
||||
<u-icon name="shopping-cart" color="#2979ff" size="25" class="btnCart"></u-icon>
|
||||
<view class="coreshop-text-right coreshop-time-right coreshop-margin-top-10" v-if="(item.startStatus == 2) && item.lastTime">
|
||||
<u-count-down :time="item.lastTime*1000" :autoStart="true" format="DD天HH时mm秒ss" @change="onChange($event,key)">
|
||||
<view class="time">
|
||||
<view class="coreshop-font-12">即将开始:</view>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.days }}</text>
|
||||
</view>
|
||||
<text class="time__doc">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.hours>=10?item.timeData.hours:'0'+item.timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.minutes }}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.seconds }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-flex-direction-row coreshop-align-center coreshop-margin-top-10">
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<view class="coreshop-font-14 coreshop-text-red">¥{{item.goods.product.price}}</view>
|
||||
<view class="coreshop-font-xs coreshop-text-through coreshop-margin-left-5">{{item.goods.product.mktprice}}元</view>
|
||||
</view>
|
||||
<view class="coreshop-groupPurchase-btn" v-if="item.startStatus == 1" @click="goGroupBuyingDetail(item.id)">立即团</view>
|
||||
<view class="coreshop-groupPurchase-btn" v-if="item.startStatus == 0">即将开始</view>
|
||||
<view class="coreshop-buy-btn-disabled" v-if="item.startStatus == 2">已结束</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="img-list-item" v-if="!item.id" v-for="(item, key) in coreshopdata.parameters.list" :key="key">
|
||||
<image class="img-list-item-l" :src="item.image== '/images/empty-banner.png'? '/static/images/common/empty-banner.png':item.image" mode='aspectFill'></image>
|
||||
<view class="img-list-item-r">
|
||||
<view class="goods-name list-goods-name">{{item.name}}</view>
|
||||
<view class="item-c">
|
||||
<view class=" red-price">{{item.price}}</view>
|
||||
</view>
|
||||
<view v-if="key+1 < listData.length">
|
||||
<view class="coreshop-divider">
|
||||
<view class="groupPurchase"></view>
|
||||
<view class="dot">●</view>
|
||||
<view class="groupPurchase"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "coreshopgrouppurchase",
|
||||
name: "coreshopGroupPurchase",
|
||||
props: {
|
||||
coreshopdata: {
|
||||
coreshopData: {
|
||||
// type: Array,
|
||||
required: false,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
listData: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.listData = uni.$u.deepClone(this.coreshopData.parameters.list);
|
||||
},
|
||||
computed: {
|
||||
count() {
|
||||
if (!this.coreshopdata) {
|
||||
if (!this.coreshopData) {
|
||||
return false;
|
||||
}
|
||||
if (!this.coreshopdata.parameters) {
|
||||
if (!this.coreshopData.parameters) {
|
||||
return false;
|
||||
}
|
||||
if (!this.coreshopdata.parameters.list) {
|
||||
if (!this.coreshopData.parameters.list) {
|
||||
return false;
|
||||
}
|
||||
return (this.coreshopdata.parameters.list.length > 0)
|
||||
return (this.coreshopData.parameters.list.length > 0)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
end(index) {
|
||||
let _that = this;
|
||||
_that.list.splice(index, 1)
|
||||
}
|
||||
},
|
||||
onChange(e, key) {
|
||||
this.$set(this.listData[key], 'timeData', e)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -80,7 +137,6 @@
|
||||
.img-list-item-r { width: calc(100% - 120px); display: inline-block; margin-left: 7.5px; float: left; position: relative;
|
||||
.description { font-size: 12px; color: #929292; }
|
||||
.item-c { width: 100%; margin-top: 0;
|
||||
.red-price { color: #FF7159 !important; }
|
||||
.btnCart { float: right; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<!-- 单图 -->
|
||||
<view class="coreshop-imgsingle coreshop-bg-white" v-if="coreshopdata.parameters.list && coreshopdata.parameters.list.length > 0">
|
||||
<view class="" v-for="child in coreshopdata.parameters.list">
|
||||
<view class="coreshop-imgsingle coreshop-bg-white" v-if="listData && listData.length > 0">
|
||||
<view class="" v-for="child in listData">
|
||||
<view @click="taped(child)">
|
||||
<image class="ad-img" :src="child.image" mode="widthFix"></image>
|
||||
</view>
|
||||
@@ -14,19 +14,21 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "coreshopimgsingle",
|
||||
name: "coreshopImgSingle",
|
||||
props: {
|
||||
coreshopdata: {
|
||||
// type: Object,
|
||||
coreshopData: {
|
||||
type: Array,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
count() {
|
||||
// console.log(coreshopdata)
|
||||
return (this.coreshopdata.parameters.list.length > 0)
|
||||
data() {
|
||||
return {
|
||||
count: 0,
|
||||
listData: [],
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
this.listData = this.coreshopData;
|
||||
},
|
||||
methods: {
|
||||
taped(item) {
|
||||
@@ -40,7 +42,7 @@
|
||||
.coreshop-imgsingle { overflow: hidden; position: relative;
|
||||
.ad-img { width: 100%; float: left; }
|
||||
.ad-img:last-child { margin-bottom: 0; }
|
||||
.imgup-btn { position: absolute; z-index: 668; bottom: 40px; left: 20px;
|
||||
.imgup-btn { position: absolute; z-index: 1; bottom: 10px; width: 100%; min-height: 30px; text-align: center;
|
||||
.coreshop-btn { line-height: 2; font-size: 14px; padding: 0 25px; border-radius: 25px; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<view class="coreshop-margin-left-10 coreshop-margin-right-10 coreshop-margin-bottom-10 coreshop-margin-top-10 coreshop-bg-white">
|
||||
<u-swiper :list="swiperItems" :height="swiperHeight" :interval="swiperDuration" keyName="image" @click="taped" indicator indicatorMode="line" circular></u-swiper>
|
||||
<view class="coreshop-bg-white">
|
||||
<u-swiper :list="swiperItems" :height="swiperHeight" :interval="swiperDuration" keyName="image" @click="onClicked" indicator indicatorMode="line" circular radius="0"></u-swiper>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "coreshopimgSlide",
|
||||
name: "coreshopImgSlide",
|
||||
props: {
|
||||
coreshopdata: {
|
||||
// type: Object,
|
||||
coreshopData: {
|
||||
type: Object,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
@@ -22,15 +22,14 @@
|
||||
},
|
||||
computed: {
|
||||
count() {
|
||||
return (this.coreshopdata.parameters.list.length > 0)
|
||||
return (this.coreshopData.list.length > 0)
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
var data = this.coreshopdata.parameters.list;
|
||||
var data = this.coreshopData.list;
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
let moder = {
|
||||
image: data[i].image == '/images/empty-banner.png' ? '/static/images/common/empty-banner.png' : data[i].image,
|
||||
image: data[i].image,
|
||||
opentype: 'click',
|
||||
url: '',
|
||||
title: data[i].linkType,
|
||||
@@ -39,12 +38,11 @@
|
||||
}
|
||||
this.swiperItems.push(moder);
|
||||
}
|
||||
this.swiperHeight = this.coreshopdata.parameters.height;
|
||||
this.swiperDuration = this.coreshopdata.parameters.duration;
|
||||
this.swiperHeight = this.coreshopData.height;
|
||||
this.swiperDuration = this.coreshopData.duration;
|
||||
},
|
||||
watch: {},
|
||||
methods: {
|
||||
taped: function (e) {
|
||||
onClicked: function (e) {
|
||||
this.showSliderInfo(this.swiperItems[e].linkType, this.swiperItems[e].linkValue);
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,48 +1,55 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="coreshop-margin-left-10 coreshop-margin-right-10 coreshop-margin-bottom-10 coreshop-margin-top-10">
|
||||
<u-grid :border="false" align="left" :col="coreshopdata.parameters.style" v-if="coreshopdata.parameters.style == '2' ||coreshopdata.parameters.style == '3' ||coreshopdata.parameters.style == '4'">
|
||||
<u-grid-item bg-color="transparent" v-for="(item, index) in coreshopdata.parameters.list" :key="index" :custom-style="{padding:coreshopdata.parameters.margin+'px'}">
|
||||
<image :src="item.image" mode="widthFix" @click="showSliderInfo(item.linkType, item.linkValue)" style="width:100%;"></image>
|
||||
<u-grid :border="false" align="left" :col="coreshopData.parameters.style" v-if="coreshopData.parameters.style == '2' ||coreshopData.parameters.style == '3' ||coreshopData.parameters.style == '4'">
|
||||
<u-grid-item bg-color="transparent" v-for="(item, index) in coreshopData.parameters.list" :key="index" :custom-style="{padding:coreshopData.parameters.margin+'px'}">
|
||||
<image :src="item.image" mode="widthFix" @click="showSliderInfo(item.linkType, item.linkValue)" style="width: 100%;"></image>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
<u-grid :border="false" align="left" :col="2" v-if="coreshopdata.parameters.style == '0'">
|
||||
<u-grid-item bg-color="transparent" :custom-style="{padding:coreshopdata.parameters.margin+'px'}">
|
||||
<image :src="coreshopdata.parameters.list[0].image" mode="widthFix" v-if="coreshopdata.parameters.list[0]" @click="showSliderInfo(coreshopdata.parameters.list[0].linkType, coreshopdata.parameters.list[0].linkValue)" class="coreshop-percent-100"></image>
|
||||
</u-grid-item>
|
||||
<u-grid-item bg-color="transparent" :custom-style="{padding:coreshopdata.parameters.margin+'px'}">
|
||||
<image :src="coreshopdata.parameters.list[1].image" mode="widthFix" v-if="coreshopdata.parameters.list[1]" @click="showSliderInfo(coreshopdata.parameters.list[1].linkType, coreshopdata.parameters.list[1].linkValue)" class="coreshop-percent-100"></image>
|
||||
<u-grid :border="false" align="left" :col="2">
|
||||
<u-grid-item bg-color="transparent" :custom-style="{padding:coreshopdata.parameters.margin+'px'}">
|
||||
<image :src="coreshopdata.parameters.list[2].image" mode="widthFix" v-if="coreshopdata.parameters.list[2]" @click="showSliderInfo(coreshopdata.parameters.list[2].linkType, coreshopdata.parameters.list[2].linkValue)" class="coreshop-percent-100"></image>
|
||||
</u-grid-item>
|
||||
<u-grid-item bg-color="transparent" :custom-style="{padding:coreshopdata.parameters.margin+'px'}">
|
||||
<image :src="coreshopdata.parameters.list[3].image" mode="widthFix" v-if="coreshopdata.parameters.list[3]" @click="showSliderInfo(coreshopdata.parameters.list[3].linkType, coreshopdata.parameters.list[3].linkValue)" class="coreshop-percent-100"></image>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between mainWindow" v-if="coreshopData.parameters.style == '0'">
|
||||
<view class="left" :style="{paddingRight:coreshopData.parameters.margin+'px'}">
|
||||
<u--image :src="coreshopData.parameters.list[0].image" height="200px" width="100%" v-if="coreshopData.parameters.list[0]" @click="showSliderInfo(coreshopData.parameters.list[0].linkType, coreshopData.parameters.list[0].linkValue)"></u--image>
|
||||
</view>
|
||||
<view class="right" :style="{paddingLeft:coreshopData.parameters.margin+'px'}">
|
||||
<view>
|
||||
<u--image :src="coreshopData.parameters.list[1].image" height="120px" width="100%" v-if="coreshopData.parameters.list[1]" @click="showSliderInfo(coreshopData.parameters.list[1].linkType, coreshopData.parameters.list[1].linkValue)"></u--image>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between" :style="{marginTop:coreshopData.parameters.margin +'px'}">
|
||||
<view :style="{paddingRight:coreshopData.parameters.margin / 2+'px'}" class="minBox">
|
||||
<u--image :src="coreshopData.parameters.list[2].image" :height="(200-120-coreshopData.parameters.margin)+'px'" width="100%" v-if="coreshopData.parameters.list[2]" @click="showSliderInfo(coreshopData.parameters.list[2].linkType, coreshopData.parameters.list[2].linkValue)"></u--image>
|
||||
</view>
|
||||
<view :style="{paddingLeft:coreshopData.parameters.margin / 2+'px'}" class="minBox">
|
||||
<u--image :src="coreshopData.parameters.list[3].image" :height="(200-120-coreshopData.parameters.margin)+'px'" width="100%" v-if="coreshopData.parameters.list[3]" @click="showSliderInfo(coreshopData.parameters.list[3].linkType, coreshopData.parameters.list[3].linkValue)"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "coreshopimgwindow",
|
||||
name: "coreshopImgWindow",
|
||||
props: {
|
||||
coreshopdata: {
|
||||
coreshopData: {
|
||||
// type: Object,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
padding: '3'
|
||||
height: 0
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
.mainWindow { width: 100%; height: 200px;
|
||||
.left { width: 50%; height: 200px; }
|
||||
.right { width: 50%; height: 200px; }
|
||||
.minBox { width: 50%; }
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<view class=" coreshop-margin-bottom-5 coreshop-padding-top-10 coreshop-padding-bottom-10 coreshop-bg-white">
|
||||
<view class=" coreshop-margin-bottom-10 coreshop-padding-top-10 coreshop-padding-bottom-10 coreshop-bg-white">
|
||||
<u-grid :col="limit" :border="false">
|
||||
<u-grid-item v-for="(item, index) in ListData" :key="index" @click="showSliderInfo(item.linkType, item.linkValue)">
|
||||
<view class="coreshop-padding-bottom-10 coreshop-padding-top-10">
|
||||
<u-icon :name="item.image" width="40" height="40" :label="item.text" :labelSize="13" labelPos="bottom" :top="25" space="10"></u-icon>
|
||||
<u-icon :name="item.image" width="50" height="50" :label="item.text" :labelSize="13" labelPos="bottom" :top="25" space="10"></u-icon>
|
||||
</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
@@ -11,12 +11,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { navLinkType } from '@/common/setting/constVarsHelper.js';
|
||||
export default {
|
||||
name: "coreshopnavbar",
|
||||
name: "coreshopData",
|
||||
components: {},
|
||||
props: {
|
||||
coreshopdata: {
|
||||
coreshopData: {
|
||||
// type: Object,
|
||||
required: true,
|
||||
}
|
||||
@@ -35,8 +34,8 @@
|
||||
|
||||
},
|
||||
created() {
|
||||
this.ListData = this.coreshopdata.parameters.list;
|
||||
this.limit = this.coreshopdata.parameters.limit;
|
||||
this.ListData = this.coreshopData.parameters.list;
|
||||
this.limit = this.coreshopData.parameters.limit;
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
|
||||
@@ -1,37 +1,35 @@
|
||||
<template>
|
||||
<view class="coreshop-margin-left-10 coreshop-margin-right-10 coreshop-margin-bottom-10 coreshop-margin-top-10 coreshop-bg-white" v-if="count > 0">
|
||||
<u-notice-bar :text="model.text" @click="goNoticeList()"></u-notice-bar>
|
||||
<u-notice-bar :text="notcieText" url="/pages/notice/list/list" bgColor="#ffffff" color="#333333"></u-notice-bar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "coreshopnotice",
|
||||
name: "coreshopNotice",
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
coreshopdata: {
|
||||
coreshopData: {
|
||||
type: Array,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
model: {
|
||||
text: "",
|
||||
},
|
||||
notcieText: "",
|
||||
}
|
||||
},
|
||||
created() {
|
||||
var data = this.coreshopdata.parameters.list;
|
||||
if (data.length > 0) {
|
||||
this.model.text = data[0].title;
|
||||
if (this.coreshopData.length > 0) {
|
||||
for (var i = 0; i < this.coreshopData.length; i++) {
|
||||
this.notcieText += this.coreshopData[i].title + '【' + this.$u.timeFormat(this.coreshopData[i].createTime, 'yyyy年mm月dd日') + '】' + '\u00A0\u00A0\u00A0\u00A0\u00A0';
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
},
|
||||
computed: {
|
||||
count() {
|
||||
return (this.coreshopdata.parameters.list.length > 0)
|
||||
return (this.coreshopData.length > 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,99 +1,105 @@
|
||||
<template>
|
||||
<view>
|
||||
<block v-for="(item,index) in coreshopdata" :key="index">
|
||||
<!--搜索(修复)-->
|
||||
<coreshopsearch :coreshopdata="item" v-if="item.widgetCode=='search' "></coreshopsearch>
|
||||
<!--切换-->
|
||||
<coreshoptabbar :coreshopdata="item" v-if="item.widgetCode=='tabBar' "></coreshoptabbar>
|
||||
<!--公告(修复)-->
|
||||
<coreshopnotice :coreshopdata="item" v-if="item.widgetCode=='notice' "></coreshopnotice>
|
||||
<!--图片轮播(修复)-->
|
||||
<coreshopimgSlide :coreshopdata="item" v-if="item.widgetCode=='imgSlide' "></coreshopimgSlide>
|
||||
<!--优惠券(修复)-->
|
||||
<coreshopcoupon :coreshopdata="item" v-if="item.widgetCode=='coupon' "></coreshopcoupon>
|
||||
<!--空格(修复)-->
|
||||
<coreshopblank :coreshopdata="item" v-if="item.widgetCode=='blank' "></coreshopblank>
|
||||
<!--多行文本输入区(修复)-->
|
||||
<coreshoptextarea :coreshopdata="item" v-if="item.widgetCode=='textarea' "></coreshoptextarea>
|
||||
<!--视频(修复)-->
|
||||
<coreshopvideo :coreshopdata="item" v-if="item.widgetCode=='video' "></coreshopvideo>
|
||||
<!--图片集(修复)-->
|
||||
<coreshopimgWindow :coreshopdata="item" v-if="item.widgetCode=='imgWindow' "></coreshopimgWindow>
|
||||
<!--图片--(修复)-->
|
||||
<coreshopimgSingle :coreshopdata="item" v-if="item.widgetCode=='imgSingle' "></coreshopimgSingle>
|
||||
<!--商品(修复)-->
|
||||
<coreshopgoods :coreshopdata="item" v-if="item.widgetCode=='goods' "></coreshopgoods>
|
||||
<!--商品选项卡(修复)-->
|
||||
<coreshopgoodTabBar :coreshopdata="item" v-if="item.widgetCode=='goodTabBar' "></coreshopgoodTabBar>
|
||||
<!--文章(修复)-->
|
||||
<coreshoparticle :coreshopdata="item" v-if="item.widgetCode=='article' "></coreshoparticle>
|
||||
<!--文章分类(修复)-->
|
||||
<coreshoparticleClassify :coreshopdata="item" v-if="item.widgetCode=='articleClassify' "></coreshoparticleClassify>
|
||||
<!--宫格自定义导航(修复)-->
|
||||
<coreshopnavBar :coreshopdata="item" v-if="item.widgetCode=='navBar' "></coreshopnavBar>
|
||||
<!--团购(修复)-->
|
||||
<coreshopgroupPurchase :coreshopdata="item" v-if="item.widgetCode=='groupPurchase' "></coreshopgroupPurchase>
|
||||
<!--浏览记录(修复)-->
|
||||
<coreshoprecord :coreshopdata="item" v-if="item.widgetCode=='record' "></coreshoprecord>
|
||||
<!--拼团(修复)-->
|
||||
<coreshoppinTuan :coreshopdata="item" v-if="item.widgetCode=='pinTuan' "></coreshoppinTuan>
|
||||
<!--服务(修复)-->
|
||||
<coreshopservice :coreshopdata="item" v-if="item.widgetCode=='service' "></coreshopservice>
|
||||
<!--图片-->
|
||||
<coreshopImgSingle :coreshopData="item.parameters.list" v-if="item.widgetCode=='imgSingle' "></coreshopImgSingle>
|
||||
<!--服务商品-->
|
||||
<coreshopServiceGood :coreshopData="item" v-if="item.widgetCode=='service' "></coreshopServiceGood>
|
||||
<!--图片轮播-->
|
||||
<coreshopImgSlide :coreshopData="item.parameters" v-if="item.widgetCode=='imgSlide' "></coreshopImgSlide>
|
||||
<!--公告-->
|
||||
<coreshopNotice :coreshopData="item.parameters.list" v-if="item.widgetCode=='notice' "></coreshopNotice>
|
||||
<!--优惠券-->
|
||||
<coreshopCoupon :coreshopData="item" v-if="item.widgetCode=='coupon' "></coreshopCoupon>
|
||||
<!--拼团-->
|
||||
<coreshopPinTuan :coreshopData="item" v-if="item.widgetCode=='pinTuan' "></coreshopPinTuan>
|
||||
<!--搜索-->
|
||||
<coreshopSearch :coreshopData="item" v-if="item.widgetCode=='search' "></coreshopSearch>
|
||||
<!--宫格自定义导航-->
|
||||
<coreshopNavBar :coreshopData="item" v-if="item.widgetCode=='navBar' "></coreshopNavBar>
|
||||
<!--商品选项卡-->
|
||||
<coreshopGoodTabBar :coreshopData="item" v-if="item.widgetCode=='goodTabBar' "></coreshopGoodTabBar>
|
||||
<!--文章-->
|
||||
<coreshopArticle :coreshopData="item" v-if="item.widgetCode=='article' "></coreshopArticle>
|
||||
<!--文章分类-->
|
||||
<coreshopArticleClassify :coreshopData="item" v-if="item.widgetCode=='articleClassify' "></coreshopArticleClassify>
|
||||
<!--视频-->
|
||||
<coreshopVideo :coreshopData="item" v-if="item.widgetCode=='video' "></coreshopVideo>
|
||||
<!--商品-->
|
||||
<coreshopGoods :coreshopData="item" v-if="item.widgetCode=='goods' "></coreshopGoods>
|
||||
<!--浏览记录-->
|
||||
<coreshopRecord :coreshopData="item" v-if="item.widgetCode=='record' "></coreshopRecord>
|
||||
<!--空格-->
|
||||
<coreshopBlank :coreshopData="item" v-if="item.widgetCode=='blank' "></coreshopBlank>
|
||||
<!--多行文本输入区-->
|
||||
<coreshopTextArea :coreshopData="item" v-if="item.widgetCode=='textarea' "></coreshopTextArea>
|
||||
<!--图片集-->
|
||||
<coreshopImgWindow :coreshopData="item" v-if="item.widgetCode=='imgWindow' "></coreshopImgWindow>
|
||||
<!--文本内容-->
|
||||
<coreshopContent :coreshopData="item" v-if="item.widgetCode=='content' "></coreshopContent>
|
||||
<!--团购-->
|
||||
<coreshopGroupPurchase :coreshopData="item" v-if="item.widgetCode=='groupPurchase' "></coreshopGroupPurchase>
|
||||
<!--秒杀-->
|
||||
<coreshopSeckill :coreshopData="item" v-if="item.widgetCode=='seckill' "></coreshopSeckill>
|
||||
|
||||
|
||||
|
||||
<!--弹窗广告-->
|
||||
<coreshopadpop :coreshopdata="item" v-if="item.widgetCode=='adpop' "></coreshopadpop>
|
||||
<!--文本内容(修复)-->
|
||||
<coreshopContent :coreshopdata="item" v-if="item.widgetCode=='content' "></coreshopContent>
|
||||
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import coreshopimgSlide from '@/components/coreshop-page/coreshop-imgSlide.vue'
|
||||
import coreshopsearch from '@/components/coreshop-page/coreshop-search.vue'
|
||||
import coreshopnotice from '@/components/coreshop-page/coreshop-notice.vue'
|
||||
import coreshopcoupon from '@/components/coreshop-page/coreshop-coupon.vue'
|
||||
import coreshopblank from '@/components/coreshop-page/coreshop-blank.vue'
|
||||
import coreshoptextarea from '@/components/coreshop-page/coreshop-textarea.vue'
|
||||
import coreshopvideo from '@/components/coreshop-page/coreshop-video.vue'
|
||||
import coreshopimgWindow from '@/components/coreshop-page/coreshop-imgWindow.vue'
|
||||
import coreshopimgSingle from '@/components/coreshop-page/coreshop-imgSingle.vue'
|
||||
import coreshopgoods from '@/components/coreshop-page/coreshop-goods.vue'
|
||||
import coreshopgoodTabBar from '@/components/coreshop-page/coreshop-goodTabBar.vue'
|
||||
import coreshoparticle from '@/components/coreshop-page/coreshop-article.vue'
|
||||
import coreshoparticleClassify from '@/components/coreshop-page/coreshop-articleClassify.vue'
|
||||
import coreshopnavBar from '@/components/coreshop-page/coreshop-navBar.vue'
|
||||
import coreshopgroupPurchase from '@/components/coreshop-page/coreshop-groupPurchase.vue'
|
||||
import coreshoprecord from '@/components/coreshop-page/coreshop-record.vue'
|
||||
import coreshoppinTuan from '@/components/coreshop-page/coreshop-pinTuan.vue'
|
||||
import coreshopservice from '@/components/coreshop-page/coreshop-service.vue'
|
||||
import coreshoptabbar from '@/components/coreshop-page/coreshop-tabbar.vue'
|
||||
import coreshopadpop from '@/components/coreshop-page/coreshop-adpop.vue'
|
||||
import coreshopImgSingle from '@/components/coreshop-page/coreshop-imgSingle.vue'
|
||||
import coreshopServiceGood from '@/components/coreshop-page/coreshop-serviceGood.vue'
|
||||
import coreshopImgSlide from '@/components/coreshop-page/coreshop-imgSlide.vue'
|
||||
import coreshopNotice from '@/components/coreshop-page/coreshop-notice.vue'
|
||||
import coreshopCoupon from '@/components/coreshop-page/coreshop-coupon.vue'
|
||||
import coreshopPinTuan from '@/components/coreshop-page/coreshop-pinTuan.vue'
|
||||
import coreshopSearch from '@/components/coreshop-page/coreshop-search.vue'
|
||||
import coreshopNavBar from '@/components/coreshop-page/coreshop-navBar.vue'
|
||||
import coreshopArticle from '@/components/coreshop-page/coreshop-article.vue'
|
||||
import coreshopArticleClassify from '@/components/coreshop-page/coreshop-articleClassify.vue'
|
||||
import coreshopGoodTabBar from '@/components/coreshop-page/coreshop-goodTabBar.vue'
|
||||
import coreshopVideo from '@/components/coreshop-page/coreshop-video.vue'
|
||||
import coreshopGoods from '@/components/coreshop-page/coreshop-goods.vue'
|
||||
import coreshopRecord from '@/components/coreshop-page/coreshop-record.vue'
|
||||
import coreshopBlank from '@/components/coreshop-page/coreshop-blank.vue'
|
||||
import coreshopTextArea from '@/components/coreshop-page/coreshop-textarea.vue'
|
||||
import coreshopImgWindow from '@/components/coreshop-page/coreshop-imgWindow.vue'
|
||||
import coreshopContent from '@/components/coreshop-page/coreshop-content.vue'
|
||||
import coreshopGroupPurchase from '@/components/coreshop-page/coreshop-groupPurchase.vue'
|
||||
import coreshopSeckill from '@/components/coreshop-page/coreshop-seckill.vue'
|
||||
|
||||
import coreshopadpop from '@/components/coreshop-page/coreshop-adpop.vue'
|
||||
|
||||
export default {
|
||||
name: 'coreshop-page',
|
||||
components: {
|
||||
coreshopimgSlide,
|
||||
coreshopsearch,
|
||||
coreshopnotice,
|
||||
coreshopcoupon,
|
||||
coreshopblank,
|
||||
coreshoptextarea,
|
||||
coreshopvideo,
|
||||
coreshopimgWindow,
|
||||
coreshopimgSingle,
|
||||
coreshopgoods,
|
||||
coreshopgoodTabBar,
|
||||
coreshoparticle,
|
||||
coreshoparticleClassify,
|
||||
coreshopnavBar,
|
||||
coreshopgroupPurchase,
|
||||
coreshoprecord,
|
||||
coreshoppinTuan,
|
||||
coreshopservice,
|
||||
coreshoptabbar,
|
||||
coreshopImgSingle,
|
||||
coreshopServiceGood,
|
||||
coreshopImgSlide,
|
||||
coreshopNotice,
|
||||
coreshopCoupon,
|
||||
coreshopPinTuan,
|
||||
coreshopSearch,
|
||||
coreshopNavBar,
|
||||
coreshopArticle,
|
||||
coreshopArticleClassify,
|
||||
coreshopGoodTabBar,
|
||||
coreshopVideo,
|
||||
coreshopGoods,
|
||||
coreshopRecord,
|
||||
coreshopBlank,
|
||||
coreshopTextArea,
|
||||
coreshopImgWindow,
|
||||
coreshopContent,
|
||||
coreshopGroupPurchase,
|
||||
coreshopSeckill,
|
||||
|
||||
coreshopadpop,
|
||||
coreshopContent
|
||||
},
|
||||
props: {
|
||||
coreshopdata: {
|
||||
|
||||
@@ -1,37 +1,43 @@
|
||||
<template>
|
||||
<!-- 活动商品 -->
|
||||
<view class="activity-wrap coreshop-padding-left-10 coreshop-padding-right-10 coreshop-padding-bottom-10 coreshop-margin-bottom-5 groupon-card" v-if="count">
|
||||
<!-- 标题栏 -->
|
||||
<view class="title-box coreshop-flex coreshop-justify-between coreshop-padding-top-10 coreshop-padding-bottom-10 groupon-title">
|
||||
<view class="coreshop-flex coreshop-flex-direction coreshop-align-center">
|
||||
<view class="title-text coreshop-margin-right-10 u-line-1">每日拼团</view>
|
||||
<view class="activity-wrap coreshop-padding-10 coreshop-margin-10 coreshop-bg-white coreshop-border-radius-trbl-18" v-if="count">
|
||||
<view class="coreshop-padding-bottom-10 coreshop-padding-top-10 groupon-title coreshop-min-height-30">
|
||||
<view class="title-box coreshop-flex coreshop-justify-between">
|
||||
<view class="coreshop-font-16 coreshop-text-black coreshop-font-weight-bold">每日拼团</view>
|
||||
<u-icon name="arrow-right-double" size="12" label="查看更多" labelSize="12" labelPos="left" @tap="goPinTuanList()"></u-icon>
|
||||
</view>
|
||||
<u-icon name="arrow-right-double" size="12" label="查看更多" labelSize="12" labelPos="left" @tap="goPinTuanList()"></u-icon>
|
||||
</view>
|
||||
<!-- 活动商品 -->
|
||||
<view class="coreshop-divider">
|
||||
<view class="complete"></view>
|
||||
</view>
|
||||
<scroll-view class="scroll-box" scroll-x scroll-anchoring>
|
||||
<view class="goods-box coreshop-flex">
|
||||
<view class="min-goods coreshop-margin-right-6" v-for="mgoods in coreshopdata.parameters.list" :key="mgoods.id" @tap="goPinTuanDetail(mgoods.goodsId,mgoods.id)">
|
||||
<view class="goods-box coreshop-flex coreshop-justify-between coreshop-text-black">
|
||||
<view class="min-goods" v-for="item in coreshopData.parameters.list" :key="item.id" @tap="goPinTuanDetail(item.id)">
|
||||
<view class="img-box">
|
||||
<image class="img" :src="mgoods.goodsImage" mode=""></image>
|
||||
<image class="img" :src="item.goodThumbnail" mode=""></image>
|
||||
</view>
|
||||
<view class="mgoods-card-bottom coreshop-padding-10">
|
||||
<view class="goods-title coreshop-margin-bottom-5 u-line-1">{{ mgoods.name }}</view>
|
||||
<view class="price coreshop-margin-bottom-5">{{mgoods.pinTuanPrice}}</view>
|
||||
<view class="original-price">¥{{ mgoods.pinTuanPrice + mgoods.discountAmount }}</view>
|
||||
<view class="item-card-bottom coreshop-padding-10">
|
||||
<view class="goods-title u-line-1">{{ item.name }}</view>
|
||||
<view class="price coreshop-margin-bottom-5">{{item.pinTuanPrice}}</view>
|
||||
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between">
|
||||
<view class="original-price">¥{{ item.pinTuanPrice + item.discountAmount }}</view>
|
||||
<view class="coreshop-font-10">
|
||||
<u-tag :text="'限购'+item.maxNums" type="warning" plain plainFill size="mini" v-if="item.maxNums>0"></u-tag>
|
||||
<u-tag text="不限购" type="success" plain plainFill size="mini" v-if="item.maxNums==0"></u-tag>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "coreshoppinTuan",
|
||||
name: "coreshopPinTuan",
|
||||
props: {
|
||||
coreshopdata: {
|
||||
coreshopData: {
|
||||
required: false,
|
||||
}
|
||||
},
|
||||
@@ -43,14 +49,14 @@
|
||||
},
|
||||
created() {
|
||||
let that = this;
|
||||
if (that.coreshopdata.parameters.list.length > 0) {
|
||||
let arr = that.sortData(that.coreshopdata.parameters.list, 4);
|
||||
if (that.coreshopData.parameters.list.length > 0) {
|
||||
let arr = that.sortData(that.coreshopData.parameters.list, 4);
|
||||
that.goodsList = arr;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
count() {
|
||||
return (this.coreshopdata.parameters.list.length > 0)
|
||||
return (this.coreshopData.parameters.list.length > 0)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -77,32 +83,29 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.groupon-card { background: linear-gradient(#faecca 20%, #ffffff 30%, #ffffff 100%); }
|
||||
|
||||
.groupon-title { background: url($apiFilesUrl+'/static/images/pinTuan/groupon_title_bg.png') no-repeat; background-position: center top; background-size: 100% auto; }
|
||||
.activity-wrap { background-color: #fff; min-height: 300rpx;
|
||||
.activity-wrap { background-color: #fff; min-height: 150px; background: linear-gradient(#faecca 20%, #ffffff 30%, #ffffff 100%);
|
||||
.groupon-title { background: url($apiFilesUrl+'/static/images/pinTuan/groupon_title_bg.png') no-repeat; background-position: center top; background-size: 100% auto; }
|
||||
.title-box {
|
||||
.title-text { font-size: 32rpx; font-weight: bold; color: #333333; }
|
||||
.title-text { font-size: 16px; font-weight: bold; color: #333333; }
|
||||
.more-box {
|
||||
.more-text { font-size: 22rpx; font-weight: 500; color: #333333; }
|
||||
.more-icon { font-size: 24rpx; color: #333333; }
|
||||
.more-text { font-size: 11px; font-weight: 500; color: #333333; }
|
||||
.more-icon { font-size: 12px; color: #333333; }
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-box,
|
||||
.goods-box { height: 380rpx; width: 100%; }
|
||||
.goods-box { min-height: 190px; width: 100%; }
|
||||
}
|
||||
|
||||
// 小商品卡片
|
||||
.min-goods { width: 220rpx; height: 380rpx; background: #fffaef; box-shadow: 0px 7rpx 8rpx 1rpx rgba(162, 117, 27, 0.24); border-radius: 10rpx;
|
||||
.img-box { width: 220rpx; height: 220rpx; overflow: hidden; position: relative; border-radius: 10rpx 10rpx 0 0;
|
||||
.img { width: 220rpx; height: 220rpx; background-color: #ccc; }
|
||||
// 商品卡片
|
||||
.min-goods { background: #fffaef; box-shadow: 0px 3.5px 4px 0.5px rgba(162, 117, 27, 0.24); border-radius: 5px; margin-right: 15px !important;
|
||||
.img-box { width: 140px; height: 140px; overflow: hidden; position: relative; border-radius: 5px 5px 0 0;
|
||||
.img { width: 140px; height: 140px; background-color: #ccc; }
|
||||
}
|
||||
.mgoods-card-bottom { height: 160rpx; background: url($apiFilesUrl+'/static/images/pinTuan/groupon_goods_bg.png') no-repeat; background-position: bottom center; background-size: 100% 100%; }
|
||||
.goods-title { font-size: 26rpx; font-weight: 500; color: #000000; width: 180rpx; line-height: 26rpx; }
|
||||
|
||||
.price { font-size: 30rpx; font-weight: 500; color: #ff0000;
|
||||
&::before { content: '¥'; font-size: 24rpx; }
|
||||
.item-card-bottom { min-height: 75px; background: url($apiFilesUrl+'/static/images/pinTuan/groupon_goods_bg.png') no-repeat; background-position: bottom center; background-size: 100% 100%; }
|
||||
.goods-title { font-size: 13px; font-weight: 500; color: #000000; line-height: 13px; margin-bottom: 5px; }
|
||||
.price { font-size: 15px; font-weight: 500; color: #ff0000;
|
||||
&::before { content: '¥'; font-size: 12px; }
|
||||
}
|
||||
.original-price { font-size: 20rpx; font-weight: 500; text-decoration: line-through; color: #c4c4c4; }
|
||||
.groupon-num-box {
|
||||
@@ -112,29 +115,4 @@
|
||||
.groupon-num-text { font-size: 18rpx; font-weight: 500; color: #e9b461; }
|
||||
}
|
||||
}
|
||||
|
||||
// 大商品卡片
|
||||
.big-goods { width: 710rpx; min-height: 260rpx; background: #ffffff; box-shadow: 0px 7rpx 8rpx 1rpx #fffaef; border-radius: 20rpx;
|
||||
.goods-img { width: 220rpx; height: 220rpx; border-radius: 6rpx; }
|
||||
.card-right { width: 430rpx; height: 100%; }
|
||||
.goods-title { font-size: 26rpx; font-weight: 600; width: 400rpx; color: #000000; vertical-align: middle;
|
||||
.title-tag { transform: scale(0.9); }
|
||||
}
|
||||
.subtitle-text { font-size: 22rpx; width: 400rpx; font-weight: 500; color: #666666; }
|
||||
.buy-btn { width: 120rpx; line-height: 50rpx; background: linear-gradient(90deg, #ff6600 0%, #fe832a 100%); border-radius: 25rpx; font-size: 24rpx; font-weight: 500; color: #ffffff; }
|
||||
|
||||
.sell-box { background: rgba(#f9efd6, 0.3); border-radius: 16rpx; line-height: 32rpx;
|
||||
.sell-num { font-size: 20rpx; font-weight: 400; color: #ff6904; }
|
||||
|
||||
.hot-icon { font-size: 26rpx; color: #ff6904; margin-right: 8rpx; }
|
||||
}
|
||||
.group-num { font-size: 20rpx; font-weight: 500; color: rgba(153, 153, 153, 1); margin-left: 20rpx; }
|
||||
|
||||
.price { color: #ff0000; font-weight: 600;
|
||||
&::before { content: '¥'; font-size: 20rpx; }
|
||||
}
|
||||
.origin-price { color: #c4c4c4; font-size: 24rpx; text-decoration: line-through;
|
||||
&::before { content: '¥'; font-size: 20rpx; }
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="adbrathing" v-show="adbshow" v-bind:class="['adbrathing'+coreshopdata.parameters.style.align,!hideanimation?'pc':hideanimation?'hc':'']" :style="{top:coreshopdata.parameters.style.top+'%'}">
|
||||
<view class="adbrathing" v-show="adbshow" v-bind:class="['adbrathing'+coreshopData.parameters.style.align,!hideanimation?'pc':hideanimation?'hc':'']" :style="{top:coreshopData.parameters.style.top+'%'}">
|
||||
<view class="adbrathing-c coreshop-flex-direction-row">
|
||||
<view class="adbrathing-l">
|
||||
<image class="user-head-img" :src="log.avatar" mode="aspectFill"></image>
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "coreshoprecord",
|
||||
name: "coreshopRecord",
|
||||
props: {
|
||||
coreshopdata: {
|
||||
coreshopData: {
|
||||
// type: Object,
|
||||
required: true,
|
||||
},
|
||||
@@ -57,12 +57,12 @@
|
||||
_this.hideanimation = !_this.hideanimation;
|
||||
clearInterval(_this.times);
|
||||
_this.times = setInterval(function () {
|
||||
_this.getRecod();
|
||||
_this.getRecord();
|
||||
}, 5000);
|
||||
}, 3000)
|
||||
},
|
||||
//获取日志
|
||||
getRecod() {
|
||||
getRecord() {
|
||||
var _this = this;
|
||||
if (_this.times != {}) {
|
||||
clearInterval(_this.times);
|
||||
@@ -72,7 +72,7 @@
|
||||
value: _this.lvalue,
|
||||
};
|
||||
uni.request({
|
||||
url: this.$globalConstVars.apiBaseUrl + '/Api/Page/GetRecod',
|
||||
url: this.$globalConstVars.apiBaseUrl + '/Api/Page/GetRecord',
|
||||
data: data,
|
||||
header: {
|
||||
'Accept': 'application/json',
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<!-- 搜索组件宽度自适应于外层 -->
|
||||
<view class="coreshop-padding-left-10 coreshop-padding-right-10 coreshop-padding-bottom-10 coreshop-padding-top-10 coreshop-margin-left-10 coreshop-margin-right-10 coreshop-margin-bottom-10 coreshop-margin-top-10 coreshop-bg-white" v-bind:class="coreshopdata.parameters.style">
|
||||
<view class="coreshop-padding-left-10 coreshop-padding-right-10 coreshop-padding-bottom-10 coreshop-padding-top-10 coreshop-margin-left-10 coreshop-margin-right-10 coreshop-margin-bottom-10 coreshop-margin-top-10 coreshop-bg-white" v-bind:class="coreshopData.parameters.style">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<u-search :placeholder="coreshopdata.parameters.keywords" v-model="keyword" shape="square" :show-action="true" action-text="搜索" @custom="goSearch" @search="goSearch"></u-search>
|
||||
<u-search :placeholder="coreshopData.parameters.keywords" v-model="keyword" shape="square" :show-action="true" action-text="搜索" @custom="goSearch" @search="goSearch"></u-search>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "coreshopsearch",
|
||||
name: "coreshopSearch",
|
||||
props: {
|
||||
coreshopdata: {
|
||||
coreshopData: {
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
@@ -22,22 +22,11 @@
|
||||
};
|
||||
},
|
||||
created() {
|
||||
//#ifdef H5
|
||||
this.$nextTick(() => {
|
||||
this.searchTop = this.$refs.searchBar.$el.offsetTop;
|
||||
})
|
||||
// #endif
|
||||
this.searchStyle()
|
||||
},
|
||||
mounted() {
|
||||
// #ifdef H5
|
||||
window.addEventListener('scroll', this.handleScroll)
|
||||
// #endif
|
||||
},
|
||||
methods: {
|
||||
searchStyle() {
|
||||
this.$store.commit('searchStyle', this.coreshopdata.parameters.style)
|
||||
// console.log(this.data.parameters.style)
|
||||
this.$store.commit('searchStyle', this.coreshopData.parameters.style)
|
||||
},
|
||||
change(value) {
|
||||
// 搜索框内容变化时,会触发此事件,value值为输入框的内容
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<view class="coreshop-padding-10 coreshop-margin-10 coreshop-bg-white coreshop-border-radius-trbl-18" v-if="listData && count">
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between coreshop-min-height-30">
|
||||
<view class="coreshop-font-16 coreshop-text-black coreshop-font-weight-bold">{{coreshopData.parameters.title}}</view>
|
||||
<u-icon name="arrow-right-double" size="12" label="查看更多" labelSize="12" labelPos="left" @tap="goSeckillList()"></u-icon>
|
||||
</view>
|
||||
<view class="coreshop-divider">
|
||||
<view class="complete"></view>
|
||||
</view>
|
||||
<view class="coreshop-flex-direction coreshop-margin-bottom-10 coreshop-text-black" v-for="(item, key) in listData" :key="key" @click="goSeckillDetail(item.id)">
|
||||
<view class="coreshop-flex">
|
||||
<view>
|
||||
<u--image :src="item.goods.image" mode="widthFix" width="96px" height="96px" radius="8"></u--image>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction coreshop-padding-left-10 coreshop-percent-100">
|
||||
<view class="coreshop-font-15 u-line-2 coreshop-text-black">{{ item.name }}</view>
|
||||
<view class="coreshop-font-11 coreshop-padding-top-5 coreshop-padding-bottom-3 u-line-2 coreshop-text-brown">{{ item.goods.name }}</view>
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-flex-direction-row coreshop-align-center" v-if="(item.startStatus == 1) && item.lastTime">
|
||||
<view class="coreshop-text-right coreshop-time-right coreshop-margin-top-10" v-if="(item.startStatus == 1) && item.lastTime">
|
||||
<u-count-down :time="item.lastTime*1000" :autoStart="true" format="DD天HH时mm秒ss" @change="onChange($event,key)">
|
||||
<view class="time coreshop-font-11">
|
||||
<view class="coreshop-font-12">仅剩:</view>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.days }}</text>
|
||||
</view>
|
||||
<text class="time__doc">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.hours >= 10 ? item.timeData.hours :'0' +item.timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.minutes }}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.seconds }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
<view class="coreshop-text-right coreshop-time-right coreshop-margin-top-10" v-if="(item.startStatus == 2) && item.lastTime">
|
||||
<u-count-down :time="item.lastTime*1000" :autoStart="true" format="DD天HH时mm秒ss" @change="onChange($event,key)">
|
||||
<view class="time">
|
||||
<view class="coreshop-font-12">即将开始:</view>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.days }}</text>
|
||||
</view>
|
||||
<text class="time__doc">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.hours>=10?item.timeData.hours:'0'+item.timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.minutes }}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.seconds }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-flex-direction-row coreshop-align-center coreshop-margin-top-10">
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<view class="coreshop-font-14 coreshop-text-red">¥{{item.goods.product.price}}</view>
|
||||
<view class="coreshop-font-xs coreshop-text-through coreshop-margin-left-5">{{item.goods.product.mktprice}}元</view>
|
||||
</view>
|
||||
<view class="coreshop-seckill-btn" v-if="item.startStatus == 1" @click="goSeckillDetail(item.id)">马上秒</view>
|
||||
<view class="coreshop-seckill-btn" v-if="item.startStatus == 0">即将开始</view>
|
||||
<view class="coreshop-buy-btn-disabled" v-if="item.startStatus == 2">已结束</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="key+1 < listData.length">
|
||||
<view class="coreshop-divider">
|
||||
<view class="seckill"></view>
|
||||
<view class="dot">●</view>
|
||||
<view class="seckill"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "coreshopGroupPurchase",
|
||||
props: {
|
||||
coreshopData: {
|
||||
// type: Array,
|
||||
required: false,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
listData: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.listData = uni.$u.deepClone(this.coreshopData.parameters.list);
|
||||
},
|
||||
computed: {
|
||||
count() {
|
||||
if (!this.coreshopData) {
|
||||
return false;
|
||||
}
|
||||
if (!this.coreshopData.parameters) {
|
||||
return false;
|
||||
}
|
||||
if (!this.coreshopData.parameters.list) {
|
||||
return false;
|
||||
}
|
||||
return (this.coreshopData.parameters.list.length > 0)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
end(index) {
|
||||
let _that = this;
|
||||
_that.list.splice(index, 1)
|
||||
},
|
||||
onChange(e, key) {
|
||||
this.$set(this.listData[key], 'timeData', e)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.img-list-item { border-radius: 8px; margin: 2.5px 2.5px 10px 2.5px; background-color: #ffffff; padding: 5px; position: relative; overflow: hidden; flex-direction: row;
|
||||
.img-list-item-l { width: 100px; height: 100px; display: inline-block; float: left; }
|
||||
.img-list-item-r { width: calc(100% - 120px); display: inline-block; margin-left: 7.5px; float: left; position: relative;
|
||||
.description { font-size: 12px; color: #929292; }
|
||||
.item-c { width: 100%; margin-top: 0;
|
||||
.btnCart { float: right; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.u-count-down__text { font-size: 12px; }
|
||||
</style>
|
||||
@@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<view class="coreshop-padding-10 coreshop-margin-10 coreshop-bg-white coreshop-border-radius-trbl-18" v-if="listData && count">
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between coreshop-min-height-30">
|
||||
<view class="coreshop-font-16 coreshop-text-black coreshop-font-weight-bold">{{coreshopData.parameters.title}}</view>
|
||||
<u-icon name="arrow-right-double" size="12" label="查看更多" labelSize="12" labelPos="left" @tap="goServicesList()"></u-icon>
|
||||
</view>
|
||||
<view class="coreshop-divider">
|
||||
<view class="complete"></view>
|
||||
</view>
|
||||
<view class="coreshop-flex-direction-row coreshop-margin-bottom-10 coreshop-text-black" v-for="(item, key) in listData" :key="key" @click="goServicesDetail(item.id)">
|
||||
<view class="coreshop-flex">
|
||||
<view>
|
||||
<u--image :src="item.thumbnail" mode="widthFix" width="96px" height="96px" radius="8"></u--image>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction coreshop-padding-left-10">
|
||||
<view class="coreshop-font-15 u-line-2 coreshop-text-black">{{ item.title }}</view>
|
||||
<view class="coreshop-font-11 coreshop-padding-top-5 coreshop-padding-bottom-3 u-line-2 coreshop-text-brown">{{ item.description }}</view>
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-padding-top-10 coreshop-padding-bottom-5">
|
||||
<view class="coreshop-font-11 coreshop-bg-orange coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10" v-if="item.maxBuyNumber>0">限购{{item.maxBuyNumber}}</view>
|
||||
<view class="coreshop-font-11 coreshop-bg-green coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10" v-if="item.maxBuyNumber==0">不限购</view>
|
||||
<view class="coreshop-font-11 coreshop-bg-olive coreshop-padding-2 coreshop-border-radius-4">{{item.ticketNumber}}张券</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-flex-direction-row coreshop-align-center" v-if="item.openStatus != 3">
|
||||
<view class="coreshop-text-right coreshop-time-right coreshop-margin-top-10" v-if="item.openStatus == 1 && item.lastTime > 0">
|
||||
<u-count-down :time="item.lastTime*1000" :autoStart="true" format="DD天HH时mm秒ss" @change="onChange($event,key)">
|
||||
<view class="time coreshop-font-11">
|
||||
<view class="coreshop-font-12">仅剩:</view>
|
||||
<view class="time__custom" v-if="item.timeData.days>0">
|
||||
<text class="time__custom__item">{{ item.timeData.days }}</text>
|
||||
</view>
|
||||
<text class="time__doc" v-if="item.timeData.days>0">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.hours >= 10 ? item.timeData.hours :'0' +item.timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.minutes }}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.seconds }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
<view class="coreshop-text-right coreshop-time-right coreshop-margin-top-10" v-if="item.openStatus == 2 && item.lastTime > 0">
|
||||
<u-count-down :time="item.lastTime*1000" :autoStart="true" format="DD天HH时mm秒ss" @change="onChange($event,key)">
|
||||
<view class="time">
|
||||
<view class="coreshop-font-12">即将开始:</view>
|
||||
<view class="time__custom" v-if="item.timeData.days>0">
|
||||
<text class="time__custom__item">{{ item.timeData.days }}</text>
|
||||
</view>
|
||||
<text class="time__doc" v-if="item.timeData.days>0">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.hours>=10?item.timeData.hours:'0'+item.timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.minutes }}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.seconds }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-flex-direction-row coreshop-align-center coreshop-margin-top-10">
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<view class="coreshop-font-14 coreshop-text-red">¥{{ item.money }}</view>
|
||||
</view>
|
||||
<view class="coreshop-buy-btn" v-if="item.openStatus != 3">马上抢</view>
|
||||
<view class="coreshop-buy-btn-disabled" v-if="item.openStatus == 3">已结束</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="key+1 < listData.length">
|
||||
<view class="coreshop-divider">
|
||||
<view class="serviceGood"></view>
|
||||
<view class="dot">●</view>
|
||||
<view class="serviceGood"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "coreshopServiceGood",
|
||||
data() {
|
||||
return {
|
||||
listData: [],
|
||||
}
|
||||
},
|
||||
props: {
|
||||
coreshopData: {
|
||||
type: Object,
|
||||
required: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.listData = uni.$u.deepClone(this.coreshopData.parameters.list);
|
||||
},
|
||||
computed: {
|
||||
count() {
|
||||
return (this.listData.length > 0)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onChange(e, key) {
|
||||
this.$set(this.listData[key], 'timeData', e)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.time { display: flex; align-items: center;
|
||||
.time__custom { min-width: 18px; height: 18px; background-color: #3c9cff; border-radius: 4px; display: flex; justify-content: center; align-items: center;
|
||||
.time__custom__item { color: #fff; font-size: 10px; text-align: center; }
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -28,22 +28,13 @@
|
||||
};
|
||||
},
|
||||
created() {
|
||||
//#ifdef H5
|
||||
this.$nextTick(() => {
|
||||
this.searchTop = this.$refs.tabBar.$el.offsetTop - 52;
|
||||
})
|
||||
// #endif
|
||||
this.searchStyle()
|
||||
},
|
||||
mounted() {
|
||||
// #ifdef H5
|
||||
window.addEventListener('scroll', this.handleScroll)
|
||||
// #endif
|
||||
},
|
||||
methods: {
|
||||
searchStyle() {
|
||||
this.$store.commit('searchStyle', this.coreshopdata.parameters.style)
|
||||
// console.log(this.data.parameters.style)
|
||||
},
|
||||
handleScroll() {
|
||||
this.scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="textarea coreshop-margin-left-10 coreshop-margin-right-10 coreshop-padding-10">
|
||||
<coreshopContent :content="coreshopdata.parameters.value" v-if="coreshopdata.parameters.value"></coreshopContent>
|
||||
<view class="textarea coreshop-margin-10 coreshop-padding-10">
|
||||
<coreshopContent :content="coreshopData.parameters.value" v-if="coreshopData.parameters.value"></coreshopContent>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -10,20 +10,12 @@
|
||||
components: {
|
||||
coreshopContent
|
||||
},
|
||||
name: "coreshoptextarea",
|
||||
name: "coreshopTextArea",
|
||||
props: {
|
||||
coreshopdata: {
|
||||
coreshopData: {
|
||||
// type: Object,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<view class="video coreshop-margin-left-10 coreshop-margin-right-10 coreshop-margin-bottom-10">
|
||||
<video class="videoCT" id="myVideo" :src="coreshopdata.parameters.list[0].url" :autoplay="autoplay" :poster="coreshopdata.parameters.list[0].image"></video>
|
||||
<video class="videoCT" id="myVideo" :src="coreshopData.parameters.list[0].url" :autoplay="autoplay" :poster="coreshopData.parameters.list[0].image"></video>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "coreshopvideo",
|
||||
name: "coreshopVideo",
|
||||
props: {
|
||||
coreshopdata: {
|
||||
coreshopData: {
|
||||
type: Object,
|
||||
required: true,
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.coreshopdata.parameters.autoplay == 'true' || this.coreshopdata.parameters.autoplay == true) {
|
||||
if (this.coreshopData.parameters.autoplay == 'true' || this.coreshopData.parameters.autoplay == true) {
|
||||
this.autoplay = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,185 +0,0 @@
|
||||
<template>
|
||||
<view class="coreshop-share-Box">
|
||||
<u-toast ref="uToast" />
|
||||
<view class="coreshop-share-pop">
|
||||
<view class="coreshop-share-item" @click="copyUrl()" v-show="!ifwx">
|
||||
<button class="coreshop-btn">
|
||||
<u-icon label="复制链接" labelPos="bottom" size="40" name="/static/images/common/share-friend.png"></u-icon>
|
||||
</button>
|
||||
</view>
|
||||
<view class="coreshop-share-item" @click="$u.throttle(createPoster, 500)">
|
||||
<button class="coreshop-btn">
|
||||
<u-icon label="生成海报" labelPos="bottom" size="40" name="/static/images/common/share-poster.png"></u-icon>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-bottomBox">
|
||||
<button class="coreshop-btn coreshop-btn-w coreshop-btn-square" @click="close()">关闭</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { h5Url } from '@/common/setting/constVarsHelper.js'
|
||||
export default {
|
||||
props: {
|
||||
// 商品id
|
||||
goodsId: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
// 分享的图片
|
||||
shareImg: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
// 分享标题
|
||||
shareTitle: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
// 分享内容
|
||||
shareContent: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
// 分享链接
|
||||
shareHref: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
//分享类型
|
||||
shareType: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
//拼团id
|
||||
groupId: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
//拼团的团队id
|
||||
teamId: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
ifwx: {
|
||||
type: Boolean
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
/**
|
||||
*
|
||||
* H5端分享两种 (微信浏览器内引导用户去分享, 其他浏览器)
|
||||
*
|
||||
*/
|
||||
},
|
||||
methods: {
|
||||
// 关闭弹出层
|
||||
close() {
|
||||
this.$emit('close')
|
||||
},
|
||||
// 生成海报
|
||||
createPoster() {
|
||||
let data = {};
|
||||
if (this.shareType == 1) {
|
||||
//商品
|
||||
data = {
|
||||
page: 2, //商品
|
||||
url: h5Url + this.$globalConstVars.shareUrl,
|
||||
params: {
|
||||
goodsId: this.goodsId
|
||||
},
|
||||
type: 3,//海报
|
||||
client: 1
|
||||
}
|
||||
let userToken = this.$db.get('userToken')
|
||||
if (userToken) {
|
||||
data.token = userToken
|
||||
}
|
||||
} else if (this.shareType == 3) {
|
||||
//拼团
|
||||
data = {
|
||||
page: 3, //商品
|
||||
url: h5Url + this.$globalConstVars.shareUrl,
|
||||
params: {
|
||||
goodsId: this.goodsId,
|
||||
groupId: this.groupId,
|
||||
teamId: this.teamId
|
||||
},
|
||||
type: 3,//海报
|
||||
client: 1
|
||||
}
|
||||
let userToken = this.$db.get('userToken')
|
||||
if (userToken) {
|
||||
data.token = userToken
|
||||
}
|
||||
}
|
||||
this.$u.api.share(data).then(res => {
|
||||
if (res.status) {
|
||||
this.close()
|
||||
this.$u.route('/pages/share/sharePoster/sharePoster?poster=' + encodeURIComponent(res.data))
|
||||
} else {
|
||||
this.$u.toast(res.msg)
|
||||
}
|
||||
});
|
||||
},
|
||||
copyUrl() {
|
||||
let data = {};
|
||||
if (this.shareType == 1) {
|
||||
data = {
|
||||
page: 2, //商品
|
||||
url: h5Url + this.$globalConstVars.shareUrl,
|
||||
params: {
|
||||
goodsId: this.goodsId
|
||||
},
|
||||
type: 1,//URL
|
||||
client: 1
|
||||
}
|
||||
let userToken = this.$db.get('userToken')
|
||||
if (userToken) {
|
||||
data.token = userToken
|
||||
}
|
||||
} else if (this.shareType == 3) {
|
||||
data = {
|
||||
page: 3, //拼团
|
||||
url: h5Url + this.$globalConstVars.shareUrl,
|
||||
params: {
|
||||
goodsId: this.goodsId,
|
||||
groupId: this.groupId,
|
||||
teamId: this.teamId
|
||||
},
|
||||
type: 1,//URL
|
||||
client: 1
|
||||
}
|
||||
let userToken = this.$db.get('userToken')
|
||||
if (userToken) {
|
||||
data.token = userToken
|
||||
}
|
||||
}
|
||||
let _this = this;
|
||||
_this.$u.api.share(data).then(res => {
|
||||
if (res.status) {
|
||||
uni.setClipboardData({
|
||||
data: res.data,
|
||||
success: function (data) {
|
||||
_this.$refs.uToast.show({ message: '复制成功', type: 'success' })
|
||||
},
|
||||
fail: function (err) {
|
||||
_this.$u.toast('复制分享URL失败');
|
||||
}
|
||||
})
|
||||
} else {
|
||||
_this.$u.toast('复制分享URL失败');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 分享操作
|
||||
share() {
|
||||
// h5分享 判断是否是微信浏览器 引导用户完成分享操作
|
||||
|
||||
// 其他浏览器的分享
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -96,8 +96,8 @@
|
||||
params: {
|
||||
goodsId: this.goodsId
|
||||
},
|
||||
type: 3,//海报
|
||||
client: 2 //终端
|
||||
type: this.$globalConstVars.shareModel.poster,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram
|
||||
}
|
||||
let userToken = this.$db.get('userToken')
|
||||
if (userToken) {
|
||||
@@ -112,31 +112,43 @@
|
||||
goodsId: this.goodsId,
|
||||
teamId: this.teamId
|
||||
},
|
||||
type: 3,//海报
|
||||
client: 2
|
||||
type: this.$globalConstVars.shareModel.poster,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram
|
||||
}
|
||||
let userToken = this.$db.get('userToken')
|
||||
if (userToken) {
|
||||
data.token = userToken
|
||||
}
|
||||
console.log(data);
|
||||
}
|
||||
else if (this.shareType == this.$globalConstVars.shareType.group || this.shareType == this.$globalConstVars.shareType.seckill) {
|
||||
else if (this.shareType == this.$globalConstVars.shareType.group) {
|
||||
data = {
|
||||
page: this.shareType,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
params: {
|
||||
goodsId: this.goodsId,
|
||||
groupId: this.groupId
|
||||
},
|
||||
type: 3,//海报
|
||||
client: 2
|
||||
type: this.$globalConstVars.shareModel.poster,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram
|
||||
}
|
||||
let userToken = this.$db.get('userToken')
|
||||
if (userToken) {
|
||||
data.token = userToken
|
||||
}
|
||||
}
|
||||
else if (this.shareType == this.$globalConstVars.shareType.seckill) {
|
||||
data = {
|
||||
page: this.shareType,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
params: {
|
||||
groupId: this.groupId
|
||||
},
|
||||
type: this.$globalConstVars.shareModel.poster,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram
|
||||
}
|
||||
let userToken = this.$db.get('userToken')
|
||||
if (userToken) {
|
||||
data.token = userToken
|
||||
}
|
||||
console.log(data);
|
||||
}
|
||||
else if (this.shareType == this.$globalConstVars.shareType.goods) {
|
||||
data = {
|
||||
@@ -145,14 +157,13 @@
|
||||
params: {
|
||||
goodsId: this.goodsId,
|
||||
},
|
||||
type: 3,//海报
|
||||
client: 2
|
||||
type: this.$globalConstVars.shareModel.poster,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram
|
||||
}
|
||||
let userToken = this.$db.get('userToken')
|
||||
if (userToken) {
|
||||
data.token = userToken
|
||||
}
|
||||
console.log(data);
|
||||
}
|
||||
else if (this.shareType == this.$globalConstVars.shareType.addPinTuan) {
|
||||
data = {
|
||||
@@ -163,14 +174,13 @@
|
||||
groupId: this.groupId,
|
||||
teamId: this.teamId
|
||||
},
|
||||
type: 3,//海报
|
||||
client: 2
|
||||
type: this.$globalConstVars.shareModel.poster,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram
|
||||
}
|
||||
let userToken = this.$db.get('userToken')
|
||||
if (userToken) {
|
||||
data.token = userToken
|
||||
}
|
||||
console.log(data);
|
||||
} else if (this.shareType == this.$globalConstVars.shareType.solitaire) {
|
||||
data = {
|
||||
page: this.shareType,
|
||||
@@ -178,8 +188,22 @@
|
||||
params: {
|
||||
id: this.objectId
|
||||
},
|
||||
type: 3,//海报
|
||||
client: 2
|
||||
type: this.$globalConstVars.shareModel.poster,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram
|
||||
}
|
||||
let userToken = this.$db.get('userToken')
|
||||
if (userToken) {
|
||||
data.token = userToken
|
||||
}
|
||||
} else if (this.shareType == this.$globalConstVars.shareType.serviceGoods) {
|
||||
data = {
|
||||
page: this.shareType,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
params: {
|
||||
serviceGoodsId: this.objectId
|
||||
},
|
||||
type: this.$globalConstVars.shareModel.poster,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram
|
||||
}
|
||||
let userToken = this.$db.get('userToken')
|
||||
if (userToken) {
|
||||
@@ -191,7 +215,10 @@
|
||||
uni.hideLoading();
|
||||
if (
|
||||
this.shareType == this.$globalConstVars.shareType.goods ||
|
||||
this.shareType == this.$globalConstVars.shareType.pinTuan
|
||||
this.shareType == this.$globalConstVars.shareType.pinTuan ||
|
||||
this.shareType == this.$globalConstVars.shareType.seckill ||
|
||||
this.shareType == this.$globalConstVars.shareType.group ||
|
||||
this.shareType == this.$globalConstVars.shareType.serviceGoods
|
||||
) {
|
||||
//data.posterUrl = encodeURIComponent(res.data);
|
||||
data.params.posterUrl = res.data;
|
||||
|
||||
@@ -205,16 +205,7 @@
|
||||
});
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
uni.createSelectorQuery().in(this).select('#fy_dropdown__menu').boundingClientRect().exec(rect => {
|
||||
const data = rect[0];
|
||||
const top = data.top + this.titleHeight + this.H5NavBarHeight + 'px';
|
||||
this.maskClass.top = top;
|
||||
this.transClass.top = top;
|
||||
});
|
||||
// #endif
|
||||
|
||||
// #ifndef APP-NVUE || H5
|
||||
// #ifndef APP-NVUE
|
||||
uni.createSelectorQuery().in(this).select('.fy_dropdown__menu').boundingClientRect(rect => {
|
||||
const top = rect.top + this.titleHeight + 'px';
|
||||
this.maskClass.top = top;
|
||||
|
||||
@@ -9,9 +9,6 @@ import * as Db from '@/common/utils/dbHelper.js'
|
||||
//全局常量配置
|
||||
import * as GlobalConstVars from '@/common/setting/constVarsHelper.js'
|
||||
|
||||
//全局常量配置
|
||||
import * as CoreTheme from '@/common/setting/coreThemeHelper.js'
|
||||
|
||||
import store from '@/common/store'
|
||||
|
||||
//引入全局uView
|
||||
@@ -44,7 +41,6 @@ Vue.prototype.$upload = Upload;
|
||||
Vue.prototype.$common = Common;
|
||||
Vue.prototype.$db = Db;
|
||||
Vue.prototype.$globalConstVars = GlobalConstVars;
|
||||
Vue.prototype.$coreTheme = CoreTheme;
|
||||
Vue.prototype.$store = store;
|
||||
|
||||
|
||||
|
||||
@@ -1,182 +1,179 @@
|
||||
{
|
||||
"name": "南山田舍",
|
||||
"appid": "__UNI__EAACF14",
|
||||
"description": "核心商城系统(CoreShop)是基于uni-app框架开发的商城应用程序",
|
||||
"versionName": "1.0",
|
||||
"versionCode": 1,
|
||||
"transformPx": false,
|
||||
"app-plus": {
|
||||
/* 5+App特有相关 */
|
||||
"modules": {
|
||||
"Payment": {},
|
||||
"VideoPlayer": {},
|
||||
"Maps": {}
|
||||
},
|
||||
/* 模块配置 */
|
||||
"distribute": {
|
||||
/* 应用发布信息 */
|
||||
"android": {
|
||||
/* android打包配置 */
|
||||
"permissions": [
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
],
|
||||
"abiFilters": [ "armeabi-v7a", "arm64-v8a", "x86" ]
|
||||
},
|
||||
"ios": {},
|
||||
/* ios打包配置 */
|
||||
"sdkConfigs": {
|
||||
"payment": {
|
||||
"weixin": {
|
||||
"appid": "wx11d95cdaee6058f6"
|
||||
}
|
||||
"name" : "核心商城系统",
|
||||
"appid" : "__UNI__EAACF14",
|
||||
"description" : "核心商城系统(CoreShop)是基于uni-app框架开发的商城应用程序",
|
||||
"versionName" : "1.0",
|
||||
"versionCode" : 1,
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
/* 5+App特有相关 */
|
||||
"modules" : {
|
||||
"Payment" : {},
|
||||
"VideoPlayer" : {},
|
||||
"Maps" : {}
|
||||
},
|
||||
"ad": {},
|
||||
"maps": {
|
||||
"amap": {
|
||||
"appkey_ios": "91b94ecb48605c4e048aa1971459eca7",
|
||||
"appkey_android": "91b94ecb48605c4e048aa1971459eca7"
|
||||
}
|
||||
/* 模块配置 */
|
||||
"distribute" : {
|
||||
/* 应用发布信息 */
|
||||
"android" : {
|
||||
/* android打包配置 */
|
||||
"permissions" : [
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
],
|
||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
|
||||
},
|
||||
"ios" : {},
|
||||
/* ios打包配置 */
|
||||
"sdkConfigs" : {
|
||||
"payment" : {
|
||||
"weixin" : {
|
||||
"appid" : "wx11d95cdaee6058f6"
|
||||
}
|
||||
},
|
||||
"ad" : {},
|
||||
"maps" : {
|
||||
"amap" : {
|
||||
"appkey_ios" : "91b94ecb48605c4e048aa1971459eca7",
|
||||
"appkey_android" : "91b94ecb48605c4e048aa1971459eca7"
|
||||
}
|
||||
},
|
||||
"oauth" : {
|
||||
"univerify" : {}
|
||||
},
|
||||
"share" : {}
|
||||
},
|
||||
"icons" : {
|
||||
"android" : {
|
||||
"hdpi" : "",
|
||||
"xhdpi" : "",
|
||||
"xxhdpi" : "",
|
||||
"xxxhdpi" : ""
|
||||
},
|
||||
"ios" : {
|
||||
"appstore" : "",
|
||||
"ipad" : {
|
||||
"app" : "",
|
||||
"app@2x" : "",
|
||||
"notification" : "",
|
||||
"notification@2x" : "",
|
||||
"proapp@2x" : "",
|
||||
"settings" : "",
|
||||
"settings@2x" : "",
|
||||
"spotlight" : "",
|
||||
"spotlight@2x" : ""
|
||||
},
|
||||
"iphone" : {
|
||||
"app@2x" : "",
|
||||
"app@3x" : "",
|
||||
"notification@2x" : "",
|
||||
"notification@3x" : "",
|
||||
"settings@2x" : "",
|
||||
"settings@3x" : "",
|
||||
"spotlight@2x" : "",
|
||||
"spotlight@3x" : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"oauth": {
|
||||
"univerify": {}
|
||||
},
|
||||
"share": {}
|
||||
},
|
||||
"icons": {
|
||||
"android": {
|
||||
"hdpi": "unpackage/res/icons/72x72.png",
|
||||
"xhdpi": "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi": "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi": "unpackage/res/icons/192x192.png"
|
||||
},
|
||||
"ios": {
|
||||
"appstore": "unpackage/res/icons/1024x1024.png",
|
||||
"ipad": {
|
||||
"app": "unpackage/res/icons/76x76.png",
|
||||
"app@2x": "unpackage/res/icons/152x152.png",
|
||||
"notification": "unpackage/res/icons/20x20.png",
|
||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x": "unpackage/res/icons/167x167.png",
|
||||
"settings": "unpackage/res/icons/29x29.png",
|
||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||
"spotlight": "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x": "unpackage/res/icons/80x80.png"
|
||||
},
|
||||
"iphone": {
|
||||
"app@2x": "unpackage/res/icons/120x120.png",
|
||||
"app@3x": "unpackage/res/icons/180x180.png",
|
||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||
"notification@3x": "unpackage/res/icons/60x60.png",
|
||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||
"settings@3x": "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x": "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x": "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
"splashscreen" : {
|
||||
"waiting" : true
|
||||
}
|
||||
}
|
||||
},
|
||||
"splashscreen": {
|
||||
"waiting": true
|
||||
}
|
||||
},
|
||||
/* SDK配置 */
|
||||
"quickapp": {},
|
||||
/* 快应用特有相关 */
|
||||
"mp-weixin": {
|
||||
"appid": "wx6fc139d4de0b470f",
|
||||
"setting": {
|
||||
"urlCheck": true,
|
||||
"postcss": true,
|
||||
"minified": true,
|
||||
"es6": true,
|
||||
"checkSiteMap": false
|
||||
/* SDK配置 */
|
||||
"quickapp" : {},
|
||||
/* 快应用特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx6fc139d4de0b470f",
|
||||
"setting" : {
|
||||
"urlCheck" : true,
|
||||
"postcss" : true,
|
||||
"minified" : true,
|
||||
"es6" : true,
|
||||
"checkSiteMap" : false
|
||||
},
|
||||
"plugins" : {
|
||||
"chooseLocation" : {
|
||||
"version" : "1.0.9",
|
||||
"provider" : "wx76a9a06e5b4e693e"
|
||||
}
|
||||
},
|
||||
"permission" : {
|
||||
"scope.userLocation" : {
|
||||
"desc" : "你的位置信息将用于小程序定位"
|
||||
}
|
||||
},
|
||||
"optimization" : {
|
||||
"subPackages" : true
|
||||
},
|
||||
"requiredPrivateInfos" : [ "getLocation", "chooseAddress" ]
|
||||
},
|
||||
"plugins": {
|
||||
"chooseLocation": {
|
||||
"version": "1.0.9",
|
||||
"provider": "wx76a9a06e5b4e693e"
|
||||
}
|
||||
},
|
||||
"permission": {
|
||||
"scope.userLocation": {
|
||||
"desc": "你的位置信息将用于小程序定位"
|
||||
}
|
||||
},
|
||||
"optimization": {
|
||||
"subPackages": true
|
||||
},
|
||||
"requiredPrivateInfos": [
|
||||
"getLocation",
|
||||
"chooseAddress"
|
||||
]
|
||||
},
|
||||
"h5": {
|
||||
"title": "南山田舍",
|
||||
"domain": "https://h5.coreshop.coreshop.net",
|
||||
"router": {
|
||||
"base": "./",
|
||||
"mode": "hash"
|
||||
},
|
||||
"template": "index.html",
|
||||
"devServer": {
|
||||
"port": 80,
|
||||
"disableHostCheck": true,
|
||||
"https": true
|
||||
},
|
||||
"sdkConfigs": {
|
||||
"maps": {
|
||||
"qqmap": {
|
||||
"key": "AEIBZ-H5TRI-A6VGA-5KRNA-QKKK6-JGB33"
|
||||
"h5" : {
|
||||
"title" : "南山田舍",
|
||||
"domain" : "https://h5.coreshop.coreshop.net",
|
||||
"router" : {
|
||||
"base" : "./",
|
||||
"mode" : "hash"
|
||||
},
|
||||
"template" : "index.html",
|
||||
"devServer" : {
|
||||
"port" : 80,
|
||||
"disableHostCheck" : true,
|
||||
"https" : true
|
||||
},
|
||||
"sdkConfigs" : {
|
||||
"maps" : {
|
||||
"qqmap" : {
|
||||
"key" : "AEIBZ-H5TRI-A6VGA-5KRNA-QKKK6-JGB33"
|
||||
}
|
||||
}
|
||||
},
|
||||
"optimization" : {
|
||||
"treeShaking" : {
|
||||
"enable" : false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"optimization": {
|
||||
"treeShaking": {
|
||||
"enable": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"mp-toutiao": {
|
||||
"setting": {
|
||||
"es6": true,
|
||||
"postcss": true,
|
||||
"minified": true
|
||||
"mp-toutiao" : {
|
||||
"setting" : {
|
||||
"es6" : true,
|
||||
"postcss" : true,
|
||||
"minified" : true
|
||||
},
|
||||
"appid" : ""
|
||||
},
|
||||
"appid": ""
|
||||
},
|
||||
"mp-qq": {
|
||||
"setting": {
|
||||
"es6": true,
|
||||
"postcss": true,
|
||||
"minified": true
|
||||
"mp-qq" : {
|
||||
"setting" : {
|
||||
"es6" : true,
|
||||
"postcss" : true,
|
||||
"minified" : true
|
||||
},
|
||||
"optimization" : {
|
||||
"subPackages" : true
|
||||
}
|
||||
},
|
||||
"optimization": {
|
||||
"subPackages": true
|
||||
}
|
||||
},
|
||||
"mp-alipay": {},
|
||||
"mp-baidu": {}
|
||||
"mp-alipay" : {},
|
||||
"mp-baidu" : {}
|
||||
}
|
||||
|
||||
@@ -195,13 +195,6 @@
|
||||
"navigationBarTitleText": "支付"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "waiting/waiting",
|
||||
"style": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "等待支付"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "result/result",
|
||||
"style": {
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapMutations, mapActions, mapState } from 'vuex';
|
||||
import { mapState } from 'vuex';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
<u-icon name="arrow-left" size="19" @click="goNavigateBack"></u-icon>
|
||||
<u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
|
||||
<u-icon name="home" size="22" @click="goHome"></u-icon>
|
||||
<u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
|
||||
<u-icon name="share-fill" size="22" @click="goShare"></u-icon>
|
||||
</view>
|
||||
<view slot="right">
|
||||
</view>
|
||||
@@ -24,7 +22,7 @@
|
||||
<text class="coreshop-font-16">¥</text>
|
||||
<text class="coreshop-font-24">{{ product.price || '0.00' }}</text>
|
||||
</view>
|
||||
<view class="coreshop-flex-sub coreshop-flex coreshop-text-left coreshop-justify-center coreshop-align-center">
|
||||
<view class="coreshop-flex coreshop-text-left coreshop-justify-center coreshop-align-center">
|
||||
<view class="coreshop-text-right coreshop-time-right">
|
||||
<u-count-down :time="goodsInfo.groupTimestamp*1000" :autoStart="true" :millisecond="true" format="DD天HH时mm秒ss" @change="onChange">
|
||||
<view class="time">
|
||||
@@ -34,7 +32,7 @@
|
||||
</view>
|
||||
<text class="time__doc">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}</text>
|
||||
<text class="time__custom__item">{{ timeData.hours>=10?timeData.hours:'0'+timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
@@ -48,10 +46,6 @@
|
||||
</u-count-down>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<u-icon name="star-fill" :size="20" label="收藏" :labelSize="14" labelPos="right" @click="collection" v-if="isfav"></u-icon>
|
||||
<u-icon name="star" :size="20" label="收藏" :labelSize="14" labelPos="right" @click="collection" v-else></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-12 coreshop-multiple-line-clamp">
|
||||
<text class="coreshop-font-16 coreshop-text-black coreshop-font-weight-bold">{{ goodsInfo.name || '' }}</text>
|
||||
@@ -71,12 +65,11 @@
|
||||
<text class="font-color-orange">{{ goodsInfo.buyCount || '0' }}</text>
|
||||
</view>
|
||||
<view class="coreshop-font-12">
|
||||
<text>累计销售:</text>
|
||||
<text>{{ goodsInfo.buyCount || '0' }}</text>
|
||||
<u-icon name="share-fill" size="18" label="分享" :labelSize="12" labelPos="right" @click="goShare"></u-icon>
|
||||
</view>
|
||||
<view class="coreshop-font-12">
|
||||
<text>库存:</text>
|
||||
<text>{{product.stock}}</text>
|
||||
<u-icon name="star-fill" :size="18" label="收藏" :labelSize="12" labelPos="right" @click="collection" v-if="isfav"></u-icon>
|
||||
<u-icon name="star" :size="18" label="收藏" :labelSize="12" labelPos="right" @click="collection" v-else></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -193,13 +186,9 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 分享弹窗 -->
|
||||
<view class="coreshop-padding-0">
|
||||
<u-popup mode="bottom" :show="shareBox" ref="share">
|
||||
<!-- #ifdef H5 -->
|
||||
<coreshop-share-h5 :shareType='$globalConstVars.shareType.group' :groupId="groupId" :goodsId="goodsInfo.id" :shareImg="goodsInfo.image" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></coreshop-share-h5>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<coreshop-share-wx :shareType='$globalConstVars.shareType.group' :groupId="groupId" :goodsId="goodsInfo.id" :shareImg="goodsInfo.image" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></coreshop-share-wx>
|
||||
<!-- #endif -->
|
||||
@@ -258,7 +247,7 @@
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price - item.pointsDeduction).toFixed(2)}}元
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price,item.pointsDeduction).toFixed(2)}} 元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
@@ -295,7 +284,7 @@
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price - item.pointsDeduction).toFixed(2)}}元
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price,item.pointsDeduction).toFixed(2)}} 元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
@@ -354,7 +343,7 @@
|
||||
<view class="tabbar">
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-start coreshop-basis-4">
|
||||
<!-- 客服按钮 -->
|
||||
<!-- #ifdef H5 || APP-PLUS-NVUE || APP-PLUS -->
|
||||
<!-- #ifdef APP-PLUS-NVUE || APP-PLUS -->
|
||||
<view class="action" @click="showChat()">
|
||||
<button class="noButtonStyle">
|
||||
<u-icon name="server-fill" :size="20" label="找客服" :labelSize="12" labelPos="bottom"></u-icon>
|
||||
@@ -442,9 +431,8 @@
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.goodsId = e.id;
|
||||
this.groupId = e.groupId;
|
||||
if (this.goodsId && this.groupId) {
|
||||
this.groupId = e.id;
|
||||
if (this.groupId) {
|
||||
this.getServiceDescription();
|
||||
this.getGoodsInfo();
|
||||
this.getGoodsParams();
|
||||
@@ -517,7 +505,7 @@
|
||||
shareHref() {
|
||||
let pages = getCurrentPages();
|
||||
let page = pages[pages.length - 1];
|
||||
// #ifdef H5 || MP-WEIXIN || APP-PLUS || APP-PLUS-NVUE
|
||||
// #ifdef MP-WEIXIN || APP-PLUS || APP-PLUS-NVUE
|
||||
return this.$globalConstVars.apiBaseUrl + 'wap/' + page.route + '?id=' + this.goodsId + '&groupId=' + this.groupId;
|
||||
// #endif
|
||||
}
|
||||
@@ -593,8 +581,7 @@
|
||||
},
|
||||
getGoodsInfo() {
|
||||
let data = {
|
||||
id: this.goodsId,
|
||||
groupId: this.groupId,
|
||||
id: this.groupId,
|
||||
type: this.cartType,
|
||||
needSku: true,
|
||||
};
|
||||
@@ -626,6 +613,7 @@
|
||||
let info = res.data;
|
||||
_this.product = res.data.product;
|
||||
_this.goodsInfo = info;
|
||||
_this.goodsId = info.id;
|
||||
this.goodsSkuInfo = res.data.skuList;
|
||||
|
||||
if (_this.goodsInfo.album) {
|
||||
@@ -751,7 +739,6 @@
|
||||
this.submitStatus = true;
|
||||
this.buyNow();
|
||||
},
|
||||
// 跳转到h5分享页面
|
||||
goShare() {
|
||||
this.shareBox = true;
|
||||
},
|
||||
@@ -768,8 +755,6 @@
|
||||
},
|
||||
//在线客服
|
||||
showChat() {
|
||||
// #ifdef H5
|
||||
// #endif
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
this.$u.route('/pages/member/customerService/index');
|
||||
// #endif
|
||||
@@ -777,18 +762,17 @@
|
||||
//获取分享URL
|
||||
getShareUrl() {
|
||||
let data = {
|
||||
client: 2,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: 1,
|
||||
page: 9,
|
||||
type: this.$globalConstVars.shareModel.url,
|
||||
page: this.$globalConstVars.shareType.group,
|
||||
params: {
|
||||
goodsId: this.goodsId,
|
||||
groupId: this.groupId
|
||||
}
|
||||
};
|
||||
let userToken = this.$db.get('userToken');
|
||||
if (userToken && userToken != '') {
|
||||
data['token'] = userToken;
|
||||
data.token = userToken
|
||||
}
|
||||
this.$u.api.share(data).then(res => {
|
||||
this.shareUrl = res.data
|
||||
|
||||
@@ -9,35 +9,89 @@
|
||||
<view slot="right">
|
||||
</view>
|
||||
</u-navbar>
|
||||
<view class="goods-item" v-for="item in goodsList" :key="item.id" v-if="goodsList.length>0">
|
||||
<view class="activity-goods-box coreshop-flex coreshop-justify-between">
|
||||
<view class="img-box">
|
||||
<slot name="tag"></slot>
|
||||
<image class="img" :src="item.image" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="goods-right coreshop-flex coreshop-justify-between coreshop-flex-direction">
|
||||
<view class="title u-line-2">{{ item.name }}</view>
|
||||
<view class="tip u-line-1">{{ item.brief }}</view>
|
||||
<view class="slod-end">
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<u-line-progress :percentage="getPercent(item.buyPromotionCount, item.stock)"></u-line-progress>
|
||||
<view class="progress-text">已抢{{ getProgress(item.buyPromotionCount, item.stock) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-margin-top-10">
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<view class="current">¥{{ item.price }}</view>
|
||||
<view class="original">¥{{ item.mktprice }}</view>
|
||||
</view>
|
||||
<view class="coreshop-width-fit-content">
|
||||
<u-button type="error" size="mini" v-if="tabCurrent=='ing'" @click="goGroupBuyingDetail(item.id, item.groupId)">{{ btnType[tabCurrent].name }}</u-button>
|
||||
<u-button type="error" size="mini" v-else>{{ btnType[tabCurrent].name }}</u-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="coreshop-flex-direction coreshop-padding-10 coreshop-margin-10 coreshop-bg-white coreshop-text-black" v-for="(item, key) in goodsList" :key="key" v-if="goodsList.length>0">
|
||||
<view class="coreshop-flex">
|
||||
<view>
|
||||
<u--image :src="item.goodThumbnail" mode="widthFix" width="96px" height="96px"></u--image>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction coreshop-padding-left-10 coreshop-percent-100">
|
||||
<view class="coreshop-font-15 u-line-2 coreshop-text-black">{{ item.name }}</view>
|
||||
<view class="coreshop-font-11 coreshop-padding-top-5 coreshop-padding-bottom-3 u-line-2 coreshop-text-brown">{{ item.goodName }}</view>
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-padding-top-10 coreshop-padding-bottom-5">
|
||||
<view class="coreshop-font-11 coreshop-bg-orange coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10" v-if="item.maxNums>0">限购{{item.maxNums}}{{item.goodUnit}}</view>
|
||||
<view class="coreshop-font-11 coreshop-bg-green coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10" v-if="item.maxNums==0">不限购</view>
|
||||
<view class="coreshop-font-11 coreshop-bg-orange coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10" v-if="item.maxGoodsNums>0">总量{{item.maxGoodsNums}}{{item.goodUnit}}</view>
|
||||
<view class="coreshop-font-11 coreshop-bg-green coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10" v-if="item.maxGoodsNums==0">不限总量</view>
|
||||
|
||||
<view class="coreshop-font-11 coreshop-bg-olive coreshop-padding-2 coreshop-border-radius-4">{{item.goodViewCount}}人浏览</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-flex-direction-row coreshop-align-center" v-if="item.timestamp">
|
||||
<view class="coreshop-text-right coreshop-time-right coreshop-margin-top-10" v-if="(item.startStatus == 1) && item.timestamp">
|
||||
<u-count-down :time="item.timestamp*1000" :autoStart="true" format="DD天HH时mm秒ss" @change="onChange($event,key)">
|
||||
<view class="time coreshop-font-11">
|
||||
<view class="coreshop-font-12">仅剩:</view>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.days }}</text>
|
||||
</view>
|
||||
<text class="time__doc">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.hours >= 10 ? item.timeData.hours :'0' +item.timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.minutes }}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.seconds }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
<view class="coreshop-text-right coreshop-time-right coreshop-margin-top-10" v-if="(item.startStatus == 0) && item.timestamp">
|
||||
<u-count-down :time="item.timestamp*1000" :autoStart="true" format="DD天HH时mm秒ss" @change="onChange($event,key)">
|
||||
<view class="time">
|
||||
<view class="coreshop-font-12">即将开始:</view>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.days }}</text>
|
||||
</view>
|
||||
<text class="time__doc">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.hours>=10?item.timeData.hours:'0'+item.timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.minutes }}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.seconds }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-flex-direction-row coreshop-align-center coreshop-margin-top-10">
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<view class="coreshop-font-14 coreshop-text-red">¥{{item.price}}</view>
|
||||
<view class="coreshop-font-xs coreshop-text-through coreshop-margin-left-5">{{item.mktPrice}}元</view>
|
||||
</view>
|
||||
<view class="coreshop-groupPurchase-btn" v-if="item.startStatus == 1" @click="goGroupBuyingDetail(item.id)">立即团</view>
|
||||
<view class="coreshop-groupPurchase-btn" v-if="item.startStatus == 0">即将开始</view>
|
||||
<view class="coreshop-buy-btn-disabled" v-if="item.startStatus == 2">已结束</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="key+1 < listData.length">
|
||||
<view class="coreshop-divider">
|
||||
<view class="seckill"></view>
|
||||
<view class="dot">●</view>
|
||||
<view class="seckill"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 无数据时默认显示 -->
|
||||
<view class="coreshop-emptybox" v-else>
|
||||
<u-empty :icon="$globalConstVars.apiFilesUrl+'/static/images/empty/data.png'" icon-size="150" text="暂无团购信息" mode="list"></u-empty>
|
||||
@@ -50,9 +104,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
|
||||
data() {
|
||||
return {
|
||||
loadStatus: 'loadmore',
|
||||
@@ -126,7 +180,7 @@
|
||||
this.$u.api.getGroup(data).then(res => {
|
||||
if (res.status) {
|
||||
if (res.data) {
|
||||
let _goodsList = res.data.goods;
|
||||
let _goodsList = res.data.list;
|
||||
_this.goodsList = [..._this.goodsList, ..._goodsList]
|
||||
}
|
||||
_this.lastPage = res.data.totalPages;
|
||||
@@ -141,7 +195,10 @@
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
onChange(e, key) {
|
||||
this.$set(this.goodsList[key], 'timeData', e)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -17,36 +17,36 @@
|
||||
<text class="group-head__title">爆款推荐</text>
|
||||
<text class="group-head__notice">省钱省心限时拼</text>
|
||||
</view>
|
||||
<view class="group-box">
|
||||
<view class="goods-item" v-for="(item, index) in goodsList" :key="item.id" v-if="goodsList.length>0">
|
||||
<view class="group-box" v-if="list.length>0">
|
||||
<view class="goods-item" v-for="(item, index) in list" :key="item.id">
|
||||
<view class="coreshop-flex coreshop-justify-start coreshop-padding-left-10 coreshop-padding-top-10 coreshop-padding-bottom-10">
|
||||
<view>
|
||||
<view class="tag" v-if="index < 3">TOP{{ index + 1 }}</view>
|
||||
<u--image :src="item.image" mode="widthFix" width="100px" height="100px" radius="10"></u--image>
|
||||
<u--image :src="item.goodThumbnail" mode="widthFix" width="100px" height="100px" radius="10"></u--image>
|
||||
</view>
|
||||
<view class="goods-right coreshop-flex coreshop-flex-direction coreshop-padding-left-10 coreshop-padding-right-10">
|
||||
<view class="title u-line-2 coreshop-text-black">{{ item.pinTuanRule.name }}</view>
|
||||
<view class="tip u-line-2 coreshop-text-grey">{{ item.name }}</view>
|
||||
<view class="goods-right coreshop-flex coreshop-flex-direction coreshop-padding-left-10 coreshop-padding-right-10 coreshop-percent-100">
|
||||
<view class="title u-line-2 coreshop-text-black">{{ item.name }}</view>
|
||||
<view class="tip u-line-2 coreshop-text-grey">{{ item.goodName }}</view>
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-padding-top-10 coreshop-padding-bottom-10">
|
||||
<u-tag :text="'已拼'+item.pinTuanRecordNums+'单'" type="warning coreshop-margin-right-5 coreshop-font-10" shape="circle" size="mini"></u-tag>
|
||||
<u-tag :text="'已售'+item.buyCount+ item.unit" type="warning coreshop-margin-right-5 coreshop-font-10" shape="circle" size="mini"></u-tag>
|
||||
<u-tag :text="(item.pinTuanRule.peopleNumber || 0) +'人团'" type="success coreshop-font-10" shape="circle" size="mini"></u-tag>
|
||||
<view class="coreshop-font-11 coreshop-bg-green coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10">已拼{{item.buyPinTuanCount}}单</view>
|
||||
<view class="coreshop-font-11 coreshop-bg-orange coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10">已售{{item.pinTuanRecordNums}}{{item.goodUnit}}</view>
|
||||
<view class="coreshop-font-11 coreshop-bg-olive coreshop-padding-2 coreshop-border-radius-4">{{item.peopleNumber}}人团</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-flex-direction-row coreshop-align-center">
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<view class="current">¥{{ item.pinTuanPrice }}</view>
|
||||
<view class="original">¥{{ item.price }}</view>
|
||||
<view class="original">¥{{ item.mktPrice }}</view>
|
||||
</view>
|
||||
<view class="cu-btn buy-btn" @tap="goPinTuanDetail(item.id,item.pinTuanRule.id)">马上拼</view>
|
||||
<view class="coreshop-buy-btn" @tap="goPinTuanDetail(item.id)">马上拼</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 无数据时默认显示 -->
|
||||
<view class="coreshop-emptybox" v-else>
|
||||
<u-empty :icon="$globalConstVars.apiFilesUrl+'/static/images/empty/history.png'" icon-size="150" text="暂无提现明细" mode="list"></u-empty>
|
||||
</view>
|
||||
|
||||
<u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" margin-top="20" margin-bottom="20" />
|
||||
</view>
|
||||
<!-- 无数据时默认显示 -->
|
||||
<view class="coreshop-emptybox" v-else>
|
||||
<u-empty :icon="$globalConstVars.apiFilesUrl+'/static/images/empty/history.png'" icon-size="150" text="暂无提现明细" mode="list"></u-empty>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 空白 -->
|
||||
@@ -62,7 +62,9 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
goodsList: [],
|
||||
page: 1,
|
||||
limit: 10,
|
||||
list: [],
|
||||
status: 'loadmore',
|
||||
iconType: 'flower',
|
||||
loadText: {
|
||||
@@ -72,12 +74,41 @@
|
||||
}
|
||||
};
|
||||
},
|
||||
//加载执行
|
||||
onShow: function () {
|
||||
_this = this
|
||||
_this.getGoods();
|
||||
onLoad() {
|
||||
this.getPinTuanlist()
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.status === 'loadmore') {
|
||||
this.getPinTuanlist()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getPinTuanlist() {
|
||||
let _this = this;
|
||||
let data = {
|
||||
page: this.page,
|
||||
limit: this.limit
|
||||
}
|
||||
this.status = 'loading'
|
||||
this.$u.api.pinTuanList(data).then(res => {
|
||||
if (res.status) {
|
||||
if (res.data) {
|
||||
let _list = res.data
|
||||
this.list = [...this.list, ..._list]
|
||||
}
|
||||
if (res.code >= _this.list.length) {
|
||||
_this.page++
|
||||
_this.status = 'loadmore'
|
||||
} else {
|
||||
_this.status = 'nomore'
|
||||
}
|
||||
} else {
|
||||
_this.$u.toast(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
//取得列表数据
|
||||
getGoods: function () {
|
||||
uni.showLoading({
|
||||
@@ -93,7 +124,7 @@
|
||||
if (item.pinTuanPrice <= 0) {
|
||||
item.pinTuanPrice = '0.00';
|
||||
} else {
|
||||
item.pinTuanPrice = _this.$common.moneySub(item.price, item.pinTuanRule.discountAmount);
|
||||
item.pinTuanPrice = parseFloat(item.price - item.pinTuanRule.discountAmount).toFixed(2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.groupHeight { height: 61px !important; }
|
||||
|
||||
.group-swiper-c { height: 121px; }
|
||||
.group-swiper-c .swiper-item .coreshop-cell-item { height: 50%; }
|
||||
.group-swiper-c .swiper-item .coreshop-cell-item { height: 50%; padding: 10px 0px; }
|
||||
.group-swiper-c .swiper-item .coreshop-cell-item .user-head-img { width: 40px; height: 40px; border-radius: 50%; }
|
||||
.group-swiper-c .swiper-item .coreshop-cell-item .coreshop-cell-hd-title { max-width: 100px; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
|
||||
.group-swiper-c .swiper-item .coreshop-cell-item .coreshop-cell-item-bd { min-width: 75px; text-align: center; display: block; }
|
||||
@@ -33,3 +33,8 @@
|
||||
.coreshop-lower-shelf .coreshop-cell-item-bd { opacity: 0.4; }
|
||||
.coreshop-lower-shelf .coreshop-cell-item-ft { opacity: 0.4; }
|
||||
.coreshop-lower-shelf .coreshop-lower-box { position: absolute; height: calc(100% - 20px); width: calc(100% - 10px); background-color: rgba(0, 0, 0, 0.6); text-align: center; font-size: 14px; color: #dedede; -webkit-transition: left .15s; transition: left .15s; z-index: 999; -webkit-transition: all .15s; transition: all .15s; line-height: 40px; }
|
||||
|
||||
|
||||
.u-count-down {
|
||||
.u-count-down__text { font-size: 12px; }
|
||||
}
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
<view class="coreshop-navbar-left-slot" slot="left">
|
||||
<u-icon name="arrow-left" size="19" @click="goNavigateBack"></u-icon>
|
||||
<u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
|
||||
<u-icon name="home" size="22" @click="goHome"></u-icon>
|
||||
<u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
|
||||
<u-icon name="share-fill" size="22" @click="goShare"></u-icon>
|
||||
<u-icon name="home" size="22" @click="goHome"></u-icon>
|
||||
</view>
|
||||
<view slot="right">
|
||||
</view>
|
||||
@@ -24,7 +22,7 @@
|
||||
<text class="coreshop-font-16">¥</text>
|
||||
<text class="coreshop-font-24">{{ price || '0.00' }}</text>
|
||||
</view>
|
||||
<view class="coreshop-flex-sub coreshop-flex coreshop-text-left coreshop-justify-center coreshop-align-center">
|
||||
<view class="coreshop-flex coreshop-text-left coreshop-justify-center coreshop-align-center">
|
||||
<view class="coreshop-text-right coreshop-time-right" v-if="goodsInfo.pinTuanRule && goodsInfo.pinTuanRule.pinTuanStartStatus == 1">
|
||||
<u-count-down :time="goodsInfo.pinTuanRule.lastTime*1000" :autoStart="true" :millisecond="true" format="DD天HH时mm秒ss" @change="onChange">
|
||||
<view class="time">
|
||||
@@ -34,7 +32,7 @@
|
||||
</view>
|
||||
<text class="time__doc">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}</text>
|
||||
<text class="time__custom__item">{{ timeData.hours>=10?timeData.hours:'0'+timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
@@ -56,7 +54,7 @@
|
||||
</view>
|
||||
<text class="time__doc">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}</text>
|
||||
<text class="time__custom__item">{{ timeData.hours>=10?timeData.hours:'0'+timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
@@ -70,12 +68,7 @@
|
||||
</u-count-down>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<u-icon name="star-fill" :size="20" label="收藏" :labelSize="14" labelPos="right" @click="collection" v-if="isfav"></u-icon>
|
||||
<u-icon name="star" :size="20" label="收藏" :labelSize="14" labelPos="right" @click="collection" v-else></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="coreshop-margin-top-12 coreshop-multiple-line-clamp">
|
||||
<text class="coreshop-font-16 coreshop-text-black coreshop-font-weight-bold">{{ goodsInfo.name || '' }}</text>
|
||||
</view>
|
||||
@@ -94,12 +87,11 @@
|
||||
<text class="font-color-orange">{{ goodsInfo.buyPinTuanCount || '0' }}</text>
|
||||
</view>
|
||||
<view class="coreshop-font-12">
|
||||
<text>累计销售:</text>
|
||||
<text>{{ goodsInfo.buyCount || '0' }}</text>
|
||||
<u-icon name="share-fill" size="18" label="分享" :labelSize="12" labelPos="right" @click="goShare"></u-icon>
|
||||
</view>
|
||||
<view class="coreshop-font-12">
|
||||
<text>库存:</text>
|
||||
<text>{{product.stock}}</text>
|
||||
<u-icon name="star-fill" :size="18" label="收藏" :labelSize="12" labelPos="right" @click="collection" v-if="isfav"></u-icon>
|
||||
<u-icon name="star" :size="18" label="收藏" :labelSize="12" labelPos="right" @click="collection" v-else></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -140,76 +132,70 @@
|
||||
<view class="coreshop-margin-bottom-16">
|
||||
<text class="coreshop-text-black coreshop-font-weight-bold coreshop-font-15">开团信息</text>
|
||||
</view>
|
||||
<view class="tuan">
|
||||
<view class="coreshop-cell-group coreshop-margin-top-10 coreshop-margin-bottom-10" v-if="pinTuanRecord.length > 0">
|
||||
<view class="coreshop-cell-item right-img">
|
||||
<view class="coreshop-cell-item-hd">
|
||||
<view class="coreshop-cell-hd-title">{{ teamCount || '0' }}人在拼单,可直接参与</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group-swiper">
|
||||
<swiper class="group-swiper-c" :class="swiperSet.groupHeight" :indicator-dots="swiperSet.indicatorDots" :autoplay="swiperSet.autoplay" vertical="true" circular="true" :interval="swiperSet.interval" :duration="swiperSet.duration">
|
||||
<swiper-item v-for="(item, index) in pinTuanRecord" :key="index">
|
||||
<view class="swiper-item">
|
||||
<view class="coreshop-cell-item" :class="item[0].isOverdue?'coreshop-lower-shelf':''">
|
||||
<view class="img-lower-box" :class="item[0].isOverdue?'coreshop-lower-box':''" v-if="item[0].isOverdue">已结束</view>
|
||||
<view class="coreshop-cell-item-hd">
|
||||
<u--image width="35px" height="35px" :src="item[0].userAvatar" shape="circle"></u--image>
|
||||
<view class="coreshop-cell-hd-title coreshop-margin-left-8">{{ item[0].nickName || '' }}</view>
|
||||
</view>
|
||||
<view class="coreshop-cell-item-bd">
|
||||
<view class="coreshop-cell-bd-view">
|
||||
<text class="coreshop-cell-bd-text coreshop-font-xs">
|
||||
还差
|
||||
<text class="coreshop-text-red">{{ item[0].teamNums || '' }}人</text>
|
||||
拼成
|
||||
</text>
|
||||
</view>
|
||||
<view class="coreshop-cell-bd-view coreshop-text-center coreshop-flex coreshop-flex-nowrap coreshop-justify-center coreshop-align-center">
|
||||
<text class="coreshop-font-xs">剩余:</text>
|
||||
<u-count-down :time="item[0].lastTime * 1000 " class="coreshop-font-12"></u-count-down>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-cell-item-ft">
|
||||
<u-button type="success" size="mini" @click="selectTap(2, item[0].teamId)" v-if="!item[0].isOverdue">去拼单</u-button>
|
||||
<u-button type="default" size="mini" v-if="item[0].isOverdue">已结束</u-button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-cell-item" v-if="item[1]" :class="item[1].isOverdue?'coreshop-lower-shelf':''">
|
||||
<view class="img-lower-box" :class="item[1].isOverdue?'coreshop-lower-box':''" v-if="item[1].isOverdue">已结束</view>
|
||||
<view class="coreshop-cell-item-hd">
|
||||
<u--image width="40px" height="40px" :src="item[1].userAvatar" shape="circle" class="coreshop-margin-right-8"></u--image>
|
||||
<view class="coreshop-cell-hd-title">{{ item[1].nickName || '' }}</view>
|
||||
</view>
|
||||
<view class="coreshop-cell-item-bd">
|
||||
<view class="coreshop-cell-bd-view">
|
||||
<text class="coreshop-cell-bd-text coreshop-font-xs">
|
||||
还差
|
||||
<text class="coreshop-text-red">{{ item[1].teamNums || '' }}人</text>
|
||||
拼成
|
||||
</text>
|
||||
</view>
|
||||
<view class="coreshop-cell-bd-view">
|
||||
<view class="commodity-day">
|
||||
<text class="coreshop-font-xs">剩余:</text>
|
||||
<u-count-down :timestamp="item[1].lastTime" separator="zh" :show-days="true" :show-hours="true" :show-minutes="true" :show-seconds="true" font-size="22" separator-size="22" color="#ff7300" bg-color="#ffd4b0" @end="end(index,1)"></u-count-down>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-cell-item-ft">
|
||||
<u-button type="success" size="mini" @click="selectTap(2, item[1].teamId)" v-if="!item[1].isOverdue">去拼单</u-button>
|
||||
<u-button type="default" size="mini" v-if="item[1].isOverdue">已结束</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="coreshop-cell-group coreshop-margin-top-10 coreshop-margin-bottom-10" v-if="pinTuanRecord.length > 0">
|
||||
<view class="coreshop-cell-item right-img">
|
||||
<view class="coreshop-cell-item-hd">
|
||||
<view class="coreshop-cell-hd-title">{{ teamCount || '0' }}人在拼单,可直接参与</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-cell-group coreshop-margin-top-10 coreshop-margin-bottom-10" v-else>
|
||||
<view class="coreshop-cell-item right-img">
|
||||
<view class="coreshop-cell-item-hd"><view class="coreshop-cell-hd-title">暂无开团信息</view></view>
|
||||
</view>
|
||||
<view class="group-swiper">
|
||||
<swiper class="group-swiper-c" :class="swiperSet.groupHeight" :indicator-dots="swiperSet.indicatorDots" :autoplay="swiperSet.autoplay" vertical="true" circular="true" :interval="swiperSet.interval" :duration="swiperSet.duration">
|
||||
<swiper-item v-for="(item, index) in pinTuanRecord" :key="index">
|
||||
<view class="swiper-item">
|
||||
<view class="coreshop-cell-item" :class="item[0].isOverdue?'coreshop-lower-shelf':''">
|
||||
<view class="coreshop-cell-item-bd">
|
||||
<view class="coreshop-cell-bd-view">
|
||||
<text class="coreshop-cell-bd-text coreshop-font-xs">
|
||||
还差
|
||||
<text class="coreshop-text-red">{{ item[0].teamNums || '' }}人</text>
|
||||
拼成
|
||||
</text>
|
||||
</view>
|
||||
<view class="coreshop-cell-bd-view coreshop-text-center coreshop-flex coreshop-flex-nowrap coreshop-justify-center coreshop-align-center">
|
||||
<text class="coreshop-font-xs">剩余:</text>
|
||||
<u-count-down :time="item[0].lastTime * 1000 " class="coreshop-font-11"></u-count-down>
|
||||
</view>
|
||||
</view>
|
||||
<view class="img-lower-box" :class="item[0].isOverdue?'coreshop-lower-box':''" v-if="item[0].isOverdue">已结束</view>
|
||||
<view class="coreshop-cell-item-hd">
|
||||
<u-avatar-group :urls="item[0].teams" keyName="userAvatar" size="35" gap="0.2" random-bg-color="true"></u-avatar-group>
|
||||
</view>
|
||||
<view class="coreshop-cell-item-ft">
|
||||
<u-button type="success" size="mini" @click="selectTap(2, item[0].teamId)" v-if="!item[0].isOverdue">去拼单</u-button>
|
||||
<u-button type="default" size="mini" v-if="item[0].isOverdue">已结束</u-button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-cell-item" v-if="item[1]" :class="item[1].isOverdue?'coreshop-lower-shelf':''">
|
||||
<view class="coreshop-cell-item-bd">
|
||||
<view class="coreshop-cell-bd-view">
|
||||
<text class="coreshop-cell-bd-text coreshop-font-xs">
|
||||
还差
|
||||
<text class="coreshop-text-red">{{ item[1].teamNums || '' }}人</text>
|
||||
拼成
|
||||
</text>
|
||||
</view>
|
||||
<view class="coreshop-cell-bd-view coreshop-text-center coreshop-flex coreshop-flex-nowrap coreshop-justify-center coreshop-align-center">
|
||||
<text class="coreshop-font-xs">剩余:</text>
|
||||
<u-count-down :time="item[1].lastTime * 1000 " class="coreshop-font-11" @end="end(index,1)"></u-count-down>
|
||||
</view>
|
||||
</view>
|
||||
<view class="img-lower-box" :class="item[1].isOverdue?'coreshop-lower-box':''" v-if="item[1].isOverdue">已结束</view>
|
||||
<view class="coreshop-cell-item-hd">
|
||||
<u-avatar-group :urls="item[1].teams" keyName="userAvatar" size="35" gap="0.2" random-bg-color="true"></u-avatar-group>
|
||||
</view>
|
||||
<view class="coreshop-cell-item-ft">
|
||||
<u-button type="success" size="mini" @click="selectTap(2, item[1].teamId)" v-if="!item[1].isOverdue">去拼单</u-button>
|
||||
<u-button type="default" size="mini" v-if="item[1].isOverdue">已结束</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-cell-group coreshop-margin-top-10 coreshop-margin-bottom-10" v-else>
|
||||
<view class="coreshop-cell-item right-img">
|
||||
<view class="coreshop-cell-item-hd"><view class="coreshop-cell-hd-title">暂无开团信息</view></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -306,7 +292,7 @@
|
||||
<view class="ig-top-b">
|
||||
<view class="igtb-top">
|
||||
还差
|
||||
<text class="red-price">{{ teamInfo.teamNums || '' }}</text>
|
||||
<text class="coreshop-text-red">{{ teamInfo.teamNums || '' }}</text>
|
||||
人,赶快拼单吧
|
||||
</view>
|
||||
<view class="igtb-mid"><button class="coreshop-btn" @click="selectTap(2, teamInfo.id)">参与拼团</button></view>
|
||||
@@ -317,9 +303,6 @@
|
||||
<!-- 分享弹窗 -->
|
||||
<view class="coreshop-padding-0">
|
||||
<u-popup mode="bottom" :show="shareBox" ref="share">
|
||||
<!-- #ifdef H5 -->
|
||||
<coreshop-share-h5 :shareType='$globalConstVars.shareType.pinTuan' :goodsId="goodsInfo.id" :groupId="pinTuanId" :shareImg="goodsInfo.image" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></coreshop-share-h5>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<coreshop-share-wx :shareType='$globalConstVars.shareType.pinTuan' :goodsId="goodsInfo.id" :groupId="pinTuanId" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></coreshop-share-wx>
|
||||
<!-- #endif -->
|
||||
@@ -378,7 +361,7 @@
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price - item.pointsDeduction).toFixed(2)}}元
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price,item.pointsDeduction).toFixed(2)}} 元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
@@ -415,7 +398,7 @@
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price - item.pointsDeduction).toFixed(2)}}元
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price,item.pointsDeduction).toFixed(2)}} 元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
@@ -440,7 +423,7 @@
|
||||
<view class="tabbar">
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-start coreshop-basis-4">
|
||||
<!-- 客服按钮 -->
|
||||
<!-- #ifdef H5 || APP-PLUS-NVUE || APP-PLUS -->
|
||||
<!-- #ifdef APP-PLUS-NVUE || APP-PLUS -->
|
||||
<view class="action" @click="showChat()">
|
||||
<button class="noButtonStyle">
|
||||
<u-icon name="server-fill" :size="20" label="找客服" :labelSize="12" labelPos="bottom"></u-icon>
|
||||
@@ -533,7 +516,7 @@
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import { mapMutations, mapActions, mapState } from 'vuex';
|
||||
import { mapState } from 'vuex';
|
||||
|
||||
|
||||
export default {
|
||||
@@ -546,7 +529,6 @@
|
||||
// 后端返回的商品信息
|
||||
goodsSkuInfo: {},
|
||||
discountsGoodsSkuInfo: {},
|
||||
|
||||
goodsId: 0, // 商品id
|
||||
pinTuanId: 0, // 拼团ID
|
||||
goodsInfo: {}, // 商品详情
|
||||
@@ -594,13 +576,12 @@
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.goodsId = e.id;
|
||||
this.pinTuanId = e.pinTuanId;
|
||||
this.pinTuanId = e.id;
|
||||
if (e.teamId && e.teamId > 0) {
|
||||
this.teamId = e.teamId;
|
||||
this.getTeam(this.teamId);
|
||||
}
|
||||
if (this.goodsId) {
|
||||
if (this.pinTuanId) {
|
||||
this.getServiceDescription();
|
||||
this.getGoodsInfo();
|
||||
this.getGoodsParams();
|
||||
@@ -681,7 +662,7 @@
|
||||
shareHref() {
|
||||
let pages = getCurrentPages();
|
||||
let page = pages[pages.length - 1];
|
||||
// #ifdef H5 || MP-WEIXIN || APP-PLUS || APP-PLUS-NVUE
|
||||
// #ifdef MP-WEIXIN || APP-PLUS || APP-PLUS-NVUE
|
||||
return this.$globalConstVars.apiBaseUrl + 'wap/' + page.route + '?id=' + this.goodsId + '&pinTuanId=' + this.pinTuanId;
|
||||
// #endif
|
||||
},
|
||||
@@ -777,7 +758,7 @@
|
||||
// 如果用户已经登录 要传用户token
|
||||
let userToken = this.$db.get('userToken');
|
||||
if (userToken) {
|
||||
data['token'] = userToken;
|
||||
data.token = userToken
|
||||
}
|
||||
let _this = this;
|
||||
_this.$u.api.pinTuanGoodsInfo(data).then(res => {
|
||||
@@ -801,7 +782,7 @@
|
||||
} else {
|
||||
let info = res.data;
|
||||
this.product = res.data.product;
|
||||
|
||||
this.goodsId = info.id;
|
||||
_this.goodsInfo = info;
|
||||
this.goodsSkuInfo = res.data.skuList;
|
||||
|
||||
@@ -836,8 +817,9 @@
|
||||
_this.discountAmount = parseFloat(info.pinTuanRule.discountAmount).toFixed(2);
|
||||
|
||||
_this.isfav = _this.goodsInfo.isfav;
|
||||
_this.price = _this.pinTuanPrice = _this.$common.moneySub(_this.product.price, _this.discountAmount);
|
||||
_this.price = _this.pinTuanPrice = parseFloat(_this.product.price - _this.discountAmount).toFixed(2);
|
||||
|
||||
// 获取拼团记录
|
||||
// 获取拼团记录
|
||||
let pinTuanData = info.pinTuanRecord;
|
||||
let newData = new Array();
|
||||
@@ -852,6 +834,9 @@
|
||||
}
|
||||
}
|
||||
pinTuanData.length < 2 ? (_this.swiperSet.groupHeight = 'groupHeight') : (_this.swiperSet.groupHeight = '');
|
||||
if (pinTuanData.length > 1) {
|
||||
_this.swiperSet.autoplay = true;
|
||||
}
|
||||
_this.pinTuanRecord = newData;
|
||||
_this.teamCount = info.pinTuanRecordNums;
|
||||
// 判断如果登录用户添加商品浏览足迹
|
||||
@@ -968,7 +953,6 @@
|
||||
end(index, number) {
|
||||
this.pinTuanRecord[index][number].isOverdue = true;
|
||||
},
|
||||
// 跳转到h5分享页面
|
||||
goShare() {
|
||||
this.shareBox = true;
|
||||
},
|
||||
@@ -989,8 +973,6 @@
|
||||
},
|
||||
//在线客服
|
||||
showChat() {
|
||||
// #ifdef H5
|
||||
// #endif
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
this.$u.route('/pages/member/customerService/index');
|
||||
// #endif
|
||||
@@ -998,10 +980,10 @@
|
||||
//获取分享URL
|
||||
getShareUrl() {
|
||||
let data = {
|
||||
client: 2,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: 1,
|
||||
page: 3,
|
||||
type: this.$globalConstVars.shareModel.url,
|
||||
page: this.$globalConstVars.shareType.pinTuan,
|
||||
params: {
|
||||
groupId: this.pinTuanId,
|
||||
goodsId: this.goodsId,
|
||||
@@ -1028,7 +1010,7 @@
|
||||
if (teamId) {
|
||||
this.teamId = teamId;
|
||||
} else {
|
||||
this.teamId == 0;
|
||||
this.teamId = 0;
|
||||
}
|
||||
if (this.pinTuanType == 2) {
|
||||
this.price = this.pinTuanPrice;
|
||||
|
||||
@@ -17,36 +17,88 @@
|
||||
</view>
|
||||
<view class="content-box">
|
||||
<scroll-view scroll-y="true" enable-back-to-top @scrolltolower="loadMore" class="scroll-box">
|
||||
<view class="goods-item" v-for="item in goodsList" :key="item.id" v-if="goodsList.length>0">
|
||||
<view class="activity-goods-box coreshop-flex coreshop-justify-between">
|
||||
<view class="img-box">
|
||||
<slot name="tag"></slot>
|
||||
<image class="img" :src="item.image" mode="aspectFill"></image>
|
||||
<view class="coreshop-flex-direction coreshop-padding-10 coreshop-margin-10 coreshop-bg-white coreshop-text-black" v-for="(item, key) in goodsList" :key="key" v-if="goodsList.length>0">
|
||||
<view class="coreshop-flex">
|
||||
<view>
|
||||
<u--image :src="item.goodThumbnail" mode="widthFix" width="96px" height="96px"></u--image>
|
||||
</view>
|
||||
<view class="goods-right coreshop-flex coreshop-justify-between coreshop-flex-direction">
|
||||
<view class="title u-line-2">{{ item.name }}</view>
|
||||
<view class="tip u-line-1">{{ item.brief }}</view>
|
||||
<view class="slod-end">
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<u-line-progress :percentage="getPercent(item.buyPromotionCount, item.stock)"></u-line-progress>
|
||||
<view class="progress-text">已抢{{ getProgress(item.buyPromotionCount, item.stock) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-margin-top-10">
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<view class="current">¥{{ item.price }}</view>
|
||||
<view class="original">¥{{ item.mktprice }}</view>
|
||||
</view>
|
||||
<view class="coreshop-width-fit-content">
|
||||
<u-button type="error" class="buy-btn" size="mini" v-if="tabCurrent=='ing'" @click="goSeckillDetail(item.id, item.groupId)">{{ btnType[tabCurrent].name }}</u-button>
|
||||
<u-button type="error" class="buy-btn" size="mini" v-else>{{ btnType[tabCurrent].name }}</u-button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction coreshop-padding-left-10 coreshop-percent-100">
|
||||
<view class="coreshop-font-15 u-line-2 coreshop-text-black">{{ item.name }}</view>
|
||||
<view class="coreshop-font-11 coreshop-padding-top-5 coreshop-padding-bottom-3 u-line-2 coreshop-text-brown">{{ item.goodName }}</view>
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-padding-top-10 coreshop-padding-bottom-5">
|
||||
<view class="coreshop-font-11 coreshop-bg-orange coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10" v-if="item.maxNums>0">限购{{item.maxNums}}{{item.goodUnit}}</view>
|
||||
<view class="coreshop-font-11 coreshop-bg-green coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10" v-if="item.maxNums==0">不限购</view>
|
||||
<view class="coreshop-font-11 coreshop-bg-orange coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10" v-if="item.maxGoodsNums>0">总量{{item.maxGoodsNums}}{{item.goodUnit}}</view>
|
||||
<view class="coreshop-font-11 coreshop-bg-green coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10" v-if="item.maxGoodsNums==0">不限总量</view>
|
||||
|
||||
<view class="coreshop-font-11 coreshop-bg-olive coreshop-padding-2 coreshop-border-radius-4">{{item.goodViewCount}}人浏览</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-flex-direction-row coreshop-align-center" v-if="item.timestamp">
|
||||
<view class="coreshop-text-right coreshop-time-right coreshop-margin-top-10" v-if="(item.startStatus == 1) && item.timestamp">
|
||||
<u-count-down :time="item.timestamp*1000" :autoStart="true" format="DD天HH时mm秒ss" @change="onChange($event,key)">
|
||||
<view class="time coreshop-font-11">
|
||||
<view class="coreshop-font-12">仅剩:</view>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.days }}</text>
|
||||
</view>
|
||||
<text class="time__doc">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.hours >= 10 ? item.timeData.hours :'0' +item.timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.minutes }}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.seconds }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
<view class="coreshop-text-right coreshop-time-right coreshop-margin-top-10" v-if="(item.startStatus == 0) && item.timestamp">
|
||||
<u-count-down :time="item.timestamp*1000" :autoStart="true" format="DD天HH时mm秒ss" @change="onChange($event,key)">
|
||||
<view class="time">
|
||||
<view class="coreshop-font-12">即将开始:</view>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.days }}</text>
|
||||
</view>
|
||||
<text class="time__doc">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.hours>=10?item.timeData.hours:'0'+item.timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.minutes }}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.seconds }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-flex-direction-row coreshop-align-center coreshop-margin-top-10">
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<view class="coreshop-font-14 coreshop-text-red">¥{{item.price}}</view>
|
||||
<view class="coreshop-font-xs coreshop-text-through coreshop-margin-left-5">{{item.mktPrice}}元</view>
|
||||
</view>
|
||||
<view class="coreshop-seckill-btn" v-if="item.startStatus == 1" @click="goSeckillDetail(item.id)">马上秒</view>
|
||||
<view class="coreshop-seckill-btn" v-if="item.startStatus == 0">即将开始</view>
|
||||
<view class="coreshop-buy-btn-disabled" v-if="item.startStatus == 2">已结束</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="key+1 < listData.length">
|
||||
<view class="coreshop-divider">
|
||||
<view class="seckill"></view>
|
||||
<view class="dot">●</view>
|
||||
<view class="seckill"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 无数据时默认显示 -->
|
||||
<view class="coreshop-emptybox" v-else>
|
||||
<u-empty :icon="$globalConstVars.apiFilesUrl+'/static/images/empty/data.png'" icon-size="150" text="暂无秒杀信息" mode="list"></u-empty>
|
||||
@@ -61,9 +113,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
|
||||
data() {
|
||||
return {
|
||||
loadStatus: 'loadmore',
|
||||
@@ -80,20 +132,6 @@
|
||||
status: 1,
|
||||
tabCurrent: 'ing',
|
||||
goodsList: [],
|
||||
btnType: {
|
||||
ing: {
|
||||
name: '立即抢购',
|
||||
color: 'btn-ing'
|
||||
},
|
||||
nostart: {
|
||||
name: '尚未开始',
|
||||
color: 'btn-nostart'
|
||||
},
|
||||
ended: {
|
||||
name: '已结束',
|
||||
color: 'btn-end',
|
||||
},
|
||||
},
|
||||
tabList: [
|
||||
{
|
||||
id: 'ing',
|
||||
@@ -115,16 +153,13 @@
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
setTimeout(() => {
|
||||
this.loading = true;
|
||||
}, 500);
|
||||
this.getGoodsList();
|
||||
},
|
||||
//onReachBottom() {
|
||||
// if (this.loadStatus === 'loadmore') {
|
||||
// this.getGoodsList()
|
||||
// }
|
||||
//},
|
||||
onReachBottom() {
|
||||
if (this.loadStatus === 'loadmore') {
|
||||
this.getGoodsList()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onTab(id, status) {
|
||||
this.tabCurrent = id;
|
||||
@@ -132,7 +167,7 @@
|
||||
this.goodsList = [];
|
||||
this.page = 1;
|
||||
this.loadStatus = 'loading';
|
||||
this.$u.debounce(this.getGoodsList, 500);
|
||||
this.getGoodsList();
|
||||
},
|
||||
// 百分比
|
||||
getProgress(sales, stock) {
|
||||
@@ -168,14 +203,14 @@
|
||||
let data = {
|
||||
page: this.page,
|
||||
limit: this.limit,
|
||||
type: 4, //秒杀
|
||||
type: this.$globalConstVars.paymentType.seckill,
|
||||
status: this.status
|
||||
}
|
||||
this.loadStatus = 'loading';
|
||||
this.$u.api.getGroup(data).then(res => {
|
||||
if (res.status) {
|
||||
if (res.data) {
|
||||
let _goodsList = res.data.goods;
|
||||
let _goodsList = res.data.list;
|
||||
_this.goodsList = [..._this.goodsList, ..._goodsList]
|
||||
}
|
||||
_this.lastPage = res.data.totalPages;
|
||||
@@ -190,7 +225,10 @@
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
onChange(e, key) {
|
||||
this.$set(this.goodsList[key], 'timeData', e)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
<u-icon name="arrow-left" size="19" @click="goNavigateBack"></u-icon>
|
||||
<u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
|
||||
<u-icon name="home" size="22" @click="goHome"></u-icon>
|
||||
<u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
|
||||
<u-icon name="share-fill" size="22" @click="goShare"></u-icon>
|
||||
</view>
|
||||
<view slot="right">
|
||||
</view>
|
||||
@@ -24,7 +22,7 @@
|
||||
<text class="coreshop-font-16">¥</text>
|
||||
<text class="coreshop-font-24">{{ product.price || '0.00' }}</text>
|
||||
</view>
|
||||
<view class="coreshop-flex-sub coreshop-flex coreshop-text-left coreshop-justify-center coreshop-align-center">
|
||||
<view class="coreshop-flex coreshop-text-left coreshop-justify-center coreshop-align-center">
|
||||
<view class="coreshop-text-right coreshop-time-right">
|
||||
<u-count-down :time="goodsInfo.groupTimestamp*1000" :autoStart="true" :millisecond="true" format="DD天HH时mm秒ss" @change="onChange">
|
||||
<view class="time">
|
||||
@@ -34,7 +32,7 @@
|
||||
</view>
|
||||
<text class="time__doc">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}</text>
|
||||
<text class="time__custom__item">{{ timeData.hours>=10?timeData.hours:'0'+timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
@@ -48,10 +46,6 @@
|
||||
</u-count-down>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<u-icon name="star-fill" :size="20" label="收藏" :labelSize="14" labelPos="right" @click="collection" v-if="isfav"></u-icon>
|
||||
<u-icon name="star" :size="20" label="收藏" :labelSize="14" labelPos="right" @click="collection" v-else></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-12 coreshop-multiple-line-clamp">
|
||||
<text class="coreshop-font-16 coreshop-text-black coreshop-font-weight-bold">{{ goodsInfo.name || '' }}</text>
|
||||
@@ -66,17 +60,16 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-16 coreshop-padding-top-16 coreshop-solid-top coreshop-flex coreshop-justify-between coreshop-align-center coreshop-text-gray">
|
||||
<view class="coreshop-font-12">
|
||||
<text>运费:</text>
|
||||
<text class="font-color-orange">包邮</text>
|
||||
</view>
|
||||
<view class="coreshop-font-12">
|
||||
<text>销量:</text>
|
||||
<text>{{ goodsInfo.buyCount || '0' }}</text>
|
||||
<text class="font-color-orange">{{ goodsInfo.buyCount || '0' }}</text>
|
||||
</view>
|
||||
<view class="coreshop-font-12">
|
||||
<text>库存:</text>
|
||||
<text>{{product.stock}}</text>
|
||||
<u-icon name="share-fill" size="18" label="分享" :labelSize="12" labelPos="right" @click="goShare"></u-icon>
|
||||
</view>
|
||||
<view class="coreshop-font-12">
|
||||
<u-icon name="star-fill" :size="18" label="收藏" :labelSize="12" labelPos="right" @click="collection" v-if="isfav"></u-icon>
|
||||
<u-icon name="star" :size="18" label="收藏" :labelSize="12" labelPos="right" @click="collection" v-else></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -201,14 +194,11 @@
|
||||
<!-- 分享弹窗 -->
|
||||
<view class="coreshop-padding-0">
|
||||
<u-popup mode="bottom" :show="shareBox" ref="share">
|
||||
<!-- #ifdef H5 -->
|
||||
<coreshop-share-h5 :shareType='$globalConstVars.shareType.seckill' :goodsId="goodsInfo.id" :shareImg="goodsInfo.image" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></coreshop-share-h5>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<coreshop-share-wx :shareType='$globalConstVars.shareType.seckill' :goodsId="goodsInfo.id" :shareImg="goodsInfo.image" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></coreshop-share-wx>
|
||||
<coreshop-share-wx :shareType='$globalConstVars.shareType.seckill' :groupId="groupId" :shareImg="goodsInfo.image" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></coreshop-share-wx>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-PLUS || APP-PLUS-NVUE -->
|
||||
<coreshop-share-app :shareType='$globalConstVars.shareType.seckill' :goodsId="goodsInfo.id" :shareImg="goodsInfo.image" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></coreshop-share-app>
|
||||
<coreshop-share-app :shareType='$globalConstVars.shareType.seckill' :groupId="groupId" :shareImg="goodsInfo.image" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></coreshop-share-app>
|
||||
<!-- #endif -->
|
||||
</u-popup>
|
||||
<div id="qrCode" ref="qrCodeDiv"></div>
|
||||
@@ -261,7 +251,7 @@
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price - item.pointsDeduction).toFixed(2)}}元
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price,item.pointsDeduction).toFixed(2)}} 元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
@@ -298,7 +288,7 @@
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price - item.pointsDeduction).toFixed(2)}}元
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price,item.pointsDeduction).toFixed(2)}} 元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
@@ -357,7 +347,7 @@
|
||||
<view class="tabbar">
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-start coreshop-basis-4">
|
||||
<!-- 客服按钮 -->
|
||||
<!-- #ifdef H5 || APP-PLUS-NVUE || APP-PLUS -->
|
||||
<!-- #ifdef APP-PLUS-NVUE || APP-PLUS -->
|
||||
<view class="action" @click="showChat()">
|
||||
<button class="noButtonStyle">
|
||||
<u-icon name="server-fill" :size="20" label="找客服" :labelSize="12" labelPos="bottom"></u-icon>
|
||||
@@ -378,11 +368,6 @@
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<!--<view class="coreshop-border-radius-20 coreshop-flex coreshop-align-end">
|
||||
<view class="btn-buy" @click="openSkuPopup">
|
||||
<text>立即秒杀</text>
|
||||
</view>
|
||||
</view>-->
|
||||
<view class="btn-group coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between coreshop-basis-5">
|
||||
<u-button type="error" size="normal" @click="openSkuPopup" shape="circle">立即秒杀</u-button>
|
||||
</view>
|
||||
@@ -407,7 +392,7 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { mapMutations, mapActions, mapState } from 'vuex';
|
||||
import { mapState } from 'vuex';
|
||||
export default {
|
||||
|
||||
data() {
|
||||
@@ -441,7 +426,6 @@
|
||||
selectType: '',
|
||||
shareUrl: this.$globalConstVars.shareUrl,
|
||||
shareBox: false,
|
||||
shareType: 10,
|
||||
serviceDescription: {
|
||||
commonQuestion: [],
|
||||
delivery: [],
|
||||
@@ -451,11 +435,10 @@
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.goodsId = e.id;
|
||||
this.groupId = e.groupId;
|
||||
if (this.goodsId && this.groupId) {
|
||||
this.groupId = e.id;
|
||||
if (this.groupId) {
|
||||
this.getServiceDescription();
|
||||
this.getGoodsInfo();
|
||||
this.getGroupInfo();
|
||||
this.getGoodsParams();
|
||||
this.getGoodsComments();
|
||||
} else {
|
||||
@@ -526,8 +509,8 @@
|
||||
shareHref() {
|
||||
let pages = getCurrentPages();
|
||||
let page = pages[pages.length - 1];
|
||||
// #ifdef H5 || MP-WEIXIN || APP-PLUS || APP-PLUS-NVUE
|
||||
return this.$globalConstVars.apiBaseUrl + 'wap/' + page.route + '?id=' + this.goodsId + '&groupId=' + this.groupId;
|
||||
// #ifdef MP-WEIXIN || APP-PLUS || APP-PLUS-NVUE
|
||||
return this.$globalConstVars.apiBaseUrl + 'wap/' + page.route + '?id=' + this.groupId;
|
||||
// #endif
|
||||
},
|
||||
},
|
||||
@@ -600,17 +583,16 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
getGoodsInfo() {
|
||||
getGroupInfo() {
|
||||
let data = {
|
||||
id: this.goodsId,
|
||||
groupId: this.groupId,
|
||||
id: this.groupId,
|
||||
type: this.cartType,
|
||||
needSku: true
|
||||
};
|
||||
// 如果用户已经登录 要传用户token
|
||||
let userToken = this.$db.get('userToken');
|
||||
if (userToken) {
|
||||
data['token'] = userToken;
|
||||
data.token = userToken
|
||||
}
|
||||
let _this = this;
|
||||
this.$u.api.groupInfo(data).then(res => {
|
||||
@@ -635,7 +617,7 @@
|
||||
} else {
|
||||
let info = res.data;
|
||||
this.product = res.data.product;
|
||||
|
||||
_this.goodsId = info.id;
|
||||
_this.goodsInfo = info;
|
||||
this.goodsSkuInfo = res.data.skuList;
|
||||
if (_this.goodsInfo.album) {
|
||||
@@ -771,8 +753,6 @@
|
||||
},
|
||||
//在线客服
|
||||
showChat() {
|
||||
// #ifdef H5
|
||||
// #endif
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
this.$u.route('/pages/member/customerService/index');
|
||||
// #endif
|
||||
@@ -780,12 +760,11 @@
|
||||
//获取分享URL
|
||||
getShareUrl() {
|
||||
let data = {
|
||||
client: 2,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: 1,
|
||||
page: this.shareType,
|
||||
type: this.$globalConstVars.shareModel.url,
|
||||
page: this.$globalConstVars.shareType.seckill,
|
||||
params: {
|
||||
goodsId: this.goodsId,
|
||||
groupId: this.groupId
|
||||
}
|
||||
};
|
||||
@@ -809,7 +788,6 @@
|
||||
},
|
||||
showModal() {
|
||||
this.bottomModal = true;
|
||||
console.log("打开弹窗");
|
||||
},
|
||||
hideModal(e) {
|
||||
this.bottomModal = false;
|
||||
|
||||
@@ -35,17 +35,22 @@
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="left">
|
||||
<u--image :showLoading="true" :src="item.thumbnail && item.thumbnail!='null' ? item.thumbnail : '/static/images/common/empty-banner.png'" width="80px" height="80px" mode="aspectFill"></u--image>
|
||||
<u--image :showLoading="true" :src="item.thumbnail" width="80px" height="80px" mode="aspectFill"></u--image>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="type u-line-4">{{item.description}}</view>
|
||||
<view class="type u-line-2">{{item.description}}</view>
|
||||
<view class="delivery-time">截止时间:{{ $u.timeFormat(item.endTime, 'yyyy-mm-dd hh:MM:ss') }}</view>
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-padding-top-10 coreshop-padding-bottom-5">
|
||||
<view class="coreshop-font-11 coreshop-bg-orange coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10" v-if="item.minDeliveryPrice>0">{{item.minDeliveryPrice}}元起送</view>
|
||||
<view class="coreshop-font-11 coreshop-bg-olive coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10" v-if="item.startBuyPrice>0">{{item.startBuyPrice}}元起购</view>
|
||||
<!--<view class="coreshop-font-11 coreshop-bg-olive coreshop-padding-2 coreshop-border-radius-4">{{item.ticketNumber}}张券</view>-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom coreshop-margin-top-10">
|
||||
<view class="more">正在接龙中</view>
|
||||
<view class="coreshop-flex">
|
||||
<view class='logistics coreshop-btn' @click="goSolitaireDetail(item.id)">查看详情</view>
|
||||
<view class='coreshop-solitaire-btn' @click="goSolitaireDetail(item.id)">立即接龙</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -38,7 +38,11 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-font-11 coreshop-text-gray coreshop-margin-bottom-10 ">
|
||||
{{$u.timeFormat(model.createTime, 'mm月dd日')}}发布截至{{$u.timeFormat(model.endTime, 'mm月dd日 hh:MM:ss')}}
|
||||
{{$u.timeFormat(model.createTime, 'yyyy年mm月dd日')}}发布截至{{$u.timeFormat(model.endTime, 'yyyy年mm月dd日 hh:MM:ss')}}
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-padding-bottom-5">
|
||||
<view class="coreshop-font-11 coreshop-bg-orange coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10" v-if="model.minDeliveryPrice>0">{{model.minDeliveryPrice}}元起送</view>
|
||||
<view class="coreshop-font-11 coreshop-bg-olive coreshop-padding-2 coreshop-border-radius-4 coreshop-margin-right-10" v-if="model.startBuyPrice>0">{{model.startBuyPrice}}元起购</view>
|
||||
</view>
|
||||
<view class="coreshop-padding-10 coreshop-content">
|
||||
<u-parse :content="model.contentBody" :selectable="true" v-if="model.contentBody"></u-parse>
|
||||
@@ -80,15 +84,19 @@
|
||||
<view class="coreshop-font-md coreshop-padding-top-10 coreshop-padding-bottom-10 coreshop-padding-left-10 coreshop-padding-right-10 coreshop-flex-direction-row">
|
||||
<u-icon name="more-circle" color="#e54d42" label="接龙清单" labelSize="15px" label-pos="right"></u-icon>
|
||||
</view>
|
||||
<view class="coreshop-padding-top-10">
|
||||
<view class="coreshop-padding-bottom-10">
|
||||
<!--接龙记录-->
|
||||
<view class="coreshop-padding-left-10 coreshop-padding-right-10 coreshop-padding-top-10 coreshop-padding-bottom-10" v-if="records.length>0">
|
||||
<view class="coreshop-flex coreshop-flex-nowrap coreshop-justify-between coreshop-margin-bottom-10" v-for="(item, index) in records" :key="index">
|
||||
<view v-if="records.length>0">
|
||||
<view class="coreshop-flex coreshop-flex-nowrap coreshop-justify-between coreshop-padding-5 coreshop-margin-10 coreshop-bg-main" v-for="(item, index) in records" :key="index">
|
||||
<view class="coreshop-flex coreshop-flex-nowrap coreshop-justify-between coreshop-align-center">
|
||||
<text class="coreshop-text-black coreshop-margin-right-10 coreshop-font-12">{{ records.length-index}}</text>
|
||||
<u-avatar :src="item.avatarImage" :size="30"></u-avatar>
|
||||
<text class="coreshop-text-black coreshop-font-12 u-line-1">{{ item.nickName}}</text>
|
||||
<view class="coreshop-margin-left-10 coreshop-width-max-content">
|
||||
<text class="coreshop-text-black coreshop-font-12">{{ records.length-index}}</text>
|
||||
<view class="coreshop-margin-left-10 coreshop-width-max-content">
|
||||
<view class="coreshop-flex coreshop-flex-nowrap coreshop-justify-between ">
|
||||
<view class="coreshop-margin-right-5">
|
||||
<u-avatar :src="item.avatarImage" :size="20"></u-avatar>
|
||||
</view>
|
||||
<text class="coreshop-text-black coreshop-font-12 u-line-1">{{ item.nickName==null ?'佚名': item.nickName}}</text>
|
||||
</view>
|
||||
<text class="coreshop-text-gray coreshop-font-10">{{$u.timeFormat(item.create, 'mm月dd日')}}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -108,9 +116,6 @@
|
||||
<!-- 分享弹窗 -->
|
||||
<view class="coreshop-padding-10">
|
||||
<u-popup mode="bottom" :show="shareBox" ref="share">
|
||||
<!-- #ifdef H5 -->
|
||||
<coreshop-share-h5 :objectId="model.id" :shareType="12" @close="closeShare()"></coreshop-share-h5>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<coreshop-share-wx :objectId="model.id" :shareType="12" @close="closeShare()"></coreshop-share-wx>
|
||||
<!-- #endif -->
|
||||
@@ -312,20 +317,14 @@
|
||||
this.$u.toast('请先选择商品')
|
||||
return true
|
||||
}
|
||||
var totalprice = parseFloat(this.totalprice);
|
||||
var startBuyPrice = parseFloat(this.model.startBuyPrice);
|
||||
console.log('商品价格:' + this.totalprice);
|
||||
console.log('起购价格:' + this.model.startBuyPrice);
|
||||
//var totalprice = parseFloat(this.totalprice);
|
||||
//var startBuyPrice = parseFloat(this.model.startBuyPrice);
|
||||
//console.log('商品价格:' + this.totalprice);
|
||||
//console.log('起购价格:' + this.model.startBuyPrice);
|
||||
if (this.totalprice < this.model.startBuyPrice) {
|
||||
this.$u.toast('最小购买价格为' + this.model.startBuyPrice + '元,请增加购买产品')
|
||||
return true
|
||||
}
|
||||
//let userToken = this.$db.get('userToken');
|
||||
//let obj = {
|
||||
// cart: this.cart,
|
||||
// id: this.id,
|
||||
// token: userToken
|
||||
//}
|
||||
this.submitStatus = true;
|
||||
let newData = '';
|
||||
for (var i = 0; i < this.cart.length; i++) {
|
||||
@@ -337,7 +336,9 @@
|
||||
newData = newData.substr(1);
|
||||
}
|
||||
if (newData.length > 0) {
|
||||
this.$u.route('/pages/placeOrder/index/index?orderType=' + this.cartType + '&objectId=' + this.id + '&cartIds=' + JSON.stringify(newData));
|
||||
var str = '/pages/placeOrder/index/index?orderType=' + this.cartType + '&objectId=' + this.id + '&cartIds=' + JSON.stringify(newData);
|
||||
console.log(str);
|
||||
this.$u.route(str);
|
||||
return true;
|
||||
} else {
|
||||
//没有选择不跳转
|
||||
@@ -353,17 +354,17 @@
|
||||
//获取分享URL
|
||||
getShareUrl() {
|
||||
let data = {
|
||||
client: 2,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: 1,
|
||||
page: 12,
|
||||
type: this.$globalConstVars.shareModel.url,
|
||||
page: this.$globalConstVars.shareType.solitaire,
|
||||
params: {
|
||||
id: this.model.id,
|
||||
}
|
||||
};
|
||||
let userToken = this.$db.get('userToken');
|
||||
if (userToken && userToken != '') {
|
||||
data['token'] = userToken;
|
||||
data.token = userToken
|
||||
}
|
||||
this.$u.api.share(data).then(res => {
|
||||
this.shareUrl = res.data
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</u-navbar>
|
||||
|
||||
<view class="coreshop-bg-white coreshop-padding-10 coreshop-margin-10">
|
||||
<u--image width="100%" height="150px" v-if="info.coverImage" :src="info.coverImage && info.coverImage!='null' ? info.coverImage+'?x-oss-process=image/resize,m_lfit,h_320,w_240' : '/static/images/common/empty-banner.png'"></u--image>
|
||||
<u--image width="100%" height="150px" v-if="info.coverImage" :src="info.coverImage"></u--image>
|
||||
<view class="article-title">
|
||||
{{ info.title }}
|
||||
</view>
|
||||
@@ -117,10 +117,10 @@
|
||||
//获取分享URL
|
||||
getShareUrl() {
|
||||
let data = {
|
||||
client: 2,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: 1,
|
||||
page: 5,
|
||||
type: this.$globalConstVars.shareModel.url,
|
||||
page: this.$globalConstVars.shareType.article,
|
||||
params: {
|
||||
articleId: this.id,
|
||||
articleType: this.idType
|
||||
@@ -128,7 +128,7 @@
|
||||
};
|
||||
let userToken = this.$db.get('userToken');
|
||||
if (userToken && userToken != '') {
|
||||
data['token'] = userToken;
|
||||
data.token = userToken
|
||||
}
|
||||
this.$u.api.share(data).then(res => {
|
||||
this.shareUrl = res.data
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
.u-wrap { height: calc(100vh); /* #ifdef H5 */ height: calc(100vh - var(--window-top)); /* #endif */ }
|
||||
.u-wrap { height: calc(100vh); }
|
||||
.u-menu-wrap { flex: 1; display: flex; overflow: hidden;
|
||||
.u-tab-view { width: 100px; height: 100%; background: #f6f6f6;
|
||||
.u-tab-item { height: 55px; background: #f6f6f6; box-sizing: border-box; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #444; font-weight: 400; line-height: 1; }
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { mapMutations, mapActions, mapState } from 'vuex';
|
||||
import { mapState } from 'vuex';
|
||||
export default {
|
||||
|
||||
data() {
|
||||
@@ -190,7 +190,7 @@
|
||||
return this.$store.state.config.cateStyle ? this.$store.state.config.cateStyle : 3;
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
onShow() {
|
||||
uni.getSystemInfo({
|
||||
success: (e) => {
|
||||
// #ifndef MP
|
||||
@@ -205,10 +205,16 @@
|
||||
}
|
||||
})
|
||||
|
||||
this.categories();
|
||||
// 获取购物车数量
|
||||
if (this.$store.state.config.cateStyle == 4) {
|
||||
this.goodsList = [];
|
||||
this.page = 1;
|
||||
this.limit = 10;
|
||||
|
||||
this.categories();
|
||||
this.getCartNums();
|
||||
} else {
|
||||
this.categories();
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
|
||||
@@ -87,8 +87,16 @@
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="goods" v-for="(item,index) in goodsList" :key="index" slot="slot{{index}}">
|
||||
<view class="coreshop-padding-top-6 coreshop-padding-bottom-3 coreshop-padding-left-8 coreshop-padding-right-8 coreshop-bg-white coreshop-border-radius-bl-18">
|
||||
|
||||
<view class="coreshop-title-294 coreshop-multiple-line-clamp">
|
||||
<!--<image class="coreshop-image-price-tags" src="https://files.cdn.coreshop.cn/static/icon/icon-tag-vip-discount.png"></image>-->
|
||||
<image class="coreshop-image-price-tags" src="https://files.cdn.coreshop.cn/static/icon/icon-tag-vip-discount.png"></image>
|
||||
<image class="coreshop-image-price-tags" src="https://files.cdn.coreshop.cn/static/icon/icon-tag-vip-discount.png"></image>
|
||||
<!--<view class="good-tag-recommend2" v-if="item.isRecommend">
|
||||
推荐
|
||||
</view>
|
||||
<view class="good-tag-hot" v-if="item.isHot">
|
||||
热门
|
||||
</view>-->
|
||||
<text class="coreshop-font-14">{{item.name}}</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-8 coreshop-flex coreshop-justify-between coreshop-align-center">
|
||||
@@ -106,7 +114,7 @@
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ item.price - item.pointsDeduction}}元
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price,item.pointsDeduction).toFixed(2)}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
@@ -143,7 +151,7 @@
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ item.price - item.pointsDeduction}}元
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price,item.pointsDeduction).toFixed(2)}} 元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
@@ -504,7 +512,7 @@
|
||||
goSearch() {
|
||||
let pages = getCurrentPages();
|
||||
let prevPage = pages[pages.length - 2];
|
||||
// #ifdef H5 || MP-WEIXIN || APP-PLUS || APP-PLUS-NVUE || MP-TOUTIAO
|
||||
// #ifdef MP-WEIXIN || APP-PLUS || APP-PLUS-NVUE || MP-TOUTIAO
|
||||
if (prevPage && prevPage.route) {
|
||||
let search_flag = prevPage.route;
|
||||
if (search_flag == 'pages/search/search') {
|
||||
|
||||
@@ -303,10 +303,10 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import { mapMutations, mapActions, mapState } from 'vuex';
|
||||
|
||||
import { mapState } from 'vuex';
|
||||
export default {
|
||||
|
||||
|
||||
data() {
|
||||
return {
|
||||
formBoxId: '',
|
||||
@@ -557,12 +557,6 @@
|
||||
},
|
||||
picChoose(e, item, index) {
|
||||
var that = this
|
||||
//var pages = getCurrentPages()
|
||||
//if (pages.length > 1) {
|
||||
// var items = pages[1].$vm.form.items;
|
||||
//} else {
|
||||
// var items = pages[0].$vm.form.items;
|
||||
//}
|
||||
var items = this.form.items;
|
||||
if (!item.pics) {
|
||||
item.pics = []
|
||||
@@ -575,15 +569,10 @@
|
||||
this.$upload.uploadImage(1, res => {
|
||||
if (res.status) {
|
||||
item.pics.push(res.data.src);
|
||||
// #ifdef H5
|
||||
that.$set(that.form.items, index, item)
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
items[index] = item;
|
||||
setTimeout(() => {
|
||||
that.form.items = items;
|
||||
}, 500)
|
||||
// #endif
|
||||
that.$refs.uToast.show({ message: res.msg, type: 'success' })
|
||||
} else {
|
||||
that.$refs.uToast.show({ message: res.msg, type: 'error' })
|
||||
@@ -838,17 +827,17 @@
|
||||
//获取分享URL
|
||||
getShareUrl() {
|
||||
let data = {
|
||||
client: 2,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: 1,
|
||||
page: 8,
|
||||
type: this.$globalConstVars.shareModel.url,
|
||||
page: this.$globalConstVars.shareType.form,
|
||||
params: {
|
||||
id: this.formBoxId
|
||||
}
|
||||
};
|
||||
let userToken = this.$db.get('userToken');
|
||||
if (userToken && userToken != '') {
|
||||
data['token'] = userToken;
|
||||
data.token = userToken
|
||||
}
|
||||
this.$u.api.share(data).then(res => {
|
||||
this.shareUrl = res.data
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<view class="coreshop-text-gray coreshop-margin-top-10">
|
||||
<u-rate v-model="item.score" :count="5" size="15"></u-rate>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-10">
|
||||
<view class="coreshop-margin-top-10" v-if="item.imagesArr">
|
||||
<u-album :urls="item.imagesArr" rowCount="4"></u-album>
|
||||
</view>
|
||||
<view class="coreshop-text-gray coreshop-margin-top-5 coreshop-font-12">{{ item.createTime || ''}} {{ item.addon || ''}}</view>
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
<u-icon name="arrow-left" size="19" @click="goNavigateBack"></u-icon>
|
||||
<u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
|
||||
<u-icon name="home" size="22" @click="goHome"></u-icon>
|
||||
<u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
|
||||
<u-icon name="share-fill" size="22" @click="goShare"></u-icon>
|
||||
</view>
|
||||
<view slot="right">
|
||||
</view>
|
||||
@@ -21,28 +19,21 @@
|
||||
<text class="coreshop-font-16">¥</text>
|
||||
<text class="coreshop-font-24">{{ product.price || '0.00' }}</text>
|
||||
</view>
|
||||
<view class="coreshop-flex-sub coreshop-flex coreshop-text-left coreshop-margin-left-12 coreshop-margin-top-6 coreshop-justify-start coreshop-align-center">
|
||||
<view class="coreshop-flex coreshop-text-left coreshop-margin-left-12 coreshop-margin-top-6 coreshop-justify-start coreshop-align-center">
|
||||
<view class="coreshop-font-16 coreshop-text-gray coreshop-text-through">{{ priceSection }}</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<u-icon name="star-fill" :size="20" label="收藏" :labelSize="14" labelPos="right" @click="collection" v-if="isfav"></u-icon>
|
||||
<u-icon name="star" :size="20" label="收藏" :labelSize="14" labelPos="right" @click="collection" v-else></u-icon>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-wrap coreshop-flex-direction-row coreshop-margin-top-12" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && product.pointsDeduction > 0">
|
||||
<view class="coreshop-padding-bottom-5 coreshop-font-12">
|
||||
兑换价:{{pointDiscountedProportion * product.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(product.price-product.pointsDeduction).toFixed(2)}}元
|
||||
</view>
|
||||
<view class="coreshop-font-12 coreshop-margin-left-12" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && product.points > 0">买就送:{{product.points}}{{ pointShowName}}</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-wrap coreshop-flex-direction-column coreshop-margin-left-12" v-else>
|
||||
<view class="coreshop-flex coreshop-flex-wrap coreshop-flex-direction-row">
|
||||
<view class="coreshop-font-12" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && product.points > 0">买就送:{{product.points}}{{ pointShowName}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="coreshop-flex coreshop-flex-wrap coreshop-flex-direction-row coreshop-margin-top-12" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && product.pointsDeduction > 0">
|
||||
<view class="coreshop-padding-bottom-5 coreshop-font-12">
|
||||
兑换价:{{pointDiscountedProportion * product.pointsDeduction }}{{ pointShowName}}+{{ product.price - product.pointsDeduction}}元
|
||||
</view>
|
||||
<view class="coreshop-font-12 coreshop-margin-left-12" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && product.points > 0">买就送:{{product.points}}{{ pointShowName}}</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-wrap coreshop-flex-direction-column coreshop-margin-left-12" v-else>
|
||||
<view class="coreshop-flex coreshop-flex-wrap coreshop-flex-direction-row">
|
||||
<view class="coreshop-font-12" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && product.points > 0">买就送:{{product.points}}{{ pointShowName}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="coreshop-margin-top-12 coreshop-multiple-line-clamp">
|
||||
<text class="coreshop-font-16 coreshop-text-black coreshop-font-weight-bold">{{ goodsInfo.name || '' }}</text>
|
||||
</view>
|
||||
@@ -56,20 +47,18 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-16 coreshop-padding-top-16 coreshop-solid-top coreshop-flex coreshop-justify-between coreshop-align-center coreshop-text-gray">
|
||||
<view class="coreshop-font-12">
|
||||
<text>运费:</text>
|
||||
<text class="font-color-orange">包邮</text>
|
||||
</view>
|
||||
<view class="coreshop-font-12">
|
||||
<text>销量:</text>
|
||||
<text>{{ goodsInfo.buyCount || '0' }}</text>
|
||||
<text class="font-color-orange">{{ goodsInfo.buyCount || '0' }}</text>
|
||||
</view>
|
||||
<view class="coreshop-font-12">
|
||||
<text>库存:</text>
|
||||
<text>{{product.stock}}</text>
|
||||
<u-icon name="share-fill" size="18" label="分享" :labelSize="12" labelPos="right" @click="goShare"></u-icon>
|
||||
</view>
|
||||
<view class="coreshop-font-12">
|
||||
<u-icon name="star-fill" :size="18" label="收藏" :labelSize="12" labelPos="right" @click="collection" v-if="isfav"></u-icon>
|
||||
<u-icon name="star" :size="18" label="收藏" :labelSize="12" labelPos="right" @click="collection" v-else></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<!--促销-->
|
||||
@@ -211,9 +200,6 @@
|
||||
<!-- 分享弹窗 -->
|
||||
<view class="coreshop-padding-0">
|
||||
<u-popup mode="bottom" :show="shareBox" ref="share">
|
||||
<!-- #ifdef H5 -->
|
||||
<coreshop-share-h5 :shareType='$globalConstVars.shareType.goods' :goodsId="goodsInfo.id" :shareImg="goodsInfo.image" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></coreshop-share-h5>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<coreshop-share-wx :shareType='$globalConstVars.shareType.goods' :goodsId="goodsInfo.id" :shareImg="goodsInfo.image" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></coreshop-share-wx>
|
||||
<!-- #endif -->
|
||||
@@ -271,7 +257,7 @@
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price - item.pointsDeduction).toFixed(2)}}元
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price,item.pointsDeduction).toFixed(2)}} 元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
@@ -308,7 +294,7 @@
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price - item.pointsDeduction).toFixed(2)}}元
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price,item.pointsDeduction).toFixed(2)}} 元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
@@ -334,7 +320,7 @@
|
||||
<view class="tabbar">
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-start coreshop-basis-4">
|
||||
<!-- 客服按钮 -->
|
||||
<!-- #ifdef H5 || APP-PLUS-NVUE || APP-PLUS -->
|
||||
<!-- #ifdef APP-PLUS-NVUE || APP-PLUS -->
|
||||
<view class="action" @click="showChat()">
|
||||
<button class="noButtonStyle">
|
||||
<u-icon name="server-fill" :size="20" label="找客服" :labelSize="12" labelPos="bottom"></u-icon>
|
||||
@@ -420,11 +406,8 @@
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import { mapMutations, mapActions, mapState } from 'vuex';
|
||||
|
||||
|
||||
import { mapState } from 'vuex';
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
// 是否打开SKU弹窗
|
||||
@@ -555,7 +538,7 @@
|
||||
shareHref() {
|
||||
let pages = getCurrentPages()
|
||||
let page = pages[pages.length - 1]
|
||||
// #ifdef H5 || MP-WEIXIN || APP-PLUS || APP-PLUS-NVUE
|
||||
// #ifdef MP-WEIXIN || APP-PLUS || APP-PLUS-NVUE
|
||||
return this.$globalConstVars.apiBaseUrl + 'wap/' + page.route + '?id=' + this.goodsId;
|
||||
// #endif
|
||||
},
|
||||
@@ -583,8 +566,6 @@
|
||||
},
|
||||
// 加入购物车按钮
|
||||
addCart(selectShop) {
|
||||
//console.log("监听 - 加入购物车");
|
||||
//console.log(selectShop);
|
||||
var that = this;
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
@@ -615,8 +596,6 @@
|
||||
},
|
||||
// 立即购买
|
||||
buyNow(selectShop) {
|
||||
//console.log("监听 - 立即购买");
|
||||
//console.log(selectShop);
|
||||
var that = this;
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
@@ -847,7 +826,6 @@
|
||||
});
|
||||
this.goodsComments = [...this.goodsComments, ..._list];
|
||||
} else {
|
||||
console.log("错误2");
|
||||
this.$u.toast(res.msg);
|
||||
}
|
||||
})
|
||||
@@ -876,8 +854,6 @@
|
||||
},
|
||||
//在线客服
|
||||
showChat() {
|
||||
// #ifdef H5
|
||||
// #endif
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
this.$u.route('/pages/member/customerService/index');
|
||||
// #endif
|
||||
@@ -885,17 +861,17 @@
|
||||
//获取分享URL
|
||||
getShareUrl() {
|
||||
let data = {
|
||||
client: 2,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: 1,
|
||||
page: 2,
|
||||
type: this.$globalConstVars.shareModel.url,
|
||||
page: this.$globalConstVars.shareType.goods,
|
||||
params: {
|
||||
goodsId: this.goodsInfo.id,
|
||||
}
|
||||
};
|
||||
let userToken = this.$db.get('userToken');
|
||||
if (userToken && userToken != '') {
|
||||
data['token'] = userToken;
|
||||
data.token = userToken
|
||||
}
|
||||
this.$u.api.share(data).then(res => {
|
||||
this.shareUrl = res.data
|
||||
@@ -913,7 +889,6 @@
|
||||
},
|
||||
showModal() {
|
||||
this.bottomModal = true;
|
||||
console.log("打开弹窗");
|
||||
},
|
||||
hideModal(e) {
|
||||
this.bottomModal = false;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<view class="cart-shoppingcard-goods-checkbtn">
|
||||
<u-checkbox active-color="red" :name="item.id"></u-checkbox>
|
||||
</view>
|
||||
<image class="cart-shoppingcard-goods-image" :src="item.products.images && item.products.images!='null' ? item.products.images+'?x-oss-process=image/resize,m_lfit,h_320,w_240' : '/static/images/common/empty-banner.png'" mode="widthFix"></image>
|
||||
<image class="cart-shoppingcard-goods-image" :src="item.products.images" mode="widthFix"></image>
|
||||
<view class="cart-shoppingcard-goods-body">
|
||||
<view class="cart-shoppingcard-goods-title" v-if="item.products.spesDesc">{{ item.products.spesDesc }}</view>
|
||||
<view class="cart-shoppingcard-goods-title" v-if="item.products.promotionList">
|
||||
@@ -55,7 +55,7 @@
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.products.pointsDeduction }}{{ pointShowName}}+{{ item.products.price - item.products.pointsDeduction}}元
|
||||
{{pointDiscountedProportion * item.products.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.products.price - item.products.pointsDeduction).toFixed(2)}}元
|
||||
</view>
|
||||
</view>
|
||||
<view v-else></view>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<!--版权组件-->
|
||||
<coreshop-copyright v-if="copy"></coreshop-copyright>
|
||||
<!--客服组件-->
|
||||
<!-- #ifdef H5 || APP-PLUS-NVUE || APP-PLUS -->
|
||||
<!-- #ifdef APP-PLUS-NVUE || APP-PLUS -->
|
||||
<view class="floatingButton" @click="showChat()">
|
||||
<u-icon name="server-man" color="#e54d42" size="60"></u-icon>
|
||||
</view>
|
||||
@@ -31,23 +31,16 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { mapMutations, mapActions, mapState } from 'vuex';
|
||||
|
||||
import { mapState } from 'vuex';
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
background: this.$coreTheme.mainNabBar.background,
|
||||
titleColor: this.$coreTheme.mainNabBar.titleColor,
|
||||
|
||||
swiperItems: [],
|
||||
currentIndex: 0,
|
||||
opacity: 0,
|
||||
scrollTop: 0,
|
||||
imageUrl: '/static/images/ShareImage.png', //店铺分享图片
|
||||
pageData: [],
|
||||
pageCode: 'mobile_home', //页面布局编码
|
||||
//userInfo: {}, // 用户信息
|
||||
kefupara: '', //客服传递资料
|
||||
copy: false,
|
||||
shareUrl: this.$globalConstVars.shareUrl,
|
||||
@@ -92,12 +85,8 @@
|
||||
this.pageCode = e.pageCode;
|
||||
}
|
||||
this.initData();
|
||||
console.log("数据:" + this.$globalConstVars.apiFilesUrl);
|
||||
},
|
||||
methods: {
|
||||
about() {
|
||||
|
||||
},
|
||||
imgTap() {
|
||||
this.modalShow = false;
|
||||
uni.navigateTo({
|
||||
@@ -128,8 +117,8 @@
|
||||
var data = res.data.items[i].parameters.list;
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
let moder = {
|
||||
image: data[i].image == '/images/empty-banner.png' ? '/static/images/common/empty-banner.png' : data[i].image,
|
||||
bg: data[i].bg == '/images/empty-banner.png' ? '/static/images/common/empty-banner.png' : data[i].bg,
|
||||
image: data[i].image,
|
||||
bg: data[i].bg,
|
||||
opentype: 'click',
|
||||
url: '',
|
||||
title: data[i].linkType,
|
||||
@@ -171,8 +160,6 @@
|
||||
},
|
||||
//在线客服
|
||||
showChat() {
|
||||
// #ifdef H5
|
||||
// #endif
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
this.$u.route('/pages/member/customerService/index');
|
||||
// #endif
|
||||
@@ -180,14 +167,14 @@
|
||||
//获取分享URL
|
||||
getShareUrl() {
|
||||
let data = {
|
||||
client: 2,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: 1,
|
||||
page: 1,
|
||||
type: this.$globalConstVars.shareModel.url,
|
||||
page: this.$globalConstVars.shareType.index,
|
||||
};
|
||||
let userToken = this.$db.get('userToken');
|
||||
if (userToken && userToken != '') {
|
||||
data['token'] = userToken;
|
||||
data.token = userToken
|
||||
}
|
||||
this.$u.api.share(data).then(res => {
|
||||
this.shareUrl = res.data
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<!--版权组件-->
|
||||
<coreshop-copyright v-if="copy"></coreshop-copyright>
|
||||
<!--客服组件-->
|
||||
<!-- #ifdef H5 || APP-PLUS-NVUE || APP-PLUS -->
|
||||
<!-- #ifdef APP-PLUS-NVUE || APP-PLUS -->
|
||||
<view class="floatingButton" @click="showChat()">
|
||||
<u-icon name="server-man" color="#e54d42" size="45"></u-icon>
|
||||
</view>
|
||||
@@ -31,7 +31,7 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { mapMutations, mapActions, mapState } from 'vuex';
|
||||
import { mapState } from 'vuex';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -41,7 +41,6 @@
|
||||
imageUrl: '/static/images/ShareImage.png', //店铺分享图片
|
||||
pageData: [],
|
||||
pageCode: 'mobile_home', //页面布局编码
|
||||
//userInfo: {}, // 用户信息
|
||||
kefupara: '', //客服传递资料
|
||||
copy: false,
|
||||
shareUrl: this.$globalConstVars.shareUrl,
|
||||
@@ -54,7 +53,6 @@
|
||||
this.copy = true;
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.$store.state.config.showIndexPopupWindow);
|
||||
this.modalShow = this.$store.state.config.showIndexPopupWindow == 1;
|
||||
},
|
||||
computed: {
|
||||
@@ -93,8 +91,7 @@
|
||||
methods: {
|
||||
imgTap() {
|
||||
this.modalShow = false;
|
||||
this.$u.toast('你点击了弹窗')
|
||||
|
||||
this.$refs.uToast.show({ message: "你点了海报了。", type: 'success', back: false });
|
||||
},
|
||||
closeTap() {
|
||||
this.modalShow = false;
|
||||
@@ -135,8 +132,6 @@
|
||||
},
|
||||
//在线客服
|
||||
showChat() {
|
||||
// #ifdef H5
|
||||
// #endif
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
this.$u.route('/pages/member/customerService/index');
|
||||
// #endif
|
||||
@@ -144,14 +139,14 @@
|
||||
//获取分享URL
|
||||
getShareUrl() {
|
||||
let data = {
|
||||
client: 2,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: 1,
|
||||
page: 1,
|
||||
type: this.$globalConstVars.shareModel.url,
|
||||
page: this.$globalConstVars.shareType.index,
|
||||
};
|
||||
let userToken = this.$db.get('userToken');
|
||||
if (userToken && userToken != '') {
|
||||
data['token'] = userToken;
|
||||
data.token = userToken
|
||||
}
|
||||
this.$u.api.share(data).then(res => {
|
||||
this.shareUrl = res.data
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<view class="user-info-box">
|
||||
<!--未登陆-->
|
||||
<view class="login-user-view" v-if="!hasLogin">
|
||||
<!-- #ifdef H5 || APP-PLUS -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view class="login-user-avatar-view">
|
||||
<u-avatar :src="$store.state.config.shopLogo" size="60"></u-avatar>
|
||||
</view>
|
||||
@@ -202,7 +202,7 @@
|
||||
<u-grid-item v-for="(item,i) in other" :key="i" v-if="item.showItem" @click="navigateToHandle(item.router)">
|
||||
<u-icon :name="item.icon" :size="25" color="#666" :label="item.name" labelPos="bottom" labelSize="13" space="25" top="15"></u-icon>
|
||||
</u-grid-item>
|
||||
<!-- #ifdef H5 || APP-PLUS || APP-PLUS-NVUE -->
|
||||
<!-- #ifdef APP-PLUS || APP-PLUS-NVUE -->
|
||||
<u-grid-item @click="showChat">
|
||||
<u-icon name="server-man" :size="25" color="#666" label="联系客服" labelPos="bottom" labelSize="13" space="25" top="15"></u-icon>
|
||||
</u-grid-item>
|
||||
@@ -223,7 +223,7 @@
|
||||
|
||||
<script>
|
||||
|
||||
import { mapMutations, mapActions, mapState } from 'vuex';
|
||||
import { mapState } from 'vuex';
|
||||
|
||||
export default {
|
||||
|
||||
@@ -518,11 +518,8 @@
|
||||
if (this.$db.get('userToken')) {
|
||||
this.hasLogin = true
|
||||
this.$u.api.userInfo().then(res => {
|
||||
console.log(res);
|
||||
if (res.status) {
|
||||
_this.userInfo = res.data
|
||||
// #ifdef MP-WEIXIN
|
||||
// #endif
|
||||
// 获取订单不同状态的数量
|
||||
let data = {
|
||||
ids: '0,1,2,3,4',
|
||||
@@ -570,8 +567,6 @@
|
||||
},
|
||||
//在线客服
|
||||
showChat() {
|
||||
// #ifdef H5
|
||||
// #endif
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
this.$u.route('/pages/member/customerService/index');
|
||||
// #endif
|
||||
@@ -585,7 +580,6 @@
|
||||
console.log(e)
|
||||
if (e.errMsg == 'getUserProfile:ok') {
|
||||
_this.$u.api.syncWeChatInfo(e.userInfo).then(res => {
|
||||
console.log(res);
|
||||
if (res.status) {
|
||||
_this.$refs.uToast.show({ message: '同步成功', type: 'success', });
|
||||
if (res.data) {
|
||||
|
||||
@@ -70,9 +70,7 @@
|
||||
timer: 60, // 定义初始时间为60s
|
||||
btnb: 'coreshop-btn coreshop-btn-square coreshop-btn-c coreshop-btn-all', //按钮背景
|
||||
type: '', // 有值是第三方登录账号绑定
|
||||
isWeixinBrowser: this.$common.isWeiXinBrowser(),
|
||||
showCodeBox: false,
|
||||
|
||||
maxlength: 6,
|
||||
value: '',
|
||||
error: false,
|
||||
@@ -175,7 +173,7 @@
|
||||
// 输入完验证码最后一位执行
|
||||
finish(value) {
|
||||
this.code = value;
|
||||
// #ifdef H5|APP-PLUS|APP-PLUS-NVUE
|
||||
// #ifdef APP-PLUS|APP-PLUS-NVUE
|
||||
if (this.sessionAuthId) {
|
||||
this.toBind();
|
||||
} else {
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
this.$db.set('addressUserShip', data, true);
|
||||
// #endif
|
||||
|
||||
// #ifdef H5 || APP-PLUS || APP-PLUS-NVUE
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
this.$store.commit("userShip", data)
|
||||
// #endif
|
||||
|
||||
|
||||
@@ -337,24 +337,7 @@
|
||||
})
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
// ======================== jsonp跨域 ========================
|
||||
const KEY = this.qqMapKey;
|
||||
let locationObj = addressObj.latitude + ',' + addressObj.longitude
|
||||
let url = 'https://apis.map.qq.com/ws/geocoder/v1?coord_type=5&get_poi=1&output=jsonp&poi_options=page_size=1;page_index=1';
|
||||
this.$jsonp(url, {
|
||||
key: KEY,
|
||||
location: locationObj
|
||||
}).then(e => {
|
||||
res(e.result.formatted_addresses.recommend);
|
||||
})
|
||||
.catch(err => {
|
||||
res(err);
|
||||
})
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
//console.log(addressObj, '======================');
|
||||
qqmapsdk.reverseGeocoder({
|
||||
location: {
|
||||
latitude: addressObj.latitude,
|
||||
@@ -427,11 +410,6 @@
|
||||
this.mapW = uni.getSystemInfoSync().windowWidth
|
||||
this.mapH = uni.getSystemInfoSync().windowHeight;
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
this.mapW = uni.getSystemInfoSync().windowWidth
|
||||
this.mapH = uni.getSystemInfoSync().windowHeight;
|
||||
// #endif
|
||||
},
|
||||
// 移动到我的位置
|
||||
toMyLocation() {
|
||||
@@ -439,11 +417,7 @@
|
||||
},
|
||||
// 提交
|
||||
submitAdress() {
|
||||
//console.log(this.addressObj);
|
||||
this.controls = []
|
||||
//setTimeout(() => {
|
||||
// this.$emit('updateAddress', this.addressObj)
|
||||
//}, 100)
|
||||
|
||||
let pages = getCurrentPages();//当前页
|
||||
let beforePage = pages[pages.length - 2];//上个页面
|
||||
@@ -452,7 +426,7 @@
|
||||
this.$db.set('addressObj', this.addressObj, true);
|
||||
// #endif
|
||||
|
||||
// #ifdef H5 || APP-PLUS || APP-PLUS-NVUE
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
this.$store.commit("addressObj", this.addressObj)
|
||||
// #endif
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</view>
|
||||
<view class="item" v-for="(v, k) in item.items" :key="k" @click="showOrder(item.aftersalesId)">
|
||||
<view class="left">
|
||||
<u--image :showLoading="true" :src="v.imageUrl && v.imageUrl!='null' ? v.imageUrl+'?x-oss-process=image/resize,m_lfit,h_320,w_240' : '/static/images/common/empty-banner.png'" width="80px" height="80px" mode="aspectFill"></u--image>
|
||||
<u--image :showLoading="true" :src="v.imageUrl" width="80px" height="80px" mode="aspectFill"></u--image>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="title u-line-2">{{v.name}}</view>
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
<view class='coreshop-cell-hd-title'>退款金额</view>
|
||||
</view>
|
||||
<view class='coreshop-cell-item-ft'>
|
||||
<input type="digit" class='coreshop-cell-bd-input red-price' v-model="refund" @focus="refundFocus" ref="refund"></input>
|
||||
<input type="digit" class='coreshop-cell-bd-input coreshop-text-red' v-model="refund" @focus="refundFocus" ref="refund"></input>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
@@ -51,16 +51,9 @@
|
||||
<!-- 收藏弹出窗 -->
|
||||
<u-popup mode="top" v-model="lvvpopref">
|
||||
<view class="collect-pop">
|
||||
<image v-if="isWeixinBrowser" src="/static/images/distribution/wxh5.png" mode="widthFix"></image>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<image src="/static/images/distribution/wxxcx.png" mode="widthFix"></image>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="h5-tip color-f fsz38">
|
||||
<view>请将此页面添加浏览器书签</view>
|
||||
<view>方便下次浏览</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
@@ -130,7 +123,6 @@
|
||||
store_banner: '',
|
||||
storeDesc: '', //店铺介绍
|
||||
storeBanner: [],
|
||||
isWeixinBrowser: this.$common.isWeiXinBrowser(), //判断是否是微信浏览器
|
||||
totalGoods: 0,
|
||||
page: 1, //默认页码
|
||||
searchKey: '请输入关键字搜索',
|
||||
@@ -167,7 +159,7 @@
|
||||
goSearch() {
|
||||
let pages = getCurrentPages();
|
||||
let prevPage = pages[pages.length - 2];
|
||||
// #ifdef H5 || MP-WEIXIN || APP-PLUS || APP-PLUS-NVUE || MP-TOUTIAO
|
||||
// #ifdef MP-WEIXIN || APP-PLUS || APP-PLUS-NVUE || MP-TOUTIAO
|
||||
if (prevPage && prevPage.route) {
|
||||
let search_flag = prevPage.route;
|
||||
if (search_flag == 'pages/search/search') {
|
||||
@@ -251,32 +243,15 @@
|
||||
// 生成邀请海报
|
||||
createPoster() {
|
||||
let data = {
|
||||
type: 3,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: this.$globalConstVars.shareModel.poster,
|
||||
page: this.$globalConstVars.shareType.agent,
|
||||
params: {
|
||||
store: this.storeCode
|
||||
},
|
||||
page: 11,
|
||||
|
||||
}
|
||||
let pageUrl = this.$globalConstVars.shareUrl;
|
||||
// #ifdef H5
|
||||
data.client = 1;
|
||||
data.url = this.$globalConstVars.apiBaseUrl + 'wap/' + pageUrl;
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
data.client = 2;
|
||||
data.url = pageUrl;
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY
|
||||
data.client = 3;
|
||||
data.url = pageUrl;
|
||||
// #endif
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
data.client = 5;
|
||||
data.url = this.$globalConstVars.apiBaseUrl + 'wap/' + pageUrl;
|
||||
// #endif
|
||||
// #ifdef MP-TOUTIAO
|
||||
data.client = 6;
|
||||
// #endif
|
||||
let userToken = this.$db.get('userToken')
|
||||
if (userToken && userToken != '') {
|
||||
data.token = userToken
|
||||
@@ -292,17 +267,17 @@
|
||||
//获取分享URL
|
||||
getShareUrl() {
|
||||
let data = {
|
||||
client: 2,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: 1,
|
||||
page: 11,
|
||||
type: this.$globalConstVars.shareModel.url,
|
||||
page: this.$globalConstVars.shareType.agent,
|
||||
params: {
|
||||
store: this.storeCode
|
||||
}
|
||||
};
|
||||
let userToken = this.$db.get('userToken');
|
||||
if (userToken && userToken != '') {
|
||||
data['token'] = userToken;
|
||||
data.token = userToken
|
||||
}
|
||||
this.$u.api.share(data).then(res => {
|
||||
this.shareUrl = res.data
|
||||
|
||||
@@ -169,10 +169,10 @@
|
||||
//获取分享URL
|
||||
getShareUrl() {
|
||||
let data = {
|
||||
client: 2,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: 1,
|
||||
page: 1,
|
||||
type: this.$globalConstVars.shareModel.url,
|
||||
page: this.$globalConstVars.shareType.agent,
|
||||
};
|
||||
let userToken = this.$db.get('userToken');
|
||||
if (userToken && userToken != '') {
|
||||
@@ -185,32 +185,14 @@
|
||||
// 生成邀请海报
|
||||
createPoster() {
|
||||
let data = {
|
||||
type: 3,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: this.$globalConstVars.shareModel.poster,
|
||||
params: {
|
||||
store: this.info.store
|
||||
},
|
||||
page: 11,
|
||||
page: this.$globalConstVars.shareType.agent,
|
||||
}
|
||||
let pageUrl = this.$globalConstVars.shareUrl;
|
||||
// #ifdef H5
|
||||
data.client = 1;
|
||||
data.url = this.$globalConstVars.apiBaseUrl + 'wap/' + pageUrl;
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
data.client = 2;
|
||||
data.url = pageUrl;
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY
|
||||
data.client = 3;
|
||||
data.url = pageUrl;
|
||||
// #endif
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
data.client = 5;
|
||||
data.url = this.$globalConstVars.apiBaseUrl + 'wap/' + pageUrl;
|
||||
// #endif
|
||||
// #ifdef MP-TOUTIAO
|
||||
data.client = 6;
|
||||
// #endif
|
||||
let userToken = this.$db.get('userToken')
|
||||
if (userToken && userToken != '') {
|
||||
data.token = userToken
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
let pages = getCurrentPages();//当前页
|
||||
let beforePage = pages[pages.length - 2];//上个页面
|
||||
|
||||
// #ifdef H5 || APP-PLUS || APP-PLUS-NVUE
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
beforePage.cardInfo = this.cards[index]
|
||||
// #endif
|
||||
|
||||
|
||||
@@ -51,16 +51,9 @@
|
||||
<!-- 收藏弹出窗 -->
|
||||
<u-popup mode="top" v-model="lvvpopref">
|
||||
<view class="collect-pop">
|
||||
<image v-if="isWeixinBrowser" src="/static/images/distribution/wxh5.png" mode="widthFix"></image>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<image src="/static/images/distribution/wxxcx.png" mode="widthFix"></image>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="h5-tip color-f fsz38">
|
||||
<view>请将此页面添加浏览器书签</view>
|
||||
<view>方便下次浏览</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
@@ -70,7 +63,7 @@
|
||||
<u-grid col="2" :border="false" align="left">
|
||||
<u-grid-item bg-color="transparent" :custom-style="{padding: '0px'}" v-for="(item, index) in goodsData" :key="index" @click="goGoodsDetail(item.id)">
|
||||
<view class="good_box">
|
||||
<u--image :src="item.image" mode="widthFix" width="100%" radius="10"></u--image>
|
||||
<u--image :src="item.image" mode="widthFix" width="100%" radius="10"></u--image>
|
||||
<view class="good_title u-line-2">
|
||||
{{item.name}}
|
||||
</view>
|
||||
@@ -96,10 +89,10 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
|
||||
data() {
|
||||
return {
|
||||
goodsData: [],
|
||||
@@ -129,7 +122,6 @@
|
||||
store_banner: '',
|
||||
storeDesc: '', //店铺介绍
|
||||
storeBanner: [],
|
||||
isWeixinBrowser: this.$common.isWeiXinBrowser(), //判断是否是微信浏览器
|
||||
totalGoods: 0,
|
||||
page: 1, //默认页码
|
||||
searchKey: '请输入关键字搜索',
|
||||
@@ -166,7 +158,7 @@
|
||||
goSearch() {
|
||||
let pages = getCurrentPages();
|
||||
let prevPage = pages[pages.length - 2];
|
||||
// #ifdef H5 || MP-WEIXIN || APP-PLUS || APP-PLUS-NVUE || MP-TOUTIAO
|
||||
// #ifdef MP-WEIXIN || APP-PLUS || APP-PLUS-NVUE || MP-TOUTIAO
|
||||
if (prevPage && prevPage.route) {
|
||||
let search_flag = prevPage.route;
|
||||
if (search_flag == 'pages/search/search') {
|
||||
@@ -249,34 +241,14 @@
|
||||
// 生成邀请海报
|
||||
createPoster() {
|
||||
let data = {
|
||||
type: 3,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: this.$globalConstVars.shareModel.poster,
|
||||
page: this.$globalConstVars.shareType.inv,
|
||||
params: {
|
||||
store: this.storeCode
|
||||
},
|
||||
page: 4,
|
||||
}
|
||||
let pages = getCurrentPages()
|
||||
let page = pages[pages.length - 1]
|
||||
let pageUrl = this.$globalConstVars.shareUrl;
|
||||
// #ifdef H5
|
||||
data.client = 1;
|
||||
data.url = this.$globalConstVars.apiBaseUrl + 'wap/' + pageUrl;
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
data.client = 2;
|
||||
data.url = pageUrl;
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY
|
||||
data.client = 3;
|
||||
data.url = pageUrl;
|
||||
// #endif
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
data.client = 5;
|
||||
data.url = this.$globalConstVars.apiBaseUrl + 'wap/' + pageUrl;
|
||||
// #endif
|
||||
// #ifdef MP-TOUTIAO
|
||||
data.client = 6;
|
||||
// #endif
|
||||
let userToken = this.$db.get('userToken')
|
||||
if (userToken && userToken != '') {
|
||||
data.token = userToken
|
||||
@@ -292,10 +264,10 @@
|
||||
//获取分享URL
|
||||
getShareUrl() {
|
||||
let data = {
|
||||
client: 2,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: 1,
|
||||
page: 4,
|
||||
type: this.$globalConstVars.shareModel.url,
|
||||
page: this.$globalConstVars.shareType.inv,
|
||||
params: {
|
||||
store: this.storeCode
|
||||
}
|
||||
|
||||
@@ -116,7 +116,6 @@
|
||||
},
|
||||
info: {}, //分销商信息
|
||||
userInfo: {}, // 用户信息
|
||||
shareUrl: this.$globalConstVars.shareUrl
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
@@ -168,10 +167,10 @@
|
||||
//获取分享URL
|
||||
getShareUrl() {
|
||||
let data = {
|
||||
client: 2,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: 1,
|
||||
page: 1,
|
||||
type: this.$globalConstVars.shareModel.url,
|
||||
page: this.$globalConstVars.shareType.inv,
|
||||
};
|
||||
let userToken = this.$db.get('userToken');
|
||||
if (userToken && userToken != '') {
|
||||
@@ -184,32 +183,14 @@
|
||||
// 生成邀请海报
|
||||
createPoster() {
|
||||
let data = {
|
||||
type: 3,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: this.$globalConstVars.shareModel.poster,
|
||||
page: this.$globalConstVars.shareType.inv,
|
||||
params: {
|
||||
store: this.info.store
|
||||
},
|
||||
page: 4,
|
||||
}
|
||||
let pageUrl = this.$globalConstVars.shareUrl;
|
||||
// #ifdef H5
|
||||
data.client = 1;
|
||||
data.url = this.$globalConstVars.apiBaseUrl + 'wap/' + pageUrl;
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
data.client = 2;
|
||||
data.url = pageUrl;
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY
|
||||
data.client = 3;
|
||||
data.url = pageUrl;
|
||||
// #endif
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
data.client = 5;
|
||||
data.url = this.$globalConstVars.apiBaseUrl + 'wap/' + pageUrl;
|
||||
// #endif
|
||||
// #ifdef MP-TOUTIAO
|
||||
data.client = 6;
|
||||
// #endif
|
||||
let userToken = this.$db.get('userToken')
|
||||
if (userToken && userToken != '') {
|
||||
data.token = userToken
|
||||
|
||||
@@ -42,13 +42,6 @@
|
||||
</u-button>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="coreshop-padding-10">
|
||||
<u-button class='' size="small" color="linear-gradient(to right, rgb(66, 83, 216), rgb(213, 51, 186))" @click="copyUrl()" v-show="!ifwx">
|
||||
<u-icon name="zhuanfa" size="18" labelSize="13" label="一键转发" color="#fff" labelColor="#fff"></u-icon>
|
||||
</u-button>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<view class="coreshop-padding-10">
|
||||
<u-button class='' size="small" color="linear-gradient(to right, rgb(66, 83, 216), rgb(213, 51, 186))" @click="createPoster()">
|
||||
<u-icon name="moments" size="18" labelSize="13" label="二维码分享" color="#fff" labelColor="#fff"></u-icon>
|
||||
@@ -60,7 +53,6 @@
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import { h5Url } from '@/common/setting/constVarsHelper.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -80,13 +72,8 @@
|
||||
},
|
||||
onShow() {
|
||||
this.getInviteData();
|
||||
this.ifwxl()
|
||||
},
|
||||
methods: {
|
||||
// 判断是不是微信浏览器
|
||||
ifwxl() {
|
||||
this.ifwx = this.$common.isWeiXinBrowser()
|
||||
},
|
||||
//获取数据
|
||||
getInviteData() {
|
||||
this.$u.api.myInvite(null).then(res => {
|
||||
@@ -122,91 +109,34 @@
|
||||
// 生成邀请海报
|
||||
createPoster() {
|
||||
let data = {
|
||||
page: 1,//首页
|
||||
type: 3,//海报
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: this.$globalConstVars.shareModel.poster,
|
||||
page: this.$globalConstVars.shareType.index,
|
||||
}
|
||||
let userToken = this.$db.get('userToken')
|
||||
if (userToken) {
|
||||
if (userToken && userToken != '') {
|
||||
data.token = userToken
|
||||
}
|
||||
// #ifdef H5 || APP-PLUS || APP-PLUS-NVUE
|
||||
data.client = 1;
|
||||
data.url = h5Url + this.$globalConstVars.shareUrl
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
data.client = 2;
|
||||
data.url = this.$globalConstVars.shareUrl
|
||||
// #endif
|
||||
// #ifdef MP-TOUTIAO
|
||||
data.client = 4;
|
||||
data.url = this.$globalConstVars.shareUrl
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY
|
||||
data.client = 6;
|
||||
data.url = this.$globalConstVars.shareUrl
|
||||
// #endif
|
||||
this.$u.api.share(data).then(res => {
|
||||
if (res.status) {
|
||||
this.$u.route('/pages/share/sharePoster/sharePoster?poster=' + encodeURIComponent(res.data))
|
||||
} else {
|
||||
this.$u.toast(res.msg)
|
||||
}
|
||||
});
|
||||
},
|
||||
//复制URL链接
|
||||
copyUrl() {
|
||||
let data = {
|
||||
page: 1,//首页
|
||||
type: 1,//海报
|
||||
}
|
||||
let userToken = this.$db.get('userToken')
|
||||
if (userToken) {
|
||||
data.token = userToken
|
||||
}
|
||||
// #ifdef H5 || APP-PLUS || APP-PLUS-NVUE
|
||||
data.client = 1;
|
||||
data.url = h5Url + this.$globalConstVars.shareUrl
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
data.client = 2;
|
||||
data.url = this.$globalConstVars.shareUrl
|
||||
// #endif
|
||||
// #ifdef MP-TOUTIAO
|
||||
data.client = 4;
|
||||
data.url = this.$globalConstVars.shareUrl
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY
|
||||
data.client = 6;
|
||||
data.url = this.$globalConstVars.shareUrl
|
||||
// #endif
|
||||
let _this = this;
|
||||
this.$u.api.share(data).then(res => {
|
||||
if (res.status) {
|
||||
uni.setClipboardData({
|
||||
data: res.data,
|
||||
success: function (data) {
|
||||
_this.$refs.uToast.show({ message: '复制成功', type: 'success' })
|
||||
},
|
||||
fail: function (err) {
|
||||
_this.$u.toast('复制分享URL失败');
|
||||
}
|
||||
})
|
||||
} else {
|
||||
_this.$u.toast('复制分享URL失败');
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
//获取分享URL
|
||||
getShareUrl() {
|
||||
let data = {
|
||||
client: 2,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: 1,
|
||||
page: 1,
|
||||
type: this.$globalConstVars.shareModel.url,
|
||||
page: this.$globalConstVars.shareType.index,
|
||||
};
|
||||
let userToken = this.$db.get('userToken');
|
||||
if (userToken && userToken != '') {
|
||||
data['token'] = userToken;
|
||||
data.token = userToken
|
||||
}
|
||||
this.$u.api.share(data).then(res => {
|
||||
this.shareUrl = res.data
|
||||
|
||||
@@ -135,13 +135,13 @@
|
||||
<view class="coreshop-text-black title-view">
|
||||
<view class="title">提货码:</view>
|
||||
<view class="coreshop-text-right">
|
||||
<text class="red-price">{{ladingItem.id|| ''}}</text>
|
||||
<text class="coreshop-text-red">{{ladingItem.id|| ''}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-text-black title-view">
|
||||
<view class="title">提货说明:</view>
|
||||
<view class="coreshop-text-right">
|
||||
<text class="red-price coreshop-margin-right-10">{{ladingItem.statusName|| ''}}</text>
|
||||
<text class="coreshop-text-red coreshop-margin-right-10">{{ladingItem.statusName|| ''}}</text>
|
||||
<view class="coreshop-width-fit-content">
|
||||
<u-button type="success" size="mini" v-if="ladingItem.status == false" @click="ladingWrite(ladingItem.id)">立即核销</u-button>
|
||||
</view>
|
||||
@@ -150,7 +150,7 @@
|
||||
<view class="coreshop-text-black title-view" v-if="ladingItem.pickUpTime">
|
||||
<view class="title">提货时间:</view>
|
||||
<view class="coreshop-text-right">
|
||||
<text class="red-price">{{ladingItem.pickUpTime|| ''}}</text>
|
||||
<text class="coreshop-text-red">{{ladingItem.pickUpTime|| ''}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -7,12 +7,7 @@
|
||||
<view class="head-box">
|
||||
<view class="head-wrap">
|
||||
<view class="titleNav coreshop-padding-left-15 coreshop-padding-right-15">
|
||||
<!-- #ifndef H5 -->
|
||||
<view class="status-bar"></view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="status-H5bar"></view>
|
||||
<!-- #endif -->
|
||||
<text class="nav-title coreshop-flex coreshop-align-center">商家中心</text>
|
||||
</view>
|
||||
<view class="coreshop-padding-top-25 coreshop-flex coreshop-justify-between">
|
||||
@@ -243,9 +238,7 @@
|
||||
computed: {},
|
||||
onLoad(options) {
|
||||
if (options.storeId) {
|
||||
//uni.setStorageSync('storeId', options.storeId);
|
||||
this.storeId = options.storeId;
|
||||
console.log("获取到storeId:" + this.storeId);
|
||||
}
|
||||
this.getStoreDetail();
|
||||
this.getStoreOrder();
|
||||
@@ -336,12 +329,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 切换核销分类
|
||||
onNav(type) {
|
||||
//this.isShowDropDown = this.cancelType == type ? false : true;
|
||||
this.cancelType = this.cancelType == type ? '' : type;
|
||||
console.log('cancelType:' + this.cancelType);
|
||||
},
|
||||
// 选择日期
|
||||
selDate(e) {
|
||||
@@ -354,7 +344,6 @@
|
||||
},
|
||||
// 下拉筛选
|
||||
onHideDropDown() {
|
||||
//this.isShowDropDown = false;
|
||||
this.cancelType = '';
|
||||
},
|
||||
// 选择筛选
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
return {
|
||||
keyword: '',
|
||||
storeOrderList: [], //订单商品列表
|
||||
loadStatus: 'loadmore', //loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态
|
||||
loadStatus: this.$globalConstVars.loadStatus.loadMore, //loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态
|
||||
currentPage: 1,
|
||||
lastPage: 1,
|
||||
}
|
||||
@@ -141,7 +141,7 @@
|
||||
// 门店订单列表
|
||||
getStoreOrder() {
|
||||
let that = this;
|
||||
that.loadStatus = 'loading';
|
||||
that.loadStatus = this.$globalConstVars.loadStatus.loading;
|
||||
let data = {
|
||||
keyword: this.keyword,
|
||||
page: that.currentPage,
|
||||
@@ -154,9 +154,9 @@
|
||||
that.storeOrderList = [...that.storeOrderList, ...res.data.pages];
|
||||
that.lastPage = res.data.totalPages;
|
||||
if (that.currentPage < res.data.totalPages) {
|
||||
that.loadStatus = 'loadmore';
|
||||
that.loadStatus = this.$globalConstVars.loadStatus.loadMore;
|
||||
} else {
|
||||
that.loadStatus = 'nomore';
|
||||
that.loadStatus = this.$globalConstVars.loadStatus.noMore;
|
||||
}
|
||||
} else {
|
||||
this.uToast.show({
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="left">
|
||||
<u--image :showLoading="true" :src="service.thumbnail && service.thumbnail!='null' ? service.thumbnail : '/static/images/common/empty-banner.png'" width="80px" height="80px" mode="aspectFill"></u--image>
|
||||
<u--image :showLoading="true" :src="service.thumbnail" width="80px" height="80px" mode="aspectFill"></u--image>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="title u-line-2">{{service.title}}</view>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</view>
|
||||
<view class="item" v-for="(v, key) in item.orderItems" :key="key">
|
||||
<view class="left">
|
||||
<u--image :showLoading="true" :src="v.imageUrl && v.imageUrl!='null' ? v.imageUrl : '/static/images/common/empty-banner.png'" width="80px" height="80px" mode="aspectFill"></u--image>
|
||||
<u--image :showLoading="true" :src="v.imageUrl" width="80px" height="80px" mode="aspectFill"></u--image>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="title u-line-2">{{v.name}}</view>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</view>
|
||||
<view class="item" v-for="(v, k) in item.orderItems" :key="k">
|
||||
<view class="left">
|
||||
<u--image :showLoading="true" :src="v.imageUrl && v.imageUrl!='null' ? v.imageUrl : '/static/images/common/empty-banner.png'" width="80px" height="80px" mode="aspectFill"></u--image>
|
||||
<u--image :showLoading="true" :src="v.imageUrl" width="80px" height="80px" mode="aspectFill"></u--image>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="title u-line-2">{{v.name}}</view>
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
.coreshop-cell-group .coreshop-cell-item .coreshop-cell-item-ft .coreshop-cell-ft-view { position: relative; overflow: hidden; color: #666; font-size: 12px; text-align: left; white-space: nowrap; }
|
||||
|
||||
.user-head-img-c { position: relative; width: 40px; height: 40px; border-radius: 50%; margin-right: 10px; box-sizing: border-box; display: inline-block; border: 1px solid #f3f3f3; }
|
||||
|
||||
@@ -92,11 +92,18 @@
|
||||
<view class="uhihn" v-for="n in teamInfo.teamNums" :key="n">?</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-cell-item-ft" v-if="teamInfo.status==1">
|
||||
<u-button type="success" size="mini" @click="goInvition()">邀请拼单</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-bottom-10 coreshop-percent-100 coreshop-flex coreshop-flex-direction coreshop-align-center coreshop-justify-center">
|
||||
<view class="coreshop-width-fit-content">
|
||||
<u-button type="success" size="small" @click="goInvition">
|
||||
<u-icon name="share-fill" color="#fff" label="立即邀请好友拼单" labelColor="#fff"></u-icon>
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
<!--<view class="coreshop-cell-item-ft" v-if="teamInfo.status==1">
|
||||
<u-button type="success" size="mini" @click="goInvition()">邀请拼单</u-button>
|
||||
</view>-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -180,7 +187,7 @@
|
||||
<view class="coreshop-text-black title-view" v-if="lading.status">
|
||||
<view class="title">提货码:</view>
|
||||
<view class="coreshop-text-right" @click="showQrcodeBox(lading.code)">
|
||||
<text class="red-price">{{lading.code|| ''}}</text>
|
||||
<text class="coreshop-text-red">{{lading.code|| ''}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -206,12 +213,9 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<!--发票信息-->
|
||||
<view class="coreshop-bg-white coreshop-card-box" v-if="orderInfo.invoice && orderInfo.invoice.type != 1">
|
||||
<view class="coreshop-card-view coreshop-order-view">
|
||||
@@ -315,7 +319,7 @@
|
||||
|
||||
<view class="coreshop-text-black coreshop-text-center">
|
||||
<view class="coreshop-width-fit-content contact-btn">
|
||||
<u-button type="primary" size="mini" open-type="contact" bindcontact="showChat">联系客服</u-button>
|
||||
<u-button type="primary" size="small" open-type="contact" bindcontact="showChat">联系客服</u-button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -432,22 +436,22 @@
|
||||
|
||||
<view class="coreshop-bg-white coreshop-footer-fixed coreshop-foot-padding-bottom" v-if="orderInfo.status == 1 || orderInfo.status == 2">
|
||||
<view class="coreshop-width-fit-content coreshop-padding-left-10 coreshop-padding-right-10" v-if="orderInfo.status == 1 && orderInfo.payStatus == 1 && orderInfo.shipStatus == 1">
|
||||
<u-button class='coreshop-margin-left-10 coreshop-margin-right-10' type="warning" size="mini" @click="cancelOrder(orderInfo.orderId)">取消订单</u-button>
|
||||
<u-button class='coreshop-margin-left-10 coreshop-margin-right-10' type="warning" size="small" @click="cancelOrder(orderInfo.orderId)">取消订单</u-button>
|
||||
</view>
|
||||
<view class="coreshop-width-fit-content coreshop-padding-left-10 coreshop-padding-right-10" v-if="orderInfo.status == 1 && orderInfo.payStatus == 1" @click="goToPay(orderInfo.orderId)">
|
||||
<u-button class='coreshop-margin-left-10 coreshop-margin-right-10' type="primary" size="mini">立即支付</u-button>
|
||||
<u-button class='coreshop-margin-left-10 coreshop-margin-right-10' type="primary" size="small">立即支付</u-button>
|
||||
</view>
|
||||
<view class="coreshop-width-fit-content coreshop-padding-left-10 coreshop-padding-right-10" v-if="orderInfo.status == 1 && orderInfo.payStatus >= 2 && orderInfo.shipStatus >= 3 && orderInfo.confirmStatus == 1">
|
||||
<u-button class='coreshop-margin-left-10 coreshop-margin-right-10' type="success" size="mini" @click="tackDeliery(orderInfo.orderId)">确认收货</u-button>
|
||||
<u-button class='coreshop-margin-left-10 coreshop-margin-right-10' type="success" size="small" @click="tackDeliery(orderInfo.orderId)">确认收货</u-button>
|
||||
</view>
|
||||
<view class="coreshop-width-fit-content coreshop-padding-left-10 coreshop-padding-right-10" v-if="orderInfo.status === 1 && orderInfo.payStatus >= 2 && orderInfo.shipStatus >= 3 && orderInfo.confirmStatus >= 2 && orderInfo.isComment == false">
|
||||
<u-button class='coreshop-margin-left-10 coreshop-margin-right-10' type="success" size="mini" @click="toEvaluate(orderInfo.orderId)">立即评价</u-button>
|
||||
<u-button class='coreshop-margin-left-10 coreshop-margin-right-10' type="success" size="small" @click="toEvaluate(orderInfo.orderId)">立即评价</u-button>
|
||||
</view>
|
||||
<view class="coreshop-width-fit-content coreshop-padding-left-10 coreshop-padding-right-10" v-if="orderInfo.addAftersalesStatus">
|
||||
<u-button class='coreshop-margin-left-10 coreshop-margin-right-10' type="warning " size="mini" @click="customerService(orderInfo.orderId)">申请售后</u-button>
|
||||
<u-button class='coreshop-margin-left-10 coreshop-margin-right-10' type="warning " size="small" @click="customerService(orderInfo.orderId)">申请售后</u-button>
|
||||
</view>
|
||||
<view class="coreshop-width-fit-content coreshop-padding-left-10 coreshop-padding-right-10" v-if="orderInfo.billAftersalesId && orderInfo.billAftersalesId != false">
|
||||
<u-button class='coreshop-bg-red coreshop-margin-left-10 coreshop-margin-right-10' size="mini" @click="showCustomerService(orderInfo)">查看售后</u-button>
|
||||
<u-button class='coreshop-bg-red coreshop-margin-left-10 coreshop-margin-right-10' size="small" @click="showCustomerService(orderInfo)">查看售后</u-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -630,7 +634,7 @@
|
||||
// #ifdef MP-WEIXIN
|
||||
beforePage.$vm.isReload = true
|
||||
// #endif
|
||||
// #ifdef H5 || APP-PLUS || APP-PLUS-NVUE
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
beforePage.isReload = true
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY || MP-TOUTIAO
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
<view class="orderList coreshop-padding-0">
|
||||
<view class="item" @click="goGoodsDetail(item.goodsId)">
|
||||
<view class="left">
|
||||
<u--image :showLoading="true" :src="item.imageUrl && item.imageUrl!='null' ? item.imageUrl : '/static/images/common/empty-banner.png'" width="80px" height="80px" mode="aspectFill"></u--image>
|
||||
<!--<image :src="item.imageUrl && item.imageUrl!='null' ? item.imageUrl : '/static/images/common/empty-banner.png'" mode="aspectFill"></image>-->
|
||||
<u--image :showLoading="true" :src="item.imageUrl" width="80px" height="80px" mode="aspectFill"></u--image>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="title u-line-4">{{item.name}}</view>
|
||||
@@ -191,9 +190,6 @@
|
||||
// #ifdef MP-WEIXIN
|
||||
beforePage.$vm.isReload = true
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
beforePage.isReload = true
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY || MP-TOUTIAO
|
||||
_this.$db.set('orderUserEvaluate', true, true);
|
||||
// #endif
|
||||
@@ -204,9 +200,6 @@
|
||||
// #ifdef MP-WEIXIN
|
||||
before.$vm.isReload = true
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
before.isReload = true
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY || MP-TOUTIAO
|
||||
_this.$db.set('orderUserEvaluate', true, true);
|
||||
// #endif
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</view>
|
||||
<view class="item" v-for="(goods, indexGoods) in order.items" :key="indexGoods">
|
||||
<view class="left">
|
||||
<u--image :showLoading="true" :src="goods.imageUrl && goods.imageUrl!='null' ? goods.imageUrl : '/static/images/common/empty-banner.png'" width="80px" height="80px" mode="aspectFill"></u--image>
|
||||
<u--image :showLoading="true" :src="goods.imageUrl" width="80px" height="80px" mode="aspectFill"></u--image>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="title u-line-2">{{goods.name}}</view>
|
||||
@@ -233,7 +233,4 @@
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
/* #ifndef H5 */
|
||||
page { height: 100%; background-color: #f2f2f2; }
|
||||
/* #endif */
|
||||
</style>
|
||||
|
||||
@@ -40,14 +40,11 @@
|
||||
<!-- 弹出层 -->
|
||||
<view class="coreshop-padding-10">
|
||||
<u-popup mode="bottom" :show="shareBox" ref="share">
|
||||
<!-- #ifdef H5 -->
|
||||
<coreshop-share-h5 :shareType='$globalConstVars.shareType.addPinTuan' :goodsId="goodsInfo.goodsId" :teamId="teamInfo.teamId" :groupId="teamInfo.ruleId" :shareImg="goodsInfo.imageUrl" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.addon" :shareHref="shareHref" @close="closeShare()"></coreshop-share-h5>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<coreshop-share-wx :shareType='$globalConstVars.shareType.addPinTuan' :goodsId="goodsInfo.goodsId" :teamId="teamInfo.teamId" :groupId="teamInfo.ruleId" :shareImg="goodsInfo.imageUrl" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.addon" :shareHref="shareHref" @close="closeShare()"></coreshop-share-wx>
|
||||
<coreshop-share-wx :shareType='$globalConstVars.shareType.addPinTuan' :goodsId="goodsInfo.goodsId" :teamId="teamInfo.teamId" :groupId="teamInfo.ruleId" :shareImg="goodsInfo.imageUrl" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.addon" @close="closeShare()"></coreshop-share-wx>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-PLUS || APP-PLUS-NVUE -->
|
||||
<coreshop-share-app :shareType='$globalConstVars.shareType.addPinTuan' :goodsId="goodsInfo.goodsId" :teamId="teamInfo.teamId" :groupId="teamInfo.ruleId" :shareImg="goodsInfo.imageUrl" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.addon" :shareHref="shareHref" @close="closeShare()"></coreshop-share-app>
|
||||
<coreshop-share-app :shareType='$globalConstVars.shareType.addPinTuan' :goodsId="goodsInfo.goodsId" :teamId="teamInfo.teamId" :groupId="teamInfo.ruleId" :shareImg="goodsInfo.imageUrl" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.addon" @close="closeShare()"></coreshop-share-app>
|
||||
<!-- #endif -->
|
||||
</u-popup>
|
||||
</view>
|
||||
@@ -108,19 +105,6 @@
|
||||
this.orderDetail();
|
||||
this.getTeam();
|
||||
},
|
||||
computed: {
|
||||
shareHref() {
|
||||
let pages = getCurrentPages()
|
||||
let page = pages[pages.length - 1]
|
||||
// #ifdef H5 || MP-WEIXIN || APP-PLUS || APP-PLUS-NVUE || MP-TOUTIAO
|
||||
return this.$globalConstVars.apiBaseUrl + 'wap/' + page.route + '?scene=' + this.query;
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-ALIPAY
|
||||
return this.$globalConstVars.apiBaseUrl + 'wap/' + page.__proto__.route + '?scene=' + this.query;
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//拼团信息
|
||||
getTeam() {
|
||||
@@ -200,9 +184,9 @@
|
||||
//获取分享URL
|
||||
getShareUrl() {
|
||||
let data = {
|
||||
client: 2,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: 1,
|
||||
type: this.$globalConstVars.shareModel.url,
|
||||
page: this.$globalConstVars.shareType.addPinTuan,
|
||||
params: {
|
||||
goodsId: this.goodsInfo.goodsId,
|
||||
@@ -212,7 +196,7 @@
|
||||
};
|
||||
let userToken = this.$db.get('userToken');
|
||||
if (userToken && userToken != '') {
|
||||
data['token'] = userToken;
|
||||
data.token = userToken
|
||||
}
|
||||
this.$u.api.share(data).then(res => {
|
||||
this.shareUrl = res.data
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="left">
|
||||
<u--image :showLoading="true" :src="item.service.thumbnail && item.service.thumbnail!='null' ? item.service.thumbnail : '/static/images/common/empty-banner.png'" width="80px" height="80px" mode="aspectFill"></u--image>
|
||||
<u--image :showLoading="true" :src="item.service.thumbnail" width="80px" height="80px" mode="aspectFill"></u--image>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="title u-line-2">{{item.service.title}}</view>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</u-navbar>
|
||||
|
||||
<view class="coreshop-bg-white coreshop-padding-10 coreshop-margin-10">
|
||||
<u--image width="100%" height="150px" v-if="info.coverImage" :src="info.coverImage && info.coverImage!='null' ? info.coverImage+'?x-oss-process=image/resize,m_lfit,h_320,w_240' : '/static/images/common/empty-banner.png'"></u--image>
|
||||
<u--image width="100%" height="150px" v-if="info.coverImage" :src="info.coverImage"></u--image>
|
||||
<view class="article-title">
|
||||
{{ info.title }}
|
||||
</view>
|
||||
@@ -61,17 +61,17 @@
|
||||
//获取分享URL
|
||||
getShareUrl() {
|
||||
let data = {
|
||||
client: 2,
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: 1,
|
||||
page: 5,
|
||||
type: this.$globalConstVars.shareModel.url,
|
||||
page: this.$globalConstVars.shareType.article,
|
||||
params: {
|
||||
noticeId: this.id,
|
||||
}
|
||||
};
|
||||
let userToken = this.$db.get('userToken');
|
||||
if (userToken && userToken != '') {
|
||||
data['token'] = userToken;
|
||||
data.token = userToken
|
||||
}
|
||||
this.$u.api.share(data).then(res => {
|
||||
this.shareUrl = res.data
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapMutations, mapActions, mapState } from 'vuex';
|
||||
import { mapState } from 'vuex';
|
||||
export default {
|
||||
props: {
|
||||
// 如果是商品订单此参数必须
|
||||
@@ -78,7 +78,6 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.getPayments()
|
||||
},
|
||||
computed: {
|
||||
|
||||
@@ -1,334 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-toast ref="uToast" />
|
||||
<view v-for="item in payments" :key="item.code" @click="toPayHandler(item.code)" v-if="!(type == 2 && item.code == 'balancepay')">
|
||||
<view class="u-reset-button coreshop-list menu-avatar padding-xl radius shadow shadow-lg bg-blue margin-top">
|
||||
<view class="coreshop-list-item">
|
||||
<view class="coreshop-avatar radius">
|
||||
<u--image width="34px" height="34px" :src="item.icon" :lazy-load="false" :fade="false" duration="0"></u--image>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="coreshop-text-grey">{{ item.name }}</view>
|
||||
<view class="coreshop-text-gray coreshop-font-sm flex coreshop-text-left">
|
||||
<view class="u-line-1">
|
||||
{{ item.memo }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="action">
|
||||
<u-tag text="选择此支付方式" mode="dark" type="error" shape="circle" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="payment-pop" v-show="popShow">
|
||||
<view class="payment-pop-c">
|
||||
<image src="/static/images/payments/wait-pay.png" style="width: 30px;height: 30px;"></image>
|
||||
<view class="text">支付中,请稍后...</view>
|
||||
</view>
|
||||
<view class="payment-pop-b">
|
||||
<button class="coreshop-btn coreshop-btn-c" @click="popHide">支付失败</button>
|
||||
<button class="coreshop-btn coreshop-btn-o" @click="popHide">支付成功</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
// 如果是商品订单此参数必须
|
||||
orderId: {
|
||||
type: String,
|
||||
default() {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
// 如果是充值订单此参数必须
|
||||
recharge: {
|
||||
type: Number,
|
||||
default() {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
// 用户id
|
||||
uid: {
|
||||
type: Number,
|
||||
default() {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
// 订单类型
|
||||
type: {
|
||||
type: Number,
|
||||
default() {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
payments: [],
|
||||
openid: '',
|
||||
popShow: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getPayments()
|
||||
},
|
||||
methods: {
|
||||
// 获取可用支付方式列表
|
||||
getPayments() {
|
||||
this.$u.api.paymentList().then(res => {
|
||||
if (res.status) {
|
||||
this.payments = this.formatPayments(res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 支付方式处理
|
||||
formatPayments(payments) {
|
||||
// h5支付并且是在微信浏览器内 过滤支付宝支付
|
||||
if (this.$common.isWeiXinBrowser()) {
|
||||
payments = payments.filter(item => item.code !== 'alipay')
|
||||
}
|
||||
|
||||
// 如果是充值订单 过滤余额支付 过滤非线上支付方式
|
||||
if (this.type === 2) {
|
||||
payments = payments.filter(
|
||||
item => item.code !== 'balancepay' || item.is_online === 1
|
||||
)
|
||||
}
|
||||
|
||||
// 设置logo图片
|
||||
payments.forEach(item => {
|
||||
this.$set(item, 'icon', '/static/images/payments/' + item.code + '.png')
|
||||
})
|
||||
|
||||
return payments
|
||||
},
|
||||
checkWXJSBridge(data) {
|
||||
let that = this
|
||||
let interval = setInterval(() => {
|
||||
if (typeof window.WeixinJSBridge != 'undefined') {
|
||||
clearTimeout(interval)
|
||||
that.onBridgeReady(data)
|
||||
}
|
||||
}, 200)
|
||||
},
|
||||
onBridgeReady(data) {
|
||||
var _this = this
|
||||
window.WeixinJSBridge.invoke(
|
||||
'getBrandWCPayRequest', {
|
||||
appId: data.appid, // 公众号名称,由商户传入
|
||||
timeStamp: data.timeStamp, // 时间戳,自1970年以来的秒数
|
||||
nonceStr: data.nonceStr, // 随机串
|
||||
package: data.package,
|
||||
signType: data.signType, // 微信签名方式:
|
||||
paySign: data.paySign // 微信签名
|
||||
},
|
||||
function (res) {
|
||||
if (res.err_msg === 'get_brand_wcpay_request:ok') {
|
||||
_this.$common.successToShow('支付成功')
|
||||
} else if (res.err_msg === 'get_brand_wcpay_request:cancel') {
|
||||
_this.$u.toast('取消支付')
|
||||
} else {
|
||||
_this.$u.toast('支付失败')
|
||||
}
|
||||
setTimeout(() => {
|
||||
_this.$u.route({ type: 'redirectTo', url: '/pages/payment/result/result?id=' + data.paymentId });
|
||||
}, 1000)
|
||||
}
|
||||
)
|
||||
},
|
||||
// 用户点击支付方式处理
|
||||
toPayHandler(code) {
|
||||
this.popShow = true;
|
||||
let data = {
|
||||
payment_code: code,
|
||||
payment_type: this.type
|
||||
}
|
||||
data['ids'] = (this.type == 1 || this.type == 5 || this.type == 6) ? this.orderId : this.uid
|
||||
switch (code) {
|
||||
case 'alipay':
|
||||
/**
|
||||
* 支付宝支付需要模拟GET提交数据
|
||||
*/
|
||||
if (this.type == 1 && this.orderId) {
|
||||
data['params'] = {
|
||||
trade_type: 'WAP',
|
||||
return_url: baseUrl +
|
||||
'wap/pages/payment/result/result'
|
||||
}
|
||||
} else if (this.type == 2 && this.recharge) {
|
||||
data['params'] = {
|
||||
money: this.recharge,
|
||||
return_url: baseUrl + 'wap/pages/payment/result/result'
|
||||
}
|
||||
} else if ((this.type == 5 || this.type == 6) && this.recharge) {
|
||||
data['params'] = {
|
||||
}
|
||||
}
|
||||
|
||||
this.$u.api.pay(data).then(res => {
|
||||
if (res.status) {
|
||||
const url = res.data.url
|
||||
const data = res.data.data
|
||||
|
||||
// 模拟GET提交
|
||||
let tempForm = document.createElement('form')
|
||||
tempForm.id = 'aliPay'
|
||||
tempForm.methods = 'post'
|
||||
tempForm.action = url
|
||||
tempForm.target = '_self'
|
||||
let input = []
|
||||
for (let k in data) {
|
||||
input[k] = document.createElement('input')
|
||||
input[k].type = 'hidden'
|
||||
input[k].name = k
|
||||
input[k].value = data[k]
|
||||
tempForm.appendChild(input[k])
|
||||
}
|
||||
tempForm.addEventListener('submit', function () { }, false)
|
||||
document.body.appendChild(tempForm)
|
||||
tempForm.dispatchEvent(new Event('submit'))
|
||||
tempForm.submit()
|
||||
document.body.removeChild(tempForm)
|
||||
}
|
||||
})
|
||||
break
|
||||
case 'wechatpay':
|
||||
|
||||
/**
|
||||
* 微信支付有两种
|
||||
* 判断是否在微信浏览器
|
||||
* 微信jsapi支付
|
||||
*/
|
||||
let isWeiXin = this.$common.isWeiXinBrowser()
|
||||
|
||||
if (isWeiXin) {
|
||||
var transitUrl =
|
||||
baseUrl +
|
||||
'wap/pages/payment/waiting/waiting?orderId=' +
|
||||
this.orderId +
|
||||
'&type=' +
|
||||
this.type;
|
||||
|
||||
if (this.type == 1 && this.orderId) {
|
||||
// 微信jsapi支付
|
||||
// if (this.openid) {
|
||||
// data['params'] = {
|
||||
// trade_type: 'JSAPI_OFFICIAL',
|
||||
// openid: this.openid
|
||||
// }
|
||||
// } else {
|
||||
// data['params'] = {
|
||||
// trade_type: 'JSAPI_OFFICIAL',
|
||||
// url: window.location.href
|
||||
// }
|
||||
// }
|
||||
data['params'] = {
|
||||
trade_type: 'JSAPI_OFFICIAL',
|
||||
url: transitUrl
|
||||
}
|
||||
} else if (this.type == 2 && this.recharge) {
|
||||
data['params'] = {
|
||||
trade_type: 'JSAPI_OFFICIAL',
|
||||
money: this.recharge,
|
||||
url: transitUrl + '&uid=' + this.uid + '&money=' + this.recharge
|
||||
}
|
||||
// if (this.openid) {
|
||||
// data['params'] = {
|
||||
// money: this.recharge,
|
||||
// openid: this.openid
|
||||
// }
|
||||
// } else {
|
||||
// data['params'] = {
|
||||
// money: this.recharge,
|
||||
// url: window.location.href
|
||||
// }
|
||||
// }
|
||||
} else if ((this.type == 5 || this.type == 6) && this.recharge) {
|
||||
data['params'] = {
|
||||
}
|
||||
}
|
||||
this.$u.api.pay(data).then(res => {
|
||||
if (!res.status && res.data == '10066') {
|
||||
window.location.href = res.msg
|
||||
return;
|
||||
}
|
||||
const data = res.data
|
||||
this.checkWXJSBridge(data)
|
||||
})
|
||||
} else {
|
||||
// 微信 H5支付
|
||||
if (this.type == 1 && this.orderId) {
|
||||
data['params'] = {
|
||||
trade_type: 'MWEB',
|
||||
return_url: baseUrl +
|
||||
'wap/pages/payment/result/result'
|
||||
}
|
||||
} else if (this.type == 2 && this.recharge) {
|
||||
data['params'] = {
|
||||
trade_type: 'MWEB',
|
||||
money: this.recharge,
|
||||
return_url: baseUrl + 'wap/pages/payment/result/result'
|
||||
}
|
||||
} else if ((this.type == 5 || this.type == 6) && this.recharge) {
|
||||
data['params'] = {
|
||||
}
|
||||
}
|
||||
// 微信h5支付
|
||||
this.$u.api.pay(data).then(res => {
|
||||
if (res.status) {
|
||||
location.href = res.data.mweb_url
|
||||
} else {
|
||||
this.$u.toast(res.msg)
|
||||
this.popHide();
|
||||
}
|
||||
})
|
||||
}
|
||||
break
|
||||
case 'balancepay':
|
||||
/**
|
||||
* 用户余额支付
|
||||
*
|
||||
*/
|
||||
if ((this.type == 5 || this.type == 6) && this.recharge) {
|
||||
data['params'] = {
|
||||
}
|
||||
}
|
||||
this.$u.api.pay(data).then(res => {
|
||||
if (res.status) {
|
||||
this.$u.route({ type: 'redirectTo', url: '/pages/payment/result/result?id=' + res.data.paymentId });
|
||||
} else {
|
||||
this.$u.toast(res.msg)
|
||||
this.popHide();
|
||||
}
|
||||
})
|
||||
break
|
||||
case 'offline':
|
||||
/**
|
||||
* 线下支付
|
||||
*/
|
||||
this.$common.modelShow(
|
||||
'线下支付说明',
|
||||
'请联系客服进行线下支付',
|
||||
() => { },
|
||||
false,
|
||||
'取消',
|
||||
'确定'
|
||||
)
|
||||
break
|
||||
}
|
||||
},
|
||||
// 支付中显示隐藏
|
||||
popHide() {
|
||||
this.popShow = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.coreshop-avatar { background: #fff; }
|
||||
</style>
|
||||
@@ -13,7 +13,7 @@
|
||||
<view class="coreshop-text-gray coreshop-font-sm flex coreshop-text-left">
|
||||
<view class="u-line-1 coreshop-text-red" v-if="item.code == 'balancepay'">
|
||||
当前余额:{{userInfo.balance}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-line-1" v-else>
|
||||
{{item.memo}}
|
||||
</view>
|
||||
@@ -39,7 +39,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapMutations, mapActions, mapState } from 'vuex';
|
||||
import { mapState } from 'vuex';
|
||||
export default {
|
||||
props: {
|
||||
// 如果是商品订单此参数必须
|
||||
@@ -133,8 +133,9 @@
|
||||
let data = {
|
||||
payment_code: code,
|
||||
payment_type: this.type,
|
||||
params: {}
|
||||
}
|
||||
params: {
|
||||
trade_type: 'NATIVE',
|
||||
} }
|
||||
data['ids'] = (this.type == this.$globalConstVars.paymentType.common || this.type == this.$globalConstVars.paymentType.pinTuan || this.type == this.$globalConstVars.paymentType.group || this.type == this.$globalConstVars.paymentType.seckill || this.type == this.$globalConstVars.paymentType.bargain || this.type == this.$globalConstVars.paymentType.giveaway || this.type == this.$globalConstVars.paymentType.solitaire || this.type == this.$globalConstVars.paymentType.transactionComponent || this.type == this.$globalConstVars.paymentType.serviceOrder) ? this.orderId : this.uid
|
||||
|
||||
// 判断订单支付类型
|
||||
|
||||
@@ -92,9 +92,6 @@
|
||||
|
||||
<!--支付方式-->
|
||||
<view class="content">
|
||||
<!-- #ifdef H5 -->
|
||||
<payments-by-h5 :orderId="orderId" :recharge="recharge" :type="type" :uid="userInfo.id"></payments-by-h5>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<payments-by-wx :orderId="orderId" :recharge="recharge" :type="type" :uid="userInfo.id"></payments-by-wx>
|
||||
<!-- #endif -->
|
||||
@@ -117,27 +114,18 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
// #ifdef H5
|
||||
import paymentsByH5 from '@/pages/payment/components/coreshop-paymentsByH5.vue';
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
import paymentsByWx from '@/pages/payment/components/coreshop-paymentsByWx.vue';
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-ALIPAY
|
||||
import paymentsByAli from '@/pages/payment/components/coreshop-paymentsByAli.vue';
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
import paymentsByApp from '@/pages/payment/components/coreshop-paymentsByApp.vue';
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-TOUTIAO
|
||||
import paymentsByTt from '@/pages/payment/components/coreshop-paymentsByTt.vue';
|
||||
// #endif
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
data() {
|
||||
@@ -153,9 +141,6 @@
|
||||
};
|
||||
},
|
||||
components: {
|
||||
// #ifdef H5
|
||||
paymentsByH5,
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
paymentsByWx,
|
||||
// #endif
|
||||
@@ -175,7 +160,7 @@
|
||||
this.recharge = Number(options.recharge);
|
||||
this.type = Number(options.type);
|
||||
this.formId = Number(options.formId);
|
||||
//this.getOrderInfo ()
|
||||
|
||||
if (this.orderId && (this.type == this.$globalConstVars.paymentType.common || this.type == this.$globalConstVars.paymentType.pinTuan || this.type == this.$globalConstVars.paymentType.group || this.type == this.$globalConstVars.paymentType.seckill || this.type == this.$globalConstVars.paymentType.bargain || this.type == this.$globalConstVars.paymentType.giveaway || this.type == this.$globalConstVars.paymentType.solitaire || this.type == this.$globalConstVars.paymentType.transactionComponent)) {
|
||||
// 商品订单
|
||||
this.getOrderInfo();
|
||||
@@ -208,10 +193,6 @@
|
||||
this.$u.api.paymentsCheckpay(data).then(res => {
|
||||
if (res.status) {
|
||||
this.orderInfo = res.data;
|
||||
/* console.log(this.orderInfo)
|
||||
if(this.orderInfo.pay_status == 2){
|
||||
this.$u.route({ type: 'redirectTo', url: '/pages/payment/result/result?orderId=' + this.orderInfo.orderId });
|
||||
} */
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
.content { position: relative; height: 80vh;
|
||||
.content-c { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center;
|
||||
.load-img { width: 50px; height: 50px; }
|
||||
.load-text { font-size: 13px; }
|
||||
}
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-toast ref="uToast" />
|
||||
<u-no-network></u-no-network>
|
||||
<u-navbar title="支付中..." safeAreaInsetTop fixed placeholder @leftClick="goNavigateBack"></u-navbar>
|
||||
<view class="content">
|
||||
<view class="content-c">
|
||||
<image class="load-img" src="/static/images/loading.gif" mode=""></image>
|
||||
<view class="load-text ">信息加载中.....</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 登录提示 -->
|
||||
<coreshop-login-modal></coreshop-login-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
type: '',
|
||||
openid: '',
|
||||
orderId: '',
|
||||
state: ''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.orderId = options.orderId
|
||||
this.money = Number(options.money)
|
||||
this.type = Number(options.type)
|
||||
this.uid = Number(options.uid)
|
||||
this.state = this.$common.getQueryString('state')
|
||||
this.getCode()
|
||||
},
|
||||
methods: {
|
||||
getCode() {
|
||||
var code = this.$common.getQueryString('code')
|
||||
code && this.getOpenId(code)
|
||||
},
|
||||
getOpenId(code) {
|
||||
let data = {
|
||||
code: code,
|
||||
scope: 2,
|
||||
state: this.state
|
||||
}
|
||||
//模拟接口
|
||||
this.$u.api.getOpenId(data).then(res => {
|
||||
if (res.status) {
|
||||
this.openid = res.data.openid
|
||||
this.toPayHandler('wechatpay')
|
||||
} else {
|
||||
this.$u.toast(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
checkWXJSBridge(data) {
|
||||
let that = this
|
||||
let interval = setInterval(() => {
|
||||
if (typeof window.WeixinJSBridge != 'undefined') {
|
||||
clearTimeout(interval)
|
||||
that.onBridgeReady(data)
|
||||
}
|
||||
}, 200)
|
||||
},
|
||||
onBridgeReady(data) {
|
||||
var _this = this
|
||||
window.WeixinJSBridge.invoke(
|
||||
'getBrandWCPayRequest',
|
||||
{
|
||||
appId: data.appid, // 公众号名称,由商户传入
|
||||
timeStamp: data.timeStamp, // 时间戳,自1970年以来的秒数
|
||||
nonceStr: data.nonceStr, // 随机串
|
||||
package: data.package,
|
||||
signType: data.signType, // 微信签名方式:
|
||||
paySign: data.paySign // 微信签名
|
||||
},
|
||||
function (res) {
|
||||
if (res.err_msg === 'get_brand_wcpay_request:ok') {
|
||||
this.$refs.uToast.show({ message: '支付成功', type: 'success' })
|
||||
} else if (res.err_msg === 'get_brand_wcpay_request:cancel') {
|
||||
_this.$u.toast('取消支付')
|
||||
} else {
|
||||
_this.$u.toast('支付失败')
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.$u.route({ type: 'redirectTo', url: '/pages/payment/result/result?id=' + data.payment_id });
|
||||
}, 1000)
|
||||
}
|
||||
)
|
||||
},
|
||||
toPayHandler(code) {
|
||||
let data = {
|
||||
payment_code: code,
|
||||
payment_type: this.type
|
||||
}
|
||||
data['ids'] = (this.type == 1 || this.type == 5 || this.type == 6) ? this.orderId : this.uid
|
||||
//data['ids'] = this.type == 1 ? this.orderId : this.uid
|
||||
|
||||
if (this.type == 1 && this.orderId) {
|
||||
// 微信jsapi支付
|
||||
if (this.openid) {
|
||||
data['params'] = {
|
||||
trade_type: 'JSAPI_OFFICIAL',
|
||||
openid: this.openid
|
||||
}
|
||||
}
|
||||
} else if (this.type == 2 && this.money) {
|
||||
if (this.openid) {
|
||||
data['params'] = {
|
||||
trade_type: 'JSAPI_OFFICIAL',
|
||||
money: this.money,
|
||||
openid: this.openid
|
||||
}
|
||||
}
|
||||
} else if ((this.type == 5 || this.type == 6) && this.recharge) {
|
||||
data['params'] = {
|
||||
trade_type: 'JSAPI_OFFICIAL',
|
||||
openid: this.openid,
|
||||
}
|
||||
}
|
||||
this.$u.api.pay(data).then(res => {
|
||||
if (res.status) {
|
||||
const data = res.data
|
||||
this.checkWXJSBridge(data)
|
||||
} else {
|
||||
this.$u.toast(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
@@ -119,7 +119,7 @@
|
||||
({{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.products.pointsDeduction }}{{ pointShowName}}+{{ item.products.price - item.products.pointsDeduction}}元
|
||||
{{pointDiscountedProportion * item.products.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.products.price - item.products.pointsDeduction).toFixed(2)}}元
|
||||
</view>
|
||||
)
|
||||
</view>
|
||||
@@ -133,7 +133,7 @@
|
||||
{{ pointShowName}}兑换价合计:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.products.pointsDeduction * item.nums }}{{ pointShowName}}+{{(item.products.price - item.products.pointsDeduction)*item.nums }}元
|
||||
{{pointDiscountedProportion * item.products.pointsDeduction * item.nums }}{{ pointShowName}}+{{parseFloat((item.products.price - item.products.pointsDeduction)*item.nums).toFixed(2) }}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-13 coreshop-margin-top-10" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.products.points > 0">
|
||||
@@ -354,18 +354,16 @@
|
||||
onLoad(options) {
|
||||
var _this = this;
|
||||
//下单前置检查,自定义交易组件检测场景是否需要推送订单到微信服务。
|
||||
// #ifdef H5|APP-PLUS|APP-PLUS-NVUE
|
||||
// #ifdef APP-PLUS|APP-PLUS-NVUE
|
||||
_this.getOrderDistributionModel()
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
wx.checkBeforeAddOrder({
|
||||
success(res) {
|
||||
console.log('下单前置检查', res);
|
||||
if (res.errMsg == 'checkBeforeAddOrder:ok') {
|
||||
_this.requireOrder = res.data.requireOrder;
|
||||
_this.requiredFundType = res.data.requiredFundType;
|
||||
_this.traceId = res.data.traceId;
|
||||
|
||||
// 获取不同类型营销下单支持的配送方式
|
||||
_this.getOrderDistributionModel()
|
||||
}
|
||||
@@ -429,7 +427,7 @@
|
||||
this.$db.del('userStore', true);
|
||||
}
|
||||
// #endif
|
||||
// #ifdef H5 || APP-PLUS || APP-PLUS-NVUE
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
let userShip = this.$store.state.userShip;
|
||||
if (userShip) {
|
||||
this.userShip = userShip;
|
||||
@@ -781,9 +779,6 @@
|
||||
data['taxType'] = this.invoice.type
|
||||
data['taxName'] = this.invoice.name
|
||||
data['taxCode'] = this.invoice.code
|
||||
// #ifdef H5
|
||||
data['source'] = 2;
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
data['source'] = 3;
|
||||
// #endif
|
||||
@@ -818,7 +813,6 @@
|
||||
},
|
||||
//发起订阅
|
||||
subscription() {
|
||||
let _this = this;
|
||||
this.$u.api.getSubscriptionTmplIds(null).then(res => {
|
||||
if (res.status) {
|
||||
console.log(res.data);
|
||||
@@ -857,7 +851,6 @@
|
||||
// 获取默认店铺
|
||||
getDefaultStore() {
|
||||
if (this.storeSwitch == 1) {
|
||||
console.log("获取默认店铺");
|
||||
this.$u.api.defaultStore().then(res => {
|
||||
if (res.status) {
|
||||
if (res.data && res.data.id) {
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
let pre = pages[pages.length - 2]
|
||||
console.log(pre);
|
||||
if (pre != undefined) {
|
||||
// #ifdef H5 || APP-PLUS || APP-PLUS-NVUE
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
invoice = pre.invoice
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
@@ -193,7 +193,7 @@
|
||||
// #ifdef MP-WEIXIN
|
||||
beforePage.$vm.invoice = data;
|
||||
// #endif
|
||||
// #ifdef H5 || APP-PLUS || APP-PLUS-NVUE
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
// beforePage.invoice = data;
|
||||
this.$store.commit('invoice', data)
|
||||
// #endif
|
||||
|
||||
@@ -90,6 +90,10 @@
|
||||
_this.latitude = res.latitude;
|
||||
},
|
||||
complete: function (res) {
|
||||
if (!_this.longitude || !_this.latitude) {
|
||||
_this.longitude = '0';
|
||||
_this.latitude = '0';
|
||||
}
|
||||
let data = {
|
||||
'key': _this.key,
|
||||
'longitude': _this.longitude,
|
||||
@@ -126,7 +130,7 @@
|
||||
pre.$vm.store = store
|
||||
// #endif
|
||||
|
||||
// #ifdef H5 || APP-PLUS || APP-PLUS-NVUE
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
pre.store = store
|
||||
// #endif
|
||||
|
||||
|
||||
@@ -7,13 +7,15 @@
|
||||
<u-icon name="arrow-left" size="19" @click="goNavigateBack"></u-icon>
|
||||
<u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
|
||||
<u-icon name="home" size="22" @click="goHome"></u-icon>
|
||||
<u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
|
||||
<u-icon name="share-fill" size="22" @click="goShare"></u-icon>
|
||||
</view>
|
||||
<view slot="right">
|
||||
</view>
|
||||
</u-navbar>
|
||||
|
||||
<view class="coreshop-full-screen-banner-swiper-box">
|
||||
<u--image width="100%" height="375px" :src="info.thumbnail && info.thumbnail!='null' ? info.thumbnail+'?x-oss-process=image/resize,m_lfit,h_320,w_240' : '/static/images/common/empty-banner.png'"></u--image>
|
||||
<u--image width="100%" height="375px" :src="info.thumbnail"></u--image>
|
||||
</view>
|
||||
|
||||
<view class="coreshop-margin-left-16 coreshop-margin-right-16 coreshop-margin-top-12 coreshop-padding-16 coreshop-border-radius-9 coreshop-bg-white">
|
||||
@@ -23,8 +25,8 @@
|
||||
<text class="coreshop-font-24">{{ info.money || '0.00' }}</text>
|
||||
</view>
|
||||
<view class="coreshop-flex-sub coreshop-flex coreshop-text-left coreshop-justify-end coreshop-align-center">
|
||||
<view class="coreshop-text-right coreshop-time-right" v-if="timer.openStatus == 1 && timer.lastTime > 0">
|
||||
<u-count-down :time="timer.lastTime * 1000" :autoStart="true" :millisecond="true" format="DD天HH时mm秒ss" @change="onChange">
|
||||
<view class="coreshop-text-right coreshop-time-right" v-if="info.openStatus == 1 && info.timestamp > 0">
|
||||
<u-count-down :time="info.timestamp * 1000" :autoStart="true" :millisecond="true" format="DD天HH时mm秒ss" @change="onChange" @finish="onFinish">
|
||||
<view class="time">
|
||||
<view class="coreshop-font-12">仅剩:</view>
|
||||
<view class="time__custom">
|
||||
@@ -32,7 +34,7 @@
|
||||
</view>
|
||||
<text class="time__doc">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}</text>
|
||||
<text class="time__custom__item">{{ timeData.hours>=10?timeData.hours:'0'+timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
@@ -45,16 +47,16 @@
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
<view class="coreshop-text-right coreshop-time-right" v-if="timer.openStatus == 2 && timer.lastTime > 0">
|
||||
<u-count-down :time="timer.lastTime * 1000" :autoStart="true" :millisecond="true" format="DD天HH时mm秒ss" @change="onChange">
|
||||
<view class="coreshop-text-right coreshop-time-right" v-if="info.openStatus == 2 && info.timestamp > 0">
|
||||
<u-count-down :time="info.timestamp * 1000" :autoStart="true" :millisecond="true" format="DD天HH时mm秒ss" @change="onChange" @finish="onFinish">
|
||||
<view class="time">
|
||||
<view class="coreshop-font-12">仅剩:</view>
|
||||
<view class="coreshop-font-12">即将开始:</view>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ timeData.days }}</text>
|
||||
</view>
|
||||
<text class="time__doc">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}</text>
|
||||
<text class="time__custom__item">{{ timeData.hours>=10?timeData.hours:'0'+timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
@@ -67,7 +69,7 @@
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
<view class="coreshop-font-12 red-price" v-if="timer.openStatus == 3">已结束</view>
|
||||
<view class="coreshop-font-12" v-if="info.openStatus == 3">已结束</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-12 coreshop-multiple-line-clamp">
|
||||
@@ -174,7 +176,6 @@
|
||||
<view class="goods" v-for="(item,index) in shopRecommendData" :key="index" slot="slot{{index}}">
|
||||
<view class="coreshop-padding-top-6 coreshop-padding-bottom-3 coreshop-padding-left-8 coreshop-padding-right-8 coreshop-bg-white coreshop-border-radius-bl-18">
|
||||
<view class="coreshop-title-294 coreshop-multiple-line-clamp">
|
||||
<!--<image class="coreshop-image-price-tags" src="https://files.cdn.coreshop.cn/static/icon/icon-tag-vip-discount.png"></image>-->
|
||||
<text class="coreshop-font-14">{{item.name}}</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-8 coreshop-flex coreshop-justify-between coreshop-align-center">
|
||||
@@ -192,7 +193,7 @@
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ item.price - item.pointsDeduction}}元
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price,item.pointsDeduction).toFixed(2)}} 元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
@@ -211,7 +212,6 @@
|
||||
<view class="goods">
|
||||
<view class="coreshop-padding-top-6 coreshop-padding-bottom-3 coreshop-padding-left-8 coreshop-padding-right-8 coreshop-bg-white coreshop-border-radius-bl-18">
|
||||
<view class="coreshop-title-294 coreshop-multiple-line-clamp">
|
||||
<!--<image class="coreshop-image-price-tags" src="https://files.cdn.coreshop.cn/static/icon/icon-tag-vip-discount.png"></image>-->
|
||||
<text class="coreshop-font-14">{{item.name}}</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-8 coreshop-flex coreshop-justify-between coreshop-align-center">
|
||||
@@ -229,7 +229,7 @@
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ item.price - item.pointsDeduction}}元
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ parseFloat(item.price,item.pointsDeduction).toFixed(2)}} 元
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
|
||||
@@ -247,6 +247,18 @@
|
||||
</custom-waterfalls-flow>
|
||||
</view>
|
||||
|
||||
<!-- 分享弹窗 -->
|
||||
<view class="coreshop-padding-0">
|
||||
<u-popup mode="bottom" :show="shareBox" ref="share">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<coreshop-share-wx :shareType='$globalConstVars.shareType.serviceGoods' :objectId="info.id" :shareImg="info.thumbnail" :shareTitle="info.title" :shareContent="info.description" :shareHref="shareHref" @close="closeShare()"></coreshop-share-wx>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-PLUS || APP-PLUS-NVUE -->
|
||||
<coreshop-share-app :shareType='$globalConstVars.shareType.serviceGoods' :objectId="info.id" :shareImg="info.thumbnail" :shareTitle="info.title" :shareContent="info.description" :shareHref="shareHref" @close="closeShare()"></coreshop-share-app>
|
||||
<!-- #endif -->
|
||||
</u-popup>
|
||||
<div id="qrCode" ref="qrCodeDiv"></div>
|
||||
</view>
|
||||
|
||||
<!--占位底部距离-->
|
||||
<view class="coreshop-tabbar-height" />
|
||||
@@ -255,7 +267,7 @@
|
||||
<view class="tabbar">
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-start coreshop-basis-4">
|
||||
<!-- 客服按钮 -->
|
||||
<!-- #ifdef H5 || APP-PLUS-NVUE || APP-PLUS -->
|
||||
<!-- #ifdef APP-PLUS-NVUE || APP-PLUS -->
|
||||
<view class="action" @click="showChat()">
|
||||
<button class="noButtonStyle">
|
||||
<u-icon name="server-fill" :size="20" label="找客服" :labelSize="12" labelPos="bottom"></u-icon>
|
||||
@@ -271,7 +283,7 @@
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view class="btn-group coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between coreshop-basis-4">
|
||||
<u-button type="success" size="normal" @click="toAddOrder">立刻购买</u-button>
|
||||
<u-button type="success" size="normal" @click="toAddOrder" :disabled="disabled">立刻购买</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -282,17 +294,23 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { mapState } from 'vuex';
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
id: 0,
|
||||
info: {},
|
||||
orderType: this.$globalConstVars.paymentType.serviceOrder, // 订单类型
|
||||
shopRecommendData: [], // 其他数据
|
||||
timer: {},
|
||||
timeData: {},
|
||||
shareUrl: this.$globalConstVars.shareUrl,
|
||||
shareBox: false,
|
||||
serviceDescription: {
|
||||
commonQuestion: [],
|
||||
delivery: [],
|
||||
service: [],
|
||||
},
|
||||
disabled: false,
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
@@ -301,6 +319,37 @@
|
||||
this.getDetail();
|
||||
//获取推荐商品数据
|
||||
this.getGoodsRecommendList();
|
||||
//获取服务说明
|
||||
this.getServiceDescription();
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
hasLogin: state => state.hasLogin,
|
||||
userInfo: state => state.userInfo,
|
||||
}),
|
||||
hasLogin: {
|
||||
get() {
|
||||
return this.$store.state.hasLogin;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('hasLogin', val);
|
||||
}
|
||||
},
|
||||
userInfo: {
|
||||
get() {
|
||||
return this.$store.state.userInfo;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('userInfo', val);
|
||||
}
|
||||
},
|
||||
pointSwitch() { return this.$store.state.config.pointSwitch },
|
||||
pointShowExchangePrice() { return this.$store.state.config.pointShowExchangePrice },
|
||||
pointDiscountedProportion() { return this.$store.state.config.pointDiscountedProportion },
|
||||
pointExchangeModel() { return this.$store.state.config.pointExchangeModel },
|
||||
pointShowName() { return this.$store.state.config.pointShowName },
|
||||
pointGetModel() { return this.$store.state.config.pointGetModel },
|
||||
pointShowPoint() { return this.$store.state.config.pointShowPoint },
|
||||
},
|
||||
methods: {
|
||||
wapperClick(item) {
|
||||
@@ -312,14 +361,27 @@
|
||||
onChange(e) {
|
||||
this.timeData = e
|
||||
},
|
||||
onFinish(e) {
|
||||
if (this.info.openStatus == 2) {
|
||||
this.info.openStatus == 1
|
||||
this.disabled = false;
|
||||
} else if (this.info.openStatus == 1) {
|
||||
this.info.openStatus == 3
|
||||
this.disabled = true;
|
||||
}
|
||||
},
|
||||
getDetail() {
|
||||
let data = {
|
||||
id: this.id
|
||||
};
|
||||
this.$u.api.getServiceDetail(data).then(res => {
|
||||
if (res.status) {
|
||||
this.info = res.data.serviceInfo;
|
||||
this.timer = res.data.timer;
|
||||
this.info = res.data;
|
||||
if (res.data.openStatus == 3) {
|
||||
this.disabled = true;
|
||||
} else if (res.data.openStatus == 2) {
|
||||
this.disabled = true;
|
||||
}
|
||||
} else {
|
||||
this.$u.toast(res.msg);
|
||||
}
|
||||
@@ -339,6 +401,26 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取服务项
|
||||
getServiceDescription() {
|
||||
let _this = this;
|
||||
this.$u.api.getServiceDescription().then(res => {
|
||||
if (res.status == true) {
|
||||
_this.serviceDescription.commonQuestion = res.data.commonQuestion;
|
||||
_this.serviceDescription.delivery = res.data.delivery;
|
||||
_this.serviceDescription.service = res.data.service;
|
||||
|
||||
} else {
|
||||
_this.$refs.uToast.show({
|
||||
message: res.msg, type: 'error', complete: function () {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
toAddOrder() {
|
||||
//创建一个服务订单并跳转到支付
|
||||
let data = {
|
||||
@@ -351,8 +433,57 @@
|
||||
this.$u.toast(res.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 跳转到h5分享页面
|
||||
goShare() {
|
||||
this.shareBox = true;
|
||||
},
|
||||
closeShare() {
|
||||
this.shareBox = false;
|
||||
},
|
||||
//获取分享URL
|
||||
getShareUrl() {
|
||||
let data = {
|
||||
client: this.$globalConstVars.shareClient.wxMiNiProgram,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: this.$globalConstVars.shareModel.url,
|
||||
page: this.$globalConstVars.shareType.serviceGoods,
|
||||
params: {
|
||||
serviceGoodsId: this.info.id,
|
||||
}
|
||||
};
|
||||
let userToken = this.$db.get('userToken');
|
||||
if (userToken && userToken != '') {
|
||||
data.token = userToken
|
||||
}
|
||||
this.$u.api.share(data).then(res => {
|
||||
this.shareUrl = res.data
|
||||
});
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
info: {
|
||||
handler() {
|
||||
this.getShareUrl();
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
}
|
||||
},
|
||||
//分享
|
||||
onShareAppMessage(res) {
|
||||
return {
|
||||
title: this.info.title,
|
||||
imageUrl: this.info.thumbnail,
|
||||
path: this.shareUrl
|
||||
}
|
||||
},
|
||||
onShareTimeline(res) {
|
||||
return {
|
||||
title: this.info.title,
|
||||
imageUrl: this.info.thumbnail,
|
||||
path: this.shareUrl
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
.cell { margin-top: 0; min-height: 30px; line-height: 30px; }
|
||||
.order .top .left .store { margin: 0 5px; font-size: 14px; font-weight: normal; }
|
||||
.order .bottom { margin-top: 0px; }
|
||||
|
||||
.order .bottom2 { display: flex; margin-top: 10px; padding: 0 5px; justify-content: space-between; align-items: center; }
|
||||
.order .bottom2 .coreshop-btn { line-height: 26px; width: 80px; border-radius: 13px; border: 1px solid $u-border-color; font-size: 13px; text-align: center; color: $u-type-info-dark; }
|
||||
.order .bottom2 .evaluate { color: $u-type-warning-dark; border-color: $u-type-warning-dark; }
|
||||
@@ -11,33 +11,19 @@
|
||||
</view>
|
||||
</u-navbar>
|
||||
<view class="content">
|
||||
<view v-if="list.length">
|
||||
<view class="orderList" v-for="(item, index) in list" :key="index" @click="goServicesDetail(item.id)">
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-solid-bottom coreshop-padding-bottom-5">
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<u-icon name="clock" :size="16" color="rgb(94,94,94)"></u-icon>
|
||||
<!--<view class="store">截止购买剩余:</view>-->
|
||||
<u-count-down :time="item.timestamp" font-size="12" :separator-size="12"></u-count-down>
|
||||
|
||||
<!--<button class="cu-btn sm line-black">复制</button>
|
||||
<u-icon name="arrow-right" color="rgb(203,203,203)" :size="26"></u-icon>-->
|
||||
</view>
|
||||
<view class="right">
|
||||
仅剩{{item.amount}}
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="list.length>0">
|
||||
<view class="orderList" v-for="(item, index) in list" :key="index">
|
||||
<view class="item coreshop-solid-bottom coreshop-margin-top-5 coreshop-margin-padding-10 coreshop-padding-bottom-5">
|
||||
<view class="left">
|
||||
<u--image :showLoading="true" :src="item.thumbnail && item.thumbnail!='null' ? item.thumbnail : '/static/images/common/empty-banner.png'" width="80px" height="80px"></u--image>
|
||||
<u--image :showLoading="true" :src="item.thumbnail" width="140px" height="140px"></u--image>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="title u-line-2">{{item.title}}</view>
|
||||
<view class="type u-line-2">{{item.description}}</view>
|
||||
<view class="type u-line-3">{{item.description}}</view>
|
||||
<view class="coreshop-text-price coreshop-text-red coreshop-margin-bottom-5">{{ item.money }}</view>
|
||||
<view class="delivery-time">最大购买限制:{{item.maxBuyNumber== 0 ? '不限' : item.maxBuyNumber}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="coreshop-text-gray coreshop-font-xs coreshop-flex coreshop-flex-nowrap coreshop-padding-10 coreshop-solid-bottom">
|
||||
兑换级别:
|
||||
<view class="coreshop-text-gray coreshop-font-xs coreshop-flex coreshop-flex-nowrap" v-if="item.allowedMemberships && item.allowedMemberships.length>0">
|
||||
@@ -52,12 +38,61 @@
|
||||
<view class="coreshop-bg-orange-light sm coreshop-padding-4 coreshop-margin-right-5" v-for="(item, indexChild) in item.consumableStores" :key="indexChild">{{item}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-nowrap coreshop-justify-between coreshop-padding-10">
|
||||
<view class="coreshop-font-xs">
|
||||
购买截止:{{ item.endTime }}
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between coreshop-padding-10">
|
||||
<view class="coreshop-text-right coreshop-time-right" v-if="item.openStatus == 1 && item.timestamp > 0">
|
||||
<u-count-down :time="item.timestamp * 1000" :autoStart="true" :millisecond="true" format="DD天HH时mm秒ss" @change="onChange($event,index)">
|
||||
<view class="time coreshop-font-11 coreshop-text-gray">
|
||||
<view class="">仅剩时间:</view>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.days }}</text>
|
||||
</view>
|
||||
<text class="time__doc">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.hours>=10?item.timeData.hours:'0'+item.timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.minutes }}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.seconds }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
<view class="coreshop-width-fit-content">
|
||||
<u-button type="warning" shape="square" size="mini">立刻抢购</u-button>
|
||||
<view class="coreshop-text-right coreshop-time-right" v-if="item.openStatus == 2 && item.timestamp > 0">
|
||||
<u-count-down :time="item.timestamp * 1000" :autoStart="true" :millisecond="true" format="DD天HH时mm秒ss" @change="onChange($event,index)">
|
||||
<view class="time coreshop-font-11 coreshop-text-gray">
|
||||
<view class="">距离开始:</view>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.days }}</text>
|
||||
</view>
|
||||
<text class="time__doc">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.hours>=10?item.timeData.hours:'0'+item.timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.minutes }}</text>
|
||||
</view>
|
||||
<text class="time__doc">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="time__custom__item">{{ item.timeData.seconds }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
<view class="coreshop-text-right coreshop-time-right" v-if="item.openStatus == 3">
|
||||
<view class="time coreshop-font-11 coreshop-text-gray">
|
||||
<view class="">活动已结束</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.openStatus == 3">
|
||||
<u-button shape="square" size="small" :plain="true">活动已结束</u-button>
|
||||
</view>
|
||||
<view v-if="item.openStatus != 3">
|
||||
<u-button type="warning" shape="square" size="small" @click="goServicesDetail(item.id)">立刻抢购</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -126,10 +161,15 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
onChange(e, key) {
|
||||
this.$set(this.list[key], 'timeData', e)
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "index.scss";
|
||||
.orderList {
|
||||
.title { font-size: 18px; font-weight: bolder; }
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
break;
|
||||
//拼团
|
||||
case _this.$globalConstVars.shareType.pinTuan:
|
||||
_this.gotoPinTuan(res.data.params.groupId, res.data.params.goodsId, res.data.params.teamId)
|
||||
_this.gotoPinTuan(res.data.params.groupId, res.data.params.teamId)
|
||||
break;
|
||||
//店铺邀请
|
||||
case _this.$globalConstVars.shareType.inv:
|
||||
@@ -48,7 +48,7 @@
|
||||
break;
|
||||
//参团页面
|
||||
case _this.$globalConstVars.shareType.addPinTuan:
|
||||
_this.gotoInvitationGroup(res.data.params.groupId, res.data.params.goodsId, res.data.params.teamId)
|
||||
_this.gotoInvitationGroup(res.data.params.groupId, res.data.params.teamId)
|
||||
break;
|
||||
//自定义页面
|
||||
case _this.$globalConstVars.shareType.page:
|
||||
@@ -60,11 +60,11 @@
|
||||
break;
|
||||
//团购
|
||||
case _this.$globalConstVars.shareType.group:
|
||||
_this.gotoGroup(res.data.params.goodsId, res.data.params.groupId);
|
||||
_this.gotoGroup(res.data.params.groupId);
|
||||
break;
|
||||
//秒杀
|
||||
case _this.$globalConstVars.shareType.seckill:
|
||||
_this.gotoSeckill(res.data.params.goodsId, res.data.params.groupId);
|
||||
_this.gotoSeckill(res.data.params.groupId);
|
||||
break;
|
||||
//代理商
|
||||
case _this.$globalConstVars.shareType.agent:
|
||||
@@ -74,6 +74,10 @@
|
||||
case _this.$globalConstVars.shareType.solitaire:
|
||||
_this.gotoSolitaire(res.data.params.id);
|
||||
break;
|
||||
//接龙
|
||||
case _this.$globalConstVars.shareType.serviceGoods:
|
||||
_this.gotoServiceGoods(res.data.params.serviceGoodsId);
|
||||
break;
|
||||
default:
|
||||
_this.gotoIndex();
|
||||
break;
|
||||
@@ -130,15 +134,14 @@
|
||||
}
|
||||
},
|
||||
//跳转到拼团
|
||||
gotoPinTuan(groupId, goodsId, teamId) {
|
||||
if (groupId && goodsId && teamId) {
|
||||
gotoPinTuan(groupId, teamId) {
|
||||
if (groupId && teamId) {
|
||||
uni.$u.route({
|
||||
url: '/pages/activity/pinTuan/pinTuanDetails/pinTuanDetails',
|
||||
type: 'redirectTo',
|
||||
params: {
|
||||
id: goodsId,
|
||||
id: groupId,
|
||||
teamId: teamId,
|
||||
pinTuanId: groupId,
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -146,15 +149,14 @@
|
||||
}
|
||||
},
|
||||
//跳转到参团
|
||||
gotoInvitationGroup(groupId, goodsId, teamId) {
|
||||
if (groupId && goodsId && teamId) {
|
||||
gotoInvitationGroup(groupId, teamId) {
|
||||
if (groupId && teamId) {
|
||||
uni.$u.route({
|
||||
url: '/pages/activity/pinTuan/pinTuanDetails/pinTuanDetails',
|
||||
type: 'redirectTo',
|
||||
params: {
|
||||
id: goodsId,
|
||||
id: groupId,
|
||||
teamId: teamId,
|
||||
pinTuanId: groupId,
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -162,14 +164,13 @@
|
||||
}
|
||||
},
|
||||
//跳转到团购
|
||||
gotoGroup(id, groupId) {
|
||||
if (id && groupId) {
|
||||
gotoGroup(id) {
|
||||
if (id) {
|
||||
uni.$u.route({
|
||||
url: '/pages/activity/groupBuying/groupBuyingDetails/groupBuyingDetails',
|
||||
type: 'redirectTo',
|
||||
params: {
|
||||
id: id,
|
||||
groupId: groupId
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -177,14 +178,13 @@
|
||||
}
|
||||
},
|
||||
//跳转到秒杀
|
||||
gotoSeckill(id, groupId) {
|
||||
if (id && groupId) {
|
||||
gotoSeckill(id) {
|
||||
if (id) {
|
||||
uni.$u.route({
|
||||
url: '/pages/activity/seckill/seckillDetails/seckillDetails',
|
||||
type: 'redirectTo',
|
||||
params: {
|
||||
id: id,
|
||||
groupId: groupId
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -260,6 +260,20 @@
|
||||
} else {
|
||||
_this.gotoIndex();
|
||||
}
|
||||
},
|
||||
//跳转服务商品
|
||||
gotoServiceGoods(id) {
|
||||
if (id) {
|
||||
uni.$u.route({
|
||||
url: '/pages/serviceGoods/details/details',
|
||||
type: 'redirectTo',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
})
|
||||
} else {
|
||||
_this.gotoIndex();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -26,13 +26,17 @@
|
||||
<l-painter-text text="¥" css="vertical-align: bottom" />
|
||||
<l-painter-text :text="showModel.price" css="vertical-align: bottom; font-size: 58rpx" />
|
||||
<l-painter-text text="元" css="vertical-align: bottom" />
|
||||
<l-painter-text :text="'¥'+ showModel.mktprice" css="vertical-align: bottom; padding-left: 10rpx; font-weight: normal; text-decoration: line-through; color: #999999" />
|
||||
<l-painter-text v-if="showModel.mktprice>0" :text="'¥'+ showModel.mktprice" css="vertical-align: bottom; padding-left: 10rpx; font-weight: normal; text-decoration: line-through; color: #999999" />
|
||||
</l-painter-view>
|
||||
<l-painter-view css="margin-top: 32rpx; font-size: 26rpx; color: #8c5400" v-if="showPinTuanArguments">
|
||||
<l-painter-text :text="'截止:'+showModel.pinTuan.endTime" css="color: #212121; background: #ffb400;" />
|
||||
<l-painter-text :text="showModel.pinTuan.peopleNumber+'人团'" css="margin-left: 16rpx; background: #fff4d9; text-decoration: line-through;" />
|
||||
<!--<l-painter-text text="满减优惠" css="margin-left: 16rpx; background: #fff4d9" />-->
|
||||
</l-painter-view>
|
||||
<l-painter-view css="margin-top: 32rpx; font-size: 26rpx; color: #8c5400" v-if="showGroupPurchaseSeckillArguments">
|
||||
<l-painter-text :text="'截止:'+showModel.groupPurchaseSeckill.endTime" css="color: #212121; background: #ffb400;" />
|
||||
<!--<l-painter-text text="满减优惠" css="margin-left: 16rpx; background: #fff4d9" />-->
|
||||
</l-painter-view>
|
||||
<l-painter-view css="margin-top: 32rpx; font-size: 26rpx; color: #8c5400">
|
||||
<l-painter-text :text="showModel.brief" css="margin-left: 16rpx; background: #fff4d9" />
|
||||
</l-painter-view>
|
||||
@@ -49,10 +53,7 @@
|
||||
|
||||
<view class="share-bot flex flex-direction coreshop-flex coreshop-flex-wrap coreshop-font-sm coreshop-padding-top-10 coreshop-flex-direction-row coreshop-justify-between">
|
||||
<view>
|
||||
<u-button shape="square" type="primary" v-if="weiXinBrowser">
|
||||
<u-icon name="download" :margin-right="20" label="长按图片保存到手机" color="#fff" labelColor="#fff"></u-icon>
|
||||
</u-button>
|
||||
<u-button shape="square" type="primary" @click="savePoster()" v-else>
|
||||
<u-button shape="square" type="primary" @click="savePoster()">
|
||||
<u-icon name="download" :margin-right="20" label="保存到本地" color="#fff" labelColor="#fff"></u-icon>
|
||||
</u-button>
|
||||
</view>
|
||||
@@ -86,8 +87,13 @@
|
||||
endTime: '',
|
||||
peopleNumber: 0,
|
||||
},
|
||||
groupPurchaseSeckill: {
|
||||
endTime: '',
|
||||
},
|
||||
|
||||
},
|
||||
showPinTuanArguments: false
|
||||
showPinTuanArguments: false,
|
||||
showGroupPurchaseSeckillArguments: false
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -161,12 +167,117 @@
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (options.shareType == _this.$globalConstVars.shareType.serviceGoods) {
|
||||
let data = {
|
||||
id: parseInt(options.serviceGoodsId),
|
||||
data: false,
|
||||
}
|
||||
_this.$u.api.getServiceDetail(data).then(res => {
|
||||
if (res.status == true) {
|
||||
console.log(res.data);
|
||||
_this.showModel.describe = "为您推荐了一个服务商品";
|
||||
_this.showModel.image = res.data.thumbnail;
|
||||
_this.showModel.brief = res.data.description;
|
||||
_this.showModel.name = res.data.title;
|
||||
_this.showModel.price = res.data.money;
|
||||
_this.showModel.mktprice = res.data.mktprice;
|
||||
|
||||
setTimeout(function () {
|
||||
_this.canvasToTempFilePath();
|
||||
uni.hideLoading();
|
||||
}, 1000);
|
||||
|
||||
} else {
|
||||
_this.$refs.uToast.show({
|
||||
message: res.msg, type: 'error', complete: function () {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
} else if (options.shareType == _this.$globalConstVars.shareType.seckill) {
|
||||
let data = {
|
||||
id: parseInt(options.groupId),
|
||||
type: _this.$globalConstVars.shareType.seckill,
|
||||
needSku: true
|
||||
}
|
||||
let userToken = this.$db.get('userToken');
|
||||
if (userToken) {
|
||||
data.token = userToken
|
||||
}
|
||||
_this.$u.api.groupInfo(data).then(res => {
|
||||
if (res.status == true) {
|
||||
console.log(res.data);
|
||||
_this.showModel.describe = "为您推荐了一个秒杀";
|
||||
_this.showModel.image = res.data.image;
|
||||
_this.showModel.brief = res.data.brief;
|
||||
_this.showModel.name = res.data.name;
|
||||
_this.showModel.price = res.data.price;
|
||||
_this.showModel.mktprice = res.data.mktprice;
|
||||
|
||||
_this.showGroupPurchaseSeckillArguments = true;
|
||||
_this.showModel.groupPurchaseSeckill.endTime = res.data.groupEndTime;
|
||||
|
||||
setTimeout(function () {
|
||||
_this.canvasToTempFilePath();
|
||||
uni.hideLoading();
|
||||
}, 1000);
|
||||
|
||||
} else {
|
||||
_this.$refs.uToast.show({
|
||||
message: res.msg, type: 'error', complete: function () {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (options.shareType == _this.$globalConstVars.shareType.group) {
|
||||
let data = {
|
||||
id: parseInt(options.groupId),
|
||||
type: _this.$globalConstVars.shareType.seckill,
|
||||
needSku: true
|
||||
}
|
||||
let userToken = this.$db.get('userToken');
|
||||
if (userToken) {
|
||||
data.token = userToken
|
||||
}
|
||||
_this.$u.api.groupInfo(data).then(res => {
|
||||
if (res.status == true) {
|
||||
console.log(res.data);
|
||||
_this.showModel.describe = "为您推荐了一个团购";
|
||||
_this.showModel.image = res.data.image;
|
||||
_this.showModel.brief = res.data.brief;
|
||||
_this.showModel.name = res.data.name;
|
||||
_this.showModel.price = res.data.price;
|
||||
_this.showModel.mktprice = res.data.mktprice;
|
||||
|
||||
_this.showGroupPurchaseSeckillArguments = true;
|
||||
_this.showModel.groupPurchaseSeckill.endTime = res.data.groupEndTime;
|
||||
|
||||
setTimeout(function () {
|
||||
_this.canvasToTempFilePath();
|
||||
uni.hideLoading();
|
||||
}, 1000);
|
||||
|
||||
} else {
|
||||
_this.$refs.uToast.show({
|
||||
message: res.msg, type: 'error', complete: function () {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
weiXinBrowser() {
|
||||
return this.$common.isWeiXinBrowser()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
canvasToTempFilePath() {
|
||||
@@ -190,10 +301,6 @@
|
||||
// 保存海报到本地
|
||||
savePoster() {
|
||||
let _this = this;
|
||||
// #ifdef H5
|
||||
_this.downloadIamge(_this.path, 'image');
|
||||
// #endif
|
||||
|
||||
// #ifdef MP || MP-ALIPAY || APP-PLUS || APP-PLUS-NVUE
|
||||
_this.downloadImageOfMp(_this.path)
|
||||
// #endif
|
||||
|
||||
@@ -15,10 +15,7 @@
|
||||
</view>
|
||||
<view class="share-bot flex flex-direction">
|
||||
<view class="coreshop-margin-bottom-20">
|
||||
<u-button shape="square" type="primary" v-if="weiXinBrowser">
|
||||
<u-icon name="download" :margin-right="20" label="长按图片保存到手机" color="#fff" labelColor="#fff"></u-icon>
|
||||
</u-button>
|
||||
<u-button shape="square" type="primary" @click="savePoster()" v-else>
|
||||
<u-button shape="square" type="primary" @click="savePoster()">
|
||||
<u-icon name="download" :margin-right="20" label="保存到本地" color="#fff" labelColor="#fff"></u-icon>
|
||||
</u-button>
|
||||
</view>
|
||||
@@ -41,9 +38,6 @@
|
||||
this.poster = decodeURIComponent(options.poster);
|
||||
},
|
||||
computed: {
|
||||
weiXinBrowser() {
|
||||
return this.$common.isWeiXinBrowser()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
@@ -54,10 +48,6 @@
|
||||
// 保存海报到本地
|
||||
savePoster() {
|
||||
let _this = this;
|
||||
// #ifdef H5
|
||||
_this.downloadIamge(_this.poster, 'image');
|
||||
// #endif
|
||||
|
||||
// #ifdef MP || MP-ALIPAY || APP-PLUS || APP-PLUS-NVUE
|
||||
_this.downloadImageOfMp(_this.poster)
|
||||
// #endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.content { width: 100%; /* #ifdef H5 */ height: calc(100vh - 44px); /* #endif */ }
|
||||
.content { width: 100%; }
|
||||
.map-body { width: 100%; height: 350px; position: relative; }
|
||||
.store-list { background-color: #fff; height: calc(100vh - 44px - 350px);
|
||||
.coreshop-list-item { height: 80px;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*page { background: #f6f7f9; }*/
|
||||
page, .bg-page, .bg-main { background: #f7f7f7; }
|
||||
page, .bg-page, .coreshop-bg-main { background: #f7f7f7; }
|
||||
|
||||
|
||||
// nvue不能用标签命名样式,不能放在微信组件中,否则微信开发工具会报警告,无法使用标签名当做选择器
|
||||
@@ -198,8 +198,6 @@ view, text { box-sizing: border-box; }
|
||||
//width:max-content 使用子元素中最大的开你的。无论是inline还是block
|
||||
.coreshop-width-max-content { width: max-content; }
|
||||
|
||||
|
||||
|
||||
/*字体高度*/
|
||||
.coreshop-line-height-initial { line-height: initial }
|
||||
|
||||
@@ -235,6 +233,7 @@ view, text { box-sizing: border-box; }
|
||||
.coreshop-btn-all { width: 100%; }
|
||||
|
||||
|
||||
|
||||
.coreshop-border-radius-tr-8 { border-radius: 8rpx 8rpx 0rpx 0rpx; }
|
||||
.coreshop-border-radius-tr-16 { border-radius: 16rpx 16rpx 0rpx 0rpx; }
|
||||
.coreshop-border-radius-tr-18 { border-radius: 18rpx 18rpx 0rpx 0rpx; }
|
||||
@@ -244,6 +243,10 @@ view, text { box-sizing: border-box; }
|
||||
.coreshop-border-radius-bl-24 { border-radius: 0rpx 0rpx 24rpx 24rpx; }
|
||||
.coreshop-border-radius-bl-32 { border-radius: 0rpx 0rpx 32rpx 32rpx; }
|
||||
.coreshop-border-radius-tlb-18-l-4 { border-radius: 18rpx 18rpx 18rpx 4rpx; }
|
||||
|
||||
.coreshop-border-radius-trbl-18 { border-radius: 18rpx 18rpx 18rpx 18rpx; }
|
||||
|
||||
|
||||
.coreshop-border-none { border: 0; }
|
||||
|
||||
/*图标大小*/
|
||||
|
||||
@@ -712,3 +712,30 @@ u-icon { line-height: 0; }
|
||||
.index-goods .goods { -webkit-column-break-inside: avoid; border-radius: 18rpx; break-inside: avoid; margin-bottom: 24rpx; width: 326rpx; }
|
||||
.coreshop-title-294 { width: 294rpx; }
|
||||
.coreshop-image-price-tags { height: 32rpx; margin-bottom: 4rpx; margin-right: 12rpx; vertical-align: middle; width: 98rpx; }
|
||||
|
||||
|
||||
|
||||
/*分割线*/
|
||||
.coreshop-divider { display: flex; flex-direction: row; flex-direction: row; align-items: center;
|
||||
.complete { margin: 0; border-bottom-width: 1px; border-bottom-style: solid; width: 100%; transform: scaleY(0.5); border-color: #dcdfe6; flex: 1; vertical-align: middle; margin: 10px 0; }
|
||||
.groupPurchase, .seckill, .serviceGood { margin: 0; border-bottom-width: 1px; border-bottom-style: solid; width: 100%; transform: scaleY(0.5); border-color: #dcdfe6; flex: 1; vertical-align: middle; margin: 10px 0; }
|
||||
.left { margin: 0; border-bottom-width: 1px; border-bottom-style: solid; width: 100%; transform: scaleY(0.5); border-color: #dcdfe6; flex: 1; vertical-align: middle; }
|
||||
.dot { font-size: 12px; margin: 0 12px; color: #c0c4cc; }
|
||||
.right { margin: 0; border-bottom-width: 1px; border-bottom-style: solid; width: 100%; transform: scaleY(0.5); border-color: #dcdfe6; flex: 1; vertical-align: middle; }
|
||||
}
|
||||
|
||||
|
||||
.coreshop-buy-btn { width: 70px; height: 24px; background: linear-gradient(90deg, #fe832a, #ff6600); box-shadow: 0px 3.5px 3px 0px rgba(221, 185, 184, 0.22); border-radius: 15px; font-size: 13px; font-family: PingFang SC; font-weight: 500; color: #fff; padding: 0; text-align: center; line-height: 24px; }
|
||||
|
||||
.coreshop-groupPurchase-btn { width: 70px; height: 24px; background: linear-gradient(90deg, #00c78a, #04c668); box-shadow: 0px 3.5px 3px 0px rgba(134, 194, 135, 0.22); border-radius: 15px; font-size: 13px; font-family: PingFang SC; font-weight: 500; color: #fff; padding: 0; text-align: center; line-height: 24px; }
|
||||
|
||||
.coreshop-seckill-btn { width: 70px; height: 24px; background: linear-gradient(90deg, #ffbd1d, #ff4a09); box-shadow: 0px 3.5px 3px 0px rgba(255, 104, 4, 0.22); border-radius: 15px; font-size: 13px; font-family: PingFang SC; font-weight: 500; color: #fff; padding: 0; text-align: center; line-height: 24px; }
|
||||
|
||||
.coreshop-solitaire-btn { width: 70px; height: 24px; background: linear-gradient(90deg, #04c668, #13804b); box-shadow: 0px 3.5px 3px 0px rgba(255, 104, 4, 0.22); border-radius: 15px; font-size: 12px; font-family: PingFang SC; font-weight: 500; color: #fff; padding: 0; text-align: center; line-height: 24px; }
|
||||
|
||||
.coreshop-buy-btn-disabled { width: 70px; height: 24px; background: linear-gradient(180deg,#f8f8f8,#f5f5f5); box-shadow: 0px 3.5px 3px 0px rgba(255, 224, 226, 0.3); border-radius: 15px; font-size: 13px; font-family: PingFang SC; font-weight: 500; color: #8799a3; padding: 0; text-align: center; line-height: 24px; border-color: #ebedf0; border-width: 1px; border-style: solid; }
|
||||
|
||||
|
||||
.good-tag-hot { display: flex; margin-top: 5px; position: absolute; top: 15rpx; left: 15rpx; background-color: $u-type-error; color: #FFFFFF; display: flex; align-items: center; padding: 4rpx 14rpx; border-radius: 50rpx; font-size: 20rpx; line-height: 1; }
|
||||
.good-tag-recommend { display: flex; margin-top: 5px; position: absolute; top: 15rpx; right: 15rpx; background-color: $u-type-primary; color: #FFFFFF; margin-left: 10px; border-radius: 50rpx; line-height: 1; padding: 4rpx 14rpx; display: flex; align-items: center; border-radius: 50rpx; font-size: 20rpx; }
|
||||
.good-tag-recommend2 { display: flex; margin-top: 5px; position: absolute; bottom: 15rpx; left: 15rpx; background-color: $u-type-primary; color: #FFFFFF; border-radius: 50rpx; line-height: 1; padding: 4rpx 14rpx; display: flex; align-items: center; border-radius: 50rpx; font-size: 20rpx; }
|
||||
@@ -716,8 +716,26 @@ u-icon { line-height: 0; }
|
||||
|
||||
|
||||
/*分割线*/
|
||||
.coreshop-divider { display: flex; flex-direction: row; flex-direction: row; align-items: center; margin: 5px 0 15px 0;
|
||||
.coreshop-divider { display: flex; flex-direction: row; flex-direction: row; align-items: center;
|
||||
.complete { margin: 0; border-bottom-width: 1px; border-bottom-style: solid; width: 100%; transform: scaleY(0.5); border-color: #dcdfe6; flex: 1; vertical-align: middle; margin: 10px 0; }
|
||||
.groupPurchase, .seckill, .serviceGood { margin: 0; border-bottom-width: 1px; border-bottom-style: solid; width: 100%; transform: scaleY(0.5); border-color: #dcdfe6; flex: 1; vertical-align: middle; margin: 10px 0; }
|
||||
.left { margin: 0; border-bottom-width: 1px; border-bottom-style: solid; width: 100%; transform: scaleY(0.5); border-color: #dcdfe6; flex: 1; vertical-align: middle; }
|
||||
.dot { font-size: 12px; margin: 0 12px; color: #c0c4cc; }
|
||||
.right { margin: 0; border-bottom-width: 1px; border-bottom-style: solid; width: 100%; transform: scaleY(0.5); border-color: #dcdfe6; flex: 1; vertical-align: middle; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.coreshop-buy-btn { width: 70px; height: 24px; background: linear-gradient(90deg, #fe832a, #ff6600); box-shadow: 0px 3.5px 3px 0px rgba(221, 185, 184, 0.22); border-radius: 15px; font-size: 13px; font-family: PingFang SC; font-weight: 500; color: #fff; padding: 0; text-align: center; line-height: 24px; }
|
||||
|
||||
.coreshop-groupPurchase-btn { width: 70px; height: 24px; background: linear-gradient(90deg, #00c78a, #04c668); box-shadow: 0px 3.5px 3px 0px rgba(134, 194, 135, 0.22); border-radius: 15px; font-size: 13px; font-family: PingFang SC; font-weight: 500; color: #fff; padding: 0; text-align: center; line-height: 24px; }
|
||||
|
||||
.coreshop-seckill-btn { width: 70px; height: 24px; background: linear-gradient(90deg, #ffbd1d, #ff4a09); box-shadow: 0px 3.5px 3px 0px rgba(255, 104, 4, 0.22); border-radius: 15px; font-size: 13px; font-family: PingFang SC; font-weight: 500; color: #fff; padding: 0; text-align: center; line-height: 24px; }
|
||||
|
||||
.coreshop-solitaire-btn { width: 70px; height: 24px; background: linear-gradient(90deg, #04c668, #13804b); box-shadow: 0px 3.5px 3px 0px rgba(255, 104, 4, 0.22); border-radius: 15px; font-size: 12px; font-family: PingFang SC; font-weight: 500; color: #fff; padding: 0; text-align: center; line-height: 24px; }
|
||||
|
||||
.coreshop-buy-btn-disabled { width: 70px; height: 24px; background: linear-gradient(180deg,#f8f8f8,#f5f5f5); box-shadow: 0px 3.5px 3px 0px rgba(255, 224, 226, 0.3); border-radius: 15px; font-size: 13px; font-family: PingFang SC; font-weight: 500; color: #8799a3; padding: 0; text-align: center; line-height: 24px; border-color: #ebedf0; border-width: 1px; border-style: solid; }
|
||||
|
||||
|
||||
.good-tag-hot { display: flex; margin-top: 5px; position: absolute; top: 15rpx; left: 15rpx; background-color: $u-type-error; color: #FFFFFF; display: flex; align-items: center; padding: 4rpx 14rpx; border-radius: 50rpx; font-size: 20rpx; line-height: 1; }
|
||||
.good-tag-recommend { display: flex; margin-top: 5px; position: absolute; top: 15rpx; right: 15rpx; background-color: $u-type-primary; color: #FFFFFF; margin-left: 10px; border-radius: 50rpx; line-height: 1; padding: 4rpx 14rpx; display: flex; align-items: center; border-radius: 50rpx; font-size: 20rpx; }
|
||||
.good-tag-recommend2 { display: flex; margin-top: 5px; position: absolute; bottom: 15rpx; left: 15rpx; background-color: $u-type-primary; color: #FFFFFF; border-radius: 50rpx; line-height: 1; padding: 4rpx 14rpx; display: flex; align-items: center; border-radius: 50rpx; font-size: 20rpx; }
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user