Commit 97ec767f authored by Mac's avatar Mac

订单

parent f21174c1
......@@ -88,9 +88,13 @@ export default {
this.setting = uni.getStorageSync("basedata").mall.setting;
},
clickHandler(item) {
console.log(item)
console.log("GoodsId", item);
uni.navigateTo({ url: "/pages/goods/goods?GoodsId=" + item.id });
if(item.goodsclassify==3){
uni.navigateTo({ url: "/pages/reserve/goodsDetails?GoodsId=" + item.id });
}else{
uni.navigateTo({ url: "/pages/goods/goods?GoodsId=" + item.id });
}
},
showSkuHandler(g) {
this.sku = g;
......
......@@ -36,7 +36,7 @@
<text class="tel">{{storeinfo.storeTel?storeinfo.storeTel:''}} </text>
</view>
<view style="font-size: 11px;color: #FFC86D;">
{{storeinfo.consumptionObj?storeinfo.consumptionObj.consumptionStoreName:''}}
{{storeinfo.consumptionObj && storeinfo.consumptionObj.consumptionStoreName?storeinfo.consumptionObj.consumptionStoreName:''}}
</view>
</view>
</view>
......
......@@ -428,6 +428,17 @@
"path":"personal/couponDetail"
},{
"path":"designerDetail"
},{
"path":"goodsDetails"
},{
"path":"personal/orderlist"
},{
"path":"personal/orderDetails",
"style": {
"navigationStyle": "custom"
}
},{
"path":"personal/cardList"
}
]
},
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<template>
<u-popup
mode="bottom"
:border-radius="20"
:popup="false"
v-model="value"
:maskCloseAble="true"
length="auto"
:safeAreaInsetBottom="true"
@close="popupClose"
:z-index="9999"
close-icon="close"
>
<view class="share-box" :style="{ paddingBottom: bianyi ? '50rpx' : '0' }">
<view class="title">分享商品</view>
<scroll-view scroll-y class="share_b">
<view class="goodname">{{ goodName }}</view>
<view class="img-box">
<view class="box">
<image
v-for="(x, i) in images"
:key="i"
:src="x.pic_url"
class="img"
mode="aspectFill"
@click="previewImage(i)"
/>
</view>
<view v-if="advertising!=null && advertising !='' " style="margin-top: 10px;line-height: 1.5;font-size: 28rpx;color:#333">
<span>广告词:{{advertising}}</span>
<u-button size="mini" shape="circle" style='margin-left: 10px;' @click="paste(advertising)">复制</u-button>
</view>
</view>
</scroll-view>
<view class="op-box">
<view class="left">
<text @click="copyHandler">复制文本</text>
<text @click="savePicHandler" style="text-align: center;"
>保存图片</text
>
<text @click="genernalHandler" style="text-align: right;"
>生成海报</text
>
</view>
<view class="right">
<text>分享到</text>
<image
src="/static/images/icon/quan.png"
style="width: 24px; height: 24px;"
@click="sendQuanHandler"
/>
<!-- #ifdef MP-WEIXIN -->
<button open-type="share" style="border: none; outline: none;">
<image
src="/static/images/icon/friend.png"
style="width: 24px; height: 24px;"
/>
</button>
<!-- #endif -->
</view>
</view>
</view>
<u-top-tips ref="uTips"></u-top-tips>
</u-popup>
</template>
<script>
export default {
model: {},
props: {
value: {
type: Boolean,
default: true,
},
goodId: {
type: Number,
default: 0,
},
goodName: {
type: String,
default: "",
},
advertising: {
type: String,
default: "",
},
images: {
type: Array,
default: [],
},
},
data() {
return {
bianyi: false,
};
},
mounted() {
this.bianyi = this.$uiConfig.is_bang;
},
methods: {
popupClose(){
this.$emit('close')
},
savePicHandler() {
uni.showLoading({
title: "正在下载图片",
});
let arr = JSON.parse(JSON.stringify(this.images));
this.downLoadImage(arr);
},
genernalHandler() {
//this.goodId
uni.navigateTo({
url: "/pages/goods/draw?id="+this.goodId,
});
},
sendQuanHandler() {
this.copyHandler();
setTimeout(() => {
this.savePicHandler();
}, 1000);
},
downLoadImage(arr) {
let that = this;
uni.downloadFile({
url: arr[0].pic_url,
success: (res) => {
if (res.statusCode === 200) {
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success: function () {
arr.splice(0, 1);
if (arr.length > 0) {
that.downLoadImage(arr);
} else {
uni.hideLoading();
uni.showToast({
title: "下载成功",
});
}
},
fail: function (e) {
uni.hideLoading();
that.$refs.uTips.show({
title: "下载失败,请稍后重试",
type: "error",
duration: "2300",
});
},
});
} else {
uni.hideLoading();
that.$refs.uTips.show({
title: "下载失败,请稍后重试",
type: "error",
duration: "2300",
});
}
},
});
},
copyHandler() {
uni.setClipboardData({
data: this.goodName,
});
},
paste(value){
uni.setClipboardData({
data: value,
});
},
previewImage(i) {
uni.previewImage({
urls: this.imgs,
current: i,
longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"],
success: function (data) {},
fail: function (err) {
console.log(err.errMsg);
},
},
});
},
},
};
</script>
<style>
.share-box {
position: relative;
padding: 20rpx;
padding-bottom: 0;
}
.share-box .title {
font-size: 40rpx;
color: #000;
margin-bottom: 50rpx;
font-weight: 600;
}
.share-box .goodname {
font-size: 28rpx;
line-height: 1.5;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
color: #333;
}
.share-box .img-box {
margin-top: 40rpx;
padding-bottom: 40rpx;
display: block;
border-bottom: 2rpx solid #f1f1f1;
overflow-x: auto;
}
.share-box .img-box .box {
white-space: nowrap;
}
.share-box .img-box .box .img {
display: inline-block;
width: 252rpx;
height: 252rpx;
border-radius: 8rpx;
margin-right: 20rpx;
}
.share-box .op-box {
display: flex;
margin: 20rpx 0;
align-items: center;
font-size: 14px;
color: gray;
}
.share-box .op-box .left {
display: flex;
flex: 1;
width: 1rpx;
align-items: center;
}
.share-box .op-box .left text {
flex: 1;
text-align: left;
width: 1rpx;
}
.share-box .op-box .right {
margin-left: 20rpx;
border-left: 2rpx solid #f1f1f1;
display: flex;
align-items: center;
}
.share-box .op-box .right text,
.share-box .op-box .right image {
margin-left: 20rpx;
}
.share-box .op-box .right button {
border: none;
outline: none;
padding: 0;
width: 68rpx;
height: 48rpx;
margin: 0;
line-height: unset;
}
.share-box .op-box .right button::after {
border: none;
}
.share-box .share_b{
padding: 0;
max-height: 300px;
overflow: hidden;
overflow-y: auto;
display: block;
}
</style>
This diff is collapsed.
<template>
<view class="cardList" :style="{ height: contentHeight }">
<u-empty v-if="g.length == 0" text="暂无相关学习卡" mode="coupon"></u-empty>
<view
v-if="g.length > 0"
style="
height: calc(100vh);
width: calc(100vw);
overflow: hidden;
padding-bottom: 50px;
"
>
<scroll-view
:scroll-y="true"
:enable-back-to-top="true"
:enable-flex="true"
@scrolltolower="lower"
:style="{ height: '100%' }"
>
<view class="details">
<view class="item" v-for="(x, i) in g" :key="i" >
<view class="ticket">
<image mode="aspectFill" :src="x.CouponIco" style="width: 100%; height: 100%;border-top-left-radius: 5px;border-bottom-left-radius: 5px;" ></image>
</view>
<view class="detail">
<view class="coupond">
<view class="name">{{x.Name}}</view>
<view class="rule">{{x.UseTypeStr}}</view>
<view class="date" v-if="x.IndateType==1">领券后{{x.IndateDay}}天过期</view>
<view class="date" v-if="x.IndateType==2">{{x.StartDate.split(' ')[0].replace(/-/g,'.')+"-"+x.EndDate.split(' ')[0].replace(/-/g,'.')}}</view>
</view>
<view class="chosen" :style="{'background':mainColor}" @click="receive(x,i)">
<Text>{{x.IsReceive==1?'已领取':'立即领取'}} </Text>
</view>
</view>
</view>
</view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#FFF"
/>
</scroll-view>
</view>
<!-- 加载中 -->
<view class="loading" v-if="loading">
<u-loading mode="flower" size="48">></u-loading>
<Text style="color: #fff; margin-top: 10rpx;">加载中...</Text>
</view>
<!-- 取消提示 -->
<u-toast ref="uToast" />
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth>
</view>
</template>
<script>
import auth from "@/components/auth/index.vue";
export default {
components: {
auth
},
data() {
return {
pageTitle: "学习卡中心",
showAuth:false,
u:{},
mainColor: "",
contentHeight: 0,
msg:{
pageIndex: 1,
pageSize:10,
SmallShopId:0,
},
page_count: 1,
g: [],
loading: false,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
};
},
created() {
this.contentHeight = this.$utils.calcContentHeight(-40) + "px";
this.mainColor = this.$uiConfig.mainColor;
},
mounted() {
let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync("basedata")
? wx.getStorageSync("basedata").bar_title
: [];
pages.forEach((x) => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
onLoad: function (option) {
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
this.init();
}
},
methods: {
init() {
this.msg.SmallShopId = this.u.UserSmallShopId
this.request2(
{
url: '/api/AppletEducation/GetAllCouponPageList',
data: this.msg
},
res => {
if(res.resultCode==1){
this.loading = false;
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
}
}
}
);
},
receive(x,i){
if(x.IsReceive==0){
this.request2(
{
url: '/api/AppletEducation/GrantCoupon',
data: {
CouponId:x.CouponId
}
},
(res) => {
if(res.resultCode==1){
uni.showToast({
title: res.message,
icon: "none"
});
this.g[i].IsReceive=1;
}
}
);
}else{
uni.showToast({
title: "已领取过学习卡",
icon: "none"
});
}
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.init();
} else {
this.status = "nomore";
}
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth=false;
this.init();
},
//关闭登录窗口
gbAuth(){
uni.navigateBack()
},
},
};
</script>
<style>
.cardList {
width: 100%;
height: 100%;
background: #FFF;
position: relative;
}
.cardList .loading {
width: 180rpx;
height: 180rpx;
background: #000000;
opacity: 0.7;
border-radius: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: fixed;
left: 50%;
top: 30%;
margin-left: -100rpx;
z-index: 999;
}
.cardList .details{
padding: 15px;
display: flex;
flex-direction: column;
position: relative;
}
.cardList .item {
display: flex;
margin-bottom: 10px;
align-items: flex-start;
background: #fff;
border-radius: 5px;
box-shadow:0 4px 6px 1px rgba(76, 76, 76, 0.1);
}
.cardList .details .item .ticket {
width: 104px;
height: 78px;
}
.cardList .details .item .detail {
width: 1px;
flex: 1;
background: #fff;
padding: 10px;
display: flex;
align-items: center;
}
.cardList .details .item .detail .coupond {
flex: 1;
}
.cardList .details .item .detail .coupond .name {
font-size: 13px;
font-weight: 600;
color: #000;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.cardList .details .item .detail .coupond .date {
margin-top: 5px;
font-size: 11px;
color: #777;
}
.cardList .details .item .detail .coupond .rule{
font-size: 11px;
color:#777;
margin-top: 5px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.cardList .details .item .detail .chosen {
width: 60px;
height: 25px;
display: flex;
align-items: center;
justify-content: center;
font-size: 11px;
border-radius: 4px;
color: #FFF;
}
</style>
This diff is collapsed.
This diff is collapsed.
......@@ -3,7 +3,7 @@
height: 100vh;
background: #FAF8F9;
position: relative;
padding-top:15px ;
}
.subscribe .subscribe-box{
width: 100%;
......@@ -180,13 +180,13 @@
z-index: 99;
}
.submit-l{
.subscribe .submit-l{
display: flex;
flex-direction: row;
align-items: flex-end;
font-size: 13px;
}
.corner{
.subscribe .corner{
width: 0px; /* 宽高设置为0,很重要,否则达不到效果 */
height: 0px;
border: 5px solid #FF4048;
......@@ -199,12 +199,31 @@
margin-left: -5px;
}
.subscribe .pobtn{
width:100%;
padding: 30px 15px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.subscribe .pobtn-item{
width: 45%;
height: 40px;
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
color: #FFF;
font-size: 14px;
}
</style>
<template>
<view class="subscribe">
<view class="subscribe-box">
<view class="title">服务项目</view>
<view class="classify">
<view class="subscribe-box" >
<view style="width: 100%;height: 15px;background: #FAF8F9;" v-if="lineCate.length>0"></view>
<view class="title" v-if="lineCate.length>0">服务项目</view>
<view class="classify" v-if="lineCate.length>0">
<view v-for="(cl, ci) in lineCate" :key="ci">
<view class="classify-item" @click="switchitem(cl)"
:style="{
......@@ -320,7 +339,7 @@
<u-button
size="80"
:ripple="true"
shape="circle"
shape="square"
@click="submitOrderHandler()"
:custom-style="{
backgroundColor: mainColor,
......@@ -344,15 +363,40 @@
</view>
</view>
</u-popup>
<u-popup v-model="detailsshow" mode="center" :mask-close-able="false" length="90%">
<view style="background:#fff;width:100%;border-radius: 6px;overflow: hidden;">
<image mode="aspectFill" style="width: 100%;height: 189px;" :src="goods.cover_pic" ></image>
<view style="width: 100%;padding: 15px;border-bottom: 1px solid #E2E2E2;">
<view style="font-size: 18px;color: #000000;margin-bottom: 15px;">{{goods.name}}</view>
<view :style="{'color':mainColor,'font-size':'12px'}">¥<text style="font-size: 20px;">{{goods.price}}</text></view>
</view>
<view style="width: 100%;height: 30px;line-height: 30px;padding-left: 15px;font-size: 13px;color: #1B1D1E;font-weight: bold;">
项目简介
</view>
<view style="width: 100%;padding:0 15px 15px;max-height: 75px;overflow: hidden;" >
<h-parse :content="detailContent" @navigate="clickDescription"></h-parse>
</view>
<view class="pobtn">
<view class="pobtn-item" :style="{'background':mainColor}" @click="goodsdetails">
查看详情
</view>
<view class="pobtn-item" @click="detailsshow=false" :style="{'color':mainColor,'border':'1px solid '+mainColor}">
关闭
</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import payCom from '@/components/pay/pay';
import hParse from "@/components/u-parse/parse.vue";
export default {
components: {
payCom,
hParse,
},
data() {
return {
......@@ -362,7 +406,9 @@
submitOrder:false,
payExit: false,
payBtn: false,
detailsshow:false,
id:0,
detailContent: "",
goods:{},
lineCate:[],
OfflineGoods:[],
......@@ -390,6 +436,13 @@
this.mainColor = this.$uiConfig.mainColor;
if(option && option.id){
this.id = option.id
this.getAppllCate()//获取分类
}else{//如果没传门店过来取缓存里的
this.id = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0;
}
if(option && option.GoodsId){
this.GoodsId = option.GoodsId
this.GetApplOGInfo()//商品详情
}
this.payInfo.OpenId=uni.getStorageSync('mall_UserInfo').OpenId;
......@@ -398,7 +451,7 @@
uni.setNavigationBarTitle({
title: this.pageTitle,
});
this.getAppllCate()//获取分类
},
methods: {
......@@ -453,6 +506,7 @@
data: {GoodsId:this.GoodsId,StoreId: this.id}
},
res => {
uni.hideLoading();
if (res.resultCode == 1) {
if(res.data && res.data.goods){
this.goods = res.data.goods;
......@@ -462,6 +516,8 @@
this.timeList = this.dayList[0].TimeList;
this.selecttime= this.timeList[0];
this.designerList = res.data.goods.persionList;
var richtext = this.goods.detail;
this.detailContent = richtext;
let obj = {
ServiceLogo:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/timeisup.png',
Name:'到点分配',
......@@ -472,7 +528,7 @@
this.selectdesigner= this.designerList[0].Gender;
}
}
uni.hideLoading();
}
);
},
......@@ -542,8 +598,13 @@
this.GetAppOGList()
},
getgoodsList(item){//选中商品的操作
this.GoodsId = item.id;
this.GetApplOGInfo()
if(item.id ==this.GoodsId){
this.detailsshow = true
}else{
this.GoodsId = item.id;
this.GetApplOGInfo()
}
},
btnday(item,i){//选中日期的操作
this.selectDay = item.DayDateStr;
......@@ -569,6 +630,12 @@
// url: "/pages/order/index/index?status=0",
// });
},
clickDescription(e){
},
goodsdetails(){//商品详情
// this.goods
}
},
};
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment