[更新发现]
This commit is contained in:
@@ -49,8 +49,7 @@ const sign = id => {
|
|||||||
// 物流查询
|
// 物流查询
|
||||||
const logistic = id => {
|
const logistic = id => {
|
||||||
return request({
|
return request({
|
||||||
url: 'mall/orders/' + id + '/logistic',
|
url: 'mall/orders/' + id + '/logistic'
|
||||||
method: 'PUT'
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { request } from '../index'
|
|||||||
// 用户
|
// 用户
|
||||||
const info = () =>{
|
const info = () =>{
|
||||||
return request({
|
return request({
|
||||||
url: 'user/info'
|
url: 'user'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,10 +50,39 @@ const securityCheck = (password) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 钱包私钥
|
||||||
|
const privatekey = (code) => {
|
||||||
|
return request({
|
||||||
|
url : "chain/safe/private_key",
|
||||||
|
data: {
|
||||||
|
code
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 私钥规则
|
||||||
|
const keyrules = () => {
|
||||||
|
return request({
|
||||||
|
url: 'cms/keyrules'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改密码
|
||||||
|
const securityReset = (data) => {
|
||||||
|
return request({
|
||||||
|
url : "chain/safe/security",
|
||||||
|
method: 'PUT',
|
||||||
|
data:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
security,
|
security,
|
||||||
seed,
|
seed,
|
||||||
sum,
|
sum,
|
||||||
logs,
|
logs,
|
||||||
securityCheck
|
securityCheck,
|
||||||
|
privatekey,
|
||||||
|
keyrules,
|
||||||
|
securityReset
|
||||||
}
|
}
|
||||||
|
|||||||
24
pages.json
24
pages.json
@@ -332,11 +332,33 @@
|
|||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
},{
|
||||||
|
"path": "pages/service/index",
|
||||||
|
"name": "serviceIndex",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
},{
|
},{
|
||||||
"path": "pages/service/details",
|
"path": "pages/service/details",
|
||||||
"name": "serviceDetails",
|
"name": "serviceDetails",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": ""
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"path": "pages/wallet/privatekey",
|
||||||
|
"name": "WalletPrivatekey",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "钱包私钥",
|
||||||
|
"navigationBarBackgroundColor":"#FFFFFF",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"path": "pages/wallet/resetPassword",
|
||||||
|
"name": "ResetPassword",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "修改钱包密码",
|
||||||
"navigationBarBackgroundColor":"#FFFFFF",
|
"navigationBarBackgroundColor":"#FFFFFF",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,6 +54,14 @@
|
|||||||
page : 1
|
page : 1
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
if(this.$store.getters.getRefresh == 1) {
|
||||||
|
this.$store.commit('setRefresh', 0)
|
||||||
|
this.array = []
|
||||||
|
this.page = 1
|
||||||
|
this.getOrder()
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getOrder()
|
this.getOrder()
|
||||||
},
|
},
|
||||||
@@ -87,8 +95,65 @@
|
|||||||
this.getOrder()
|
this.getOrder()
|
||||||
},
|
},
|
||||||
onType(e){
|
onType(e){
|
||||||
console.log(e)
|
let orderNo = e.order.no
|
||||||
console.log(e.type)
|
let onFount
|
||||||
|
|
||||||
|
switch (e.type){
|
||||||
|
case 'delete':
|
||||||
|
onFount = del(orderNo)
|
||||||
|
break;
|
||||||
|
case 'cancel':
|
||||||
|
onFount = cancel(orderNo)
|
||||||
|
break;
|
||||||
|
case 'logistic':
|
||||||
|
this.$Router.push({
|
||||||
|
name: 'OrderLogistics',
|
||||||
|
params: {
|
||||||
|
orderNo
|
||||||
|
},
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 'pay':
|
||||||
|
this.$Router.push({
|
||||||
|
name: 'Pay',
|
||||||
|
params: {
|
||||||
|
orderNo : orderNo,
|
||||||
|
price : e.order.price,
|
||||||
|
oepnType: 'order'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 'sign':
|
||||||
|
onFount = sign(orderNo)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!onFount) return
|
||||||
|
|
||||||
|
onFount.then(res =>{
|
||||||
|
let orderIndex = this.array.findIndex(val => val.no === e.order.no)
|
||||||
|
if(e.type === 'delete' || e.type === 'sign'){
|
||||||
|
this.array.splice(orderIndex, 1)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(e.type === 'cancel'){
|
||||||
|
this.array.splice(orderIndex, 1, {
|
||||||
|
no : res.order_no,
|
||||||
|
cover : res.items[0].sku.cover,
|
||||||
|
name : res.items[0].sku.goods_name,
|
||||||
|
price : res.items[0].price,
|
||||||
|
sum : res.items[0].qty,
|
||||||
|
stateText : res.state,
|
||||||
|
cans : res.can
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
|
|||||||
38
pages/order/logistics.vue
Normal file
38
pages/order/logistics.vue
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<oct-logistics
|
||||||
|
:info="info"
|
||||||
|
:logs="logs"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { logistic } from '@/apis/interfaces/order'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
info: {},
|
||||||
|
logs: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
logistic(this.$Route.query.orderNo).then(res =>{
|
||||||
|
console.log(res)
|
||||||
|
this.info = {
|
||||||
|
logo : res.orderExpress.logistic_cover,
|
||||||
|
no : res.orderExpress.express_no,
|
||||||
|
company : res.orderExpress.logistic_name
|
||||||
|
}
|
||||||
|
this.logs = res.logistics
|
||||||
|
}).catch(err =>{
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style></style>
|
||||||
@@ -69,12 +69,16 @@
|
|||||||
orderInfo,
|
orderInfo,
|
||||||
success: payRes => {
|
success: payRes => {
|
||||||
console.log(payRes)
|
console.log(payRes)
|
||||||
|
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '支付成功',
|
title: '支付成功',
|
||||||
content: '订单已支付,我们将尽快为您安排发货,可在订单管理查询订单动态',
|
content: '订单已支付,我们将尽快为您安排发货,可在订单管理查询订单动态',
|
||||||
showCancel:false,
|
showCancel:false,
|
||||||
success:onRes => {
|
success:onRes => {
|
||||||
if(onRes.confirm){
|
if(onRes.confirm){
|
||||||
|
if(this.$Route.query.oepnType === 'order'){
|
||||||
|
this.$store.commit('setRefresh', 1)
|
||||||
|
}
|
||||||
this.$Router.back()
|
this.$Router.back()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
direction="column"
|
direction="column"
|
||||||
></u-notice-bar>
|
></u-notice-bar>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn">开通</view>
|
<view class="btn" @click="openVip">开通</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 健康数据 -->
|
<!-- 健康数据 -->
|
||||||
<view class="health-flex">
|
<view class="health-flex">
|
||||||
@@ -84,8 +84,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 功能块 -->
|
<!-- 功能块 -->
|
||||||
<view class="btns-box">
|
<view class="btns-box">
|
||||||
<view class="btns-box-item" @click="$Router.push({name: 'WalletAdd'})">
|
<!-- <view class="btns-box-item" @click="$Router.push({name: 'WalletAdd'})">
|
||||||
<image class="icon" src="@/static/user/userIcon_00.png" mode="widthFix"></image>
|
<image class="icon" src="@/static/user/icon_00.png" mode="widthFix"></image>
|
||||||
ZH钱包(首次)
|
ZH钱包(首次)
|
||||||
<uni-icons class="forward" type="forward" color="#999"></uni-icons>
|
<uni-icons class="forward" type="forward" color="#999"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
@@ -93,6 +93,11 @@
|
|||||||
<image class="icon" src="@/static/user/userIcon_01.png" mode="widthFix"></image>
|
<image class="icon" src="@/static/user/userIcon_01.png" mode="widthFix"></image>
|
||||||
ZH钱包(钱包)
|
ZH钱包(钱包)
|
||||||
<uni-icons class="forward" type="forward" color="#999"></uni-icons>
|
<uni-icons class="forward" type="forward" color="#999"></uni-icons>
|
||||||
|
</view> -->
|
||||||
|
<view class="btns-box-item" @click="onWallet">
|
||||||
|
<image class="icon" src="@/static/user/userIcon_00.png" mode="widthFix"></image>
|
||||||
|
ZH钱包
|
||||||
|
<uni-icons class="forward" type="forward" color="#999"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="btns-box-item">
|
<view class="btns-box-item">
|
||||||
<image class="icon" src="@/static/user/userIcon_02.png" mode="widthFix"></image>
|
<image class="icon" src="@/static/user/userIcon_02.png" mode="widthFix"></image>
|
||||||
@@ -117,6 +122,10 @@
|
|||||||
<uni-icons class="forward" type="forward" color="#999"></uni-icons>
|
<uni-icons class="forward" type="forward" color="#999"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="footer-text">
|
||||||
|
<view>ZH生态俱乐部</view>
|
||||||
|
<view>All Rights Reserved. ZH Eco Club</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -141,12 +150,36 @@
|
|||||||
getInfo(){
|
getInfo(){
|
||||||
if(this.$store.state.token === '') return
|
if(this.$store.state.token === '') return
|
||||||
info().then(res => {
|
info().then(res => {
|
||||||
|
console.log(res)
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: res.nickname
|
title: res.nickname
|
||||||
})
|
})
|
||||||
|
|
||||||
this.userInfo = res
|
this.userInfo = res
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 开通会员
|
||||||
|
openVip(){
|
||||||
|
if(this.$store.state.token === ''){
|
||||||
|
this.Login()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
console.log("开通会员")
|
||||||
|
},
|
||||||
|
// 开通钱包
|
||||||
|
onWallet(){
|
||||||
|
if(this.$store.state.token === ''){
|
||||||
|
this.Login()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(this.userInfo.is_wallet) this.$Router.push({name: 'WalletProperty'})
|
||||||
|
else this.$Router.push({name: 'WalletAdd'})
|
||||||
|
},
|
||||||
// 登录
|
// 登录
|
||||||
Login(){
|
Login(){
|
||||||
const Auth = new userAuth()
|
const Auth = new userAuth()
|
||||||
@@ -165,6 +198,13 @@
|
|||||||
background: $window-color;
|
background: $window-color;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
// 版权信息
|
||||||
|
.footer-text{
|
||||||
|
text-align: center;
|
||||||
|
font-size: $title-size-sm;
|
||||||
|
padding: $padding $padding $padding*2;
|
||||||
|
color: $text-gray-m;
|
||||||
|
}
|
||||||
// 用户信息
|
// 用户信息
|
||||||
.info-box{
|
.info-box{
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 按钮 -->
|
<!-- 按钮 -->
|
||||||
<view class="buttons">
|
<view class="buttons">
|
||||||
<button type="default" form-type="submit" @click="createWallet">确认</button>
|
<button type="default" form-type="submit" @click="createWallet">确认激活</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -50,10 +50,7 @@ export default {
|
|||||||
code: Number(this.password)
|
code: Number(this.password)
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.$Router.replace({
|
this.$Router.replace({
|
||||||
name: 'WalletMnemonic',
|
name: 'WalletProperty'
|
||||||
params: {
|
|
||||||
code: this.password
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<!-- 按钮 -->
|
<!-- 按钮 -->
|
||||||
<view class="buttons">
|
<view class="buttons">
|
||||||
<view class="text">注:助记词是用户账户的唯一标识,不能分享给他人,掌握该助记词即可控制该账户与钱包</view>
|
<view class="text">注:助记词是用户账户的唯一标识,不能分享给他人,掌握该助记词即可控制该账户与钱包</view>
|
||||||
<button type="default" @click="goto">验证助记词</button>
|
<!-- <button type="default" @click="goto">验证助记词</button> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -19,18 +19,14 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
mnemonic: [], // 助记词
|
mnemonic: []
|
||||||
sign : '' // 校验签名
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.$Route.query.code
|
|
||||||
seed({
|
seed({
|
||||||
code: 123456
|
code: this.$Route.query.password
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
|
||||||
this.mnemonic = res.seed.split(' ')
|
this.mnemonic = res.seed.split(' ')
|
||||||
this.sign = res.sign
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<view>
|
<view>
|
||||||
<!-- 私钥 -->
|
<!-- 私钥 -->
|
||||||
<view class="keys">
|
<view class="keys">
|
||||||
<view class="title">您已接收OC Chain托管</view>
|
<view class="title">您的ZH托管钱包</view>
|
||||||
<view class="key">{{key || '-'}}</view>
|
<view class="key">{{key || '-'}}</view>
|
||||||
<view class="copykey" @click="copykey">复制我的私钥</view>
|
<view class="copykey" @click="copykey">复制我的私钥</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -14,9 +14,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 免责说明 -->
|
<!-- 免责说明 -->
|
||||||
<view class="liability">
|
<!-- <view class="liability">
|
||||||
<navigator url="/pages/wallet/cmsWithDraw">免责条款</navigator>
|
<navigator url="/pages/wallet/cmsWithDraw">免责条款</navigator>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -26,15 +26,26 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
key: "",
|
key: "",
|
||||||
rules: []
|
rules: [
|
||||||
|
{
|
||||||
|
title: "什么是托管钱包?",
|
||||||
|
description: "托管钱包顾名思义就是用户把私钥和数字资产委托给其他机构管理,也就是就是通过中心化的方式安全管理并保存资产,本质上是与区块链所追求的去中心化相背离的。"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "什么是钱包私钥?",
|
||||||
|
description: "作为管理和使用加密货币最关键的东西,私钥对所有数字货币用户而言具有所有权,拥有私钥才能支配相应的加密资产。"
|
||||||
|
}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
Promise.all([privatekey(this.$Route.query.password), keyrules()]).then(res => {
|
privatekey(this.$Route.query.password).then(res => {
|
||||||
let privatekey = res[0],
|
this.key = res.private_key
|
||||||
keyrules = res[1]
|
}).catch(err => {
|
||||||
this.key = privatekey.private_key
|
uni.showToast({
|
||||||
this.rules = keyrules
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
@@ -63,11 +74,11 @@
|
|||||||
.key{
|
.key{
|
||||||
padding: $padding * 2 0;
|
padding: $padding * 2 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: $mian-color;
|
color: $main-color;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
.copykey{
|
.copykey{
|
||||||
background-color: $mian-color;
|
background-color: $main-color;
|
||||||
color: white;
|
color: white;
|
||||||
height: 95rpx;
|
height: 95rpx;
|
||||||
line-height: 95rpx;
|
line-height: 95rpx;
|
||||||
@@ -88,7 +99,7 @@
|
|||||||
font-size: $title-size + 2;
|
font-size: $title-size + 2;
|
||||||
}
|
}
|
||||||
.content{
|
.content{
|
||||||
color: $text-gray-lg;
|
color: $text-gray;
|
||||||
font-size: $title-size-m;
|
font-size: $title-size-m;
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
logs : [],
|
logs : [],
|
||||||
logsType : 0,
|
logsType : 0,
|
||||||
password : '',
|
password : '',
|
||||||
passwordShow : true,
|
passwordShow : false,
|
||||||
passwordPages: ''
|
passwordPages: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -90,17 +90,18 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
securityCheck(this.password).then(res => {
|
securityCheck(this.password).then(res => {
|
||||||
|
switch (this.passwordPages){
|
||||||
|
case 'privatekey':
|
||||||
|
this.$Router.push({name:'WalletPrivatekey', params: {password: this.password}})
|
||||||
|
break;
|
||||||
|
case 'ResetPassword':
|
||||||
|
this.$Router.push({name:'ResetPassword', params: {password: this.password}})
|
||||||
|
break;
|
||||||
|
case 'WalletMnemonic':
|
||||||
|
this.$Router.push({name:'WalletMnemonic', params: {password: this.password}})
|
||||||
|
break;
|
||||||
|
}
|
||||||
this.resetPassword()
|
this.resetPassword()
|
||||||
console.log("密码验证通过")
|
|
||||||
|
|
||||||
// switch (this.passwordPages){
|
|
||||||
// case 'privatekey':
|
|
||||||
// this.$Router.push({name:'Privatekey', params: {password: this.password}})
|
|
||||||
// break;
|
|
||||||
// case 'resetPassword':
|
|
||||||
// this.$Router.push({name:'ResetPassword', params: {password: this.password}})
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
@@ -145,18 +146,11 @@
|
|||||||
itemList: ['导出助记词', '修改密码'],
|
itemList: ['导出助记词', '修改密码'],
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
switch (res.tapIndex) {
|
switch (res.tapIndex) {
|
||||||
case 0:
|
case 0:
|
||||||
this.$Router.push({
|
this.showPrivatekey('WalletMnemonic')
|
||||||
name: 'Transfer'
|
|
||||||
})
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
this.$Router.push({
|
this.showPrivatekey('ResetPassword')
|
||||||
name: 'WalletCode'
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
this.showPrivatekey('resetPassword')
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
@@ -270,7 +264,7 @@
|
|||||||
color: $main-color;
|
color: $main-color;
|
||||||
margin: 0 $margin;
|
margin: 0 $margin;
|
||||||
border-radius: $radius-m;
|
border-radius: $radius-m;
|
||||||
font-size: $title-size;
|
font-size: $title-size-lg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,30 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<!-- 设置钱包密码 -->
|
<!-- 设置钱包密码 -->
|
||||||
<view class="password">
|
<view class="password">
|
||||||
<view class="prompt">请设置6位数字密码。建议不要使用连续的数字。</view>
|
<view class="prompt">请设置6位数字密码,建议不要使用连续的数字</view>
|
||||||
<view class="group">
|
<view class="group">
|
||||||
<view class="inputs">
|
<view class="inputs">
|
||||||
<label>密码</label>
|
<input type="digit" password v-model="password" maxlength="6" placeholder="请设置密码" />
|
||||||
<input type="digit" v-model="password" maxlength="6" password placeholder="请设置新密码" />
|
</view>
|
||||||
</view>
|
<view class="inputs">
|
||||||
<view class="inputs">
|
<input type="digit" password v-model="verify" maxlength="6" placeholder="请确认密码" />
|
||||||
<label>确认密码</label>
|
</view>
|
||||||
<input type="digit" v-model="verify" maxlength="6" password placeholder="请确认新密码" />
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<!-- 按钮 -->
|
||||||
</view>
|
<view class="buttons">
|
||||||
<!-- 按钮 -->
|
<button type="default" form-type="submit" @click="createWallet">确认修改</button>
|
||||||
<view class="buttons">
|
</view>
|
||||||
<button type="default" form-type="submit" @click="createWallet">确认</button>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import { securityReset } from '@/apis/interfaces/wallet'
|
||||||
securityReset
|
|
||||||
} from '@/apis/interfaces/wallet'
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -37,7 +33,7 @@
|
|||||||
this.oldPassword = this.$Route.query.password
|
this.oldPassword = this.$Route.query.password
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 激活钱包
|
// 修改密码
|
||||||
createWallet() {
|
createWallet() {
|
||||||
if (this.password === '' || this.verify === '') {
|
if (this.password === '' || this.verify === '') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -52,10 +48,10 @@
|
|||||||
title: '两次输入密码不一致'
|
title: '两次输入密码不一致'
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
securityReset({
|
securityReset({
|
||||||
new_code: this.password,
|
new_code: this.password,
|
||||||
old_code: this.oldPassword
|
code: this.oldPassword
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -76,75 +72,69 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
// 副标题
|
// 副标题
|
||||||
.sub-title {
|
.sub-title {
|
||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: $margin * 2 $margin;
|
margin: $margin * 2 $margin;
|
||||||
font-size: $title-size-m;
|
font-size: $title-size-m;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置密码
|
// 设置密码
|
||||||
.password {
|
.password {
|
||||||
padding: 0 $padding * 2;
|
padding: 0 $padding * 2;
|
||||||
|
.prompt {
|
||||||
.prompt {
|
margin-top: $margin * 2;
|
||||||
margin-top: $margin * 2;
|
font-size: $title-size-m;
|
||||||
font-size: $title-size-m;
|
color: $main-color;
|
||||||
color: $mian-color;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.group {
|
.group {
|
||||||
margin-top: $margin;
|
padding-top: $padding;
|
||||||
border-radius: $radius-m;
|
.inputs {
|
||||||
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
|
padding: 10rpx $padding + 10;
|
||||||
background-color: white;
|
margin-top: $margin;
|
||||||
|
border-radius: $radius-m;
|
||||||
.inputs {
|
background-color: $window-color;
|
||||||
padding: $padding $padding + 10;
|
&:last-child {
|
||||||
border-bottom: solid 1rpx $border-color;
|
border-bottom: none;
|
||||||
|
}
|
||||||
&:last-child {
|
input {
|
||||||
border-bottom: none;
|
height: 70rpx;
|
||||||
}
|
line-height: 70rpx;
|
||||||
|
font-size: $title-size-lg;
|
||||||
label {
|
text-align: center;
|
||||||
color: $text-gray;
|
}
|
||||||
font-size: $title-size-m;
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
input {
|
|
||||||
height: 70rpx;
|
// 按钮
|
||||||
line-height: 70rpx;
|
.buttons {
|
||||||
font-size: $title-size;
|
padding: $padding * 2;
|
||||||
}
|
.text {
|
||||||
}
|
text-align: center;
|
||||||
}
|
line-height: 90rpx;
|
||||||
}
|
height: 90rpx;
|
||||||
|
margin-bottom: $margin * 2;
|
||||||
// 按钮
|
font-size: $title-size-lg;
|
||||||
.buttons {
|
color: $main-color;
|
||||||
padding: $padding * 2;
|
font-weight: bold;
|
||||||
|
}
|
||||||
.text {
|
|
||||||
text-align: center;
|
button {
|
||||||
line-height: 90rpx;
|
height: 90rpx;
|
||||||
height: 90rpx;
|
line-height: 90rpx;
|
||||||
margin-bottom: $margin * 2;
|
background-color: $main-color;
|
||||||
font-size: $title-size-lg;
|
border-radius: $radius-m;
|
||||||
color: $mian-color;
|
color: white;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
font-size: $title-size;
|
||||||
|
&::after{
|
||||||
button {
|
display: none;
|
||||||
height: 90rpx;
|
}
|
||||||
line-height: 90rpx;
|
}
|
||||||
background-color: $mian-color;
|
}
|
||||||
border-radius: $radius-lg;
|
|
||||||
color: white;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: $title-size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ Vue.use(Vuex)
|
|||||||
export default new Vuex.Store({
|
export default new Vuex.Store({
|
||||||
state: {
|
state: {
|
||||||
token : uni.getStorageSync('token') || '',
|
token : uni.getStorageSync('token') || '',
|
||||||
address : {}
|
address : {},
|
||||||
|
refresh : 0
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
getToken: state => {
|
getToken: state => {
|
||||||
@@ -21,6 +22,9 @@ export default new Vuex.Store({
|
|||||||
},
|
},
|
||||||
getAddress: state => {
|
getAddress: state => {
|
||||||
return state.address
|
return state.address
|
||||||
|
},
|
||||||
|
getRefresh: state => {
|
||||||
|
return state.refresh
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
@@ -30,6 +34,9 @@ export default new Vuex.Store({
|
|||||||
},
|
},
|
||||||
setAddress(state, value) {
|
setAddress(state, value) {
|
||||||
state.address = value
|
state.address = value
|
||||||
|
},
|
||||||
|
setRefresh(state, value) {
|
||||||
|
state.refresh = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
0
uni_modules/oct-logistics/changelog.md
Normal file
0
uni_modules/oct-logistics/changelog.md
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
<template>
|
||||||
|
<view class="">
|
||||||
|
<view class="logistics--header">
|
||||||
|
<image class="logo" :src="info.logo" mode="aspectFill"></image>
|
||||||
|
<view class="info">
|
||||||
|
<view class="info--company">快递公司:{{info.company}}</view>
|
||||||
|
<view class="info--no" @click="copyNo">{{info.no}}<text>复制</text></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="logistics--logs">
|
||||||
|
<block v-for="(log, logIndex) in logs" :key="logIndex">
|
||||||
|
<view class="item">
|
||||||
|
<view class="">{{log.status}}</view>
|
||||||
|
<view class="">{{log.time}}</view>
|
||||||
|
<view class="">{{log.context}}</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default{
|
||||||
|
props: {
|
||||||
|
logs: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
info: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {
|
||||||
|
logo : "",
|
||||||
|
no : "",
|
||||||
|
company : ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
copyNo(){
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: this.info.no,
|
||||||
|
success: res => {
|
||||||
|
uni.showToast({
|
||||||
|
title: "单号已复制",
|
||||||
|
icon : "none"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
$margin: 30rpx;
|
||||||
|
$radius: 10rpx;
|
||||||
|
.logistics--header{
|
||||||
|
position: relative;
|
||||||
|
background: linear-gradient(to right, #34ce98, #22aa98);
|
||||||
|
color: white;
|
||||||
|
padding: $margin $margin $margin*2;
|
||||||
|
min-height: 88rpx;
|
||||||
|
.logo{
|
||||||
|
width: 88rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
background: white;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
.info{
|
||||||
|
position: absolute;
|
||||||
|
left: $margin * 2 + 88rpx;
|
||||||
|
top: $margin;
|
||||||
|
font-size: 28rpx;
|
||||||
|
&--no{
|
||||||
|
line-height: 44rpx;
|
||||||
|
font-weight: normal;
|
||||||
|
text{
|
||||||
|
margin-left: $margin/2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&--company{
|
||||||
|
height: 44rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.logistics--logs{
|
||||||
|
position: relative;
|
||||||
|
margin-top: -$margin;
|
||||||
|
background: white;
|
||||||
|
border-radius: $radius $radius 0 0;
|
||||||
|
z-index: 9;
|
||||||
|
padding: $margin;
|
||||||
|
overflow: hidden;
|
||||||
|
.item{
|
||||||
|
position: relative;
|
||||||
|
margin-top: $margin;
|
||||||
|
padding-left: 50rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #444;
|
||||||
|
&::after,
|
||||||
|
&::before{
|
||||||
|
position: absolute;
|
||||||
|
content: " ";
|
||||||
|
}
|
||||||
|
&::before{
|
||||||
|
top: 10rpx;
|
||||||
|
left: 10rpx;
|
||||||
|
background-color: #ddd;
|
||||||
|
height: 200%;
|
||||||
|
width: 2rpx;
|
||||||
|
}
|
||||||
|
&::after{
|
||||||
|
width: 22rpx;
|
||||||
|
height: 22rpx;
|
||||||
|
background-color: #ddd;
|
||||||
|
left: 0;
|
||||||
|
top: 10rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
&:first-child{
|
||||||
|
margin-top: 0;
|
||||||
|
&::after{
|
||||||
|
background-color: #34CE98;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
80
uni_modules/oct-logistics/package.json
Normal file
80
uni_modules/oct-logistics/package.json
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
{
|
||||||
|
"id": "oct-logistics",
|
||||||
|
"displayName": "oct-logistics",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "oct-logistics",
|
||||||
|
"keywords": [
|
||||||
|
"oct-logistics"
|
||||||
|
],
|
||||||
|
"repository": "",
|
||||||
|
"engines": {
|
||||||
|
"HBuilderX": "^3.1.0"
|
||||||
|
},
|
||||||
|
"dcloudext": {
|
||||||
|
"category": [
|
||||||
|
"前端组件",
|
||||||
|
"通用组件"
|
||||||
|
],
|
||||||
|
"sale": {
|
||||||
|
"regular": {
|
||||||
|
"price": "0.00"
|
||||||
|
},
|
||||||
|
"sourcecode": {
|
||||||
|
"price": "0.00"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"qq": ""
|
||||||
|
},
|
||||||
|
"declaration": {
|
||||||
|
"ads": "",
|
||||||
|
"data": "",
|
||||||
|
"permissions": ""
|
||||||
|
},
|
||||||
|
"npmurl": ""
|
||||||
|
},
|
||||||
|
"uni_modules": {
|
||||||
|
"dependencies": [],
|
||||||
|
"encrypt": [],
|
||||||
|
"platforms": {
|
||||||
|
"cloud": {
|
||||||
|
"tcb": "u",
|
||||||
|
"aliyun": "u"
|
||||||
|
},
|
||||||
|
"client": {
|
||||||
|
"Vue": {
|
||||||
|
"vue2": "u",
|
||||||
|
"vue3": "u"
|
||||||
|
},
|
||||||
|
"App": {
|
||||||
|
"app-vue": "u",
|
||||||
|
"app-nvue": "u"
|
||||||
|
},
|
||||||
|
"H5-mobile": {
|
||||||
|
"Safari": "u",
|
||||||
|
"Android Browser": "u",
|
||||||
|
"微信浏览器(Android)": "u",
|
||||||
|
"QQ浏览器(Android)": "u"
|
||||||
|
},
|
||||||
|
"H5-pc": {
|
||||||
|
"Chrome": "u",
|
||||||
|
"IE": "u",
|
||||||
|
"Edge": "u",
|
||||||
|
"Firefox": "u",
|
||||||
|
"Safari": "u"
|
||||||
|
},
|
||||||
|
"小程序": {
|
||||||
|
"微信": "u",
|
||||||
|
"阿里": "u",
|
||||||
|
"百度": "u",
|
||||||
|
"字节跳动": "u",
|
||||||
|
"QQ": "u"
|
||||||
|
},
|
||||||
|
"快应用": {
|
||||||
|
"华为": "u",
|
||||||
|
"联盟": "u"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1
uni_modules/oct-logistics/readme.md
Normal file
1
uni_modules/oct-logistics/readme.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# oct-logistics
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
<view v-show="orderInfo.cans.delete" class="item item--delete" @click="$emit('onBtn', {type: 'delete', order: orderInfo})">删除订单</view>
|
<view v-show="orderInfo.cans.delete" class="item item--delete" @click="$emit('onBtn', {type: 'delete', order: orderInfo})">删除订单</view>
|
||||||
<view v-show="orderInfo.cans.logistic_show" class="item item--logistic" @click="$emit('onBtn', {type: 'logistic', order: orderInfo})">查看物流</view>
|
<view v-show="orderInfo.cans.logistic_show" class="item item--logistic" @click="$emit('onBtn', {type: 'logistic', order: orderInfo})">查看物流</view>
|
||||||
<view v-show="orderInfo.cans.pay" class="item item--pay" @click="$emit('onBtn', {type: 'pay', order: orderInfo})">立即支付</view>
|
<view v-show="orderInfo.cans.pay" class="item item--pay" @click="$emit('onBtn', {type: 'pay', order: orderInfo})">立即支付</view>
|
||||||
<view v-show="orderInfo.cans.sign" class="item item--sign" @click="$emit('onBtn', {type: 'sign', order: orderInfo})">签收</view>
|
<view v-show="orderInfo.cans.sign" class="item item--sign" @click="$emit('onBtn', {type: 'sign', order: orderInfo})">确认签收</view>
|
||||||
</view>
|
</view>
|
||||||
</slot>
|
</slot>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
Reference in New Issue
Block a user