作者 lihongjuan

1

... ... @@ -89,11 +89,9 @@
let temdata = JSON.parse(res.data);
console.log(temdata)
let urlobj = {
url: temdata.data.url
}
resolve(urlobj);
},
fail: function (res) {
reject('网络出错');
... ...
... ... @@ -68,7 +68,7 @@
</view>
<view class="homename">秒杀专区</view>
</view>
<view class="homeboxitem flexfour">
<view class="homeboxitem flexfour" @click="hotline">
<view class="homeitemimg">
<image src="../../static/hotline.png" mode=""></image>
</view>
... ... @@ -141,9 +141,9 @@
<view class="jiimg">
<image src="../../static/ji.png" mode=""></image>
<view class="jitext">
<view class="jiname">+5积分</view>
<view class="jiname">+{{qiandaoinfo.score}}积分</view>
<view class="qian">每日签到</view>
<view class="lianxu lianqianday">连续签到22天</view>
<view class="lianxu lianqianday">{{qiandaoinfo.title}}</view>
<view class="lianxu">明天签到可获得10积分</view>
</view>
<view class="chahao" @click="hidejifen">
... ... @@ -152,9 +152,9 @@
</view>
</view>
</view>
<!-- @click="tabClick" -->
<tabBar :current="currentTabIndex" backgroundColor="#fbfbfb" color="#999" tintColor="#42b983" ></tabBar>
<tabBar :current="currentTabIndex" backgroundColor="#fbfbfb" color="#999" tintColor="#42b983"></tabBar>
<!-- 底部导航 -->
<!-- <view class="teacherfooter">
<view class="teacherfootitem" @click="selnav" :data-id="1">
... ... @@ -189,9 +189,9 @@
import app from "../../App.vue";
import tabBar from '../../components/tabvue/tabvue.vue'
export default {
components:{
tabBar
},
components: {
tabBar
},
data() {
return {
showbanben: false,
... ... @@ -201,62 +201,71 @@
order: '',
page: 1,
shoplist: [],
carttotal:0,
provincename:'',
currentTabIndex:0
carttotal: 0,
provincename: '',
currentTabIndex: 0,
datamianfang:false,
qiandaoinfo:''
}
},
onLoad() {
this.getfoodlist();
// uni.setStorageSync("token","")
this.getfoodlist();
// uni.setStorageSync("token","")
},
methods: {
// tabClick(index){
// this.currentTabIndex=index;
// console.log('我是homepage',this.currentTabIndex)
// },
// 拨打电话
hotline() {
uni.makePhoneCall({
phoneNumber: '114' //仅为示例
});
},
// 获取签到信息
getqiandaoinfo(){
getqiandaoinfo() {
let that = this;
var url = 'sign/index';
var params = {
}
console.log(params)
app.post(url, params).then((res) => {
console.log(res);
console.log('获取签到信息',res);
that.qiandaoinfo=res.data.data
}).catch((err) => {
})
},
// 签到
qiandao(){
qiandao() {
let that = this;
var url = 'sign/sign';
var params = {
}
console.log(params)
app.post(url, params).then((res) => {
console.log(res);
}).catch((err) => {
})
},
getlocation() {
let that=this;
let that = this;
uni.getLocation({
type: 'wgs84',
success: function(res) {
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
uni.setStorageSync("longitude",res.longitude);
uni.setStorageSync("latitude",res.latitude)
uni.setStorageSync("longitude", res.longitude);
uni.setStorageSync("latitude", res.latitude)
var point = new plus.maps.Point(res.longitude, res.latitude);
plus.maps.Map.reverseGeocode(
point, {},
... ... @@ -268,26 +277,26 @@
console.log(address, 'address');
var reg = /.+?(省|市|自治区|自治州|县|区)/g;
console.log(address.match(reg));
var addressname=address.match(reg);
var addressname = address.match(reg);
console.log(addressname);
if(uni.getStorageSync("provincename")==''){
that.provincename=addressname[0];
uni.setStorageSync("provincename",that.provincename)
}else{
that.provincename=uni.getStorageSync("provincename")
if (uni.getStorageSync("provincename") == '') {
that.provincename = addressname[0];
uni.setStorageSync("provincename", that.provincename)
} else {
that.provincename = uni.getStorageSync("provincename")
}
console.log(that.provincename);
that.changeinfo()
// that.getprovinceid()
// _this.addressList = address.match(reg).toString().split(",");
// _this.address = _this.addressList[1];
// console.log(_this.addressList[0]);
// console.log(_this.addressList[1]);
// console.log(_this.addressList[2]);
},
function(e) {}
);
... ... @@ -295,49 +304,49 @@
});
},
// 修改个人信息
changeinfo(){
changeinfo() {
let that = this;
var url = 'member/update_user';
var params = {
longitude:uni.getStorageSync("longitude"),
latitude:uni.getStorageSync("latitude")
longitude: uni.getStorageSync("longitude"),
latitude: uni.getStorageSync("latitude")
}
console.log(params)
app.post(url, params).then((res) => {
console.log(res);
this.carttotal=res.data.data.total
this.carttotal = res.data.data.total
}).catch((err) => {
})
},
// 获取购物车气泡
getcartnum(){
getcartnum() {
let that = this;
var url = 'car/bubble';
var params = {
}
app.post(url, params).then((res) => {
console.log(res);
this.carttotal=res.data.data.total
this.carttotal = res.data.data.total
}).catch((err) => {
})
},
// 店铺收藏
collectshop(){
let token=uni.getStorageSync("token");
if(token==''){
collectshop() {
let token = uni.getStorageSync("token");
if (token == '') {
uni.navigateTo({
url:'/pages/login/loginindex'
url: '/pages/login/loginindex'
})
}else{
} else {
uni.navigateTo({
url:"/pages/homepage/collectshop"
url: "/pages/homepage/collectshop"
})
}
},
// 抽奖专区
choujiang() {
... ... @@ -346,37 +355,37 @@
})
},
// 购物车列表
cartlist(){
let token=uni.getStorageSync("token");
if(token==''){
cartlist() {
let token = uni.getStorageSync("token");
if (token == '') {
uni.redirectTo({
url:'/pages/login/loginindex?type=1'
url: '/pages/login/loginindex?type=1'
})
}else{
} else {
uni.navigateTo({
url:'/pages/nearshop/cartlist'
url: '/pages/nearshop/cartlist'
})
}
},
// 会员卡
huiyuanka(){
let token=uni.getStorageSync("token");
if(token==''){
huiyuanka() {
let token = uni.getStorageSync("token");
if (token == '') {
uni.navigateTo({
url:"/pages/login/loginindex"
url: "/pages/login/loginindex"
})
}else{
} else {
uni.navigateTo({
url:'/pages/usercenter/usercenter'
url: '/pages/usercenter/usercenter'
})
}
},
// 覆盖城市
gocityfugai(){
gocityfugai() {
uni.navigateTo({
url:'/pages/homepage/map'
url: '/pages/homepage/map'
})
},
// 获取面访商品列表
... ... @@ -390,9 +399,11 @@
pageNum: 6
}
app.post(url, params).then((res) => {
console.log(res);
that.shoplist = res.data.data
console.log('面坊列表', res);
that.shoplist = that.shoplist.concat(res.data.data)
if (res.data.data.length == 0) {
that.datamianfang=true
}
}).catch((err) => {
})
... ... @@ -466,16 +477,35 @@
}
},
},
onShow(){
onShow() {
uni.hideTabBar({
})
// this.page = 1;
// this.shoplist=[];
this.getlocation();
this.getqiandaoinfo();
let token=uni.getStorageSync("token");
if(token!=''){
let token = uni.getStorageSync("token");
if (token != '') {
this.getcartnum()
}
},
onReachBottom() {
if(this.datamianfang==true){
uni.showToast({
title:'没有更多了~',
icon:"none"
})
}else{
let newpage = this.page;
newpage++;
this.page = newpage;
this.getfoodlist()
}
}
}
... ... @@ -483,19 +513,22 @@
<style>
@import url('../../base/homepage');
.middleenter{
color:#BDC4CE;
.middleenter {
color: #BDC4CE;
font-size: 24rpx;
height:60rpx;
height: 60rpx;
line-height: 60rpx;
}
.content {
padding-top: calc(var(--status-bar-height) + 88rpx);
}
.status_bar {
background: ;
}
.lianxu {
color: #3D444C;
font-size: 28rpx;
... ... @@ -551,7 +584,7 @@
}
.listbox {
margin-bottom: 150rpx;
margin-bottom: 20rpx;
}
... ...
<template>
<view class="content">
<view class="goodtailtop">
<image :src="goodtail.image" mode=""></image>
</view>
... ... @@ -354,6 +355,34 @@
this.getcommentlist();
}
},
// 获取评论列表
getcommentlist() {
let that = this;
var url = 'goods_comments/get_list';
var params = {
type: that.type,
goods_id: that.goodid,
star_type: that.star_type,
page: that.page,
pageNum: 10
}
console.log('33478478',params)
app.post(url, params).then((res) => {
console.log('获取评论列表',res);
that.commentlist = that.commentlist.concat(res.data.data.list);
// that.total=res.data.data.total;
// that.total1=res.data.data.total1;
// that.total2=res.data.data.total2
// that.total3=res.data.data.total3
}).catch((err) => {
console.log(err)
})
},
// 数量加减
reducenum() {
this.cartnumber = this.cartnumber - 1;
... ... @@ -374,30 +403,7 @@
this.cartnumber = this.cartnumber
},
// 获取评论列表
getcommentlist() {
let that = this;
var url = 'goods_comments/get_list';
var params = {
type: '',
goods_id: that.goodid,
star_type: that.star_type,
page: that.page,
pageNum: 10
}
app.post(url, params).then((res) => {
console.log(res);
that.commentlist = that.commentlist.concat(res.data.data.list);
that.total=res.data.data.total;
that.total1=res.data.data.total1;
that.total2=res.data.data.total2
that.total3=res.data.data.total3
}).catch((err) => {
})
},
//获取面坊商品详情
getgoodtail() {
let that = this;
... ... @@ -888,7 +894,10 @@
width:200rpx;
display:block;
position: absolute;
left:-20rpx;
left:0rpx;
top:0;
text-align: left;
padding-left: 10rpx;
box-sizing: border-box;
}
</style>
... ...
<template>
<view class="page">
<view class="boxb">
<view class="nodata" v-if="couponlist.length==0">暂无优惠券</view>
<view class="boxb" v-else>
<view class="container">
<view class="bitem flexone" @click="item.status!=1?'':selcoupon(item,index)" :class="item.status!=1?'borderactive':''" v-for="(item,index) in couponlist" :key="index">
<view class="couponleft" v-if="item.status!=1">
... ...
... ... @@ -37,23 +37,24 @@
</view>
<view class="orderBox">
<view class="orderItem" @click.stop="fahuo" :data-id="1">
<image src="../../static/order_a.png" mode="widthFix"></image>
<image src="../../static/order_a.png" class="orderimg"></image>
<view>待付款</view>
</view>
<view class="orderItem" @click.stop="fahuo" :data-id="2">
<image src="../../static/order_b.png" mode="widthFix"></image>
<image src="../../static/order_b.png" ></image>
<view>待发货</view>
</view>
<view class="orderItem" @click.stop="fahuo" :data-id="3">
<image src="../../static/order_c.png" mode="widthFix"></image>
<image src="../../static/order_c.png" ></image>
<view>待收货</view>
</view>
<view class="orderItem" @click.stop="fahuo" :data-id="4">
<image src="../../static/order_d.png" mode="widthFix"></image>
<image src="../../static/order_d.png" ></image>
<view>待评价</view>
</view>
<view class="orderItem" @click.stop="fahuo" :data-id="0">
<image src="../../static/order_e.png" mode="widthFix"></image>
<image src="../../static/order_e.png" class="dingorder"></image>
<view>全部订单</view>
</view>
</view>
... ... @@ -80,6 +81,7 @@
<view class="citem" @click.stop="jump" data-id="7">
<view class="left">
<image src="../../static/fenxiao.png" mode="widthFix" />
我的分销
</view>
<view class="right">
... ... @@ -350,7 +352,15 @@
page {
background-color: #F9F9F9;
}
.orderItem image{
width:42rpx!important;
height:38rpx;
}
.orderItem .dingorder{
width:38rpx!important;
}
.header {
background: #fff;
padding: 0 32rpx;
... ... @@ -472,7 +482,9 @@
.orderItem {
display: flex;
flex-wrap: wrap;
flex-direction: column;
justify-content: center;
align-items: center;
min-width: 84rpx;
}
... ...

361 字节 | 宽: | 高:

879 字节 | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

622 字节 | 宽: | 高:

1.3 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

381 字节 | 宽: | 高:

1.1 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

324 字节 | 宽: | 高:

729 字节 | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

296 字节 | 宽: | 高:

619 字节 | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

501 字节 | 宽: | 高:

1.2 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

483 字节 | 宽: | 高:

874 字节 | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

425 字节 | 宽: | 高:

957 字节 | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

642 字节 | 宽: | 高:

1.2 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

214 字节 | 宽: | 高:

569 字节 | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

534 字节 | 宽: | 高:

929 字节 | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

361 字节 | 宽: | 高:

879 字节 | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

622 字节 | 宽: | 高:

1.3 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

381 字节 | 宽: | 高:

1.1 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

324 字节 | 宽: | 高:

729 字节 | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

296 字节 | 宽: | 高:

619 字节 | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

501 字节 | 宽: | 高:

1.2 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

483 字节 | 宽: | 高:

874 字节 | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

425 字节 | 宽: | 高:

957 字节 | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

642 字节 | 宽: | 高:

1.2 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

214 字节 | 宽: | 高:

569 字节 | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖

534 字节 | 宽: | 高:

929 字节 | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