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地址 // api地址
const api = { const api = {
image: 'captcha/image', image: 'captcha/image',
sendSmsCaptcha: 'captcha/sendSmsCaptcha' sendSmsCaptcha: 'captcha/sendSmsCaptcha',
getStoreInfo:'store/getStoreInfo'
} }
// 图形验证码 // 图形验证码
@ -15,3 +16,7 @@ export function image() {
export function sendSmsCaptcha(data) { export function sendSmsCaptcha(data) {
return request.post(api.sendSmsCaptcha, data, { load: false }) 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" <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> :is-scroll="true" font-size="30" v-model="current" @change="onChosed"></u-tabs>
</view> </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"> --> <!-- <u-waterfall v-model="goodList" ref="uWaterfall1"> -->
<!-- <template v-slot:left="{leftList}"> --> <!-- <template v-slot:left="{leftList}"> -->
<view class="item" v-for="(item, index) in goodList" :key="index" <view class="item" v-for="(item, index) in goodList" :key="index"
@ -60,8 +60,8 @@
</view> </view>
</template> --> </template> -->
<!-- </u-waterfall> --> <!-- </u-waterfall> -->
<u-empty text="暂无数据显示哦~" v-if="goodList.length==0" mode="list"></u-empty>
</view> </view>
<u-empty text="暂无数据显示哦~" v-if="goodList.length==0" mode="list"></u-empty>
</view> </view>
<view class="newpeople-fd" @click="openPage()"> <view class="newpeople-fd" @click="openPage()">
<image :src="$picUrl+'/static/toTop.png?=1'"></image> <image :src="$picUrl+'/static/toTop.png?=1'"></image>

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

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

@ -1,12 +1,17 @@
<template> <template>
<!-- 微信授权手机号一键登录 --> <!-- 微信授权手机号一键登录 -->
<view class="wechat-auth"> <view class="wechat-auth" v-if="isNew==1">
<button class="btn-normal" open-type="getPhoneNumber" @getphonenumber="handelMpWeixinMobileLogin($event)"> <button class="btn-normal" open-type="getPhoneNumber" @getphonenumber="handelMpWeixinMobileLogin($event)">
<view class="wechat-auth-container"> <view class="wechat-auth-container">
<text class="title">手机号快捷登录</text> <text class="title">手机号快捷登录</text>
</view> </view>
</button> </button>
</view> </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> </template>
<script> <script>
@ -18,10 +23,13 @@
import * as UserApi from '@/api/user' import * as UserApi from '@/api/user'
export default { export default {
props: { props: {
// id // id
refereeId: { refereeId: {
type: String type: String
}, },
isNew: {
type: String || Number
}
}, },
data() { data() {
return { return {
@ -50,7 +58,7 @@
async handelMpWeixinMobileLogin({ async handelMpWeixinMobileLogin({
detail detail
}) { }) {
console.log("handelMpWeixinMobileLogin",detail) console.log("handelMpWeixinMobileLogin", detail)
const app = this const app = this
app.code = await app.getCode() app.code = await app.getCode()
if (detail.errMsg != 'getPhoneNumber:ok') { if (detail.errMsg != 'getPhoneNumber:ok') {
@ -68,7 +76,7 @@
partyData: app.userInfo partyData: app.userInfo
}) })
.then(result => { .then(result => {
console.log("result",result) console.log("result", result)
// //
app.$toast(result.message); app.$toast(result.message);
app.getUserInfo() app.getUserInfo()
@ -78,7 +86,7 @@
setTimeout(() => app.onNavigateBack(1), 2000) setTimeout(() => app.onNavigateBack(1), 2000)
}) })
.catch(err => { .catch(err => {
console.log("err",err) console.log("err", err)
const resultData = err.result.data const resultData = err.result.data
// //
if (isEmpty(resultData)) { if (isEmpty(resultData)) {
@ -95,7 +103,7 @@
getUserInfo() { getUserInfo() {
UserApi.info() UserApi.info()
.then(result => { .then(result => {
console.log("getUserInfo",result) console.log("getUserInfo", result)
uni.setStorageSync('userInfo', result.data.userInfo) uni.setStorageSync('userInfo', result.data.userInfo)
}) })
}, },
@ -146,6 +154,39 @@
</script> </script>
<style lang="scss" scoped> <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 { .wechat-auth {
width: 320rpx; width: 320rpx;
@ -167,4 +208,4 @@
color: #666666; color: #666666;
} }
} }
</style> </style>

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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Loading…
Cancel
Save