Commit 1670b44a by wangjian

Merge branch 'dev'

* dev: (64 commits) 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 解决bug 1 ... # Conflicts: # unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/mine.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/order.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pagesA/login/login.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pagesA/selectAccount/selectAccount.js.map # unpackage/dist/dev/mp-weixin/app.json # unpackage/dist/dev/mp-weixin/common/main.js # unpackage/dist/dev/mp-weixin/common/vendor.js # unpackage/dist/dev/mp-weixin/pages/mine/mine.js # unpackage/dist/dev/mp-weixin/pages/order/order.js # unpackage/dist/dev/mp-weixin/pagesA/login/login.js # unpackage/dist/dev/mp-weixin/pagesA/selectAccount/selectAccount.js
parents 42c5be5d f65e9f72
/unpackage/
unpackage/
\ No newline at end of file
.hbuilderx
unpackage
node_modules
package-lock.json
/unpackage/
unpackage/
\ No newline at end of file
......@@ -19,7 +19,7 @@
uni.hideShareMenu({});
},
onShow: function() {
console.log('App Show')
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
......
import store from '../store/index.js';
import router from '../router/router.js'
// 测试环境
const base_url = 'https://sandbox-api-welfare.wasair.com/api.v1/lite'
......@@ -16,7 +17,14 @@ export function post (url, params) {
header: headerCom(params),
data: newParams,
success(res) {
if(res.code == 302) {
if (res.data.code == 301 && newParams.refreshToken!=='not') {
tokenSave('')
store.commit('refreshUserInfo', {})
router.push('AlertToLogin', {'message': res.message || '未知错误'})
return
}
if(res.data.code == 302) {
tokenSave(res.data.token)
post(url, params)
return
......@@ -53,7 +61,13 @@ export function get (url, params) {
header: headerCom(params),
data: newParams,
success(res) {
if(res.code == 302) {
if (res.data.code == 301 && newParams.refreshToken!=='not') {
tokenSave('')
store.commit('refreshUserInfo', {})
router.push('AlertToLogin', {'message': res.message || '未知错误'})
return
}
if(res.data.code == 302) {
tokenSave(res.data.token)
post(url, params)
return
......@@ -133,26 +147,19 @@ export function tokenDiffTIme (tokenStr) {
// 重新获取token 并记录
export function refreshToken (token) {
post('/user/refresh/token', {'token':token,'resetToken':'not'}).then((res) => {
if (res.code == 200) {
let dataRes = res.data
let token = dataRes.token
tokenSave(token)
}
}).catch((e) => {
})
}
export function uploadImage (image, name, type) {
// type 100 头像 200 退货 300 商品 其他type
let header = headerCom()
header.type = type||200
let postObj = new Promise((resolve, reject) => {
uni.uploadFile({
url: base_url + '/upload',
url: base_url + '/staff/upload',
header: header,
filePath: image,
name:name,
formData: {'uploadType': 1000},
success(res) {
resolve(JSON.parse(res.data))
},
......
......@@ -98,10 +98,31 @@ export function getGoodsPrice (goods, type='home') {
}
}
export function moneyFormat(num,counts,mark){
num = num.split(".");
var tempAry = num[0].split("").reverse();
var res=[];
for(var i=0,len=tempAry.length;i<len;i++){
if(i%counts===0&&i!==0){
res.push(mark);
}
res.push(tempAry[i]);
}
res.reverse();
if(num[1]){
res=res.join("").concat("."+num[1]);
}else{
res=res.join("");
}
return res;
}
export default {
numAdd: numAdd,
numSub: numSub,
numMulti: numMulti,
numDivision: numDivision,
getGoodsPrice: getGoodsPrice
getGoodsPrice: getGoodsPrice,
moneyFormat: moneyFormat
}
\ No newline at end of file
<template>
<view class="content">
<view class="alert">
<view class="text local-title">
{{text}}
</view>
<view class="only-certain-btn" @click="$emit('clickCertain')">确定</view>
</view>
</view>
</template>
<script>
export default {
name:"Alert",
data() {
return {
};
},
props: {
alertOneLine:{
type:Boolean,
default:true
},
text:{
type:String,
default:''
},
showButtonNum:{
type:Number,
default:1
}
}
}
</script>
<style lang="scss" scoped>
.content {
position: fixed;
z-index: 9999999;
top: 0;
left: 0;
bottom: 0;
height: 100%;
width: 100%;
background-color: rgba($color: #000000, $alpha: 0.6);
.alert {
margin: auto;
margin-top: 70%;
width: 600rpx;
background-color: #FFFFFF;
border-radius: 24rpx;
opacity: 1;
padding-bottom: 48rpx;
.title {
padding: 48rpx 48rpx 64rpx;
text-align: center;
font-size: 28rpx;
color: #686868;
line-height: 50rpx;
width: 504rpx;
}
.local-title {
padding: 78rpx 40rpx;
color: #252525;
font-size: 32rpx;
text-align: center;
line-height: 48rpx;
}
.only-certain-btn {
margin: 0 60rpx;
border-radius: 40rpx;
height: 80rpx;
width: 480rpx;
background-color: #FF0520;
color: #FFFFFF;
line-height: 82rpx;
font-size: 32rpx;
text-align: center;
}
.bottom-two-btn {
display: flex;
padding: 0 40rpx;
justify-content: space-between;
align-items: center;
.left {
height: 76rpx;
width: 240rpx;
border-radius: 40rpx;
border: 2rpx solid #C9C9C9;
font-size: 32rpx;
color: #848689;
line-height: 78rpx;
text-align: center;
}
.right {
height: 80rpx;
width: 240rpx;
border-radius: 40rpx;
background-color: #FF0520;
font-size: 32rpx;
color: #FFFFFF;
line-height: 82rpx;
text-align: center;
}
}
}
}
</style>
<template>
<view class="container">
<view class="content">
<image class="close" src="../../static/close-gray.png" mode="" @click="close()"></image>
<view class="title">选择卡券状态</view>
<view class="select">
<view class="item" @click="selectType = 10">
<image class="img" v-if="selectType === 10" src="../../static/select-h.png" mode=""></image>
<image class="img" v-else src="../../static/select-n.png" mode=""></image>
<view class="text">待使用</view>
</view>
<view class="item" @click="selectType = 20">
<image class="img" v-if="selectType === 20" src="../../static/select-h.png" mode=""></image>
<image class="img" v-else src="../../static/select-n.png" mode=""></image>
<view class="text">已使用</view>
</view>
</view>
<view @click="$emit('change', selectType)" class="buy-bottom" :style="{'background-color':'#FF0520'}">确定</view>
</view>
</view>
</template>
<script>
export default {
name:"AlertSelectStatus",
data() {
return {
selectType: this.useState || 10
};
},
props: {
useState: {
type: Number
},
closeName: {
type: String
}
},
methods: {
close() {
this.$parent[this.closeName] = false
}
}
}
</script>
<style lang="scss" scoped>
.container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba($color: #000000, $alpha: 0.7);
z-index: 99999;
.content {
margin: 50% 55rpx;
border-radius: 16rpx;
background-color: #FFFFFF;
padding: 48rpx 40rpx;
// width: 640rpx;
position: relative;
.close {
position: absolute;
top: 24rpx;
right: 24rpx;
height: 36rpx;
width: 36rpx;
}
.title {
font-size: 32rpx;
font-weight: bolder;
color: #333333;
line-height: 44rpx;
text-align: center;
}
.select {
display: flex;
padding: 48rpx 96rpx 0;
justify-content: space-between;
align-items: center;
.item {
display: flex;
align-items: center;
.img {
width: 32rpx;
height: 32rpx;
}
.text {
margin-left: 16rpx;
font-size: 32rpx;
color: #333333;
}
}
}
.buy-bottom {
margin-top: 70rpx;
border-radius: 40rpx;
height: 80rpx;
width: 560rpx;
background-color: rgba($color: #FF0520, $alpha: 0.5);
line-height: 82rpx;
text-align: center;
color: #FFFFFF;
font-size: 32rpx;
z-index: 99999;
margin-bottom: 32rpx;
}
}
}
</style>
\ No newline at end of file
<template>
<view class="container">
<view class="content">
<image class="close" src="../../static/close-gray.png" mode="" @click="close()"></image>
<view class="title">卡券解锁</view>
<view class="sub-title">是否确定解锁该卡券?</view>
<view class="tips">*为了您的资金安全,请勿将卡券信息泄露他人</view>
<view @click="$emit('certain')" class="buy-bottom" :style="{'background-color':'#FF0520'}">确定</view>
</view>
</view>
</template>
<script>
export default {
name:"AlertUnlock",
data() {
return {
};
},
props: {
closeName: {
type: String
}
},
methods: {
close() {
this.$parent[this.closeName] = false
}
}
}
</script>
<style lang="scss" scoped>
.container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba($color: #000000, $alpha: 0.7);
z-index: 99999;
.content {
margin: 50% 55rpx;
border-radius: 16rpx;
background-color: #FFFFFF;
padding: 48rpx 40rpx;
// width: 640rpx;
position: relative;
.close {
position: absolute;
top: 24rpx;
right: 24rpx;
height: 36rpx;
width: 36rpx;
}
.title {
font-size: 32rpx;
font-weight: bolder;
color: #333333;
line-height: 44rpx;
text-align: center;
}
.sub-title {
margin-top: 48rpx;
font-size: 32rpx;
color: #333333;
line-height: 44rpx;
text-align: center;
}
.tips {
margin-top: 32rpx;
font-size: 24rpx;
line-height: 32rpx;
color: #666666;
text-align: center;
}
.buy-bottom {
margin-top: 70rpx;
border-radius: 40rpx;
height: 80rpx;
width: 560rpx;
background-color: rgba($color: #FF0520, $alpha: 0.5);
line-height: 82rpx;
text-align: center;
color: #FFFFFF;
font-size: 32rpx;
z-index: 99999;
margin-bottom: 32rpx;
}
}
}
</style>
\ No newline at end of file
<template>
<view class="container">
<view class="content">
<image class="close" src="../../static/close-gray.png" mode="" @click="close()"></image>
<view class="top">
<image class="img" :src="selectImg" mode=""></image>
<view class="integral">{{selectSkuIntegral}}积分</view>
</view>
<view class="attr">
<view class="title">{{goodsData.specsName || '1111'}}</view>
<view class="item-content">
<view @click="clickItem(item)" class="item" :class="selectSkuNo===item.skuNo?'active':''" v-for="(item, index) in goodsData.skuList" :key="index">
{{item.denomination}}
</view>
</view>
</view>
<view class="info">
<view class="left">购买数量:</view>
<view class="buy-button">
<image v-if="goodsNum===1" class="reduce" src="../../static/reduce.png" mode="" @click="reduce()"></image>
<image v-else class="reduce" src="../../static/reduce-h.png" mode="" @click="reduce()"></image>
<view class="goods-num">{{goodsNum}}</view>
<image class="plus" src="../../static/add.png" mode="" @click="add()"></image>
</view>
</view>
<view class="info pay-integral">
<view class="left">支付积分:</view>
<view class="pay-integral-right">{{payIntegral}}积分</view>
</view>
<view class="buy-bottom" @click="buyGoods()">
确定
</view>
</view>
</view>
</template>
<script>
export default {
name:"goodsSelect",
data() {
return {
selectItem: {},
selectSkuNo: '',
selectSkuIntegral: '',
selectImg: '',
goodsNum: 1,
goodsData: {}
};
},
props: {
goods: {
type: Object
},
closeName: {
type: String
}
},
watch: {
goods(newVal, oldVal) {
this.goodsData = newVal
this.selectItem = newVal.skuDetail
this.selectItem.coverImg = newVal.skuDetail.spuImg
this.selectSkuNo = newVal.skuDetail.skuNo
this.selectSkuIntegral = newVal.skuDetail.sellingPrice
this.selectImg = newVal.skuDetail.spuImg
}
},
computed: {
payIntegral() {
return this.$numUtils.numMulti(this.selectSkuIntegral, this.goodsNum)
}
},
methods: {
clickItem(item) {
this.selectItem = item
this.goodsNum = 1
this.selectSkuNo = item.skuNo
this.selectSkuIntegral = item.sellingPrice
this.selectImg = item.coverImg
},
add() {
if (this.$numUtils.numMulti(this.selectSkuIntegral, this.goodsNum+1) > Number(this.$store.state.userInfo.surplusIntegral)) {
this.toast('积分不够')
return
}
this.goodsNum++
},
reduce() {
if (this.goodsNum === 1) {
return
}
this.goodsNum--
},
close() {
this.$parent[this.closeName] = false
},
buyGoods() {
this.$emit('certain', {'goodsNum': this.goodsNum, 'goods': this.selectItem})
}
}
}
</script>
<style lang="scss" scoped>
.container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba($color: #000000, $alpha: 0.7);
z-index: 99999;
.content {
border-radius: 24rpx 24rpx 0 0;
background-color: #FFFFFF;
padding: 32rpx;
position: fixed;
bottom: 0;
.top {
display: flex;
height: 192rpx;
border-bottom: 2rpx solid #F5F5F5;
.img {
display: block;
height: 160rpx;
width: 160rpx;
border-radius: 16rpx;
}
.integral {
margin-top: 110rpx;
line-height: 50rpx;
color: #FF0520;
font-size: 36rpx;
font-weight: bolder;
margin-left: 20rpx;
}
}
.close {
position: absolute;
top: 24rpx;
right: 24rpx;
height: 36rpx;
width: 36rpx;
}
.attr {
padding: 32rpx 0;
border-bottom: 2rpx solid #F5F5F5;
.title {
font-size: 28rpx;
color: #333333;
}
.item-content {
display: flex;
width: 100%;
flex-flow: wrap;
.item {
padding: 12rpx 62rpx;
color: #666666;
background-color: #F5F5F5;
margin-top: 28rpx;
border-radius: 8rpx;
margin-right: 44rpx;
max-width: 686rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 28rpx;
}
.active {
color: #FF0520;
background-color: #FFF7F8;
border: 2rpx solid #FF0520;
}
}
}
.info {
display: flex;
justify-content: space-between;
margin-top: 32rpx;
.left {
font-size: 28rpx;
color: #333333;
}
.buy-button {
position: relative;
display: flex;
width: 160rpx;
height: 40rpx;
font-size: 28rpx;
align-items: center;
.reduce {
width: 40rpx;
height: 40rpx;
}
.goods-num {
width: 78rpx;
text-align: center;
color: #333333;
}
.plus {
position: absolute;
top: 0;
left: 118rpx;
width: 40rpx;
height: 40rpx;
}
}
}
.pay-integral {
margin-top: 40rpx;
.pay-integral-right {
font-size: 28rpx;
color: #FF0520;
}
}
.buy-bottom {
margin-top: 96rpx;
border-radius: 40rpx;
height: 80rpx;
width: 686rpx;
background-color: #FF0520;
line-height: 82rpx;
text-align: center;
color: #FFFFFF;
font-size: 32rpx;
z-index: 99999;
margin-bottom: 32rpx;
}
}
}
</style>
<template>
<view class="previewImg">
<view class="mask">
<swiper class="my_swiper" @change="swiperChange" :autoplay="false">
<swiper-item @click="dissmiss" v-for="(x, y) in picList" :key="y"><view class="bg_img" :style="{ backgroundImage: 'url(' + x + ')' }"></view></swiper-item>
</swiper>
</view>
<view class="page" v-if="picList.length > 0">{{ currentPosition }} / {{ picList.length }}</view>
</view>
</template>
<script>
export default {
name: 'previewImages',
props:{
current:{
type:Number,
default:0
},
indicatorDots:{ //是否展示推荐菜单
type: Boolean,
default: true
},
picList: { //图片列表
type: Array,
default () {
return []
}
},
},
data() {
return {
currentPosition: this.current,
circular: true,
isShowSwiper: false
};
},
mounted() {
console.log(this.picList)
},
methods: {
swiperChange(e) {
this.currentPosition = e.detail.current + 1
},
dissmiss() {
console.log('dissmiss')
this.$parent.dissmissPreviewImages()
}
}
};
</script>
<style lang="scss" scoped>
.page {
position: fixed;
z-index: 6;
color: #fff;
bottom: 20rpx;
text-align: center;
width: 100%;
}
.mask {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
background-color: #000;
z-index: 5;
> .my_swiper {
width: 100%;
height: 60vh;
.bg_img {
background-size: 100% auto;
background-repeat: no-repeat;
background-position:center;
width: 100%;
height: 100%;
}
}
}
.pic_list {
display: flex;
flex-flow: row wrap;
> view {
flex: 0 0 33.3vw;
height: 33.3vw;
padding: 1vw;
> image {
width: 100%;
height: 100%;
}
}
}
</style>
<template>
<view class="container">
<view class="content">
<image class="close" src="../../static/close-gray.png" mode="" @click="close()"></image>
<view class="title">请输入支付密码</view>
<view class="subTitle">您即将支付</view>
<view class="integral">{{integral}}<text>积分</text></view>
<validCode ref="pwd" :maxlength="6" :isPwd="true" @finish="getPwd" @inputChange="inputChange"></validCode>
<view @click="submit()" class="buy-bottom" :style="{'background-color':btnActive?'#FF0520':''}">确认支付</view>
</view>
</view>
</template>
<script>
import validCode from '../validCode/validCode'
export default {
name:"setPwdAlert",
components: {validCode},
data() {
return {
pwd: '',
};
},
computed: {
btnActive() {
return this.pwd.length === 6
}
},
props: {
closeName: {
type: String
},
integral: {
type:String
}
},
methods: {
getPwd(e) {
this.pwd = e
},
inputChange(e) {
this.pwd = e
},
submit() {
if (!this.btnActive) {
return
}
this.$emit('pwdSubmit', this.pwd)
this.close()
},
close() {
this.pwd = ''
this.$refs.pwd.clear()
this.$parent[this.closeName] = false
}
}
}
</script>
<style lang="scss" scoped>
.container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba($color: #000000, $alpha: 0.7);
z-index: 99999;
.content {
margin: 50% 55rpx;
border-radius: 16rpx;
background-color: #FFFFFF;
padding: 48rpx 40rpx;
// width: 640rpx;
position: relative;
.close {
position: absolute;
top: 24rpx;
right: 24rpx;
height: 36rpx;
width: 36rpx;
}
.title {
font-size: 32rpx;
font-weight: bolder;
color: #333333;
line-height: 44rpx;
text-align: center;
}
.subTitle {
margin-top: 24rpx;
font-size: 32rpx;
color: #666666;
line-height: 44rpx;
text-align: center;
}
.integral {
margin-top: 32rpx;
margin-bottom: 48rpx;
font-size: 60rpx;
color: #FF0520;
font-weight: bolder;
text-align: center;
text {
font-size: 40rpx;
}
}
.buy-bottom {
margin-top: 96rpx;
border-radius: 40rpx;
height: 80rpx;
width: 560rpx;
background-color: rgba($color: #FF0520, $alpha: 0.5);
line-height: 82rpx;
text-align: center;
color: #FFFFFF;
font-size: 32rpx;
z-index: 99999;
margin-bottom: 32rpx;
}
}
}
</style>
<template>
<view class="container">
<view class="content">
<image class="close" src="../../static/close-gray.png" mode="" @click="close()"></image>
<view class="title">设置支付密码</view>
<view class="subTitle">为保障您的积分安全,请先设置支付密码</view>
<view class="item first-item">
<view>设置支付密码:</view>
<view class="input-content">
<input class="input" :password="!firstOpen" v-model="firstPwd" placeholder="请输入6位数字密码" placeholder-style="color:#999999" maxlength="6" />
<image class="eye" @click="clickEye(1)" :src="firstOpen?'../../static/eye-open.png':'../../static/eye-off.png'" mode=""></image>
</view>
</view>
<view class="item">
<view>确认支付密码:</view>
<view class="input-content">
<input class="input" :password="!secondOpen" v-model="secondPwd" placeholder="再次输入密码" placeholder-style="color:#999999" maxlength="6" />
<image class="eye" @click="clickEye(2)" :src="secondOpen?'../../static/eye-open.png':'../../static/eye-off.png'" mode=""></image>
</view>
</view>
<view @click="submit()" class="buy-bottom" :style="{'background-color':firstPwd===secondPwd&&secondPwd!=''?'#FF0520':''}">确认支付密码</view>
</view>
</view>
</template>
<script>
export default {
name:"setPwdAlert",
data() {
return {
firstPwd: '',
secondPwd: '',
firstOpen: false,
secondOpen: false
};
},
props: {
closeName: {
type: String
}
},
methods: {
clickEye(index) {
if (index === 1) {
this.firstOpen = !this.firstOpen
} else {
this.secondOpen = !this.secondOpen
}
},
submit() {
if (this.firstPwd.length<6) {
this.toast('请输入6位数密码')
return
}
if (this.firstPwd !== this.secondPwd) {
this.toast('两次输入密码不一致')
return
}
this.$net.post('/staff/password/setting', {'from': 'order', 'pwd': this.firstPwd}).then(res => {
if (res.code === 200) {
this.getUserInfo()
} else {
this.toast(res.message)
}
})
},
close() {
this.firstPwd = ''
this.secondPwd = ''
console.log(this.firstPwd);
this.$parent[this.closeName] = false
},
getUserInfo() {
this.$net.get('/staff/detail').then(res => {
if (res.code === 200) {
this.$store.commit('refreshUserInfo', res.data)
this.toast('设置密码成功')
this.close()
} else {
this.toast(res.message)
}
})
}
},
watch: {
firstOpen(newVal, oldVal) {
console.log(newVal);
}
}
}
</script>
<style lang="scss" scoped>
.container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba($color: #000000, $alpha: 0.7);
z-index: 99999;
.content {
margin: 50% 28rpx;
border-radius: 16rpx;
background-color: #FFFFFF;
padding: 48rpx 40rpx;
// width: 640rpx;
position: relative;
.close {
position: absolute;
top: 24rpx;
right: 24rpx;
height: 36rpx;
width: 36rpx;
}
.title {
font-size: 32rpx;
font-weight: bolder;
color: #333333;
line-height: 44rpx;
text-align: center;
}
.subTitle {
margin-top: 16rpx;
font-size: 24rpx;
color: #666666;
line-height: 34rpx;
text-align: center;
}
.first-item {
margin-top: 48rpx;
}
.item {
margin-top: 40rpx;
font-size: 28rpx;
color: #333333;
.input-content {
padding-left: 16rpx;
margin-top: 24rpx;
height: 80rpx;
width: 100%;
border-radius: 8rpx;
background-color: #F8F8F8;
position: relative;
.input {
height: 100%;
width: 100%;
}
.eye {
position: absolute;
top: 16rpx;
right: 16rpx;
height: 48rpx;
width: 48rpx;
z-index: 9999;
}
}
}
.buy-bottom {
margin: 64rpx 0 48rpx;
border-radius: 40rpx;
height: 80rpx;
background-color: #FF0520;
line-height: 82rpx;
text-align: center;
color: #FFFFFF;
font-size: 32rpx;
z-index: 99999;
}
}
}
</style>
<template>
<view class="container">
<view class="content">
<image class="close" src="../../static/close-gray.png" mode="" @click="close()"></image>
<view class="title">短信验证</view>
<view class="subTitle">已向<text>{{getPhone}}</text>手机号发送了一条验证短信,请将验证码填写进输入框中。</view>
<view class="code-content">
<validCode ref="code" :maxlength="4" @finish="getPwd" @inputChange="inputChange"></validCode>
</view>
<view @click="submit()" class="buy-bottom" :style="{'background-color':btnActive?'#FF0520':''}">确认</view>
</view>
</view>
</template>
<script>
import validCode from '../validCode/validCode'
export default {
name:"setPwdAlert",
components: {validCode},
data() {
return {
phone: this.$store.state.userInfo.mobile,
code: ''
};
},
props: {
closeName: {
type: String
}
},
computed: {
getPhone() {
let middle = this.phone.substr(3, 4)
return this.phone.replace(middle,'****');
},
btnActive() {
return this.code.length === 4
}
},
methods: {
getPwd(e) {
this.code = e
},
inputChange(e) {
this.code = e
},
submit() {
if (!this.btnActive) {
return
}
this.$emit('smsCodeSubmit', this.code)
this.close()
},
close() {
this.code = ''
this.$refs.code.clear()
this.$parent[this.closeName] = false
}
},
watch: {
firstOpen(newVal, oldVal) {
console.log(newVal);
}
}
}
</script>
<style lang="scss" scoped>
.container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba($color: #000000, $alpha: 0.7);
z-index: 99999;
.content {
margin: 50% 55rpx;
border-radius: 16rpx;
background-color: #FFFFFF;
padding: 48rpx 40rpx;
// width: 640rpx;
position: relative;
.close {
position: absolute;
top: 24rpx;
right: 24rpx;
height: 36rpx;
width: 36rpx;
}
.title {
font-size: 32rpx;
font-weight: bolder;
color: #333333;
line-height: 44rpx;
text-align: center;
}
.subTitle {
margin-top: 24rpx;
font-size: 32rpx;
color: #666666;
line-height: 48rpx;
text-align: center;
text {
color: #338AFF;
}
}
.code-content {
margin-top: 48rpx;
padding: 0 60rpx;
}
.buy-bottom {
margin-top: 64rpx;
border-radius: 40rpx;
height: 80rpx;
width: 560rpx;
background-color: rgba($color: #FF0520, $alpha: 0.5);
line-height: 82rpx;
text-align: center;
color: #FFFFFF;
font-size: 32rpx;
z-index: 99999;
margin-bottom: 32rpx;
}
}
}
</style>
<!--
自定义验证码输入、密码输入使用
使用方法:
maxlength:输入最大长度
isPwd:是否是密码模式
@finish:回调函数
<validcode :maxlength="4" :isPwd="false" @finish="finish"></validcode>
-->
<template>
<view class="code-area">
<view class="flex-box">
<input
:value="val"
type="number"
focus="true"
:maxlength="maxlength"
class="hide-input"
@input="getVal"
/>
<view v-bind:class="['item', { active: codeIndex == 1, 'code-item': !isPwd}]">
<view class="line"></view>
<block v-if="isPwd && codeArr.length >= 1">
<text class="dot">.</text>
</block>
<block v-else> {{ codeArr[0] ? codeArr[0] : ''}}</block>
</view>
<view v-bind:class="['item', { active: codeIndex == 2, 'code-item': !isPwd }]">
<view class="line"></view>
<block v-if="isPwd && codeArr.length >= 2">
<text class="dot">.</text>
</block>
<block v-else> {{ codeArr[1] ? codeArr[1] : ''}}</block>
</view>
<view v-bind:class="['item', { active: codeIndex == 3, 'code-item': !isPwd }]">
<view class="line"></view>
<block v-if="isPwd && codeArr.length >= 3">
<text class="dot">.</text>
</block>
<block v-else> {{ codeArr[2] ? codeArr[2] : ''}}</block>
</view>
<view v-bind:class="['item', { active: codeIndex == 4, 'code-item': !isPwd }]">
<view class="line"></view>
<block v-if="isPwd && codeArr.length >= 4">
<text class="dot">.</text>
</block>
<block v-else> {{ codeArr[3] ? codeArr[3] : ''}}</block>
</view>
<block v-if="maxlength === 6">
<view v-bind:class="['item', { active: codeIndex == 5 }]">
<view class="line"></view>
<block v-if="isPwd && codeArr.length >= 5">
<text class="dot">.</text>
</block>
<block v-else> {{ codeArr[4] ? codeArr[4] : ''}}</block>
</view>
<view v-bind:class="['item', { active: codeIndex == 6 }]">
<view class="line"></view>
<block v-if="isPwd && codeArr.length >= 6">
<text class="dot">.</text>
</block>
<block v-else> {{ codeArr[5] ? codeArr[5] : ''}}</block>
</view>
</block>
</view>
</view>
</template>
<script>
export default {
props: {
//最大长度 值为4或者6
maxlength: {
type: Number,
default: 4
},
//是否是密码
isPwd: {
type: Boolean,
default: false
}
},
data() {
return {
codeIndex: 1, //下标
codeArr: [],
val:'',//输入框的值
};
},
methods: {
//取值
getVal(e) {
let { value } = e.detail;
this.val=value;
// console.log('验证码:', value);
let arr = value.split('');
this.codeIndex = arr.length + 1;
this.codeArr = arr;
// console.log(this.codeIndex, this.pwdArr);
if (this.codeIndex > Number(this.maxlength)) {
//输入完成
this.$emit('finish',this.codeArr.join(''));
}
this.$emit('inputChange',value);
},
//清除验证码或者密码
clear(){
this.codeIndex=1;
this.codeArr=[];
this.val="";
}
}
};
</script>
<style lang="scss" scoped>
.code-area {
text-align: center;
.flex-box {
display: flex;
flex-wrap: wrap;
position: relative;
justify-content: space-between;
}
.item {
position: relative;
width: 80upx;
height: 112upx;
// margin-right: 16upx;
font-size: 64upx;
font-weight: bold;
color: #333333;
box-sizing: border-box;
border: 2upx solid #C9C9C9;
border-radius: 8rpx;
}
.code-item {
line-height: 114rpx;
}
.item:last-child {
margin-right: 0;
}
.active {
// border-color: #ff4b4b;
}
.active .line {
display: block;
}
.line {
display: none;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 2upx;
height: 40upx;
background: #ff4b4b;
animation: twinkling 1s infinite ease;
}
.hide-input {
position: absolute;
top: 0;
left: -100%;
width: 200%;
height: 100%;
text-align: left;
z-index: 9;
opacity: 1;
}
@keyframes twinkling {
0% {
opacity: 0.2;
}
50% {
opacity: 0.5;
}
100% {
opacity: 0.2;
}
}
.dot{
font-size: 80upx;
line-height: 40upx;
}
}
</style>
......@@ -11,6 +11,7 @@ import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
Vue.prototype.$net = net
Vue.prototype.$store = store
Vue.prototype.$router = router
Vue.prototype.$numUtils = numUtils
Vue.prototype.toast = toast
......
......@@ -4,16 +4,15 @@
"path" : "pages/home/home",
"style" :
{
"navigationBarTitleText": "",
"navigationBarTitleText": "懒人企业福利社",
"enablePullDownRefresh": false
}
}
}
,{
"path" : "pages/order/order",
"style" :
{
"navigationBarTitleText": "",
"navigationBarTitleText": "订单",
"enablePullDownRefresh": false
}
......@@ -40,20 +39,100 @@
"enablePullDownRefresh": false
}
},{
"path" : "integral/integral",
"path" : "integral/integral",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "selectAccount/selectAccount",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "goods/goods",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "submitOrder/submitOrder",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "GoodSkuList/GoodSkuList",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "integralDetail/integralDetail",
"style": {
"navigationBarTitleText": "积分明细",
"enablePullDownRefresh": false
}
}, {
"path": "setting/setting",
"style": {
"navigationBarTitleText": "设置",
"enablePullDownRefresh": false
}
}, {
"path": "VertifyPhone/VertifyPhone",
"style": {
"navigationBarTitleText": "验证手机号",
"enablePullDownRefresh": false
}
}, {
"path": "SetPwd/SetPwd",
"style": {
"navigationBarTitleText": "设置支付密码",
"enablePullDownRefresh": false
}
}, {
"path": "orderDetail/orderDetail",
"style": {
"navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false,
"navigationStyle":"custom"
}
}
,{
"path" : "coupon/coupon",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"navigationStyle":"custom"
}
}
,{
"path" : "selectAccount/selectAccount",
"path" : "AlertToLogin/AlertToLogin",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}
......@@ -63,34 +142,34 @@
"pagesA/login/login": {
"network": "all",
"packages": ["__APP__"]
}
}
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"color": "#686868",
"selectedColor": "#FF0520",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/home/home",
// "iconPath": "static/tabbar/home.png",
// "selectedIconPath": "static/tabbar/home_h.png",
"text": "首页"
}, {
"pagePath": "pages/order/order",
// "iconPath": "static/tabbar/order.png",
// "selectedIconPath": "static/tabbar/order_h.png",
"text": "订单"
}, {
"pagePath": "pages/mine/mine",
// "iconPath": "static/tabbar/mine.png",
// "selectedIconPath": "static/tabbar/mine_h.png",
"text": "我的"
}]
},
"tabBar": {
"color": "#686868",
"selectedColor": "#FF0520",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/home/home",
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/home_h.png",
"text": "首页"
}, {
"pagePath": "pages/order/order",
"iconPath": "static/tabbar/order.png",
"selectedIconPath": "static/tabbar/order_h.png",
"text": "订单"
}, {
"pagePath": "pages/mine/mine",
"iconPath": "static/tabbar/mine.png",
"selectedIconPath": "static/tabbar/mine_h.png",
"text": "我的"
}]
}
}
<template>
<view>
<view class="" @click="goLogin()">
11111
<view class="layout">
<view class="header-cover" ref="headerCover" :style="'opacity:' + opacity">
<view class="header-cover-top">
<!-- <text v-if="isLogin" class="header-cover-name">你好,{{ name }}</text> -->
<!-- <text v-else class="header-cover-login" @click="goLogin()">请登录</text> -->
<text class="header-cover-integral">{{ integralCount }}</text>
<!-- <view class="integral-detail" @click="goIntegralDetail">积分明细 ></view> -->
</view>
</view>
<view class="header">
<view class="header-top">
</view>
<view class="header-center">
<view class="header-integral">{{ integralCount }}</view>
<view class="header-integral-tip">当前积分</view>
</view>
</view>
<text v-if="isLogin" class="header-name">你好,{{ name }}</text>
<text v-else class="header-login" @click="goLogin()">请登录</text>
<view class="integral-detail" @click="goIntegralDetail">积分明细 ></view>
<view class="list" ref="list">
<view class="item" v-for="(item, index) in brandList" :key="index" @click="goToGoodDetail(item.brandNo, item.name)">
<view class="item-layout">
<image class="icon" mode="aspectFill" :src="item.imgPath"></image>
<view class="item-right">
<text class="item-title">{{ item.name }}</text>
<text class="item-desc">{{ item.des }}</text>
</view>
</view>
</view>
</view>
<!-- <uni-load-more v-if="brandList.length > 0" :status="loadingType"></uni-load-more> -->
</view>
</template>
<script>
export default {
data() {
return {
};
export default {
data() {
return {
name: '',
integralCount: '0',
loadingType: 'more',
brandList: [],
page: 1,
pageSize: 20,
isLogin: false,
opacity: 0
};
},
onShow() {
this.integralCount = 0
this.getUserInfo();
this.getData();
},
onPageScroll(e) {
console.log(e)
this.opacity = e.scrollTop / 99
// const animation = uni.requireNativePlugin('animation')
// var top = this.$refs.headerCover
// animation.transition(top, {
// opacity: e.scrollTop / 99
// }, () => {})
},
methods: {
goLogin() {
this.$router.push('Login');
},
getUserInfo() {
this.isLogin = true;
this.$net
.get('/staff/detail', {'refreshToken': 'not'})
.then(res => {
if (res.code === 200) {
this.name = res.data.staffName;
this.integralCount = this.$numUtils.moneyFormat(res.data.surplusIntegral, 3, ',');
this.isLogin = true
this.$store.commit('refreshUserLogin', true)
this.$store.commit('refreshUserInfo', res.data)
} else {
this.isLogin = false
}
})
.catch(err => {
console.log(err);
this.isLogin = false
});
},
getData() {
this.$net
.get('/goods/brand', { page: this.page, pageSize: this.pageSize, 'refreshToken': 'not' })
.then(res => {
if (res.data.list.length > 0) {
this.brandList = this.brandList.concat(res.data.list);
this.page += 1;
}
this.loadingType = res.data.list.length < this.pageSize ? 'noMore' : 'more';
console.log(this.loadingType);
})
.catch(err => {
console.log(err);
});
},
goToGoodDetail(brandNo, brandName) {
if (!this.isLogin) {
this.goLogin();
return
}
this.$router.push('GoodSkuList', { brandNo: brandNo, brandName: brandName });
},
methods: {
goLogin() {
this.$router.push('Login')
goIntegralDetail() {
if (!this.isLogin) {
this.goLogin();
return
}
this.$router.push('IntegralDetail')
}
}
};
</script>
<style>
page {
background-color: #FFEEEE;
}
</style>
<style lang="scss" scoped>
.layout {
width: 100%;
height: 100%;
display: flex;
position: relative;
flex-direction: column;
.header-cover {
height: 100rpx;
width: 100%;
display: flex;
flex-direction: column;
// background: red;
background-image: url(../../static/home-header-bg.png);
background-size: cover;
position: fixed;
top: 0;
z-index: 999;
.header-cover-top {
display: flex;
flex-direction: row;
justify-content: center;
margin-top: 30rpx;
margin-left: 30rpx;
position: sticky;
// .header-cover-name {
// font-size: 24rpx;
// color: #ffffff;
// }
// .header-cover-login {
// font-size: 24rpx;
// color: #ffffff;
// text-decoration: underline;
// }
// .integral-detail {
// background-image: url(../../static/integral-detail-bg.png);
// width: 174rpx;
// height: 58rpx;
// font-size: 26rpx;
// color: #ffffff;
// line-height: 58rpx;
// text-align: center;
// background-size: 100% 100%;
// }
.header-cover-integral {
font-size: 34rpx;
font-weight: bolder;
color: #ffffff;
text-align: center;
}
}
}
.header {
height: 350rpx;
width: 100%;
display: flex;
flex-direction: column;
background-image: url(../../static/home-header-bg.png);
background-size: 100% 100%;
.header-top {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-top: 30rpx;
margin-left: 30rpx;
}
.header-center {
display: flex;
flex-direction: column;
align-items: center;
.header-integral {
font-size: 82rpx;
font-weight: bolder;
color: #ffffff;
margin-top: 78rpx;
}
.header-integral-tip {
font-size: 24rpx;
color: #ffffff;
}
}
}
.header-name {
font-size: 24rpx;
color: #ffffff;
position: fixed;
top: 30rpx;
left: 30rpx;
z-index: 999;
}
.header-login {
font-size: 24rpx;
color: #ffffff;
text-decoration: underline;
position: fixed;
top: 30rpx;
left: 30rpx;
z-index: 999;
}
.integral-detail {
background-image: url(../../static/integral-detail-bg.png);
width: 174rpx;
height: 58rpx;
font-size: 26rpx;
color: #ffffff;
line-height: 58rpx;
text-align: center;
background-size: 100% 100%;
position: fixed;
top: 20rpx;
z-index: 999;
right: 0;
}
.list {
display: flex;
flex-direction: row;
background: #ffeeee;
border-radius: 30rpx 30rpx 0rpx 0rpx;
padding-top: 25rpx;
margin-top: -50rpx;
z-index: 99;
padding: 15rpx 15rpx;
flex-wrap: wrap;
.item {
width: 50%;
height: 144rpx;
margin-top: 15rpx;
margin-bottom: 15rpx;
.item-layout {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
height: 144rpx;
margin: 0 15rpx;
background: #ffffff;
border-radius: 20rpx;
padding-left: 15rpx;
padding-right: 15rpx;
overflow: hidden;
.icon {
width: 90rpx;
height: 90rpx;
border-radius: 90rpx;
}
.item-right {
display: flex;
flex: 1;
flex-direction: column;
margin-left: 20rpx;
overflow: hidden;
.item-title {
font-size: 30rpx;
font-weight: bolder;
color: #333333;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.item-desc {
font-size: 24rpx;
color: #999999;
text-overflow: ellipsis;
white-space: nowrap;
margin-top: 15rpx;
overflow: hidden;
}
}
}
}
}
}
</style>
......@@ -6,56 +6,56 @@
<view class="nav-bar" :style="{ height: height + 'px', 'padding-top': statusBarHeight + 'px' }"><text class="person-center">我的</text></view>
<view class="user-info">
<view class="top">
<image class="avator" :src="userInfo.avatar" mode=""></image>
<image @click="getImg()" class="avator" :src="userInfo.avatar" mode=""></image>
<view class="info">
<view class="name">{{userInfo.staffName}}</view>
<view class="shop">{{userInfo.accountName}}</view>
</view>
<view class="select-acccount" v-if="userInfo.allowSwitching>0">
切换
<view class="select-acccount" v-if="userInfo.allowSwitching>0" @click="$router.push('SelectAccount',{'isSettingEnter':true})">
切换
<image class="img" src="../../static/arrow-right-w.png" mode=""></image>
</view>
</view>
<view class="line"></view>
<view class="user-integral">
<view class="item">
<view class="num">{{userInfo.allIntegral}}</view>
<view class="num">{{all}}</view>
<view class="bottom">累计积分</view>
</view>
<view class="item">
<view class="num">{{userInfo.surplusIntegral}}</view>
<view class="num">{{current}}</view>
<view class="bottom">当前积分</view>
</view>
<view class="item">
<view class="num">{{userInfo.consumeIntegral}}</view>
<view class="num">{{used}}</view>
<view class="bottom">消费积分</view>
</view>
</view>
</view>
</view>
<view class="bottom-setting">
<view class="item">
<view class="item" @click="clickItem(1)">
<view class="left">
<image class="left-img" src="../../static/coupon.png" mode=""></image>
<view class="title">回收</view>
<view class="title">回收</view>
</view>
<image class="right-arrow" src="../../static/arrow-right.png" mode=""></image>
</view>
<view class="item">
<view class="item" @click="clickItem(2)">
<view class="left">
<image class="left-img" src="../../static/integral.png" mode=""></image>
<view class="title">积分明细</view>
</view>
<image class="right-arrow" src="../../static/arrow-right.png" mode=""></image>
</view>
<view class="item">
<view class="item" @click="clickItem(3)">
<view class="left">
<image class="left-img" src="../../static/customer.png" mode=""></image>
<view class="title">联系客服</view>
</view>
<image class="right-arrow" src="../../static/arrow-right.png" mode=""></image>
</view>
<view class="item last-item">
<view class="item last-item" @click="setting">
<view class="left">
<image class="left-img" src="../../static/setting.png" mode=""></image>
<view class="title">设置</view>
......@@ -64,6 +64,7 @@
</view>
</view>
</view>
<AlertRecover v-show="showRecover" closeName="showRecover"></AlertRecover>
</view>
</template>
......@@ -73,14 +74,52 @@
return {
height: this.CustomBarHeight,
statusBarHeight: this.StatusBarHeight,
userInfo: {}
userInfo: {},
showRecover: false
};
},
created() {
onLoad(options) {
this.getUserInfo()
},
onShow() {
this.userInfo = {}
this.getUserInfo()
console.log(this.$store.state);
if (this.$store.state.selectAccount) {
this.$store.commit('refreshSelectAccount', false)
this.toast('账号切换成功')
}
},
onTabItemTap () {
if (!this.$store.state.isLogin) {
this.$router.push('Login')
}
},
computed: {
all() {
if (!this.userInfo.allIntegral) {
return '0'
}
return this.$numUtils.moneyFormat(this.userInfo.allIntegral, 3, ',')
},
current() {
if (!this.userInfo.allIntegral) {
return '0'
}
return this.$numUtils.moneyFormat(this.userInfo.surplusIntegral, 3, ',')
},
used() {
if (!this.userInfo.allIntegral) {
return '0'
}
return this.$numUtils.moneyFormat(this.userInfo.consumeIntegral, 3, ',')
}
},
methods: {
getUserInfo() {
if (!this.$store.state.isLogin) {
return
}
this.$net.get('/staff/detail').then(res => {
if (res.code === 200) {
this.userInfo = res.data
......@@ -90,18 +129,66 @@
}
})
},
changeInfo(value) {
this.$net.post('/staff/modify', {'staffKey':'avatar', 'staffValue':value}).then(res => {
if (res.code === 200) {
this.getUserInfo()
this.toast('头像修改成功')
} else {
this.toast(res.message)
}
})
},
getImg() {
if (!this.$store.state.isLogin) {
this.$router.push('Login')
return
}
var that = this
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'], //original 原图,compressed 压缩图,默认二者都有
sourceType: ['album', 'camera'], //album 从相册选图,camera 使用相机,默认二者都有。如需直接开相机或直接选相册,请只使用一个选项
success: function (res) {
console.log(JSON.stringify(res.tempFilePaths));
that.imgArr = res.tempFilePaths
that.$net.uploadImage(res.tempFilePaths[0], 'uploadFile', 1000).then((res)=>{
if (res && res.code==200) {
that.changeInfo(res.data.filePath)
} else {
that.toast(res.message)
}
})
}
});
},
clickItem(index) {
if (!this.$store.state.isLogin) {
this.$router.push('Login')
return
}
if (index === 1) {
this.showRecover = true
} else if (index === 2) {
this.$router.push('IntegralDetail')
} else if (index === 3) {
}
},
setting() {
if (!this.$store.state.isLogin) {
this.$router.push('Login')
return
}
this.$router.push('Setting')
}
},
watch: {
showRecover (newVal, oldVal) {
if (newVal) {
uni.hideTabBar()
} else {
uni.showTabBar()
}
}
}
}
</script>
......
<template>
<view>
<view class="container">
<view class="empty" v-if="orderLists.length<=0 && loadingType != 'loading'">
<image class="empty-img" src="../../static/empty-coupon.png" mode=""></image>
<view class="empty-text">暂无订单</view>
</view>
<view class="order-list">
<view class="item" v-for="(item, index) in orderLists" :key="index" @click="goDetails(item)">
<view class="order-top">
<view class="num">
订单编号:{{item.orderSn}}
</view>
<view class="status" :style="{'color':statusTextColor[item.state]}">
{{statusText[item.state]}}
</view>
</view>
<view class="goods-info">
<image class="img" :src="item.goodsPath" mode="aspectFill"></image>
<view class="info">
<view class="title">{{item.attrValue}}</view>
<view class="spec">
<view>{{item.attrName}}:{{item.denomination}}</view>
<view>x{{item.payNumber}}</view>
</view>
<view class="price">
支付积分:{{item.payIntegral}}
</view>
</view>
</view>
<view class="btn" v-if="item.state === 200">
<view class="btn-item pay-btn" @click.stop="goCoupon(item)">
查看卡券
</view>
</view>
</view>
</view>
<uni-load-more :status="loadingType" v-if="orderLists.length>0"></uni-load-more>
</view>
</template>
......@@ -8,12 +42,173 @@
export default {
data() {
return {
orderLists: [],
loadingType: 'more',
statusTextColor:{
100:'#FF0520',200:'#FF6205',300:'#686868'
},
statusText:{
100:'待兑换',200:'兑换成功',300:'兑换失败'
},
page: 1
};
},
onLoad() {
},
onReachBottom () {
this.getList()
},
onTabItemTap () {
if (!this.$store.state.isLogin) {
this.$router.push('Login')
}
this.orderLists = []
this.page = 1
this.loadingType = 'more'
this.getList()
},
methods: {
getList() {
if (this.loadingType == 'noMore') {
return
}
this.loadingType = 'loading';
let params = {'page': this.page, 'pageSize':'10'}
this.$net.post('/orders/list', params).then((res)=>{
if (res && res.code==200) {
this.orderLists = this.orderLists.concat(res.data.list)
let paginate = res.data.paginate
if (res.data.list.length < 10) {
this.loadingType = 'noMore'
} else {
this.loadingType = 'more'
this.page++
}
} else {
this.toast(res.message)
}
})
},
goDetails(item) {
this.$router.push('OrderDetail',{'orderId':item.orderSn})
},
goCoupon(item) {
this.$router.push('Coupon', {'orderId':item.orderSn})
}
}
}
</script>
<style lang="scss">
<style>
page{
background-color: #F5F5F5;
}
</style>
<style lang="scss" scoped>
.container {
background-color: #F5F5F5;
width: 100%;
height: 100%;
.order-list {
padding: 24rpx;
.item {
border-radius: 16rpx;
background-color: #FFFFFF;
margin-bottom: 24rpx;
padding: 32rpx 24rpx;
.order-top {
display: flex;
justify-content: space-between;
.num {
font-size: 28rpx;
color: #686868;
line-height: 40rpx;
}
.status {
font-size: 28rpx;
line-height: 40rpx;
}
}
.goods-info {
display: flex;
margin-top: 32rpx;
.img {
height: 200rpx;
width: 200rpx;
border-radius: 8rpx;
background-color: #D8D8D8;
}
.info {
margin: 4rpx 0 0 16rpx;
position: relative;
.title {
font-size: 28rpx;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 40rpx;
width: 438rpx;
}
.spec {
width: 438rpx;
display: flex;
justify-content: space-between;
margin-top: 20rpx;
view {
font-size: 26rpx;
color: #666666;
}
}
.price {
margin-top: 56rpx;
width: 438rpx;
text-align: right;
font-size: 28rpx;
font-weight: bolder;
color: #252525;
}
}
}
.btn {
width: 654rpx;
display: flex;
justify-content: flex-end;
.btn-item {
margin-top: 40rpx;
height: 62rpx;
width: 176rpx;
border-radius: 32rpx;
text-align: center;
font-size: 24rpx;
line-height: 64rpx;
}
.pay-btn {
border: 2rpx solid #FF0520;
color: #FF0520;
margin-left: 24rpx;
}
.other-btn {
border: 2rpx solid #C9C9C9;
color: #686868;
}
}
}
}
.empty {
padding: 432rpx 136rpx 0;
.empty-img {
height: 280rpx;
width: 480rpx;
}
.empty-text {
font-size: 28rpx;
color: #BFBFBF;
margin-top: 48rpx;
width: 480rpx;
text-align: center;
}
}
}
</style>
<template>
<view>
<Alert :text="text" @clickCertain="goLogin()"></Alert>
</view>
</template>
<script>
export default {
data() {
return {
text: ''
};
},
onLoad(options) {
this.text = options.message
},
methods: {
goLogin() {
this.$router.replaceTo('Login')
}
}
}
</script>
<style>
page{
background-color: rgba(red, green, blue, 0);
}
</style>
<template>
<view class="layout">
<view class="list">
<view class="item" v-for="(item, index) in goodList" @click="goGoodDetail(item.spuNo, item.skuNo)" :key="index">
<image class="img" :src="item.skuImg"></image>
<view class="item-rigth">
<text class="item-title">{{ item.skuName }}</text>
<view><text class="item-brand">{{ item.BrandName }}</text></view>
<text class="item-integral">{{ item.sellingPrice }}积分</text>
</view>
</view>
<uni-load-more v-if="brandList.length > 0" :status="loadingType"></uni-load-more>
</view>
</view>
</template>
<script>
export default {
data() {
return {
page: 1,
pageSize: 20,
loadingType: 'more',
goodList: [],
brandNo: ''
};
},
onLoad(option) {
this.brandNo = option.brandNo;
this.getData();
uni.setNavigationBarTitle({
title: option.brandName
})
},
methods: {
getData() {
this.$net
.get('/goods/sku', { page: this.page, pageSize: this.pageSize, brandNo: this.brandNo })
.then(res => {
if (res.data.list.length > 0) {
this.goodList = this.goodList
.concat(res.data.list);
this.page += 1;
}
this.loadingType = res.data.list.length < this.pageSize ? 'noMore' : 'more';
})
.catch(err => {
console.log(err);
});
},
goGoodDetail(spuNo, skuNo) {
this.$router.push('GoodsDetail', {'spuNo':spuNo,'skuNo':skuNo})
}
}
};
</script>
<style lang="scss" scoped>
.layout {
width: 100%;
height: 100%;
background: #f5f5f5;
.list {
display: flex;
flex-direction: column;
padding: 6rpx 12rpx;
.item {
display: flex;
flex-direction: row;
background: #ffffff;
padding: 20rpx 20rpx;
border-radius: 16rpx;
margin: 12rpx 0;
.img {
width: 200rpx;
height: 200rpx;
border-radius: 8rpx;
}
.item-rigth {
display: flex;
flex-direction: column;
justify-content: space-between;
margin-left: 24rpx;
.item-title {
font-size: 28rpx;
color: #333333;
height: 58rpx;
line-height: 28rpx;
overflow: hidden;
min-inline-size: 2;
line-clamp: 2;
text-overflow: ellipsis;
max-lines: 2;
}
.item-brand {
background: rgba(255, 5, 32, 0.03);
border-radius: 4rpx;
border: 1rpx solid #ff0520;
font-size: 22rpx;
color: #ff0520;
margin-top: 12rpx;
line-height: 22rpx;
margin-top: 8rpx;
padding: 0 8rpx;
width: auto;
}
.item-integral {
font-size: 32rpx;
font-weight: bolder;
color: #ff0520;
line-height: 33rpx;
margin-top: 36rpx;
}
}
}
}
}
</style>
<template>
<view class="layout">
<view class="title">支付密码</view>
<input class="input" placeholder="请输入6位数字支付密码" type="number" v-model="pwd" maxlength="6"/>
<view class="title">再次输入</view>
<input class="input" placeholder="再次输入上方相同的支付密码" type="number" v-model="pwdSecond" maxlength="6" />
<view :class="pwd.length == 6 && pwdSecond.length == 6 ? 'submit1' : 'submit'" @click="submit">提交</view>
</view>
</template>
<script>
export default {
data() {
return {
pwd: '',
pwdSecond: '',
randomCode: ''
}
},
onLoad(option) {
this.randomCode = option.randomCode ? option.randomCode : ''
},
methods: {
submit() {
if (this.pwd !== this.pwdSecond) {
this.toast('请输入相同密码')
return
}
this.$net.post('/staff/password/setting', {from: 'my', pwd: this.pwd, randomCode: this.randomCode})
.then(res => {
if (res.code == 200) {
this.$store.commit('refreshSetPwdSuccess', true)
this.$router.pop()
} else {
this.toast(res.message)
}
})
.catch(err => {
this.toast(err)
})
}
}
}
</script>
<style lang="scss" scoped>
.layout {
width: 100%;
height: 100%;
position: absolute;
background: #ffffff;
.title {
font-size: 32rpx;
font-weight: bolder;
color: #333333;
line-height: 48rpx;
margin-top: 80rpx;
padding-left: 49rpx;
padding-right: 49rpx;
}
.input {
outline: none;
border-bottom: solid 2rpx #FF0520;
font-size: 32rpx;
margin-top: 49rpx;
margin-left: 49rpx;
margin-right: 49rpx;
padding-bottom: 29rpx;
}
.submit {
width: 590rpx;
height: 96rpx;
background: #FF0520;
opacity: 0.5;
border-radius: 48rpx;
font-size: 32rpx;
color: #FFFFFF;
line-height: 96rpx;
text-align: center;
margin: 120rpx auto;
}
.submit1 {
width: 590rpx;
height: 96rpx;
background: #FF0520;
border-radius: 48rpx;
font-size: 32rpx;
color: #FFFFFF;
line-height: 96rpx;
text-align: center;
margin: 120rpx auto;
}
}
</style>
<template>
<view class="layout">
<view class="first-line">请完成以下认证</view>
<view class="sencond-line">请输入{{ phone }}收到的短信验证码</view>
<view class="code-layout">
<input class="input" placeholder="请输入短信验证码" v-model="code" type="number" maxlength="8" />
<text class="vertify-code" @click="getCode()">{{ verifyCode }}</text>
</view>
<view :class="code.length > 0 ? 'submit1' : 'submit'" @click="submit">下一步</view>
</view>
</template>
<script>
export default {
data() {
return {
phone: this.$store.state.userInfo.mobile.substring(0, 3) + '****' + this.$store.state.userInfo.mobile.substring(7, 11),
verifyCode: '获取验证码',
verifyTime: 300,
code: ''
};
},
onLoad() {
console.log(this.$store.state.userInfo.mobile);
},
methods: {
getCode() {
if (this.verifyTime !== 300) {
return;
}
this.$net
.post('/staff/sms', { codeType: 20, mobile: this.$store.state.userInfo.mobile })
.then(res => {
if (res.code == 200) {
this.toast('验证码发送成功');
this.startTime();
} else {
this.toast(res.message);
}
})
.catch(err => {
this.toast(err);
console.log(err);
});
},
// 开始倒计时
startTime() {
if (this.verifyTime !== 300) {
return;
}
this.verifyCode = this.verifyTime + 's';
const timer = setInterval(() => {
this.verifyTime--;
if (this.verifyTime > 0) {
this.verifyCode = this.verifyTime + 's';
} else {
this.verifyCode = '重新发送';
this.verifyTime = 300;
clearInterval(timer);
}
}, 1000);
},
submit() {
if (this.code.length != 4) {
this.toast('请输入正确的验证码')
return
}
this.$net.post('/staff/password/change', {code: this.code})
.then(res => {
console.log(res)
if (res.code == 200) {
this.$router.replaceTo('SetPwd', {randomCode: res.data.randomCode})
} else {
this.toast('请输入正确的验证码')
}
})
.catch(err => {
this.toast('请输入正确的验证码')
})
}
}
};
</script>
<style lang="scss" scoped>
.layout {
width: 100%;
height: 100%;
background: #ffffff;
.first-line {
font-size: 36rpx;
font-weight: bolder;
color: #333333;
line-height: 48rpx;
margin: 80rpx 49rpx 0 49rpx;
}
.sencond-line {
font-size: 26rpx;
color: #333333;
line-height: 48rpx;
margin: 29rpx 49rpx 0 49rpx;
}
.code-layout {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin: 29rpx 49rpx 0 49rpx;
border-bottom: solid 2rpx #ff0520;
padding-bottom: 30rpx;
.input {
outline: none;
font-size: 32rpx;
font-weight: bolder;
flex: 1;
}
.vertify-code {
font-size: 32rpx;
color: #ff0520;
line-height: 48rpx;
}
}
.submit {
width: 590rpx;
height: 96rpx;
background: #ff0520;
opacity: 0.5;
border-radius: 48rpx;
font-size: 32rpx;
color: #ffffff;
line-height: 96rpx;
text-align: center;
margin: 120rpx auto;
}
.submit1 {
width: 590rpx;
height: 96rpx;
background: #ff0520;
border-radius: 48rpx;
font-size: 32rpx;
color: #ffffff;
line-height: 96rpx;
text-align: center;
margin: 120rpx auto;
}
}
</style>
This source diff could not be displayed because it is too large. You can view the blob instead.
<template>
<view class="layout">
<view class="header">
<view @click="showTimeSelect" class="header-left">
<text class="header-time">{{ applyDate }}</text>
<image class="time-bottom-row" src="../../static/icon-bottom-row.png"></image>
</view>
<view class="header-right">
<text :class="currentTab == 0 ? 'tab-select' : 'tab-unselect'" @click="selectTab(0)">综合</text>
<text :class="currentTab == 200 ? 'tab-select' : 'tab-unselect'" @click="selectTab(200)">支出¥{{ allConsume }}</text>
<text :class="currentTab == 100 ? 'tab-select' : 'tab-unselect'" @click="selectTab(100)">收入¥{{ allIncome }}</text>
</view>
</view>
<view v-if="integralList.length > 0" class="list">
<view class="item" v-for="(item, index) in integralList" :key="index">
<image class="icon" :src="item.integral<0?'../../static/integral-use.png':'../../static/integral-income.png'"></image>
<view class="item-right">
<view class="item-right-top">
<view class="item-title">
<text class="item-type">{{ item.tag }}</text>
<text class="item-name">{{ item.title }}</text>
<text class="item-count">{{ item.number <= 0 ? '' : '*' + item.number }}</text>
</view>
<text :class="item.integral > 0 ? 'item-integral-income' : 'item-integral'">{{item.integral>0?'+':''}}{{ item.integral }}</text>
</view>
<view class="item-right-bottom">
<text class="item-time">{{ item.transactionTime }}</text>
<text class="item-integral-rest">积分余额: {{ item.surplusIntegral }}</text>
</view>
<view class="line"></view>
</view>
</view>
<uni-load-more v-if="integralList.length > 0" :status="loadingType"></uni-load-more>
</view>
<view v-else-if="!isLoading && integralList.length <= 0" class="empty">
<image class="empty-icon" src="../../static/integral-empty-icon.png"></image>
<text class="empty-desc">本月暂时没有支出积分哦</text>
</view>
<uni-popup class="pop" ref="timeShow" type="bottom" background-color="#fff" safeArea="true">
<text class="selectTime" @click="selectTime()">确定</text>
<picker-view :indicator-style="indicatorStyle" :value="value" @change="bindChange" class="picker-view">
<picker-view-column>
<view class="item" v-for="(item, index) in years" :key="index">{{ item }}</view>
</picker-view-column>
<picker-view-column>
<view class="item" v-for="(item, index) in months" :key="index">{{ item }}</view>
</picker-view-column>
</picker-view>
</uni-popup>
</view>
</template>
<script>
export default {
data() {
const date = new Date();
const years = [];
const year = date.getFullYear();
const months = [];
const month = date.getMonth() + 1;
const days = [];
const day = date.getDate();
for (let i = year - 4; i <= date.getFullYear(); i++) {
years.push(i);
}
for (let i = 1; i <= date.getMonth() + 1; i++) {
months.push(i);
}
return {
integralList: [],
// 明细类型(0:综合;100:收入;200:支出)
currentTab: 0,
applyDate: '',
page: 1,
pageSize: 20,
loadingType: 'more',
isLoading: true,
allConsume: '0.00',
allIncome: '0.00',
title: 'picker-view',
years,
year,
months,
month,
days,
date: new Date(),
value: [9999, month - 1],
indicatorStyle: `height: 50rpx;`,
tmpYear: '',
tmpMonth: ''
};
},
created() {
this.getData(false);
},
methods: {
getData(isRefresh) {
this.isLoading = true;
if (isRefresh) {
this.page = 1;
this.loadingType = 'more';
this.integralList = [];
}
this.$net
.post('/integral/index', { page: this.page, pageSize: this.pageSize, applyDate: this.applyDate, type: this.currentTab })
.then(res => {
this.applyDate = res.data.applyDate;
if (res.data.list.length > 0) {
this.integralList = this.integralList.concat(res.data.list);
this.allConsume = res.data.allConsume;
this.allIncome = res.data.allIncome;
this.page += 1;
}
this.loadingType = res.data.list.length < this.pageSize ? 'noMore' : 'more';
this.isLoading = false;
})
.catch(err => {
this.isLoading = false;
});
},
selectTab(type) {
this.currentTab = type;
this.getData(true);
},
showTimeSelect() {
this.$refs.timeShow.open()
},
selectTime() {
this.year = this.tmpYear
this.month = this.tmpMonth
this.applyDate = this.year + "-" + this.month
this.$refs.timeShow.close()
this.getData(true)
},
bindChange(e) {
console.log(e);
const val = e.detail.value
this.tmpYear = this.years[val[0]]
if(this.tmpYear == this.date.getFullYear()) {
this.months = []
for (let i = 1; i <= this.date.getMonth() + 1; i++) {
this.months.push(i);
}
} else {
this.months = []
for (let i = 1; i <= 12; i++) {
this.months.push(i);
}
}
if(this.months[val[1]] > this.date.getMonth() + 1) {
this.tmpMonth = this.date.getMonth() + 1
this.month = this.date.getMonth() + 1
} else {
this.tmpMonth = this.months[val[1]]
}
}
}
};
</script>
<style lang="scss" scoped>
.layout {
width: 100%;
height: 100%;
position: relative;
background: #f5f5f5;
.header {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
position: sticky;
height: 100rpx;
padding-left: 30rpx;
padding-right: 30rpx;
.header-left {
display: flex;
flex-direction: row;
align-items: center;
.header-time {
font-size: 30rpx;
font-weight: bolder;
color: #333333;
}
.time-bottom-row {
width: 20rpx;
height: 14rpx;
margin-left: 15rpx;
}
}
.header-right {
display: flex;
flex-direction: row;
.tab-select {
font-size: 24rpx;
font-weight: bolder;
color: #333333;
margin-left: 24rpx;
}
.tab-unselect {
font-size: 24rpx;
color: #999999;
margin-left: 24rpx;
}
}
}
.list {
display: flex;
flex-direction: column;
height: 100%;
background: #ffffff;
.item {
display: flex;
flex-direction: row;
margin-top: 34rpx;
.icon {
width: 90rpx;
height: 90rpx;
background: #ffffff;
border: 2px solid #efefef;
border-radius: 50%;
margin-left: 30rpx;
}
.item-right {
display: flex;
flex-direction: column;
margin-left: 30rpx;
flex: 1;
.item-right-top {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-right: 30rpx;
.item-title {
display: flex;
flex-direction: row;
.item-type {
font-size: 30rpx;
color: #333333;
}
.item-name {
margin-left: 10rpx;
max-width: 250rpx;
font-size: 30rpx;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item-count {
font-size: 30rpx;
color: #333333;
}
}
.item-integral {
font-size: 30rpx;
font-weight: bolder;
color: #333333;
}
.item-integral-income {
font-size: 30rpx;
font-weight: bolder;
color: #ff0520;
}
}
.item-right-bottom {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-right: 30rpx;
align-items: center;
margin-top: 24rpx;
.item-time {
font-size: 26rpx;
color: #999999;
}
.item-integral-rest {
font-size: 26rpx;
color: #999999;
}
}
.line {
height: 2rpx;
background: #f5f5f5;
width: 100%;
margin-top: 34rpx;
}
}
}
}
.empty {
display: flex;
flex-direction: column;
align-items: center;
height: 100%;
background: #ffffff;
.empty-icon {
width: 364rpx;
height: 300rpx;
margin-top: 180rpx;
}
.empty-desc {
font-size: 28rpx;
color: #999999;
line-height: 28rpx;
margin-top: 49rpx;
}
}
.pop {
.selectTime {
text-align: right;
color: #FF0520;
font-size: 24rpx;
position: absolute;
right: 0;
top: 0;
height: 48rpx;
line-height: 48rpx;
margin-right: 30rpx;
z-index: 999;
}
.picker-view {
// width: 750rpx;
height: 500rpx;
margin-top: 20rpx;
}
.item {
height: 50rpx;
align-items: center;
justify-content: center;
text-align: center;
line-height: 50rpx;
}
}
}
</style>
......@@ -13,7 +13,7 @@
<view class="input-code input">
<input class="left" confirm-type="search" type="text" :value="code" placeholder="请输入验证码"
@input="bottomInputChange" :placeholder-style="{'color':'#848689'}" :maxlength="4"/>
<text @click="sendCode()" class="right" :style="{'color':isSendCode?'#FF0520':''}">{{btnText}}</text>
<text @click="sendCode()" class="right" :style="{'color':isSendCode?'':'#FF0520'}">{{btnText}}</text>
</view>
</view>
<view class="login-btn" @click="login()">
......@@ -30,7 +30,7 @@
code: '',
time: 300,
isSendCode: false,
btnText: '发送验证码',
btnText: '获取验证码',
showSelectAccount: false,
showGetPhoneBtn: true
}
......@@ -48,9 +48,10 @@
this.code = e.detail.value
},
getphonenumber (e) {
console.log(e);
this.liteLogin(e.detail.code)
},
sendVerifyCode() {
sendCode() {
if (this.phone.length != 11) {
this.toast('请输入正确的手机号')
return
......@@ -104,10 +105,12 @@
this.loading.loadingHide()
if (res.code === 200) {
this.$net.tokenSave(res.data.token || '')
if (res.date&&res.date.list) {
this.$store.commit('refreshUserLogin', true)
if (res.data.accountSwitching != 0) {
this.$router.replaceTo('SelectAccount')
} else {
this.$router.pop()
}
this.$router.push('SelectAccount')
} else {
this.toast(res.message)
}
......@@ -115,16 +118,21 @@
},
liteLogin(liteCode) {
this.showGetPhoneBtn = false
if (!liteCode) {
return
}
this.loading.loadingShow('登录中...')
let params = {'authType':'lite','authAccount':liteCode, 'resetToken':'not'}
this.$net.post('/auth/authorization', params).then(res => {
this.loading.loadingHide()
if (res.code === 200) {
this.$net.tokenSave(res.data.token || '')
if (res.date&&res.date.list) {
this.$store.commit('refreshUserLogin', true)
if (res.data.accountSwitching != 0) {
this.$router.replaceTo('SelectAccount')
} else {
this.$router.pop()
}
this.$router.push('SelectAccount')
} else {
this.toast(res.message)
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2,8 +2,8 @@
<view class="container">
<view class="top">{{topTitle}}</view>
<view class="sub">{{subTitle}}</view>
<view>
<view class="item" v-for="(item, index) in accountList" :style="{'margin-top':index===0?'128rpx':'', 'opacity':item.staffState!==200?'0.6':''}" :key="index" @click="goAccount(item)">
<view class="account-content">
<view class="item" v-for="(item, index) in accountList" :style="{'opacity':item.staffState!==200?'0.6':''}" :key="index" @click="goAccount(item)">
<image class="left" :src="item.avatar" mode=""></image>
<view class="middle">
<view class="middle-item">{{item.staffName}}</view>
......@@ -12,8 +12,8 @@
<image class="right" src="../../static/arrow-right.png" mode=""></image>
</view>
</view>
<view class="bottom">
<image v-if="!selectTips" class="select-img" src="../../static/select-n.png" mode="" @click="selectTips=true"></image>
<view class="bottom" v-if="!isSettingEnter">
<image v-if="!selectTips" class="select-img" src="../../static/select-n.png" mode="" @click="selectTips=!selectTips"></image>
<image v-else class="select-img" src="../../static/select-h.png" mode="" @click="selectTips=false"></image>
<view class="tips">
查看并同意<text>《隐私政策》</text><text>《服务协议》</text>
......@@ -28,42 +28,49 @@
return {
topTitle: '选择账号',
subTitle: '系统检测到该手机号已在多家公司注册',
accountList: [
{
'avatar': '',
'staffName': 'xoakjsbfoq',
'accountName': '手机号的不干胶王本岗位能力跟你',
'staffState': 100
},
{
'avatar': '',
'staffName': 'xoakjsbfoq',
'accountName': '手机号的不干胶王本岗位能力跟你',
'staffState': 100
},
{
'avatar': '',
'staffName': 'xoakjsbfoq',
'accountName': '手机号的不干胶王本岗位能力跟你',
'staffState': 200
}
],
selectTips: false
accountList: [],
selectTips: false,
isSettingEnter: false
};
},
created() {
onLoad(options) {
this.isSettingEnter = options.isSettingEnter || false
if (this.isSettingEnter) {
this.topTitle = '切换账号'
this.subTitle = '点击下方账号信息即可完成切换'
}
this.getAllAccount()
},
created() {
},
methods: {
goAccount(item) {
if (!this.selectTips && !this.isSettingEnter) {
this.toast('请先查看并同意《隐私政策》和《服务协议》')
return
}
if (item.staffState!==200) {
this.toast('该帐号已被禁用')
return
}
this.$net.post('/account/change', {'accountCode': item.accountCode}).then(res => {
if (res.code === 200) {
if (this.isSettingEnter) {
this.$router.replaceTo('Mine')
this.$store.commit('refreshSelectAccount', true)
} else {
this.$router.pop()
}
} else {
this.toast(res.message)
}
})
},
getAllAccount() {
this.$net.get('/staff/query').then(res => {
this.$net.get('/account/query').then(res => {
if (res.code === 200) {
this.accountList = this.accountList.concat(res.data)
this.accountList = this.accountList.concat(res.data.QueryAccountOutput)
} else {
this.toast(res.message)
}
......@@ -86,45 +93,50 @@
color: #666666;
margin-top: 16rpx;
}
.first-item{
.account-content {
height: 550rpx;
overflow-y: auto;
margin-top: 128rpx;
}
.item {
margin-top: 40rpx;
border-radius: 16rpx;
border: 2rpx solid #F0F0F0;
display: flex;
padding: 24rpx;
align-items: center;
.left {
display: block;
height: 96rpx;
width: 96rpx;
background-color: #18BC37;
border-radius: 96rpx;
.first-item{
margin-top: 0;
}
.middle {
height: 86rpx;
margin-left: 24rpx;
font-size: 26rpx;
color: #333333;
.middle-item {
height: 36rpx;
line-height: 38rpx;
width: 402rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
.item {
margin-top: 40rpx;
border-radius: 16rpx;
border: 2rpx solid #F0F0F0;
display: flex;
padding: 24rpx;
align-items: center;
.left {
display: block;
height: 96rpx;
width: 96rpx;
background-color: #18BC37;
border-radius: 96rpx;
}
.middle-next-item {
margin-top: 14rpx;
.middle {
height: 86rpx;
margin-left: 24rpx;
font-size: 26rpx;
color: #333333;
.middle-item {
height: 36rpx;
line-height: 38rpx;
width: 402rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.middle-next-item {
margin-top: 14rpx;
}
}
.right {
display: block;
margin-left: 40rpx;
height: 20rpx;
width: 12rpx;
}
}
.right {
display: block;
margin-left: 40rpx;
height: 20rpx;
width: 12rpx;
}
}
.bottom {
......
<template>
<view class="layout">
<view class="item" @click="changePwd">
<text class="item-title">设置支付密码</text>
<view>
<text v-if="hasPwd" class="already-set">已设置</text>
<image class="item-right-row" src="../../static/arrow-right.png"></image>
</view>
</view>
<view class="item" @click="changeAccount">
<text class="item-title">切换账号</text>
<image class="item-right-row" src="../../static/arrow-right.png"></image>
</view>
<view class="item1">
<text class="item-quit" @click="quit">退出账号</text>
</view>
<uni-popup class="pop" ref="popup" type="center">
<view class="dialog">
<view class="title">是否退出登录?</view>
<view class="button-layout">
<text class="cancel" @click="cancel">取消</text>
<text class="sure" @click="sure">确认</text>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
export default {
data() {
return {
hasPwd: this.$store.state.userInfo.settingCheckCode === 1
}
},
onLoad(options) {
},
onShow() {
this.hasPwd = this.$store.state.userInfo.settingCheckCode === 1
if (this.$store.state.setPwdSuccess) {
this.$store.commit('refreshSetPwdSuccess', false)
this.toast('支付密码设置成功')
}
},
methods: {
changePwd() {
if (this.hasPwd) {
this.$router.push('VertifyPhone')
return
}
this.$router.push('SetPwd')
},
changeAccount() {
if (this.$store.state.userInfo.allowSwitching == 0) {
this.toast('暂无可切换账号')
} else {
this.$router.push('SelectAccount', {'isSettingEnter': true})
}
// this.$router.push('SelectAccount')
},
quit() {
this.$refs.popup.open()
},
cancel() {
this.$refs.popup.close()
},
sure() {
this.$store.commit('refreshUserInfo',{})
this.$store.commit('refreshUserLogin', false)
this.$net.tokenSave('')
this.$router.replaceTo('Home')
}
}
}
</script>
<style lang="scss" scoped>
.layout {
width: 100%;
height: 100%;
background: #f5f5f5;
padding-top: 20rpx;
position: absolute;
.item {
background: #ffffff;
height: 107rpx;
margin-top: 2rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 0 30rpx;
.item-title {
font-size: 30rpx;
color: #333333;
line-height: 85rpx;
}
.already-set {
font-size: 30rpx;
color: #333333;
line-height: 85px;
margin-right: 30rpx;
}
.item-right-row {
width: 12rpx;
height: 20rpx;
}
}
.item1 {
background: #ffffff;
height: 107rpx;
margin-top: 99rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width: 100%;
.item-quit {
font-size: 30rpx;
color: #333333;
line-height: 107rpx;
text-align: center;
width: 100%;
}
}
.pop {
.dialog {
width: 640rpx;
// height: 309rpx;
background: #FFFFFF;
border-radius: 16rpx;
padding-top: 80rpx;
padding-bottom: 40rpx;
.title {
font-size: 32rpx;
color: #333333;
line-height: 48rpx;
text-align: center;
margin:0 auto;
}
.button-layout {
margin: 80rpx 40rpx 0 40rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
.cancel {
width: 260rpx;
height: 80rpx;
background: #EFEFEF;
border-radius: 40rpx;
font-size: 32rpx;
color: #666666;
line-height: 80rpx;
text-align: center;
}
.sure {
width: 260rpx;
height: 80rpx;
background: #FF0520;
border-radius: 40rpx;
font-size: 32rpx;
color: #FFFFFF;
line-height: 80rpx;
text-align: center;
}
}
}
}
}
</style>
<template>
<view class="container">
<view class="goods">
<view class="title">商品信息</view>
<view class="info">
<image class="img" :src="goods.img" mode=""></image>
<view class="right">
<view class="goods-title">{{goods.title}}</view>
<view class="bottom-info">
<view class="integral">{{goods.sellingPrice}}积分</view>
<view class="buy-button">
<image v-if="goodsNum===1" class="reduce" src="../../static/reduce.png" mode="" @click="reduce()"></image>
<image v-else class="reduce" src="../../static/reduce-h.png" mode="" @click="reduce()"></image>
<view class="goods-num">{{goodsNum}}</view>
<image class="plus" src="../../static/add.png" mode="" @click="add()"></image>
</view>
</view>
</view>
</view>
</view>
<view class="bottom" :style="{'height':safeAreaBottom+120+'rpx'}">
<view class="left">
<text class="title">支付积分:<text class="num">{{payIntegral}}积分</text></text>
</view>
<view class="right" @click="goSubmit()">
立即兑换
</view>
</view>
<pwdCodeAlert closeName="showPwdAlert" v-show="showPwdAlert" :integral="payIntegral" @pwdSubmit="pwdSubmit"></pwdCodeAlert>
<smsCodeAlert closeName="showSmsCodeAlert" v-show="showSmsCodeAlert" @smsCodeSubmit="smsCodeSubmit"></smsCodeAlert>
<Alert v-show="errorAlert" :text="errorAlertText" @clickCertain="clickAlert" @clickCancel="clickAlert"/>
</view>
</template>
<script>
export default {
data() {
return {
goods: {},
goodsNum: 1,
safeAreaBottom: this.SafeAreaBottom,
showPwdAlert: false,
showSmsCodeAlert: false,
errorAlert: false,
errorAlertText: '',
orderId: ''
};
},
onLoad(options) {
console.log(this.$store.state);
this.goods = this.$store.state.submitGoods || {}
this.goodsNum = this.goods.num
},
computed: {
payIntegral() {
return this.$numUtils.numMulti(this.goods.sellingPrice+'', this.goodsNum+'')
}
},
methods: {
add() {
if (this.$numUtils.numMulti(this.goods.sellingPrice+'', this.goodsNum+1) > Number(this.$store.state.userInfo.surplusIntegral)) {
this.toast('积分不够')
return
}
this.goodsNum++
},
reduce() {
if (this.goodsNum === 1) {
return
}
this.goodsNum--
},
goSubmit() {
let params = {
'payIntegral':this.payIntegral,
'payDetail':[
{
'spuId': this.goods.spuNo,
'skuId': this.goods.skuNo,
'payNumber': this.goodsNum
}
]
}
this.$net.post('/submit', params).then(res=>{
if (res.code === 200) {
this.orderId = res.data.orderId
if (res.data.isSendSms === 1) {
this.showSmsCodeAlert = true
} else {
this.showPwdAlert = true
}
} else {
this.errorAlertText = res.message
this.errorAlert = true
}
if (res.code === 1001) {
this.getDetail()
}
})
},
getDetail() {
let params = {'skuNo': this.goods.skuNo, 'spuNo': this.goods.spuNo}
this.$net.get('/goods/sku/detail', params).then(res => {
if (res.code === 200) {
this.goods.sellingPrice = res.data.skuDetail.sellingPrice
}
})
},
clickAlert() {
this.errorAlert = false
},
smsCodeSubmit(e) {
this.$net.post('/payment/validation', {'orderId':this.orderId,'smsCode':e}).then(res=>{
if (res.code === 200) {
this.showSmsCodeAlert = false
this.showPwdAlert = true
} else {
this.toast(res.message)
}
})
},
pwdSubmit(e) {
this.$net.post('/payment', {'orderId':this.orderId,'payPasswd':e}).then(res=>{
if (res.code === 200) {
this.showPwdAlert = false
this.$router.push('OrderDetail',{'orderId':res.data.orderId})
} else {
this.toast(res.message)
}
})
}
}
}
</script>
<style lang="scss" scoped>
.container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #F5F5F5;
.goods {
margin: 24rpx;
border-radius: 16rpx;
background-color: #FFFFFF;
padding: 24rpx;
.title {
font-size: 32rpx;
font-weight: bolder;
color: #333333;
line-height: 44rpx;
}
.info {
display: flex;
margin-top: 28rpx;
.img {
height: 200rpx;
width: 200rpx;
display: block;
border-radius: 8rpx;
}
.right {
margin-left: 16rpx;
.goods-title {
font-size: 28rpx;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
height: 80rpx;
line-height: 40rpx;
width: 438rpx;
}
.attr {
margin-top: 8rpx;
font-size: 26rpx;
color: #666666;
line-height: 36rpx;
}
.bottom-info {
margin-top: 76rpx;
display: flex;
align-items: center;
width: 438rpx;
justify-content: space-between;
.integral {
font-size: 32rpx;
height: 36rpx;
line-height: 36rpx;
color: #FF0520;
}
.buy-button {
position: relative;
display: flex;
width: 160rpx;
height: 40rpx;
font-size: 28rpx;
align-items: center;
.reduce {
width: 40rpx;
height: 40rpx;
}
.goods-num {
width: 78rpx;
text-align: center;
color: #333333;
}
.plus {
position: absolute;
top: 0;
left: 118rpx;
width: 40rpx;
height: 40rpx;
}
}
}
}
}
}
.bottom {
// height: 120rpx;
bottom: 0;
background-color: #FFFFFF;
display: flex;
padding: 0 24rpx;
// align-items: center;
justify-content: space-between;
position: fixed;
left: 0;
right: 0;
.left {
margin-top: 32rpx;
.title {
font-size: 28rpx;
color: #252525;
}
.num {
font-size: 28rpx;
font-weight: bolder;
color: #FF0520;
}
}
.right {
margin-top: 20rpx;
height: 80rpx;
border-radius: 40rpx;
width: 256rpx;
background-color: #FF0520;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
line-height: 82rpx;
}
}
}
</style>
......@@ -5,7 +5,17 @@ const routers = {
'Home': '/pages/home/home',
'Order': '/pages/order/order',
'Mine': '/pages/mine/mine',
'SelectAccount': '/pagesA/selectAccount/selectAccount'
'SelectAccount': '/pagesA/selectAccount/selectAccount',
'GoodsDetail': '/pagesA/goods/goods',
'SubmitOrder': '/pagesA/submitOrder/submitOrder',
'GoodSkuList': '/pagesA/GoodSkuList/GoodSkuList',
'IntegralDetail': '/pagesA/integralDetail/integralDetail',
'Setting': '/pagesA/setting/setting',
'VertifyPhone': '/pagesA/VertifyPhone/VertifyPhone',
'SetPwd': '/pagesA/SetPwd/SetPwd',
'OrderDetail': '/pagesA/orderDetail/orderDetail',
'Coupon': '/pagesA/coupon/coupon',
'AlertToLogin': '/pagesA/AlertToLogin/AlertToLogin'
}
export function push(routerName, params, events) {
......
static/add.png

882 Bytes

......@@ -11,7 +11,10 @@ const store = createStore({
// #endif
state: {
isLogin: false,
userInfo: {}
userInfo: {},
submitGoods: {},
selectAccount: false,
setPwdSuccess: false
},
mutations: {
refreshUserLogin(state, isLogin) {
......@@ -19,7 +22,16 @@ const store = createStore({
},
refreshUserInfo(state, info) {
state.userInfo = info
},
},
refreshSubmitGoods(state, info) {
state.submitGoods = info
},
refreshSelectAccount(state, value) {
state.selectAccount = value
},
refreshSetPwdSuccess(state, value) {
state.setPwdSuccess = value
}
},
getters: {
......
......@@ -471,6 +471,7 @@ export default {
that.outFoStock = false;
that.shopItemInfo = {};
let specListName = that.specListName;
console.log(specListName, that.goodsInfo);
that.goodsInfo[specListName].map(item => {
that.selectArr.push('');
that.subIndex.push(-1);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{"version":3,"sources":["uni-app:///main.js","webpack:////Users/wangjian/Desktop/HBuilder/FuLiMini/pages/home/home.vue?a5c0","webpack:////Users/wangjian/Desktop/HBuilder/FuLiMini/pages/home/home.vue?4bd0","webpack:////Users/wangjian/Desktop/HBuilder/FuLiMini/pages/home/home.vue?d8c7","webpack:////Users/wangjian/Desktop/HBuilder/FuLiMini/pages/home/home.vue?2a32","uni-app:///pages/home/home.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;kDAAA;AACA;AACA,yF,6FAFmBA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC;AAGnBC,UAAU,CAACC,aAAD,CAAV,C;;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAA6H;AAC7H;AACwD;AACL;;;AAGnD;AACgN;AAChN,gBAAgB,iNAAU;AAC1B,EAAE,0EAAM;AACR,EAAE,2FAAM;AACR,EAAE,oGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,+FAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACtBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAAk0B,CAAgB,kyBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;ACSt1B;AACA,MADA,kBACA;AACA;;AAEA,GAJA;AAKA;AACA,WADA,qBACA;AACA;AACA,KAHA,EALA,E","file":"pages/home/home.js","sourcesContent":["import 'uni-pages';wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/home/home.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./home.vue?vue&type=template&id=92bb8f34&scoped=true&\"\nvar renderjs\nimport script from \"./home.vue?vue&type=script&lang=js&\"\nexport * from \"./home.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"92bb8f34\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pages/home/home.vue\"\nexport default component.exports","export * from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./home.vue?vue&type=template&id=92bb8f34&scoped=true&\"","var components\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./home.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./home.vue?vue&type=script&lang=js&\"","<template>\n\t<view>\n\t\t<view class=\"\" @click=\"goLogin()\">\n\t\t\t11111\n\t\t</view>\n\t</view>\n</template>\n\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t};\n\t\t},\n\t\tmethods: {\n\t\t\tgoLogin() {\n\t\t\t\tthis.$router.push('Login')\n\t\t\t}\n\t\t}\n\t}\n</script>\n\n<style lang=\"scss\" scoped>\n\n</style>\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["uni-app:///main.js","webpack:////Users/wangjian/Desktop/HBuilder/FuLiMini/pages/index/index.vue?65ba","webpack:////Users/wangjian/Desktop/HBuilder/FuLiMini/pages/index/index.vue?cd4a","webpack:////Users/wangjian/Desktop/HBuilder/FuLiMini/pages/index/index.vue?6d9d","webpack:////Users/wangjian/Desktop/HBuilder/FuLiMini/pages/index/index.vue?492b","uni-app:///pages/index/index.vue","webpack:////Users/wangjian/Desktop/HBuilder/FuLiMini/pages/index/index.vue?882f","webpack:////Users/wangjian/Desktop/HBuilder/FuLiMini/pages/index/index.vue?a5ca"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;kDAAA;AACA;AACA,4F,6FAFmBA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC;AAGnBC,UAAU,CAACC,cAAD,CAAV,C;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkH;AAClH;AACyD;AACL;AACa;;;AAGjE;AACgN;AAChN,gBAAgB,iNAAU;AAC1B,EAAE,2EAAM;AACR,EAAE,gFAAM;AACR,EAAE,yFAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,oFAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;ACvBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAAm0B,CAAgB,myBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;ACUv1B;AACA,MADA,kBACA;AACA;AACA,oBADA;;AAGA,GALA;AAMA,QANA,oBAMA;;AAEA,GARA;AASA,aATA,E;;;;;;;;;;;ACVA;AAAA;AAAA;AAAA;AAAgrC,CAAgB,gmCAAG,EAAC,C;;;;;;;;;;ACApsC;AACA,OAAO,KAAU,EAAE,kBAKd","file":"pages/index/index.js","sourcesContent":["import 'uni-pages';wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/index/index.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./index.vue?vue&type=template&id=57280228&\"\nvar renderjs\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.vue?vue&type=script&lang=js&\"\nimport style0 from \"./index.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pages/index/index.vue\"\nexport default component.exports","export * from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./index.vue?vue&type=template&id=57280228&\"","var components\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./index.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./index.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"content\">\r\n\t\t<image class=\"logo\" src=\"/static/logo.png\"></image>\r\n\t\t<view class=\"text-area\">\r\n\t\t\t<text class=\"title\">{{title}}</text>\r\n\t\t</view>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\texport default {\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\ttitle: 'Hello'\r\n\t\t\t}\r\n\t\t},\r\n\t\tonLoad() {\r\n\r\n\t\t},\r\n\t\tmethods: {\r\n\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style>\r\n\t.content {\r\n\t\tdisplay: flex;\r\n\t\tflex-direction: column;\r\n\t\talign-items: center;\r\n\t\tjustify-content: center;\r\n\t}\r\n\r\n\t.logo {\r\n\t\theight: 200rpx;\r\n\t\twidth: 200rpx;\r\n\t\tmargin-top: 200rpx;\r\n\t\tmargin-left: auto;\r\n\t\tmargin-right: auto;\r\n\t\tmargin-bottom: 50rpx;\r\n\t}\r\n\r\n\t.text-area {\r\n\t\tdisplay: flex;\r\n\t\tjustify-content: center;\r\n\t}\r\n\r\n\t.title {\r\n\t\tfont-size: 36rpx;\r\n\t\tcolor: #8f8f94;\r\n\t}\r\n</style>\n","import mod from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./index.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./index.vue?vue&type=style&index=0&lang=css&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1649658814530\n var cssReload = require(\"/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"../../\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment