Browse Source

Merge branch 'master' of ssh://8.134.10.79:222/Leadfyy.co/ec.uniapp-master

master
Shuixiang 4 years ago
parent
commit
85e7369c6a
  1. 90
      common/styles/iconfont.css
  2. 2
      components/lf-shopGoodsCard/lf-shopGoodsCard.vue
  3. 14
      pages.json
  4. 36
      pages/aboutpay/confirmcash.vue
  5. 522
      pages/business/activity/add.vue
  6. 302
      pages/business/activity/list.vue
  7. 36
      pages/business/balance/balance.vue
  8. 77
      pages/business/center/center.vue
  9. 2
      pages/business/payment/money.vue
  10. 2
      pages/business/withdrawal/withdrawal.vue
  11. 3
      pages/discover/discover.vue
  12. 24
      pages/discover/discoverdetails.vue
  13. 2
      pages/discover/publish.vue
  14. 11
      pages/index/activity/detail.vue
  15. 5
      pages/index/activity/hot.vue
  16. 8
      pages/index/index/index.vue
  17. 17
      pages/order/confirm/confirm.vue
  18. 24
      pages/order/index/onlineorder.vue
  19. 75
      pages/order/newdetail/newdetail.vue
  20. 107
      pages/shop/goodsdetail.vue
  21. 195
      pages/shop/seckillList.vue
  22. 38
      pages/store/cart/cart.vue
  23. 2
      pages/user/member/code.vue
  24. 25
      pages/user/my/center.vue
  25. 2
      pages/user/my/myEventRegistrationList.vue
  26. 14
      pages/user/my/myregister.vue
  27. 16
      pages/user/my/vipinfo.vue

90
common/styles/iconfont.css

