所有商品价格改换goods_price_min

version/0412
fanfan 11 months ago
parent b6e54aa6cb
commit 6b24ab0c96
  1. 5
      pages/activity/charts.vue
  2. 4
      pages/activity/intimate.vue
  3. 3
      pages/activity/newGoods.vue
  4. 20
      pages/activity/newPeople.vue
  5. 4
      pages/activity/newsshop.vue
  6. 3
      pages/activity/presale.vue
  7. 51
      pages/activity/ranking.vue
  8. 176
      pages/cart/index.vue
  9. 4
      pages/coupon/index.vue
  10. 8
      pages/index/index.vue
  11. 538
      pages/login/index.vue
  12. 14
      pages/news/coupon/index.vue
  13. 1
      pages/news3/ManualEntry.vue
  14. 3
      pages/user/index.vue
  15. 2
      pages/user/vip/goods.vue

@ -92,11 +92,14 @@
getListJingData(categoryId) {
let app = this;
let pamars = {
store_id: 10001,
// store_id: 10001,
categoryId: categoryId,
}
Api.chartsGoodsList(pamars)
.then(result => {
result.data.data.forEach(item => {
item.goods_price_min = Number(item.goods_price_min);
});
app.jingList = result.data.data;
})
.finally(() => app.isLoading = false)

@ -106,6 +106,10 @@
order_sort: this.filterFlag?"desc":"asc"
});
if(status == 200){
data.list.map(a => {
a.server_price = Number(a.server_price);
a.line_price = Number(a.line_price)
})
this.list1 = data.list
this.isShow = data.total == 0?true:false
}

@ -84,6 +84,9 @@
}
Api.brandList(pamars)
.then(result => {
result.data.data.map(a => {
a.goods_price_min = Number(a.goods_price_min)
})
app.list = result.data.data;
})
.finally(() => app.isLoading = false)

@ -32,7 +32,7 @@
</view>
<view class="price">
<view class="n"><text>{{item.goods_price_min}}</text>到手价</view>
<view class="o">{{item.goods_price_min}}</view>
<view class="o">{{item.line_price_min}}</view>
</view>
<!-- <view class="desc">
{{item.goods_sales}}+条评论 {{item.remaizhishu}}%好评率
@ -72,12 +72,14 @@
},
methods: {
//
async getUseCoupons(item){
async getUseCoupons(item) {
let {
status,
message,
data
} = await Api.receive({couponId:item.coupon_id});
} = await Api.receive({
couponId: item.coupon_id
});
if (status == 200) {
uni.showToast({
title: "领取成功"
@ -93,6 +95,10 @@
data
} = await Api.couponList();
if (status == 200) {
data.list.forEach(item => {
item.reduce_price = Number(item.reduce_price)
item.min_price = Number(item.min_price)
});
this.couList = data.list
}
},
@ -105,6 +111,10 @@
}
Api.chartsGoodsList(pamars)
.then(result => {
result.data.data.map(a => {
a.goods_price_min = Number(a.goods_price_min);
a.line_price_min = Number(a.line_price_min)
})
app.goodList = result.data.data;
})
.finally(() => app.isLoading = false)
@ -114,10 +124,10 @@
app.current = index;
app.getListgoodData(index != 0 ? app.menuList[index].category_id : '')
},
openPage(){
openPage() {
uni.pageScrollTo({
scrollTop: 0
})
})
},
//
async getListCharts() {

@ -81,10 +81,10 @@
Api.detail(pamars)
.then(result => {
result.data.col.forEach(item => {
item.sliceIndex = 6
item.sliceIndex = 6;
item.goods_price_min = Number(item.goods_price_min);
});
this.shopList = result.data.col;
console.log(this.shopList)
})
.finally()
},

@ -73,6 +73,9 @@
}
Api.presaleGoodsList(pamars)
.then(result => {
result.data.list.map(a => {
a.goods_price_min = Number(a.goods_price_min);
})
app.goodList = result.data.list;
})
.finally(() => app.isLoading = false)

