Merge branch 'main' into version/0412

version/0412
wangdong 6 months ago
commit 28457f3d3b
  1. 7
      api/captcha.js
  2. 4
      pages/activity/newPeople.vue
  3. 2
      pages/activity/seckill.vue
  4. 43
      pages/goods/detail.vue
  5. 12
      pages/index/index.vue
  6. 61
      pages/login/components/mp-weixin-mobile.vue
  7. 56
      pages/login/index.vue
  8. 4
      pages/user/index.vue
  9. BIN
      static/login_logo.png

@ -3,7 +3,8 @@ import request from '@/utils/request'
// api地址
const api = {
image: 'captcha/image',
sendSmsCaptcha: 'captcha/sendSmsCaptcha'
sendSmsCaptcha: 'captcha/sendSmsCaptcha',
getStoreInfo:'store/getStoreInfo'
}
// 图形验证码
@ -15,3 +16,7 @@ export function image() {
export function sendSmsCaptcha(data) {
return request.post(api.sendSmsCaptcha, data, { load: false })
}
// 发送短信验证码
export function getStoreInfo(data) {
return request.get(api.getStoreInfo, data, { load: false })
}

@ -27,7 +27,7 @@
<u-tabs :list="menuList" bg-color="#fafafa" inactive-color="#3C3C3C" active-color="#FF3C43"
:is-scroll="true" font-size="30" v-model="current" @change="onChosed"></u-tabs>
</view>
<view scroll-x class="b">
<view scroll-x class="b" style="display: flex;flex-wrap: wrap;justify-content:space-between">
<!-- <u-waterfall v-model="goodList" ref="uWaterfall1"> -->
<!-- <template v-slot:left="{leftList}"> -->
<view class="item" v-for="(item, index) in goodList" :key="index"
@ -60,8 +60,8 @@
</view>
</template> -->
<!-- </u-waterfall> -->
<u-empty text="暂无数据显示哦~" v-if="goodList.length==0" mode="list"></u-empty>
</view>
<u-empty text="暂无数据显示哦~" v-if="goodList.length==0" mode="list"></u-empty>
</view>
<view class="newpeople-fd" @click="openPage()">
<image :src="$picUrl+'/static/toTop.png?=1'"></image>

@ -268,7 +268,7 @@
handleTargetGoods(sharpGoodsId) {
let count_down_time = new Date(this.tabbar[this.curTabIndex].count_down_time.replace(/-/g, '/'))
.getTime() - new Date().getTime()
console.log(count_down_time)
uni.navigateTo({
url: '/pages/goods/seckillDetail?activeTimeId=' + this.getCurTabbarId() + '&sharpGoodsId=' + sharpGoodsId +
"&isSeckill=" + true + '&isBuy=' + count_down_time + '&seckillText=' + (this.tabbar[this

@ -33,7 +33,7 @@
<text class="sellLeft"></text>{{goods.line_price_min?Number(goods.line_price_min):0}}
</view>
</view>
<view class="right">
<view class="right" v-if="seckillCountTime==0">
<view class="rightPrice" v-if="goods.is_check==1">
<image :src="$picUrl+'/static/detail/shenhe.png'" style="width: 44rpx;height: 42rpx;"></image>
</view>
@ -45,16 +45,18 @@
<image :src="$picUrl+'/static/detail/sheng.png'" v-if="userInfo.user_type==20"></image>
<text class="span"
v-if="userInfo.user_type==40">{{goods.cost_price_min?Number(goods.cost_price_min):0}}</text>
<text class="span"
v-else>{{(goods.line_price_min>0&&goods.goods_price_min>0)?Number((Number(goods.line_price_min)-Number(goods.goods_price_min)).toFixed(2)):0}}</text>
<text
class="span">{{(goods.line_price_min>0&&goods.goods_price_min>0)?Number((Number(goods.line_price_min)-Number(goods.goods_price_min)).toFixed(2)):0}}</text>
</view>
<view class="rightBox" v-if="isSeckill" style="background:unset;padding:unset;">
</view>
<view class="right2" v-if="userInfo.user_type==40&&seckillCountTime>0">
<view class="rightBox" style="background:unset;padding:unset;">
<text class="span" style="color: #ffffff;font-size: 45rpx;font-family: STXinwei;">限时抢购</text>
</view>
<view class="rest" v-if="isSeckill"
<view class="rest"
style="display: inline-flex;color:#ffffff;font-size: 30rpx;margin-top: 5rpx;float: right;font-family: STXinwei;width: 300rpx;">
<text style="margin-right: 20rpx;font-family: STXinwei;">距活动{{seckillText}}</text>
<u-count-down :timestamp="isBuy" format="HH:mm:ss" autoStart
<text style="margin-right: 20rpx;font-family: STXinwei;">距活动结束</text>
<u-count-down :timestamp="seckillCountTime" format="HH:mm:ss" autoStart
@change="onChangeSeckillCutDownTime">
<view class="date-time" style="font-family: STXinwei;">
<text
@ -538,7 +540,8 @@
province: '江苏省',
city: '南京市',
district: '玄武区'
}
},
seckillCountTime: 0,
}
},
computed: {
@ -695,6 +698,7 @@
GoodsApi.editGoodsSeckillPrice(params).then(res => {
if (res.status == 200) {
that.$toast("设置成功");
that.getGoodsDetail()
this.$refs.setRange.afterSale = false;
setTimeout(() => {
that.getGoodsDetail(1);
@ -708,6 +712,7 @@
},
setPirce() {
let item = this.findItemById(this.goods.skuList, this.goods.goods_id)
console.log('item', item)
if (item) {
this.$refs.setRange.startTime = item.sec_start_time;
this.$refs.setRange.sec_hour = item.sec_hour
@ -989,6 +994,19 @@
GoodsApi.detail(this.goodsId)
.then(result => {
let info = result.data.detail;
let item = this.findItemById(info.skuList, info.goods_id)
if (item) {
if (item.sec_start_time) {
that.seckillCountTime = new Date(item.sec_start_time
.replace(/-/g, '/'))
.getTime() - new Date().getTime()
} else {
that.seckillCountTime = 0
}
} else {
that.seckillCountTime = 0
}
that.seckillCountTime = that.seckillCountTime > 0 ? that.seckillCountTime : 0
that.goods.skuList = [];
that.godds = {}
info.goods_images1 = []
@ -1413,11 +1431,18 @@
}
}
.right {
.right2 {
display: flex;
align-items: center;
margin-right: 40rpx;
flex-flow: column;
}
.right {
display: flex;
align-items: center;
margin-right: 40rpx;
// flex-flow: column;
.rightPrice {
overflow: hidden;

@ -169,7 +169,7 @@
</view>
<view class="goods-list" v-if="seckillList && seckillList.length>0">
<view class="list" v-for="(item, index) in seckillList" :key="index"
@click="handleTargetGoods(item.goods_id)">
@click="handleTargetGoods(item)">
<view class="pictrue">
<image :src="item.goods_image"></image>
</view>
@ -698,10 +698,10 @@
onChangeSeckillCutDownTime(e) {
this.timeData = e
},
//
handleTargetGoods(sharpGoodsId) {
//
handleTargetGoods(item) {
uni.navigateTo({
url: '/pages/goods/detail?goodsId=' + sharpGoodsId + "&isSeckill=" + true + '&isBuy=' + this
url: '/pages/goods/seckillDetail?sharpGoodsId=' + item.sharp_goods_id +'&activeTimeId='+this.tabbar[this.curTabIndex].active_time_id+ "&isSeckill=" + true + '&isBuy=' + this
.seckillCutDownTime + '&seckillText=' + (this.tabbar[this.curTabIndex].status == 10 ?
'结束' : '开始')
})
@ -951,7 +951,7 @@
is_brand: '',
is_new: 1,
order: '',
is_in_store: 0
is_in_store: ''
}
GoodsApi.brandList(param).then(res => {
let arr = res.data.data
@ -981,7 +981,7 @@
is_brand: this.current == 0 ? 1 : '',
is_new: '',
order: '',
is_in_store: this.current == 0 ? 0 : 1
is_in_store: this.current == 0 ? '' : 1
}
GoodsApi.brandList(param).then(res => {
let arr = res.data.data;

@ -1,12 +1,17 @@
<template>
<!-- 微信授权手机号一键登录 -->
<view class="wechat-auth">
<view class="wechat-auth" v-if="isNew==1">
<button class="btn-normal" open-type="getPhoneNumber" @getphonenumber="handelMpWeixinMobileLogin($event)">
<view class="wechat-auth-container">
<text class="title">手机号快捷登录</text>
</view>
</button>
</view>
<view class="wechat-new" v-if="isNew==2">
<button class="btn-normal" open-type="getPhoneNumber" @getphonenumber="handelMpWeixinMobileLogin($event)">
<view class="fd fd-on" @click="login">登录</view>
</button>
</view>
</template>
<script>
@ -18,10 +23,13 @@
import * as UserApi from '@/api/user'
export default {
props: {
// id
refereeId: {
type: String
},
// id
refereeId: {
type: String
},
isNew: {
type: String || Number
}
},
data() {
return {
@ -50,7 +58,7 @@
async handelMpWeixinMobileLogin({
detail
}) {
console.log("handelMpWeixinMobileLogin",detail)
console.log("handelMpWeixinMobileLogin", detail)
const app = this
app.code = await app.getCode()
if (detail.errMsg != 'getPhoneNumber:ok') {
@ -68,7 +76,7 @@
partyData: app.userInfo
})
.then(result => {
console.log("result",result)
console.log("result", result)
//
app.$toast(result.message);
app.getUserInfo()
@ -78,7 +86,7 @@
setTimeout(() => app.onNavigateBack(1), 2000)
})
.catch(err => {
console.log("err",err)
console.log("err", err)
const resultData = err.result.data
//
if (isEmpty(resultData)) {
@ -95,7 +103,7 @@
getUserInfo() {
UserApi.info()
.then(result => {
console.log("getUserInfo",result)
console.log("getUserInfo", result)
uni.setStorageSync('userInfo', result.data.userInfo)
})
},
@ -146,6 +154,39 @@
</script>
<style lang="scss" scoped>
.wechat-new {
width: 100%;
.fd {
width: 680rpx;
line-height: 88rpx;
background: rgba(243, 74, 64, 1);
border-radius: 88rpx;
text-align: center;
margin: 0 auto;
margin-top: 20rpx;
font-size: 28rpx;
font-weight: 600;
color: #ffffff;
.fd-on {
background-color: rgba(243, 74, 64, 1);
}
}
.wechat-auth-container {
display: flex;
justify-content: center;
}
.icon {
width: 38rpx;
height: 38rpx;
margin-right: 15rpx;
}
}
//
.wechat-auth {
width: 320rpx;
@ -167,4 +208,4 @@
color: #666666;
}
}
</style>
</style>

@ -1,5 +1,5 @@
<template>
<view class="login">
<!-- <view class="login">
<view class="refund-navbar">
<u-navbar title="" :border-bottom="false" :background="background"></u-navbar>
</view>
@ -21,7 +21,7 @@
</view>
<view class="login-fd login-fd-on" @click="login">登录</view>
<view class="" v-if="isCheckout">
<mpWeiXinMobile :refereeId="refereeId"></mpWeiXinMobile>
<mpWeiXinMobile :refereeId="refereeId" :isNew='1'></mpWeiXinMobile>
</view>
<view class="" v-else style="
font-size: 28rpx;
@ -31,22 +31,25 @@
" @click="login">
手机号快捷登录
</view>
</view>
<view class="login-box" style="display: none;">
</view> -->
<view class="login-box">
<view class="refund-navbar">
<u-navbar title="" :border-bottom="false" background="rgba(255, 233, 240, 1)"></u-navbar>
</view>
<view class="login-logo">
<image src="../../static/login_logo.png" mode=""></image>
<image :src="loginInfo.login_img" mode="widthFix"></image>
</view>
<view class="login-name">
京苏云商
{{loginInfo.store_name}}
</view>
<view class="c">
<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 class="fd fd-on" @click="login">登录</view>
<view class="" v-if="isCheckout">
<mpWeiXinMobile :isNew='2' :refereeId="refereeId"></mpWeiXinMobile>
</view>
<view class="fd fd-on" v-else @click="login">登录</view>
</view>
</template>
@ -80,6 +83,7 @@
countDownFun: null,
code: "",
refereeId: "",
loginInfo:{}
};
},
onLoad(o) {
@ -93,8 +97,25 @@
console.log(scene.refereeId)
console.log("refereeId", refereeId)
console.log(this.refereeId)
this.getLogoName()
},
methods: {
getLogoName() {
let that = this
CaptchaApi.getStoreInfo({
mobile: that.phoneNum
}).then((res) => {
if (res.status == 200) {
that.loginInfo=res.data
console.log(that.loginInfo)
} else {
uni.showToast({
icon: "none",
title: res.message,
});
}
});
},
toTextPage(n) {
uni.navigateTo({
url: "/pages/news1/text?pageFlag=" + n,
@ -226,30 +247,31 @@
<style lang="scss" scoped>
.login-box {
width: 100%;
background: linear-gradient(180deg, rgba(255, 233, 240, 1) 0%, rgba(226, 244, 243, 0) 35%);
background: linear-gradient(180deg, rgba(255, 233, 240, 1) 0%, rgba(226, 244, 243, 0) 30%);
min-height: 100vh;
height: 100%;
.login-logo {
margin: 365rpx auto 0 auto;
margin: 38% auto 0 auto;
width: 132rpx;
height: 132rpx;
border-radius: 24rpx;
background: rgba(243, 74, 64, 1);
box-shadow: -4rpx -8rpx 20rpx rgba(243, 74, 64, 0.16);
overflow: hidden;
// background: rgba(243, 74, 64, 1);
// box-shadow: -4rpx -8rpx 20rpx rgba(243, 74, 64, 0.16);
image {
width: 75rpx;
height: 85rpx;
margin: 23.5rpx 0 0 28.5rpx;
width: 100%;
height: 100%;
}
}
.login-name {
width: 100%;
text-align: center;
margin-bottom: 70rpx;
font-weight: bold;
font-size: 36rpx;
font-size: 38rpx;
color: rgba(243, 74, 64, 1);
margin-top: 22rpx;
}
@ -281,7 +303,7 @@
border-radius: 88rpx;
text-align: center;
margin: 0 auto;
margin-top: 50rpx;
margin-top: 20rpx;
font-size: 28rpx;
font-weight: 600;
color: #ffffff;

@ -430,7 +430,7 @@
物流查询
</view>
</view>
<view class="serveIcon" @click="goJump('/pages/news3/vipPrice?type=0')"
<!-- <view class="serveIcon" @click="goJump('/pages/news3/vipPrice?type=0')"
v-if="userInfo.user_type == 40">
<image :src="$picUrl+'/static/user/member.png'" class="icons"></image>
<view class="serveInfo">
@ -443,7 +443,7 @@
<view class="serveInfo">
分销价
</view>
</view>
</view> -->
<view class="serveIcon" @click="goJump('/pages/news1/MerchantSettlement')">
<image :src="$picUrl+'/static/user/checkIn.png'" class="icons"></image>
<view class="serveInfo">

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Loading…
Cancel
Save