@ -1,8 +1,8 @@
@font-face {
font-family: "lf-iconfont"; /* Project id 2779107 */
src: url('//at.alicdn.com/t/font_2779107_e1lp09zkffc.woff2?t=1632308314645') format('woff2'),
url('//at.alicdn.com/t/font_2779107_e1lp09zkffc.woff?t=1632308314645') format('woff'),
url('//at.alicdn.com/t/font_2779107_e1lp09zkffc.ttf?t=1632308314645') format('truetype');
src: url('//at.alicdn.com/t/font_2779107_gbe0eg36e0e.woff2?t=1632969325882') format('woff2'),
url('//at.alicdn.com/t/font_2779107_gbe0eg36e0e.woff?t=1632969325882') format('woff'),
url('//at.alicdn.com/t/font_2779107_gbe0eg36e0e.ttf?t=1632969325882') format('truetype');
}
.lf-iconfont {
@ -13,94 +13,66 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-jiazai:before {
content: "\e7ba";
}
.icon-daifahuo:before {
content: "\e642";
}
.icon-daishouhuo:before {
content: "\e636";
}
.icon-fanhui:before {
content: "\e613";
.icon-dianshangjiashangcheng-xianxing:before {
content: "\e79d";
}
.icon-shouye:before {
content: "\e61d";
}
.icon-faxian:before {
content: "\e6b8";
.icon-zhuanjifen:before {
content: "\e616";
}
.icon-yingerche:before {
content: "\e603";
.icon-Bookmark:before {
content: "\e619";
}
.icon-fenleiorguangchangorqitatianchong:before {
content: "\e67d";
.icon-Location:before {
content: "\e61f";
}
.icon-jifen1:before {
content: "\e6a4";
.icon-Star:before {
content: "\e625";
}
.icon-tingchechang:before {
content: "\e6ca";
.icon-huiyuan4:before {
content: "\fc38";
}
.icon-VIP:before {
content: "\e68e";
.icon-31daifahuo:before {
content: "\e604";
}
.icon-tubiao-:before {
content: "\e610";
.icon-a-Group21:before {
content: "\e615";
}
.icon-packing:before {
content: "\e625";
.icon-a-Group16:before {
content: "\e614";
}
.icon-liwu:before {
content: "\e674";
.icon-jiazai:before {
content: "\e7ba";
}
.icon-activity-s:before {
content: "\e641";
.icon-daishouhuo:before {
content: "\e636";
}
.icon-peishi-shoubiao:before {
content: "\e60a";
.icon-fanhui:before {
content: "\e613";
}
.icon-shujia:before {
content: "\e620";
.icon-shouye:before {
content: "\e61d";
}
.icon-V:before {
content: "\e719";
.icon-faxian:before {
content: "\e6b8";
}
.icon-huiyuan2:before {
content: "\e731";
}
.icon-yinliao:before {
content: "\e60e";
}
.icon-meishi:before {
content: "\e611";
}
.icon-shuji:before {
content: "\fbb7";
}
.icon-jian1:before {
content: "\e633";
}

2
components/lf-shopGoodsCard/lf-shopGoodsCard.vue

@ -11,7 +11,7 @@
<image class="goods-img" :src="item.associate.img"></image>
<view class="goods-info">
<view class="lf-line-1">{{ item.associate.name }}</view>
<view>{{ item.associate.min_price }}</view>
<view>{{ item.associate.sell_price }}</view>
</view>
</view>
<view class="goods-item" @click="$url('/pages/shop/specialList')">

14
pages.json

@ -503,6 +503,20 @@
"navigationBarTitleText": "商家登录" ,
"navigationStyle":"custom"
}
},
{
"path": "pages/business/activity/add",
"style": {
"navigationBarTitleText": "新增活动" ,
"navigationStyle":"custom"
}
},
{
"path": "pages/business/activity/list",
"style": {
"navigationBarTitleText": "活动列表" ,
"navigationStyle":"custom"
}
}
],
"globalStyle": {

36
pages/aboutpay/confirmcash.vue

@ -23,18 +23,21 @@
</countdown-timer>
</view>
<view>
<button class="confirmcash-btn" hover-class="lf-opacity" @click="offlinePay">确认</button>
<button class="confirmcash-btn" hover-class="lf-opacity" @click="confirm">确认</button>
</view>
</view>
</view>
<lf-pay-password v-if="show_pay" @comfirm="payComfirm" title="请输入支付密码"></lf-pay-password>
</view>
</template>
<script>
import countdownTimer from '@/components/countdown-timer/countdown-timer';
import lfPayPassword from '@/components/lf-payPassword/lf-payPassword.vue'
export default {
components: {
countdownTimer
countdownTimer,
lfPayPassword
},
data() {
return {
@ -42,7 +45,9 @@
amount: 0,
clerk_id: 0,
brand_id: 0,
is_date_end: false
is_date_end: false,
show_pay: false,
pay_pwd: '' //
}
},
onLoad(options){
@ -55,7 +60,8 @@
console.log("倒计时结束");
this.is_date_end = true;
},
offlinePay(){
//
confirm(){
if(this.amount == 0){
return this.$msg('支付金额不能为0');
}
@ -68,26 +74,40 @@
});
return;
};
this.show_pay = true;
},
//
payComfirm(event){
this.show_pay = false;
this.pay_pwd = event;
this.offlinePay();
},
offlinePay(){
uni.showLoading({
title: '正在支付中'
})
let token = this.$cookieStorage.get('user_token');
this.$http.post({
api: 'api/offline/pay',
data: {
clerk_id: this.clerk_id,
brand_id: this.brand_id,
amount: this.amount
amount: this.amount,
pay_pwd: this.pay_pwd
},
header: {
Authorization: token
}
}).then(res => {
uni.hideLoading();
if(res.data.code == 200){
this.$url('/pages/aboutpay/paystate?payState=1&amount='+ this.amount);
this.$url('/pages/aboutpay/paystate?payState=1&amount='+ this.amount, {type: 'redirect'});
}else{
this.$msg(res.data.message || res.data.data || '支付失败').then(() => {
this.$url('/pages/aboutpay/paystate?payState=0');
this.$url('/pages/aboutpay/paystate?payState=0', {type: 'redirect'});
})
}
})
}).catch(err => uni.hideLoading())
}
}
}

522
pages/business/activity/add.vue

@ -0,0 +1,522 @@
<template>
<view>
<lf-nav title="新增活动" :showIcon="true" bgColor="#f8f8f8"></lf-nav>
<view class="content">
<view class="list">
<view class="title">标题</view>
<input class="input" placeholder="请输入标题" v-model="title" />
</view>
<view class="list">
<view class="title">副标题</view>
<input class="input" placeholder="请输入副标题" v-model="subtitle" />
</view>
<view class="list">
<view class="title">活动开始时间</view>
<view class="select" @click="show_activity_startdate = true">
<text>{{ activity_startdate || '请选择' }}</text>
<text class="lf-iconfont icon-xiangxia"></text>
</view>
<u-picker v-model="show_activity_startdate"
mode="time" :params="params" :default-time="activity_startdate"
@confirm="selectDate($event, 'activity_startdate')">
</u-picker>
</view>
<view class="list">
<view class="title">活动结束时间</view>
<view class="select" @click="show_activity_enddate = true">
<text>{{ activity_enddate || '请选择' }}</text>
<text class="lf-iconfont icon-xiangxia"></text>
</view>
<u-picker v-model="show_activity_enddate"
mode="time" :params="params"
@confirm="selectDate($event, 'activity_enddate')">
</u-picker>
</view>
<view class="list">
<view class="title">报名开始时间</view>
<view class="select" @click="show_sign_start = true">
<text>{{ sign_startdate || '请选择' }}</text>
<text class="lf-iconfont icon-xiangxia"></text>
</view>
<u-picker v-model="show_sign_start"
mode="time" :params="params"
@confirm="selectDate($event, 'sign_startdate')">
</u-picker>
</view>
<view class="list">
<view class="title">报名结束时间</view>
<view class="select" @click="show_sign_end = true">
<text>{{ sign_enddate || '请选择' }}</text>
<text class="lf-iconfont icon-xiangxia"></text>
</view>
<u-picker v-model="show_sign_end"
mode="time" :params="params"
@confirm="selectDate($event, 'sign_enddate')">
</u-picker>
</view>
<view class="list">
<view class="title">谁可参与</view>
<view class="select" @click="show_levels = true">
<text>{{ (levels_list[levels_index] && levels_list[levels_index].name) || '请选择' }}</text>
<text class="lf-iconfont icon-xiangxia"></text>
</view>
<u-picker v-model="show_levels"
mode="selector"
:range="levels_list"
range-key="name"
@confirm="levelsConfirm">
</u-picker>
</view>
<view class="list">
<view class="title">活动内容</view>
<input class="input" placeholder="请输入活动内容" v-model="activity_content" />
</view>
<view class="list">
<view class="title">活动人数</view>
<input class="input" placeholder="请输入活动人数" v-model="activity_num" />
</view>
<view class="list">
<view class="title">活动规则</view>
<textarea class="textarea" placeholder="请输入活动规则内容" v-model="activity_rule"></textarea>
</view>
<!-- 上传图片 -->
<view class="list">
<view class="title">活动图片</view>
<view class="my-images">
<view class="my-image-item" @click="uploadImage" v-if="image_list.length < image_count">
<text class="lf-iconfont icon-jia my-image-item-after"></text>
</view>
<view class="my-image-item" v-for="(item, index) in image_list" :key="index" @click="lookImage(index)">
<image :src="item" mode="aspectFill"></image>
<view class="remove-image" @click.stop="removeInage(index)">
<text class="lf-iconfont icon-shanchu"></text>
</view>
</view>
</view>
</view>
<button class="buttom" hover-class="lf-opacity" @click="submit" v-if="id == 0">立即新增</button>
<view class="btn-box" v-else>
<view class="btn2" hover-class="lf-opacity" @click="submit">保持修改</view>
<view class="btn2"
style="background-color: #bd1a1a;"
hover-class="lf-opacity"
@click="deleteActivity">删除活动
</view>
</view>
</view>
</view>
</template>
<script>
import { config } from '@/common/js/utils.js';
export default {
data(){
return {
title: '', //
subtitle: '', //
show_activity_startdate: false, //
show_activity_enddate: false, //
activity_startdate: '',
activity_enddate: '',
show_sign_start: false, //
show_sign_end: false, //
sign_startdate: '',
sign_enddate: '',
activity_content: '', //
activity_num: '', //
activity_rule: '', //
image_list: [], //
image_count: 1, //
uploadImg: [], //
params: {
year: true,
month: true,
day: true,
hour: true,
minute: true,
second: true
},
token: '',
levels_list: [], //
show_levels: false, //
levels_index: null,
id: 0, // 00
user_level: null
}
},
onLoad(options){
this.token = this.$cookieStorage.get('store_token');
console.log("config", config);
this.getActivityLevels();
if(options.id){
this.id = Number(options.id);
this.getActivityDetail();
}
},
methods: {
//
getActivityDetail(){
uni.showLoading({
title: '正在获取信息'
})
this.$http.get({
api: 'api/supplier/activity/detail',
data: {
id: this.id
},
header: {
token: this.token
}
}).then(res => {
if(res.data.code == 200){
let data = res.data.data;
this.title = data.name;
this.subtitle = data.username;
this.activity_startdate = data.time_start;
this.activity_enddate = data.time_end;
this.sign_startdate = data.apply_start;
this.sign_enddate = data.apply_end;
this.activity_content = data.content;
this.activity_num = data.member_count;
this.activity_rule = data.rule;
this.image_list = [data.image];
this.uploadImg = [data.image];
if(data.user_level != 0){
this.user_level = data.user_level;
}
}else{
uni.showModal({
title: '',
content: '活动信息获取失败了,请离开此页面稍后再试!'
})
}
uni.hideLoading();
}).catch(err => uni.hideLoading())
},
//
deleteActivity(){
uni.showModal({
title: '温馨提示',
content: '您确定删除该活动吗?',
success: result => {
if(result.confirm){
this.$http.post({
api: 'api/supplier/activity/destroy',
data: {
id: this.id
},
header: {
token: this.token
}
}).then(res => {
if(res.data.code == 200){
this.$msg(res.data.data || '活动已删除').then(() => {
this.$toBack();
})
}else{
this.$msg(res.data.data || rea.data.message || '删除失败');
}
})
}
}
})
},
//
getActivityLevels(){
this.$http.get({
api: 'api/supplier/activity/levels',
header: {
token: this.token
}
}).then(res => {
let levels_list = res.data.data || [];
levels_list.unshift({
id: 0,
name: '不限会员等级'
});
this.levels_list = levels_list;
if(this.user_level != null){
levels_list.map((item, index) => {
if(item.id == this.user_level){
this.levels_index = index;
}
})
}
})
},
//
levelsConfirm(event){
this.levels_index = event[0];
},
//
selectDate(e, key){
this[key] = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`;
},
//
uploadImage(){
let current_count = this.image_count - this.image_list.length;
if(current_count == 0) return;
uni.chooseImage({
count: current_count,
complete: result => {
if(result.errMsg == "chooseImage:fail cancel"){
return; //
}
let tempFiles = result.tempFiles;
let image_list = [];
let overstep = false;
tempFiles.map(item => {
// 10MB
if(item.size < 10000000){
image_list.push(item.path);
}else{
overstep = true;
}
})
if(overstep){
uni.showModal({
title: '温馨提示',
content: '您上传的图片含有超出10M大小的限制,请优化大小后再上传!',
showCancel: false
})
}
this.image_list.push(...image_list);
}
})
},
// 线
uploadDiscover(img) {
return new Promise((resolve, reject) => {
uni.showLoading({
title: '正在上传中'
})
uni.uploadFile({
header: {
token: this.token
},
url: `${config.GLOBAL.baseUrl}api/supplier/upload_image`,
filePath: img,
fileType: 'image',
name: 'image',
success: res => {
var result = JSON.parse(res.data).data.url;
// this.uploadImg.push(result)
// console.log('',this.uploadImg)
uni.hideLoading();
resolve(result);
},
fail: err => {
console.log(err)
uni.hideLoading();
reject(err);
}
})
})
},
//
lookImage(current){
if(this.image_list.length <= 0) return;
this.$u.throttle(() => {
uni.previewImage({
urls: this.image_list,
current: current
});
}, 500);
},
//
removeInage(current){
this.image_list.splice(current, 1);
if(this.uploadImg.length){
this.uploadImg.splice(current, 1);
}
},
//
submit(){
if(!this.title) return this.$msg('请输入标题');
if(!this.subtitle) return this.$msg('请输入副标题');
if(!this.activity_startdate) return this.$msg('未选择活动开始时间');
if(!this.activity_enddate) return this.$msg('未选择活动结束时间');
if(!this.sign_startdate) return this.$msg('未选择报名开始时间');
if(!this.sign_enddate) return this.$msg('未选择报名结束时间');
if(!this.activity_content) return this.$msg('请填写活动内容');
if(!this.activity_num) return this.$msg('请填写活动人数');
if(!this.activity_rule) return this.$msg('请填写活动规则');
if(!this.image_list.length) return this.$msg('请上传活动封面图');
if(this.uploadImg.length){
this.submitHttp();
}else{
this.uploadDiscover(this.image_list[0]).then(res => {
console.log("submit", res);
this.uploadImg = [res];
this.submitHttp();
})
}
},
submitHttp(){
uni.showLoading({
title: '正在提交中'
})
let par = {
id: this.id,
name: this.title,
username: this.subtitle,
member_count: this.activity_num,
image: this.uploadImg[0],
time_start: this.activity_startdate,
time_end: this.activity_enddate,
apply_start: this.sign_startdate,
apply_end: this.sign_enddate,
content: this.activity_content,
rule: this.activity_rule,
user_level: 0
}
if(this.levels_index != null){
par.user_level = this.levels_list[this.levels_index].id;
}
this.$http.post({
api: 'api/supplier/activity/store',
data: par,
header: {
token: this.token
}
}).then(res => {
console.log("``````", res);
if(res.data.code == 200){
this.$msg('操作成功', {icon: 'success'}).then(() => {
this.$toBack();
})
}else{
uni.showModal({
title: '',
content: res.data.message || '新增活动失败!',
showCancel: false
})
}
uni.hideLoading()
}).catch(err => uni.hideLoading())
}
}
}
</script>
<style lang="scss" scoped>
.content{
padding: 30rpx 32rpx;
width: 750rpx;
height: max-content;
.list{
width: 100%;
padding-bottom: 60rpx;
.title{
font-size: 28rpx;
color: #222222;
margin-bottom: 20rpx;
}
.input{
width: 100%;
height: 80rpx;
background: rgba(14, 47, 158, 0.05);
border-radius: 5rpx;
padding: 20rpx 30rpx;
box-sizing: border-box;
}
.select{
width: 100%;
height: 80rpx;
padding: 20rpx 30rpx;
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
background: rgba(14, 47, 158, 0.05);
border-radius: 5rpx;
border: 1rpx solid #0E2F9E;
font-size: 28rpx;
color: #0E2F9E;
}
.textarea{
width: 686rpx;
height: 283rpx;
background: rgba(14, 47, 158, 0.05);
border-radius: 5rpx;
padding: 20rpx 30rpx;
box-sizing: border-box;
}
}
.my-images{
display: flex;
flex-wrap: wrap;
margin-top: 30rpx;
margin-bottom: 18rpx;
.my-image-item{
width: 220rpx;
height: 220rpx;
// background: #DDDDDD;
background-color: rgba(14, 47, 158, 0.05);
position: relative;
margin-right: 12rpx;
&:nth-child(3n){
margin-right: 0rpx;
}
&:nth-child(n+4){
margin-top: 12rpx;
}
image{
width: 100%;
height: 100%;
}
.remove-image{
position: absolute;
right: -4rpx;
top: -18rpx;
color: #e74c3c;
font-size: 40rpx;
padding: 8rpx;
}
}
.my-image-item-after{
position: absolute;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
font-size: 60rpx;
color: #999999;
}
}
.buttom{
width: 550rpx;
height: 100rpx;
background: #0D2E9A;
border-radius: 50rpx;
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
color: #FFFFFF;
}
.btn-box{
width: 100%;
height: 100rpx;
display: flex;
justify-content: space-between;
.btn2{
width: 48%;
height: 100%;
background-color: #0D2E9A;
border-radius: 50rpx;
font-size: 32rpx;
color: #FFFFFF;
display: flex;
justify-content: center;
align-items: center;
}
}
}
</style>

302
pages/business/activity/list.vue

@ -0,0 +1,302 @@
<template>
<view>
<lf-nav title="活动列表" :showIcon="true" bgColor="#fff" @changeHeight="e => nav_height = e"></lf-nav>
<view v-if="tab_list.length">
<u-tabs :list="tab_list" active-color="#0E2F9E" inactive-color='#777777' :is-scroll="true" :current="tab_current" @change="tabChange"></u-tabs>
</view>
<swiper :style="{height: autoHeight}" :current="tab_current" @change="swiperChange">
<swiper-item v-for="(tab, tabIndex) in tab_list" :key="tabIndex">
<scroll-view :style="{height: autoHeight}" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="isRefresher"
@scrolltolower="onScrolltolower" @refresherrefresh="onRefresherrefresh">
<view class="scroll-content">
<view class="card" v-for="(item, index) in tab.list" :key="index" @click="goDetails(item)">
<view class="cover">
<image class="img" :src="item.image"></image>
<!-- TODO 活动标签 -->
<!-- <view class="label" :class="'theme-'+ (index+1)" v-if="item.is_expired==false && item.state =='待使用'">待使用</view>
<view class="label" :class="'theme-'+ (index+1)" v-if="item.is_expired==true">已过期</view>
<view class="label" :class="'theme-'+ (index+1)" v-if="item.is_expired==false">{{item.state}}</view> -->
<!-- <view class="label theme-1">{{ showLabel(item) }}</view> -->
</view>
<view class="info">
<view class="title">{{item.name}}</view>
<view class="date">{{item.created_at}}</view>
</view>
</view>
<!-- 空数据的情况 -->
<view class="loading-more">
<text v-if="tab.list.length"
:class="{'loading-more-text': tab.loadingClass}">{{ tab.loadingText }}</text>
<lf-nocontent v-else src="/static/images/empty.png"></lf-nocontent>
</view>
</view>
<view style="height: 30rpx;"></view>
</scroll-view>
</swiper-item>
</swiper>
</view>
</template>
<script>
export default {
data(){
let _public = {
page: 1,
isPage: true,
loadingClass: true,
loadingText: '正在加载中'
}
return {
tab_current: 0,
tab_list: [{
name: '全部',
state: '',
list: [],
..._public
},{
name: '未开始',
state: 'nstart',
list: [],
..._public
},{
name: '进行中',
state: 'ing',
list: [],
..._public
},{
name: '已过期',
state: 'end',
list: [],
..._public
}],
scrollH: 0,
nav_height: 0,
isRefresher: true,
pageSize: 10,
token: '',
show_count: 0
}
},
computed: {
autoHeight(){
return `calc(${this.scrollH}px - ${this.nav_height}px - 86rpx)`;
},
showLabel(){
return function(item){
}
}
},
onLoad(){
this.token = this.$cookieStorage.get('store_token');
let info = uni.getSystemInfoSync();
this.scrollH = info.screenHeight;
this.getMyActivity()
},
onShow(){
this.show_count++;
if(this.show_count > 1){
let tab_item = this.tab_list[this.tab_current];
tab_item.page = 1;
tab_item.isPage = true;
tab_item.loadingClass = true;
tab_item.list = []
tab_item.loadingText = '正在加载中';
this.getMyActivity();
}
},
methods: {
goDetails(item) {
if(!item.is_between){
this.$url('/pages/business/activity/add?id='+ item.id);
}
// is_apply_expired: false //
// is_between: false //
// is_between_apply: false //
// is_start
},
//
onScrolltolower(){
let tab_item = this.tab_list[this.tab_current];
if(tab_item.isPage){
tab_item.page = tab_item.page + 1;
this.getMyActivity();
}
},
//
refreshFn(options){
let tab_item = this.tab_list[this.tab_current];
tab_item.page = 1;
tab_item.isPage = true;
tab_item.loadingClass = true;
tab_item.list = []
tab_item.loadingText = '正在加载中';
this.getMyActivity(options);
},
// scroll-view
onRefresherrefresh(){
this.isRefresher = true;
this.refreshFn({type: 'scrollRefresh'});
},
tabChange(event){
this.tab_current = event;
this.getMyActivity();
},
swiperChange(event){
this.tab_current = event.detail.current;
if (event.detail.source == '') return; //
this.getMyActivity();
},
getMyActivity(options = {}) {
let tab_item = this.tab_list[this.tab_current];
this.$http
.get({
api: 'api/supplier/activity',
data:{
status: tab_item.state,
page: tab_item.page,
page_size: this.pageSize
},
header: {
token: this.token
},
})
.then(res => {
if (res.data.code == 200) {
if (res.data.status) {
let isPage = res.data.next_page_url == null?false:true;
tab_item.isPage = isPage;
if(!isPage) {
tab_item.loadingClass = false;
tab_item.loadingText = '没有更多数据啦~';
}
if(options.type == 'pageRefresh') {
uni.stopPullDownRefresh();
}else if(options.type == 'scrollRefresh') {
this.isRefresher = false;
}
if(tab_item.page == 1) {
tab_item.list = res.data.data.data;
}else {
tab_item.list.push(...res.data.data.data);
}
console.log('数组列表',tab_item.list)
} else {
wx.showModal({
content: res.data.message || '请下拉页面刷新重试',
showCancel: false
});
}
} else {
wx.showModal({
content: res.data.message || '请下拉页面刷新重试',
showCancel: false
});
}
wx.hideLoading();
})
.catch(() => {
wx.hideLoading();
wx.showModal({
content: '请求失败',
showCancel: false
});
});
}
}
}
</script>
<style lang="scss" scoped="scoped">
.scroll-content{
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: center;
.card{
width: 686rpx;
height: max-content;
background-color: #FFFFFF;
box-shadow: 1rpx 1rpx 6rpx 3rpx #e5e5e5;
margin-top: 30rpx;
border-radius: 20rpx;
overflow: hidden;
.cover{
width: 686rpx;
height: 300rpx;
position: relative;
.img{
width: 100%;
height: 100%;
background-color: #EEEEEE;
}
.label{
position: absolute;
top: 0;
left: 0;
width: 118rpx;
height: 57rpx;
border-radius: 20rpx 0rpx 20rpx 0rpx;
text-align: center;
line-height: 57rpx;
color: #FFFFFF;
font-size: 26rpx;
}
}
.info{
width: 686rpx;
height: max-content;
padding: 20rpx 30rpx;
box-sizing: border-box;
.title{
font-size: 28rpx;
color: #222222;
font-weight: bold;
}
.date{
margin-top: 20rpx;
font-size: 24rpx;
color: #555555;
}
}
}
}
.theme-1{
background-color: #0E2F9E;
}
.theme-2{
background-color: #1789E4;
}
.theme-3{
background-color: #777777;
}
// tabs
/deep/.u-scroll-box {
display: flex;
justify-content: center;
align-items: center;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
}
/deep/.u-scroll-box .u-tab-bar {
background-color: #0E2F9E!important;
width: 80rpx!important;
position: absolute;
left: 0;
bottom: -12rpx;
}
/deep/.special_tab .u-tabs .u-scroll-box .u-tab-bar {
background-color: #0E2F9E!important;
width: 56rpx!important;
position: absolute;
height: 5rpx!important;
left: 8rpx;
bottom: -4rpx;
}
/deep/ .u-tab-item {
font-size: 28rpx!important;
}
</style>

36
pages/business/balance/balance.vue

@ -35,7 +35,10 @@
<view class="item" v-for="(item, index) in tabItem.list" :key="index">
<view class="lf-row-between">
<text class="lf-font-36 lf-color-black lf-font-bold" style="width: 70%;" v-if="item.type == 'charge'">+{{ item.balance }}</text>
<text class="lf-font-36 lf-font-bold" style="color: #F63434; width: 70%;" v-else>{{ item.balance }}</text>
<text class="lf-font-36 lf-font-bold" style="width: 70%;" v-else>
<text v-if="current == 1" :style="{color: showStateColor(item.state), 'font-size': '22rpx'}">[{{ item.state }}]</text>
<text style="color: #F63434;">{{ item.balance }}</text>
</text>
<text class="lf-font-24 lf-color-555">{{ item.note }}</text>
</view>
<view class="lf-row-between lf-m-t-20">
@ -66,17 +69,46 @@
isPage: true,
list: []
}],
balance: 0
balance: 0,
show_count: 0
}
},
computed: {
getDay(){
return this.$shared.recordTime(new Date(), '-', 'date');
},
showStateColor(){
return function(val){
if(val == '提现中'){
return '#999999'
}else if(val == '已到账'){
return '#0D2E9A'
}else{
return '#87aebf'
}
}
}
},
onLoad(){
this.getBalance();
},
onShow(){
this.show_count++;
if(this.show_count > 1){
this.tab_list = [{
name: '余额明细',
page: 1,
isPage: true,
list: []
},{
name: '提现明细',
page: 1,
isPage: true,
list: []
}];
this.getBalance();
}
},
methods: {
//
dateChange(event){

77
pages/business/center/center.vue

@ -96,6 +96,23 @@
</view>
</view>
</view>
<view class="card">
<view class="lf-row-between">
<view class="title">我的活动</view>
</view>
<view class="lf-flex lf-m-t-50">
<view class="item" :style="{width: 100 / 3 +'%'}" @click="$url('/pages/business/activity/add')">
<view class="lf-iconfont icon-bianji lf-font-60"></view>
<view>新增活动</view>
</view>
<view class="item" :style="{width: 100 / 3 +'%'}" @click="$url('/pages/business/activity/list')">
<view class="lf-iconfont icon-fabujilu lf-font-60"></view>
<view>活动列表</view>
</view>
</view>
</view>
<button class="out-btn" hover-class="lf-opacity" @click="outLogin">退出登录</button>
<view style="height: 30rpx;"></view>
</block>
</view>
</template>
@ -151,6 +168,10 @@
url += `&rand=${result.rand}`;
url += `&time=${result.time}`;
this.$url(url);
}else if(result.u_id && result.a_id){
this.activityJoin(result);
}else if(result.u_id && result.no){
this.orderSelf(result);
}
}else{
this.$msg('不是有效的支付码');
@ -170,6 +191,50 @@
new_data = str;
}
return new_data;
},
//
activityJoin(result){
this.$http.post({
api: 'api/supplier/activity/join',
data: {
user_id: result.u_id,
activity_id: result.a_id
},
header: {
token: this.token
}
}).then(res => {
this.$msg(res.data.message || '核销失败');
})
},
//
orderSelf(result){
this.$http.post({
api: `api/supplier/order/self/${result.no}`,
data: {
user_id: result.u_id
},
header: {
token: this.token
}
}).then(res => {
this.$msg(res.data.message || '自提核销成功');
})
},
// 退
outLogin(){
uni.showModal({
title: '温馨提示',
content: '您确定退出登录商家中心吗?',
success: result => {
if(result.confirm){
this.$cookieStorage.clear('store_token');
this.$msg('退出成功', {icon: 'success'}).then(() => {
this.$toBack();
})
}
}
})
}
}
}
@ -288,4 +353,16 @@
}
}
}
.out-btn{
width: 686rpx;
height: 90rpx;
background-color: #0D2E9A;
color: #FFFFFF;
font-size: 32rpx;
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
margin-top: 60rpx;
}
</style>

2
pages/business/payment/money.vue

@ -7,7 +7,7 @@
<view class="list money-list">
<view class="lf-flex">
<view class="symbol"></view>
<input class="input" type="number" v-model="money" />
<input class="input" v-model="money" />
</view>
<view class="clear" v-if="money.length" @click="money = ''">
<text class="lf-iconfont icon-cuo1"></text>

2
pages/business/withdrawal/withdrawal.vue

@ -210,7 +210,7 @@
this.alipay_account = '';
}
this.money = '';
this.$msg('提现成功', {icon: 'success'});
this.$msg('提现成功', {icon: 'success', duration: 2500});
this.getApplyInfo();
}
uni.hideLoading();

3
pages/discover/discover.vue

@ -104,6 +104,9 @@
return `calc(${this.scrollH}px - ${this.nav_height}px - 130rpx - 86rpx)`;
}
},
onShow() {
this.getHotActivity()
},
onLoad(){
let info = uni.getSystemInfoSync();
this.scrollH = info.screenHeight;

24
pages/discover/discoverdetails.vue

@ -54,7 +54,7 @@
<view class="lf-color-999 lf-font-24" v-if="commentitem.user.nick_name">{{commentitem.user.nick_name}}</view>
<view class="lf-color-999 lf-font-24" v-else>{{commentitem.user.mobile_replace}}</view>
<view>
<view class="lf-color-black lf-line-2" style="max-width:550rpx;">{{commentitem.content}}<text class="lf-color-999 lf-font-24 lf-m-l-10">{{commentitem.created_at}}</text></view>
<view class="lf-color-black" style="max-width:550rpx;">{{commentitem.content}}<text class="lf-color-999 lf-font-24 lf-m-l-10">{{commentitem.created_at}}</text></view>
</view>
</view>
<view class="lf-m-l-32" style="position: absolute;right:33rpx;">
@ -106,21 +106,21 @@
<!-- 底部tab -->
<view class="comment-tab">
<view>
<input class="rom-search" type="text" v-if="ifApply" :focus="ifApply" @confirm="applyComment(apply_userid,apply_commentid)" :cursor-spacing="8" v-model="comment" placeholder="说点什么" />
<input class="rom-search" confirm-type="send" type="text" v-if="ifApply" :focus="ifApply" @confirm="applyComment(apply_userid,apply_commentid)" :cursor-spacing="8" v-model="comment" placeholder="说点什么" />
<input class="rom-search" type="text" v-else @confirm="sendComment(discover_details.id)" :cursor-spacing="8" v-model="comment" placeholder="说点什么" />
</view>
<view class="lf-row-center">
<view class="lf-row-center lf-m-r-35" @click.stop="addLike(discover_details.id)">
<text class="lf-iconfont icon-xihuanlike lf-color-price" v-if="discover_details.is_like"></text>
<text class="lf-iconfont icon-xihuan" v-else></text>
<view class="lf-row-center lf-m-r-35" style="align-items: center;" @click.stop="addLike(discover_details.id)">
<text class="lf-iconfont icon-xihuanlike lf-color-price lf-font-36" v-if="discover_details.is_like"></text>
<text class="lf-iconfont icon-xihuan lf-font-36" v-else></text>
<text class="lf-font-24 lf-color-777 lf-m-l-10">{{discover_details.likes_count}}</text>
</view>
<view class="lf-row-center lf-m-r-35">
<text class="lf-iconfont icon-chakan"></text>
<view class="lf-row-center lf-m-r-35" style="align-items: center;">
<text class="lf-iconfont icon-chakan lf-font-44"></text>
<text class="lf-font-24 lf-color-777 lf-m-l-10">{{discover_details.view_count}}</text>
</view>
<view class="lf-row-center lf-m-r-35">
<text class="lf-iconfont icon-pinglun-"></text>
<view class="lf-row-center lf-m-r-35" style="align-items: center;">
<text class="lf-iconfont icon-pinglun- lf-font-36"></text>
<text class="lf-font-24 lf-color-777 lf-m-l-10">{{discover_details.comments_count}}</text>
</view>
</view>
@ -181,7 +181,7 @@
.then(res => {
if (res.data.code == 200) {
if (res.data.status) {
this.$msg('点赞成功').then(() => {
this.$msg('点赞成功',{icon: 'success', duration: 2500}).then(() => {
console.log('更新点赞列表')
this.getCommentList()
})
@ -264,7 +264,7 @@
.then(res => {
if (res.data.code == 200) {
if (res.data.status) {
this.$msg('回复成功').then(() => {
this.$msg('回复成功',{icon: 'success', duration: 2500}).then(() => {
console.log('更新回复列表');
this.comment = '';
this.ifApply = false;
@ -310,7 +310,7 @@
.then(res => {
if (res.data.code == 200) {
if (res.data.status) {
this.$msg('评论成功').then(() => {
this.$msg('评论成功',{icon: 'success', duration: 2500}).then(() => {
console.log('更新评论列表')
this.comment = '';
this.getCommentList();

2
pages/discover/publish.vue

@ -118,7 +118,7 @@
let current_count = this.image_count - this.image_list.length;
if(current_count == 0) return;
uni.chooseImage({
count: current_count,
count: 1,
complete: result => {
if(result.errMsg == "chooseImage:fail cancel"){
return; //

11
pages/index/activity/detail.vue

@ -1,18 +1,18 @@
<template>
<view>
<lf-nav title="活动详情" :showIcon="true"></lf-nav>
<view class="content">
<view class="content" v-if="$isRight(activity_details)">
<view class="title">{{activity_details.name}}</view>
<view class="level2-title">
{{activity_details.username}}
</view>
<view class="level3-title">
<text>活动时间</text>
<text class="color1">{{activity_details.time_start}}</text>
<text class="color1">{{activity_details.time_start}}~{{activity_details.time_end}}</text>
</view>
<view class="level3-title">
<text>报名时间</text>
<text class="color2">{{activity_details.apply_start}}</text>
<text class="color2">{{activity_details.apply_start}}~{{activity_details.apply_end}}</text>
</view>
<view class="level3-title lf-flex">
<text>活动内容</text>
@ -71,7 +71,10 @@
api: 'api/activity/detail',
data: {
activity_id: this.activity_id
}
},
header: {
Authorization: this.$cookieStorage.get('user_token')
},
})
.then(res => {
if (res.data.code == 200) {

5
pages/index/activity/hot.vue

@ -114,7 +114,10 @@
api: 'api/activity',
data:{
is_expired: this.tab_current+1
}
},
header: {
Authorization: this.$cookieStorage.get('user_token')
},
})
.then(res => {
let tab_item = this.tab_list[this.tab_current];

8
pages/index/index/index.vue

@ -317,7 +317,7 @@
<view class="fixed-cart" hover-class="lf-opacity" @click="$url('/pages/store/cart/cart')">
<text class="lf-iconfont icon-gouwulan icon-text"></text>
<text class="tips">购物车</text>
<view class="angle-mark">{{car_num}}</view>
<view class="angle-mark">{{car_num || 0}}</view>
</view>
</view>
<!-- ad广告弹出组件 TODO 暂时先注释 -->
@ -556,7 +556,11 @@
})
.then(res => {
if (res.data.code == 200) {
this.car_num = res.data.data;
if(res.data.data == null) {
this.car_num = 0;
}else {
this.car_num = res.data.data;
}
} else {
wx.showModal({
content: '请下拉页面刷新重试',

17
pages/order/confirm/confirm.vue

@ -27,6 +27,23 @@
暂无收货地址,请前往添加
</view>
</view>
<view class="card address" v-else>
<view @click="$url('/pages/address/list/list?is_select=1')">
<text class="lf-font-28 lf-color-primary lf-m-r-10">店铺地址</text>
</view>
<view v-if="address">
<view class="lf-m-t-20">
<text class="lf-font-28 lf-color-222 lf-font-bold">{{ order_detail.order.brand.name }}</text>
<text class="lf-font-28 lf-color-777 lf-m-l-20">{{ order_detail.order.brand.tel }}</text>
</view>
<view class="lf-font-28 lf-color-333 lf-m-t-10">
<text>{{ order_detail.order.brand.floor }}</text>
</view>
</view>
<view v-else class="lf-font-28 lf-color-777">
暂无收货地址,请前往添加
</view>
</view>
<view class="card goods">
<view @click="$url('/pages/shop/shopdetail?id='+ order_detail.order.brand.id)">
<text class="lf-iconfont icon-Group- lf-font-30"></text>

24
pages/order/index/onlineorder.vue

@ -18,9 +18,10 @@
<swiper-item v-for="(tabItem, tabIndex) in tab_list" :key="tabIndex">
<scroll-view :style="{height: autoHeight}" class="com" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="tabItem.isRefresher" @scrolltolower="onScrolltolower" @refresherrefresh="onRefresherrefresh">
<view v-for="(item2,index2) of tabItem.list" :key="index2" class="online-card" @click="$url('/pages/order/newdetail/newdetail?order_id='+item2.order_no)">
<view v-for="(item2,index2) of tabItem.list" :key="index2" style="position: relative;" class="online-card" @click="goDetails(item2.pick_self,item2.order_no)">
<view class="lf-font-24 lf-color-777">
订单编号{{item2.order_no}}
<view class="pick-self" v-if="item2.pick_self !=0">自提</view>
</view>
<view class="lf-m-t-30">
<text class="lf-iconfont icon-Group- lf-font-28"></text>
@ -173,6 +174,13 @@
this.getData()
},
methods: {
goDetails(type,id) {
if(type==0) {
this.$url('/pages/order/newdetail/newdetail?pick_type=0&order_id='+id)
}else {
this.$url('/pages/order/newdetail/newdetail?pick_type=1&order_id='+id)
}
},
changeTab(index) {
this.online_tab = index
if(this.online_tab == 0) {
@ -334,6 +342,20 @@
</style>
<style scoped lang="scss">
.pick-self {
border-radius: 0px 20rpx 0px 10rpx;
background: #15716E;
width: 108rpx;
height: 53rpx;
font-size: 24rpx;
color: white;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
right: 0;
top: 0;
}
.content-img {
width: 130rpx;
height: 130rpx;

75
pages/order/newdetail/newdetail.vue

@ -28,7 +28,7 @@
查看详情
</view>
</view>
<view class="card" style="margin-top: 0;">
<view class="card" style="margin-top: 0;" v-if="order_details.pick_self == 0">
<view class="lf-font-28">
<text class="lf-color-222 lf-font-bold">{{order_details.accept_name}}</text>
<text class="lf-color-777 lf-m-l-20">{{order_details.mobile}}</text>
@ -37,6 +37,15 @@
<text>{{order_details.address_name}}{{order_details.address}}</text>
</view>
</view>
<view class="card" style="margin-top: 0;" v-else>
<view class="lf-font-28">
<text class="lf-color-222 lf-font-bold">{{order_details.brand.name}}</text>
<text class="lf-color-777 lf-m-l-20">{{order_details.brand.tel}}</text>
</view>
<view class="lf-font-28 lf-color-333 lf-m-t-20">
<text>{{order_details.brand.floor}}</text>
</view>
</view>
<view class="card goods">
<view>
<text class="lf-iconfont icon-Group- lf-font-30"></text>
@ -55,6 +64,12 @@
</view>
</view>
</view>
<view style="margin-top: 60rpx;display: flex;justify-content: center;" v-if="$isRight(order_details) && order_details.status == 2">
<view class="lf-flex-column">
<lf-qrcode :options="config.qrc"></lf-qrcode>
<view class="lf-font-28 lf-row-center" style="color: #15716E;">{{order_details.status_text}}</view>
</view>
</view>
<view class="card" v-if="type == 'point'">
<view class="lf-row-between lf-font-28">
<text class="lf-color-777">积分数量</text>
@ -146,6 +161,18 @@
<view style="width: 220rpx;"></view>
<view style="width: 220rpx;"></view>
</view>
</view>
<!-- 代付款 -->
<view class="order-btn" v-if="order_details.status == 1">
<view class="lf-font-28 lf-row-center lf-color-777">
待付款
</view>
<view class="lf-flex">
<view class="btn-gray lf-m-r-20">取消订单</view>
<view class="btn-red" @click="$url('/pages/order/cashier/cashier?amount='+ order_details.total_yuan+'&order_no='+order_details.order_no)">立即付款</view>
</view>
</view>
<!-- 待收货 -->
<view class="order-btn" v-if="order_details.status == 3">
@ -173,6 +200,7 @@
</template>
<script>
import lfQrcode from '@/components/lf-code/lf-qrcode.vue';
import countdownTimer from '@/components/countdown-timer/countdown-timer';
export default {
data() {
@ -182,16 +210,41 @@
order_no: '',
order_details: '',
countdown_minute: '',
time: '',
show: false
show: false,
pick_type: 0,
config: {
bar: {
code: 'E01181016286106',
color: '#000', //
bgColor: '#FFFFFF', //
width: 586, //
height: 210 //
},
qrc: {
code: "",
size: 352, //
level: 4, // 04
bgColor: '#FFFFFF', //
// border: {
// color: ['#8A2387', '#F27121'], //
// lineWidth: 3, //
// },
// img: '/static/logo.png', //
// iconSize: 40, //
color: '#000000', //
}
},
}
},
components: {
countdownTimer
countdownTimer,
lfQrcode
},
onLoad(options) {
this.type = options.type || this.type;
this.order_no = options.order_id;
this.pick_type = options.pick_type;
console.log('字体',this.pick_type)
if (this.order_no) {
this.getOrderDetails();
}
@ -268,6 +321,10 @@
}
}).then(res => {
this.order_details = res.data.data
this.config.qrc.code = JSON.stringify({
u_id: this.order_details.user_id,
no: this.order_details.order_no
})
var date = this.getTime()
this.time = new Date(this.order_details.will_closed_at).getTime() - new Date(date).getTime()
if(this.time > 0) {
@ -286,6 +343,16 @@
}
</style>
<style lang="scss" scoped="scoped">
.btn-gray {
width: 220rpx;background: white;height: 90rpx;border-radius: 45rpx;border: 2rpx solid #999999;display: flex;align-items: center;justify-content: center;
color: #777777;
font-size: 28rpx;
}
.btn-red {
width: 220rpx;background: #F63434;height: 90rpx;border-radius: 45rpx;display: flex;align-items: center;justify-content: center;
color: white;
font-size: 28rpx;
}
.tips-waitconfirm {
width: 100%;
height: 113rpx;

107
pages/shop/goodsdetail.vue

@ -86,18 +86,20 @@
</view>
</block>
<!-- 商品选择规格 -->
<view class="bg-white">
<view class="cu-bar padding-lr" @click="shoot(2)">
<view class="lf-flex">
<text class="lf-color-777 lf-font-28">选择</text>
<text class="lf-color-222 lf-font-26 lf-m-l-30">{{ showSpec }}</text>
</view>
<view>
<text class="lf-font-24 lf-color-777 lf-iconfont icon-xiangyou"></text>
<block v-if="$isRight(goods_stock.specs)">
<view class="bg-white">
<view class="cu-bar padding-lr" @click="shoot(2)">
<view class="lf-flex">
<text class="lf-color-777 lf-font-28">选择</text>
<text class="lf-color-222 lf-font-26 lf-m-l-30">{{ showSpec }}</text>
</view>
<view>
<text class="lf-font-24 lf-color-777 lf-iconfont icon-xiangyou"></text>
</view>
</view>
</view>
</view>
<self-line></self-line>
<self-line></self-line>
</block>
<!-- 店铺信息 -->
<view v-if="type != 'point'">
@ -395,43 +397,60 @@
let goods_detail = this.goods_detail;
let specs = this.goods_stock.specs;
let stores = this.goods_stock.stores;
let par = {};
let s_id_1 = 1;
let s_id_2 = 2;
for(let i in specs){
if(specs[i].label_key == 'size'){
s_id_1 = 1;
if(this.$isRight(specs)){
let s_id_1 = 1;
let s_id_2 = 2;
for(let i in specs){
if(specs[i].label_key == 'size'){
s_id_1 = 1;
}
if(specs[i].label_key == 'color'){
s_id_2 = 2;
}
}
if(specs[i].label_key == 'color'){
s_id_2 = 2;
let spec_current_1 = specs[s_id_1].spec_current;
let spec_current_2 = specs[s_id_2].spec_current;
let id_1 = specs[s_id_1].list[spec_current_1].id;
let id_2 = specs[s_id_2].list[spec_current_2].id;
if(id_1 > id_2){
let id_3 = id_2;
id_2 = id_1;
id_1 = id_3;
}
par = {
attributes: {
color: specs[s_id_2].list[specs[s_id_2].spec_current].value,
com_id: goods_detail.id,
img: goods_detail.img,
size: specs[s_id_1].list[specs[s_id_1].spec_current].value,
sku: goods_detail.goods_no +'-'+ specs[s_id_1].list[specs[s_id_1].spec_current].value
},
id: stores[id_1 +'-'+ id_2].id,
product_id: stores[id_1 +'-'+ id_2].id,
price: stores[id_1 +'-'+ id_2].price,
store_count: stores[id_1 +'-'+ id_2].store,
market_price: goods_detail.market_price,
name: goods_detail.name,
qty: this.goods_num
}
}else{
par = {
attributes: {
com_id: goods_detail.id,
img: goods_detail.img
},
id: goods_detail.id,
product_id: goods_detail.id,
price: goods_detail.sell_price,
store_count: goods_detail.store_nums,
market_price: goods_detail.market_price,
name: goods_detail.name,
qty: this.goods_num
}
}
let spec_current_1 = specs[s_id_1].spec_current;
let spec_current_2 = specs[s_id_2].spec_current;
let id_1 = specs[s_id_1].list[spec_current_1].id;
let id_2 = specs[s_id_2].list[spec_current_2].id;
if(id_1 > id_2){
let id_3 = id_2;
id_2 = id_1;
id_1 = id_3;
}
let par = {
attributes: {
color: specs[s_id_2].list[specs[s_id_2].spec_current].value,
com_id: goods_detail.id,
img: goods_detail.img,
size: specs[s_id_1].list[specs[s_id_1].spec_current].value,
sku: goods_detail.goods_no +'-'+ specs[s_id_1].list[specs[s_id_1].spec_current].value
},
id: stores[id_1 +'-'+ id_2].id,
product_id: stores[id_1 +'-'+ id_2].id,
price: stores[id_1 +'-'+ id_2].price,
store_count: stores[id_1 +'-'+ id_2].store,
market_price: goods_detail.market_price,
name: goods_detail.name,
qty: this.goods_num
}
uni.showLoading({

195
pages/shop/seckillList.vue

@ -1,10 +1,10 @@
<template>
<view>
<lf-nav title="秒杀专场" :showIcon="true" bgColor="#fff"></lf-nav>
<scroll-view :style="{height: autoHeight}" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="isRefresher"
@scrolltolower="onScrolltolower" @refresherrefresh="onRefresherrefresh">
<scroll-view :style="{height: autoHeight}" :scroll-y="true" :refresher-enabled="true"
:refresher-triggered="isRefresher" @scrolltolower="onScrolltolower" @refresherrefresh="onRefresherrefresh">
<view class="content">
<view class="card" v-for="(item, index) in list" :key="index"
<view class="card" v-for="(item, index) in list" :key="index"
@click="$url('/pages/shop/goodsdetail?id='+ item.goods.id)">
<view class="goods-img">
<image class="img" :src="item.goods.img"></image>
@ -13,12 +13,48 @@
<view class="goods-info">
<view>
<view class="lf-line-2 title lf-m-b-16">{{ item.goods.name }}</view>
<view class="desc" v-if="item.seckill.end_left_time.length==0">距离开始还剩余 {{item.seckill.start_left_time[0]}}{{item.seckill.start_left_time[1]}}{{item.seckill.start_left_time[2]}}{{item.seckill.start_left_time[3]}}</view>
<view class="desc" v-if="item.seckill.start_left_time.length==0">距离结束还剩余 {{item.seckill.end_left_time[0]}}{{item.seckill.end_left_time[1]}}{{item.seckill.end_left_time[2]}}{{item.seckill.end_left_time[3]}}</view>
<!-- <view class="desc" v-if="item.seckill.end_left_time.length==0">距离开始还剩余
{{item.seckill.start_left_time[0]}}{{item.seckill.start_left_time[1]}}{{item.seckill.start_left_time[2]}}{{item.seckill.start_left_time[3]}}
</view>
<view class="desc" v-if="item.seckill.start_left_time.length==0">距离结束还剩余
{{item.seckill.end_left_time[0]}}{{item.seckill.end_left_time[1]}}{{item.seckill.end_left_time[2]}}{{item.seckill.end_left_time[3]}}
</view> -->
<view class="desc" v-if="item.ifStart">距离结束还剩余
<countdown-timer :time="item.countTime" :autoStart="true" @finish="dateFinish">
<template v-slot="{day,hour,minute, second}">
<view class="lf-flex">
<view class="lf-font-24">{{ day >= 10 ? day : "0" + day }}</view>
<view class="lf-font-24"></view>
<view class="lf-font-24">{{ hour >= 10 ? hour : "0" + hour }}</view>
<view class="lf-font-24"></view>
<view class="lf-font-24">{{ minute >= 10 ? minute : "0" + minute }}</view>
<view class="lf-font-24"></view>
<view class="lf-font-24">{{ second >= 10 ? second : "0" + second }}</view>
<view class="lf-font-24"></view>
</view>
</template>
</countdown-timer>
</view>
<view class="desc" v-else>距离开始还剩余
<countdown-timer :time="item.countTime" :autoStart="true" @finish="dateFinish">
<template v-slot="{day,hour,minute, second}">
<view class="lf-flex">
<view class="lf-font-24">{{ day >= 10 ? day : "0" + day }}</view>
<view class="lf-font-24"></view>
<view class="lf-font-24">{{ hour >= 10 ? hour : "0" + hour }}</view>
<view class="lf-font-24"></view>
<view class="lf-font-24">{{ minute >= 10 ? minute : "0" + minute }}</view>
<view class="lf-font-24"></view>
<view class="lf-font-24">{{ second >= 10 ? second : "0" + second }}</view>
<view class="lf-font-24"></view>
</view>
</template>
</countdown-timer>
</view>
</view>
<view class="lf-row-between">
<view class="price">
<text>¥{{ item.goods.max_price }}</text>
<text>¥{{ item.seckill_price }}</text>
<text>¥{{ item.goods.market_price }}</text>
</view>
<view class="btn" hover-class="lf-opacity">立即秒杀</view>
@ -27,8 +63,7 @@
</view>
<!-- 空数据的情况 -->
<view class="loading-more">
<text v-if="list.length != 0"
:class="{'loading-more-text': loadingClass}">{{ loadingText }}</text>
<text v-if="list.length != 0" :class="{'loading-more-text': loadingClass}">{{ loadingText }}</text>
<lf-nocontent src="/static/images/empty.png" v-else></lf-nocontent>
</view>
</view>
@ -38,8 +73,9 @@
</template>
<script>
import countdownTimer from '@/components/countdown-timer/countdown-timer';
export default {
data(){
data() {
return {
list: [],
page: 1,
@ -49,29 +85,37 @@
scrollH: 0,
nav_height: 0,
isRefresher: true,
pageSize: 10
pageSize: 10,
timer: '',
day: '',
hour: '',
min: '',
second: ''
}
},
components: {
countdownTimer
},
computed: {
autoHeight(){
autoHeight() {
return `calc(${this.scrollH}px - ${this.nav_height}px - 180rpx)`;
}
},
onLoad(){
onLoad() {
let info = uni.getSystemInfoSync();
this.scrollH = info.screenHeight;
this.getSeckillList();
},
methods: {
//
onScrolltolower(){
if(this.isPage){
onScrolltolower() {
if (this.isPage) {
this.page = this.page + 1;
this.getSeckillList();
}
},
//
refreshFn(options){
refreshFn(options) {
this.page = 1;
this.isPage = true;
this.loadingClass = true;
@ -80,32 +124,88 @@
this.getSeckillList(options);
},
// scroll-view
onRefresherrefresh(){
onRefresherrefresh() {
this.isRefresher = true;
this.refreshFn({type: 'scrollRefresh'});
this.refreshFn({
type: 'scrollRefresh'
});
},
getTime(){
var date = new Date(),
year = date.getFullYear(),
month = date.getMonth() + 1,
day = date.getDate(),
hour = date.getHours() < 10 ? "0" + date.getHours() : date.getHours(),
minute = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes(),
second = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
month >= 1 && month <= 9 ? (month = "0" + month) : "";
day >= 0 && day <= 9 ? (day = "0" + day) : "";
var timer = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second;
return timer;
},
getSeckillList(options = {}){
getSeckillList(options = {}) {
this.$http.get({
api: 'api/seckill/all'
}).then(res => {
console.log("----", res);
let isPage = this.page < res.data.meta.pagination.total_pages?true:false;
let isPage = this.page < res.data.meta.pagination.total_pages ? true : false;
this.isPage = isPage;
if(!isPage) {
if (!isPage) {
this.loadingClass = false;
this.loadingText = '没有更多数据啦~';
}
if(options.type == 'pageRefresh') {
if (options.type == 'pageRefresh') {
uni.stopPullDownRefresh();
}else if(options.type == 'scrollRefresh') {
} else if (options.type == 'scrollRefresh') {
this.isRefresher = false;
}
if(this.page == 1) {
this.list = res.data.data;
}else {
this.list.push(...res.data.data);
if (this.page == 1) {
let list = res.data.data;
list.forEach((item,index) => {
let now_date = new Date(new Date().toLocaleDateString()).getTime();
let start_date = new Date(new Date(item.seckill.starts_at).toLocaleDateString()).getTime();
console.log(now_date)
console.log(start_date)
console.log(item)
if(now_date < start_date) {
this.$set(item,'ifStart',false)
var date = this.getTime()
let time = new Date(item.seckill.starts_at).getTime() - new Date(date).getTime()
this.$set(item,'countTime',time)
}else {
this.$set(item,'ifStart',true)
var date = this.getTime()
let time = new Date(item.seckill.ends_at).getTime() - new Date(date).getTime()
this.$set(item,'countTime',time)
}
})
this.list = list
console.log(this.list)
} else {
let list = res.data.data;
list.forEach((item,index) => {
let now_date = new Date(new Date().toLocaleDateString()).getTime();
let start_date = new Date(new Date(item.seckill.starts_at).toLocaleDateString()).getTime();
console.log(now_date)
console.log(start_date)
console.log(item)
if(now_date < start_date) {
this.$set(item,'ifStart',false)
var date = this.getTime()
let time = new Date(item.seckill.starts_at).getTime() - new Date(date).getTime()
this.$set(item,'countTime',time)
}else {
this.$set(item,'ifStart',true)
var date = this.getTime()
let time = new Date(item.seckill.ends_at).getTime() - new Date(date).getTime()
this.$set(item,'countTime',time)
}
})
this.list.push(...list);
}
})
}
}
@ -113,17 +213,18 @@
</script>
<style>
page{
page {
background-color: #F8F8F8;
}
</style>
<style lang="scss" scoped="scoped">
.content{
.content {
padding: 30rpx 32rpx;
width: 750rpx;
height: max-content;
box-sizing: border-box;
.card{
.card {
width: 686rpx;
height: 260rpx;
background: #FFFFFF;
@ -131,28 +232,32 @@
box-sizing: border-box;
padding: 30rpx;
display: flex;
&:nth-child(n+2){
&:nth-child(n+2) {
margin-top: 30rpx;
}
.goods-img{
.goods-img {
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
overflow: hidden;
position: relative;
margin-right: 15rpx;
.img{
.img {
width: 100%;
height: 100%;
background-color: #EEEEEE;
}
.tips{
.tips {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 37rpx;
background-color: rgba(0,0,0,0.5);
background-color: rgba(0, 0, 0, 0.5);
color: #FFFFFF;
font-size: 22rpx;
display: flex;
@ -160,19 +265,22 @@
align-items: center;
}
}
.goods-info{
.goods-info {
width: 410rpx;
height: 200rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.title{
.title {
font-size: 28rpx;
color: #222222;
font-weight: bold;
}
.desc{
width: 281rpx;
.desc {
// width: 281rpx;
height: max-content;
border-radius: 3rpx;
background-color: #E9F2F2;
@ -182,18 +290,21 @@
justify-content: center;
align-items: center;
}
.price>text:nth-child(1){
.price>text:nth-child(1) {
font-size: 36rpx;
color: #F63434;
font-weight: bold;
}
.price>text:nth-child(2){
.price>text:nth-child(2) {
font-size: 24rpx;
color: #777777;
margin-left: 20rpx;
text-decoration: line-through;
}
.btn{
.btn {
width: 142rpx;
height: 60rpx;
background: rgba(21, 113, 110, 0.05);

38
pages/store/cart/cart.vue

@ -4,7 +4,7 @@
<view style="height: 1rpx;"></view>
<view>
<view v-for="(s_item, s_index) in list" :key="s_index" class="online-card">
<view class="lf-m-b-20" @click="$url('/pages/shop/shopdetail')">
<view class="lf-m-b-20" @click="$url('/pages/shop/shopdetail?id='+ s_item.id)">
<text class="lf-iconfont icon-Group- lf-font-28"></text>
<text class="lf-color-black lf-font-28 lf-font-bold lf-m-l-10">{{ s_item.name }}</text>
<text class="lf-iconfont icon-xiangyou lf-font-24 lf-m-l-10"></text>
@ -18,7 +18,7 @@
</view>
<!-- 单个商品信息增加滑动删除 -->
<view v-for="(g_item, g_index) in s_item.goods" :key="g_index">
<lf-swipe-action :options="options" :index="g_index" :show="show" @button="onButton($event, s_index)">
<lf-swipe-action :options="options" :index="g_index" :show="show" @button="onButton($event, s_index, g_index)">
<view class="lf-row-between">
<u-checkbox-group>
<u-checkbox shape="circle" active-color="#15716E" @change="goodsCheckChange($event, s_index, g_index)" v-model="g_item.checked"></u-checkbox>
@ -28,7 +28,7 @@
<view class="lf-m-l-15 content-info">
<view class="lf-color-333 lf-font-26 lf-line-2" style="max-width: 480rpx;">{{g_item.name}}</view>
<view class="lf-font-24 lf-color-777 lf-m-t-14 lf-row-between">
<view>{{g_item.qty}};{{g_item.color}};{{g_item.size}}</view>
<view>{{g_item.qty ? g_item.qty+'件;' : ''}}{{g_item.color ? g_item.color+';' : ''}}{{g_item.size ? g_item.size : ''}}</view>
<view class="lf-font-32 lf-color-price">{{ g_item.price }}</view>
</view>
</view>
@ -128,7 +128,8 @@
list.push({
name: data[i].name,
full_minus: '',
goods: goods
goods: goods,
id: data[i].id
})
}
this.list = list;
@ -183,14 +184,37 @@
}
},
//
onButton(event, parentIndex){
console.log("event", event, parentIndex);
onButton(event, parentIndex, childIndex){
if(event.buttonIndex == 0){
let __raw_id = this.list[parentIndex].goods[childIndex].__raw_id;
uni.showModal({
title: '温馨提示',
content: '确定移除该商品吗?',
success: result => {
if(result.confirm){
uni.showLoading({
title: '正在删除'
})
this.$http.ajax({
api: 'api/shopping/cart/'+ __raw_id,
method: 'DELETE',
header: {
Authorization: this.token
}
}).then(res => {
if(res.data.code == 200){
this.$msg('删除成功', {icon: 'success'}).then(() => {
this.list[parentIndex].goods.splice(childIndex, 1);
if(this.list[parentIndex].goods.length <= 0){
this.list.splice(parentIndex, 1);
}
})
}else{
this.$msg('删除失败', {icon: 'error'});
}
uni.hideLoading();
}).catch(err => uni.hideLoading())
}
}
})
}

2
pages/user/member/code.vue

@ -199,7 +199,7 @@
this.$http.get({
api: 'api/offline/get_pay',
data: {
refresh: this.first_http <= 1 ? 1 : 0
cancel: this.first_http <= 1 ? 1 : 0
},
header: {
Authorization: this.token

25
pages/user/my/center.vue

@ -37,7 +37,7 @@
</view>
</view>
<view class="center-card">
<view class="center-card" v-if="$isRight(centerInfo.userLevel)">
<view class="lf-p-30 lf-row-between lf-w-100" @click="$url('/pages/user/member/service')">
<view class="lf-flex-column">
<view class="lf-font-bold" style="color: #15716E;">
@ -107,13 +107,18 @@
},
data(){
return {
// {
// name: '线',
// icon: 'icon-pinglun',
// path: '/pages/user/my/chatonline'
// },
nav_bg_color: 'transparent' ,//
order_tablist: [{
name: '待付款',
icon: 'icon-daifukuan'
},{
name: '待发货',
icon: 'icon-daifahuo'
icon: 'icon-31daifahuo'
},{
name: '待收货',
icon: 'icon-daishouhuo'
@ -123,31 +128,27 @@
}],
my_service_list: [{
name: '会员服务',
icon: 'icon-huiyuan1',
icon: 'icon-huiyuan4',
path: '/pages/user/member/service'
},{
name: '在线客服',
icon: 'icon-pinglun',
path: '/pages/user/my/chatonline'
},{
name: '我的收藏',
icon: 'icon-shoucang',
icon: 'icon-Star',
path: '/pages/user/my/collect'
},{
name: '地址管理',
icon: 'icon-dizhi',
icon: 'icon-Location',
path: '/pages/address/list/list'
},{
name: '活动报名',
icon: 'icon-fabujilu',
icon: 'icon-Bookmark',
path: '/pages/user/my/myEventRegistrationList'
},{
name: '积分商城订单',
icon: 'icon-jifen',
icon: 'icon-zhuanjifen',
path: '/pages/point/exchangeRecord/exchangeRecord'
},{
name: '商家中心',
icon: 'icon-Group-',
icon: 'icon-dianshangjiashangcheng-xianxing',
path: '/pages/business/center/center'
}],
userInfo: {mobile_replace: '正在获取'}, //

2
pages/user/my/myEventRegistrationList.vue

@ -17,7 +17,7 @@
<view class="label" :class="'theme-'+ (index+1)" v-if="item.activity.is_expired==false">{{item.state}}</view>
</view>
<view class="info">
<view class="title">{{item.name}}</view>
<view class="title">{{item.activity.name}}</view>
<view class="date">{{item.created_at}}</view>
</view>
</view>

14
pages/user/my/myregister.vue

@ -28,7 +28,7 @@
<text class="lf-font-28 lf-color-black lf-m-l-10" v-if="activity_details.activity.price == 0">免费</text>
<text class="lf-font-28 lf-color-black lf-m-l-10" v-else>{{activity_details.activity.price}}</text>
</view>
<view style="margin-top: 60rpx;display: flex;justify-content: center;">
<view style="margin-top: 60rpx;display: flex;justify-content: center;" v-if="$isRight(activity_details)">
<view class="lf-flex-column">
<lf-qrcode :options="config.qrc"></lf-qrcode>
<view class="lf-font-28 lf-row-center" style="color: #15716E;">{{activity_details.state}}</view>
@ -65,7 +65,7 @@
height: 210 //
},
qrc: {
code: "https://weixin.qq.com/g/AwYAAHO3aO4zlasEij6bLsk4hlZd5XNFkkBmqyS55mLPFxmn5c9PaI1omqLhd24fABCD23333",
code: "",
size: 352, //
level: 4, // 04
bgColor: '#FFFFFF', //
@ -103,6 +103,14 @@
if (res.data.code == 200) {
if (res.data.status) {
this.activity_details = res.data.data;
this.config.qrc.code = JSON.stringify({
u_id: this.activity_details.user_id,
a_id: this.activity_details.activity_id
})
console.log('活动详情',this.activity_details);
} else {
wx.showModal({
@ -164,7 +172,7 @@
align-items: flex-end;
box-sizing: border-box;
padding: 60rpx 32rpx 110rpx;
color: #FFFFFF;
color: #222222 !important;
display: flex;
align-items: center;
justify-content: center;

16
pages/user/my/vipinfo.vue

@ -14,7 +14,7 @@
</view>
</view>
</view>
<view class="lf-p-l-32 lf-p-r-32">
<!-- <view class="lf-p-l-32 lf-p-r-32">
<view class="set-tag lf-border-bottom">
<view class="lf-font-28 lf-color-black">
国籍
@ -23,7 +23,7 @@
<input type="text" class="edit-input" v-model="info.native_place" placeholder="请输入你的国籍" />
</view>
</view>
</view>
</view> -->
<view class="lf-p-l-32 lf-p-r-32">
<view class="set-tag lf-border-bottom">
<view class="lf-font-28 lf-color-black">
@ -74,7 +74,7 @@
</view>
</view>
</view>
<view class="lf-p-l-32 lf-p-r-32">
<!-- <view class="lf-p-l-32 lf-p-r-32">
<view class="set-tag lf-border-bottom">
<view class="lf-font-28 lf-color-black">
家庭地址
@ -83,8 +83,8 @@
<input type="text" class="edit-input" v-model="info.home_address" placeholder="请输入您的家庭地址" />
</view>
</view>
</view>
<view class="lf-p-l-32 lf-p-r-32">
</view> -->
<!-- <view class="lf-p-l-32 lf-p-r-32">
<view class="set-tag lf-border-bottom">
<view class="lf-font-28 lf-color-black">
学历
@ -93,7 +93,7 @@
<input type="text" class="edit-input" v-model="info.education" placeholder="请输入您的学历" />
</view>
</view>
</view>
</view> -->
<view class="lf-font-26 lf-color-999 lf-p-30 lf-row-center">
温馨提示身份证号出生日期不支持线上修改如需修改请前往服务台办理
@ -140,14 +140,14 @@
info.name = detail.name;
info.sex = detail.sex;
info.birthday = detail.birthday;
info.native_place = detail.country;
// info.native_place = detail.country;
if(detail.province && detail.city && detail.area){
let address = [detail.province, detail.city, detail.area];
info.address = address;
}
info.address_detail = detail.postal_address;
info.home_address = detail.home_address;
// info.home_address = detail.home_address;
// todo ... id_number

Loading…
Cancel
Save