Browse Source

调轮播图,常见问题,关于我们页面接口

home_hotList
ld0104 2 years ago
parent
commit
bb1d32a20c
  1. 2
      api/public.js
  2. 27
      api/store.js
  3. 26
      api/user.js
  4. 22
      pages/activity/activity/index.vue
  5. 1867
      pages/home/index.vue
  6. 26
      pages/shop/Evaluations/EvaluationDetail/index.vue
  7. 738
      pages/shop/GoodsCollection/index.vue
  8. 24
      pages/shop/brands/index.vue
  9. 21
      pages/user/AboutUs/index.vue
  10. 3
      pages/user/PersonalData/index.vue
  11. 84
      pages/user/Problem/index.vue
  12. 22
      pages/user/coupon/GetCoupon/index.vue
  13. 1
      pages/user/signIn/Sign/index.vue

2
api/public.js

@ -17,6 +17,8 @@ export function getCanvas() {
return request.get("/getCanvas?terminal=3", {}, { login: false });
}
/**
* 热门榜单
* @returns {*}

27
api/store.js

@ -1,4 +1,13 @@
import request from "@/utils/request";
/**
* 获取各类轮播图
*
*/
export function getBanner(type) {
return request.get("/menu/banner/"+type,{}, { login: false });
}
/*
* 商品分类
@ -209,15 +218,15 @@ export function getBrands() {
login: false
});
}
/**
* 添加收藏
*
*/
export function getUserCollection(data) {
console.log(9999999966);
return request.post("/collectEvaluation/add", data, {
login: true
});
/**
* 添加收藏
*
*/
export function getUserCollection(data) {
console.log(9999999966);
return request.post("/collectEvaluation/add", data, {
login: true
});
}
/**
*

26
api/user.js

@ -1,4 +1,5 @@
import request from '@/utils/request'
import { dataFormat } from '../utils'
/**
* 省市区
@ -195,6 +196,17 @@ export function getCollectUser(page, limit, type) {
type,
})
}
/**
*
* 获取评测收藏
*/
export function getCollectEvaluation(page, limit, type) {
return request.get('/collectEvaluation/user', {
page: page,
limit: limit,
type,
})
}
/*
* 删除收藏产品
@ -442,3 +454,17 @@ export function setDetection() {
export function getRechargeApi() {
return request.get('recharge/index')
}
/**
* 常见问题
*/
export function getProblem() {
return request.get('/menu/problem',{})
}
/**
* 关于我们
*/
export function getAboutUs() {
return request.get('/menu/aboutUs',{})
}

22
pages/activity/activity/index.vue

@ -15,7 +15,7 @@
<view class="banner-box">
<swiper class="swiper" circular @change="swiperChange" :autoplay="true">
<swiper-item v-for="(item, index) in banner" :key="index" class="swiper-item">
<swiper-item v-for="(item, index) in banner" :key="index" class="swiper-item" @click="goBannerDetail">
<image class="swiper-image " :src="item" mode="aspectFill" lazy-load>
</image>
</swiper-item>
@ -88,6 +88,7 @@
</template>
<script>
import { getBanner} from '@/api/store';
import { getSeckillConfig, getSeckillList, getCombinationList, getBargainList } from '@/api/activity';
import CountDown from '@/components/CountDown';
export default {
@ -96,10 +97,7 @@
},
data() {
return {
banner: [
'http://video-zsw.qiniu.lotus-wallet.com/Banner1.png',
'http://video-zsw.qiniu.lotus-wallet.com/Banner1.png'
],
banner: [],
swiperCurrent: 0,
activityType: 0,
tabType: 0,
@ -132,8 +130,22 @@
this.seckillInfo();
this.getGrouponList();
this.getBargainList();
},
onLoad() {
getBanner(3).then(
res => {
console.log(res,777777777777777777);
// this.$set(this,'banner',res.data.banner)
})
},
methods: {
goBannerDetail(item){
if (item.uniapp_url) {
this.$yrouter.push(item.uniapp_url)
}
},
swiperChange(e) {
this.swiperCurrent = e.detail.current;
},

1867
pages/home/index.vue

File diff suppressed because it is too large Load Diff

26
pages/shop/Evaluations/EvaluationDetail/index.vue

@ -135,7 +135,6 @@
onLoad() {
this.id = this._route.query.id
this.getInfo(this.id);
this.getEvaluation(this.id)
},
onShareAppMessage() {
return {
@ -156,21 +155,31 @@
// this.isCollection=!this.isCollection
// console.log('++++++++');
// })
// },
//
// setCollect: function() {
// let that = this,
// id = that.storeInfo.id,
// category = 'collect'
// if (that.storeInfo.userCollect) {
// getCollectDel(id, category).then(function() {
// that.storeInfo.userCollect = !that.storeInfo.userCollect
// })
// } else {
// getCollectAdd(id, category).then(function() {
// that.storeInfo.userCollect = !that.storeInfo.userCollect
// })
// }
// },
//
getEvaluation(id){
// collectEvaluation/add
},
//
getCollection(){
var param={}
param.id=this.id
param.category= ""
param.category= "collect"
getUserCollection(param).then(res=>{
console.log(res,'==========11');
})
@ -437,6 +446,7 @@
height: 80rpx;
padding: 0;
background-color: #F1F1F1;
width: 100rpx;
}
.contacButton::after {
border: 0;

738
pages/shop/GoodsCollection/index.vue

@ -1,158 +1,206 @@
<template>
<view ref="container">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">我的收藏</view>
</block>
</cu-custom>
</view>
<view class="content-box" :style="'height:calc(100vh - '+CustomBar+'px);'">
<view class="content">
<view class="nav acea-row row-around" :style="'top:calc('+CustomBar+'px+2px)'">
<view class="item" @click="changeType(0)">
<view :class="'title ' + (navType == 0? 'active' : '')">甄选商品</view>
</view>
<view class="item" @click="changeType(1)">
<view :class="'title ' + (navType === 1 ? 'active' : '')">甄选评测</view>
</view>
</view>
<view class="collectionGoods" v-if="collectProductList.length > 0">
<view class="item" v-for="(item, collectProductListIndex) in collectProductList" :key="collectProductListIndex" :data-index="collectProductListIndex" @touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:' + item.right + 'rpx'">
<view class="info-box acea-row row-between-wrapper" @click="goGoodsCon(item)">
<view class="pictrue">
<image :src="item.image" />
</view>
<view class="text">
<view class="infor line1">{{ item.storeName }}</view>
<view class="acea-row sku-box">
<view class="sku" v-if="item.productInfo.attrInfo">{{ item.productInfo.attrInfo.sku }}</view>
</view>
<view class="money" v-if="isIntegral == 1">{{ item.costPrice }}积分</view>
<view class="money" v-else>{{ item.price }}</view>
</view>
</view>
<view class="delete" @tap.stop="delCollection(collectProductListIndex)" :style="item.right?'right: -122rpx;':''">删除</view>
</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
</view>
</view>
<!-- <view class="noCommodity" style="background-color:#fff;" v-if="collectProductList.length < 1 && page > 1">
<view class="noPictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/noCollection.png`" class="image" />
</view>
<Recommend></Recommend>
</view> -->
</view>
</template>
<script>
import Recommend from '@/components/Recommend'
import { getCollectUser, getCollectDel } from '@/api/user'
import Loading from '@/components/Loading'
export default {
name: 'GoodsCollection',
components: {
Recommend,
Loading,
},
props: {},
data: function() {
return {
CustomBar: this.CustomBar,
navType: 0,
page: 1,
limit: 20,
type: 'collect',
collectProductList: [],
loadTitle: '',
loading: false,
loadend: false,
delBtnWidth: 154,
startX : 0
}
},
mounted: function() {
this.get_user_collect_product()
},
onReachBottom() {
!this.loading && this.get_user_collect_product()
},
methods: {
changeType(i) {
if(this.navType == i) return;
this.navType = i;
},
drawStart(e) {
var touch = e.touches[0];
// let index = e.currentTarget.dataset.index;
for (var index in this.collectProductList) {
this.collectProductList[index].right = 0;
}
this.startX = touch.clientX;
// console.log(this.startX, "drawStart", index)
},
drawMove(e) {
let touch = e.touches[0];
// console.log(touch, "drawMove")
let index = e.currentTarget.dataset.index;
let item = this.collectProductList[index];
let disX = this.startX - touch.clientX;
// console.log(index, "drawMove")
if (disX >= 20) {
if (disX > this.delBtnWidth) {
disX = this.delBtnWidth;
}
this.collectProductList[index].right = disX;
} else {
this.collectProductList[index].right = 0;
}
},
drawEnd(e) {
let index = e.currentTarget.dataset.index;
let item = this.collectProductList[index];
console.log(item.right, "drawEnd", index);
if (item.right >= 80) {
this.collectProductList[index].right = this.delBtnWidth;
} else {
this.collectProductList[index].right = 0;
}
console.log(this.collectProductList, "drawEnd", index);
},
goGoodsCon(item) {
if (item.isIntegral == 1) {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: { id: item.pid },
})
} else {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: { id: item.pid },
})
}
<template>
<view ref="container">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">我的收藏</view>
</block>
</cu-custom>
</view>
<view class="content-box" :style="'height:calc(100vh - '+CustomBar+'px);'">
<view class="content">
<view class="nav acea-row row-around" :style="'top:calc('+CustomBar+'px+2px)'">
<view class="item" @click="changeType(0)">
<view :class="'title ' + (navType == 0? 'active' : '')">甄选商品</view>
</view>
<view class="item" @click="changeType(1)">
<view :class="'title ' + (navType === 1 ? 'active' : '')">甄选评测</view>
</view>
</view>
<view class="collectionGoods" v-if="collectProductList.length > 0">
<view class="item" v-for="(item, collectProductListIndex) in collectProductList" :key="collectProductListIndex" :data-index="collectProductListIndex" @touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:' + item.right + 'rpx'">
<view v-if="navType==0" class="info-box acea-row row-between-wrapper" @click="goGoodsCon(item)">
<view class="pictrue">
<image :src="item.image" />
</view>
<view class="text">
<view class="infor line1">{{ item.storeName }}</view>
<view class="acea-row sku-box">
<view class="sku" v-if="item.productInfo.attrInfo">{{ item.productInfo.attrInfo.sku }}</view>
</view>
<view class="money" v-if="isIntegral == 1">{{ item.costPrice }}积分</view>
<view class="money" v-else>{{ item.price }}</view>
</view>
</view>
<!-- 评测 -->
<view v-else class="review-box acea-row row-between" @click="goEvaluation(item)">
<view class="left acea-row row-column-between">
<view class="acea-row row-column-between">
<view class="title">
BEJjjjjSII
</view>
<view class="title1">
OISJFSJIJ
</view>
<view class="title2">
给你电话和
</view>
</view>
<view @tap.stop="goMore" class="more">
MORE
</view>
</view>
<view class="right">
<image src="../../../static/images/earth-white.png" mode=""></image>
</view>
</view>
<view class="delete" @tap.stop="delCollection(collectProductListIndex)" :style="item.right?'right: -122rpx;':''" :class="{'del-height':navType==1}">删除</view>
</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
</view>
</view>
<!-- <view class="noCommodity" style="background-color:#fff;" v-if="collectProductList.length < 1 && page > 1">
<view class="noPictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/noCollection.png`" class="image" />
</view>
<Recommend></Recommend>
</view> -->
</view>
</template>
<script>
import Recommend from '@/components/Recommend'
import { getCollectUser, getCollectDel } from '@/api/user'
import {delUserCollection} from '@/api/store.js'
import Loading from '@/components/Loading'
export default {
name: 'GoodsCollection',
components: {
Recommend,
Loading,
},
props: {},
data: function() {
return {
CustomBar: this.CustomBar,
navType: 0,
page: 1,
limit: 20,
type: 'collect',
collectProductList: [],
loadTitle: '',
loading: false,
loadend: false,
delBtnWidth: 154,
startX : 0
}
},
mounted: function() {
this.get_user_collect_product(this.navType)
},
onReachBottom() {
!this.loading && this.get_user_collect_product(this.navType)
},
methods: {
changeType(i) {
if(this.navType == i) return;
this.navType = i;
},
drawStart(e) {
console.log(155555);
var touch = e.touches[0];
// let index = e.currentTarget.dataset.index;
for (var index in this.collectProductList) {
this.collectProductList[index].right = 0;
}
this.startX = touch.clientX;
// console.log(this.startX, "drawStart", index)
},
drawMove(e) {
let touch = e.touches[0];
// console.log(touch, "drawMove")
let index = e.currentTarget.dataset.index;
let item = this.collectProductList[index];
let disX = this.startX - touch.clientX;
// console.log(index, "drawMove")
if (disX >= 20) {
if (disX > this.delBtnWidth) {
disX = this.delBtnWidth;
}
this.collectProductList[index].right = disX;
} else {
this.collectProductList[index].right = 0;
}
},
drawEnd(e) {
let index = e.currentTarget.dataset.index;
let item = this.collectProductList[index];
console.log(item.right, "drawEnd", index);
if (item.right >= 80) {
this.collectProductList[index].right = this.delBtnWidth;
} else {
this.collectProductList[index].right = 0;
}
console.log(this.collectProductList, "drawEnd", index);
},
goGoodsCon(item) {
if (item.isIntegral == 1) {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: { id: item.pid },
})
} else {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: { id: item.pid },
})
}
},
get_user_collect_product: function() {
goEvaluation(item){
this.$yrouter.push({
//
path: 'pages/shop/Evaluations/EvaluationDetail/index',
query: { id: item.pid },
})
},
goMore(){
this.$yrouter.push({
//
path: 'pages/shop/Evaluations/index',
})
},
get_user_collect_product: function(navType,clear) {
let that = this
if (that.loading) return //false
if (that.loadend) return //false
// if(clear){
// that.collectProductList=[]
// that.page=1
// that.limit=20
// }
if (that.loading) return //false
if (that.loadend) return //false
that.loading = true
getCollectUser(that.page, that.limit, that.type).then(res => {
if(navType===0){
getCollectUser(that.page, that.limit, that.type).then(res => {
that.loading = false
//apply();js;
var arr = [];
@ -167,142 +215,254 @@ export default {
that.loadend = res.data.length < that.limit //
that.page = that.page + 1
})
}else{
// collectEvaluation/user
getCollectEvaluation(that.page, that.limit, that.type).then(res => {
that.loading = false
//apply();js;
var arr = [];
for(var i in res.data){
res.data[i].right = 0;
arr.push(res.data[i])
};
that.collectProductList.push.apply(that.collectProductList, arr)
// this.collectProductList.forEach(val => {
// val.right = 0;
// })
that.loadend = res.data.length < that.limit //
that.page = that.page + 1
})
}
},
//
delCollection: function(index) {
let that = this,
id = that.collectProductList[index].pid,
category = that.collectProductList[index].category
if(that.navType===0){
getCollectDel(id, category).then(function() {
uni.showToast({
title: '删除成功',
icon: 'success',
duration: 2000,
complete: () => {
that.collectProductList.splice(index, 1)
that.$set(that, 'collectProductList', that.collectProductList)
},
})
})
}else{
//
delUserCollection(id, category).then(function() {
uni.showToast({
title: '删除成功',
icon: 'success',
duration: 2000,
complete: () => {
that.collectProductList.splice(index, 1)
that.$set(that, 'collectProductList', that.collectProductList)
},
})
})
}
},
//
delCollection: function(index) {
let that = this,
id = that.collectProductList[index].pid,
category = that.collectProductList[index].category
getCollectDel(id, category).then(function() {
uni.showToast({
title: '删除成功',
icon: 'success',
duration: 2000,
complete: () => {
that.collectProductList.splice(index, 1)
that.$set(that, 'collectProductList', that.collectProductList)
},
})
})
},
},
}
</script>
<style lang="less" scoped>
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.content-box {
padding-top: 4rpx;
width: 100vw;
position: relative;
.content {
width: 100%;
height: 100%;
overflow-y: scroll;
background: #FFFFFF;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.nav {
width: 100vw;
background: #FFFFFF;
height: 92rpx;
padding: 34rpx 32rpx 16rpx;
position: fixed;
left: 0;
z-index: 5;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.item {
width: 112rpx;
text-align: center;
position: relative;
.title {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 38rpx;
}
.active {
color: #2DB5AE;
font-weight: 600;
}
.title::after {
display: block;
content: '';
width: 100%;
height: 4rpx;
background: #2DB5AE;
position: absolute;
bottom: 0;
left: 0;
opacity: 0;
transform:scaleX(0);
transition: all .2s cubic-bezier(.18,.89,.17,.88),opacity .15s ease;
}
.active::after {
opacity: 1;
transform: scaleX(1);
}
}
}
}
}
.info-box {
width: 686rpx;
height: 202rpx;
},
}
</script>
<style lang="less" scoped>
.review-box{
padding: 30rpx 30rpx 20rpx 30rpx;
width: 687rpx;
height: 250rpx;
border-radius: 16rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0,0,0,0.15);
border-radius: 16rpx;
padding: 20rpx;
.sku-box {
margin: 18rpx 0rpx;
height: 46rpx;
}
.sku {
padding: 0rpx 16rpx;
height: 46rpx;
background: #E3E3E3;
border-radius: 8rpx;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
line-height: 46rpx;
}
}
.collectionGoods .item .delete {
position: absolute;
top: 0;
right: -186rpx;
width: 154rpx;
height: 202rpx;
background: #EC3A5B;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0,0,0,0.15);
border-radius: 16rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 202rpx;
text-align: center;
text-shadow: 0rpx 10rpx 16rpx rgba(0,0,0,0.15);
}
</style>
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0,0,0,0.15);
.left{
max-width: 460rpx;
.title{
font-size: 36rpx;
font-weight: 500;
text-transform: uppercase;
}
.title1{
margin: 10rpx 0 5rpx 0;
font-size: 24rpx;
text-transform: uppercase;
}
.title2{
font-size: 28rpx;
}
.more{
font-size: 24rpx;
position: relative;
}
.more::before{
position: absolute;
border-bottom: 1rpx solid black;
bottom: -8rpx;
left: -4rpx;
content: '';
width: 100rpx;
background-color: black;
height: 1rpx;
}
.more::after{
margin-left: 10rpx;
content: '';
display: inline-block;
width: 0;
height: 0;
border-top: 10rpx solid transparent;
border-left: 10rpx solid black;
border-bottom: 10rpx solid transparent;
border-right: 10rpx solid transparent;
}
}
.right{
image{
width: 200rpx;
height: 100%;
}
}
}
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.content-box {
padding-top: 4rpx;
width: 100vw;
position: relative;
.content {
width: 100%;
height: 100%;
overflow-y: scroll;
background: #FFFFFF;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.nav {
width: 100vw;
background: #FFFFFF;
height: 92rpx;
padding: 34rpx 32rpx 16rpx;
position: fixed;
left: 0;
z-index: 5;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.item {
width: 112rpx;
text-align: center;
position: relative;
.title {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 38rpx;
}
.active {
color: #2DB5AE;
font-weight: 600;
}
.title::after {
display: block;
content: '';
width: 100%;
height: 4rpx;
background: #2DB5AE;
position: absolute;
bottom: 0;
left: 0;
opacity: 0;
transform:scaleX(0);
transition: all .2s cubic-bezier(.18,.89,.17,.88),opacity .15s ease;
}
.active::after {
opacity: 1;
transform: scaleX(1);
}
}
}
}
}
.info-box {
width: 686rpx;
height: 202rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0,0,0,0.15);
border-radius: 16rpx;
padding: 20rpx;
.sku-box {
margin: 18rpx 0rpx;
height: 46rpx;
}
.sku {
padding: 0rpx 16rpx;
height: 46rpx;
background: #E3E3E3;
border-radius: 8rpx;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
line-height: 46rpx;
}
}
.collectionGoods .item .delete {
position: absolute;
top: 0;
right: -186rpx;
width: 154rpx;
height: 202rpx;
background: #EC3A5B;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0,0,0,0.15);
border-radius: 16rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 202rpx;
text-align: center;
text-shadow: 0rpx 10rpx 16rpx rgba(0,0,0,0.15);
}
.del-height{
height: 250rpx !important;
line-height: 250rpx !important;
}
</style>

24
pages/shop/brands/index.vue

@ -14,11 +14,12 @@
</view>
<view class="banner-box">
<swiper class="swiper-wrapper" @change="handleChange" :autoplay="true">
<swiper class="swiper-wrapper" @change="handleChange(item)" :autoplay="true">
<block v-for="(item, imgUrlsIndex) in imgUrls" :key="imgUrlsIndex">
<swiper-item>
<view class="image">{{item}}</view>
<swiper-item @click="goBannerDetail(item)">
<!-- <view class="image">{{item}}</view> -->
<!-- <image class="image" :src="item" class="slide-image" mode="aspectFill"/> -->
<image class="image slide-image" :src="item.pic" mode="aspectFill"></image>
</swiper-item>
</block>
</swiper>
@ -35,7 +36,7 @@
</view>
<view class="min-title acea-row row-between-wrapper">
<view class="">选品标准</view>
<image src="" mode=""></image>
<image src="../../../static/images/laba.png" mode="aspectFill"></image>
</view>
<view class="uni-notice-bar-box">
<uni-notice-bar color="#2DB5AE" backgroundColor="#F1F1F1" scrollable="true" single="true" :speed="60" text="热花今将机支物极十争才线来理始"></uni-notice-bar>
@ -96,7 +97,7 @@
<script>
import UniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar'
import { getBrands, getProducts } from '@/api/store';
import { getBrands, getProducts ,getBanner} from '@/api/store';
import Loading from '@/components/Loading';
export default {
components: {
@ -106,7 +107,7 @@
data() {
return {
currents: 0,
imgUrls: 5,
imgUrls: [],
brandList: [],
where: {
page: 1,
@ -123,6 +124,11 @@
onLoad() {
this.getBrandList();
this.getNewProducts();
getBanner(1).then(
res => {
this.$set(this,'imgUrls',res.data.banner)
})
},
onReachBottom() {
!this.loading && this.getNewProducts();
@ -131,6 +137,11 @@
handleChange(e) {
this.currents = e.mp.detail.current;
},
goBannerDetail(item){
if (item.uniapp_url) {
this.$yrouter.push(item.uniapp_url)
}
},
goDetail(item) {
this.$yrouter.push({
path: '/pages/shop/brands/brandDetail/index',
@ -292,7 +303,6 @@
image {
width: 26rpx;
height: 26rpx;
background-color: #2DB5AE;
}
}
.uni-notice-bar-box {

21
pages/user/AboutUs/index.vue

@ -12,24 +12,39 @@
</block>
</cu-custom>
</view>
<view class="">
<image class="img" src="../../../static/images/guanyu.jpg" mode="widthFix"></image>
<view class="" v-html="aboutUsDetail">
<!-- <image class="img" src="../../../static/images/guanyu.jpg" mode="widthFix"></image> -->
</view>
</view>
</template>
<script>
import {getAboutUs} from '@/api/user.js';
import Tabbar from '@/components/Tabbar';
export default {
data() {
return {
aboutUsDetail:{}
};
},
mounted() {
this.getAbout()
},
methods: {
getAbout(){
uni.showLoading({
title: '加载中',
mask: true,
})
getAboutUs().then(res=>{
uni.hideLoading()
this.aboutUsDetail=res.data.routine_aboutUs.replace(/\<img/gi, '<img style="max-width:100%;height:auto;"')
console.log(res,'=======');
})
}
}
}

3
pages/user/PersonalData/index.vue

@ -115,6 +115,7 @@ export default {
this.$yrouter.push("/pages/user/ChangePassword/index");
},
switchAccounts: function (index) {
console.log(index,'1111111111111111188');
let that = this;
this.userIndex = index;
let userInfo = this.switchUserInfo[this.userIndex];
@ -181,7 +182,9 @@ export default {
},
submit: function () {
let userInfo = this.userInfo;
console.log(userInfo,'==============');
let data = {
nickname: '',
avatar: ''

84
pages/user/Problem/index.vue

@ -15,100 +15,60 @@
<view class="problem-box" v-for="(item,index) in problemList" :key="index">
<view class="problem-item acea-row row-between row-middle" @click="tapSwitch(index)">
<view class="text-box line2">
Q{{index+1}}{{item.title}}
{{item.problem}}
</view>
<image class="img" :src="`../../../static/images/picker-${number==index?'up':'down'}.png`" mode="">
</image>
</view>
<view class="problem-list" v-if="index==number">
<view class="item" v-for="(c,i) in item.chlidren" :key="i">
{{c}}
<view class="item">
{{item.answer}}
</view>
</view>
</view>
<!-- <Tabbar :pagePath="pagePath"></Tabbar> -->
</view>
</template>
<script>
import Tabbar from '@/components/Tabbar';
import {
getProblem
} from '@/api/user.js'
export default {
components: {
Tabbar,
},
data() {
return {
number: 0,
// problemList:[
// {
// title:"",
// chlidren:[
// ': ',
// '',
// ''
// ]
// },
// {
// title:"",
// chlidren:[
// '',
// '',
// ''
// ]
// },
// {
// title:"",
// chlidren:[
// '',
// '',
// ''
// ]
// }
// ],
problemList: [{
title: "可以在哪里买门票可以在哪里买门可以在哪里买门票可以在哪里买门可以在哪里买门票可以在哪里买门可以在哪里买门票可以在哪里买门",
chlidren: '方案一: 可以在哪里买门票可以在哪里买门可;方案二: 以在哪里买门票可以在哪里买门可以在哪里买门;方案三: 票可以在哪里买门可以在哪里买门票可以在哪里买门',
},
{
title: "可以在哪里买门票可以在哪里买门",
chlidren: '方案一: 可以在哪里买门票可以在哪里买门可;方案二: 以在哪里买门票可以在哪里买门可以在哪里买门;方案三: 票可以在哪里买门可以在哪里买门票可以在哪里买门',
},
{
title: "可以在哪里买门票可以在哪里买门",
chlidren: '方案一: 可以在哪里买门票可以在哪里买门可;方案二: 以在哪里买门票可以在哪里买门可以在哪里买门;方案三: 票可以在哪里买门可以在哪里买门票可以在哪里买门',
}
]
number: -1,
problemList:[]
};
},
onLoad() {
// uni.hideTabBar();
// let pages = getCurrentPages();
// this.pagePath = '/' + pages[pages.length - 1].route;
this.problemList.forEach(item => {
item.chlidren = item.chlidren.split(';')
console.log(item, '---------------');
})
console.log(this.problemList, '=============');
this.getMenu()
},
methods: {
getMenu() {
uni.showLoading({
title: '加载中',
mask: true,
})
getProblem().then(res => {
uni.hideLoading()
this.problemList=res.data.routine_problem
console.log(this.problemList, '======');
})
},
tapSwitch(index) {
if (this.number === index) {
this.number = -1
return
}
this.number = index
}
}
}

22
pages/user/coupon/GetCoupon/index.vue

@ -15,10 +15,10 @@
<view class="banner-box">
<swiper class="swiper-wrapper" @change="handleChange" :autoplay="true">
<block v-for="(item, imgUrlsIndex) in imgUrls" :key="imgUrlsIndex">
<swiper-item>
<view class="image">{{item}}</view>
<!-- <image class="image" :src="item" class="slide-image" mode="aspectFill"/> -->
<block v-for="(item, imgUrlsIndex) in imgUrls" :key="imgUrlsIndex" >
<swiper-item @click="goBannerDetail">
<!-- <view class="image">{{item}}</view> -->
<image class="image" :src="item.pic" mode="aspectFill"></image>
</swiper-item>
</block>
</swiper>
@ -114,6 +114,7 @@
</template>
<script>
import { getCoupon, getCouponReceive } from '@/api/user'
import { getBanner} from '@/api/store';
import Loading from '@/components/Loading'
import DataFormatT from '@/components/DataFormatT'
export default {
@ -131,16 +132,27 @@ export default {
couponsList: [],
loading: false,
loadend: false,
imgUrls: 5
imgUrls:[]
}
},
mounted: function() {
this.getUseCoupons()
getBanner(2).then(
res => {
this.$set(this,'imgUrls',res.data.banner)
})
},
onReachBottom() {
!this.loading && this.getUseCoupons()
},
methods: {
goBannerDetail(item){
console.log('----------------------------');
if (item.uniapp_url) {
this.$yrouter.push(item.uniapp_url)
}
},
handleChange(e) {
this.currents = e.mp.detail.current;
},

1
pages/user/signIn/Sign/index.vue

@ -433,6 +433,7 @@
uni.hideLoading();
res.data.integral = parseInt(res.data.integral);
var sumSginDay = res.data.sumSignDay;
that.userInfo = res.data;
that.signCount = String(res.data.sumSignDay);
// that.signCount = that.PrefixInteger(sumSginDay, 4);

Loading…
Cancel
Save