增加个人信息缓存

dev
zhouzhenyuan 1 year ago
parent 35e4ace778
commit 1b25c63eda
  1. 8
      api/goods/index.js
  2. 18
      api/home/index.js
  3. 13
      pages.json
  4. 2
      pages/activity/ranking.vue
  5. 2
      pages/category/index - 副本.vue
  6. 114
      pages/category/index.vue
  7. 127
      pages/goods/detail.vue
  8. 11
      pages/goods/list.vue
  9. 372
      pages/index/index.vue
  10. 275
      pages/login/components/mp-weixin-mobile.vue
  11. 29
      pages/login/index.vue
  12. 32
      pages/news1/huoyuan.vue
  13. 2
      pages/order/comment/index.vue
  14. 108
      pages/search/index.vue
  15. 372
      pages/sureOrder/index.vue
  16. 1
      pages/user/index.vue
  17. BIN
      static/home/Group 216.png
  18. BIN
      static/home/az.png
  19. BIN
      static/home/logo.png
  20. BIN
      static/home/lq.png
  21. BIN
      static/home/sm.png
  22. BIN
      static/home/yq.png
  23. BIN
      static/home/ys.png

@ -9,14 +9,18 @@ const api = {
specData: 'goods/specData',
skuInfo: 'goods/skuInfo',
recommended: 'goods/recommended',
poster: 'goods/poster'
poster: 'goods/poster',
serveList:'goods.service/list'
}
// 商品浏览记录
export const browseHistory = (param, option) => {
return request.get(api.browseHistory, param, option)
}
// 商品浏览记录
export const serveList = (param, option) => {
return request.get(api.serveList, param, option)
}
// 商品列表
export const list = (param, option) => {
return request.get(api.list, param, option)

@ -3,6 +3,9 @@ import request from '@/utils/request'
// api地址
const api = {
list: 'goods/list',
chartsGoodsJing:'goods/chartsGoodsJing',
brandList:'goods/brandList',
typeList:'category/list'
}
// 商品列表
@ -10,3 +13,18 @@ export const list = (param, option) => {
return request.get(api.list, param, option)
}
// 首页排行榜
export const chartsGoodsJing = (param, option) => {
return request.get(api.chartsGoodsJing, param, option)
}
// 商品/大牌正品/新品首发列表
export const brandList = (param, option) => {
return request.get(api.brandList, param, option)
}
// 首页分类
export const typeList = (param, option) => {
return request.get(api.typeList, param, option)
}

@ -783,34 +783,39 @@
"style": {
"navigationBarTitleText": "预售专区",
"enablePullDownRefresh": false
}
},
{
"path": "charts",
"style": {
"navigationBarTitleText": "排行榜列表",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "ranking",
"style": {
"navigationBarTitleText": "排行榜",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "newGoods",
"style": {
"navigationBarTitleText": "新品首发",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "seckill",
"style": {
"navigationBarTitleText": "限时抢购",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{

@ -77,7 +77,7 @@
</view>
</template>
<script>
<script>
import img from "@/static/rank/rank1.png"
import * as Api from '@/api/activity'
export default {

@ -95,7 +95,7 @@
// : falsetrue
SettingModel.data(false),
//
CategoryApi.list()
CategoryApi.list({is_hot:0})
])
.then(result => {
//

@ -8,13 +8,17 @@
<view class="menu">
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
@scrolltolower="lower" @scroll="scroll">
<view id="demo1" class="menuList" v-for="(item,index) in menuList" :key="index">{{item.name}}</view>
<view id="demo1" class="menuList" v-for="(item,index) in secondMenu" :key="index"
:style="{'color':secondChose==item.category_id?'#F22029':'#333'}" @click="choseSecondMenu(item)">{{item.name}}</view>
</scroll-view>
</view>
<view class="goods">
<view class="goodsTop">
<scroll-view class="suggest" scroll-x="true">
<view id="demo1" class="sugItem" v-for="(item,index) in 5" :key="index">热门分类</view>
<view id="demo1" class="sugItem" v-for="(item,index) in menuList" :key="index" @click="choseFirstMenu(item)"
:style="{'border':isChose==item.category_id?'2rpx solid #F22029':none,'color':isChose==item.category_id?'#F22029':'#333'}">
{{item.name}}
</view>
</scroll-view>
</view>
<view class="goodsCenter">
@ -22,7 +26,7 @@
热门分类
</view>
<view class="goodsList">
<view class="listItem" v-for="(item,index) in 9" :key="index">
<view class="listItem" v-for="(item,index) in hotList" :key="index">
<image src="/static/home/goodsDemo.png" mode="" class="goodsImg"></image>
<view class="goodsName">
TCL
@ -35,7 +39,8 @@
{{typeName}}
</view>
<view class="goodsList">
<view class="listItem" v-for="(item,index) in goodsList" :key="index" @click="goodsDetail(item)">
<view class="listItem" v-for="(item,index) in goodsList" :key="index"
@click="goodsDetail(item)">
<image :src="item.goods_image" mode="" class="goodsImg"></image>
<view class="goodsName">
{{item.goods_name}}
@ -44,63 +49,85 @@
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import * as cstegory from '@/api/category'
export default{
data(){
return{
menuList:[],
typeName:'空调',
goodsList:[],
export default {
data() {
return {
secondChose:'',
menuList: [],
typeName: '空调',
goodsList: [],
isChose: '',
hotList: [],
secondMenu: [],
}
},
onShow(){
onShow() {
this.getGoodsTypeList();
this.getSonList()
// this.getSonList()
},
methods:{
getGoodsTypeList(){
methods: {
choseFirstMenu(item){
this.isChose = item.category_id;
this.secondMenu = item.children;
this.secondChose=''
// this.secondChose = this.secondMenu[0].category_id;
this.getSonList(this.isChose)
},
choseSecondMenu(item){
this.secondChose = item.category_id;
this.getSonList(this.secondChose)
},
getGoodsTypeList() {
const that = this;
console.log(cstegory.list(),'接口地址')
console.log(cstegory.list(), '接口地址')
return new Promise((resolve, reject) => {
cstegory.list()
cstegory.list({
is_hot: 0
})
.then(res => {
//
console.log(res,'分类数据')
that.menuList = res.data.list
console.log(res, '分类数据')
that.menuList = res.data.list;
that.isChose = that.menuList[0].category_id;
that.secondMenu = that.menuList[0].children;
that.secondChose = that.secondMenu[0].category_id
that.getSonList(that.secondChose)
// that.hotList = that.menuList[0].
})
.catch(reject)
})
},
goSearch(){
goSearch() {
uni.navigateTo({
url:'/pages/search/index'
url: '/pages/search/index'
})
},
getSonList(){
getSonList(val) {
const that = this;
let params = {
categoryId:'10003',
page:1
categoryId: val,
page: 1
}
return new Promise((resolve, reject) => {
cstegory.sonList()
cstegory.sonList(params)
.then(res => {
//
console.log(res,'子数据')
console.log(res, '子数据')
this.goodsList = res.data.list.data
})
.catch(reject)
})
},
goodsDetail(item){
goodsDetail(item) {
//
uni.navigateTo({
url:'/pages/goods/detail?goodsId='+item.goods_id
url: '/pages/goods/detail?goodsId=' + item.goods_id
})
},
}
@ -148,6 +175,7 @@
.menu {
width: 172rpx;
height: 100%;
padding-top: 90rpx;
.scroll-Y {
height: 100%;
@ -167,26 +195,29 @@
}
.goods {
.goodsTop{
.goodsTop {
width: 500rpx;
.suggest{
.suggest {
width: 100%;
white-space: nowrap;
.sugItem{
.sugItem {
display: inline-block;
width: 146rpx;
height: 54rpx;
background: #FEF6F6;
border-radius: 82rpx 82rpx 82rpx 82rpx;
opacity: 1;
border: 2rpx solid #F22029;
// border: 2rpx solid #F22029;
line-height: 54rpx;
margin-right: 34rpx;
text-align: center;
}
}
}
.goodsCenter{
.goodsCenter {
width: 566rpx;
min-height: 700rpx;
background: #FFFFFF;
@ -194,7 +225,8 @@
opacity: 1;
margin-top: 22rpx;
padding-top: 30rpx;
.hotType{
.hotType {
width: 112rpx;
height: 40rpx;
font-size: 28rpx;
@ -204,21 +236,25 @@
line-height: 40rpx;
margin: 0rpx 0 0 34rpx;
}
.goodsList{
.goodsList {
width: 544rpx;
margin: 26rpx 0 0 8rpx;
display: flex;
flex-wrap: wrap;
}
.listItem{
.listItem {
width: 180rpx;
height: 200rpx;
margin-bottom: 34rpx;
.goodsImg{
.goodsImg {
width: 154rpx;
height: 154rpx;
}
.goodsName{
.goodsName {
width: 180rpx;
height: 40rpx;
font-size: 28rpx;
@ -234,7 +270,7 @@
}
}
}
}
}
</style>

@ -1,22 +1,26 @@
<template>
<view class="detail">
<view>
<u-navbar title="" :border-bottom="false" title-color="#fff"></u-navbar>
</view>
<view class="head">
<view class="search">
<image src="/static/tabbar/home.png" mode="" class="icon" @click="goHome"></image>
<view class="searInput" @click="goSearch">
<image src="/static/home/search.png" mode="" class="seaIcon"></image>
<input v-model="searchValue" class="input" focus="true" placeholder="iPhone15" type="text" />
</view>
<u-navbar>
<view class="slot-wrap">
<input type="text" placeholder="iPhone15" class="searInput" />
</view>
</u-navbar>
<view class="head">
<view class="share">
<view class="sp"></view>
<image src="/static/detail/share.png" mode="" class="shareIcon"></image>
</view>
<view class="swiper">
<scroll-view class="goods" scroll-x="true" @scroll="scroll">
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay"
:interval="interval" :duration="duration">
<swiper-item v-for="(item,index) in goods.goods_images" :key="index">
<image :src="item.preview_url" mode="" class="goodsImg"></image>
</swiper-item>
</swiper>
<!-- <scroll-view class="goods" scroll-x="true" @scroll="scroll">
<view class="goodsItem" v-for="(item,index) in goods.goods_images" :key="index">
<image :src="item.preview_url" mode="" class="goodsImg"></image>
<view class="num">
@ -24,11 +28,11 @@
</view>
<view class="numInfo">
{{index+1}}/{{goods.goods_images.length}}
{{index+1}}/{{allPicture}}
</view>
</view>
</view>
</scroll-view>
</scroll-view> -->
</view>
</view>
@ -38,8 +42,8 @@
<view class="leftPrice">
<text></text>{{goods.goods_price_min}}
</view>
<view class="sellPrice">
<text class="sellLeft">分销价</text>{{}}
<view class="sellPrice" v-if="goods.goods_price_min_dealer">
<text class="sellLeft">分销价</text>{{goods.goods_price_min_dealer}}
</view>
</view>
<view class="right">
@ -51,12 +55,15 @@
</view>
</view>
</view>
<view class="pro" @click="goMember">
<view class="pro" @click="goMember" v-if="userInfo.user_type==10">
<view class="proMem">
PRO会员
<text v-if="userInfo.user_type==10">Plus</text>
<text v-if="userInfo.user_type==20">分销</text>
会员
</view>
<view class="proInfo">
开通PRO会员 预计再省
开通<text v-if="userInfo.user_type==10">Plus</text>
<text v-if="userInfo.user_type==20">分销</text>会员 预计再省
</view>
<view class="proBtn">
立即开通
@ -67,8 +74,8 @@
{{goods.goods_name}}
</view>
<view class="goodsOpera">
<view class="goodsNum" @click="copyNum(item.skuList[0].goods_sku_id)">
<text>{{item.skuList[0].goods_sku_id}}</text>
<view class="goodsNum" @click="copyNum" v-if="goods.skuList.length>0">
<text>{{goods.skuList[0].goods_sku_no}}</text>
<image src="/static/detail/copy.png" mode=""></image>
</view>
<view class="operaImg">
@ -76,16 +83,17 @@
<image src="/static/detail/ys.png" mode="" class="ys"></image>
</view>
</view>
<view class="rank" @click="goRanking">
<text>排行榜 手机热搜榜第3</text>
<view class="rank" @click="goRanking" v-if="goods.paihang>0">
<text>排行榜 {{goods.category.name}}热搜榜第{{goods.paihang}}</text>
<image src="/static/detail/rightIcon.png" mode=""></image>
</view>
</view>
</view>
<view class="orderInfo">
<view class="chosed">
<!-- -->
<view class="chosed" @click="choseSku" v-if="goods.spec_type == 20">
<view class="title">已选</view>
<view class="info">枪色 1</view>
<view class="info" v-for="(item, index) in goods.specList" :key="index">{{ item.spec_name }}</view>
</view>
<view class="chosed">
<view class="title">送至</view>
@ -112,9 +120,9 @@
<view class="busSour">
<text>商家来源平台认证商户</text>
</view>
<view class="busName">
<!-- <view class="busName">
<text>商家名称北京伊莫电子科技有限公司</text>
</view>
</view> -->
</view>
</view>
<view class="chosed">
@ -170,7 +178,7 @@
</view>
<view class="fooRight">
<view class="addCar" v-if="!isPre">
<view class="addCar" v-if="!isPre" @click="addCar">
加入购物车
</view>
<view class="buyNow" v-if="!isPre" @click="buyNow">
@ -280,13 +288,23 @@
</view>
</view>
</view>
<SkuPopup v-if="!isLoading" v-model="showSkuPopup" :skuMode="skuMode" :goods="goods" @addCart="onAddCart" />
</view>
</template>
<script>
import * as GoodsApi from '@/api/goods'
import * as goodsCar from '@/api/cart.js'
import SkuPopup from './components/SkuPopup'
export default {
components: {
SkuPopup
},
data() {
return {
skuMode: 1,
showSkuPopup: false,
allPicture: '',
keyword: '',
diaShow: false,
searchValue: '',
isPre: false,
@ -294,7 +312,9 @@
openDialog: false,
goodsId: '',
goods: {},
suggestGoodsList: []
suggestGoodsList: [],
userInfo: {},
}
},
onLoad(options) {
@ -303,17 +323,23 @@
},
onShow() {
this.getSuggestGoods()
this.userInfo = uni.getStorageSync('userInfo')
},
methods: {
//
choseSku() {
this.showSkuPopup = true
},
//
getGoodsDetail() {
getGoodsDetail(goodsId) {
const that = this
return new Promise((resolve, reject) => {
GoodsApi.detail('10001')
GoodsApi.detail(goodsId)
.then(result => {
that.goods = result.data.detail
that.goods = result.data.detail;
that.allPicture = result.data.detail.goods_images.length
})
.catch(reject)
.catch()
})
},
getSuggestGoods() {
@ -324,7 +350,7 @@
console.log(result, '获取推荐商品列表')
that.suggestGoodsList = result.data.goodsList
})
.catch(reject)
.catch()
},
goHome() {
uni.navigateTo({
@ -354,10 +380,21 @@
url: '/pages/search/index'
})
},
addCar() {
//
const that = this
goodsCar.add(that.goods.goods_id, that.goods.skuList[0].goods_sku_id, that.goods.spec_type == 20 ? 1 : 1)
.then(res => {
if (res.status == 200) {
that.$toast(res.message)
}
})
.catch()
},
buyNow() {
//
uni.navigateTo({
url: '/pages/sureOrder/index'
url: '/pages/sureOrder/index?goodsInfo=' + JSON.stringify(this.goods)
})
},
shareCancel() {
@ -372,10 +409,16 @@
height: 100%;
}
.head {
background-color: #FFF;
width: 100%;
height: 640rpx;
.slot-wrap {
width: 400rpx;
margin-left: 60rpx;
height: 58rpx;
border-radius: 60rpx 60rpx 60rpx 60rpx;
background-color: #F3F3F3;
display: flex;
align-items: center;
padding-left: 20rpx;
}
.search {
@ -436,6 +479,12 @@
right: 0;
margin: auto;
.goodsImg {
margin-left: 30rpx;
width: 666rpx;
height: 398rpx;
}
.goods {
width: 100%;
height: 100%;
@ -623,7 +672,7 @@
color: #000000;
line-height: 33rpx;
margin: 28rpx 0 0 28rpx;
}
.goodsOpera {

@ -41,7 +41,7 @@
<text class="iconfont icon-view-list" v-else></text>
</view>
</view>
<view class="goodsType">
<!-- <view class="goodsType">
<scroll-view class="typeList" scroll-x="true" @scroll="scroll" scroll-left="120">
<view v-for="(item,index) in goodsType" :key="index" class="typeItem"
:style="{'color':item.isActive?'#F43B21':'#5A5A5A','background':item.isActive?'#FEF6F6':'#F7F8FA','border':item.isActive?'2rpx solid #F22029':'none'}">
@ -49,7 +49,7 @@
</view>
</scroll-view>
</view>
</view> -->
<!-- 商品列表 -->
<view class="goods-list clearfix" :class="['column-' + (showView ? '1' : '2')]">
<view class="goods-item" v-for="(item, index) in list.data" :key="index"
@ -129,7 +129,7 @@
<script>
import WxofficialMixin from '@/core/mixins/wxofficial'
import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins'
import * as GoodsApi from '@/api/goods'
import * as GoodsApi from '@/api/goods'
import {
getEmptyPaginateObj,
getMoreListData
@ -146,6 +146,7 @@
mixins: [MescrollMixin, WxofficialMixin],
data() {
return {
searchText: '',
goodsType: [{
name: '80英寸',
isActive: true,
@ -188,6 +189,7 @@
onLoad(options) {
// options
this.options = options
this.searchText = options.search
//
this.setShowView()
//
@ -277,7 +279,7 @@
//
let pages = getCurrentPages()
if (pages.length > 1 &&
pages[pages.length - 2].route === searchPageUrl) {
pages[pages.length - 2].route == searchPageUrl) {
uni.navigateBack()
return
}
@ -333,6 +335,7 @@
//
.search {
flex: 1;
}
//

@ -1,20 +1,22 @@
<template>
<view class="page">
<view class="box_1">
<view class="box_3">
<view class="group_2">
<view class="group_3">
<view class="text-wrapper_1" @click="changeHome('home')"
:style="{'backgroundColor':type=='home'?'rgba(255, 255, 255, 1.000000)':none,'color':type=='home'?'red':'#333'}">
<text lines="1" class="text_1">首页</text>
</view>
<view class="text-wrapper_1" @click="changeHome('city')"
:style="{'backgroundColor':type=='city'?'rgba(255, 255, 255, 1.000000)':none,'color':type=='city'?'red':'#333'}">
<text lines="1" class="text_2">同城送</text>
</view>
<view class="">
<u-navbar :background="background">
<view class="group_3">
<view class="text-wrapper_1" @click="changeHome('home')"
:style="{'backgroundColor':type=='home'?'rgba(255, 255, 255, 1.000000)':none,'color':type=='home'?'red':'#333'}">
<text lines="1" class="text_1">首页</text>
</view>
<view class="text-wrapper_1" @click="changeHome('city')"
:style="{'backgroundColor':type=='city'?'rgba(255, 255, 255, 1.000000)':none,'color':type=='city'?'red':'#333'}">
<text lines="1" class="text_2">同城送</text>
</view>
</view>
</u-navbar>
</view>
<view class="box_1">
<view class="box_3">
<view class="group_4">
<view class="group_5" @click="search">
<view class="image-text_6">
@ -33,11 +35,17 @@
</view>
<view v-if="!sameCity">
<view class="group_7">
<view lines="1" class="text_5">
<view class="typeName" @click="changeGoodsType({'category_id':0,children:[]})">
推荐
</view>
<view class="group_9" v-if="chosedType==0"></view>
</view>
<view lines="1" class="text_5" v-for="(item,index) in goodsType" :key="index">
<view class="typeName" @click="changeGoodsType(item)">
{{item.name}}
</view>
<view class="group_9" v-if="chosedType==item.value"></view>
<view class="group_9" v-if="chosedType==item.category_id"></view>
</view>
</view>
@ -53,12 +61,30 @@
</view>
<view class="group_10">
<view class="list_1">
<view class="image-text_8-0" v-for="(item,index) in secondType" :key="index"
@click="goPage(item)">
<image src="/static/home/demoPng.png" class="label_2-0"></image>
<view class="image-text_8-0" @click="goPage('/pages/activity/presale')">
<image src="/static/home/ys.png" class="label_2-0"></image>
<text lines="1" class="text-group_8-0">预售专区</text>
</view>
<view class="image-text_8-0" @click="goPage('/pages/invite/index')">
<image src="/static/home/yq.png" class="label_2-0"></image>
<text lines="1" class="text-group_8-0">邀请有礼</text>
</view>
<view class="image-text_8-0" @click="goPage('/pages/coupon/index')">
<image src="/static/home/lq.png" class="label_2-0"></image>
<text lines="1" class="text-group_8-0">领券中心</text>
</view>
<view class="image-text_8-0" @click="goPage()">
<image src="/static/home/az.png" class="label_2-0"></image>
<text lines="1" class="text-group_8-0">安装报修</text>
</view>
<view class="image-text_8-0" @click="goPage('/pages/news/recycling/index')">
<image src="/static/home/sm.png" class="label_2-0"></image>
<text lines="1" class="text-group_8-0">上门回收</text>
</view>
<view class="image-text_8-0" v-for="(item,index) in secondType">
<image :src="item.image.external_url" class="label_2-0"></image>
<text lines="1" class="text-group_8-0">{{item.name}}</text>
</view>
</view>
</view>
<view class="newUser" @click="goNewUser">
@ -90,7 +116,7 @@
</view>
</view>
</view>
<view class="big" @click="goBigGoods">
<view class="big" @click="goBigGoods" v-if="bigGoodsList.length>0">
<view class="bigheader">
<view class="headLeft">
<view class="card">
@ -100,27 +126,27 @@
<text class="shopText">店内现货</text>
</view>
</view>
<view class="lookMore">
查看更多
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="sellGoods">
<view v-for="(item,index) in 10" :key="index" class="goodsItem">
<view v-for="(item,index) in bigGoodsList" :key="index" class="goodsItem">
<view class="goodsImage">
<image src="/static/home/goodsDemo.png" mode=""></image>
<image :src="item.goods_image" mode=""></image>
</view>
<view class="goodsPrice">
<text class="price">1428</text>
<text class="price">{{item.goods_price_min}}</text>
</view>
<view class="goodsName">
松下洗衣机
{{item.goods_name}}
</view>
</view>
</view>
</view>
<view class="limitTime" @click="seckill">
<view class="limitTime" @click="seckill" v-if="seckillList.length>0">
<view class="limitHeadr">
<view class="headeLeft">
<view class="headerTitle">
@ -130,36 +156,27 @@
<view class="headeLeft">
<view class="residue">
本场剩余
<view class="hou com">
20
</view>
:
<view class="min com">
56
</view>
:
<view class="sec com">
47
</view>
<count-down style='display: inline-block;' :date="seckillCutDownTime"
separator="colon" theme="custom" />
</view>
<view class="lookMore">
查看更多
<u-icon name="arrow-right"></u-icon>
</view>
</view>
</view>
<view class="limitGoods">
<view v-for="(item,index) in 5" :key="index" class="limitItem">
<view v-for="(item,index) in seckillList" :key="index" class="limitItem">
<view class="limitImg">
<image src="../../static/home/goodsDemo.png" mode=""></image>
<image :src="item.goods_image" mode=""></image>
</view>
<view class="price">
<view class="limitPrice">
372
{{item.seckill_price_min}}
</view>
<view class="oldPrice">
2428
{{item.seckill_price_max}}
</view>
</view>
@ -171,31 +188,31 @@
<view class="newImage" @click="goNews">
<image src="../../static/home/newImg.png" mode=""></image>
</view>
<view class="newRight" >
<view class="newRight">
<view class="newFirt" @click="goNewGoods">
<view class="starting">
新品首发
</view>
<view class="firstGoods">
<view v-for="(item,index) in 3" :key="index" class="goodsItem">
<image src="/static/home/phone.jpg" mode=""></image>
<view v-for="(item,index) in newGoodsList" :key="index" class="goodsItem">
<image :src="item.goods_image" mode=""></image>
<view class="firstPrice">
1428
{{item.goods_price_min}}
</view>
</view>
</view>
</view>
<view class="ranking newFirt" @click="rankIng">
<view class="newFirt ranking " @click="rankIng">
<view class="starting">
排行榜
<text class="hotSell">热卖好物专场</text>
</view>
<view class="firstGoods">
<view v-for="(item,index) in 3" :key="index" class="goodsItem">
<image src="/static/home/phone.jpg" mode=""></image>
<view v-for="(item,index) in rankList" :key="index" class="goodsItem">
<image :src="item.goods_image" mode=""></image>
<view class="firstPrice">
1428
{{item.goods_price_min}}
</view>
</view>
@ -204,22 +221,22 @@
</view>
</view>
<view class="goodsList">
<view class="group_11" v-for="(item,index) in 8" :key="index">
<view class="group_11" v-for="(item,index) in suggestGoodsList" :key="index">
<view class="block_2" @click="goDetails(item)">
<image src="/static/home/phone.jpg" class="image_3"></image>
<image :src="item.goods_image" class="image_3"></image>
<view class="box_6">
<view class="text-wrapper_4">
<!-- <view class="text-wrapper_4">
<text lines="1" class="text_12">自营</text>
</view>
<text lines="1" decode="true" class="text_13">iphone13&nbsp;绿色&nbsp;128GB</text>
</view> -->
<text lines="1" decode="true" class="text_13">{{item.goods_name}}</text>
</view>
<view class="text-wrapper_5">
<text lines="1" class="text_14">¥</text>
<text lines="1" class="text_15">7599</text>
<text lines="1" class="text_15">{{item.goods_price_min}}</text>
<text lines="1" class="text_16">到手价</text>
<text lines="1" class="text_17">¥7089</text>
<text lines="1" class="text_17">¥{{item.line_price_max}}</text>
</view>
<text lines="1" decode="true" class="text_18">200+条评论&nbsp;99%好评率</text>
<!-- <text lines="1" decode="true" class="text_18">200+条评论&nbsp;99%好评率</text> -->
</view>
</view>
@ -385,10 +402,28 @@
</view>
</template>
<script>
import img from "@/static/home/top.png"
import * as GoodsApi from '@/api/home/index.js';
import * as limit from '@/api/sharp/home.js';
import CountDown from '@/components/countdown';
import * as Api from '@/api/goods'
export default {
components: {
CountDown
},
data() {
return {
type: 'city',
background: {
background: 'url(' + img + ') center top no-repeat',
backgroundSize: '100% auto',
},
suggestGoodsList: [],
bigGoodsList: [],
seckillCutDownTime: '',
seckillList: [],
newGoodsList: [],
rankList: [],
type: 'home',
active: 1,
numList: [{
name: '2023年07月01日'
@ -400,62 +435,125 @@
name: '2023年07月01日'
}],
sameCity: false,
secondType: [{
name: '预售专区',
url: '/pages/activity/presale'
}, {
name: '邀请有礼',
url: '/pages/invite/index',
}, {
name: '领券中心',
url: '/pages/coupon/index'
}, {
name: '安装报修'
}, {
name: '上门回收',
url: '/pages/news/recycling/index'
}, {
name: '空调',
url: '/pages/goods/detail'
}, {
name: '电视'
}, {
name: '冰箱'
}, {
name: '洗衣机'
}, {
name: '小家电'
}],
secondType: [],
chosedType: 0,
goodsList: [
],
goodsType: [{
name: '推荐',
value: 0
}, {
name: '手机',
value: 1
}],
goodsType: [],
}
},
onShow() {
this.getTypeList()
this.getRankingList();
this.getbrandList();
this.getSeckill();
this.getSuggest()
},
methods: {
changeGoodsType(item){
getTypeList() {
const that = this
GoodsApi.typeList()
.then(res => {
if (res.status == 200) {
that.goodsType = res.data.list
}
})
.finally(() => {})
},
getSuggest() {
//
const that = this
Api.recommended()
.then(res => {
that.suggestGoodsList = res.data.goodsList
})
},
getSeckill() {
//
const that = this
that.seckillList = []
limit.data()
.then(result => {
let seckillList = result.data.goodsList.data;
that.seckillCutDownTime = result.data.tabbar[0].count_down_time
for (var i = 0; i < seckillList.length; i++) {
if (seckillList[i].spec_type == 10) {
that.seckillList.push(seckillList[i])
}
}
})
},
getbrandList() {
// //
this.getNewGoods()
this.getBigList()
},
getBigList() {
const that = this
let param = {
page: 1,
categoryId: 0,
is_brand: 1,
is_new: 0,
order: 1
}
GoodsApi.brandList(param)
.then(res => {
that.bigGoodsList = res.data.data;
})
.finally(() => {})
},
getNewGoods() {
const that = this
let param = {
page: 1,
categoryId: 0,
is_brand: 0,
is_new: 1,
order: 1
}
GoodsApi.brandList(param)
.then(res => {
that.newGoodsList = res.data.data;
if (that.newGoodsList.length == 4) {
that.newGoodsList.pop()
}
})
.finally(() => {})
},
getRankingList() {
//
const that = this
GoodsApi.chartsGoodsJing()
.then(result => {
that.rankList = result.data[0].goods_list
})
.finally(() => {})
},
changeGoodsType(item) {
//
this.chosedType = item.category_id
this.secondType =item.children
},
changeHome(val) {
this.type = val
this.sameCity = val == 'home' ? false : true
},
search(){
search() {
//
uni.navigateTo({
url:'/pages/search/index'
url: '/pages/search/index'
})
},
goDetails() {
goDetails(item) {
uni.navigateTo({
url: '/pages/goods/detail'
url: '/pages/goods/detail?goodsId=' + item.goods_id
})
},
goNews() {
@ -464,7 +562,7 @@
url: '/pages/activity/newsshop'
})
},
goNewUser(){
goNewUser() {
//
uni.navigateTo({
url: '/pages/activity/newPeople'
@ -485,24 +583,24 @@
url: '/pages/activity/ranking'
})
},
goPage(item) {
goPage(url) {
uni.navigateTo({
url: item.url
url:url
})
},
goBigGoods(){
goBigGoods() {
uni.navigateTo({
url: '/pages/user/vip/goods'
})
},
sameCityServe(){
sameCityServe() {
uni.navigateTo({
url: '/pages/activity/intimate'
})
},
shopPicture(){
shopPicture() {
uni.navigateTo({
url:'/pages/news/consult/store'
url: '/pages/news/consult/store'
})
},
}
@ -732,6 +830,9 @@
flex-direction: row;
display: flex;
align-items: center;
left: 0;
right: 0;
margin: auto;
}
.text-wrapper_1 {
@ -922,7 +1023,7 @@
background-color: rgba(255, 255, 255, 1.000000);
border-radius: 8rpx;
width: 700rpx;
height: 354rpx;
max-height: 354rpx;
display: flex;
flex-direction: column;
margin: 12rpx 0 0 20rpx;
@ -1033,30 +1134,34 @@
.big {
width: 696rpx;
height: 408rpx;
max-height: 408rpx;
background-image: url('../../static/home/bigBack.png');
background-size: 100% 100%;
margin-top: 16rpx;
margin-left: 20rpx;
padding-left: 20rpx;
padding-top: 16rpx;
padding-bottom: 16rpx;
.bigheader {
display: flex;
align-items: center;
justify-content: space-between;
.headLeft{
.headLeft {
display: flex;
align-items: center;
}
.card {
width: 146rpx;
height: 58rpx;
font-size: 34rpx;
font-size: 30rpx;
font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
font-weight: 400;
font-weight: 600;
color: #303030;
line-height: 58rpx;
}
.shop {
width: 148rpx;
height: 42rpx;
@ -1066,13 +1171,15 @@
line-height: 42rpx;
background-image: url('../../static/home/shopBack.png');
margin-left: 12rpx;
.shopText {
width: 96rpx;
text-align: center;
margin-left: 18rpx;
}
}
.lookMore{
.lookMore {
height: 28rpx;
font-size: 20rpx;
font-weight: 400;
@ -1085,6 +1192,7 @@
.sellGoods {
display: flex;
flex-wrap: wrap;
.goodsItem {
width: 134rpx;
display: flex;
@ -1130,6 +1238,12 @@
color: #505050;
line-height: 28rpx;
text-align: center;
white-space: nowrap;
/* 不换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
/* 溢出部分显示省略号 */
}
}
@ -1144,21 +1258,24 @@
opacity: 1;
margin-left: 20rpx;
margin-top: 14rpx;
padding-top: 16rpx;
.limitHeadr {
display: flex;
justify-content: space-between;
align-items: center;
.headeLeft{
.headeLeft {
display: flex;
align-items: center;
}
.headerTitle {
width: 159rpx;
height: 60rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
opacity: 1;
image{
image {
width: 100%;
height: 100%;
}
@ -1168,7 +1285,8 @@
display: flex;
align-items: center;
margin-right: 24rpx;
.com{
.com {
width: 31rpx;
height: 27rpx;
background: #FF4D4D;
@ -1181,7 +1299,8 @@
text-align: center;
}
}
.lookMore{
.lookMore {
height: 28rpx;
font-size: 20rpx;
font-family: PingFang SC, PingFang SC;
@ -1312,6 +1431,7 @@
.firstGoods {
display: flex;
overflow-x: hidden;
.goodsItem {
position: relative;
@ -1346,7 +1466,7 @@
margin-top: 16rpx;
width: 390rpx;
height: 208rpx;
background-image: url('../../static/home/ranking.png');
// background-image: url('../../static/home/ranking.png');
background-size: 100% 100%;
}
}
@ -1354,7 +1474,7 @@
.list_1 {
width: 100%;
height: 122rpx;
min-height: 122rpx;
flex-direction: row;
flex-wrap: wrap;
display: flex;
@ -1433,6 +1553,9 @@
display: flex;
justify-content: space-between;
margin: 14rpx 0 0 28rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.text-wrapper_4 {
@ -1456,11 +1579,11 @@
white-space: nowrap;
line-height: 24rpx;
margin-left: 6rpx;
}
.text_13 {
width: 236rpx;
// width: 236rpx;
height: 34rpx;
overflow-wrap: break-word;
color: rgba(30, 30, 30, 1.000000);
@ -1470,10 +1593,13 @@
text-align: left;
white-space: nowrap;
line-height: 24rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.text-wrapper_5 {
width: 242rpx;
// width: 242rpx;
height: 50rpx;
flex-direction: row;
display: flex;
@ -1495,11 +1621,11 @@
}
.text_15 {
width: 86rpx;
min-width: 86rpx;
height: 50rpx;
overflow-wrap: break-word;
color: rgba(242, 26, 28, 1.000000);
font-size: 36rpx;
font-size: 28rpx;
font-family: PingFang SC-Semibold;
font-weight: 600;
text-align: left;
@ -1518,7 +1644,7 @@
text-align: left;
white-space: nowrap;
line-height: 20rpx;
margin: 14rpx 0 0 4rpx;
margin: 14rpx 0 0 6rpx;
}
.text_17 {

@ -1,151 +1,164 @@
<template>
<!-- 微信授权手机号一键登录 -->
<view class="wechat-auth">
<button class="btn-normal" open-type="getPhoneNumber" @getphonenumber="handelMpWeixinMobileLogin($event)" @click="clickPhoneNumber">
<view class="wechat-auth-container">
<image class="icon" src="../../../static/channel/wechat.png"></image>
<text class="title">微信手机号一键登录</text>
</view>
</button>
</view>
<!-- 微信授权手机号一键登录 -->
<view class="wechat-auth">
<button class="btn-normal" open-type="getPhoneNumber" @getphonenumber="handelMpWeixinMobileLogin($event)"
@click="clickPhoneNumber">
<view class="wechat-auth-container">
<image class="icon" src="../../../static/channel/wechat.png"></image>
<text class="title">微信手机号一键登录</text>
</view>
</button>
</view>
</template>
<script>
import store from '@/store'
import { isEmpty, inArray } from '@/utils/util'
import store from '@/store'
import {
isEmpty,
inArray
} from '@/utils/util'
import * as UserApi from '@/api/user'
export default {
export default {
data() {
return {
// (code)
// openid
data() {
return {
// (code)
// openid
code: '',
userInfo:{},
partyData:{
// oauth:'MP-WEIXIN'
code: '',
userInfo: {},
partyData: {
// oauth:'MP-WEIXIN'
},
isParty: true,
}
},
isParty:true,
}
},
methods: {
methods: {
// :
// : getphonenumbercode
// getphonenumbercode,encryptedData
async clickPhoneNumber() {
this.code = await this.getCode()
},
// :
// : getphonenumbercode
// getphonenumbercode,encryptedData
async clickPhoneNumber() {
this.code = await this.getCode()
},
//
// getphonenumber
async handelMpWeixinMobileLogin({ detail }) {
const app = this
if (detail.errMsg != 'getPhoneNumber:ok') {
console.log('微信授权获取手机号失败', detail)
return
}
if (detail.errMsg == 'getPhoneNumber:ok') {
app.isLoading = true
store.dispatch('LoginMpWxMobile', {
code: app.code,
encryptedData: detail.encryptedData,
iv: detail.iv,
isParty: app.isParty,
partyData: app.userInfo,
refereeId: store.getters.refereeId
})
.then(result => {
//
app.$toast(result.message)
// :
uni.$emit('syncRefresh', true)
//
setTimeout(() => app.onNavigateBack(1), 2000)
})
.catch(err => {
const resultData = err.result.data
//
if (isEmpty(resultData)) {
app.$toast(err.result.message)
}
//
if (resultData.isBack) {
setTimeout(() => app.onNavigateBack(1), 2000)
}
})
.finally(() => app.isLoading = false)
}
},
// code
// https://developers.weixin.qq.com/miniprogram/dev/api/open-api/login/wx.login.html
getCode() {
const that = this
return new Promise((resolve, reject) => {
uni.login({
provider: 'weixin',
success: res => {
console.log('code', res.code)
uni.getUserInfo({
provider: 'weixin',
success: function(info) {
console.log(info,'用户信息')
that.userInfo.nickName = info.userInfo.nickName
that.userInfo.gender = info.userInfo.gender
that.userInfo.avatarUrl = info.userInfo.avatarUrl
// if(info.userInfo){
// that.isParty = true
// }
//
// getphonenumber
async handelMpWeixinMobileLogin({
detail
}) {
const app = this
if (detail.errMsg != 'getPhoneNumber:ok') {
console.log('微信授权获取手机号失败', detail)
return
}
if (detail.errMsg == 'getPhoneNumber:ok') {
app.isLoading = true
store.dispatch('LoginMpWxMobile', {
code: app.code,
encryptedData: detail.encryptedData,
iv: detail.iv,
isParty: app.isParty,
partyData: app.userInfo,
refereeId: store.getters.refereeId
})
.then(result => {
//
app.$toast(result.message);
app.getUserInfo()
// :
uni.$emit('syncRefresh', true)
//
setTimeout(() => app.onNavigateBack(1), 2000)
})
.catch(err => {
const resultData = err.result.data
//
if (isEmpty(resultData)) {
app.$toast(err.result.message)
}
//
if (resultData.isBack) {
setTimeout(() => app.onNavigateBack(1), 2000)
}
})
.finally(() => app.isLoading = false)
}
})
resolve(res.code)
},
fail: reject
})
})
},
},
getUserInfo() {
UserApi.info()
.then(result => {
uni.setStorageSync('userInfo', result.data.userInfoo)
})
},
// code
// https://developers.weixin.qq.com/miniprogram/dev/api/open-api/login/wx.login.html
getCode() {
const that = this
return new Promise((resolve, reject) => {
uni.login({
provider: 'weixin',
success: res => {
console.log('code', res.code)
uni.getUserInfo({
provider: 'weixin',
success: function(info) {
console.log(info, '用户信息')
that.userInfo.nickName = info.userInfo.nickName
that.userInfo.gender = info.userInfo.gender
that.userInfo.avatarUrl = info.userInfo.avatarUrl
// if(info.userInfo){
// that.isParty = true
// }
}
})
resolve(res.code)
},
fail: reject
})
})
},
/**
* 登录成功-跳转回原页面
*/
onNavigateBack(delta = 1) {
const pages = getCurrentPages()
if (pages.length > 1) {
uni.navigateBack({
delta: Number(delta || 1)
})
} else {
this.$navTo('pages/index/index')
}
}
/**
* 登录成功-跳转回原页面
*/
onNavigateBack(delta = 1) {
const pages = getCurrentPages()
if (pages.length > 1) {
uni.navigateBack({
delta: Number(delta || 1)
})
} else {
this.$navTo('pages/index/index')
}
}
}
}
}
}
</script>
<style lang="scss" scoped>
//
.wechat-auth {
width: 320rpx;
margin: 50rpx auto 0 auto;
//
.wechat-auth {
width: 320rpx;
margin: 50rpx auto 0 auto;
.wechat-auth-container {
display: flex;
justify-content: center;
}
.wechat-auth-container {
display: flex;
justify-content: center;
}
.icon {
width: 38rpx;
height: 38rpx;
margin-right: 15rpx;
}
.icon {
width: 38rpx;
height: 38rpx;
margin-right: 15rpx;
}
.title {
font-size: 28rpx;
color: #666666;
}
}
</style>
.title {
font-size: 28rpx;
color: #666666;
}
}
</style>

@ -26,14 +26,16 @@
</template>
<script>
import * as UserApi from '@/api/user'
import img from "@/static/news/login-bg.png";
import * as CaptchaApi from '@/api/captcha';
import mpWeiXinMobile from './components/mp-weixin-mobile.vue'
import store from '@/store';
import { isEmpty } from '@/utils/util'
import {
isEmpty
} from '@/utils/util'
export default {
components:{
components: {
mpWeiXinMobile
},
data() {
@ -55,7 +57,7 @@
},
methods: {
validatePhoneNumber(phone) {
//
var regExp = /^1[3456789]\d{9}$/;
@ -105,15 +107,11 @@
login() {
//
if (!this.validatePhoneNumber(this.phoneNum)) {
uni.showToast({
title: '请输入正确的手机号'
})
this.$toast('请输入正确的手机号')
return
}
if (this.semCode == '') {
uni.showToast({
title: '请输入验证码'
})
this.$toast('请输入验证码')
return
}
const that = this;
@ -125,12 +123,17 @@
refereeId: false
}).then(res => {
uni.setStorageSync('token', res.data.token)
uni.showToast({
title: res.message
})
that.$toast(res.message)
that.getUserInfo()
setTimeout(() => that.onNavigateBack(1), 2000)
})
},
getUserInfo() {
UserApi.info()
.then(result => {
uni.setStorageSync('userInfo', result.data.userInfoo)
})
},
onNavigateBack(delta = 1) {
//
const pages = getCurrentPages()

@ -140,6 +140,36 @@
sureSubmit() {
// 0000
const that = this;
if(!that.form.name){
return that.$toast('请输入商品名称')
}
if(!that.form.intro){
return that.$toast('请输入商品信息')
}
if(!that.form.type){
return that.$toast('请选择求购类型')
}
if(!that.form.date){
return that.$toast('请选择交货日期')
}
if(!that.form.num){
return that.$toast('请选择求购数量')
}
if(!that.form.startNum){
return that.$toast('请输入最低价')
}
if(!that.form.endNum){
return that.$toast('请输入最高价')
}
if(!that.form.mianyi){
return that.$toast('请选择价格是否面议')
}
if(!that.form.mianyi){
return that.$toast('请选择价格是否面议')
}
if(!that.form.remark){
return that.$toast('请填写备注')
}
let params = {
goods_name: that.form.name,
goods_desc: that.form.intro,
@ -151,7 +181,7 @@
is_face: that.form.mianyi,
address_id: '10001',
remark: that.form.remark,
...that.imgage_ids
}
help.addGoodsSource(params)
.then(res => {

@ -96,7 +96,7 @@
//
goodsList: [],
//
formData: [],
goodsSkuId: [],
//
maxImageLength,
//

@ -10,21 +10,23 @@
<view class="find">
<view class="findTitle">
搜索发现
<image src="/static/search/openEye.png" class="findIcon" v-if="showEye" @click="showEye=!showEye"></image>
<image src="/static/search/closeEye.png" class="findIcon" v-if="!showEye" @click="showEye=!showEye"></image>
<image src="/static/search/openEye.png" class="findIcon" v-if="showEye" @click="showEye=!showEye">
</image>
<image src="/static/search/closeEye.png" class="findIcon" v-if="!showEye" @click="showEye=!showEye">
</image>
</view>
<view class="others">
换一批
</view>
</view>
<view class="hotSearch" v-if="showEye">
<view v-for="(item,index) in searchData" :key="index" class="hotItem">
<view v-for="(item,index) in searchList" :key="index" class="hotItem" @click="searchGoods(item)">
<image src="/static/user/hot.png" mode="" class="hotImg" v-if="index==0"></image>
<text>{{item.name}}</text>
<text>{{item}}</text>
</view>
</view>
<view class="hotSuggest">
<scroll-view class="hotList" scroll-x="true" @scroll="scroll" >
<scroll-view class="hotList" scroll-x="true" @scroll="scroll">
<view class="hotItem" v-for="(item,index) in 2" :key="index">
<view class="itemHeade">
<view class="headeIcon">
@ -50,7 +52,7 @@
<view class="goodName">
荣耀PlAY 7T
</view>
<view class="goodsSale" v-if="k<3">
<view class="goodsSale" v-if="k<3">
今日开售
</view>
</view>
@ -65,30 +67,35 @@
export default {
data() {
return {
showEye:true,
searchValue: '',
searchData: [{
name: '小米手机'
}, {
name: '华为'
}, {
name: 'vivo'
}, {
name: 'NOVA12'
}, {
name: '空调'
}]
showEye: true,
searchValue: 'iPhone15',
searchData: [],
searchList: []
}
},
onLoad(options) {
onShow() {
if(uni.getStorageSync('searchList')){
this.searchList = uni.getStorageSync('searchList')
this.searchList = Array.from(new Set(this.searchList));
}
},
methods: {
getSearchInfo(){
searchGoods(item){
this.searchList.push(this.searchValue)
this.searchList = Array.from(new Set(this.searchList));
uni.setStorageSync('searchList', this.searchList)
uni.navigateTo({
url: '/pages/goods/list?search=' + item
})
},
getSearchInfo() {
//
uni.navigateTo({
url: '/pages/goods/list?search=' + this.searchValue
})
},
}
}
@ -204,37 +211,44 @@
}
}
}
.hotSuggest{
.hotSuggest {
width: 100%;
margin-left: 32rpx;
.hotList{
width:100%;
.hotList {
width: 100%;
white-space: nowrap;
.hotItem{
.hotItem {
margin-right: 26rpx;
display: inline-block;
width: 484rpx;
height: 612rpx;
overflow-y: auto;
background-image: url('../../static/search/hotBack.png');
background-size: 100% 100%;
background-size: 100% 100%;
border-radius: 8rpx 8rpx 8rpx 8rpx;
opacity: 1;
border: 2rpx solid #FFFFFF;
.itemHeade{
.itemHeade {
display: flex;
align-items: center;
.headeIcon{
.headeIcon {
margin: 18rpx 0 0 22rpx;
width: 48rpx;
height: 60rpx;
opacity: 1;
image{
image {
width: 100%;
height: 100%;
}
}
.headTitle{
.headTitle {
width: 224rpx;
height: 40rpx;
font-size: 28rpx;
@ -245,11 +259,13 @@
margin-left: 14rpx;
}
}
.itemMain{
.itemMain {
display: flex;
align-items: center;
margin: 22rpx 0 0 26rpx;
.numCommon{
.numCommon {
width: 34rpx;
height: 28rpx;
background-size: 100% 100%;
@ -260,28 +276,35 @@
color: #FFFFFF;
line-height: 28rpx;
}
.num1{
.num1 {
background-image: url('/static/search/first.png');
}
.num2{
.num2 {
background-image: url('/static/search/second.png');
}
.num3{
.num3 {
background-image: url('/static/search/third.png');
}
.num4{
.num4 {
background-image: url('/static/search/common.png');
}
.goodsImg{
.goodsImg {
width: 100rpx;
height: 90rpx;
border-radius: 8rpx 8rpx 8rpx 8rpx;
opacity: 1;
margin-left: 10rpx;
}
.goodsInfo{
.goodsInfo {
margin-left: 18rpx;
.goodName{
.goodName {
width: 138rpx;
height: 34rpx;
font-size: 24rpx;
@ -291,7 +314,8 @@
line-height: 34rpx;
text-align: center;
}
.goodsSale{
.goodsSale {
width: 96rpx;
height: 34rpx;
font-size: 24rpx;

@ -1,7 +1,8 @@
<template>
<view class="sureOrder">
<view >
<u-navbar title="确认订单" back-icon-color="#fff" :border-bottom="false" title-color="#333" :background="background"></u-navbar>
<view>
<u-navbar title="确认订单" back-icon-color="#fff" :border-bottom="false" title-color="#333"
:background="background"></u-navbar>
</view>
<view class="buyType">
<view class="toDoor">
@ -16,7 +17,7 @@
请点击添加收货地址
</view>
<view class="leftImg">
<image src="/static/order/left.png" mode="" ></image>
<image src="/static/order/left.png" mode=""></image>
</view>
</view>
<view class="getSelf">
@ -26,11 +27,11 @@
</view>
<view class="leftImg">
切换
<image src="/static/order/left.png" mode="" ></image>
<image src="/static/order/left.png" mode=""></image>
</view>
</view>
<view class="addressDetail">
浙江省金华市金东区人民西路31号新苑小区25幢
{{addressInfo.name}}
</view>
<view class="lookMap">
<image src="/static/user/address.png" mode="" class="addressIcon"></image>
@ -48,12 +49,12 @@
取件人
</view>
<view class="name">
张三
{{addressInfo.name}}
</view>
</view>
<view class="pickPeople">
<view class="title">
</view>
<view class="name">
<image src="/static/order/edit.png" mode="" class="edit"></image>
@ -64,12 +65,12 @@
预留电话
</view>
<view class="name">
18888888888
{{addressInfo.phone}}
</view>
</view>
<view class="pickPeople">
<view class="title">
</view>
<view class="name">
<image src="/static/order/edit.png" mode="" class="edit"></image>
@ -82,7 +83,7 @@
<view class="bagImg">
<image src="/static/order/bag.png" mode="" class="bag"></image>
街边取
</view>
</view>
<view class="preText">
如果您不方便只需要在街边稍候送到您的手上
</view>
@ -97,8 +98,8 @@
</view>
<view class="leftImg">
<text class="leftText">2024-12-20 0930</text>
<image src="/static/order/left.png" mode="" ></image>
<image src="/static/order/left.png" mode=""></image>
</view>
</view>
<view class="time">
@ -107,7 +108,7 @@
</view>
<view class="leftImg">
请选择
<image src="/static/order/left.png" mode="" ></image>
<image src="/static/order/left.png" mode=""></image>
</view>
</view>
<view class="goodsDetail">
@ -139,7 +140,7 @@
</view>
<view class="leftImg">
建议留言前与客服沟通确认
<image src="/static/order/left.png" mode="" ></image>
<image src="/static/order/left.png" mode=""></image>
</view>
</view>
<view class="orderTips">
@ -177,11 +178,11 @@
</view>
</view>
<view class="line">
</view>
<view class="amount">
<view class="left">
</view>
<view class="right">
<text class="totalNum">共1件合计</text>
@ -198,7 +199,7 @@
<image src="/static/order/right.png" mode="" class="chose"></image>
</view>
<view class="line">
</view>
<view class="itemType">
<view class="payName">
@ -208,7 +209,7 @@
<!-- <image src="/static/order/right.png" mode="" class="chose"></image> -->
</view>
<view class="line">
</view>
<view class="itemType">
<view class="payName">
@ -224,7 +225,7 @@
<text class="type"></text>
<text class="price">7640</text>
</view>
<view class="btn">
<view class="btn" @click="orderSubmit">
提交订单
</view>
</view>
@ -232,31 +233,124 @@
</template>
<script>
import * as order from '@/api/checkout.js'
import img from "@/static/member/head.png"
export default{
data(){
return{
buyType:false,
import * as storeShop from '@/api/shop.js'
import * as address from '@/api/address.js'
export default {
data() {
return {
buyType: false,
background: {
background: 'url('+ img+') center top no-repeat',
background: 'url(' + img + ') center top no-repeat',
backgroundSize: '100% auto',
},
goodsInfo: {},
shopInfo:{},
addressList:[],
addressInfo:{}
}
}
},
onLoad(options) {
if(options.goodsInfo){
this.goodsInfo = JSON.parse(options.goodsInfo)
}
},
onShow() {
this.getGoodsInfo()
this.getAddressList();
},
methods: {
getDefaultAddress(){
return new Promise((resolve, reject) => {
address.defaultId().then(res => {
if(res.code==200){
for(var i=0;i<that.addressList.length;i++){
if(res.data.defaultId==that.addressList[i].address_id){
that.addressInfo = that.addressList[i]
that.getOrderInfo()
}
}
}
})
.catch()
})
},
getOrderInfo(){
const that = this
return new Promise((resolve, reject) => {
address.list().then(res => {
if(res.code==200){
that.addressList = res.data.list
that.getDefaultAddress()
}
})
.catch()
})
},
getAddressList(){
const that = this
return new Promise((resolve, reject) => {
address.list().then(res => {
if(res.code==200){
that.addressList = res.data.list
that.getDefaultAddress()
}
})
.catch()
})
},
getGoodsInfo() {
return new Promise((resolve, reject) => {
storeShop.list().then(res => {
console.log(res,'获取店铺信息')
})
.catch()
})
},
orderSubmit() {
const that = this
let params = {
mode: '结算模式',
delivery: '配送方式(10快递配送 20上门自提',
couponId: '',
isUsePoints: 0,
remark: '留言',
shopId: '',
linkman: '姓名',
phone: '手机哈',
goodsId: '商品id',
goodsNum: 1,
goodsSkuId: '',
cartIds: ''
}
order.submit(params)
.then(res => {
if (res.status == 200) {
// that.$toast(res.message)
}
})
.catch()
},
},
}
</script>
<style lang="scss" scoped>
.sureOrder{
.sureOrder {
width: 750rpx;
padding-bottom: 120rpx;
background-image: url('../../static/home/homeback.png');
background-size: 100% 100%;
}
.buyType{
.buyType {
display: flex;
margin:70rpx 0 0 26rpx;
.toDoor{
margin: 70rpx 0 0 26rpx;
.toDoor {
width: 348rpx;
height: 88rpx;
background-color: #fff;
@ -267,10 +361,11 @@
line-height: 88rpx;
text-align: center;
}
.bySelf{
width:350rpx;
.bySelf {
width: 350rpx;
height: 74rpx;
background-color: rgba(255,255,255,0.570000);
background-color: rgba(255, 255, 255, 0.570000);
line-height: 74rpx;
text-align: center;
font-size: 24rpx;
@ -282,37 +377,42 @@
top: 14rpx;
}
}
.getSelf{
.shopAddress{
.getSelf {
.shopAddress {
display: flex;
align-items: center;
justify-content: space-between;
.youTime{
.youTime {
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #000000;
}
.leftImg{
.leftImg {
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #9E9E9E;
image{
image {
width: 18rpx;
height: 18rpx;
margin-left: 16rpx;
}
}
}
margin-left: 26rpx;
background-image: url('../../static/order/map.png');
background-size: 100% 100%;
width: 694rpx;
height: 246rpx;
padding:14rpx 46rpx 0 32rpx;
.addressDetail{
.addressDetail {
height: 34rpx;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
@ -321,26 +421,30 @@
line-height: 34rpx;
margin-top: 6rpx;
}
.lookMap{
.lookMap {
display: flex;
align-items: center;
margin-top: 8rpx;
.addressIcon{
width:23rpx;
.addressIcon {
width: 23rpx;
height: 26rpx;
margin-right: 14rpx;
}
.range{
.range {
font-size: 20rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #F42B17;
line-height: 26rpx;
padding-right: 10rpx;
border-right:2rpx solid #D9D9D9;
border-right: 2rpx solid #D9D9D9;
margin-right: 10rpx;
}
.checkMap{
.checkMap {
font-size: 20rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
@ -348,17 +452,20 @@
line-height: 26rpx;
margin-right: 24rpx;
}
.rightIcon{
.rightIcon {
width: 18rpx;
height: 18rpx;
}
}
.pickUp{
.pickUp {
display: flex;
justify-content: space-around;
margin-top: 26rpx;
.pickPeople{
.title{
.pickPeople {
.title {
height: 28rpx;
font-size: 20rpx;
font-family: PingFang SC, PingFang SC;
@ -366,7 +473,8 @@
color: #838383;
line-height: 28rpx;
}
.name{
.name {
height: 28rpx;
font-size: 20rpx;
font-family: PingFang SC, PingFang SC;
@ -374,7 +482,8 @@
color: #2C2C2C;
line-height: 28rpx;
margin-top: 10rpx;
.edit{
.edit {
width: 20rpx;
height: 20rpx;
}
@ -382,14 +491,16 @@
}
}
}
.leftText{
.leftText {
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #F21A1C;
line-height: 28rpx;
}
.address{
.address {
margin-left: 26rpx;
background-image: url('../../static/order/map.png');
width: 694rpx;
@ -397,34 +508,39 @@
display: flex;
align-items: center;
justify-content: space-between;
padding:0 52rpx 0 32rpx;
.addAddress{
padding: 0 52rpx 0 32rpx;
.addAddress {
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #F32E2E;
}
.leftImg{
.leftImg {
width: 18rpx;
height: 18rpx;
image{
image {
width: 100%;
height: 100%;
}
}
}
.preTime{
.preTime {
width: 694rpx;
height: 140rpx;
background: #FFFFFF;
border-radius: 10rpx 10rpx 10rpx 10rpx;
opacity: 1;
margin:12rpx 0 0 26rpx;
margin: 12rpx 0 0 26rpx;
display: flex;
justify-content: space-between;
padding: 34rpx 0 0 30rpx;
.left{
.bagImg{
.left {
.bagImg {
height: 30rpx;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
@ -432,14 +548,16 @@
color: #000000;
line-height: 30rpx;
margin-bottom: 10rpx;
.bag{
.bag {
width: 30rpx;
height: 30rpx;
}
}
}
.preText{
.preText {
height: 34rpx;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
@ -448,36 +566,41 @@
line-height: 34rpx;
}
}
.time{
.time {
display: flex;
width: 694rpx;
height: 90rpx;
background: #FFFFFF;
border-radius: 10rpx 10rpx 10rpx 10rpx;
opacity: 1;
margin:12rpx 0 0 26rpx;
margin: 12rpx 0 0 26rpx;
align-items: center;
justify-content: space-between;
padding: 0 32rpx 0 28rpx;
.youTime{
.youTime {
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #000000;
}
.leftImg{
.leftImg {
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #9E9E9E;
image{
image {
width: 18rpx;
height: 18rpx;
margin-left: 16rpx;
}
}
}
.goodsDetail{
.goodsDetail {
width: 694rpx;
height: 266rpx;
background: #FFFFFF;
@ -485,41 +608,49 @@
opacity: 1;
margin: 12rpx 0 0 26rpx;
padding: 32rpx 24rpx 24rpx 12rpx;
.goodsType{
.goodsType {
display: flex;
align-items: center;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #333333;
.bag{
.bag {
width: 30rpx;
height: 30rpx;
margin-right: 20rpx;
}
.leftIcon{
.leftIcon {
width: 18rpx;
height: 18rpx;
margin-left: 20rpx;
}
}
.goods{
.goods {
display: flex;
align-items: center;
margin-top: 28rpx;
.goodsImg{
.goodsImg {
width: 162rpx;
height: 148rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
opacity: 1;
image{
image {
width: 100%;
height: 100%;
}
}
.goodsInfo{
.goodsInfo {
margin-left: 20rpx;
.goodsName{
.goodsName {
height: 40rpx;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
@ -528,19 +659,22 @@
line-height: 40rpx;
margin-bottom: 4rpx;
}
.goodsPrice{
.goodsPrice {
height: 50rpx;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 600;
color: #F21A1C;
line-height: 50rpx;
text{
text {
font-size: 36rpx;
}
}
}
.goodsNum{
.goodsNum {
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
@ -549,15 +683,17 @@
}
}
}
.orderTips{
.orderTips {
width: 694rpx;
height: 342rpx;
background: #FFFFFF;
border-radius: 10rpx 10rpx 10rpx 10rpx;
opacity: 1;
margin:12rpx 0 0 26rpx;
margin: 12rpx 0 0 26rpx;
padding: 22rpx 36rpx 24rpx 24rpx;
.orderTitle{
.orderTitle {
margin-bottom: 24rpx;
display: flex;
justify-content: space-between;
@ -566,35 +702,42 @@
font-weight: 400;
color: #2D2D2D;
line-height: 34rpx;
.total{
.total {
font-size: 24rpx;
}
.price{
.couponNum{
.price {
.couponNum {
font-size: 28rpx;
color: #F42B17;
}
font-size: 28rpx;
image{
image {
width: 18rpx;
height: 18rpx;
margin-left: 18rpx;
}
}
}
.amount{
.amount {
display: flex;
justify-content: space-between;
margin-top: 20rpx;
.left{
.left {
width: 20rpx;
height: 34rpx;
}
.right{
.right {
display: flex;
align-items: center;
.totalNum{
.totalNum {
height: 34rpx;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
@ -602,24 +745,27 @@
color: #000000;
line-height: 34rpx;
}
.allPrice{
.allPrice {
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 600;
color: #F42B17;
line-height: 34rpx;
}
}
}
}
.line{
.line {
width: 100%;
height: 0rpx;
opacity: 1;
border: 2rpx solid #F1F1F1;
}
.payType{
.payType {
width: 694rpx;
height: 270rpx;
background: #FFFFFF;
@ -627,15 +773,18 @@
opacity: 1;
margin: 12rpx 0 0rpx 26rpx;
padding: 24rpx 26rpx 0;
.line{
.line {
margin-bottom: 24rpx;
}
.itemType{
.itemType {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 28rpx;
.payName{
.payName {
display: flex;
align-items: center;
height: 42rpx;
@ -644,20 +793,23 @@
font-weight: 400;
color: #000000;
line-height: 42rpx;
.payIcon{
.payIcon {
width: 42rpx;
height: 42rpx;
margin-right: 16rpx;
}
}
.chose{
.chose {
width: 34rpx;
height: 24rpx;
margin-right: 26rpx;
}
}
}
.footer{
.footer {
width: 100%;
height: 120rpx;
position: fixed;
@ -666,27 +818,31 @@
display: flex;
justify-content: space-between;
align-items: center;
.meetPrice{
margin-left:26rpx;
.meetPrice {
margin-left: 26rpx;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #000000;
.type{
.type {
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #F42B17;
margin-left: 12rpx;
}
.price{
.price {
font-size: 40rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 600;
color: #F42B17;
}
}
.btn{
.btn {
width: 214rpx;
height: 74rpx;
background: linear-gradient(180deg, #FD5D06 0%, #F3211A 100%);

@ -497,6 +497,7 @@
})
.then(result => {
that.userInfo = result.data.userInfo
uni.setStorageSync('userInfo',that.userInfo)
resolve(that.userInfo)
})
.catch(err => {

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Loading…
Cancel
Save