@ -3,7 +3,8 @@
<!-- :style="{backgroundImage:'url('+backgroundImg+')'}" -->
<!-- <view class="rule" @click="openPage()">规则</view> -->
<view>
<u-navbar title="排行榜" back-icon-color="#fff" :border-bottom="false" title-color="#fff" :background="background"></u-navbar>
<u-navbar title="排行榜" back-icon-color="#fff" :border-bottom="false" title-color="#fff"
:background="background"></u-navbar>
</view>
<!-- <image :src="$picUrl+'/static/rank/rangkImg.png'" mode="" class="bgImg"></image> -->
<view class="headTitle">
@ -22,7 +23,8 @@
</view>
</scroll-view>
</view>
<view class="rankList" v-for="(item,index) in jingList" :key="index" style="background-color: #fff;padding: 32rpx;">
<view class="rankList" v-if="chosed==0" v-for="(item,index) in jingList" :key="index"
style="background-color: #fff;padding: 32rpx;">
<view class="firLine" @click="goDetailMore(item.category_id,item.name)">
<view class="hotTitle">{{item.name}}热销榜</view>
<view class="opera">
@ -31,9 +33,10 @@
</view>
</view>
<view class="goodsList">
<view class="goodsItem" v-for="(item_1,index) in item.goods_list" :key="index" v-if="index < 3" @click="goDetail(item_1.goods_id)">
<view class="goodsItem" v-for="(item_1,index) in item.goods_list" :key="index" v-if="index < 3"
@click="goDetail(item_1.goods_id)">
<image :src="$picUrl+'/static/rank/topOne.png'" class="topOne" v-if="index==0"></image>
<image :src="$picUrl+'/static/rank/topTwo.png'" class="topOne" v-if="index==1"></image>
<image :src="$picUrl+'/static/rank/topTwo.png'" class="topOne" v-if="index==1"></image>
<image :src="$picUrl+'/static/rank/topThree.png'" class="topOne" v-if="index==2"></image>
<image :src="item_1.goods_image" mode="" class="goodsImg"></image>
<view class="goodsName">
@ -50,8 +53,8 @@
<view class="goodsList1" v-for="(item,index) in goodList" :key="index">
<view class="goodsDetail1">
<image :src="$picUrl+'/static/rank/topOne.png'" class="topOne1" v-if="index==0"></image>
<image :src="$picUrl+'/static/rank/topTwo.png'" class="topOne1" v-if="index==1"></image>
<image :src="$picUrl+'/static/rank/topThree.png'" class="topOne1" v-if="index==2"></image>
<image :src="$picUrl+'/static/rank/topTwo.png'" class="topOne1" v-if="index==1"></image>
<image :src="$picUrl+'/static/rank/topThree.png'" class="topOne1" v-if="index==2"></image>
<view class="goodsInfo1">
<image :src="item.goods_image" class="goodsImg1"></image>
<view class="goodsName1">
@ -90,7 +93,6 @@
},
category_id: "",
chosed: 0,
jingListAll: [],
menuList: [],
backgroundImg: '',
jingList: [],
@ -129,19 +131,26 @@
}
Api.chartsGoodsJing(pamars)
.then(result => {
result.data.forEach(item => {
item.goods_list.forEach(item1 => {
item1.goods_price_min = Number(item1.goods_price_min);
})
});
app.jingList = result.data;
app.jingListAll = result.data;
})
.finally(() => app.isLoading = false)
},
getListgoodData(categoryId) {
let app = this;
let pamars = {
store_id: 10001,
// store_id: 10001,
categoryId: categoryId,
}
Api.chartsGoodsList(pamars)
.then(result => {
result.data.data.forEach(item => {
item.goods_price_min = Number(item.goods_price_min);
});
app.goodList = result.data.data;
})
.finally(() => app.isLoading = false)
@ -149,19 +158,14 @@
onChosed(item, index) {
let app = this;
app.chosed = index;
if(index == 0){
app.jingList = app.jingListAll;
}else{
app.jingList = app.jingListAll.filter(a=>a.category_id == item.category_id);
}
app.getListgoodData(item.category_id)
},
//
getListCharts() {
let app = this
app.menuList = []
let pamars = {
store_id: 10001
// store_id: 10001
}
Api.charts(pamars)
.then(result => {
@ -196,6 +200,7 @@
padding-bottom: 30rpx;
background: #F34A40 url(https://www.royaum.com.cn/static/rank/rank1.png) center top no-repeat;
background-size: 100% auto;
.bgImg {
width: 100%;
height: 100%;
@ -270,9 +275,11 @@
width: 702rpx;
border-radius: 18rpx;
margin: 28rpx auto;
.firLine {
display: flex;
justify-content: space-between;
.hotTitle {
height: 50rpx;
font-size: 36rpx;
@ -284,6 +291,7 @@
.opera {
display: flex;
align-items: center;
text {
height: 44rpx;
font-size: 32rpx;
@ -304,9 +312,11 @@
display: flex;
margin-top: 86rpx;
margin-left: 18rpx;
.goodsItem {
position: relative;
width: 33.3%;
.topOne {
width: 48rpx;
height: 66rpx;
@ -339,7 +349,8 @@
font-size: 24rpx;
color: #DE041C;
line-height: 50rpx;
text{
text {
font-size: 36rpx;
font-weight: 600;
}
@ -353,6 +364,7 @@
background: #FCE5C6;
border-radius: 18rpx;
margin-bottom: 42rpx;
.goodsDetail1 {
width: 700rpx;
height: 336rpx;
@ -360,6 +372,7 @@
background: #FFFFFF;
border-radius: 18rpx;
position: relative;
.topOne1 {
width: 73rpx;
height: 100rpx;
@ -370,11 +383,13 @@
.goodsInfo1 {
display: flex;
.goodsImg1 {
width: 224rpx;
height: 224rpx;
margin-right: 20rpx;
}
.goodsName1 {
.name1 {
width: 396rpx;
@ -435,6 +450,7 @@
color: #301F14;
line-height: 44rpx;
margin-left: 30rpx;
text {
font-size: 48rpx;
font-weight: 600;
@ -456,6 +472,7 @@
display: flex;
align-items: center;
justify-content: center;
.right1 {
width: 18rpx;
height: 27rpx;

@ -43,8 +43,8 @@
<text class="value">{{ item.goods.skuInfo.goods_price }}</text>
</view>
<view class="stepper">
<u-number-box :min="1" class='countNumber' :modelValue="item.goods_num" :step="1"
@change="onChangeStepper($event, item)" />
<u-number-box :min="1" class='countNumber' :modelValue="item.goods_num" :step="1" @change="onChangeStepper($event, item)" />
</view>
</view>
</view>
@ -61,7 +61,35 @@
</empty>
<!-- 商品推荐 -->
<recommended />
<view class="goodsRecommend-title">
<image :src="$picUrl+'/static/user/left.png'"></image>为您推荐<image :src="$picUrl+'/static/user/right.png'"></image>
</view>
<view class="goodsRecommend">
<view class="goodsItem" v-for="(item,index) in goodsRecommend" @click="onTargetGoods(item.goods_id)" :key="index">
<view class="pic">
<image :src="item.goods_image" mode=""></image>
</view>
<view class="goodsInfo">
<view class="title">
<text v-if="item.selling_point" class="ziying">{{item.selling_point}}</text>
<text class="name">{{item.goods_name}}</text>
</view>
<view class="isExpress">
<text>包邮</text>
</view>
<view class="price">
<text style="font-size: 20rpx;"></text>
<text style="font-weight: bold;font-size: 36rpx;">{{item.goods_price_min}}</text>
<text style="font-size: 20rpx;margin-left:10rpx;">到手价</text>
<text style="color: #949494;font-size: 22rpx;text-decoration: line-through;">{{item.line_price_min}}</text>
</view>
<!-- <view class="comment">
<text>{{item.goods_sales}}条评论</text>
<text style="margin-left:20rpx;">{{item.remaizhishu}}%好评率</text>
</view> -->
</view>
</view>
</view>
<!-- 底部操作栏 -->
<view v-if="list.length" class="footer-fixed">
@ -96,7 +124,7 @@
<script>
import Empty from '@/components/empty'
import Recommended from '@/components/recommended'
// import Recommended from '@/components/recommended'
import {
inArray,
arrayIntersect,
@ -108,16 +136,16 @@
setCartTabBadge
} from '@/core/app'
import * as CartApi from '@/api/cart'
import * as Api from '@/api/goods'
const CartIdsIndex = 'CartIds'
export default {
components: {
Empty,
Recommended
Empty
},
data() {
return {
goodsRecommend:[],
inArray,
//
isLoading: true,
@ -152,7 +180,9 @@
setCartTabBadge()
}
},
onReady() {
this.getSuggest();
},
/**
* 生命周期函数--监听页面显示
*/
@ -164,7 +194,22 @@
},
methods: {
getSuggest() {
//
Api.recommended().then(res => {
let arr = res.data.goodsList
if(arr && arr.length > 0){
arr.map(a=>{
a.goods_price_min = Number(a.goods_price_min)
a.goods_price_max = Number(a.goods_price_max)
a.line_price_min = Number(a.line_price_min)
a.line_price_max = Number(a.line_price_max)
})
}
this.goodsRecommend = arr
})
},
// ()
onCalcTotalPrice() {
const app = this
@ -277,7 +322,11 @@
const app = this
if (app.checkedIds.length) {
const cartIds = app.checkedIds.join()
app.$navTo('pages/checkout/index', {
// app.$navTo('pages/checkout/index', {
// mode: 'cart',
// cartIds
// })
app.$navTo('pages/sureOrder/index', {
mode: 'cart',
cartIds
})
@ -326,7 +375,107 @@
.container {
padding-bottom: 120rpx;
}
.goodsRecommend-title{
padding: 20rpx 25rpx;
display: flex;
align-items: center;
font-size: 32rpx;
font-weight: 600;
color: #3B3B3B;
justify-content: center;
image{
width: 30rpx;
height: 30rpx;
margin: 0 10rpx;
}
}
.goodsRecommend{
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
padding:10rpx 25rpx 25rpx;
.goodsItem{
width: 340rpx;
border-radius: 8rpx;
overflow: hidden;
background-color: #ffffff;
margin-bottom:24rpx;
padding: 20rpx;
box-sizing: border-box;
.pic{
width: 100%;
text-align: center;
image{
// width:100%;
width:256rpx;
height:256rpx;
}
}
.goodsInfo{
.title{
display: flex;
align-items: center;
margin-top:14rpx;
.ziying{
padding:4rpx 10rpx;
background: #FF4438;
border-radius: 2px 2px 2px 2px;
opacity: 1;
font-size: 24rpx;
font-weight: 400;
color: #FFFFFF;
}
.name{
margin-left:6rpx;
font-size: 24rpx;
font-weight: 400;
color: #1E1E1E;
flex:1;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.isExpress{
height: 30rpx;
display: flex;
align-items: center;
margin:10rpx 0;
text{
display:inline-block;
width: 44rpx;
height:30rpx;
line-height: 28rpx;
border: 1px solid #F21A1C;
border-radius: 2px 2px 2px 2px;
background: #FFFFFF;
text-align: center;
font-size: 16rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #F21A1C;
}
}
.price{
color: #F21A1C;
display: flex;
align-items: baseline;
}
.comment{
margin-top: 6rpx;
font-size: 22rpx;
font-weight: 400;
color: #949494;
}
}
}
}
//
.head-info {
display: flex;
@ -430,7 +579,7 @@
.goods-price {
vertical-align: bottom;
color: $main-bg;
flex: 1;
.unit {
font-size: 24rpx;
}
@ -445,12 +594,14 @@
}
.stepper {
flex: 1;
display: flex;
// width: 154rpx;
height: 56rpx;
background: #FFFFFF;
border-radius: 76rpx 76rpx 76rpx 76rpx;
opacity: 1;
margin-right: 20rpx;
// border: 2rpx solid #E6E6E6;
.del {
@ -535,6 +686,7 @@
padding-right: 30rpx;
.goods-price {
flex: 1;
vertical-align: bottom;
color: $main-bg;

@ -83,6 +83,10 @@
app.isLoading = true
CouponApi.list({}, { load })
.then(result => {
result.data.list.forEach(item => {
item.min_price = Number(item.min_price);
item.reduce_price = Number(item.reduce_price);
});
app.list = result.data.list
})
.finally(() => app.isLoading = false)

@ -727,7 +727,7 @@
},
getTypeList() {
GoodsApi.typeList({
is_in_store: this.current==0?'':1
is_in_store: this.current==0?0:1
}).then(res => {
if (res.status == 200) {
this.tabList = res.data.list;
@ -736,7 +736,7 @@
this.getRankingList(this.tabList[0].category_id)
this.getNewGoods(this.tabList[0].category_id)
}
this.getBigList(this.current==0?(this.tabList[0].category_id):(this.tabList[this.tabCurrent].category_id))
this.getBigList(this.tabList[0].category_id)
}
})
},
@ -843,7 +843,7 @@
is_brand: '',
is_new: 1,
order: 1,
is_in_store:''
is_in_store:0
}
GoodsApi.brandList(param).then(res => {
let arr = res.data.data
@ -873,7 +873,7 @@
is_brand: this.current==0?1:'',
is_new: '',
order: 1,
is_in_store: this.current==0?'':1
is_in_store: this.current==0?0:1
}
GoodsApi.brandList(param).then(res => {
let arr = res.data.data;

@ -1,271 +1,309 @@
<template>
<view class="login">
<view class="refund-navbar">
<u-navbar title="" :border-bottom="false" :background="background"></u-navbar>
</view>
<view class="login-hd">
<view class="a">验证码登录</view>
<view class="b">若该手机号未注册我们将自动为您注册</view>
</view>
<view class="login-bd">
<view class="a">+86<input v-model="phoneNum" type="tel" placeholder="请输入手机号" /></view>
<view class="b">
<input v-model="semCode" placeholder="请输入验证码" />
<text @click="getCode" v-if="!showCountDown">获取验证码</text>
<text v-if="showCountDown">{{countdown}}</text>
</view>
<view class="c" style="display: flex;align-items: center;">
<u-checkbox active-color="#FF343C" v-model="isCheckout" style="margin-right: -20rpx;"></u-checkbox>同意<text @click="toTextPage(1)">《用户服务协议》</text>和<text @click="toTextPage(2)">隐私政策</text>
</view>
</view>
<view class="login-fd login-fd-on" @click="login">登录</view>
<view class="" v-if="isCheckout">
<mpWeiXinMobile :refereeId="refereeId"></mpWeiXinMobile>
</view>
<view class="" v-else style="font-size: 28rpx;color: #666;text-align: center;margin-top: 50rpx;" @click="login">
手机号快捷登录
</view>
</view>
<view class="login">
<view class="refund-navbar">
<u-navbar
title=""
:border-bottom="false"
:background="background"
></u-navbar>
</view>
<view class="login-hd">
<view class="a">验证码登录</view>
<view class="b">若该手机号未注册我们将自动为您注册</view>
</view>
<view class="login-bd">
<view class="a"
>+86<input v-model="phoneNum" type="tel" placeholder="请输入手机号"
/></view>
<view class="b">
<input v-model="semCode" placeholder="请输入验证码" />
<text @click="getCode" v-if="!showCountDown">获取验证码</text>
<text v-if="showCountDown">{{ countdown }}</text>
</view>
<view class="c" style="display: flex; align-items: center">
<u-checkbox
active-color="#FF343C"
v-model="isCheckout"
style="margin-right: -20rpx"
></u-checkbox
>同意<text @click="toTextPage(1)">用户服务协议</text><text
@click="toTextPage(2)"
>隐私政策</text
>
</view>
</view>
<view class="login-fd login-fd-on" @click="login">登录</view>
<view class="" v-if="isCheckout">
<mpWeiXinMobile :refereeId="refereeId"></mpWeiXinMobile>
</view>
<view
class=""
v-else
style="
font-size: 28rpx;
color: #666;
text-align: center;
margin-top: 50rpx;
"
@click="login"
>
手机号快捷登录
</view>
</view>
</template>
<script>
import * as UserApi from '@/api/user'
import * as CaptchaApi from '@/api/captcha';
import mpWeiXinMobile from './components/mp-weixin-mobile.vue'
import store from '@/store';
import {
isEmpty
} from '@/utils/util'
export default {
components: {
mpWeiXinMobile
},
data() {
return {
isCheckout: false,
showCountDown: false,
currentIndex: 0,
background: {
background: `url(${this.$picUrl}/static/news/login-bg.png) center top no-repeat`,
backgroundSize: '100% auto',
},
phoneNum: '',
semCode: '',
countdown: 60,
countDownFun: null,
code: '',
refereeId: ""
}
},
onLoad(o) {
this.refereeId = o.refereeId
},
methods: {
toTextPage(n) {
uni.navigateTo({
url: "/pages/news1/text?pageFlag=" + n
})
},
validatePhoneNumber(phone) {
//
var regExp = /^1[3456789]\d{9}$/;
import * as UserApi from "@/api/user";
import * as CaptchaApi from "@/api/captcha";
import mpWeiXinMobile from "./components/mp-weixin-mobile.vue";
import store from "@/store";
import { isEmpty } from "@/utils/util";
export default {
components: {
mpWeiXinMobile,
},
data() {
return {
isCheckout: false,
showCountDown: false,
currentIndex: 0,
background: {
background: `url(${this.$picUrl}/static/news/login-bg.png) center top no-repeat`,
backgroundSize: "100% auto",
},
phoneNum: "",
semCode: "",
countdown: 60,
countDownFun: null,
code: "",
refereeId: "",
};
},
onLoad(o) {
this.refereeId = o.refereeId;
},
methods: {
toTextPage(n) {
uni.navigateTo({
url: "/pages/news1/text?pageFlag=" + n,
});
},
validatePhoneNumber(phone) {
//
var regExp = /^1[3456789]\d{9}$/;
if (regExp.test(phone)) {
return true; //
} else {
return false; //
}
},
getCode() {
//
const that = this
if (!that.validatePhoneNumber(that.phoneNum)) {
uni.showToast({
title: '请输入正确的手机号'
})
return
}
that.showCountDown = !that.showCountDown
that.countDownFun = setInterval(() => {
if (that.countdown >= 1) {
that.countdown = that.countdown - 1
} else {
that.showCountDown = false
that.countdown = 60
clearInterval(that.countDownFun)
}
}, 1000)
CaptchaApi.sendSmsCaptcha({
form: {
mobile: that.phoneNum
}
}).then(res => {
if (res.status == 200) {
uni.showToast({
title: res.message
})
} else {
uni.showToast({
title: res.message
})
}
})
},
login() {
let that = this;
if(that.isCheckout == false){
that.$toast('请勾选用户协议')
return ;
}
//
if (!that.validatePhoneNumber(that.phoneNum)) {
that.$toast('请输入正确的手机号')
return
}
if (that.semCode == '') {
that.$toast('请输入验证码')
return
}
uni.login({
provider: 'weixin',
success: function(res) {
store.dispatch('Login', {
smsCode: that.semCode,
mobile: that.phoneNum,
refereeId: that.refereeId,
isParty: false,
partyData: {},
ucode:res.code
// refereeId: false
}).then(res => {
uni.setStorageSync('token', res.data.token)
that.$toast(res.message)
that.getUserInfo()
setTimeout(() => that.onNavigateBack(1), 2000)
})
}
});
},
getUserInfo() {
UserApi.info()
.then(result => {
uni.setStorageSync('userInfo', result.data.userInfo)
})
},
onNavigateBack(delta = 1) {
//
const pages = getCurrentPages()
if (pages.length > 1) {
uni.navigateBack({
delta: Number(delta || 1)
})
} else {
this.$navTo('pages/index/index')
}
}
if (regExp.test(phone)) {
return true; //
} else {
return false; //
}
},
getCode() {
//
const that = this;
if (!that.validatePhoneNumber(that.phoneNum)) {
uni.showToast({
title: "请输入正确的手机号",
});
return;
}
that.showCountDown = !that.showCountDown;
that.countDownFun = setInterval(() => {
if (that.countdown >= 1) {
that.countdown = that.countdown - 1;
} else {
that.showCountDown = false;
that.countdown = 60;
clearInterval(that.countDownFun);
}
}, 1000);
CaptchaApi.sendSmsCaptcha({
form: {
mobile: that.phoneNum,
},
}).then((res) => {
if (res.status == 200) {
uni.showToast({
title: res.message,
});
} else {
uni.showToast({
title: res.message,
});
}
});
},
login() {
let that = this;
if (that.isCheckout == false) {
that.$toast("请勾选用户协议");
return;
}
//
if (!that.validatePhoneNumber(that.phoneNum)) {
that.$toast("请输入正确的手机号");
return;
}
if (that.semCode == "") {
that.$toast("请输入验证码");
return;
}
uni.login({
provider: "weixin",
success: function (res) {
store
.dispatch("Login", {
smsCode: that.semCode,
mobile: that.phoneNum,
refereeId: that.refereeId,
isParty: false,
partyData: {},
ucode: res.code,
// refereeId: false
})
.then((res) => {
uni.setStorageSync("token", res.data.token);
that.$toast(res.message);
that.getUserInfo();
setTimeout(() => that.onNavigateBack(1), 2000);
});
},
fail:function(){
store
.dispatch("Login", {
smsCode: that.semCode,
mobile: that.phoneNum,
refereeId: that.refereeId,
isParty: false,
partyData: {},
// ucode: res.code,
// refereeId: false
})
.then((res) => {
uni.setStorageSync("token", res.data.token);
that.$toast(res.message);
that.getUserInfo();
setTimeout(() => that.onNavigateBack(1), 2000);
});
}
}
});
},
getUserInfo() {
UserApi.info().then((result) => {
uni.setStorageSync("userInfo", result.data.userInfo);
});
},
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>
.login {
width: 100%;
background: #fffafb url(https://www.royaum.com.cn/static/news/login-bg.png) center top no-repeat;
background-size: 100% auto;
min-height: 100vh;
.login {
width: 100%;
background: #fffafb url(https://www.royaum.com.cn/static/news/login-bg.png)
center top no-repeat;
background-size: 100% auto;
min-height: 100vh;
&-hd {
padding: 90rpx 75rpx 75rpx;
overflow: hidden;
&-hd {
padding: 90rpx 75rpx 75rpx;
overflow: hidden;
.a {
line-height: 80rpx;
font-size: 40rpx;
font-weight: 500;
color: #000000;
}
.a {
line-height: 80rpx;
font-size: 40rpx;
font-weight: 500;
color: #000000;
}
.b {
font-size: 28rpx;
font-weight: 400;
color: #5A5A5A;
line-height: 50rpx;
}
}
.b {
font-size: 28rpx;
font-weight: 400;
color: #5a5a5a;
line-height: 50rpx;
}
}
&-bd {
padding: 0 75rpx;
overflow: hidden;
&-bd {
padding: 0 75rpx;
overflow: hidden;
.a {
padding: 20rpx 0;
border-bottom: 1px solid #F2F2F2;
display: flex;
align-items: center;
font-size: 32rpx;
font-weight: 400;
color: #212121;
.a {
padding: 20rpx 0;
border-bottom: 1px solid #f2f2f2;
display: flex;
align-items: center;
font-size: 32rpx;
font-weight: 400;
color: #212121;
input {
flex: 1;
margin-left: 30rpx;
line-height: 50rpx;
border-left: 1px solid #C4C4C4;
padding-left: 30rpx;
font-size: 28rpx;
color: #212121;
}
}
input {
flex: 1;
margin-left: 30rpx;
line-height: 50rpx;
border-left: 1px solid #c4c4c4;
padding-left: 30rpx;
font-size: 28rpx;
color: #212121;
}
}
.b {
padding: 30rpx 0;
border-bottom: 1px solid #F2F2F2;
display: flex;
align-items: center;
font-size: 28rpx;
font-weight: 400;
color: #F3202A;
.b {
padding: 30rpx 0;
border-bottom: 1px solid #f2f2f2;
display: flex;
align-items: center;
font-size: 28rpx;
font-weight: 400;
color: #f3202a;
input {
flex: 1;
margin-right: 30rpx;
line-height: 50rpx;
font-size: 28rpx;
color: #212121;
}
}
input {
flex: 1;
margin-right: 30rpx;
line-height: 50rpx;
font-size: 28rpx;
color: #212121;
}
}
.c {
padding: 28rpx 0;
font-size: 28rpx;
font-weight: 400;
color: #A0A0A0;
.c {
padding: 28rpx 0;
font-size: 28rpx;
font-weight: 400;
color: #a0a0a0;
text {
color: #FF343C;
}
}
}
text {
color: #ff343c;
}
}
}
&-fd {
width: 680rpx;
line-height: 88rpx;
background: #FFBDBA;
border-radius: 88rpx;
text-align: center;
margin: 0 auto;
margin-top: 120rpx;
font-size: 28rpx;
font-weight: 600;
color: #FFFFFF;
&-fd {
width: 680rpx;
line-height: 88rpx;
background: #ffbdba;
border-radius: 88rpx;
text-align: center;
margin: 0 auto;
margin-top: 120rpx;
font-size: 28rpx;
font-weight: 600;
color: #ffffff;
&-on {
background-color: #FF343C;
}
}
}
</style>
&-on {
background-color: #ff343c;
}
}
}
</style>

@ -21,7 +21,7 @@
</view>
</view>
<view class="nolist" v-if="couponList.length==0">
<image :src="$picUrl+'/static/news/icon-coupon-03.png'"></image>
<image :src="$picUrl+'/static/news/icon-coupon-03.png'"></image>
<view class="txt">暂无已使用优惠券</view>
</view>
<view class="footer" @click="goMyCoupon">
@ -49,6 +49,10 @@
if (index == 0) {
CouponApi.list()
.then(res => {
res.data.list.forEach(item => {
item.min_price = Number(item.min_price);
item.reduce_price = Number(item.reduce_price);
});
that.couponList = res.data.list
})
.finally(() => that.isLoading = false)
@ -80,7 +84,7 @@
})
.finally(() => that.isLoading = false)
},
goMyCoupon(){
goMyCoupon() {
uni.navigateTo({
url: "/pages/news/coupon/list"
})
@ -149,6 +153,7 @@
&-bd {
padding: 0 40rpx 180rpx;
overflow: hidden;
.item {
width: 662rpx;
height: 366rpx;
@ -231,8 +236,9 @@
line-height: 148rpx;
background: linear-gradient(180deg, #FFFFFF 0%, #FEEECA 100%);
z-index: 999;
.fooIcon{
.fooIcon {
margin-left: 36rpx;
}
}
</style>
</style>

@ -290,7 +290,6 @@
}
},
regionChage(e) {
console.log(e)
this.city = e.province.name + e.city.name + e.area.name;
this.form.province_id = e.province.code;
this.form.city_id = e.city.code

@ -1116,6 +1116,9 @@
flex-direction: column;
justify-content: space-between;
margin: 2rpx 0 0 24rpx;
button:after{
border: none !important;
}
}
.image-text_1 {

@ -117,7 +117,7 @@
is_new: '',
categoryId: categoryId,
order: app.orderSort,
is_in_store:this.type==1?1:''
is_in_store:this.type==1?1:0
}
Api.brandList(pamars)
.then(result => {

Loading…
Cancel
Save