first commit
This commit is contained in:
132
pages/admin/order/index.vue
Normal file
132
pages/admin/order/index.vue
Normal file
@@ -0,0 +1,132 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view>
|
||||
<view
|
||||
style="background-color: #ffffff;color: #666666;padding: 30rpx;font-size: 28rpx; margin-bottom: 20rpx;border-radius: 16rpx;"
|
||||
v-for="(item,index) in orderItems" :key="index" :url="`/pages/goods/detail?id=${item.id}`">
|
||||
<view class="u-flex u-flex-between" style="font-size: 30rpx;">
|
||||
<view>订单号:{{item.order_no}}</view>
|
||||
<u-tag :text="config.pay_type[item.pay_type]" :name="config.pay_type[item.pay_type]" plain
|
||||
size="mini" type="warning"></u-tag>
|
||||
</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view class="u-flex">
|
||||
<u--image width="220rpx" height="220rpx" :src="item.goods.cover[0]" radius="16rpx"></u--image>
|
||||
<view style="padding: 0 20rpx;">
|
||||
<view>{{item.goods.name}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>数量:{{item.num}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>订单金额:<text style="color: #FF1A1A;">¥{{item.pay_money}}</text></view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>用户名:{{item.shop.username}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>手机号:{{item.shop.mobile}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-divider></u-divider>
|
||||
<view class="u-flex u-flex-between">
|
||||
<view>{{item.created_at}}</view>
|
||||
<view>
|
||||
<u-tag :text="config.status[item.status]" plain size="mini" type="success"></u-tag>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore :status="loadStatus" />
|
||||
<view style="height: 100rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tabData: {
|
||||
list: [{
|
||||
name: '待付款',
|
||||
status: 0,
|
||||
}, {
|
||||
name: '已完成',
|
||||
status: '1',
|
||||
}, ],
|
||||
current: 1
|
||||
},
|
||||
orderItems: [],
|
||||
search: {
|
||||
status: 1,
|
||||
page: 1
|
||||
},
|
||||
page: {
|
||||
current: 0,
|
||||
last_page: 1
|
||||
},
|
||||
loadStatus: 'loadmore',
|
||||
config: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
self = this;
|
||||
self.getOrderItems();
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!self.pageStatus()) {
|
||||
return;
|
||||
}
|
||||
self.loadStatus = 'loading';
|
||||
self.search.page = ++self.search.page;
|
||||
self.orderItems = [];
|
||||
|
||||
self.getOrderItems();
|
||||
},
|
||||
async onPullDownRefresh() {
|
||||
self.search.page = 1;
|
||||
self.orderItems = [];
|
||||
|
||||
await self.getOrderItems();
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
methods: {
|
||||
sectionChange(index) {
|
||||
self.search.status = self.tabData.list[index].status;
|
||||
self.tabData.current = index;
|
||||
self.orderItems = [];
|
||||
self.getOrderItems();
|
||||
},
|
||||
pageStatus() {
|
||||
self.loadStatus = 'loadmore';
|
||||
if (self.search.page >= self.page.last_page) {
|
||||
self.loadStatus = 'nomore';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
getOrderItems() {
|
||||
self.$http.post('/shop/admin/order/items', self.search).then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
if (success) {
|
||||
self.orderItems = self.orderItems.concat(data.items.data);
|
||||
self.config = data.config;
|
||||
self.page.last_page = data.items.last_page;
|
||||
|
||||
self.pageStatus();
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
167
pages/admin/shop/create.vue
Normal file
167
pages/admin/shop/create.vue
Normal file
@@ -0,0 +1,167 @@
|
||||
<template>
|
||||
<view style="padding: 30rpx;">
|
||||
<view style="height: 50rpx;"></view>
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" errorType="border-bottom" ref="uForm"
|
||||
labelWidth="130rpx">
|
||||
<u-form-item label="昵称" prop="nickname" borderBottom>
|
||||
<u--input v-model="form.nickname" border="none"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="用户名" prop="username" borderBottom>
|
||||
<u--input v-model="form.username" border="none"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="密码" prop="password" borderBottom>
|
||||
<u--input v-model="form.password" type="password" border="none"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="手机号" prop="mobile" borderBottom>
|
||||
<u--input v-model="form.mobile" type="mobile" border="none"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="验证码" prop="code" borderBottom>
|
||||
<u-code-input v-model="form.code" :maxlength="4" mode="line"></u-code-input>
|
||||
<view slot="right">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<u-code :seconds="code.seconds" @end="end" @start="start" ref="uCode" @change="codeChange"></u-code>
|
||||
<u-button type="primary" @tap="getCode">{{code.tips}}</u-button>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item label="等级" borderBottom>
|
||||
<u-number-box v-model="form.vip" :min="0" :max="9"></u-number-box>
|
||||
</u-form-item>
|
||||
|
||||
</u--form>
|
||||
<view style="height: 100rpx;"></view>
|
||||
<u-button type="primary" @click="userlogin">提交</u-button>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
API_URL,
|
||||
STATIC_URL
|
||||
} from '@/env'
|
||||
let self;
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
nickname: '',
|
||||
username: '',
|
||||
password: '',
|
||||
mobile: '',
|
||||
code: '',
|
||||
invite_code: '',
|
||||
vip: 0
|
||||
},
|
||||
rules: {
|
||||
'nickname': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '昵称必填项',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'username': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '用户名必填项',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'password': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '密码必填项',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'mobile': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '手机号必填项',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'code': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '验证码必填项',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
|
||||
},
|
||||
code: {
|
||||
tips: '获取验证码',
|
||||
// refCode: null,
|
||||
seconds: 60,
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
self = this;
|
||||
if (option && option.invite_code) {
|
||||
self.form.invite_code = option.invite_code;
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
//onReady 为uni-app支持的生命周期之一
|
||||
self.$refs.uForm.setRules(self.rules)
|
||||
},
|
||||
methods: {
|
||||
topage(url) {
|
||||
uni.redirectTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
codeChange(text) {
|
||||
self.code.tips = text;
|
||||
},
|
||||
getCode() {
|
||||
if (self.form.mobile.length != 11) {
|
||||
uni.$u.toast('请输入手机号');
|
||||
return;
|
||||
}
|
||||
if (self.$refs.uCode.canGetCode) {
|
||||
// 模拟向后端请求验证码
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码'
|
||||
})
|
||||
self.$http.get('/com/sms/sendcode', self.form).then(res => {
|
||||
if (res.success) {
|
||||
uni.hideLoading();
|
||||
// 这里此提示会被this.start()方法中的提示覆盖
|
||||
uni.$u.toast('验证码已发送');
|
||||
// 通知验证码组件内部开始倒计时
|
||||
self.$refs.uCode.start();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.$u.toast('倒计时结束后再发送');
|
||||
}
|
||||
},
|
||||
end() {
|
||||
uni.$u.toast('倒计时结束');
|
||||
},
|
||||
start() {
|
||||
uni.$u.toast('倒计时开始');
|
||||
},
|
||||
userlogin() {
|
||||
|
||||
this.$refs.uForm.validate().then(res => {
|
||||
self.$http.get('/shop/admin/shop/create', self.form).then(res => {
|
||||
if (res.success) {
|
||||
uni.navigateBack();
|
||||
}
|
||||
})
|
||||
}).catch(errors => {
|
||||
|
||||
uni.$u.toast(errors[0].message)
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
128
pages/admin/shop/index.vue
Normal file
128
pages/admin/shop/index.vue
Normal file
@@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="height: 20rpx;"></view>
|
||||
<navigator url="/pages/admin/shop/create">
|
||||
<u-button type="primary">添加</u-button>
|
||||
</navigator>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<u-search placeholder="请输入手机号" shape="square" v-model="search.mobile" @search="onsearch"></u-search>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view>
|
||||
<navigator :url="`/pages/team/detail?team_shop_id=${item.id}`" v-for="(item,index) in shopItems"
|
||||
:key="index"
|
||||
style="background-color: #ffffff;color: #666666;padding: 20rpx;font-size: 28rpx; margin-bottom: 20rpx;border-radius: 12rpx;">
|
||||
<view class="u-flex">
|
||||
<view>
|
||||
<view>用户名:{{item.username}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>手机号:{{item.mobile}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>余额:{{item.money}}</view>
|
||||
</view>
|
||||
<view style="width: 100rpx;"></view>
|
||||
<view>
|
||||
<view>等级:v{{item.vip}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>充电桩:{{item.device_num}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>已安装:{{item.install_num}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view>注册时间:{{item.created_at}}</view>
|
||||
<!-- <view class="u-flex u-flex-between">
|
||||
<view>用户名:{{item.username}}</view>
|
||||
<view>手机号:{{item.mobile}}</view>
|
||||
</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view class="u-flex u-flex-between">
|
||||
<view>等级:v{{item.vip}}</view>
|
||||
<view>余额:{{item.money}}</view>
|
||||
</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view class="u-flex u-flex-between">
|
||||
<view>充电桩:{{item.device_num}}</view>
|
||||
<view>已安装:{{item.install_num}}</view>
|
||||
</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>注册时间:{{item.created_at}}</view> -->
|
||||
</navigator>
|
||||
</view>
|
||||
<u-loadmore :status="loadStatus" />
|
||||
<view style="height: 100rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
shopItems: [],
|
||||
status: [],
|
||||
type: [],
|
||||
loadStatus: 'loadmore',
|
||||
search: {
|
||||
page: 1,
|
||||
status: 0,
|
||||
mobile: ''
|
||||
},
|
||||
page: {
|
||||
current: 0,
|
||||
last_page: 1
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
self = this;
|
||||
},
|
||||
onShow() {
|
||||
self.shopItems = [];
|
||||
self.getShopItems();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
self.search.page = 1;
|
||||
self.shopItems = [];
|
||||
self.getShopItems();
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!self.pageStatus()) {
|
||||
return;
|
||||
}
|
||||
self.loadStatus = 'loading';
|
||||
self.search.page = ++self.search.page;
|
||||
self.getShopItems();
|
||||
},
|
||||
methods: {
|
||||
onsearch() {
|
||||
self.shopItems = [];
|
||||
self.getShopItems();
|
||||
},
|
||||
pageStatus() {
|
||||
self.loadStatus = 'loadmore';
|
||||
if (self.search.page >= self.page.last_page) {
|
||||
self.loadStatus = 'nomore';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
|
||||
getShopItems() {
|
||||
self.$http.get('/shop/admin/shop/items', self.search).then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
self.shopItems = self.shopItems.concat(data.data);
|
||||
self.page.last_page = data.last_page;
|
||||
self.pageStatus();
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
66
pages/article/detail.vue
Normal file
66
pages/article/detail.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<view style="padding: 30rpx;">
|
||||
<view style="font-size:34rpx;">{{articleItem.title}}</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="color: #999;font-size: 30rpx;">发布时间:{{articleItem.created_at}}</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<video v-if="articleItem.video" style="width: 690rpx;height:388rpx" :poster="articleItem.cover" :src="articleItem.video" :direction="90">
|
||||
</video>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view>
|
||||
<!-- <zero-markdown-view :markdown="articleItem.note"></zero-markdown-view> -->
|
||||
<mp-html :content="articleItem.note" />
|
||||
<!-- <u-parse :content="articleItem.note"></u-parse> -->
|
||||
</view>
|
||||
<view style="50rpx"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
import {
|
||||
getUser,
|
||||
setUser
|
||||
} from '@/com/storage/auth.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
articleItem: {
|
||||
id: '',
|
||||
title: '',
|
||||
cover: '',
|
||||
note: '',
|
||||
created_at: '',
|
||||
},
|
||||
search: {
|
||||
id: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
self = this;
|
||||
if (option && option.id) {
|
||||
self.search.id = option.id;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
self.getArticleItem();
|
||||
},
|
||||
methods: {
|
||||
getArticleItem() {
|
||||
self.$http.get('/shop/v10/article/item', self.search).then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
if (success) {
|
||||
self.articleItem = data;
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
134
pages/article/index.vue
Normal file
134
pages/article/index.vue
Normal file
@@ -0,0 +1,134 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg" style="min-height: calc(100vh - 120rpx);background-color: #F7F7F7;">
|
||||
<u-tabs :list="tabData.list" @change="changeCur"></u-tabs>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view>
|
||||
<view v-for="(item,index) in articleItems" :key="item.id">
|
||||
<navigator v-if="item.oa_url" :url="`/pages/article/web?id=${item.id}`"
|
||||
style="padding: 10rpx; background-color: #ffffff;border-radius: 10rpx;margin-bottom: 20rpx;">
|
||||
<u-image v-if="item.cover" :src="item.cover" width="630rpx" height="353rpx"></u-image>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view class="xkl_line1" style="padding: 10rpx;">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</navigator>
|
||||
<view v-else-if="item.video"
|
||||
style="padding: 10rpx; background-color: #ffffff;border-radius: 10rpx;margin-bottom: 20rpx;">
|
||||
<video style="width: 630rpx;height:353rpx" :poster="item.cover" :src="item.video" :direction="90">
|
||||
</video>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<navigator class="xkl_line1" :url="`/pages/article/detail?id=${item.id}`" style="padding: 10rpx;">
|
||||
{{item.title}}
|
||||
</navigator>
|
||||
</view>
|
||||
<navigator v-else :url="`/pages/article/detail?id=${item.id}`"
|
||||
style="padding: 10rpx; background-color: #ffffff;border-radius: 10rpx;margin-bottom: 20rpx;">
|
||||
<u-image v-if="item.cover" :src="item.cover" width="630rpx" height="353rpx"></u-image>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view class="xkl_line1" style="padding: 10rpx;">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore :status="loadStatus" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
import {
|
||||
getUser,
|
||||
setUser
|
||||
} from '@/com/storage/auth.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tabData: {
|
||||
list: []
|
||||
},
|
||||
articleItems: [],
|
||||
loadStatus: 'loadmore',
|
||||
search: {
|
||||
page: 1,
|
||||
cid: 1,
|
||||
},
|
||||
page: {
|
||||
current: 0,
|
||||
last_page: 1
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
self = this;
|
||||
self.pageStatus();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
self.search.page = 1;
|
||||
self.articleItems = [];
|
||||
self.getArticleItems();
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!self.pageStatus()) {
|
||||
return;
|
||||
}
|
||||
self.loadStatus = 'loading';
|
||||
self.search.page = ++self.search.page;
|
||||
self.getArticleItems();
|
||||
},
|
||||
onShow() {
|
||||
self.getC();
|
||||
self.getArticleItems();
|
||||
},
|
||||
methods: {
|
||||
pageStatus() {
|
||||
self.loadStatus = 'loadmore';
|
||||
if (self.search.page >= self.page.last_page) {
|
||||
self.loadStatus = 'nomore';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
changeCur(row) {
|
||||
self.search.page = 1;
|
||||
self.search.cid = row.id;
|
||||
self.articleItems = [];
|
||||
self.getArticleItems();
|
||||
},
|
||||
getC() {
|
||||
this.$http.get('/shop/v10/article/c').then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
if (success) {
|
||||
this.tabData.list = data;
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getArticleItems() {
|
||||
this.$http.get('/shop/v10/article/items', this.search).then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
if (success) {
|
||||
this.articleItems = data.data;
|
||||
this.page.last_page = data.last_page;
|
||||
this.pageStatus();
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.xkl_line1 {
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
56
pages/article/web.vue
Normal file
56
pages/article/web.vue
Normal file
@@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<view>
|
||||
<web-view :src="articleItem.oa_url"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
import {
|
||||
getUser,
|
||||
setUser
|
||||
} from '@/com/storage/auth.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
articleItem: {
|
||||
id: '',
|
||||
title: '',
|
||||
cover: '',
|
||||
note: '',
|
||||
created_at: '',
|
||||
oa_url: '',
|
||||
},
|
||||
search: {
|
||||
id: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
self = this;
|
||||
if (option && option.id) {
|
||||
self.search.id = option.id;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
self.getArticleItem();
|
||||
},
|
||||
methods: {
|
||||
getArticleItem() {
|
||||
self.$http.get('/shop/v10/article/item', self.search).then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
if (success) {
|
||||
self.articleItem = data;
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
162
pages/device/index.vue
Normal file
162
pages/device/index.vue
Normal file
@@ -0,0 +1,162 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="padding: 30rpx;background-color: #ffffff;border-radius: 10rpx;">
|
||||
<view style="font-size: 28rpx;">充电桩汇总</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<u-grid :border="false" :col="3">
|
||||
<u-grid-item :customStyle="{padding:'20rpx 0'}">
|
||||
<view>{{deviceInfo.install_num}}</view>
|
||||
<text class="grid-text-mini">已安装</text>
|
||||
</u-grid-item>
|
||||
<u-grid-item :customStyle="{padding:'20rpx 0'}">
|
||||
<view>{{deviceInfo.device_num - deviceInfo.install_num}}</view>
|
||||
<text class="grid-text-mini">待安装</text>
|
||||
</u-grid-item>
|
||||
<u-grid-item :customStyle="{padding:'20rpx 0'}">
|
||||
<view>{{deviceInfo.team_device_num}}</view>
|
||||
<text class="grid-text-mini">团队</text>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<u-subsection :list="tabData.list" keyName="name" :current="tabData.current"
|
||||
@change="sectionChange"></u-subsection>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view v-if="!deviceInfo.device_num" style="padding: 30rpx;background-color: #ffffff;border-radius: 10rpx;">
|
||||
<u-empty mode="list"></u-empty>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view v-if="tabData.current == 1">
|
||||
<navigator v-for="(item,index) in deviceItems" :key="index"
|
||||
style="background-color: #ffffff;color: #666666;padding: 20rpx;font-size: 28rpx; margin-bottom: 20rpx;border-radius: 12rpx;">
|
||||
<view class="u-flex u-flex-between">
|
||||
<view>设备ID:{{item.id}}</view>
|
||||
<u-tag v-if="item.install_time" text="已安装" plain size="mini" type="success"></u-tag>
|
||||
<u-tag v-else text="未安装" plain size="mini" type="error"></u-tag>
|
||||
</view>
|
||||
<view>生效时间:{{item.created_at}}</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view v-else>
|
||||
<navigator v-for="(item,index) in deviceItems" :key="index"
|
||||
style="background-color: #ffffff;color: #666666;padding: 20rpx;font-size: 28rpx; margin-bottom: 20rpx;border-radius: 12rpx;">
|
||||
<view class="u-flex u-flex-between">
|
||||
<view>设备号:{{item.device_no}}</view>
|
||||
<view>{{item.id}}</view>
|
||||
<!-- <u-tag v-if="item.install_time" text="已安装" plain size="mini" type="success"></u-tag>
|
||||
<u-tag v-else text="未安装" plain size="mini" type="error"></u-tag> -->
|
||||
</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>电站:{{item.site_name}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>地址:{{item.address}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>生效时间:{{item.created_at}}</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<u-loadmore :status="loadStatus" />
|
||||
</view>
|
||||
<view style="height: 400rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
deviceItems: [],
|
||||
deviceInfo: {
|
||||
device_num: 0,
|
||||
install_num: 0,
|
||||
team_device_num: 0,
|
||||
},
|
||||
tabData: {
|
||||
list: [{
|
||||
"name": "已安装",
|
||||
"install_time": 1
|
||||
}, {
|
||||
"name": "待安装",
|
||||
"install_time": 0
|
||||
}, ],
|
||||
current: 0
|
||||
},
|
||||
status: [],
|
||||
type: [],
|
||||
loadStatus: 'loadmore',
|
||||
search: {
|
||||
install_time: 1,
|
||||
page: 1,
|
||||
status: 0,
|
||||
},
|
||||
page: {
|
||||
current: 0,
|
||||
last_page: 1,
|
||||
page: 1
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
self = this;
|
||||
self.getDeviceInfo();
|
||||
self.getDeviceItems();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
self.search.page = 1;
|
||||
self.getDeviceInfo();
|
||||
self.deviceItems = [];
|
||||
self.getDeviceItems();
|
||||
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!self.pageStatus()) {
|
||||
return;
|
||||
}
|
||||
self.loadStatus = 'loading';
|
||||
self.search.page = ++self.search.page;
|
||||
self.getDeviceItems();
|
||||
},
|
||||
methods: {
|
||||
sectionChange(index) {
|
||||
self.tabData.current = index;
|
||||
self.search.install_time = self.tabData.list[index].install_time;
|
||||
self.deviceItems = [];
|
||||
self.getDeviceItems();
|
||||
},
|
||||
pageStatus() {
|
||||
self.loadStatus = 'loadmore';
|
||||
if (self.search.page >= self.page.last_page) {
|
||||
self.loadStatus = 'nomore';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
getDeviceInfo() {
|
||||
self.$http.get('/shop/v10/device/info').then(({
|
||||
data
|
||||
}) => {
|
||||
self.deviceInfo = data;
|
||||
})
|
||||
},
|
||||
getDeviceItems() {
|
||||
self.$http.get('/shop/v10/device/items', self.search).then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
|
||||
self.deviceItems = self.deviceItems.concat(data.data);
|
||||
|
||||
self.page.last_page = data.last_page;
|
||||
self.pageStatus();
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
98
pages/goods/detail.vue
Normal file
98
pages/goods/detail.vue
Normal file
@@ -0,0 +1,98 @@
|
||||
<template>
|
||||
<view style="background-color: #F7F7F7;">
|
||||
<u-swiper :list="goodsItem.cover" height="750rpx" indicator indicatorMode="line" circular></u-swiper>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="background-color: #ffffff;padding: 30rpx;border-radius: 10rpx;">
|
||||
<view class="u-flex u-flex-y-center">
|
||||
<view style="color: #FF1A1A; font-size: 40rpx;font-weight: 800;">¥{{goodsItem.current_price}}
|
||||
</view>
|
||||
<view style="width: 50rpx;"></view>
|
||||
<view v-if="goodsItem.original_price > goodsItem.current_price"
|
||||
style="color: #CCCCCC;font-size: 30rpx;text-decoration: line-through;">
|
||||
¥{{goodsItem.original_price}}</view>
|
||||
</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="color: #232323; font-size: 30rpx;font-weight: 800;">{{ goodsItem.name }}</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view class="u-flex" style="color: #666666;font-size: 26rpx;">
|
||||
<view>库存:{{ goodsItem.stock }}</view>
|
||||
<view style="width: 80rpx;"></view>
|
||||
<view>销量:{{ goodsItem.sales }}</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<u-divider text="商品详情"></u-divider>
|
||||
<image v-for="(img,index) in goodsItem.detail" :key="index" :src="img" style="width:750rpx;" mode="widthFix">
|
||||
</image>
|
||||
<view style="height: 180rpx;"></view>
|
||||
<view
|
||||
style="position: fixed;bottom: 0rpx;width: 750rpx;height:150rpx;background-color: #ffffff;">
|
||||
<!-- <view class="u-flex u-flex-y-center" style="padding: 0 50rpx;height: 102rpx;">
|
||||
<view>
|
||||
<view class="u-flex u-flex-x-center">
|
||||
<u-icon name="/static/icon/service.png" size="40rpx"></u-icon>
|
||||
</view>
|
||||
<view style="color: #232323;font-size: 28rpx;text-align: center;">客服</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<navigator :url="`/pages/order/pre?id=${goodsItem.id}`">
|
||||
<u-button type="primary">立即下单</u-button>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
goodsItem: {
|
||||
id: '',
|
||||
cover: [],
|
||||
original_price: '',
|
||||
current_price: '',
|
||||
pre_price: '',
|
||||
integral: '',
|
||||
sales: '',
|
||||
stock: '',
|
||||
note: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
self = this;
|
||||
if (option && option.id) {
|
||||
self.goodsItem.id = option.id;
|
||||
} else {
|
||||
uni.navigateBack();
|
||||
}
|
||||
|
||||
self.getGoodsItem();
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
// console.log('open');
|
||||
},
|
||||
close() {
|
||||
self.show = false
|
||||
// console.log('close');
|
||||
},
|
||||
getGoodsItem() {
|
||||
self.$http.get('/shop/v10/goods/item', {
|
||||
id: self.goodsItem.id
|
||||
}).then(({
|
||||
data
|
||||
}) => {
|
||||
self.goodsItem = data;
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
122
pages/goods/device.vue
Normal file
122
pages/goods/device.vue
Normal file
@@ -0,0 +1,122 @@
|
||||
<template>
|
||||
<view style="background-color: #F7F7F7;">
|
||||
<u-swiper :list="goodsItem.cover" height="750rpx" indicator indicatorMode="line" circular></u-swiper>
|
||||
<view>
|
||||
<view style="height: 30rpx;"></view>
|
||||
<view style="background-color: #ffffff;padding: 30rpx;border-radius: 16rpx;">
|
||||
<view class="u-flex u-flex-y-center">
|
||||
<view style="color: #FF1A1A; font-size: 40rpx;font-weight: 800;">¥{{goodsItem.current_price}}
|
||||
</view>
|
||||
<view style="width: 50rpx;"></view>
|
||||
<view v-if="goodsItem.original_price > goodsItem.current_price"
|
||||
style="color: #CCCCCC;font-size: 30rpx;text-decoration: line-through;">
|
||||
¥{{goodsItem.original_price}}</view>
|
||||
</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="color: #232323; font-size: 30rpx;font-weight: 800;">{{ goodsItem.name }}</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view class="u-flex" style="color: #666666;font-size: 26rpx;">
|
||||
|
||||
<view>销量:{{ goodsItem.sales }}</view>
|
||||
<view style="width: 80rpx;"></view>
|
||||
<view>库存:{{ goodsItem.stock }}</view>
|
||||
|
||||
<view style="width: 80rpx;"></view>
|
||||
<view v-if="goodsItem.integral">赠送积分:{{ goodsItem.integral }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height:20rpx;"></view>
|
||||
<u-divider text="详情"></u-divider>
|
||||
<image v-for="(img,index) in goodsItem.detail" :key="index" :src="img" style="width:750rpx;" mode="widthFix">
|
||||
</image>
|
||||
<view style="height: 100rpx;"></view>
|
||||
<view
|
||||
style="position: fixed;bottom: 0rpx; box-shadow: 2px 2px 2px 2px black;height: 102rpx;width: 750rpx;background-color: #ffffff;">
|
||||
<view class="u-flex u-flex-y-center u-flex-between" style="padding: 0 50rpx;height: 102rpx;">
|
||||
<button open-type="contact" class="xkl-clear-btn">
|
||||
<view class="u-flex u-flex-x-center">
|
||||
<u-icon name="/static/img/service.png" size="40rpx"></u-icon>
|
||||
</view>
|
||||
<view style="color: #232323;font-size: 28rpx;text-align: center;">客服</view>
|
||||
</button>
|
||||
<view @click="toauth()">
|
||||
<button class="xkl-clear-btn" style="width: 236rpx;height: 70rpx;line-height: 70rpx;font-size: 28rpx;background: #FFFFFF;border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
opacity: 1;
|
||||
border: 2rpx solid #707070;">立即下单</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
API_URL,
|
||||
STATIC_URL
|
||||
} from '@/env'
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
goodsItem: {
|
||||
id: '',
|
||||
cover: [],
|
||||
original_price: '',
|
||||
current_price: '',
|
||||
pre_price: '',
|
||||
integral: '',
|
||||
sales: '',
|
||||
stock: '',
|
||||
note: ''
|
||||
},
|
||||
num: 1
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
self = this;
|
||||
},
|
||||
onShow() {
|
||||
self.getGoodsItem();
|
||||
},
|
||||
methods: {
|
||||
toauth() {
|
||||
var ua = window.navigator.userAgent.toLowerCase();
|
||||
if (ua.match(/micromessenger/i) == 'micromessenger') {
|
||||
location.href =
|
||||
`${API_URL}/shop/v10/auth/wxoauth?path=${`/pages/order/pre?id=${self.goodsItem.id}&num=${self.num}`}`;
|
||||
return true;
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/order/pre?id=${self.goodsItem.id}&num=${self.num}`
|
||||
})
|
||||
}
|
||||
return
|
||||
},
|
||||
open() {
|
||||
// console.log('open');
|
||||
},
|
||||
close() {
|
||||
self.show = false
|
||||
// console.log('close');
|
||||
},
|
||||
getGoodsItem() {
|
||||
self.$http.get('/shop/v10/goods/item', {
|
||||
type: 1
|
||||
}).then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
if (success) {
|
||||
self.goodsItem = data;
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
124
pages/goods/level.vue
Normal file
124
pages/goods/level.vue
Normal file
@@ -0,0 +1,124 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view>
|
||||
<navigator :url="`/pages/order/pre?id=${goodsItem.id}&num=1`"
|
||||
class="u-flex"
|
||||
style="background-color: #ffffff;padding: 20rpx;margin-bottom: 20rpx; border-radius: 10rpx;font-size: 30rpx;">
|
||||
<u--image width="220rpx" height="220rpx" :src="goodsItem.cover[0]" radius="16rpx"></u--image>
|
||||
<view style="padding: 20rpx;width: 100%;">
|
||||
<view style="color: #232323;">{{goodsItem.name}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>
|
||||
<text>单价:</text>
|
||||
<text style="color: crimson;">
|
||||
{{goodsItem.current_price}}元
|
||||
</text>
|
||||
</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view class="u-flex u-flex-between">
|
||||
<view>
|
||||
<text>购买数量:</text>
|
||||
<text style="color: crimson;">1</text>
|
||||
</view>
|
||||
<view style="color: #7999C3;">下单</view>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator :url="`/pages/order/pre?id=${goodsItem.id}&num=${item.need_num}`"
|
||||
v-for="(item,index) in levelItems" :key="index" class="u-flex"
|
||||
style="background-color: #ffffff;padding: 20rpx;margin-bottom: 20rpx; border-radius: 10rpx;font-size: 30rpx;">
|
||||
<u--image width="220rpx" height="220rpx" :src="goodsItem.cover[0]" radius="16rpx"></u--image>
|
||||
<view style="padding: 20rpx;width: 100%;">
|
||||
<view class="u-flex u-flex-between">
|
||||
<view style="color: #232323;">{{goodsItem.name}}</view>
|
||||
<view>
|
||||
<text style="font-size: 28rpx;color: #999999;">升级到</text>
|
||||
<text style="color: #26418A;font-size: 32rpx;font-weight: 700;">v{{item.level}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>
|
||||
<text>单价:</text>
|
||||
<text style="color: crimson;">
|
||||
{{goodsItem.current_price}}元
|
||||
</text>
|
||||
</view>
|
||||
<!-- <view style="height: 10rpx;"></view>
|
||||
<view>
|
||||
<text>总价:</text>
|
||||
<text style="color: crimson;">
|
||||
{{item.total_price}}元
|
||||
</text>
|
||||
</view> -->
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view class="u-flex u-flex-between">
|
||||
<view>
|
||||
<text>所需数量:</text>
|
||||
<text style="color: crimson;">
|
||||
{{item.need_num}}
|
||||
</text>
|
||||
</view>
|
||||
<view style="color: #7999C3;">下单</view>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view style="height: 100rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
levelItems: [],
|
||||
goodsItem: {
|
||||
id: '',
|
||||
cover: [],
|
||||
name: '',
|
||||
original_price: '',
|
||||
current_price: '',
|
||||
pre_price: '',
|
||||
integral: '',
|
||||
sales: '',
|
||||
stock: '',
|
||||
note: ''
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
self = this;
|
||||
},
|
||||
onShow(option) {
|
||||
self.getGoodsLevel();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
self.getGoodsLevel();
|
||||
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
// console.log('open');
|
||||
},
|
||||
close() {
|
||||
self.show = false
|
||||
// console.log('close');
|
||||
},
|
||||
getGoodsLevel() {
|
||||
self.$http.get('/shop/v10/goods/level').then(({
|
||||
data
|
||||
}) => {
|
||||
self.goodsItem = data.goods;
|
||||
self.levelItems = data.level;
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
211
pages/index/index.vue
Normal file
211
pages/index/index.vue
Normal file
@@ -0,0 +1,211 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-navbar :fixed="false" title="首页" leftIcon=" " :autoBack="false"></u-navbar>
|
||||
<view class="p-30">
|
||||
<u-swiper
|
||||
:list="banner"
|
||||
@click="bannerChange"
|
||||
keyName="cover"
|
||||
height="300rpx"
|
||||
:autoplay="false"
|
||||
radius="5"
|
||||
bgColor="#ffffff"
|
||||
indicator
|
||||
indicatorMode="line"
|
||||
circular
|
||||
></u-swiper>
|
||||
</view>
|
||||
<view class="home_tab">
|
||||
<navigator :url="item.url" class="home_tab_view" v-for="(item, index) in tab_list" :key="index">
|
||||
<image :src="item.img" class="shadow_img"></image>
|
||||
<view>{{ item.name }}</view>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
<view class="home_notice">
|
||||
<view class="home_notice_title">
|
||||
<view>系统公告</view>
|
||||
<view style="font-size: 28rpx; display: flex; align-items: center" @click="changeTab">
|
||||
更多
|
||||
<u-icon name="arrow-right" color="#333" size="14"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<navigator :url="`/pages/article/detail?id=${item.id}`" class="home_notice_view" v-for="(item, index) in articleItems" :key="index" v-if="index <= 2">
|
||||
<view>{{ item.title }}</view>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
<view style="height: 20rpx"></view>
|
||||
<view class="u-flex u-flex-x-center">
|
||||
<u--image :showLoading="true" src="/static/img/goods_hot_icon.png" width="308rpx" height="44rpx"></u--image>
|
||||
</view>
|
||||
<view style="height: 20rpx"></view>
|
||||
<view class="u-flex u-flex-wrap u-flex-between p-30">
|
||||
<navigator
|
||||
v-for="(item, index) in goodsItems"
|
||||
:key="index"
|
||||
:url="`/pages/goods/detail?id=${item.id}`"
|
||||
style="background-color: #ffffff; width: 335rpx; margin-bottom: 30rpx; border-radius: 10rpx"
|
||||
>
|
||||
<u--image width="335rpx" height="335rpx" :src="item.cover[0]" radius="6rpx"></u--image>
|
||||
<u-line></u-line>
|
||||
<view style="padding: 20rpx">
|
||||
<view style="color: #232323; font-size: 28rpx">{{ item.name }}</view>
|
||||
<view style="height: 10rpx"></view>
|
||||
<view class="u-flex u-flex-between u-flex-y-center">
|
||||
<view style="color: #ff1a1a; font-size: 28rpx">¥{{ item.current_price }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
banner: [],
|
||||
tab_list: [
|
||||
{
|
||||
img: '/static/home/tab2.png',
|
||||
name: '资产包',
|
||||
url: '/pages/resourceBundle/resourceBundle'
|
||||
},
|
||||
{
|
||||
img: '/static/home/tab4.png',
|
||||
name: '账单',
|
||||
url: '/pages/wallet/list'
|
||||
},
|
||||
{
|
||||
img: '/static/home/tab3.png',
|
||||
name: '团队',
|
||||
url: '/pages/team/index'
|
||||
},
|
||||
// {
|
||||
// img: '/static/home/tab1.png',
|
||||
// name: '活动',
|
||||
// url: '/pages/activity/index'
|
||||
// }
|
||||
],
|
||||
articleItems: [],
|
||||
goodsItems: []
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getAds();
|
||||
this.aryicleList();
|
||||
this.getGoodsItems()
|
||||
},
|
||||
methods: {
|
||||
getGoodsItems() {
|
||||
this.$http.get('/shop/v10/goods/items').then(({ data }) => {
|
||||
this.goodsItems = data;
|
||||
});
|
||||
},
|
||||
bannerChange(e) {
|
||||
if (!this.banner[e].path) {
|
||||
return;
|
||||
}
|
||||
uni.navigateTo({ url: this.banner[e].path });
|
||||
},
|
||||
getAds() {
|
||||
this.$http.get('/shop/v10/ads/items').then(({ data }) => {
|
||||
this.banner = data;
|
||||
});
|
||||
},
|
||||
// 公告
|
||||
aryicleList() {
|
||||
this.$http
|
||||
.get('/shop/v10/article/items', {
|
||||
page: 1,
|
||||
cid: 1
|
||||
})
|
||||
.then(({ data, success }) => {
|
||||
if (success) {
|
||||
this.articleItems = data.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
changeTab(){
|
||||
uni.switchTab({
|
||||
url:'/pages/article/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.grid_flex {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.home_tab {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 30rpx 80rpx;
|
||||
|
||||
&_view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28rpx;
|
||||
letter-spacing: 10rpx;
|
||||
text-indent: 10rpx;
|
||||
text-align: center;
|
||||
|
||||
image {
|
||||
width: 98rpx;
|
||||
height: 98rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
view {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.home_notice {
|
||||
background-color: #fff;
|
||||
border-radius: 25rpx;
|
||||
padding: 30rpx 40rpx;
|
||||
margin: 0 30rpx 15rpx;
|
||||
|
||||
&_title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #1d65aa;
|
||||
text-align: center;
|
||||
margin-bottom: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
&_view {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 28rpx;
|
||||
padding-bottom: 20rpx;
|
||||
padding-top: 20rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
|
||||
view {
|
||||
max-width: 600rpx;
|
||||
white-space: nowrap;
|
||||
/*超出的空白区域不换行*/
|
||||
overflow: hidden;
|
||||
/*超出隐藏*/
|
||||
text-overflow: ellipsis;
|
||||
/*文本超出显示省略号*/
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
55
pages/me/auth.vue
Normal file
55
pages/me/auth.vue
Normal file
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<view style="padding: 30rpx;">
|
||||
<u-button type="primary" @click="oauth">微信授权</u-button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
API_URL,
|
||||
STATIC_URL
|
||||
} from '@/env'
|
||||
let self;
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
mobile: '',
|
||||
code: ''
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
self = this;
|
||||
if (option && option.code) {
|
||||
self.form.code = option.code;
|
||||
self.codelogin();
|
||||
} else {
|
||||
const pages = getCurrentPages() // 获取栈实例
|
||||
|
||||
let route = 'pages/index/index';
|
||||
if (pages.length > 1) {
|
||||
route = pages[pages.length - 2].route; // 获取当前页面的数据,包含页面路由
|
||||
}
|
||||
uni.setStorageSync('login_back_path', route);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
codelogin() {
|
||||
self.$http.post('/app/v10/auth/wxoauthlogin', self.form).then(res => {
|
||||
if (res.success) {
|
||||
location.href = '/' + uni.getStorageSync('login_back_path');
|
||||
}
|
||||
})
|
||||
},
|
||||
oauth() {
|
||||
location.href = API_URL + '/app/v10/auth/wxoauth';
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
243
pages/me/getBackAccount.vue
Normal file
243
pages/me/getBackAccount.vue
Normal file
@@ -0,0 +1,243 @@
|
||||
<template>
|
||||
<view class="t-login">
|
||||
<u-navbar :autoBack="true"></u-navbar>
|
||||
<!-- 页面装饰图片 -->
|
||||
<image class="img-a" src="@/static/2.png"></image>
|
||||
<image class="img-b" src="@/static/3.png"></image>
|
||||
<!-- 标题 -->
|
||||
<view class="t-b">{{ title }}</view>
|
||||
<form class="cl">
|
||||
<view class="t-a">
|
||||
<image src="@/static/sj.png"></image>
|
||||
<input type="number" placeholder="请输入手机号" maxlength="11" v-model="form.mobile" />
|
||||
</view>
|
||||
<view class="t-a">
|
||||
<image src="@/static/yz.png"></image>
|
||||
<input type="number" name="code" maxlength="6" placeholder="请输入验证码" v-model="form.code" />
|
||||
<view v-if="showText" class="t-c" @click="getCode()">发送短信</view>
|
||||
<view v-else class="t-c" style="background-color: #a7a7a7">重新发送({{ second }})</view>
|
||||
</view>
|
||||
</form>
|
||||
<button class="b_register" @tap="userlogin()">完 成</button>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
check: [],
|
||||
title: '找回用户名 !', //填写logo或者app名称,也可以用:欢迎回来,看您需求
|
||||
second: 60, //默认60秒
|
||||
showText: true, //判断短信是否发送
|
||||
form: {
|
||||
mobile: '',
|
||||
code: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad() {},
|
||||
methods: {
|
||||
login() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
userlogin() {
|
||||
if (!this.form.mobile) return uni.showToast({ title: '请输入手机号', icon: 'none' });
|
||||
if (!this.form.code) return uni.showToast({ title: '请输入验证码', icon: 'none' });
|
||||
this.$http.post('/shop/v10/auth/username', this.form).then((res) => {
|
||||
if (res.code == 0) {
|
||||
if (res.data.length == 0) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '该手机号还未注册',
|
||||
showCancel: false,
|
||||
confirmText: '我知道了'
|
||||
});
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '已找回用户名',
|
||||
content: res.data.join(','),
|
||||
showCancel: false,
|
||||
confirmText: '确认',
|
||||
success: () => {
|
||||
uni.setClipboardData({
|
||||
data: res.data.join(','), //要被复制的内容
|
||||
success: () => {
|
||||
//复制成功的回调函数
|
||||
uni.showToast({
|
||||
//提示
|
||||
title: '已复制用户名'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 1500);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取短信验证码
|
||||
getCode() {
|
||||
var that = this;
|
||||
if (!this.form.mobile) return uni.showToast({ title: '请输入手机号', icon: 'none' });
|
||||
var interval = setInterval(() => {
|
||||
that.showText = false;
|
||||
var times = that.second - 1;
|
||||
//that.second = times<10?'0'+times:times ;//小于10秒补 0
|
||||
that.second = times;
|
||||
}, 1000);
|
||||
setTimeout(() => {
|
||||
clearInterval(interval);
|
||||
that.second = 60;
|
||||
that.showText = true;
|
||||
}, 60000);
|
||||
//这里请求后台获取短信验证码
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码'
|
||||
});
|
||||
this.$http.get('/com/sms/sendcode', this.form).then((res) => {
|
||||
if (res.success) {
|
||||
uni.hideLoading();
|
||||
uni.$u.toast('验证码已发送,有效期5分钟');
|
||||
that.showText = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
.img-a {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
top: -280rpx;
|
||||
right: -100rpx;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.img-b {
|
||||
position: absolute;
|
||||
width: 50%;
|
||||
bottom: 0;
|
||||
left: -50rpx;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.t-login {
|
||||
width: 600rpx;
|
||||
margin: 0 auto;
|
||||
font-size: 28rpx;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.t-login .b_login {
|
||||
font-size: 28rpx;
|
||||
background: rgba(86, 119, 252, 0.6);
|
||||
color: #fff;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 50rpx;
|
||||
box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.t-login .b_register {
|
||||
font-size: 28rpx;
|
||||
background: #5677fc;
|
||||
color: #fff;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 50rpx;
|
||||
box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
|
||||
}
|
||||
|
||||
.t-login input {
|
||||
padding: 0 20rpx 0 120rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
margin-bottom: 50rpx;
|
||||
background: #f8f7fc;
|
||||
border: 1px solid #e9e9e9;
|
||||
font-size: 28rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.t-login .t-a {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.t-login .t-a image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
position: absolute;
|
||||
left: 40rpx;
|
||||
top: 28rpx;
|
||||
border-right: 2rpx solid #dedede;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.t-login .t-b {
|
||||
text-align: left;
|
||||
font-size: 46rpx;
|
||||
color: #000;
|
||||
padding: 250rpx 0 120rpx 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.t-login .t-c {
|
||||
position: absolute;
|
||||
right: 22rpx;
|
||||
top: 22rpx;
|
||||
background: #5677fc;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
border-radius: 50rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
padding: 0 25rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.t-login .t-d {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
margin: 80rpx 0;
|
||||
}
|
||||
|
||||
.t-login .t-e {
|
||||
text-align: center;
|
||||
width: 250rpx;
|
||||
margin: 80rpx auto 0;
|
||||
}
|
||||
|
||||
.t-login .t-g {
|
||||
float: left;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.t-login .t-e image {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
.t-login .uni-input-placeholder {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.cl {
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.cl:after {
|
||||
clear: both;
|
||||
display: block;
|
||||
visibility: hidden;
|
||||
height: 0;
|
||||
content: '\20';
|
||||
}
|
||||
</style>
|
||||
400
pages/me/index.vue
Normal file
400
pages/me/index.vue
Normal file
@@ -0,0 +1,400 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="top-backgroup">
|
||||
<image src="https://resource.tuniaokj.com/images/my/my-bg4.png" mode="widthFix" class="backgroud-image"></image>
|
||||
</view>
|
||||
<view class="p-30" style="margin-top: -450rpx; padding-bottom: 150rpx" :style="{ paddingTop: statusBarHeight }">
|
||||
<view class="flex-ac header" @click="$utils.tn('/pages/me/setting', true)">
|
||||
<image class="header_img" v-if="user.avatar_url" :src="user.avatar_url"></image>
|
||||
<image class="header_img" v-else src="/static/mr.png"></image>
|
||||
<view class="header_tit" v-if="user.nickname || user.username">
|
||||
<view class="header_tit_nick">{{ user.nickname }}</view>
|
||||
<view class="header_tit_acee">{{ user.username }}</view>
|
||||
</view>
|
||||
<view class="header_tit" v-else>
|
||||
<view class="header_tit_nick" style="margin-bottom: 0rpx">点击登录</view>
|
||||
</view>
|
||||
<image class="header_you" src="/static/sett.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="member tn-shadow-blur">
|
||||
<view class="member_left">
|
||||
<view class="member_left_1">{{ device.cur_level.name }}</view>
|
||||
<view class="member_left_2">
|
||||
<u-line-progress
|
||||
v-if="user.vip < 3 || user === null"
|
||||
:percentage="(device.all_device_num / device.up_level.num) * 100"
|
||||
:showText="false"
|
||||
height="7"
|
||||
:activeColor="'#f1c68e'"
|
||||
:inactiveColor="'#fff'"
|
||||
></u-line-progress>
|
||||
<u-line-progress v-else :percentage="100" :showText="false" height="7" :activeColor="'#f1c68e'" :inactiveColor="'#fff'"></u-line-progress>
|
||||
</view>
|
||||
<view v-if="user.vip < 3 || user === null" class="member_left_3">
|
||||
再购买{{ device.up_level.num - device.all_device_num }}台充电桩,可升级{{ device.up_level.name || '' }}
|
||||
</view>
|
||||
<view v-else class="member_left_3">已到最高级</view>
|
||||
</view>
|
||||
<!-- <button @click="$utils.tn('/pages/goods/detail?id=1')" class="member_right tn-shadow-blur">去下单</button> -->
|
||||
</view>
|
||||
<!-- <view class="p-t20 miney_g bgf br10 mt30 wallpaper-shadow">
|
||||
<u-grid :border="false" align="center">
|
||||
<u-grid-item bgColor="#fff" @click="$utils.tn('/pages/resourceBundle/resourceBundle', true)">
|
||||
<view>¥{{ user.money || 0.0 }}</view>
|
||||
<view class="fs28">余额</view>
|
||||
</u-grid-item>
|
||||
<u-grid-item bgColor="#fff" @click="$utils.tn('/pages/device/index', true)">
|
||||
<view>{{ user.device_num || 0 }}</view>
|
||||
<view class="fs28">充电桩</view>
|
||||
</u-grid-item>
|
||||
<u-grid-item bgColor="#fff" @click="$utils.tn('/pages/option/index', true)">
|
||||
<view>{{ user.option || 0.0 }}</view>
|
||||
<view class="fs28">期望值</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view> -->
|
||||
|
||||
<view style="display: flex; align-items: center; justify-content: space-between">
|
||||
<view class="wallpaper-shadow b_yubiao" style="width: 330rpx" @click="$utils.tn('/pages/resourceBundle/resourceBundle', true)">
|
||||
<image style="width: 70rpx; height: 70rpx" src="/static/b_ye.png"></image>
|
||||
<view class="b_yubiao_right">
|
||||
<view style="margin-bottom: 15rpx; font-weight: bold">余额</view>
|
||||
<view>¥{{ user.money || 0.0 }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wallpaper-shadow b_yubiao" style="width: 330rpx" @click="$utils.tn('/pages/device/index', true)">
|
||||
<image src="/static/b_cd.png"></image>
|
||||
<view class="b_yubiao_right">
|
||||
<view style="margin-bottom: 15rpx; font-weight: bold">充电桩</view>
|
||||
<view>{{ user.device_num || 0 }}个</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="wallpaper-shadow tn-margin-top-lg tn-padding-top-sm tn-padding-bottom-sm tn-bg-white">
|
||||
<view class="tn-flex tn-flex-row-center tn-radius tn-padding-top">
|
||||
<view class="tn-padding-sm tn-margin-xs tn-radius" @click="$utils.tn('/pages/order/index', true)">
|
||||
<view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
|
||||
<view class="t12_icon">
|
||||
<image src="/static/order.png"></image>
|
||||
</view>
|
||||
<view class="tn-text-center">
|
||||
<text class="tn-text-ellipsis">订单</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-padding-sm tn-margin-xs tn-radius" @click="$utils.tn('/pages/resourceBundle/resourceBundle', true)">
|
||||
<view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
|
||||
<view class="t12_icon">
|
||||
<image src="/static/ye.png"></image>
|
||||
</view>
|
||||
<view class="tn-text-center">
|
||||
<text class="tn-text-ellipsis">余额</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-padding-sm tn-margin-xs tn-radius" @click="$utils.tn('/pages/device/index', true)">
|
||||
<view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
|
||||
<view class="t12_icon">
|
||||
<image src="/static/cdz.png"></image>
|
||||
</view>
|
||||
<view class="tn-text-center">
|
||||
<text class="tn-text-ellipsis">充电桩</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-padding-sm tn-margin-xs tn-radius" @click="$utils.tn('/pages/wallet/list', true)">
|
||||
<view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
|
||||
<view class="t12_icon">
|
||||
<image src="/static/zd.png"></image>
|
||||
</view>
|
||||
<view class="tn-text-center">
|
||||
<text class="tn-text-ellipsis">账单</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-flex tn-flex-row-center tn-radius tn-padding-top">
|
||||
<view class="tn-padding-sm tn-margin-xs tn-radius" @click="$utils.tn('/pages/team/index', true)">
|
||||
<view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
|
||||
<view class="t12_icon">
|
||||
<image src="/static/yqjl.png"></image>
|
||||
</view>
|
||||
<view class="tn-text-center">
|
||||
<text class="tn-text-ellipsis">邀请记录</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-padding-sm tn-margin-xs tn-radius" @click="$utils.tn('/pages/share/index', true)">
|
||||
<view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
|
||||
<view class="t12_icon">
|
||||
<image src="/static/fxhb.png"></image>
|
||||
</view>
|
||||
<view class="tn-text-center">
|
||||
<text class="tn-text-ellipsis">分享海报</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- @click="$utils.call('4008005326')" -->
|
||||
<view class="tn-padding-sm tn-margin-xs tn-radius">
|
||||
<button open-type="contact" style="all: unset">
|
||||
<view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
|
||||
<view class="t12_icon">
|
||||
<image src="/static/lxkf.png"></image>
|
||||
</view>
|
||||
<view class="tn-text-center">
|
||||
<text class="tn-text-ellipsis">联系客服</text>
|
||||
</view>
|
||||
</view>
|
||||
</button>
|
||||
</view>
|
||||
<!-- @click="$utils.logOut()" -->
|
||||
<view class="tn-padding-sm tn-margin-xs tn-radius">
|
||||
<view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
|
||||
<!-- <view class="t12_icon">
|
||||
<image src="/static/tcdl.png"></image>
|
||||
</view>
|
||||
<view class="tn-text-center">
|
||||
<text class="tn-text-ellipsis">退出登录</text>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="means-a mt30" @click="$utils.tn('/pages/admin/shop/index', true)">
|
||||
<view class="means-a-list">
|
||||
<view class="tit">投资人</view>
|
||||
<view class="means-zhuomi">
|
||||
<view class="means-zhuomi-tit" v-if="userInfo.mobile">{{ userInfo.mobile }}</view>
|
||||
<image src="/static/icon/youdao.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="means-a-list" style="border: 0;" @click="$utils.tn('/pages/admin/order/index', true)">
|
||||
<view class="tit">订单</view>
|
||||
<view class="means-zhuomi">
|
||||
<view class="means-zhuomi-tit" v-if="userInfo.mobile">{{ userInfo.mobile }}</view>
|
||||
<image src="/static/icon/youdao.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view v-if="user.vip > 0" style="background-color: #f6faff; padding: 30rpx; border-radius: 10rpx; margin-top: 30rpx">
|
||||
<view style="font-size: 30rpx; color: #999999; text-align: center;margin-bottom: 20rpx;">
|
||||
邀请码:{{ user.invite_code }}
|
||||
<text style="text-decoration:underline;margin-left: 30rpx;" @click="$utils.copy(user.invite_code)">复制</text>
|
||||
</view>
|
||||
<view class="u-flex u-flex-xy-center">
|
||||
<u--image :src="user.appcode" radius="20rpx" width="440rpx" height="440rpx"></u--image>
|
||||
</view>
|
||||
<view style="height: 10rpx"></view>
|
||||
<view style="font-size: 30rpx; color: #999999; text-align: center">长按保存或者转发</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getUser, setUser } from '@/com/storage/auth.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight: 20,
|
||||
user: null,
|
||||
device: {
|
||||
all_device_num: 0,
|
||||
team_device_num: 0,
|
||||
cur_level: {
|
||||
name: '普通用户',
|
||||
level: 0
|
||||
},
|
||||
up_level: {
|
||||
name: '',
|
||||
level: 0,
|
||||
num: 0
|
||||
}
|
||||
},
|
||||
pshop: null
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.auth.user'(newVal, oldVal) {
|
||||
console.log(newVal);
|
||||
console.log('watch');
|
||||
|
||||
if (!newVal.id) return (this.user = null);
|
||||
this.user = newVal;
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 44 + 'px';
|
||||
console.log(this.statusBarHeight);
|
||||
},
|
||||
async onShow() {
|
||||
this.user = uni.getStorageSync('user') || null;
|
||||
if (!this.user.id) return (this.user = null);
|
||||
if (await this.$utils.token()) return true;
|
||||
this.getuser();
|
||||
},
|
||||
methods: {
|
||||
getuser() {
|
||||
this.$http.get('/shop/v10/user/info').then(({ data, success }) => {
|
||||
if (success) {
|
||||
this.device = data.device;
|
||||
this.pshop = data.pshop;
|
||||
this.$store.commit('auth/setUser', data.info);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.header {
|
||||
&_img {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
margin-right: 30rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
&_tit {
|
||||
flex: 1;
|
||||
&_nick {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
&_acee {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
&_you {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
.member {
|
||||
margin-top: 50rpx;
|
||||
border-radius: 15rpx;
|
||||
padding: 20rpx 40rpx;
|
||||
position: relative;
|
||||
background: linear-gradient(-120deg, #3e445a, #31374a, #2b3042, #262b3c);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
&_left {
|
||||
flex: 1;
|
||||
margin-right: 20rpx;
|
||||
&_1 {
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
&_2 {
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
&_3 {
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
&_right {
|
||||
all: unset;
|
||||
background-color: #f1c68e;
|
||||
color: #634738;
|
||||
width: 160rpx;
|
||||
border-radius: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 10rpx 0;
|
||||
overflow: visible;
|
||||
}
|
||||
}
|
||||
|
||||
.tn-flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.tn-padding-sm {
|
||||
width: 25%;
|
||||
}
|
||||
.tn-padding-sm {
|
||||
margin: 10rpx;
|
||||
}
|
||||
|
||||
.t12_icon {
|
||||
image {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.tn-flex-direction-column {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tn-text-ellipsis {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.means-a {
|
||||
width: 100%;
|
||||
background: #ffffff;
|
||||
border-radius: 15rpx;
|
||||
padding: 0 25rpx;
|
||||
|
||||
.means-a-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
min-height: 100rpx;
|
||||
background-color: #ffffff;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-bottom: 1rpx solid #f6f6f6;
|
||||
|
||||
.tit {
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.header {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.nickname {
|
||||
font-size: 30rpx;
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
.means-zhuomi {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 11rpx;
|
||||
height: 21rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.b_yubiao {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 30rpx 20rpx;
|
||||
image {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
&_right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
192
pages/me/login.vue
Normal file
192
pages/me/login.vue
Normal file
@@ -0,0 +1,192 @@
|
||||
<template>
|
||||
<view class="t-login">
|
||||
<u-navbar :autoBack="true"></u-navbar>
|
||||
<!-- 页面装饰图片 -->
|
||||
<image class="img-a" src="/static/2.png"></image>
|
||||
<image class="img-b" src="/static/3.png"></image>
|
||||
<!-- 标题 -->
|
||||
<view class="t-b">{{ title }}</view>
|
||||
<form class="cl">
|
||||
<view class="t-a">
|
||||
<image src="/static/icon/acee.png"></image>
|
||||
<input placeholder="请输入用户名" maxlength="32" v-model="form.username" />
|
||||
</view>
|
||||
<view class="t-a">
|
||||
<image src="/static/icon/pass.png"></image>
|
||||
<input style="margin-bottom: 20rpx;" type="password" maxlength="32" placeholder="请输入密码" v-model="form.password" />
|
||||
</view>
|
||||
<view class="u-flex u-flex-reverse" style="margin-bottom: 20rpx;">
|
||||
<view @click="$utils.tn('/pages/me/getBackAccount')">
|
||||
<u--text color="#5677fc" text="找回用户名"></u--text>
|
||||
</view>
|
||||
<view @click="$utils.tn('/pages/me/password')" style="margin-right: 25rpx">
|
||||
<u--text color="#5677fc" text="忘记密码"></u--text>
|
||||
</view>
|
||||
</view>
|
||||
<button class="b_login" @click="login()">登 录</button>
|
||||
<button class="b_register" @tap="register()">立 即 注 册</button>
|
||||
</form>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: '欢迎回来!', //填写logo或者app名称,也可以用:欢迎回来,看您需求
|
||||
form: {
|
||||
username: '',
|
||||
password: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad() {},
|
||||
methods: {
|
||||
async login() {
|
||||
if (!this.form.username) return uni.showToast({ title: '请输入用户名', icon: 'none' });
|
||||
if (!this.form.password) return uni.showToast({ title: '请输入密码', icon: 'none' });
|
||||
// 注册
|
||||
try {
|
||||
let { data } = await this.$http.post('/shop/v10/auth/login', this.form);
|
||||
this.$store.commit('auth/setUser', data.user);
|
||||
this.$store.commit('auth/setToken', data.token);
|
||||
uni.navigateBack();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
register() {
|
||||
uni.navigateTo({ url: '/pages/me/logon' });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
.img-a {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
top: -280rpx;
|
||||
right: -100rpx;
|
||||
}
|
||||
|
||||
.img-b {
|
||||
position: absolute;
|
||||
width: 50%;
|
||||
bottom: 0;
|
||||
left: -50rpx;
|
||||
}
|
||||
|
||||
.t-login {
|
||||
width: 600rpx;
|
||||
margin: 0 auto;
|
||||
font-size: 28rpx;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.t-login .b_login {
|
||||
font-size: 28rpx;
|
||||
background: #5677fc;
|
||||
color: #fff;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 50rpx;
|
||||
box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
|
||||
}
|
||||
|
||||
.t-login .b_register {
|
||||
font-size: 28rpx;
|
||||
background: rgba(86, 119, 252, 0.6);
|
||||
color: #fff;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 50rpx;
|
||||
box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.t-login input {
|
||||
padding: 0 20rpx 0 120rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
margin-bottom: 50rpx;
|
||||
background: #f8f7fc;
|
||||
border: 1px solid #e9e9e9;
|
||||
font-size: 28rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.t-login .t-a {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.t-login .t-a image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
position: absolute;
|
||||
left: 40rpx;
|
||||
top: 28rpx;
|
||||
border-right: 2rpx solid #dedede;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.t-login .t-b {
|
||||
text-align: left;
|
||||
font-size: 46rpx;
|
||||
color: #000;
|
||||
padding: 300rpx 0 120rpx 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.t-login .t-c {
|
||||
position: absolute;
|
||||
right: 22rpx;
|
||||
top: 22rpx;
|
||||
background: #5677fc;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
border-radius: 50rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
padding: 0 25rpx;
|
||||
}
|
||||
|
||||
.t-login .t-d {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
margin: 80rpx 0;
|
||||
}
|
||||
|
||||
.t-login .t-e {
|
||||
text-align: center;
|
||||
width: 250rpx;
|
||||
margin: 80rpx auto 0;
|
||||
}
|
||||
|
||||
.t-login .t-g {
|
||||
float: left;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.t-login .t-e image {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
.t-login .uni-input-placeholder {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.cl {
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.cl:after {
|
||||
clear: both;
|
||||
display: block;
|
||||
visibility: hidden;
|
||||
height: 0;
|
||||
content: '\20';
|
||||
}
|
||||
</style>
|
||||
256
pages/me/logon.vue
Normal file
256
pages/me/logon.vue
Normal file
@@ -0,0 +1,256 @@
|
||||
<template>
|
||||
<view class="t-login">
|
||||
<u-navbar :autoBack="true"></u-navbar>
|
||||
<!-- 页面装饰图片 -->
|
||||
<image class="img-a" src="@/static/2.png"></image>
|
||||
<image class="img-b" src="@/static/3.png"></image>
|
||||
<!-- 标题 -->
|
||||
<view class="t-b">{{ title }}</view>
|
||||
<form class="cl">
|
||||
<view class="t-a">
|
||||
<image src="/static/icon/acee.png"></image>
|
||||
<input type="text" placeholder="请输入用户名" maxlength="32" v-model="form.username" />
|
||||
</view>
|
||||
<view class="t-a">
|
||||
<image src="/static/icon/pass.png"></image>
|
||||
<input type="password" placeholder="请输入密码" maxlength="32" v-model="form.password" />
|
||||
</view>
|
||||
<view class="t-a">
|
||||
<image src="/static/icon/yqs.png"></image>
|
||||
<input type="text" placeholder="请输入邀请码" v-model="form.invite_code" />
|
||||
</view>
|
||||
<view class="t-a">
|
||||
<image src="@/static/sj.png"></image>
|
||||
<input type="number" placeholder="请输入手机号" maxlength="11" v-model="form.mobile" />
|
||||
</view>
|
||||
<view class="t-a">
|
||||
<image src="@/static/yz.png"></image>
|
||||
<input type="number" name="code" maxlength="6" placeholder="请输入验证码" v-model="form.code" />
|
||||
<view v-if="showText" class="t-c" @click="getCode()">发送短信</view>
|
||||
<view v-else class="t-c" style="background-color: #a7a7a7">重新发送({{ second }})</view>
|
||||
</view>
|
||||
</form>
|
||||
<view class="u-flex u-flex-xy-center" style="font-size: 26rpx; font-weight: 800; width: 650rpx; margin-left: -25rpx; margin-bottom: 20rpx">
|
||||
<u-checkbox-group v-model="check" shape="square">
|
||||
<u-checkbox labelSize="28rpx" label="我已阅读并同意" :name="1"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<navigator url="/pages/policy/user" style="color: dodgerblue" open-type="navigate">《用户注册服务协议》</navigator>
|
||||
<navigator url="/pages/policy/privacy" style="color: dodgerblue" open-type="navigate">《隐私政策》</navigator>
|
||||
</view>
|
||||
<button class="b_register" @tap="register()">立 即 注 册</button>
|
||||
<button class="b_login" @tap="login()">已 有 帐 号,立 即 登 录</button>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
check: [],
|
||||
title: '欢迎回来!', //填写logo或者app名称,也可以用:欢迎回来,看您需求
|
||||
second: 60, //默认60秒
|
||||
showText: true, //判断短信是否发送
|
||||
form: {
|
||||
username: '',
|
||||
password: '',
|
||||
mobile: '',
|
||||
code: '',
|
||||
invite_code: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
var self = this;
|
||||
if (option && option.invite_code) {
|
||||
self.form.invite_code = option.invite_code;
|
||||
}
|
||||
const invite_code = uni.getStorageSync('invite_code');
|
||||
console.log(invite_code);
|
||||
if (invite_code && invite_code != 'undefined') {
|
||||
self.form.invite_code = invite_code;
|
||||
} else {
|
||||
self.form.invite_code = '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
login() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
register() {
|
||||
if (this.check.length < 1) return uni.showToast({ title: '请阅读并同意《用户注册服务协议》《隐私政策》', icon: 'none' });
|
||||
if (!this.form.username) return uni.showToast({ title: '请输入用户名', icon: 'none' });
|
||||
if (!this.form.password) return uni.showToast({ title: '请输入密码', icon: 'none' });
|
||||
if (!this.form.invite_code) return uni.showToast({ title: '请输入邀请码', icon: 'none' });
|
||||
if (!this.form.mobile) return uni.showToast({ title: '请输入手机号', icon: 'none' });
|
||||
// if (!uni.$u.test.mobile(this.form.phone)) return uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
|
||||
if (!this.form.code) return uni.showToast({ title: '请输入验证码', icon: 'none' });
|
||||
this.$http.get('/shop/v10/auth/logon', this.form).then((res) => {
|
||||
if (res.success) {
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取短信验证码
|
||||
getCode() {
|
||||
console.log(123456);
|
||||
var that = this;
|
||||
if (!this.form.mobile) return uni.showToast({ title: '请输入手机号', icon: 'none' });
|
||||
var interval = setInterval(() => {
|
||||
that.showText = false;
|
||||
var times = that.second - 1;
|
||||
//that.second = times<10?'0'+times:times ;//小于10秒补 0
|
||||
that.second = times;
|
||||
console.log(times);
|
||||
}, 1000);
|
||||
setTimeout(() => {
|
||||
clearInterval(interval);
|
||||
that.second = 60;
|
||||
that.showText = true;
|
||||
}, 60000);
|
||||
//这里请求后台获取短信验证码
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码'
|
||||
});
|
||||
this.$http.get('/com/sms/sendcode', this.form).then((res) => {
|
||||
if (res.success) {
|
||||
uni.hideLoading();
|
||||
uni.$u.toast('验证码已发送,有效期5分钟');
|
||||
that.showText = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
.img-a {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
top: -280rpx;
|
||||
right: -100rpx;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.img-b {
|
||||
position: absolute;
|
||||
width: 50%;
|
||||
bottom: 0;
|
||||
left: -50rpx;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.t-login {
|
||||
width: 600rpx;
|
||||
margin: 0 auto;
|
||||
font-size: 28rpx;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.t-login .b_login {
|
||||
font-size: 28rpx;
|
||||
background: rgba(86, 119, 252, 0.6);
|
||||
color: #fff;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 50rpx;
|
||||
box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.t-login .b_register {
|
||||
font-size: 28rpx;
|
||||
background: #5677fc;
|
||||
color: #fff;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 50rpx;
|
||||
box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
|
||||
}
|
||||
|
||||
.t-login input {
|
||||
padding: 0 20rpx 0 120rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
margin-bottom: 50rpx;
|
||||
background: #f8f7fc;
|
||||
border: 1px solid #e9e9e9;
|
||||
font-size: 28rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.t-login .t-a {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.t-login .t-a image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
position: absolute;
|
||||
left: 40rpx;
|
||||
top: 28rpx;
|
||||
border-right: 2rpx solid #dedede;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.t-login .t-b {
|
||||
text-align: left;
|
||||
font-size: 46rpx;
|
||||
color: #000;
|
||||
padding: 250rpx 0 120rpx 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.t-login .t-c {
|
||||
position: absolute;
|
||||
right: 22rpx;
|
||||
top: 22rpx;
|
||||
background: #5677fc;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
border-radius: 50rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
padding: 0 25rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.t-login .t-d {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
margin: 80rpx 0;
|
||||
}
|
||||
|
||||
.t-login .t-e {
|
||||
text-align: center;
|
||||
width: 250rpx;
|
||||
margin: 80rpx auto 0;
|
||||
}
|
||||
|
||||
.t-login .t-g {
|
||||
float: left;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.t-login .t-e image {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
.t-login .uni-input-placeholder {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.cl {
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.cl:after {
|
||||
clear: both;
|
||||
display: block;
|
||||
visibility: hidden;
|
||||
height: 0;
|
||||
content: '\20';
|
||||
}
|
||||
</style>
|
||||
254
pages/me/mobile.vue
Normal file
254
pages/me/mobile.vue
Normal file
@@ -0,0 +1,254 @@
|
||||
<template>
|
||||
<view class="t-login">
|
||||
<u-navbar :autoBack="true"></u-navbar>
|
||||
<!-- 页面装饰图片 -->
|
||||
<image class="img-a" src="@/static/2.png"></image>
|
||||
<image class="img-b" src="@/static/3.png"></image>
|
||||
<!-- 标题 -->
|
||||
<view class="t-b">{{ title }}</view>
|
||||
<form class="cl">
|
||||
<view class="t-a">
|
||||
<image src="/static/icon/acee.png"></image>
|
||||
<input type="number" placeholder="请输入原手机号" maxlength="11" v-model="form.old_mobile" />
|
||||
</view>
|
||||
<view class="t-a">
|
||||
<image src="@/static/yz.png"></image>
|
||||
<input type="number" name="code" maxlength="6" placeholder="请输入验证码" v-model="form.old_code" />
|
||||
<view v-if="showTextOld" class="t-c" @click="getCode('old', form.old_mobile)">发送短信</view>
|
||||
<view v-else class="t-c" style="background-color: #a7a7a7">重新发送({{ secondOld }})</view>
|
||||
</view>
|
||||
<view class="t-a">
|
||||
<image src="/static/icon/pass.png"></image>
|
||||
<input type="password" placeholder="请输入登录密码" maxlength="32" v-model="form.password" />
|
||||
</view>
|
||||
<view class="t-a">
|
||||
<image src="@/static/sj.png"></image>
|
||||
<input type="number" placeholder="请输入新手机号" maxlength="11" v-model="form.new_mobile" />
|
||||
</view>
|
||||
<view class="t-a">
|
||||
<image src="@/static/yz.png"></image>
|
||||
<input type="number" name="code" maxlength="6" placeholder="请输入验证码" v-model="form.new_code" />
|
||||
<view v-if="showTextNew" class="t-c" @click="getCode('new', form.new_mobile)">发送短信</view>
|
||||
<view v-else class="t-c" style="background-color: #a7a7a7">重新发送({{ secondNew }})</view>
|
||||
</view>
|
||||
</form>
|
||||
<button class="b_register" @tap="register()">完 成</button>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
check: [],
|
||||
title: '修改手机号!', //填写logo或者app名称,也可以用:欢迎回来,看您需求
|
||||
secondOld: 60, //默认60秒
|
||||
secondNew: 60, //默认60秒
|
||||
showTextOld: true, //判断短信是否发送
|
||||
showTextNew: true, //判断短信是否发送
|
||||
form: {
|
||||
new_mobile: '',
|
||||
new_code: '',
|
||||
old_code: '',
|
||||
old_mobile: '',
|
||||
password: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad() {},
|
||||
methods: {
|
||||
login() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
register() {
|
||||
if (!this.form.old_mobile) return uni.showToast({ title: '请输入原手机号', icon: 'none' });
|
||||
if (!this.form.old_code) return uni.showToast({ title: '请输入原手机号验证码', icon: 'none' });
|
||||
if (!this.form.password) return uni.showToast({ title: '请输入密码', icon: 'none' });
|
||||
if (!this.form.new_mobile) return uni.showToast({ title: '请输入新手机号', icon: 'none' });
|
||||
if (!this.form.new_code) return uni.showToast({ title: '请输入新手机号验证码', icon: 'none' });
|
||||
this.$http.post('/shop/v10/user/mobile', this.form).then((res) => {
|
||||
if (res.code == 0) {
|
||||
uni.navigateBack({
|
||||
delta: 2,
|
||||
complete: () => {
|
||||
setTimeout(() => {
|
||||
this.$store.commit('auth/resetUser');
|
||||
this.$store.commit('auth/resetToken');
|
||||
uni.navigateTo({
|
||||
url: `/pages/me/login`
|
||||
});
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取短信验证码
|
||||
getCode(type, phone) {
|
||||
var that = this;
|
||||
var second = type == 'old' ? 'secondOld' : 'secondNew';
|
||||
var showText = type == 'old' ? 'showTextOld' : 'showTextNew';
|
||||
if (!phone) return uni.showToast({ title: '请输入手机号', icon: 'none' });
|
||||
if (phone.length != 11) return uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
|
||||
|
||||
var interval = setInterval(() => {
|
||||
that[showText] = false;
|
||||
var times = that[second] - 1;
|
||||
that[second] = times;
|
||||
}, 1000);
|
||||
setTimeout(() => {
|
||||
clearInterval(interval);
|
||||
that[second] = 60;
|
||||
that[showText] = true;
|
||||
}, 60000);
|
||||
//这里请求后台获取短信验证码
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码'
|
||||
});
|
||||
this.$http
|
||||
.get('/com/sms/sendcode', {
|
||||
mobile: phone
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
uni.hideLoading();
|
||||
uni.$u.toast('验证码已发送,有效期5分钟');
|
||||
that[showText] = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
.img-a {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
top: -280rpx;
|
||||
right: -100rpx;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.img-b {
|
||||
position: absolute;
|
||||
width: 50%;
|
||||
bottom: 0;
|
||||
left: -50rpx;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.t-login {
|
||||
width: 600rpx;
|
||||
margin: 0 auto;
|
||||
font-size: 28rpx;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.t-login .b_login {
|
||||
font-size: 28rpx;
|
||||
background: rgba(86, 119, 252, 0.6);
|
||||
color: #fff;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 50rpx;
|
||||
box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.t-login .b_register {
|
||||
font-size: 28rpx;
|
||||
background: #5677fc;
|
||||
color: #fff;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 50rpx;
|
||||
box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
|
||||
}
|
||||
|
||||
.t-login input {
|
||||
padding: 0 20rpx 0 120rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
margin-bottom: 50rpx;
|
||||
background: #f8f7fc;
|
||||
border: 1px solid #e9e9e9;
|
||||
font-size: 28rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.t-login .t-a {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.t-login .t-a image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
position: absolute;
|
||||
left: 40rpx;
|
||||
top: 28rpx;
|
||||
border-right: 2rpx solid #dedede;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.t-login .t-b {
|
||||
text-align: left;
|
||||
font-size: 46rpx;
|
||||
color: #000;
|
||||
padding: 250rpx 0 120rpx 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.t-login .t-c {
|
||||
position: absolute;
|
||||
right: 22rpx;
|
||||
top: 22rpx;
|
||||
background: #5677fc;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
border-radius: 50rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
padding: 0 25rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.t-login .t-d {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
margin: 80rpx 0;
|
||||
}
|
||||
|
||||
.t-login .t-e {
|
||||
text-align: center;
|
||||
width: 250rpx;
|
||||
margin: 80rpx auto 0;
|
||||
}
|
||||
|
||||
.t-login .t-g {
|
||||
float: left;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.t-login .t-e image {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
.t-login .uni-input-placeholder {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.cl {
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.cl:after {
|
||||
clear: both;
|
||||
display: block;
|
||||
visibility: hidden;
|
||||
height: 0;
|
||||
content: '\20';
|
||||
}
|
||||
</style>
|
||||
227
pages/me/password.vue
Normal file
227
pages/me/password.vue
Normal file
@@ -0,0 +1,227 @@
|
||||
<template>
|
||||
<view class="t-login">
|
||||
<u-navbar :autoBack="true"></u-navbar>
|
||||
<!-- 页面装饰图片 -->
|
||||
<image class="img-a" src="@/static/2.png"></image>
|
||||
<image class="img-b" src="@/static/3.png"></image>
|
||||
<!-- 标题 -->
|
||||
<view class="t-b">{{ title }}</view>
|
||||
<form class="cl">
|
||||
<view class="t-a">
|
||||
<image src="/static/icon/acee.png"></image>
|
||||
<input type="text" placeholder="请输入用户名" maxlength="32" v-model="form.username" />
|
||||
</view>
|
||||
<view class="t-a">
|
||||
<image src="@/static/sj.png"></image>
|
||||
<input type="number" placeholder="请输入手机号" maxlength="11" v-model="form.mobile" />
|
||||
</view>
|
||||
<view class="t-a">
|
||||
<image src="@/static/yz.png"></image>
|
||||
<input type="number" name="code" maxlength="6" placeholder="请输入验证码" v-model="form.code" />
|
||||
<view v-if="showText" class="t-c" @click="getCode()">发送短信</view>
|
||||
<view v-else class="t-c" style="background-color: #a7a7a7">重新发送({{ second }})</view>
|
||||
</view>
|
||||
<view class="t-a">
|
||||
<image src="/static/icon/pass.png"></image>
|
||||
<input placeholder="请输入密码" maxlength="32" v-model="form.password" />
|
||||
</view>
|
||||
</form>
|
||||
<button class="b_register" @tap="userlogin()">重 置 密 码</button>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
check: [],
|
||||
title: '重置密码 !', //填写logo或者app名称,也可以用:欢迎回来,看您需求
|
||||
second: 60, //默认60秒
|
||||
showText: true, //判断短信是否发送
|
||||
form: {
|
||||
username: '',
|
||||
password: '',
|
||||
mobile: '',
|
||||
code: '',
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad() {},
|
||||
methods: {
|
||||
login() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
userlogin() {
|
||||
if (!this.form.username) return uni.showToast({ title: '请输入用户名', icon: 'none' });
|
||||
if (!this.form.mobile) return uni.showToast({ title: '请输入手机号', icon: 'none' });
|
||||
if (!this.form.code) return uni.showToast({ title: '请输入验证码', icon: 'none' });
|
||||
if (!this.form.password) return uni.showToast({ title: '请输入密码', icon: 'none' });
|
||||
this.$http.get('/shop/v10/auth/password', this.form).then((res) => {
|
||||
if (res.success) {
|
||||
uni.showToast({ title: '重置成功', icon: 'none' });
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取短信验证码
|
||||
getCode() {
|
||||
var that = this;
|
||||
if (!this.form.mobile) return uni.showToast({ title: '请输入手机号', icon: 'none' });
|
||||
var interval = setInterval(() => {
|
||||
that.showText = false;
|
||||
var times = that.second - 1;
|
||||
//that.second = times<10?'0'+times:times ;//小于10秒补 0
|
||||
that.second = times;
|
||||
}, 1000);
|
||||
setTimeout(() => {
|
||||
clearInterval(interval);
|
||||
that.second = 60;
|
||||
that.showText = true;
|
||||
}, 60000);
|
||||
//这里请求后台获取短信验证码
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码'
|
||||
});
|
||||
this.$http.get('/com/sms/sendcode', this.form).then((res) => {
|
||||
if (res.success) {
|
||||
uni.hideLoading();
|
||||
uni.$u.toast('验证码已发送,有效期5分钟');
|
||||
that.showText = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
.img-a {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
top: -280rpx;
|
||||
right: -100rpx;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.img-b {
|
||||
position: absolute;
|
||||
width: 50%;
|
||||
bottom: 0;
|
||||
left: -50rpx;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.t-login {
|
||||
width: 600rpx;
|
||||
margin: 0 auto;
|
||||
font-size: 28rpx;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.t-login .b_login {
|
||||
font-size: 28rpx;
|
||||
background: rgba(86, 119, 252, 0.6);
|
||||
color: #fff;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 50rpx;
|
||||
box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.t-login .b_register {
|
||||
font-size: 28rpx;
|
||||
background: #5677fc;
|
||||
color: #fff;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 50rpx;
|
||||
box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
|
||||
}
|
||||
|
||||
.t-login input {
|
||||
padding: 0 20rpx 0 120rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
margin-bottom: 50rpx;
|
||||
background: #f8f7fc;
|
||||
border: 1px solid #e9e9e9;
|
||||
font-size: 28rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.t-login .t-a {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.t-login .t-a image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
position: absolute;
|
||||
left: 40rpx;
|
||||
top: 28rpx;
|
||||
border-right: 2rpx solid #dedede;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.t-login .t-b {
|
||||
text-align: left;
|
||||
font-size: 46rpx;
|
||||
color: #000;
|
||||
padding: 250rpx 0 120rpx 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.t-login .t-c {
|
||||
position: absolute;
|
||||
right: 22rpx;
|
||||
top: 22rpx;
|
||||
background: #5677fc;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
border-radius: 50rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
padding: 0 25rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.t-login .t-d {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
margin: 80rpx 0;
|
||||
}
|
||||
|
||||
.t-login .t-e {
|
||||
text-align: center;
|
||||
width: 250rpx;
|
||||
margin: 80rpx auto 0;
|
||||
}
|
||||
|
||||
.t-login .t-g {
|
||||
float: left;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.t-login .t-e image {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
.t-login .uni-input-placeholder {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.cl {
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.cl:after {
|
||||
clear: both;
|
||||
display: block;
|
||||
visibility: hidden;
|
||||
height: 0;
|
||||
content: '\20';
|
||||
}
|
||||
</style>
|
||||
192
pages/me/setting.vue
Normal file
192
pages/me/setting.vue
Normal file
@@ -0,0 +1,192 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="padding-top: 30rpx;">
|
||||
<view class="means-a">
|
||||
<view class="means-a-list" style="justify-content: center;padding-top: 30rpx;">
|
||||
<!-- <view class="tit">头像</view> -->
|
||||
<image :src="userInfo.avatar_url" v-if="userInfo.avatar_url" class="header" @click="infoHeader"></image>
|
||||
<image src="/static/mr.png" v-else class="header" @click="infoHeader"></image>
|
||||
</view>
|
||||
<view class="means-a-list" style="justify-content: center;">
|
||||
<!-- <view class="tit">昵称</view> -->
|
||||
<view class="nickname" @click="infoHeader">{{userInfo.nickname}}</view>
|
||||
<u-icon name="edit-pen" size="24" @click="infoHeader"></u-icon>
|
||||
</view>
|
||||
<!-- @click="toUser" -->
|
||||
<view class="means-a-list">
|
||||
<view class="tit">用户名</view>
|
||||
<view class="means-zhuomi">
|
||||
<view class="means-zhuomi-tit" v-if="userInfo.username">{{userInfo.username}}</view>
|
||||
<!-- <view class="means-zhuomi-tit" v-else>请输入</view> -->
|
||||
<!-- <image src="/static/icon/youdao.png"></image> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- @click="mobileUp" -->
|
||||
<view class="means-a-list">
|
||||
<view class="tit">手机号</view>
|
||||
<view class="means-zhuomi">
|
||||
<view class="means-zhuomi-tit" v-if="userInfo.mobile">{{userInfo.mobile}}</view>
|
||||
<!-- <image src="/static/icon/youdao.png"></image> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="means-a-list">
|
||||
<view class="tit">退出登录</view>
|
||||
<image src="/static/icon/youdao.png" style="width: 11rpx;height: 21rpx;"></image>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 80rpx;"></view>
|
||||
<u-button text="退出登录" size="normal" type="error" @click="logout()"></u-button>
|
||||
<wx-user-info-modal v-model="showAuthorizationModal" :header="userInfo.avatar_url" :nickname="userInfo.nickname"
|
||||
@updated="updatedUserInfoEvent"></wx-user-info-modal>
|
||||
<uni-popup ref="inputDialog" type="dialog">
|
||||
<uni-popup-dialog ref="inputClose" :inputType="'text'" mode="input" title="请输入用户名" placeholder="请输入用户名"
|
||||
@confirm="dialogInputConfirm"></uni-popup-dialog>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import WxUserInfoModal from '@/uni_modules/tuniaoui-wx-user-info/components/tuniaoui-wx-user-info/tuniaoui-wx-user-info.vue'
|
||||
export default {
|
||||
components: {
|
||||
WxUserInfoModal
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showAuthorizationModal: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
userInfo() {
|
||||
return this.$store.state.auth.user
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
console.log(this.userInfo);
|
||||
},
|
||||
methods: {
|
||||
toUser(){
|
||||
// $refs.inputDialog.open()
|
||||
uni.navigateTo({
|
||||
url:'/pages/me/userName?phone=' + this.userInfo.mobile
|
||||
})
|
||||
},
|
||||
mobileUp(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/me/mobile?phone=' + this.userInfo.mobile
|
||||
})
|
||||
},
|
||||
logout() {
|
||||
this.$http.get('/shop/v10/auth/logout').then(({
|
||||
data
|
||||
}) => {
|
||||
this.$store.commit('auth/resetUser');
|
||||
this.$store.commit('auth/resetToken');
|
||||
|
||||
uni.redirectTo({
|
||||
url: '/pages/me/login'
|
||||
});
|
||||
})
|
||||
},
|
||||
dialogInputConfirm(e) {
|
||||
console.log(e);
|
||||
},
|
||||
infoHeader() {
|
||||
console.log(123456);
|
||||
this.showAuthorizationModal = true
|
||||
},
|
||||
updatedUserInfoEvent(e) {
|
||||
this.$http.post('/shop/v10/user/update', {
|
||||
avatar_url: e.avatar,
|
||||
nickname: e.nickname
|
||||
}).then(({
|
||||
data,
|
||||
success,
|
||||
msg
|
||||
}) => {
|
||||
if (success) {
|
||||
this.$store.commit('auth/setUser', data);
|
||||
uni.showToast({
|
||||
title: msg,
|
||||
icon: 'none'
|
||||
})
|
||||
// this.sendshow();
|
||||
}
|
||||
})
|
||||
this.showAuthorizationModal = false
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
view {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.means-a {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 15rpx;
|
||||
padding: 25rpx;
|
||||
|
||||
.means-a-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
min-height: 100rpx;
|
||||
background-color: #FFFFFF;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
|
||||
|
||||
|
||||
.tit {
|
||||
font-size: 30rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.header {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.nickname {
|
||||
font-size: 30rpx;
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
.means-zhuomi {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.zuomi {
|
||||
width: 189rpx;
|
||||
height: 36rpx;
|
||||
border: 1rpx solid #4D4590;
|
||||
border-radius: 5rpx;
|
||||
text-align: center;
|
||||
line-height: 36rpx;
|
||||
color: #4D4590;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
.means-zhuomi-tit {
|
||||
margin: 0 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 11rpx;
|
||||
height: 21rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
130
pages/me/userName - 副本.vue
Normal file
130
pages/me/userName - 副本.vue
Normal file
@@ -0,0 +1,130 @@
|
||||
<template>
|
||||
<view style="padding: 30rpx;">
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" errorType="border-bottom" ref="uForm"
|
||||
labelWidth="150rpx">
|
||||
<u-form-item label="用户名" prop="username" borderBottom>
|
||||
<u--input v-model="form.username" border="none" placeholder="请输入用户名"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="登录密码" prop="password" borderBottom>
|
||||
<u--input v-model="form.password" type="password" border="none" placeholder="请输入登录密码"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="手机号" prop="mobile" borderBottom>
|
||||
<u--input v-model="form.mobile" type="number" border="none" disabled
|
||||
disabledColor="#FFF"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="验证码" prop="code" borderBottom>
|
||||
<u-code-input v-model="form.code" :maxlength="4" mode="line"></u-code-input>
|
||||
<view slot="right">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<u-code :seconds="code.seconds" ref="uCode" @change="codeChange"></u-code>
|
||||
<u-button type="primary" @tap="getCode">{{code.tips}}</u-button>
|
||||
</view>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<view style="height: 80rpx;"></view>
|
||||
<u-button type="primary" @click="upMobile">完成</u-button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
mobile: "",
|
||||
code: '',
|
||||
username: "",
|
||||
password: ""
|
||||
},
|
||||
rules: {
|
||||
'username': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入用户名',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'password': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入登录密码',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'mobile': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入手机号',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'code': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入验证码',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
},
|
||||
code: {
|
||||
tips: '获取验证码',
|
||||
// refCode: null,
|
||||
seconds: 60,
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.form.mobile = options.phone
|
||||
},
|
||||
methods: {
|
||||
upMobile() {
|
||||
this.$refs.uForm.validate().then(res => {
|
||||
this.$http.post('/shop/v10/user/username', this.form).then((res) => {
|
||||
if (res.code == 0) {
|
||||
uni.navigateBack({
|
||||
delta: 2,
|
||||
complete: () => {
|
||||
setTimeout(() => {
|
||||
this.$store.commit('auth/resetUser');
|
||||
this.$store.commit('auth/resetToken');
|
||||
uni.navigateTo({
|
||||
url: `/pages/me/login`,
|
||||
})
|
||||
}, 100)
|
||||
},
|
||||
})
|
||||
}
|
||||
})
|
||||
}).catch(errors => {
|
||||
uni.$u.toast(errors[0].message)
|
||||
})
|
||||
},
|
||||
codeChange(text) {
|
||||
this.code.tips = text;
|
||||
},
|
||||
getCode() {
|
||||
if (this.form.mobile.length != 11) {
|
||||
uni.$u.toast('请输入手机号');
|
||||
return;
|
||||
}
|
||||
if (this.$refs.uCode.canGetCode) {
|
||||
// 模拟向后端请求验证码
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码'
|
||||
})
|
||||
this.$http.get('/com/sms/sendcode', this.form).then(res => {
|
||||
if (res.success) {
|
||||
uni.hideLoading();
|
||||
// 这里此提示会被this.start()方法中的提示覆盖
|
||||
uni.$u.toast('验证码已发送,有效期5分钟');
|
||||
// 通知验证码组件内部开始倒计时
|
||||
this.$refs.uCode.start();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.$u.toast('倒计时结束后再发送');
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
240
pages/me/userName.vue
Normal file
240
pages/me/userName.vue
Normal file
@@ -0,0 +1,240 @@
|
||||
<template>
|
||||
<view class="t-login">
|
||||
<u-navbar :autoBack="true"></u-navbar>
|
||||
<!-- 页面装饰图片 -->
|
||||
<image class="img-a" src="@/static/2.png"></image>
|
||||
<image class="img-b" src="@/static/3.png"></image>
|
||||
<!-- 标题 -->
|
||||
<view class="t-b">{{ title }}</view>
|
||||
<form class="cl">
|
||||
<view class="t-a">
|
||||
<image src="/static/icon/acee.png"></image>
|
||||
<input type="text" placeholder="请输入用户名" maxlength="32" v-model="form.username" />
|
||||
</view>
|
||||
<view class="t-a">
|
||||
<image src="/static/icon/pass.png"></image>
|
||||
<input type="number" placeholder="请输入密码" maxlength="32" v-model="form.password" />
|
||||
</view>
|
||||
<view class="t-a">
|
||||
<image src="@/static/sj.png"></image>
|
||||
<input type="number" placeholder="请输入手机号" maxlength="11" v-model="form.mobile" />
|
||||
</view>
|
||||
<view class="t-a">
|
||||
<image src="@/static/yz.png"></image>
|
||||
<input type="number" name="code" maxlength="6" placeholder="请输入验证码" v-model="form.code" />
|
||||
<view v-if="showText" class="t-c" @click="getCode()">发送短信</view>
|
||||
<view v-else class="t-c" style="background-color: #a7a7a7">重新发送({{ second }})</view>
|
||||
</view>
|
||||
</form>
|
||||
<button class="b_register" @tap="register()">完 成</button>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
check: [],
|
||||
title: '修改用户名!', //填写logo或者app名称,也可以用:欢迎回来,看您需求
|
||||
second: 60, //默认60秒
|
||||
showText: true, //判断短信是否发送
|
||||
form: {
|
||||
username: '',
|
||||
password: '',
|
||||
mobile: '',
|
||||
code: '',
|
||||
invite_code: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad() {},
|
||||
methods: {
|
||||
login() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
register() {
|
||||
if (!this.form.username) return uni.showToast({ title: '请输入用户名', icon: 'none' });
|
||||
if (!this.form.password) return uni.showToast({ title: '请输入密码', icon: 'none' });
|
||||
if (!this.form.mobile) return uni.showToast({ title: '请输入手机号', icon: 'none' });
|
||||
if (!this.form.code) return uni.showToast({ title: '请输入验证码', icon: 'none' });
|
||||
this.$http.post('/shop/v10/user/username', this.form).then((res) => {
|
||||
if (res.code == 0) {
|
||||
uni.navigateBack({
|
||||
delta: 2,
|
||||
complete: () => {
|
||||
setTimeout(() => {
|
||||
this.$store.commit('auth/resetUser');
|
||||
this.$store.commit('auth/resetToken');
|
||||
uni.navigateTo({
|
||||
url: `/pages/me/login`
|
||||
});
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取短信验证码
|
||||
getCode() {
|
||||
console.log(123456);
|
||||
var that = this;
|
||||
var interval = setInterval(() => {
|
||||
that.showText = false;
|
||||
var times = that.second - 1;
|
||||
//that.second = times<10?'0'+times:times ;//小于10秒补 0
|
||||
that.second = times;
|
||||
console.log(times);
|
||||
}, 1000);
|
||||
setTimeout(() => {
|
||||
clearInterval(interval);
|
||||
that.second = 60;
|
||||
that.showText = true;
|
||||
}, 60000);
|
||||
//这里请求后台获取短信验证码
|
||||
if (!this.form.mobile) return uni.showToast({ title: '请输入手机号', icon: 'none' });
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码'
|
||||
});
|
||||
this.$http.get('/com/sms/sendcode', this.form).then((res) => {
|
||||
if (res.success) {
|
||||
uni.hideLoading();
|
||||
uni.$u.toast('验证码已发送,有效期5分钟');
|
||||
that.showText = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
.img-a {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
top: -280rpx;
|
||||
right: -100rpx;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.img-b {
|
||||
position: absolute;
|
||||
width: 50%;
|
||||
bottom: 0;
|
||||
left: -50rpx;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.t-login {
|
||||
width: 600rpx;
|
||||
margin: 0 auto;
|
||||
font-size: 28rpx;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.t-login .b_login {
|
||||
font-size: 28rpx;
|
||||
background: rgba(86, 119, 252, 0.6);
|
||||
color: #fff;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 50rpx;
|
||||
box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.t-login .b_register {
|
||||
font-size: 28rpx;
|
||||
background: #5677fc;
|
||||
color: #fff;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 50rpx;
|
||||
box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
|
||||
}
|
||||
|
||||
.t-login input {
|
||||
padding: 0 20rpx 0 120rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
margin-bottom: 50rpx;
|
||||
background: #f8f7fc;
|
||||
border: 1px solid #e9e9e9;
|
||||
font-size: 28rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.t-login .t-a {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.t-login .t-a image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
position: absolute;
|
||||
left: 40rpx;
|
||||
top: 28rpx;
|
||||
border-right: 2rpx solid #dedede;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.t-login .t-b {
|
||||
text-align: left;
|
||||
font-size: 46rpx;
|
||||
color: #000;
|
||||
padding: 250rpx 0 120rpx 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.t-login .t-c {
|
||||
position: absolute;
|
||||
right: 22rpx;
|
||||
top: 22rpx;
|
||||
background: #5677fc;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
border-radius: 50rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
padding: 0 25rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.t-login .t-d {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
margin: 80rpx 0;
|
||||
}
|
||||
|
||||
.t-login .t-e {
|
||||
text-align: center;
|
||||
width: 250rpx;
|
||||
margin: 80rpx auto 0;
|
||||
}
|
||||
|
||||
.t-login .t-g {
|
||||
float: left;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.t-login .t-e image {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
.t-login .uni-input-placeholder {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.cl {
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.cl:after {
|
||||
clear: both;
|
||||
display: block;
|
||||
visibility: hidden;
|
||||
height: 0;
|
||||
content: '\20';
|
||||
}
|
||||
</style>
|
||||
91
pages/option/index.vue
Normal file
91
pages/option/index.vue
Normal file
@@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view
|
||||
style="background-color: #ffffff;color: #666666;padding: 20rpx;font-size: 28rpx; border-radius: 12rpx;">
|
||||
<view style="color:#999">当日订单所产生的期权,次日进行更新</view>
|
||||
</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view>
|
||||
<view v-for="(item,index) in shopOptionItems" :key="index"
|
||||
style="background-color: #ffffff;color: #666666;padding: 20rpx;font-size: 28rpx; margin-bottom: 20rpx;border-radius: 12rpx;">
|
||||
<view class="u-flex u-flex-between">
|
||||
<view>{{item.note}}</view>
|
||||
<view>{{item.num}}</view>
|
||||
</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>下单时间:{{item.created_at}}</view>
|
||||
</view>
|
||||
<u-loadmore :status="loadStatus" />
|
||||
</view>
|
||||
<view style="height: 400rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
shopOptionItems: [],
|
||||
status: [],
|
||||
type: [],
|
||||
loadStatus: 'loadmore',
|
||||
search: {
|
||||
page: 1,
|
||||
status: 0,
|
||||
},
|
||||
page: {
|
||||
current: 0,
|
||||
last_page: 1,
|
||||
page: 1
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
self = this;
|
||||
self.getShopOptionItems();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
self.search.page = 1;
|
||||
self.shopOptionItems = [];
|
||||
self.getShopOptionItems();
|
||||
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!self.pageStatus()) {
|
||||
return;
|
||||
}
|
||||
self.loadStatus = 'loading';
|
||||
self.search.page = ++self.search.page;
|
||||
self.getShopOptionItems();
|
||||
},
|
||||
methods: {
|
||||
pageStatus() {
|
||||
self.loadStatus = 'loadmore';
|
||||
if (self.search.page >= self.page.last_page) {
|
||||
self.loadStatus = 'nomore';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
getShopOptionItems() {
|
||||
self.$http.get('/shop/v10/shop_option/items', self.search).then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
|
||||
self.shopOptionItems = self.shopOptionItems.concat(data.data);
|
||||
|
||||
self.page.last_page = data.last_page;
|
||||
self.pageStatus();
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
155
pages/order/index.vue
Normal file
155
pages/order/index.vue
Normal file
@@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="height: 20rpx;"></view>
|
||||
<u-subsection :list="tabData.list" keyName="name" :current="tabData.current"
|
||||
@change="sectionChange"></u-subsection>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view v-if="!orderItems.length" style="padding: 30rpx;background-color: #ffffff;border-radius: 10rpx;">
|
||||
<u-empty mode="list"></u-empty>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view
|
||||
style="background-color: #ffffff;color: #666666;padding: 30rpx;font-size: 28rpx; margin-bottom: 20rpx;border-radius: 16rpx;"
|
||||
v-for="(item,index) in orderItems" :key="index" :url="`/pages/goods/detail?id=${item.id}`">
|
||||
<view class="u-flex u-flex-between" style="font-size: 30rpx;">
|
||||
<view>订单号:{{item.order_no}}</view>
|
||||
<u-tag :text="config.pay_type[item.pay_type]" v-if="item.pay_type!=0" :name="config.pay_type[item.pay_type]" plain
|
||||
type="warning"></u-tag>
|
||||
</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view class="u-flex">
|
||||
<u--image width="220rpx" height="220rpx" :src="item.goods.cover[0]" radius="16rpx"></u--image>
|
||||
<view style="padding: 0 20rpx;">
|
||||
<view>{{item.goods.name}}</view>
|
||||
<view style="height: 14rpx;"></view>
|
||||
<view>数量:{{item.num}}</view>
|
||||
<view style="height: 14rpx;"></view>
|
||||
<view>订单金额:<text style="color: #FF1A1A;">¥{{item.pay_money}}</text></view>
|
||||
<view style="height: 14rpx;"></view>
|
||||
<view v-if="item.goods.integral > 0">赠送积分:{{item.goods.integral}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-divider></u-divider>
|
||||
<view class="u-flex u-flex-between">
|
||||
<view>{{item.created_at}}</view>
|
||||
<view>
|
||||
<u-tag :text="config.status[item.status]" plain type="success"></u-tag>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore :status="loadStatus" />
|
||||
<view style="height: 500rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tabData: {
|
||||
list: [{
|
||||
name: '待付款',
|
||||
status: 0,
|
||||
}, {
|
||||
name: '待生效',
|
||||
status: 1,
|
||||
}, {
|
||||
name: '已生效',
|
||||
status: 2,
|
||||
}, ],
|
||||
current: 2
|
||||
},
|
||||
orderItems: [],
|
||||
search: {
|
||||
status: 2,
|
||||
page: 1
|
||||
},
|
||||
page: {
|
||||
current: 0,
|
||||
last_page: 1
|
||||
},
|
||||
loadStatus: 'loadmore',
|
||||
config: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
onLoad(option) {
|
||||
self = this;
|
||||
if (option && option.status) {
|
||||
self.search.status = 1;
|
||||
}
|
||||
|
||||
self.getOrderItems();
|
||||
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
onReachBottom() {
|
||||
if (!self.pageStatus()) {
|
||||
return;
|
||||
}
|
||||
self.loadStatus = 'loading';
|
||||
self.search.page = ++self.search.page;
|
||||
|
||||
self.getOrderItems();
|
||||
},
|
||||
async onPullDownRefresh() {
|
||||
self.search.page = 1;
|
||||
self.orderItems = [];
|
||||
|
||||
await self.getOrderItems();
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
methods: {
|
||||
convertToCustomArray(obj) {
|
||||
const keys = Object.keys(obj);
|
||||
return keys.map(key => ({
|
||||
name: obj[key],
|
||||
status: parseInt(key, 10)
|
||||
}));
|
||||
},
|
||||
sectionChange(index) {
|
||||
self.search.status = self.tabData.list[index].status;
|
||||
self.tabData.current = index;
|
||||
self.orderItems = [];
|
||||
self.getOrderItems();
|
||||
},
|
||||
pageStatus() {
|
||||
self.loadStatus = 'loadmore';
|
||||
if (self.search.page >= self.page.last_page) {
|
||||
self.loadStatus = 'nomore';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
getOrderItems() {
|
||||
self.$http.post('/shop/v10/order/items', self.search).then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
if (success) {
|
||||
self.orderItems = self.orderItems.concat(data.items.data);
|
||||
self.config = data.config;
|
||||
self.page.last_page = data.items.last_page;
|
||||
// self.tabData.list = this.convertToCustomArray(data.config.status)
|
||||
self.pageStatus();
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
185
pages/order/pay.vue
Normal file
185
pages/order/pay.vue
Normal file
@@ -0,0 +1,185 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="background-color: #ffffff;border-radius: 10rpx;padding: 30rpx; text-align: center;">
|
||||
<view style="color: #fa3534;">
|
||||
<text style="font-size: 30rpx;">¥</text>
|
||||
<text style="font-size: 36rpx;font-weight: 700;">{{orderItem.pay_money}}</text>
|
||||
</view>
|
||||
<view style="color: #909399;font-size: 28rpx;">支付金额</view>
|
||||
</view>
|
||||
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="background-color: #fff; padding: 30rpx;border-radius: 10rpx;">
|
||||
<view style="font-size: 28rpx;#606266">支付方式</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<u-radio-group v-model="form.pay_type" iconPlacement="right" :borderBottom="true" placement="column">
|
||||
<u-radio :name="3">
|
||||
<view class="u-flex u-flex-y-center">
|
||||
<u-icon name="/static/icon/money.png" size="50rpx" />
|
||||
<view style="width: 20rpx;"></view>
|
||||
<view>
|
||||
<view style="font-size: 30rpx;">余额支付</view>
|
||||
<view style="font-size: 28rpx;color: #909399;">当前余额:¥{{userinfo.money}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-radio>
|
||||
<view style="height: 30rpx;"></view>
|
||||
<!-- <u-radio :name="1">
|
||||
<view class="u-flex u-flex-y-center">
|
||||
<u-icon name="/static/icon/weixin.png" size="50rpx" />
|
||||
<view style="width: 20rpx;"></view>
|
||||
<view>
|
||||
<view style="font-size: 30rpx;">微信支付</view>
|
||||
<view style="font-size: 28rpx;color: #909399;">微信快捷支付</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-radio> -->
|
||||
</u-radio-group>
|
||||
</view>
|
||||
<view style="height: 100rpx;"></view>
|
||||
<u-button type="primary" @click="payOrder()">立即支付</u-button>
|
||||
|
||||
<u-modal :show="paynoticeshow" content='未检测到支付结果, 您可以查看订单' @confirm="tore('/pages/order/index')"
|
||||
@close="paynoticeshow = false" @cancel="paynoticeshow = false" showCancelButton confirmText="查看订单"
|
||||
cancelText="取消" closeOnClickOverlay></u-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
API_URL,
|
||||
STATIC_URL
|
||||
} from '@/env'
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
paynoticeshow: false,
|
||||
orderItem: {
|
||||
id: '',
|
||||
pay_money: '',
|
||||
|
||||
},
|
||||
total_price: 0,
|
||||
form: {
|
||||
order_id: '',
|
||||
pay_type: 3,
|
||||
},
|
||||
code: '',
|
||||
userinfo: {
|
||||
money: '',
|
||||
openid: ''
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
onLoad(option) {
|
||||
self = this;
|
||||
if (option && option.order_id) {
|
||||
self.form.order_id = option.order_id;
|
||||
}
|
||||
self.getOrderItem();
|
||||
|
||||
},
|
||||
onShow() {
|
||||
let options = uni.getEnterOptionsSync();
|
||||
const shop_order_pay_show = uni.getStorageSync('shop_order_pay_show');
|
||||
if (options.scene == '1038' &&
|
||||
options.referrerInfo.appId == 'wxef277996acc166c3' && shop_order_pay_show == 1) {
|
||||
uni.setStorageSync('shop_order_pay_show', 0);
|
||||
// 代表从收银台小程序返回
|
||||
let extraData = options.referrerInfo.extraData;
|
||||
if (!extraData) {
|
||||
// "当前通过物理按键返回,未接收到返参,建议自行查询交易结果";
|
||||
self.paynoticeshow = true;
|
||||
} else {
|
||||
if (extraData.code == 'success') {
|
||||
// "支付成功";
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'none'
|
||||
});
|
||||
uni.redirectTo({
|
||||
url: `/pages/order/index`
|
||||
});
|
||||
|
||||
} else if (extraData.code == 'cancel') {
|
||||
// "支付已取消";
|
||||
uni.showToast({
|
||||
title: '支付已取消',
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
// "支付失败:" + extraData.errmsg;
|
||||
uni.showToast({
|
||||
title: "支付失败:" + extraData.errmsg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
tore(url) {
|
||||
uni.redirectTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
getOrderItem() {
|
||||
self.$http.get('/shop/v10/order/item', {
|
||||
order_id: self.form.order_id
|
||||
}).then(({
|
||||
msg,
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
if (success) {
|
||||
self.orderItem = data.item;
|
||||
self.userinfo.money = data.money;
|
||||
}
|
||||
})
|
||||
},
|
||||
payOrder() {
|
||||
uni.showLoading({
|
||||
title: '',
|
||||
mask: true
|
||||
});
|
||||
self.$http.post('/shop/v10/order/pay', self.form).then(({
|
||||
data,
|
||||
success,
|
||||
msg
|
||||
}) => {
|
||||
uni.hideLoading();
|
||||
if (!success) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: msg
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (self.form.pay_type == 3) {
|
||||
uni.redirectTo({
|
||||
url: `/pages/order/index`
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
uni.openEmbeddedMiniProgram({
|
||||
appId: data.appid,
|
||||
extraData: data.extraData,
|
||||
success(res) {
|
||||
// 打开成功
|
||||
uni.setStorageSync('shop_order_pay_show', 1);
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
166
pages/order/pre.vue
Normal file
166
pages/order/pre.vue
Normal file
@@ -0,0 +1,166 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view class="u-flex"
|
||||
style="background-color: #ffffff;padding: 20rpx;border-radius: 10rpx;font-size: 30rpx;">
|
||||
<u--image width="220rpx" height="220rpx" :src="goodsItem.cover[0]" radius="16rpx"></u--image>
|
||||
<view style="padding: 20rpx;">
|
||||
<view style="color: #232323;">{{goodsItem.name}}</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view>
|
||||
<text>单价:</text>
|
||||
<text style="color: crimson;">
|
||||
{{goodsItem.current_price}}元
|
||||
</text>
|
||||
</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view>
|
||||
<text>总价:</text>
|
||||
<text style="color: crimson;">
|
||||
{{total_price}}元
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view class="u-flex u-flex-between u-flex-y-center "
|
||||
style="background-color: #ffffff;padding: 20rpx;border-radius: 10rpx;font-size: 30rpx;">
|
||||
<view class="u-flex">
|
||||
<view>购买数量</view>
|
||||
<view style="width: 10rpx;"></view>
|
||||
<text v-if="level.id" style="color: #dd6161;">可升级v{{level.level}}</text>
|
||||
</view>
|
||||
<view><u-number-box v-model="form.num" inputWidth="100rpx" @change="changenum"></u-number-box></view>
|
||||
</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="background-color: #ffffff;padding: 20rpx;border-radius: 10rpx;font-size: 30rpx;">
|
||||
<view style="font-weight: 700;">购买须知:</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="color: #dd6161;">付款成功后立即生效,并投入生产安装,不支持退款、退货。</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
</view>
|
||||
<view style="height: 100rpx;"></view>
|
||||
<u-button type="primary" @click="createOrder()">确认订单</u-button>
|
||||
</view>
|
||||
<view style="height: 50rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
API_URL,
|
||||
STATIC_URL
|
||||
} from '@/env'
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
goodsItem: {
|
||||
id: '',
|
||||
cover: [],
|
||||
name: '',
|
||||
original_price: '',
|
||||
current_price: '',
|
||||
pre_price: '',
|
||||
integral: '',
|
||||
sales: '',
|
||||
stock: '',
|
||||
note: ''
|
||||
},
|
||||
total_price: 0,
|
||||
form: {
|
||||
goods_id: '',
|
||||
num: 1,
|
||||
pay_type: 0,
|
||||
},
|
||||
level: {
|
||||
id: '',
|
||||
level: ''
|
||||
},
|
||||
policy: {
|
||||
is_trusteeship: 0,
|
||||
is_buy: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
onLoad(option) {
|
||||
self = this;
|
||||
if (option && option.num) {
|
||||
self.form.num = option.num;
|
||||
}
|
||||
|
||||
if (option && option.id) {
|
||||
self.form.goods_id = option.id;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
self.getGoodsItem();
|
||||
self.changenum({
|
||||
value: self.form.num
|
||||
});
|
||||
self.policy = self.$store.state.policy;
|
||||
},
|
||||
methods: {
|
||||
|
||||
changenum(e) {
|
||||
self.form.num = e.value;
|
||||
self.$http.get('/shop/v10/order/pre', self.form).then(({
|
||||
data
|
||||
}) => {
|
||||
self.total_price = data.total_price;
|
||||
self.userinfo = data.userinfo;
|
||||
if (data.level) {
|
||||
self.level = data.level;
|
||||
} else {
|
||||
self.level = {
|
||||
id: '',
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
getGoodsItem() {
|
||||
self.$http.get('/shop/v10/goods/item', {
|
||||
id: self.form.goods_id
|
||||
}).then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
if (success) {
|
||||
self.goodsItem = data;
|
||||
self.form.goods_id = data.id;
|
||||
self.total_price = data.current_price;
|
||||
}
|
||||
})
|
||||
},
|
||||
createOrder() {
|
||||
self.$http.post('/shop/v10/order/create', self.form).then(({
|
||||
data,
|
||||
success,
|
||||
msg
|
||||
}) => {
|
||||
if (!success) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: msg
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/order/pay?order_id=' + data.order_id
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
147
pages/policy/privacy.vue
Normal file
147
pages/policy/privacy.vue
Normal file
@@ -0,0 +1,147 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="font-size: 34rpx; font-weight: 700;text-align: center;">
|
||||
隐私政策
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>
|
||||
<view style="text-indent: 2em;">
|
||||
我们的隐私政策已于2022年03月01日更新,将会于2022年03月01日生效。我们对隐私政策进行了修订,从该日期开始,这一隐私政策能够提供有关我们如何管理您在使用所有羿充电产品和服务时透露的个人信息的隐私详情。请您仔细阅读我们的隐私政策,如有任何问题,请告知我们。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>
|
||||
本隐私政策规定了后羿品牌产业管理(深圳)有限公司 (下文简称”后羿”或”我们”)如何收集、使用、披露、处理和保护您在使用我们的产品和服务时通过后羿微信公众号、微信小程序
|
||||
、APP提供给我们的信息。若我们要求您提供某些信息,以便在使用后羿产品和服务时验证您的身份,我们将严格遵守本隐私政策和我们的用户条款来使用这些信息。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>定义</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">在这项隐私政策中,有部分专有名词的定义如下:</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">•用户个人信息
|
||||
:指所有通过有关特定个人的信息,或者与后羿能够访问的其他关于该人的信息相结合后,能够直接或间接识别该人的所有数据,以下简称“个人信息”。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">•智能终端
|
||||
:指由硬件厂商生产、制造的具备互联网接入功能、数据传输能力和人机交互界面的终端产品,包括智能家电、智能穿戴和智能环境净化设备等。这里特别指的是您购买并使用的智能终端。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">哪些信息会被收集以及我们如何使用这些信息?
|
||||
收集的信息类别:
|
||||
为了向您提供我们的服务,我们会要求您提供向您提供服务所必需的个人信息。如果您不提供个人信息,我们可能无法向您提供我们的产品或服务。我们只会为了详细说明过的、明确的、合法的目的收集必要的信息,并保证不会以和上述目的不符的方式处理这些信息。我们可能会收集以下各类信息(无论其是否为个人信息):
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">1.您提供给我们或上传的信息
|
||||
:我们可能收集您提供给我们的个人信息,例如您的姓名、手机号、电子邮箱地址、后羿账号信息(例如您的安全相关信息、姓名、生日、性别)、您可能接入到后羿的设备同步的资料或数据,及在后羿创建的账户和相关设置信息、您添加的设备或发送的消息、反馈等。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">2.手持终端或SIM卡相关信息 :我们可能收集运行后羿的手持终端相关的信
|
||||
息,例如IMEI编号、IMSI编号、系统版本、设备制造商信息、型号名称和网络运营商。我们还可能会收集与您账号绑定的相关设备信息,例如MAC地址、DID、设备网络状态(IP/网络信号)、固件版本。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">3.我们指定与您相关的信息 :我们可能收集并使用诸如您的后羿账号等信息。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">4.位置信息(仅适用于特定服务/功能)
|
||||
:与您的位置相关的各类信息,例如区域和国家代码、城市代码、移动网络代码、移动设备国家代码、小区识别码、地区名称、经纬度信息、时区设置和语言设置。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">5.登录信息
|
||||
:与您使用某些功能、移动应用程序和网站相关的信息,例如cookie和其他匿名标识符技术、IP地址、网络请求信息、临时消息历史、标准系统日志和系统崩溃信息等。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">6.账户凭证 :有关您账户凭证的信息,例如密码、密码安全问题和回答等。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">这些个人信息可能会被如何使用</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
收集个人信息的目的在于向您提供产品和/或服务,并且保证我们遵守适用法律。您特此同意我们可以出于本隐私政策规定的目的处理个人信息,并向我们的关联公司(涉及通信、社交媒体、技术和云业务)和第三方服务供应商(定义如下)披露个人信息。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">我们可能会将个人信息用于下列目的:</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">•提供、处理、维护、改善、开发我们的商品和/或给您的服务,以及通过设备或后羿提供的服务。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">•与您就您的设备、服务或任何普通查询(例如更新、设备固件/软件升级、客户咨询支持、相关信息、通知)等进行交流。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">•分析和开发与我们产品及服务的使用相关的统计信息,以更好地改进我们的产品和服务。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">•储存并维护与您相关的信息,用于我们运营业务或履行法律义务。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>我们与谁共享您的信息?</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>我们不会将任何个人信息出售给第三方。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>我们可能会向第三方(定义见下文)披露您的个人信息,以便提供您要求的产品或服务。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>
|
||||
•视具体情况,我们会向与后羿合作提供产品和服务或者帮助后羿向客户进行营销的合作伙伴提供某些个人信息。我们只会为提供或改进我们的产品、服务和广告宣传之目的而与第三方共享个人信息;不会为第三方的销售目的与第三方共享个人信息,更不会销售个人信息。我们有义务要求上述合作伙伴严格遵守保密约定和个人信息保护政策的要求。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">•我们可适时向后羿的合作伙伴提供您使用智能终端的统计性信息,以上统计性信息不涉及您的姓名、账号、密码、电话号码、电子邮件等个人信息。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
•若我们的合作伙伴依法向您明示所收集的信息以及信息的使用用途,并已取得您的同意的前提下,我们可以根据您的许可向该三方披露您的个人信息。为了您的个人信息安全,我们可能将您的个人信息进行脱敏或模糊处理后再向第三方披露。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">•如果我们确定为了执行我们的条款和条件、保护我们的经营或用户或设计重大公共利益,披露是合理必须,则我们可披露与您有关的信息。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">•如果发生重组、合并或出售,则我们可将我们收集的一切个人信息转让给相关第三方。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
在本部分所述的各种情况下,您可以放心,后羿仅会根据您的授权共享您的个人信息。您对后羿的授权将包括各类处理您的个人信息的子处理器。您应当了解,在下文描述的任何情况下,当后羿与第三方服务供应商共享您的个人信息时,后羿会通过合同规定第三方的实践和义务,遵守适用的地方数据保护法。后羿会通过合同保证第三方服务供应商遵守您所属司法管辖区中适用于他们的隐私权标准。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>保留政策</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">•如有必要实现收集信息的目的,或者遵守适用法律要求或允许,我们将一直保留个人信息。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">•如果有合理的理由认为保留个人信息不能实现收集个人信息的目的,我们将不再保留个人信息,或删除个人信息与特定个人相关联的方式。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
•如果是为了公众利益对信息进行进一步处理归档,为了科学或历史研究目的或根据使用法律进行统计的目的,即使进一步处理信息的目的与原始目的不相符,后羿也可以进一步保留数据。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>隐私政策的更新</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
我们会对隐私政策进行定期审核,为反映我们信息惯例的变更,我们可能会更新本隐私政策。如果我们对本隐私政策进行重大变更,我们将通过(向您账户指定的邮箱地址发送)电子邮件或在后羿微信小程序、APP等渠道公布或通过移动设备通知您,这样您可以了解我们收集的信息以及我们如何使用这些信息。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">此类隐私政策变化将从通知或网站规定的生效日期开始适用。我们建议您定期查阅本网页获取我们隐私权实践的最新信息。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
您继续使用产品和网站、手机和/或其他任何设备上的服务,将被视为接受更新的隐私政策。在我们向您收集更多的个人信息或我们希望因为新的目的使用或披露您的个人信息时,我们会再次征得您的同意。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>法律适用及管辖</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">本政策依照中华人民共和国法律制定,并受中华人民共和国法律管辖。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>投诉及反馈</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">如果您对我们的个人信息政策或数据处理有任何问题或顾虑,请联系我们如下邮箱:2058827620@qq.com</view>
|
||||
</view>
|
||||
<view style="height: 100rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
API_URL,
|
||||
STATIC_URL
|
||||
} from '@/env'
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
content: ``,
|
||||
baseUrl: API_URL,
|
||||
path: ''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
self = this;
|
||||
self.path = option.path;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.xkl-view {
|
||||
height: 12rpx;
|
||||
}
|
||||
</style>
|
||||
197
pages/policy/user.vue
Normal file
197
pages/policy/user.vue
Normal file
@@ -0,0 +1,197 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="font-size: 34rpx; font-weight: 700;text-align: center;">
|
||||
用户注册服务协议
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>
|
||||
<view style="text-indent: 2em;">
|
||||
尊敬的用户欢迎您注册成为后羿品牌产业管理(深圳)有限公司所属的线上平台会员。请用户仔细阅读以下全部内容。如用户不同意本服务条款任意内容,请不要注册或使用本平台服务。如用户通过进入注册程序并勾选“已阅读并同意”,即表示用户与本平台已达成协议,自愿接受本服务条款的所有内容。此后,用户不得以未阅读本服务条款内容作任何形式的抗辩。
|
||||
</view>
|
||||
|
||||
<view class="xkl-view"></view>
|
||||
<view>定义</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>一、 本站服务条款的确认和接纳</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
本平台涉及的各项服务的所有权和运作权归本平台所有。本平台所提供的服务必须按照其发布的服务条款和操作规则严格执行。本服务条款的效力范围及于本平台的一切产品和服务,用户在享受本平台的任何服务时,应当受本服务条款的约束。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>
|
||||
二、 服务简介
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
本平台运用自己的操作系统通过国际互联网络为用户提供各项服务。用户必须:
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
1. 提供设备,如个人电脑、手机或其他上网设备。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
2. 个人上网和支付与此服务有关的费用。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>三、 用户不得在本平台上发布下列违法信息</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
1. 反对宪法所确定的基本原则的;
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
2. 危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的;
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">3. 损害国家荣誉和利益的;</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">4. 煽动民族仇恨、民族歧视,破坏民族团结的;</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
5. 破坏国家宗教政策,宣扬邪教和封建迷信的;
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">6. 散布谣言,扰乱社会秩序,破坏社会稳定的;</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">7. 侮辱或者诽谤他人,侵害他人合法权益的;</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">8. 含有法律、行政法规禁止的其他内容的。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>四、 有关个人资料,用户同意:</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">1. 提供及时、详尽及准确的个人资料。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">2. 同意接收来自本平台的信息。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">3. 不断更新注册资料,符合及时、详尽准确的要求。所有原始键入的资料将引用为注册资料。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">4. 本平台不公开用户的姓名、地址、电子邮箱和笔名。除以下情况外: </view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
a 用户授权本站透露这些信息。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
b 相应的法律及程序要求本站提供用户的个人资料。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
5.用户自愿购买平台商品,是自己通过微信、支付宝或者银联快捷支付,购买产品或者服务。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>
|
||||
五、 服务条款的修改
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">本平台有权在必要时修改服务条款,一旦条款及服务内容产生变动,本平台将会在重要页面上提示修改内容。</view>
|
||||
<view class="xkl-view"></view>
|
||||
|
||||
<view>六、 用户隐私制度</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
尊重用户个人隐私是本平台的一项基本政策。所以,本平台不会在未经合法用户授权时公开、编辑或透露其注册资料及保存在本平台中的非公开内容,除非有法律许可要求或本平台在诚信的基础上认为透露这些信息在以下四种情况是必要的:
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">1. 遵守有关法律规定,遵从本平台合法服务程序。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
2. 保持维护本平台的商标所有权。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
3. 在紧急情况下竭力维护用户个人和社会大众的隐私安全。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;"> 4. 符合其他相关的要求。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>
|
||||
七、 用户的帐号、密码和安全性
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
用户一旦注册成功,将获得一个密码和用户名。用户需谨慎合理的保存、使用用户名和密码。如果你不保管好自己的帐号和密码安全,将负全部责任。另外,每个用户都要对其帐户中的所有活动和事件负全责。你可随时根据指示改变你的密码。用户若发现任何非法使用用户帐号或存在安全漏洞的情况,请立即通告本平台。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>八、 拒绝提供担保</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">用户明确同意信息服务的使用由用户个人承担风险。本平台不担保服务不会受中断,对服务的及时性,安全性,出错发生都不作担保,但会在能力范围内,避免出错。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>九、 有限责任</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
如因不可抗力或其它本商城无法控制的原因使本商城销售系统崩溃或无法正常使用导致网上交易无法完成或丢失有关的信息、记录等,本商城会尽可能合理地协助处理善后事宜,并努力使客户免受经济损失,同时会尽量避免这种损害的发生。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>十、 用户信息的储存和限制</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">本平台有判定用户的行为是否符合国家法律法规规定及本站服务条款权利,如果用户违背本平台服务条款的规定,本平台有权中断对其提供服务的权利。</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view> 十一、 用户管理</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
用户单独承担发布内容的责任。用户对服务的使用是根据所有适用于本站的国家法律、地方法律和国际法律标准的。用户必须遵循:
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
1. 使用网络服务不作非法用途。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
2. 不干扰或混乱网络服务。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
3. 遵守所有使用网络服务的网络协议、规定、程序和惯例。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
用户须承诺不传输任何非法的、骚扰性的、中伤他人的、辱骂性的、恐吓性的、伤害性的、庸俗的,淫秽等信息资料。另外,用户也不能传输教唆他人构成犯罪行为的资料;不能传输助长国内不利条件和涉及国家安全的资料;不能传输任何不符合当地法规、国家法律和国际法律的资料。未经许可而非法进入其它电脑系统是禁止的。若用户的行为不符合以上提到的服务条款,本平台将作出独立判断立即取消用户服务帐号。用户需对自己在网上的行为承担法律责任。用户若在本平台上散布和传播反动、色情或其它违反国家法律的信息,本平台的系统记录有可能作为用户违反法律的证据。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>十二、 通告</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
所有发给用户的通告都可通过重要页面的公告或电子邮件或常规的信件传送。服务条款的修改、服务变更、或其它重要事件的通告都会以此形式进行。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>十三、 信息内容的所有权</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
本平台定义的信息内容包括:
|
||||
文字、软件、声音、图片、录象、图表、视频;在广告中全部内容;本平台为用户提供的其它信息。所有这些内容受版权、商标、标签和其它财产所有权法律的保护。所以,用户只能在本平台和广告商授权下才能使用这些内容,而不能擅自复制、再造这些内容、或创造与内容有关的派生产品。
|
||||
</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view>十四、 法律</view>
|
||||
<view class="xkl-view"></view>
|
||||
<view style="text-indent: 2em;">
|
||||
本协议的订立、执行和解释及争议的解决均应适用中华人民共和国的法律。用户和本平台一致同意服从本平台所在地有管辖权的法院管辖。如发生本平台服务条款与中华人民共和国法律相抵触时,则这些条款将完全按法律规定重新解释,而其它条款则依旧保持对用户的约束力。
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 100rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
API_URL,
|
||||
STATIC_URL
|
||||
} from '@/env'
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
content: ``,
|
||||
baseUrl: API_URL,
|
||||
path: ''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
self = this;
|
||||
self.path = option.path;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.xkl-view {
|
||||
height: 12rpx;
|
||||
}
|
||||
</style>
|
||||
115
pages/protocol/buy.vue
Normal file
115
pages/protocol/buy.vue
Normal file
@@ -0,0 +1,115 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="font-size: 34rpx;font-weight: 700; text-align: center;">充电桩购销合同</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="line-height: 46rpx;">
|
||||
<view>买方:用户名:{{shopinfo.username}} 手机号:{{shopinfo.mobile}}</view>
|
||||
<view>卖方:后羿品牌产业管理(深圳)有限公司</view>
|
||||
<view>合同签订地点: 河南郑州</view>
|
||||
<view style="text-indent: 2em;">
|
||||
根据《中华人民共和国民法典》及相关法律、法规,甲乙双方本着平等、自愿、公平、互惠互利和诚实守信的原则,为满足甲方的需求,就充电桩买卖事宜协商一致订立本合同,以资共同遵守:
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
一、购买标的、方式
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
本协议项下的买卖标的物为乙方公司销售的充电桩,甲方自行在乙方开发或告知的网站上进行独立购买,自行选择型号和数量,并全款支付合同订立购买充电桩数的总价。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
二、品名、型号、数量、金额、总价
|
||||
</view>
|
||||
|
||||
<view style="text-indent: 2em;">
|
||||
三、交货方式
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
甲方购买的充电桩经第三方公司安装结束后,由甲方在后台系统上电子签署《收到货物确认单》,甲方签署后,视为乙方交付本合同项下的充电桩。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
四、付款方式:由甲方在购买时一次性支付。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
五、双方权利及义务
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
1、甲方的权利及义务
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
甲方应在选定型号后及时支付款项。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
2、乙方的权利及义务
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
乙方应保证所售充电桩的质量及技术标准符合国家的最低标准要求。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
六、产品质保
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
质保期五年,在质保期内,乙方应积极履行质保义务,出现质量问题,乙方应免费及时更换维修合格产品及配件,乙方未尽到质保义务时,须承担所有维修费用。质保期自甲方所购充电桩安装结束并由甲方签署到货确认函后第二日起算。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
七、违约责任
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
1、甲方在购买充电桩后,不能因任何除产品质量有缺陷外的原因要求解除本合同及退款。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
2、乙方充电桩存在质量问题,由乙方协调各方进行免费更换维修。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
八、解决合同纠纷方式
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
本合同在履行过程中发生争议,由双方当事人协商解决;协商或调解不成的,可依法在乙方所在地人民法院起诉。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
九、其他
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
本合同一式两份,甲乙双方各执一份,自双方签字盖章之日起生效。
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 50rpx;"></view>
|
||||
<u-button type="primary" @click="submit(1)">我已阅读并同意《充电桩购销合同》</u-button>
|
||||
<view style="height: 50rpx;"></view>
|
||||
<u-button @click="submit(0)">取消</u-button>
|
||||
<view style="height: 100rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
shopinfo: {
|
||||
username: '',
|
||||
mobile: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
self = this;
|
||||
self.shopinfo = self.$store.state.auth.user;
|
||||
},
|
||||
methods: {
|
||||
submit(status) {
|
||||
// self.$http.get('/shop/v10/user/buy', {
|
||||
// status: status
|
||||
// }).then(res => {
|
||||
// self.$store.commit('auth/setUser', res.data);
|
||||
// uni.navigateBack();
|
||||
// })
|
||||
self.$store.commit('policy/setBuy', status);
|
||||
uni.navigateBack();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
66
pages/protocol/mianze.vue
Normal file
66
pages/protocol/mianze.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="font-size: 34rpx;font-weight: 700; text-align: center;">免责声明</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="line-height: 46rpx;">
|
||||
<view style="text-indent: 2em;">
|
||||
所有参与本次活动的人员务必认真阅读活动协议文件,在活动内容选定并提交后即被默认为已阅读、理解并同意遵守活动过程所需遵守的一切内容并签署免责声明。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
作为此次活动参与者,我本人以及其他任何可能代表我本人提起赔偿请求或诉讼的人做出以下声明:
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
1、我自愿参加本次活动,并确认本人具有参加本次活动相应的民事行为能力和民事责任能力。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
2、我确认全面理解并自愿遵守与活动组织方签订的协议,并保证不挪用活动方每月支付的月供资金,如挪用,则相关损失由自己承担。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
3、我将向活动组织方提供身份证信息及银行账户信息用于核实本人身份及购买车辆事宜,保证提交的身份证信息及银行账户信息真实有效,并承担因提供不实信息所产生的全部责任,由此产生的损失自行承担。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
4、我本人确认,已对活动组织方的协议内容详细阅读并已充分了解,并承诺自愿履行上述协议。因本人没有如实提供身份信息及其他必须提供的资料引起的损失及纠纷,相关责任由本人自行承担。
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 50rpx;"></view>
|
||||
<u-button type="primary" @click="submit(1)">我已阅读并同意《免责声明》</u-button>
|
||||
<view style="height: 50rpx;"></view>
|
||||
<u-button @click="submit(0)">取消</u-button>
|
||||
<view style="height: 100rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
shopinfo: {
|
||||
username: '',
|
||||
mobile: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
self = this;
|
||||
self.shopinfo = self.$store.state.auth.user;
|
||||
},
|
||||
methods: {
|
||||
submit(status) {
|
||||
// self.$http.get('/shop/v10/user/trusteeship', {
|
||||
// status: status
|
||||
// }).then(res => {
|
||||
// self.$store.commit('auth/setUser', res.data);
|
||||
// uni.navigateBack();
|
||||
// })setBuy
|
||||
self.$store.commit('policy/setMianze', status);
|
||||
uni.navigateBack();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
177
pages/protocol/trusteeship.vue
Normal file
177
pages/protocol/trusteeship.vue
Normal file
@@ -0,0 +1,177 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="font-size: 34rpx;font-weight: 700; text-align: center;">充电桩托管协议</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="line-height: 46rpx;">
|
||||
<view>甲方(运营方):购买了后羿品牌产业管理(深圳)有限公司</view>
|
||||
<view>乙方(投资方):用户名:{{shopinfo.username}} 手机号:{{shopinfo.mobile}}</view>
|
||||
<view>合同签订地点: 河南郑州</view>
|
||||
<view style="text-indent: 2em;">
|
||||
鉴于:乙方购买了后羿品牌产业管理(深圳)有限公司 个充电桩端口,乙方因工作及地域 等原因无法亲自管理自己的充电桩,现为节省乙方精力,提高充电桩的运营效率,
|
||||
甲乙双方本着平等、自愿、互利的原则,根据《中华人民共和国民法典》及相关 法律法规的规定,就乙方购买的新能源汽车充电桩运营相关事宜协商一致,签订 本协议。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
一、项目概况:
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
1、项目名称:
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
2、项目地址:后羿品牌产业管理(深圳)有限公司后台系统自动显示)
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
3、合作期限: 5 年,自站点正式竣工投运日开始计算。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
4、项目规模:计划投建___个充电专用车位,在60天之内完成。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
二、合作内容:
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
1、甲方承担充电桩的选址、场地协调、规划设计、项目备案、终端服务、 客户引流等
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
三、合作方式
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
1、 甲方负责安装及运营:充电桩交由甲方主导运营,甲方通过运营平台向 充电用户收取充电费用(电费+充电服务费等)。甲方提供运营平台系统给乙方查
|
||||
阅及对账,甲方将所有站点时时赚取利润按双方约定分红比例每月定期支付给乙 方。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
2、利润核算方式:利润 = 当月平台收益 - 当月缴纳电费 - 公共开支(如 平台活动、保险、消防设施、税票等)
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
3、电费缴纳方式:电价选用下列第 种方式申报缴纳:(1)甲方独立申报/ 改造新能源专用电,与国家电网申请独立电表,执行新能源专用电,乙方将变压
|
||||
器户头过户至甲方,由甲方单独与国家电网结算;(2)乙方配合协调甲方在充电 桩上端加装独立计量电表,以甲方每月进行对独立计量电表缴费;
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
4、甲方享有该项目利润的 50 %,乙方享有该项目利润的 50 %。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
充电桩运营:充电费用是指甲方向新能源汽车充电客户统一收取的充电费用, 由“充电电费 ”和“充电服务费 ”两部分组成,运营决策权归甲方所有,乙方不 参与运营。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
四、支付方式
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
1 、充电服务费甲、乙双方分红结算,每周由乙方在甲方系统上自动提取收 益。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
2、 乙方按确认的分成收益金额向甲方开具财务凭证,甲方在收到乙方的财 务凭证后 日内向乙方支付上述费用;
|
||||
</view>
|
||||
|
||||
<view style="text-indent: 2em;">
|
||||
乙方账户信息:
|
||||
开户名称:
|
||||
帐 号:
|
||||
开 户 行:
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
五、甲乙双方的权利和义务
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
1、 建设运营期内,甲方在该项目场地内的消防和用电安全,应当符合国家 法律法规要求,并采取必要的保障措施确保项目的安全运营。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
2、 甲方应在协议期内协调好本协议充电场站所在土地、房屋、电力基础设 施的所有权或使用权无纠纷,并确保场地租赁期限符合本协议要求,充分满足项
|
||||
目建设、运营的需要。若甲方故意隐瞒或无法保证协议期内充电设施的正常运营, 造成的损失由甲方承担(不可抗力因素除外)。因甲方与产权方之间不能继续场
|
||||
地租赁协议导致本协议未能正常履行完毕的,甲方应协调产权人将此协议继续履 行。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
3、甲方有义务对充电桩的日常充电站的卫生清洁,不允许非充电车辆占用 新能源车位,提供较好的充电场站运营环境。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
4、乙方若对预期收益不满,可在充电桩安装落地收益产生后两年内向甲方提补贴申请(总收益已超过投资收益2倍不可申请),甲方受理后,会在安装收益产生满两年时通过股票定增融资,同意以乙方购买价两倍减去全部收益来回购,充电桩的所有权与收益权归甲方所有。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
5、乙方有权调自己的充电桩经营数据。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
6、乙方在充电站开始建设后或运营中提出位置更改并经甲方同意的,因更 改产生的相关费用由乙方承担。在协议期限内,若因不可抗力、场地整体重新规
|
||||
划导致该充电桩场地改造,影响到该项目正常运营,甲方不承担相关运营损失, 但有关充电站改造费用由甲方承担。因法律法规变动、政府规划、城市更新需要
|
||||
而须调整或终止该项目的情况,甲方须需提前一个月书面知会并协调相关单位保 障乙方的利益。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
六、违约责任
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
1、合作期限内,双方应按照协议约定各自履行相应的义务,因任何一方原 因无法保证该项目正常运营,且在守约方书面催告后仍未处理/仍不纠正的,逾 期 7 日时,守约方有权单方面解除协议。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
2、本协议生效后,各方均应全面履行本协议约定的义务。任何一方不履行 或不完全履行本协议约定义务的,应当承担相应的违约责任,并赔偿由此给守约 方造成的损失。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
七、其他
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
保密条款:1、甲乙双方应对在本协议洽谈和项目合作过程中获取的对方的 保密信息及对方关联方的保密信息(包括但不限于商业秘密、财务资料、经营方
|
||||
式、技术资料等)以及双方合作内容相关的一切信息应予保密并采取必要的保密 措施;2、甲乙双方应严格保密双方的合作内容以及协议模式等信息,不得向任
|
||||
何第三方透露;3、未经一方事先书面同意,另一方不得将任何该等信息披露给 任何第三方,或者自行复制保存等;4、甲乙双方应严格遵循上述保密条款,若
|
||||
违约方违反上述约定给守约方造成损失的,违约方应就守约方由此遭受的损失承 担损失赔偿责任。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
风险约定:本协议项下的充电桩营运场所所有权为甲方,场所内发生的第三 方人员及车辆的所有者责任、交通事故等意外损害等,均按法律规定处理。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
不可抗力:本协议履行过程中, 如一方因发生无法预见又无法避免的事件 而不能全部或部分履行协议,可以根据不可抗力的影响减免相应责任,但须在不 可抗力因素发生后 48 小时内通知对方,并采取措施避免损失的扩大。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
订立本协议所依据的法律、法规或所依据的客观情况发生重大变化,致使本 协议无法履行的,经甲、乙双方协商一致,可以变更本协议有关内容,但均应以 书面方式盖章确认。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
八、适用法律及争议解决:
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
在履行本协议过程中,若发生争议,双方应本着友好互让的原则协商解决,
|
||||
未能协商一致,可向甲方所在地人民法院提起诉讼解决。当任何争议发生时或该争议处于协商或提交诉讼解决时,除争议事项外,双方应继续享有本协议规定的其它权利,履行本协议规定的其它义务。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
本协议一式四份,甲乙双方各执贰份, 自双方盖章后生效。
|
||||
</view>
|
||||
<view style="text-indent: 2em;">
|
||||
本协议附件为本协议有效组成部分,与本协议具有同等法律效力。本协议未 尽事宜由甲、乙双方友好协商后,以书面形式加以补充,补充协议具有同等的法 律效力。
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 50rpx;"></view>
|
||||
<u-button type="primary" @click="submit(1)">我已阅读并同意《充电桩托管协议》</u-button>
|
||||
<view style="height: 50rpx;"></view>
|
||||
<u-button @click="submit(0)">取消</u-button>
|
||||
<view style="height: 100rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
shopinfo: {
|
||||
username: '',
|
||||
mobile: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
self = this;
|
||||
self.shopinfo = self.$store.state.auth.user;
|
||||
},
|
||||
methods: {
|
||||
submit(status) {
|
||||
// self.$http.get('/shop/v10/user/trusteeship', {
|
||||
// status: status
|
||||
// }).then(res => {
|
||||
// self.$store.commit('auth/setUser', res.data);
|
||||
// uni.navigateBack();
|
||||
// })setBuy
|
||||
self.$store.commit('policy/setTrusteeship', status);
|
||||
uni.navigateBack();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
365
pages/resourceBundle/resourceBundle.vue
Normal file
365
pages/resourceBundle/resourceBundle.vue
Normal file
@@ -0,0 +1,365 @@
|
||||
<template>
|
||||
<view class="mine">
|
||||
<view class="mine_money">
|
||||
<!-- <image class="mine_money_bei" src="/static/home/boxBor.png" mode="widthFix"></image> -->
|
||||
<view class="mine_money_num">
|
||||
<view class="mine_money_num_view">
|
||||
<view class="mine_money_num_view_monNum">{{wallet.money || 0.00}}</view>
|
||||
<view class="mine_money_num_view_tip">余额(元)</view>
|
||||
</view>
|
||||
<view class="mine_money_num_view">
|
||||
<view style="font-size: 32rpx;" class="mine_money_num_view_monNum">
|
||||
{{wallet.freeze_money || 0.00}}
|
||||
</view>
|
||||
<view class="mine_money_num_view_tip">冻结(元)</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="mine_money_bottom">
|
||||
<view @click="topay()">充值</view>
|
||||
<view @click="navto('/pages/wallet/withdraw')">提现</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- <view class="mine_grid">
|
||||
<view class="mine_grid_view" v-for="item in 8" :key="item">
|
||||
<image></image>
|
||||
<view>提现</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view style="border-radius: 10rpx;background-color: #fff;margin: 20rpx 0;">
|
||||
<u-grid :border="false" :col="4">
|
||||
<u-grid-item :customStyle="{padding:'20rpx 0'}" @click="navto('/pages/wallet/list')">
|
||||
<u-icon name="/static/icon/money-list.png" size="50rpx"></u-icon>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<text class="grid-text-mini">账单</text>
|
||||
</u-grid-item>
|
||||
<u-grid-item :customStyle="{padding:'20rpx 0'}"
|
||||
@click="navto(`/pages/wallet/temp?data=${encodeURIComponent(JSON.stringify(wallet))}`)">
|
||||
<u-icon name="gift" size="66rpx"></u-icon>
|
||||
<text class="grid-text-mini">转赠</text>
|
||||
</u-grid-item>
|
||||
<u-grid-item :customStyle="{padding:'20rpx 0'}" @click="navto('/pages/wallet/account/index')">
|
||||
<u-icon name="/static/icon/bank.png" size="50rpx"></u-icon>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<text class="grid-text-mini">银行卡</text>
|
||||
</u-grid-item>
|
||||
<u-grid-item :customStyle="{padding:'20rpx 0'}" @click="navto('/pages/wallet/withdraw')">
|
||||
<u-icon name="/static/icon/tx.png" size="50rpx"></u-icon>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<text class="grid-text-mini">提现</text>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="mine_block">
|
||||
<view class="mine_block_tit">
|
||||
<view class="mine_block_tit_left">充电桩</view>
|
||||
<!-- <view class="mine_block_tit_right">详情 <image src="/static/home/toIcon.png" mode="widthFix"></image>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<view class="mine_block_view">
|
||||
<!-- <image mode="widthFix" src="/static/home/zu1.png"></image> -->
|
||||
<view class="u-flex-y-center u-flex-between u-flex-fill">
|
||||
<view style="width: 50%;">
|
||||
<view style="color: #3770AE;font-size: 30rpx;">{{device.num || 0}}</view>
|
||||
<view style="color: #999;">
|
||||
自购充电桩数
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 50%;">
|
||||
<view style="color: #3770AE;font-size: 30rpx;">{{device.team_num || 0}}</view>
|
||||
<view style="color: #999;">
|
||||
团队充电桩数
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mine_block" v-for="(item,index) in money_list" :key="index">
|
||||
<view class="mine_block_tit">
|
||||
<view class="mine_block_tit_left">{{item.name}}</view>
|
||||
</view>
|
||||
<view class="mine_block_view u-flex-between">
|
||||
<!-- <image mode="widthFix" src="/static/home/zu2.png"></image> -->
|
||||
<view class="u-flex-fill">
|
||||
<view class="u-flex-y-center u-flex-between u-flex-fill" style="margin-bottom: 20rpx;">
|
||||
<view style="width: 50%;">
|
||||
<view style="font-size: 30rpx;">
|
||||
<text style="color: #3770AE;">{{item.data.day_money || 0}}</text>
|
||||
</view>
|
||||
<view style="color: #999;">
|
||||
今日{{item.type}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="width: 50%;">
|
||||
<view style="font-size: 30rpx;">
|
||||
<text style="color: #3770AE;">{{item.data.week_money1 || 0}}</text>
|
||||
</view>
|
||||
<view style="color: #999;">
|
||||
上周{{item.type}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex-y-center u-flex-between u-flex-fill">
|
||||
<view style="width: 50%;">
|
||||
<view style="font-size: 30rpx;">
|
||||
<text style="color: #3770AE;">{{item.data.week_money0 || 0}}</text>
|
||||
</view>
|
||||
<view style="color: #999;">
|
||||
本周{{item.type}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 50%;">
|
||||
<view style="font-size: 30rpx;">
|
||||
<text style="color: #3770AE;">{{item.data.total_money || 0}}</text>
|
||||
</view>
|
||||
<view style="color: #999;">
|
||||
累计{{item.type}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
walletInfo: {},
|
||||
order: {},
|
||||
device_fee: {},
|
||||
device: {},
|
||||
invite: {},
|
||||
wallet: {},
|
||||
money_list: [{
|
||||
name: "收益统计",
|
||||
type: "收益",
|
||||
data: {}
|
||||
}, {
|
||||
name: "推广统计",
|
||||
type: "推广",
|
||||
data: {}
|
||||
}, {
|
||||
name: "邀请统计",
|
||||
type: "邀请",
|
||||
data: {}
|
||||
}]
|
||||
}
|
||||
},
|
||||
// onLoad() {
|
||||
// this.getWalletInfo()
|
||||
// },
|
||||
onShow() {
|
||||
this.getWalletInfo()
|
||||
},
|
||||
methods: {
|
||||
calltel() {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: 'tel:400-800-5326'
|
||||
});
|
||||
},
|
||||
topay() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/wallet/recharge?data=' + encodeURIComponent(JSON.stringify(this.wallet))
|
||||
})
|
||||
},
|
||||
navto(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
getWalletInfo() {
|
||||
this.$http.get('/shop/v10/wallet/report').then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
if (success) {
|
||||
this.wallet = data.wallet
|
||||
this.device = data.device
|
||||
// this.wallet.freeze_money = this.wallet.freeze_money.toFixed(2)
|
||||
this.wallet.info = data.shop
|
||||
this.money_list = [{
|
||||
name: "收益统计",
|
||||
type: "收益",
|
||||
data: data.device_fee
|
||||
}, {
|
||||
name: "推广统计",
|
||||
type: "推广",
|
||||
data: data.order
|
||||
}, {
|
||||
name: "邀请统计",
|
||||
type: "邀请",
|
||||
data: data.invite
|
||||
}]
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background: #F7F7F7;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
view {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.mine {
|
||||
padding: 30rpx;
|
||||
|
||||
&_money {
|
||||
position: relative;
|
||||
width: 690rpx;
|
||||
height: 260rpx;
|
||||
// padding: 6rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
|
||||
&_bei {
|
||||
width: 690rpx;
|
||||
height: 172rpx;
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
&_num {
|
||||
width: 100%;
|
||||
height: 172rpx;
|
||||
background-color: #4497D1;
|
||||
padding: 30rpx 110rpx 30rpx 50rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-radius: 15rpx;
|
||||
|
||||
&_view {
|
||||
&_monNum {
|
||||
font-weight: bold;
|
||||
font-size: 52rpx;
|
||||
color: #FFFFFF;
|
||||
height: 70rpx;
|
||||
display: table-cell;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
&_tip {
|
||||
margin-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&_bottom {
|
||||
background-color: #3978B9;
|
||||
width: 100%;
|
||||
height: 76rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-radius: 0 0 15rpx 15rpx;
|
||||
|
||||
view {
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
line-height: 76rpx;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #D9E221;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&_grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 35rpx 0;
|
||||
|
||||
&_view {
|
||||
width: 25%;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #707070;
|
||||
text-align: center;
|
||||
margin-bottom: 22rpx;
|
||||
|
||||
image {
|
||||
width: 98rpx;
|
||||
height: 98rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #fff;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&_block {
|
||||
padding: 24rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
&_tit {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
&_left {
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #232323;
|
||||
}
|
||||
|
||||
&_right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
color: #CBD73B;
|
||||
|
||||
image {
|
||||
width: 13rpx;
|
||||
height: 22rpx;
|
||||
margin-left: 15rpx;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&_view {
|
||||
width: 100%;
|
||||
min-height: 120rpx;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
border: 2rpx solid rgba(55, 112, 174, 0.1);
|
||||
margin-top: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
color: #232323;
|
||||
padding: 20rpx 30rpx;
|
||||
text-align: center;
|
||||
|
||||
image {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
margin-right: 25rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
110
pages/share/index.vue
Normal file
110
pages/share/index.vue
Normal file
@@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<view class="u-flex u-flex-xy-center" style="width: 750rpx;height: 1334rpx;position: relative;">
|
||||
<view v-if="userinfo.vip > 0" style="background-color: #F6FAFF;padding: 30rpx; border-radius: 10rpx;">
|
||||
<view class="u-flex u-flex-xy-center">
|
||||
<u--image :src="userinfo.appcode" width="440rpx" height="440rpx"></u--image>
|
||||
</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view style="font-size: 30rpx;color: #999999;text-align: center;">长按保存或者转发</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
无分享权限.
|
||||
</view>
|
||||
<!-- <canvas style="width: 100%;height: 100%;" canvas-id="canvas" id="canvas"></canvas>
|
||||
<view style="position: absolute;left: 280rpx;">
|
||||
<u-button @click="save" type="primary">保存海报</u-button>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
screenWidth: '',
|
||||
screenHeight: '',
|
||||
userinfo: {
|
||||
appcode: '',
|
||||
vip: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
self = this;
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
self.screenWidth = res.windowWidth; // 屏幕宽度,单位为px
|
||||
self.screenHeight = res.windowHeight; // 屏幕高度,单位为px
|
||||
},
|
||||
});
|
||||
self.userinfo = self.$store.state.auth.user;
|
||||
},
|
||||
onReady() {
|
||||
//self.draw();
|
||||
},
|
||||
methods: {
|
||||
getImageInfo(src) {
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.getImageInfo({
|
||||
src,
|
||||
success: res => {
|
||||
resolve(res)
|
||||
},
|
||||
fail: err => {
|
||||
reject(err)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async draw() {
|
||||
const ctx = uni.createCanvasContext('canvas');
|
||||
|
||||
// 绘制图片1
|
||||
const image1 = await this.getImageInfo('https://xingdong-app.oss-cn-beijing.aliyuncs.com/share.jpg')
|
||||
ctx.drawImage(image1.path, 0, 0, self.screenWidth, image1.height / 2);
|
||||
|
||||
// 绘制图片2
|
||||
const image2 = await this.getImageInfo(
|
||||
self.$store.state.auth.user.qrcode
|
||||
);
|
||||
|
||||
let x = image1.width / 2 - 225;
|
||||
let y = image1.height / 2 - 450;
|
||||
ctx.drawImage(image2.path, 225, 450, 110, 110);
|
||||
|
||||
ctx.font = '11px Regular'; // 字体大小
|
||||
ctx.fillStyle = '#0f0f0f'; // 字体填充颜色
|
||||
|
||||
let reg = /(\d{3})\d{4}(\d{4})/; //正则表达式
|
||||
let phone = self.$store.state.auth.user.mobile;
|
||||
phone = phone.replace(reg, "$1****$2")
|
||||
|
||||
ctx.fillText(phone, 245, 568);
|
||||
|
||||
setTimeout(function() { // uni-app必须加上延迟,不然显示不出来, 亲测
|
||||
ctx.stroke();
|
||||
ctx.draw() //必须加上 uniapp 没这儿玩意儿 显示不出来不比原生 不加可以显示
|
||||
}, 300);
|
||||
|
||||
},
|
||||
save() {
|
||||
uni.canvasToTempFilePath({
|
||||
canvasId: 'canvas',
|
||||
success: res => {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success(res) {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
159
pages/team/detail.vue
Normal file
159
pages/team/detail.vue
Normal file
@@ -0,0 +1,159 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="background-color: #ffffff;border-radius: 10rpx;padding: 30rpx; font-size: 30rpx;">
|
||||
<view class="u-flex u-flex-y-center">
|
||||
<u--image width="100rpx" height="100rpx" :src="shopinfo.avatar_url" shape="circle">
|
||||
</u--image>
|
||||
<view style="width: 20rpx;"></view>
|
||||
<view>
|
||||
<view>{{shopinfo.nickname}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>{{shopinfo.username}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-divider></u-divider>
|
||||
<view class="u-flex u-flex-between">
|
||||
<view>
|
||||
<view>手机号:{{shopinfo.mobile}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>等级:v{{shopinfo.vip}}</view>
|
||||
</view>
|
||||
<view style="width: 20rpx;"></view>
|
||||
<view>
|
||||
<view>余额:¥{{shopinfo.money}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>自购:{{shopinfo.device_num}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 16rpx;"></view>
|
||||
<view>注册时间:{{shopinfo.created_at}}</view>
|
||||
</view>
|
||||
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="background-color: #ffffff;border-radius: 10rpx;padding: 30rpx;font-size: 30rpx;">
|
||||
<view class="u-flex u-flex-y-center">
|
||||
<view style="background-color: #ffffff;border-radius: 12rpx; padding: 10rpx;"
|
||||
:class="search.week === 0 ? 'xkl_cur' : 'xkl_no'" @click="checkweek(0)">本周</view>
|
||||
<view style="width: 30rpx;"></view>
|
||||
<view style="background-color: #ffffff;border-radius: 12rpx; padding: 10rpx;"
|
||||
:class="search.week == 1 ? 'xkl_cur' : 'xkl_no'" @click="checkweek(1)">上周</view>
|
||||
<view style="width: 30rpx;"></view>
|
||||
<view @click="screen.showcalendar = true"
|
||||
style="background-color: #ffffff;border-radius: 12rpx; padding: 10rpx;"
|
||||
:class="search.week === '' ? 'xkl_cur' : 'xkl_no'">
|
||||
<text v-if="search.start_date">{{search.start_date}} - {{search.end_date}}</text>
|
||||
<text v-else>自定义时间</text>
|
||||
</view>
|
||||
</view>
|
||||
<u-divider></u-divider>
|
||||
<view>{{shopinfo.nickname}}团队销量 {{team_device_num}} </view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<qiun-data-charts type="line" :opts="opts" :chartData="chartData" />
|
||||
</view>
|
||||
<u-calendar :show="screen.showcalendar" minDate="2024-03-01" mode="range" @confirm="confirmcalendar"
|
||||
@close="screen.showcalendar = false" :showTitle="false" :defaultDate="null"></u-calendar>
|
||||
<view style="height: 100rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
screen: {
|
||||
showcalendar: false,
|
||||
},
|
||||
shopinfo: {
|
||||
nickname: '',
|
||||
username: '',
|
||||
money: '',
|
||||
mobile: '',
|
||||
vip: '',
|
||||
device_num: '',
|
||||
id: '',
|
||||
},
|
||||
team_device_num: 0,
|
||||
chartData: {},
|
||||
opts: {
|
||||
padding: [15, 10, 0, 15],
|
||||
enableScroll: false,
|
||||
legend: {},
|
||||
xAxis: {
|
||||
disableGrid: true,
|
||||
showTitle: false
|
||||
},
|
||||
yAxis: {
|
||||
disabled: true,
|
||||
gridType: "dash",
|
||||
dashLength: 2
|
||||
},
|
||||
extra: {
|
||||
line: {
|
||||
type: "curve",
|
||||
width: 2,
|
||||
activeType: "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
search: {
|
||||
team_shop_id: '',
|
||||
start_time: '',
|
||||
end_time: '',
|
||||
week: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
self = this;
|
||||
if (option && option.team_shop_id) {
|
||||
self.search.team_shop_id = option.team_shop_id;
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
self.getServerData();
|
||||
},
|
||||
async onPullDownRefresh() {
|
||||
self.search.week = 0;
|
||||
self.getServerData();
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
methods: {
|
||||
confirmcalendar(e) {
|
||||
self.search.start_date = e[0];
|
||||
self.search.end_date = e[e.length - 1];
|
||||
self.screen.showcalendar = false;
|
||||
self.search.week = '';
|
||||
self.getServerData();
|
||||
},
|
||||
checkweek(week) {
|
||||
self.search.week = week;
|
||||
self.search.start_date = '';
|
||||
self.search.end_date = '';
|
||||
self.getServerData();
|
||||
},
|
||||
getServerData() {
|
||||
self.$http.get('/shop/v10/team/report', self.search).then(({
|
||||
data
|
||||
}) => {
|
||||
self.team_device_num = data.team_device_num;
|
||||
self.chartData = data.report;
|
||||
self.shopinfo = data.team_shop;
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.xkl_cur {
|
||||
border: 1px solid #26418A;
|
||||
color: #26418A;
|
||||
}
|
||||
|
||||
.xkl_no {
|
||||
border: 1px solid #999999;
|
||||
color: #999999;
|
||||
}
|
||||
</style>
|
||||
160
pages/team/index.vue
Normal file
160
pages/team/index.vue
Normal file
@@ -0,0 +1,160 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<!-- <view style="height: 20rpx;"></view>
|
||||
<view class="u-flex" style="padding: 20rpx;background-color: #ffffff;padding: 20rpx;border-radius: 10rpx;">
|
||||
<view style="width: 160rpx;font-size: 30rpx;">日期选择</view>
|
||||
<view @click="screen.showcalendar = true" style="color: #232323;">
|
||||
<text v-if="search.start_date">{{search.start_date}} - {{search.end_date}}</text>
|
||||
<text v-else>请选择日期</text>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="background-color: #ffffff;padding: 20rpx;">
|
||||
<u-grid :border="false" :col="4" style="background-color: #ffffff; border-radius: 10rpx;">
|
||||
<u-grid-item :customStyle="{padding:'20rpx 0'}">
|
||||
<view>{{total}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<text class="grid-text-mini">直推人数</text>
|
||||
</u-grid-item>
|
||||
<u-grid-item :customStyle="{padding:'20rpx 0'}">
|
||||
<view>{{total}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<text class="grid-text-mini">团队人数</text>
|
||||
</u-grid-item>
|
||||
<u-grid-item :customStyle="{padding:'20rpx 0'}">
|
||||
<view>{{total}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<text class="grid-text-mini">直推充电桩</text>
|
||||
</u-grid-item>
|
||||
<u-grid-item :customStyle="{padding:'20rpx 0'}">
|
||||
<view>{{total}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<text class="grid-text-mini">团队充电桩</text>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view> -->
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="background-color: #ffffff;padding: 20rpx;">邀请人数:{{total}}</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view>
|
||||
<!-- navigator -->
|
||||
<!-- :url="`/pages/team/detail?team_shop_id=${item.id}`" -->
|
||||
<view v-for="(item,index) in teamItems"
|
||||
:key="index"
|
||||
style="background-color: #ffffff;border-radius: 10rpx;padding: 30rpx;margin-bottom: 20rpx; font-size: 30rpx;">
|
||||
<view class="u-flex u-flex-y-center">
|
||||
<u--image width="100rpx" height="100rpx" :src="item.avatar_url"
|
||||
shape="circle">
|
||||
</u--image>
|
||||
<view style="width: 20rpx;"></view>
|
||||
<view>
|
||||
<view>{{item.nickname}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>{{item.username}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-divider></u-divider>
|
||||
<view class="u-flex u-flex-between">
|
||||
<view>
|
||||
<view>手机号:{{item.mobile}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<!-- <view>等级:v{{item.vip}}</view> -->
|
||||
<view>等级:***</view>
|
||||
</view>
|
||||
<view style="width: 20rpx;"></view>
|
||||
<view>
|
||||
<!-- <view>余额:¥{{item.money}}</view> -->
|
||||
<!-- <view style="height: 10rpx;"></view> -->
|
||||
<view>自购:{{item.device_num}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 16rpx;"></view>
|
||||
<view>注册时间:{{item.created_at}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-loadmore :status="loadStatus" />
|
||||
|
||||
<u-calendar :show="screen.showcalendar" minDate="2024-02-01" mode="range" @confirm="confirmcalendar"
|
||||
@close="screen.showcalendar = false" :showTitle="false" :defaultDate="[]"></u-calendar>
|
||||
<view style="height: 100rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
screen: {
|
||||
showcalendar: false,
|
||||
},
|
||||
teamItems: [],
|
||||
loadStatus: 'loadmore',
|
||||
total: 0,
|
||||
page: {
|
||||
current: 0,
|
||||
last_page: 1,
|
||||
page: 1,
|
||||
},
|
||||
search: {
|
||||
level: 1,
|
||||
page: 1,
|
||||
start_date: '',
|
||||
end_date: '',
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
self = this;
|
||||
self.getShopTeam();
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!self.pageStatus()) {
|
||||
return;
|
||||
}
|
||||
self.loadStatus = 'loading';
|
||||
self.search.page += 1;
|
||||
self.getShopTeam();
|
||||
},
|
||||
async onPullDownRefresh() {
|
||||
self.search.page = 1;
|
||||
self.teamItems = [];
|
||||
await self.getShopTeam();
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
methods: {
|
||||
confirmcalendar(e) {
|
||||
self.search.start_date = e[0];
|
||||
self.search.end_date = e[e.length - 1];
|
||||
self.screen.showcalendar = false;
|
||||
},
|
||||
pageStatus() {
|
||||
self.loadStatus = 'loadmore';
|
||||
if (self.search.page >= self.page.last_page) {
|
||||
self.loadStatus = 'nomore';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
getShopTeam() {
|
||||
self.$http.get('/shop/v10/user/team', self.search).then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
self.teamItems = self.teamItems.concat(data.data);
|
||||
self.page.last_page = data.last_page;
|
||||
self.total = data.total;
|
||||
self.pageStatus();
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.xkl-com-bg{
|
||||
min-height: 100vh;
|
||||
}
|
||||
</style>
|
||||
118
pages/wallet/account/form.vue
Normal file
118
pages/wallet/account/form.vue
Normal file
@@ -0,0 +1,118 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="background-color: #ffffff;padding: 30rpx;">
|
||||
<u--form labelPosition="top" :model="form" :rules="rules" ref="uForm" labelWidth="200rpx">
|
||||
<u-form-item label="真实姓名" prop="realname" borderBottom>
|
||||
<u-input v-model="form.realname" placeholder="请输入" border="none" />
|
||||
</u-form-item>
|
||||
<u-form-item label="身份证号" prop="idcard" borderBottom>
|
||||
<u-input v-model="form.idcard" placeholder="请输入" border="none" />
|
||||
</u-form-item>
|
||||
<u-form-item label="银行卡号" prop="num" borderBottom>
|
||||
<u-input v-model="form.num" placeholder="请输入" border="none" />
|
||||
</u-form-item>
|
||||
<u-form-item label="预留手机号" prop="mobile" borderBottom>
|
||||
<u-input v-model="form.mobile" placeholder="请输入" border="none" />
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<view style="height: 50rpx;"></view>
|
||||
<view>
|
||||
<view style="font-size: 28rpx;color: coral;">请仔细核对信息,填写错误会导致提现失败。</view>
|
||||
</view>
|
||||
<view style="height: 50rpx;"></view>
|
||||
<u-button type="primary" @click="submit">提交</u-button>
|
||||
<view style="height: 50rpx;"></view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
rules: {
|
||||
idcard: [{
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
realname: [{
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
num: [{
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
mobile: [{
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
},
|
||||
form: {
|
||||
id: '',
|
||||
type: 3,
|
||||
role: 1,
|
||||
subname: '',
|
||||
realname: '',
|
||||
idcard: '',
|
||||
num: '',
|
||||
mobile: '',
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
onLoad(option) {
|
||||
self = this;
|
||||
if (option && option.item) {
|
||||
self.form = JSON.parse(decodeURIComponent(option.item));
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
onReady() {
|
||||
//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
|
||||
self.$refs.uForm.setRules(self.rules)
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
this.$refs.uForm.validate().then(res => {
|
||||
if (self.form.id) {
|
||||
self.$http.post('/shop/v10/account/update', self.form).then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
if (success) {
|
||||
uni.navigateBack();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
self.$http.post('/shop/v10/account/create', self.form).then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
if (success) {
|
||||
uni.navigateBack();
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(errors => {
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
133
pages/wallet/account/index.vue
Normal file
133
pages/wallet/account/index.vue
Normal file
@@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="height: 20rpx;"></view>
|
||||
<navigator url="/pages/wallet/account/form">
|
||||
<u-button type="primary">添加银行卡</u-button>
|
||||
</navigator>
|
||||
<!-- <view style="height: 20rpx;"></view> -->
|
||||
<!-- <navigator url="/pages/wallet/account/org">
|
||||
<u-button type="warning">添加企业</u-button>
|
||||
</navigator> -->
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view>
|
||||
<view v-if="!items.length" style="padding: 30rpx;background-color: #ffffff;border-radius: 10rpx;">
|
||||
<u-empty mode="data"></u-empty>
|
||||
</view>
|
||||
<view v-else @click="check(item)" v-for="(item,index) in items" :key="index"
|
||||
:class="item.id == current ? 'xkl_cur' : 'xkl_no'"
|
||||
style="background-color: #ffffff;border-radius: 12rpx; padding: 20rpx;margin-bottom: 20rpx;">
|
||||
<view class="u-flex u-flex-between">
|
||||
<view>
|
||||
<view style="font-size: 28rpx;">
|
||||
<view class="u-flex u-flex-y-center">
|
||||
<view>
|
||||
<u-tag :text="config.role[item.role]" size="mini" type="success" plain
|
||||
plainFill></u-tag>
|
||||
</view>
|
||||
<view style="width: 20rpx;"></view>
|
||||
<view style="font-size: 26rpx;">{{item.realname}}</view>
|
||||
<view style="width: 20rpx;"></view>
|
||||
<view style="font-size: 26rpx;">{{item.mobile}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="color: #232323;">
|
||||
<view style="font-size: 28rpx;">{{item.subname}}</view>
|
||||
<view style="font-size: 28rpx;">{{item.num}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view style="font-size: 28rpx;">{{item.idcard}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<u-tag v-if="item.role == 1" text="编辑"
|
||||
@click="tonav(`/pages/wallet/account/form?item=${encodeURIComponent(JSON.stringify(item))}`)">
|
||||
|
||||
</u-tag>
|
||||
<u-tag v-if="item.role == 2" text="编辑"
|
||||
@click="tonav(`/pages/wallet/account/org?item=${encodeURIComponent(JSON.stringify(item))}`)">
|
||||
|
||||
</u-tag>
|
||||
<view style="height: 30rpx;"></view>
|
||||
<u-tag text="删除" @click="delshowcli(item)" type="error"></u-tag>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-modal :show="delshow" @confirm="getAccountDel()" @close="delshow = false" showCancelButton
|
||||
closeOnClickOverlay @cancel="delshow = false" content='确认删除?'></u-modal>
|
||||
<view style="height: 100rpx;"></view>
|
||||
<u-button v-if="show" @click="toback">返回上一页</u-button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
delshow: false,
|
||||
items: [],
|
||||
current: '',
|
||||
config: null,
|
||||
show: 0,
|
||||
form: {
|
||||
id: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
self = this;
|
||||
if (option && option.show) {
|
||||
self.show = 1;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
self.getAccountItems();
|
||||
},
|
||||
methods: {
|
||||
tonav(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
delshowcli(item) {
|
||||
self.delshow = true;
|
||||
self.form.id = item.id;
|
||||
},
|
||||
toback() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
check(item) {
|
||||
self.current = item.id;
|
||||
},
|
||||
getAccountDel() {
|
||||
self.$http.get('/shop/v10/account/delete', self.form).then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
self.delshow = false;
|
||||
self.getAccountItems();
|
||||
})
|
||||
},
|
||||
getAccountItems() {
|
||||
self.$http.get('/shop/v10/account/items').then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
self.items = data.items;
|
||||
self.config = data.config;
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.xkl_cur {
|
||||
border: 1px solid #71d5a1;
|
||||
}
|
||||
|
||||
.xkl_no {
|
||||
border: 1px solid #ffffff;
|
||||
}
|
||||
</style>
|
||||
99
pages/wallet/account/org.vue
Normal file
99
pages/wallet/account/org.vue
Normal file
@@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="background-color: #ffffff;padding: 30rpx;">
|
||||
<u--form labelPosition="top" :model="form" :rules="rules" ref="uForm" labelWidth="200rpx">
|
||||
<u-form-item label="公司名称" prop="realname" borderBottom>
|
||||
<u-input v-model="form.realname" placeholder="请输入" border="none" />
|
||||
</u-form-item>
|
||||
<u-form-item label="开户行" prop="subname" borderBottom>
|
||||
<u-input v-model="form.subname" placeholder="请输入" border="none" />
|
||||
</u-form-item>
|
||||
<u-form-item label="银行账号" prop="num" borderBottom>
|
||||
<u-input v-model="form.num" placeholder="请输入" border="none" />
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<view style="height: 50rpx;"></view>
|
||||
<view>
|
||||
<view style="font-size: 28rpx;color: coral;">请仔细核对信息,填写错误会导致提现失败。</view>
|
||||
</view>
|
||||
<view style="height: 50rpx;"></view>
|
||||
<u-button type="primary" @click="submit">提交</u-button>
|
||||
<view style="height: 50rpx;"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
rules: {
|
||||
subname: [{
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
realname: [{
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
num: [{
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
},
|
||||
form: {
|
||||
id: '',
|
||||
role: 2,
|
||||
subname: '',
|
||||
realname: '',
|
||||
idcard: '',
|
||||
num: '',
|
||||
mobile: '',
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
onLoad(option) {
|
||||
self = this;
|
||||
if (option && option.item) {
|
||||
self.form = JSON.parse(decodeURIComponent(option.item));
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
onReady() {
|
||||
//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
|
||||
self.$refs.uForm.setRules(self.rules)
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
this.$refs.uForm.validate().then(res => {
|
||||
self.$http.post('/shop/v10/account/org', self.form).then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
if (success) {
|
||||
uni.navigateBack();
|
||||
}
|
||||
})
|
||||
}).catch(errors => {
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
254
pages/wallet/index.vue
Normal file
254
pages/wallet/index.vue
Normal file
@@ -0,0 +1,254 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="
|
||||
background: linear-gradient(185deg, #59A0DE 0%, #255C9A 100%);
|
||||
border-radius: 10rpx;padding: 50rpx;">
|
||||
<view class="u-flex u-flex-between u-flex-y-center">
|
||||
<view style="color: #ffffff;">
|
||||
<view style="font-size: 24rpx;color: #EEEEEE;">当前余额(元)</view>
|
||||
<view style="font-size: 40rpx;font-weight: 800;">
|
||||
<view>{{walletInfo.money}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<navigator :url="`/pages/wallet/temp?data=${encodeURIComponent(JSON.stringify(walletInfo))}`"
|
||||
style="width: 120rpx;height: 56rpx;line-height: 56rpx; height: 56rpx;text-align: center;font-size: 28rpx;background: #F7F7F7;border-radius: 12rpx;opacity: 1; color: #2CA164;">
|
||||
转赠
|
||||
</navigator>
|
||||
</view>
|
||||
<view style="height: 50rpx;"></view>
|
||||
<!-- <view class="u-flex u-flex-between u-flex-y-center"
|
||||
style="font-size: 28rpx;text-align: center;color: #ffffff;">
|
||||
<view>
|
||||
<view>100</view>
|
||||
<view style="color: #EEEEEE;">冻结中</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>100</view>
|
||||
<view style="color: #EEEEEE;">可提现</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<u-grid :border="false" :col="2">
|
||||
<u-grid-item :customStyle="{padding:'20rpx'}" @click="navto('/pages/wallet/list?status=-3')">
|
||||
<view style="color: #fff;">{{walletInfo.freeze_money}}</view>
|
||||
<view style="color: #c8c9cc;font-size: 28rpx;">冻结中</view>
|
||||
</u-grid-item>
|
||||
|
||||
<u-grid-item class="u-flex" :customStyle="{padding:'20rpx'}" @click="navto('/pages/wallet/withdraw')">
|
||||
<view style="color: #fff;">{{walletInfo.money}}</view>
|
||||
<view style="color: #c8c9cc;font-size: 28rpx;">可提现</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="background-color: #ffffff; border-radius: 10rpx;">
|
||||
<u-grid :border="false" :col="5">
|
||||
<u-grid-item :customStyle="{padding:'20rpx 0'}" @click="navto('/pages/wallet/list')">
|
||||
<u-icon name="/static/icon/money-list.png" size="50rpx"></u-icon>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<text class="grid-text-mini">账单</text>
|
||||
</u-grid-item>
|
||||
<u-grid-item :customStyle="{padding:'20rpx'}" @click="topay()">
|
||||
<u-icon name="/static/icon/money-list.png" size="50rpx"></u-icon>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<text class="grid-text-mini">充值</text>
|
||||
</u-grid-item>
|
||||
<u-grid-item :customStyle="{padding:'20rpx 0'}" @click="navto('/pages/wallet/withdraw')">
|
||||
<u-icon name="/static/icon/withdraw.png" size="50rpx"></u-icon>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<text class="grid-text-mini">提现</text>
|
||||
</u-grid-item>
|
||||
<u-grid-item :customStyle="{padding:'20rpx 0'}"
|
||||
@click="navto(`/pages/wallet/temp?data=${encodeURIComponent(JSON.stringify(walletInfo))}`)">
|
||||
<u-icon name="gift" size="66rpx"></u-icon>
|
||||
<text class="grid-text-mini">转赠</text>
|
||||
</u-grid-item>
|
||||
<u-grid-item :customStyle="{padding:'20rpx 0'}" @click="navto('/pages/wallet/account/index')">
|
||||
<u-icon name="/static/icon/bank.png" size="50rpx"></u-icon>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<text class="grid-text-mini">银行卡</text>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
|
||||
<view style="height: 20rpx;"></view>
|
||||
<!-- <u-subsection :list="tabData.list" keyName="name" :current="tabData.current" @change="sectionChange"
|
||||
activeColor="#2CCE7F"></u-subsection>
|
||||
<view style="height: 20rpx;"></view> -->
|
||||
<view class="u-flex">
|
||||
<view style="width: 6rpx;background-color: #26418A;"></view>
|
||||
<view style="width: 6rpx;"></view>
|
||||
<view style="font-size: 28rpx;color: #2a2a2a;font-weight: 700;">最新记录</view>
|
||||
</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view>
|
||||
<view v-for="(item,index) in walletItems" :key="index"
|
||||
style="padding: 20rpx;background-color: #ffffff;padding: 20rpx;border-radius: 16rpx;margin-bottom: 20rpx;">
|
||||
<view class="u-flex u-flex-between u-flex-y-center">
|
||||
<view style="color: #232323;font-size: 30rpx;">
|
||||
<view class="u-flex u-flex-between">
|
||||
<view>{{config.type[item.type]}}</view>
|
||||
</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view style="color: #999999;font-size: 26rpx;">{{item.note}}</view>
|
||||
<view style="height: 16rpx;"></view>
|
||||
<view class="u-flex">
|
||||
<view>{{item.created_at}}</view>
|
||||
<view style="width: 20rpx;"></view>
|
||||
<view style="color: #909399;">{{config.status[item.status]}}</view>
|
||||
</view>
|
||||
<view style="height: 16rpx;"></view>
|
||||
</view>
|
||||
<view style="font-size: 28rpx;">
|
||||
<text v-if="item.money > 0" style="color: #FF2727;">{{item.money}}</text>
|
||||
<text v-else>{{item.money}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.admin_note">
|
||||
<u-line></u-line>
|
||||
<view style="height: 14rpx;"></view>
|
||||
<view style="font-size: 26rpx;">{{item.admin_note}}</view>
|
||||
</view>
|
||||
<view v-if="item.account">
|
||||
<u-line></u-line>
|
||||
<view style="height: 14rpx;"></view>
|
||||
<view class="u-flex u-flex-between">
|
||||
<view>{{item.account.realname}} </view>
|
||||
<view>{{item.account.mobile}} </view>
|
||||
</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>{{item.subname}}</view>
|
||||
<view>{{item.account.num}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>{{item.account.idcard}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <u-loadmore :status="loadStatus" /> -->
|
||||
<view style="height: 400rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
API_URL,
|
||||
STATIC_URL
|
||||
} from '@/env'
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
walletInfo: {},
|
||||
walletItems: [],
|
||||
tabData: {
|
||||
list: [{
|
||||
"name": "全部",
|
||||
"symbol": ""
|
||||
}, {
|
||||
"name": "收入",
|
||||
"symbol": "+"
|
||||
}, {
|
||||
"name": "支出",
|
||||
"symbol": "-"
|
||||
}, ],
|
||||
current: 0
|
||||
},
|
||||
loadStatus: 'loadmore',
|
||||
search: {
|
||||
symbol: '',
|
||||
page: 1,
|
||||
status: 0,
|
||||
},
|
||||
page: {
|
||||
current: 0,
|
||||
last_page: 1
|
||||
},
|
||||
config: null
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
self = this;
|
||||
|
||||
},
|
||||
onShow() {
|
||||
self.getWalletInfo();
|
||||
self.walletItems = [];
|
||||
self.getWalletItems();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
self.search.page = 1;
|
||||
self.walletItems = [];
|
||||
self.getWalletInfo();
|
||||
self.getWalletItems();
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
methods: {
|
||||
topay() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/wallet/recharge?data=' + encodeURIComponent(JSON.stringify(self.walletInfo))
|
||||
})
|
||||
// var ua = window.navigator.userAgent.toLowerCase();
|
||||
|
||||
// if (ua.match(/micromessenger/i) == 'micromessenger') {
|
||||
// location.href = API_URL + '/shop/v10/auth/wxoauthshoprecharge?data=' + encodeURIComponent(JSON
|
||||
// .stringify(self.walletInfo));
|
||||
// return true;
|
||||
// } else {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/wallet/recharge?data=' + encodeURIComponent(JSON.stringify(self.walletInfo))
|
||||
// })
|
||||
// return false;
|
||||
// }
|
||||
},
|
||||
navto(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
sectionChange(index) {
|
||||
self.tabData.current = index;
|
||||
self.search.symbol = self.tabData.list[index].symbol;
|
||||
self.search.page = 1;
|
||||
self.walletItems = [];
|
||||
self.getWalletItems();
|
||||
},
|
||||
pageStatus() {
|
||||
self.loadStatus = 'loadmore';
|
||||
if (self.search.page >= self.page.last_page) {
|
||||
self.loadStatus = 'nomore';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
getWalletItems() {
|
||||
self.$http.get('/shop/v10/wallet/items', self.search).then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
if (success) {
|
||||
self.walletItems = self.walletItems.concat(data.items.data);
|
||||
self.config = data.config;
|
||||
self.page.last_page = data.items.last_page;
|
||||
self.pageStatus();
|
||||
}
|
||||
})
|
||||
},
|
||||
getWalletInfo() {
|
||||
self.$http.get('/shop/v10/wallet/info').then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
if (success) {
|
||||
self.walletInfo = data;
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
260
pages/wallet/list.vue
Normal file
260
pages/wallet/list.vue
Normal file
@@ -0,0 +1,260 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view v-if="false" style="padding: 20rpx;background-color: #ffffff;padding: 20rpx;border-radius: 10rpx;">
|
||||
<view class="u-flex">
|
||||
<view style="width: 160rpx;font-size: 30rpx;">日期选择</view>
|
||||
<view @click="screen.showcalendar = true" style="color: #232323;">
|
||||
<text v-if="search.start_date">{{search.start_date}} - {{search.end_date}}</text>
|
||||
<text v-else>请选择日期</text>
|
||||
</view>
|
||||
</view>
|
||||
<u-divider text=""></u-divider>
|
||||
<view>
|
||||
<view style="font-size: 30rpx;">充电桩</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view class="u-flex" style="font-size: 30rpx;">
|
||||
<view style="background-color: #ffffff;border-radius: 12rpx; padding: 10rpx;"
|
||||
:class="search.scene == 2 ? 'xkl_cur' : 'xkl_no'" @click="checkscene(2)">全部</view>
|
||||
<view style="width: 30rpx;"></view>
|
||||
<view style="background-color: #ffffff;border-radius: 12rpx; padding: 10rpx;"
|
||||
:class="search.type == 21 ? 'xkl_cur' : 'xkl_no'" @click="checktype(21)">购买</view>
|
||||
<view style="width: 30rpx;"></view>
|
||||
<view style="background-color: #ffffff;border-radius: 12rpx; padding: 10rpx;"
|
||||
:class="search.type == 22 ? 'xkl_cur' : 'xkl_no'" @click="checktype(22)">直推奖</view>
|
||||
<view style="width: 30rpx;"></view>
|
||||
<view style="background-color: #ffffff;border-radius: 12rpx; padding: 10rpx;"
|
||||
:class="search.type == 23 ? 'xkl_cur' : 'xkl_no'" @click="checktype(23)">团队奖</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-divider text=""></u-divider>
|
||||
<view>
|
||||
<view style="font-size: 30rpx;">服务费</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view class="u-flex" style="font-size: 30rpx;">
|
||||
<view style="background-color: #ffffff;border-radius: 12rpx; padding: 10rpx;"
|
||||
:class="search.scene == 3 ? 'xkl_cur' : 'xkl_no'" @click="checkscene(3)">全部</view>
|
||||
<view style="width: 30rpx;"></view>
|
||||
<view style="background-color: #ffffff;border-radius: 12rpx; padding: 10rpx;"
|
||||
:class="search.type == 31 ? 'xkl_cur' : 'xkl_no'" @click="checktype(31)">投资奖</view>
|
||||
<view style="width: 30rpx;"></view>
|
||||
<view style="background-color: #ffffff;border-radius: 12rpx; padding: 10rpx;"
|
||||
:class="search.type == 32 ? 'xkl_cur' : 'xkl_no'" @click="checktype(32)">直推奖</view>
|
||||
<view style="width: 30rpx;"></view>
|
||||
<view style="background-color: #ffffff;border-radius: 12rpx; padding: 10rpx;"
|
||||
:class="search.type == 33 ? 'xkl_cur' : 'xkl_no'" @click="checktype(33)">团队奖</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-divider text=""></u-divider>
|
||||
<view class="u-flex u-flex-y-center">
|
||||
<view style="font-size: 30rpx;">设备ID</view>
|
||||
<u--input placeholder="请输入设备id" border="bottom" v-model="search.device_id"></u--input>
|
||||
</view>
|
||||
<u-divider text=""></u-divider>
|
||||
<view class="u-flex">
|
||||
<u-button>重置</u-button>
|
||||
<u-button type="primary">确定</u-button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view style="height: 20rpx;"></view>
|
||||
<view style="background-color: #ffffff;border-radius: 10rpx;">
|
||||
<u-grid :border="false" :col="2">
|
||||
<u-grid-item :customStyle="{padding:'20rpx 0'}">
|
||||
<view style="font-size: 30rpx;">¥100</view>
|
||||
<text class="grid-text-mini">收入</text>
|
||||
</u-grid-item>
|
||||
|
||||
<u-grid-item :customStyle="{padding:'20rpx 0'}">
|
||||
<view style="font-size: 30rpx;">¥100</view>
|
||||
<text class="grid-text-mini">支出</text>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view> -->
|
||||
|
||||
<view style="height: 20rpx;"></view>
|
||||
<!-- <u-subsection :list="tabData.list" keyName="name" :current="tabData.current"
|
||||
@change="sectionChange"></u-subsection>
|
||||
<view style="height: 20rpx;"></view> -->
|
||||
<view>
|
||||
<view v-for="(item,index) in walletItems" :key="index"
|
||||
style="padding: 20rpx;background-color: #ffffff;padding: 20rpx;border-radius: 10rpx;margin-bottom: 20rpx;">
|
||||
<view class="u-flex u-flex-between u-flex-y-center">
|
||||
<view style="color: #232323;font-size: 30rpx;">
|
||||
<view class="u-flex u-flex-between">
|
||||
<view>{{config.type[item.type]}}</view>
|
||||
</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view style="color: #999999;font-size: 26rpx;">{{item.note}}</view>
|
||||
<view style="height: 16rpx;"></view>
|
||||
<view class="u-flex">
|
||||
<view>{{item.created_at}}</view>
|
||||
<view style="width: 20rpx;"></view>
|
||||
<view style="color: #909399;">{{config.status[item.status]}}</view>
|
||||
</view>
|
||||
<view style="height: 16rpx;"></view>
|
||||
</view>
|
||||
<view style="font-size: 28rpx;">
|
||||
<text v-if="item.money > 0" style="color: #FF2727;">{{item.money}}</text>
|
||||
<text v-else>{{item.money}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.admin_note">
|
||||
<u-line></u-line>
|
||||
<view style="height: 14rpx;"></view>
|
||||
<view style="font-size: 26rpx;">{{item.admin_note}}</view>
|
||||
</view>
|
||||
<view v-if="item.account">
|
||||
<u-line></u-line>
|
||||
<view style="height: 14rpx;"></view>
|
||||
<view class="u-flex u-flex-between">
|
||||
<view>{{item.account.realname}} </view>
|
||||
<view>{{item.account.mobile}} </view>
|
||||
</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>{{item.subname}}</view>
|
||||
<view>{{item.account.num}}</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>{{item.account.idcard}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore :status="loadStatus" />
|
||||
<view style="height: 400rpx;"></view>
|
||||
|
||||
<u-calendar :show="screen.showcalendar" minDate="2024-03-01" mode="range" @confirm="confirmcalendar"
|
||||
@close="screen.showcalendar = false" :showTitle="false" :defaultDate="[]"></u-calendar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
screen: {
|
||||
showcalendar: false,
|
||||
|
||||
},
|
||||
walletItems: [],
|
||||
tabData: {
|
||||
list: [{
|
||||
"name": "全部",
|
||||
"symbol": ""
|
||||
}, {
|
||||
"name": "冻结",
|
||||
"symbol": ""
|
||||
}, {
|
||||
"name": "收入",
|
||||
"symbol": "+"
|
||||
}, {
|
||||
"name": "支出",
|
||||
"symbol": "-"
|
||||
}, ],
|
||||
current: 0
|
||||
},
|
||||
|
||||
loadStatus: 'loadmore',
|
||||
search: {
|
||||
symbol: '',
|
||||
page: 1,
|
||||
status: 0,
|
||||
start_date: '',
|
||||
end_date: '',
|
||||
type: '',
|
||||
scene: '',
|
||||
},
|
||||
page: {
|
||||
current: 0,
|
||||
last_page: 1
|
||||
},
|
||||
config: null
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
self = this;
|
||||
if (option && option.status) {
|
||||
self.search.status = option.status;
|
||||
}
|
||||
self.getWalletItems();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
self.search.page = 1;
|
||||
self.walletItems = [];
|
||||
self.getWalletItems();
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!self.pageStatus()) {
|
||||
return;
|
||||
}
|
||||
self.loadStatus = 'loading';
|
||||
self.search.page = ++self.search.page;
|
||||
self.getWalletItems();
|
||||
},
|
||||
methods: {
|
||||
checktype(type) {
|
||||
if (self.search.type == type) {
|
||||
self.search.type = '';
|
||||
} else {
|
||||
self.search.type = type;
|
||||
}
|
||||
},
|
||||
checkscene(scene) {
|
||||
if (self.search.scene == scene) {
|
||||
self.search.scene = '';
|
||||
} else {
|
||||
self.search.scene = scene;
|
||||
}
|
||||
},
|
||||
confirmcalendar(e) {
|
||||
self.search.start_date = e[0];
|
||||
self.search.end_date = e[e.length - 1];
|
||||
self.screen.showcalendar = false;
|
||||
},
|
||||
sectionChange(index) {
|
||||
self.tabData.current = index;
|
||||
self.search.symbol = self.tabData.list[index].symbol;
|
||||
self.search.page = 1;
|
||||
self.walletItems = [];
|
||||
self.getWalletItems();
|
||||
},
|
||||
pageStatus() {
|
||||
self.loadStatus = 'loadmore';
|
||||
if (self.search.page >= self.page.last_page) {
|
||||
self.loadStatus = 'nomore';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
getWalletItems() {
|
||||
self.$http.get('/shop/v10/wallet/items', self.search).then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
|
||||
self.walletItems = self.walletItems.concat(data.items.data);
|
||||
self.config = data.config;
|
||||
self.page.last_page = data.items.last_page;
|
||||
self.pageStatus();
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.xkl_cur {
|
||||
border: 1px solid #26418A;
|
||||
color: #26418A;
|
||||
}
|
||||
|
||||
.xkl_no {
|
||||
border: 1px solid #999999;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.xkl-com-bg {
|
||||
min-height: 100vh;
|
||||
}
|
||||
</style>
|
||||
150
pages/wallet/recharge.vue
Normal file
150
pages/wallet/recharge.vue
Normal file
@@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="height: 100rpx;"></view>
|
||||
<view>
|
||||
<view style="font-size: 30rpx; color: #949494;">当前余额 ¥{{info.info.money}},最低充值¥{{info.recharge.min_money}}
|
||||
</view>
|
||||
<view style="height:20rpx"></view>
|
||||
<u--input :customStyle="{backgroundColor: '#ffffff'}" type="number" placeholder="请输入充值金额" border="surround"
|
||||
v-model="form.money"></u--input>
|
||||
</view>
|
||||
<view style="height: 30rpx;"></view>
|
||||
<view style="background-color: #fff; padding: 30rpx;border-radius: 10rpx;">
|
||||
<view style="font-size: 28rpx;#606266">支付方式</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<u-radio-group v-model="form.pay_type" iconPlacement="right" :borderBottom="true" placement="column">
|
||||
<u-radio :name="1">
|
||||
<view class="u-flex u-flex-y-center">
|
||||
<u-icon name="/static/icon/weixin.png" size="50rpx" />
|
||||
<view style="width: 20rpx;"></view>
|
||||
<view>
|
||||
<view style="font-size: 30rpx;">微信支付</view>
|
||||
<view style="font-size: 28rpx;color: #909399;">微信快捷支付</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
<view style="height: 100rpx;"></view>
|
||||
<u-button type="primary" @click="getRecharge">立即支付</u-button>
|
||||
<view style="height: 100rpx;"></view>
|
||||
<u-modal :show="paynoticeshow" content='未检测到支付结果, 您可以查看余额' @confirm="navback()" @close="paynoticeshow = false"
|
||||
@cancel="paynoticeshow = false" showCancelButton confirmText="查看余额" cancelText="取消"
|
||||
closeOnClickOverlay></u-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
paynoticeshow: false,
|
||||
info: {
|
||||
recharge: {
|
||||
min_money: 0
|
||||
}
|
||||
},
|
||||
current: 0,
|
||||
items: [],
|
||||
form: {
|
||||
money: '',
|
||||
pay_type: 1,
|
||||
},
|
||||
ossdata: null,
|
||||
filelist: [],
|
||||
order_no: '',
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
self = this;
|
||||
if (option && option.data) {
|
||||
self.info = JSON.parse(decodeURIComponent(option.data));
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
let options = uni.getEnterOptionsSync();
|
||||
const shop_recharge_show = uni.getStorageSync('shop_recharge_show');
|
||||
|
||||
if (options.scene == '1038' &&
|
||||
options.referrerInfo.appId == 'wxef277996acc166c3' && shop_recharge_show == 1) {
|
||||
uni.setStorageSync('shop_recharge_show', 0);
|
||||
// 代表从收银台小程序返回
|
||||
let extraData = options.referrerInfo.extraData;
|
||||
if (!extraData) {
|
||||
// "当前通过物理按键返回,未接收到返参,建议自行查询交易结果";
|
||||
self.paynoticeshow = true;
|
||||
} else {
|
||||
if (extraData.code == 'success') {
|
||||
// "支付成功";
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'none',
|
||||
duration: 3500
|
||||
});
|
||||
uni.navigateBack();
|
||||
} else if (extraData.code == 'cancel') {
|
||||
// "支付已取消";
|
||||
uni.showToast({
|
||||
title: '支付已取消',
|
||||
icon: 'none',
|
||||
duration: 3500
|
||||
})
|
||||
} else {
|
||||
// "支付失败:" + extraData.errmsg;
|
||||
uni.showToast({
|
||||
title: "支付失败:" + extraData.errmsg,
|
||||
icon: 'none',
|
||||
duration: 3500
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navback(url) {
|
||||
uni.navigateBack();
|
||||
},
|
||||
getRecharge() {
|
||||
if (self.form.money < self.info.recharge.min_money) {
|
||||
uni.showToast({
|
||||
title: `最低充值${self.info.recharge.min_money}元`,
|
||||
icon: 'none'
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
||||
uni.showLoading({
|
||||
title: '',
|
||||
mask: true
|
||||
});
|
||||
self.$http.post('/shop/v10/wallet/recharge', self.form).then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
uni.hideLoading();
|
||||
self.order_no = data.extraData.reqsn;
|
||||
uni.openEmbeddedMiniProgram({
|
||||
appId: data.appid,
|
||||
extraData: data.extraData,
|
||||
success(res) {
|
||||
// 打开成功
|
||||
uni.setStorageSync('shop_recharge_show', 1);
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.xkl-no {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
.xkl-cur {
|
||||
background-color: #2CCE7F;
|
||||
color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
165
pages/wallet/temp.vue
Normal file
165
pages/wallet/temp.vue
Normal file
@@ -0,0 +1,165 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="background-color: #ffffff;padding: 30rpx;border-radius: 10rpx;font-size: 30rpx; color: #949494;">
|
||||
当前余额
|
||||
¥{{info.info.money}},最低转赠¥{{info.recharge.min_money}}
|
||||
</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="background-color: #ffffff;padding: 30rpx;border-radius: 10rpx;">
|
||||
<u--form labelPosition="top" :model="form" :rules="rules" ref="uForm" labelWidth="300rpx">
|
||||
<u-form-item label="转赠金额" prop="money" borderBottom>
|
||||
<u--input v-model="form.money" type="number" placeholder="请输入转赠金额" border="none"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="转赠给(用户名)" prop="username" borderBottom>
|
||||
<u-input v-model="form.username" placeholder="请输入用户名" border="none" />
|
||||
</u-form-item>
|
||||
<u-form-item label="手机号">
|
||||
<u-input v-model="info.info.mobile" disabled placeholder="" />
|
||||
</u-form-item>
|
||||
<u-form-item label="验证码" prop="code" borderBottom>
|
||||
<u-code-input v-model="form.code" :maxlength="4" mode="line"></u-code-input>
|
||||
<view slot="right">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<u-code :seconds="code.seconds" @end="end" @start="start" ref="uCode"
|
||||
@change="codeChange"></u-code>
|
||||
<u-button type="primary" @tap="getCode">{{code.tips}}</u-button>
|
||||
</view>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
</view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view style="background-color: #ffffff;border-radius: 12rpx;padding: 30rpx;">
|
||||
<view style="color: #f29100;">温馨提示</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view style="font-size: 28rpx;color: #909399;">
|
||||
<view>1.只能转赠给团队成员(直线上级、直线下级);</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>2.转赠金额实时到账,不扣手续费;</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>3.转赠成功后实时生效,不支持撤回。</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 100rpx;"></view>
|
||||
<u-button type="primary" @click="submit">确认</u-button>
|
||||
<view style="height: 100rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
info: {
|
||||
recharge: {
|
||||
min_money: 0
|
||||
}
|
||||
},
|
||||
current: 0,
|
||||
items: [],
|
||||
form: {
|
||||
money: '',
|
||||
username: '',
|
||||
mobile: '',
|
||||
code: ''
|
||||
},
|
||||
rules: {
|
||||
money: [{
|
||||
required: true,
|
||||
message: '请输入转赠金额',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
username: [{
|
||||
required: true,
|
||||
message: '请输入用户名',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
code: [{
|
||||
required: true,
|
||||
message: '请输入验证码',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
},
|
||||
code: {
|
||||
tips: '获取验证码',
|
||||
// refCode: null,
|
||||
seconds: 60,
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
self = this;
|
||||
if (option && option.data) {
|
||||
self.info = JSON.parse(decodeURIComponent(option.data));
|
||||
}
|
||||
|
||||
},
|
||||
onReady() {
|
||||
//onReady 为uni-app支持的生命周期之一
|
||||
self.$refs.uForm.setRules(self.rules)
|
||||
},
|
||||
methods: {
|
||||
codeChange(text) {
|
||||
self.code.tips = text;
|
||||
},
|
||||
getCode() {
|
||||
if (self.info.info.mobile.length != 11) {
|
||||
uni.$u.toast('请输入手机号');
|
||||
return;
|
||||
}
|
||||
if (self.$refs.uCode.canGetCode) {
|
||||
// 模拟向后端请求验证码
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码'
|
||||
})
|
||||
self.$http.get('/com/sms/sendcode', {
|
||||
mobile: self.info.info.mobile
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
uni.hideLoading();
|
||||
// 这里此提示会被this.start()方法中的提示覆盖
|
||||
uni.$u.toast('验证码已发送,有效期5分钟');
|
||||
// 通知验证码组件内部开始倒计时
|
||||
self.$refs.uCode.start();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.$u.toast('倒计时结束后再发送');
|
||||
}
|
||||
},
|
||||
end() {
|
||||
//uni.$u.toast('倒计时结束');
|
||||
},
|
||||
start() {
|
||||
//uni.$u.toast('倒计时开始');
|
||||
},
|
||||
submit() {
|
||||
this.$refs.uForm.validate().then(res => {
|
||||
self.$http.post('/shop/v10/wallet/temp', self.form).then(({
|
||||
data,
|
||||
success
|
||||
}) => {
|
||||
if (success) {
|
||||
uni.navigateBack();
|
||||
}
|
||||
})
|
||||
}).catch(errors => {
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.xkl-no {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
.xkl-cur {
|
||||
background-color: #2CCE7F;
|
||||
color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
286
pages/wallet/withdraw.vue
Normal file
286
pages/wallet/withdraw.vue
Normal file
@@ -0,0 +1,286 @@
|
||||
<template>
|
||||
<view class="xkl-com-bg">
|
||||
<view style="height: 20rpx"></view>
|
||||
<view style="font-size: 30rpx; color: #232323">可提现 ¥{{ money }}</view>
|
||||
<view style="height: 20rpx"></view>
|
||||
<view style="background-color: #ffffff; border-radius: 12rpx; padding: 30rpx">
|
||||
<u--form labelPosition="top" :model="form" :rules="rules" ref="uForm" errorType="border-bottom" labelWidth="300rpx">
|
||||
<u-form-item label="提现金额" prop="money" borderBottom>
|
||||
<u--input v-model="form.money" type="number" placeholder="请输入提现金额" border="none"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="手机号">
|
||||
<u-input v-model="shopinfo.mobile" disabled placeholder="" />
|
||||
</u-form-item>
|
||||
<u-form-item label="验证码" prop="code" borderBottom>
|
||||
<u-code-input v-model="form.code" :maxlength="4" mode="line"></u-code-input>
|
||||
<view slot="right">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<u-code :seconds="code.seconds" @end="end" @start="start" ref="uCode" @change="codeChange"></u-code>
|
||||
<u-button type="primary" @tap="getCode">{{ code.tips }}</u-button>
|
||||
</view>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<view style="height: 30rpx"></view>
|
||||
<view style="color: #f29100">提现须知</view>
|
||||
<view style="height: 10rpx"></view>
|
||||
<view style="font-size: 28rpx; color: #909399">
|
||||
<view>1.最低提现{{ w.min_money }}元,100的倍数,单人单月限额9万;</view>
|
||||
<view style="height: 10rpx"></view>
|
||||
<view>2.根据国家税务标准,提现申请发起规则如下:</view>
|
||||
<view style="height: 30rpx"></view>
|
||||
<view class="listTable">
|
||||
<scroll-view class="scroll-view_H" scroll-x="true">
|
||||
<view class="listTable_header">
|
||||
<view v-for="(item,inde) in list_table" :key="index">{{item.title}}</view>
|
||||
</view>
|
||||
<view class="listTable_header" v-for="(item,inde) in list_data" :key="index">
|
||||
<view>{{item.arrive_day}}号{{item.arrive_day == 30 || item.arrive_day == 31 ? '(月底)' : ''}}到账</view>
|
||||
<view>{{item.apply_min}}号-{{item.apply_max}}号{{item.end_hour}}:00</view>
|
||||
<view>{{item.fee}}%</view>
|
||||
</view>
|
||||
<view class="listTable_header" style="width: 632rpx;border: 1rpx solid #ccc;padding: 10rpx 10rpx;">
|
||||
每个自然日的9号、10号、19号、20号以及月底(当月最后两天)发起的提现申请都将会被驳回,此类发起提现用户需在下一个提现申请窗口期内,再次提交提现申请,才会被受理处理。
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view style="height: 30rpx"></view>
|
||||
<view>3.若提现申请发起日和财务付款日系节假日等非工作日的,则处理日期将顺延至下一个工作日进行。</view>
|
||||
|
||||
<!-- <view>2.根据国家税务标准,提现征收{{w.fee}}%的手续费;</view>
|
||||
<view style="height: 10rpx;"></view>
|
||||
<view>3.到账时间T+1,到账金额(提现金额 - 手续费)。</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<u-divider text="选择银行卡"></u-divider>
|
||||
<u-button @click="tochard">添加银行卡</u-button>
|
||||
<view style="height: 20rpx"></view>
|
||||
<view
|
||||
@click="check(item)"
|
||||
v-for="(item, index) in items"
|
||||
:key="index"
|
||||
:class="item.id == form.acc_id ? 'xkl_cur' : 'xkl_no'"
|
||||
style="background-color: #ffffff; border-radius: 12rpx; padding: 20rpx; margin-bottom: 20rpx"
|
||||
>
|
||||
<view class="u-flex u-flex-y-center" style="font-size: 28rpx">
|
||||
<view>
|
||||
<u-tag :text="config.role[item.role]" size="mini" type="success" plain plainFill></u-tag>
|
||||
</view>
|
||||
<view style="width: 30rpx"></view>
|
||||
<view style="font-size: 26rpx">{{ item.realname }}</view>
|
||||
<view style="width: 30rpx"></view>
|
||||
<view style="font-size: 26rpx">{{ item.mobile }}</view>
|
||||
</view>
|
||||
<view style="height: 20rpx"></view>
|
||||
<view style="color: #232323">
|
||||
<view style="font-size: 28rpx">{{ item.subname }}</view>
|
||||
<view style="font-size: 28rpx">{{ item.num }}</view>
|
||||
<view style="height: 10rpx"></view>
|
||||
<view style="font-size: 28rpx">{{ item.idcard }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 30rpx"></view>
|
||||
<u-button @click="withdraw()" type="primary">提交申请</u-button>
|
||||
<view style="height: 100rpx"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let self;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
items: [],
|
||||
config: null,
|
||||
form: {
|
||||
money: '',
|
||||
acc_id: '',
|
||||
code: ''
|
||||
},
|
||||
shopinfo: {
|
||||
mobile: ''
|
||||
},
|
||||
w: {
|
||||
day: '',
|
||||
min_money: ''
|
||||
},
|
||||
money: 0,
|
||||
rules: {
|
||||
money: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入提现金额',
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
],
|
||||
code: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入验证码',
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
]
|
||||
},
|
||||
code: {
|
||||
tips: '获取验证码',
|
||||
// refCode: null,
|
||||
seconds: 60
|
||||
},
|
||||
list_table: [
|
||||
{ title: '计划到账时间', name: 'arrive_day' },
|
||||
{ title: '提现-申请时间', name: 'apply_min' },
|
||||
// { title: '最晚申请', name: 'apply_max' },
|
||||
{ title: '提现-手续费', name: 'fee' }
|
||||
],
|
||||
list_data:[]
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
self = this;
|
||||
if (option && option.id) {
|
||||
self.form.acc_id = option.id;
|
||||
}
|
||||
self.shopinfo = self.$store.state.auth.user;
|
||||
this.tableList()
|
||||
},
|
||||
onShow() {
|
||||
self.getAccountItems();
|
||||
},
|
||||
onReady() {
|
||||
//onReady 为uni-app支持的生命周期之一
|
||||
self.$refs.uForm.setRules(self.rules);
|
||||
},
|
||||
methods: {
|
||||
tableList(){
|
||||
self.$http.get('/shop/v10/withdraw_config/items', self.form).then(({ data, success, msg }) => {
|
||||
if (success) {
|
||||
this.list_data = data
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: msg,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
codeChange(text) {
|
||||
self.code.tips = text;
|
||||
},
|
||||
getCode() {
|
||||
if (self.shopinfo.mobile.length != 11) {
|
||||
uni.$u.toast('请输入手机号');
|
||||
return;
|
||||
}
|
||||
if (self.$refs.uCode.canGetCode) {
|
||||
// 模拟向后端请求验证码
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码'
|
||||
});
|
||||
self.$http
|
||||
.get('/com/sms/sendcode', {
|
||||
mobile: self.shopinfo.mobile
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
uni.hideLoading();
|
||||
// 这里此提示会被this.start()方法中的提示覆盖
|
||||
uni.$u.toast('验证码已发送,有效期5分钟');
|
||||
// 通知验证码组件内部开始倒计时
|
||||
self.$refs.uCode.start();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.$u.toast('倒计时结束后再发送');
|
||||
}
|
||||
},
|
||||
end() {
|
||||
//uni.$u.toast('倒计时结束');
|
||||
},
|
||||
start() {
|
||||
//uni.$u.toast('倒计时开始');
|
||||
},
|
||||
tochard() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/wallet/account/index?show=1'
|
||||
});
|
||||
},
|
||||
check(item) {
|
||||
self.form.acc_id = item.id;
|
||||
},
|
||||
withdraw() {
|
||||
this.$refs.uForm
|
||||
.validate()
|
||||
.then((res) => {
|
||||
self.$http.get('/shop/v10/wallet/withdraw', self.form).then(({ data, success, msg }) => {
|
||||
if (success) {
|
||||
uni.navigateBack();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: msg,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch((errors) => {
|
||||
uni.$u.toast(errors[0].message);
|
||||
});
|
||||
},
|
||||
getAccountItems() {
|
||||
self.$http.get('/shop/v10/account/items').then(({ data, success }) => {
|
||||
self.items = data.items;
|
||||
self.config = data.config;
|
||||
self.w = data.shop_withdraw;
|
||||
self.money = data.money;
|
||||
|
||||
if (data.items.length) {
|
||||
self.form.acc_id = data.items[0].id;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.xkl_cur {
|
||||
border: 1px solid #71d5a1;
|
||||
}
|
||||
|
||||
.xkl_no {
|
||||
border: 1px solid #ffffff;
|
||||
}
|
||||
|
||||
.scroll-view_H {
|
||||
white-space: normal;
|
||||
width: 100%;
|
||||
}
|
||||
.scroll-view-item_H {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 300rpx;
|
||||
line-height: 300rpx;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.listTable {
|
||||
width: 100%;
|
||||
&_header {
|
||||
width: 631rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
font-size: 26rpx;
|
||||
view{
|
||||
// min-width: 220rpx;
|
||||
flex: 1;
|
||||
padding: 10rpx 0rpx;
|
||||
text-align: center;
|
||||
border: 1rpx solid #ccc;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user