创建虚拟人物,调整登录逻辑

This commit is contained in:
唐明明
2022-06-07 17:34:05 +08:00
parent 1c6091371e
commit b76167eb0d
19 changed files with 4434 additions and 4784 deletions

16
.hbuilderx/launch.json Normal file
View File

@@ -0,0 +1,16 @@
{ // launch.json 配置了启动调试时相关设置configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtype项可配置值为local或remote, local代表前端连本地云函数remote代表前端连云端云函数
"version": "0.0",
"configurations": [{
"app-plus" :
{
"launchtype" : "local"
},
"default" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}

View File

@@ -10,7 +10,7 @@ import router from '../router'
// 基础配置 // 基础配置
const config = { const config = {
apiUrl : 'http://api.zh.shangkelian.cn/api/', // 正式环境 apiUrl : 'http://api.gl.shangkelian.cn/api/', // 正式环境
timeout : 60000 timeout : 60000
} }

View File

@@ -26,6 +26,22 @@ const getSms = (data) =>{
}) })
} }
// 获取角色标签信息
const userFigure = () => {
return request({
url: "cms/storages/tags?tags=figure",
})
}
// 创建角色
const createUser = (data) => {
return request({
url: "user/fill_all",
method: 'POST',
data: data
})
}
// 用户隐私,用户服务协议 // 用户隐私,用户服务协议
const secretService = (name) =>{ const secretService = (name) =>{
return request({ return request({
@@ -33,18 +49,10 @@ const secretService = (name) =>{
}) })
} }
// 一键登录
const keyAuth = (data) => {
return request({
url: 'user/socialite/login/unicloud/app',
method: 'POST',
data: data
}, true)
}
export { export {
smsAuth, smsAuth,
getSms, getSms,
secretService, userFigure,
keyAuth createUser,
secretService
} }

View File

@@ -16,6 +16,11 @@
"autoclose" : true, "autoclose" : true,
"delay" : 0 "delay" : 0
}, },
"safearea": {
"bottom": {
"offset": "none"
}
},
/* */ /* */
"modules" : { "modules" : {
"OAuth" : {}, "OAuth" : {},

View File

@@ -1,5 +1,30 @@
{ {
"pages": [{ "pages": [{
"path": "pages/auth/auth",
"name": "Auth",
"style": {
"navigationBarTitleText": "登录",
"navigationStyle": "custom"
}
},
{
"path": "pages/auth/role",
"name": "AuthRole",
"style": {
"navigationBarTitleText": "角色创建",
"navigationBarBackgroundColor": "#FFF",
"app-plus": {
"titleNView": {
"buttons": [{
"text": "退出登录",
"fontSize": "14",
"width": "80px",
"color": "#fdbc01"
}]
}
}
}
},{
"path": "pages/life/life", "path": "pages/life/life",
"name": "Life", "name": "Life",
"style": { "style": {
@@ -44,32 +69,7 @@
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, },
{
"path": "pages/auth/auth",
"name": "Auth",
"style": {
"navigationBarTitleText": "登录",
"navigationStyle": "custom"
}
},
{
"path": "pages/auth/role",
"name": "AuthRole",
"style": {
"navigationBarTitleText": "角色创建",
"navigationBarBackgroundColor": "#FFF",
"app-plus": {
"titleNView": {
"buttons": [{
"text": "退出登录",
"fontSize": "14",
"width": "80px",
"color": "#fdbc01"
}]
}
}
}
},
{ {
"path": "pages/store/goods", "path": "pages/store/goods",
"name": "StoreGoods", "name": "StoreGoods",

View File

@@ -1,251 +1,228 @@
<template> <template>
<view class="content"> <view class="auth">
<!-- tool --> <image class="auth-back" src="/static/login/auth_bg.png" mode="aspectFill"></image>
<view class="tool-flex"> <view class="auth-center">
<view class="tool-flex-item" @click="$Router.back()"> <view class="auth-title">
<uni-icons type="closeempty" size="22" color="#666"></uni-icons> <view>共力生态</view>
</view> <view>即可开始共力人生</view>
<view class="tool-flex-item" @click="onKeyAuth()" v-if="$Route.query.keyPhone == 1">一键登录</view> </view>
</view> <view class="auth-input">
<!-- 欢迎使用 --> <input v-model="phone" type="number" maxlength="11" placeholder="输入手机号码">
<view class="header"> </view>
<view class="title">欢迎使用</view> <view class="auth-input auth-code">
<view class="sumbit">共力生态即刻开始共力人生</view> <input v-model="code" type="number" maxlength="4" placeholder="输入验证码">
</view> <button :disabled="getSms" size="mini" @click="getPhoneCode()">{{sendCode}}</button>
<!-- 输入手机号相关 --> </view>
<view class="inputs phone"> <view class="auth-button">
<label class="label">+86</label> <button @click="login('code')">登录</button>
<input type="number" placeholder="输入您的手机号码" maxlength="11" v-model="phone" /> </view>
</view> <view class="auth-agreement">
<view class="inputs sms"> 登录即表示同意<navigator hover-class="none">用户协议</navigator><navigator hover-class="none">隐私政策</navigator>
<input type="number" placeholder="输入短信验证码" maxlength="4" v-model="code" /> </view>
<button class="sms-btn" type="default" size="mini" :disabled="phone == '' || getSms" <!-- <view class="auth-other">
@click="getPhoneCode">{{getSms ? '重新发送' + smsTime + 's': '发送验证码'}}</button> <button @click="login('mnemonic')">使用助记词登录</button>
</view> </view> -->
<button class="btn" type="default" :disabled="phone == '' || code == ''" @click="login">登录</button> </view>
<!-- 用户登录注册协议 --> </view>
<view class="agreement">
未注册的手机号码验证后自动创建账号登录即表示同意接受平台
<view @click="$Router.push({name: 'agreement', params: {name : 'secret'}})">隐私协议</view>
<view @click="$Router.push({name: 'agreement', params: {name : 'service'}})">服务协议</view>
</view>
</view>
</template> </template>
<script> <script>
import { getSms, smsAuth } from "@/apis/interfaces/auth"; import {
import userAuth from "@/public/userAuth"; smsAuth,
getSms
export default { } from '@/apis/interfaces/auth.js'
data() { export default {
return { data() {
phone: "", return {
code: "", phone : '18245180131',
smsTime: 60, code : '',
getSms: false, getSms : false,
}; sendCode: '获取验证码'
}, };
methods: { },
// 用户登录 mounted() {
login() { this.$store.commit('setToken', '')
smsAuth({ },
mobileNo: this.phone, methods: {
code: this.code, // 获取验证码
}).then((res) => { getPhoneCode() {
this.$store.commit( let outTime;
"setToken", let smsTime = 60;
res.token_type + " " + res.access_token getSms({
); mobileNo: this.phone,
this.$Router.back(); }).then(res => {
}).catch((err) => { uni.showToast({
uni.showToast({ title: res,
title: err.message, icon: "none",
icon: "none", });
}); this.getSms = true;
}); this.sendCode = smsTime + 's后重新获取';
}, outTime = setInterval(() => {
// 获取验证码 if (smsTime <= 1) {
getPhoneCode() { this.getSms = false;
let outTime; this.sendCode = '重新获取';
getSms({ clearInterval(outTime);
mobileNo: this.phone, return
}) }
.then((res) => { this.sendCode = smsTime + 's后重新获取';
uni.showToast({ smsTime -= 1;
title: res, }, 1000);
icon: "none", }).catch((err) => {
}); uni.showToast({
this.getSms = true; title: err.message,
outTime = setInterval(() => { icon: "none",
if (this.smsTime <= 1) { });
this.getSms = false; });
this.smsTime = 60; },
clearInterval(outTime); // 登录
} login(type) {
this.smsTime -= 1; if (type === 'code') {
}, 1000); uni.showLoading({
}) title: '登录中'
.catch((err) => { })
uni.showToast({ smsAuth({
title: err.message, mobileNo: this.phone,
icon: "none", code : this.code,
}); }).then((res) => {
}); this.$store.commit('setToken', res.token_type + ' ' + res.access_token);
}, this.$store.commit('setIsNew', res.is_new ? 0 : 1)
// 一键登录 if(res.is_new){
onKeyAuth() { this.$Router.replace({name: 'AuthRole'})
const Auth = new userAuth(); return
this.$Router.back(); }
Auth.Login(); this.$Router.back()
}, this.$Router.pushTab({name: 'Life'})
}, uni.hideLoading()
}; }).catch((err) => {
uni.showToast({
title: err.message,
icon: "none",
});
});
return
}
if (type === 'mnemonic') {
uni.showToast({
title: '助记词登录暂未开放,敬请期待~',
icon: 'none'
})
}
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss">
.content { .auth {
height: 100vh; height: 100vh;
width: 100vw;
padding: $padding * 3;
box-sizing: border-box;
background: white;
@extend .vertical;
// 操作栏 .auth-back {
.tool-flex { width: 100vw;
position: fixed; height: 100vh;
top: 0; }
left: 0;
right: 0;
display: flex;
justify-content: space-between;
padding-left: $padding * 2;
padding-right: $padding * 2;
background: white;
@extend .ios-top;
&-item { .auth-center {
line-height: 90rpx; position: absolute;
color: $text-gray; top: 0;
font-size: $title-size-lg; left: 0;
} height: 100vh;
} width: 100vw;
display: flex;
flex-direction: column;
justify-content: flex-end;
background: linear-gradient(to bottom, rgba(0, 0, 0, .0), rgba(0, 0, 0, .5));
padding: 100rpx 50rpx;
box-sizing: border-box;
// 表单 .auth-title {
.inputs { font-size: 50rpx;
background: $window-color; font-weight: bold;
position: relative; line-height: 70rpx;
margin-top: $margin; color: white;
height: 90rpx; }
line-height: 90rpx;
border-radius: 45rpx;
input { .auth-input {
width: 100%; background: white;
height: 90rpx; height: 100rpx;
line-height: 90rpx; border-radius: 50rpx;
padding: 0 $padding; margin-top: 40rpx;
border: none; overflow: hidden;
box-sizing: border-box;
font-size: $title-size-lg;
}
&.phone { input {
padding-left: 120rpx; height: 100rpx;
font-size: 32rpx;
padding: 0 50rpx;
flex: 1;
}
.label { &.auth-code {
position: absolute; display: flex;
left: 0; flex-direction: row;
top: 0;
width: 120rpx;
text-align: center;
border-right: solid 1rpx $border-color;
font-size: $title-size-lg;
}
}
&.sms { button[size="mini"] {
padding-right: 200rpx; width: 280rpx;
padding: 0;
line-height: 100rpx;
font-size: 32rpx;
border-radius: 0;
color: #fdbc01;
background: white;
&[disabled]{
color: gray;
}
&::after {
display: none;
}
}
}
}
.sms-btn[size='mini'] { .auth-button {
width: 200rpx; margin-top: 70rpx;
height: 90rpx;
line-height: 90rpx;
position: absolute;
top: 0;
right: 0;
padding: 0;
margin: 0;
border-radius: 0 45rpx 45rpx 0;
color: $main-color;
font-size: $title-size-lg;
background: $window-color;
&::after { button {
border: none; background: #fdbc01;
} color: white;
border-radius: 50rpx;
height: 100rpx;
line-height: 100rpx;
padding: 0;
font-weight: bold;
font-size: 34rpx;
&[disabled] { &::after {
color: rgba($color: $main-color, $alpha: .6); display: none;
background: rgba($color: $window-color, $alpha: 0); }
} }
} }
}
}
// 头部 .auth-agreement {
.header { text-align: center;
text-align: center; color: white;
margin-bottom: 5vh; font-size: 28rpx;
padding: 30rpx 0 100rpx 0;
.title { navigator {
font-size: $title-size + 10; display: inline-block;
font-weight: bold; padding: 0 10rpx;
color: $text-color; color: #fdbc01;
line-height: 70rpx; }
} }
.sumbit { .auth-other {
line-height: 50rpx; padding: 0 10vw;
font-size: $title-size-m;
color: $text-gray-m;
}
}
// 登录按钮 button {
.btn { height: 100rpx;
margin: 0; line-height: 98rpx;
margin-top: $margin*2; border-radius: 50rpx;
height: 90rpx; border: solid 1px white;
line-height: 90rpx; color: white;
padding: 0; background: transparent;
font-size: $title-size; font-size: 34rpx;
border-radius: 45rpx; box-sizing: border-box;
background: $main-color; }
color: white; }
font-weight: bold; }
}
&::after {
display: none;
}
&[disabled] {
background: rgba($color: $main-color, $alpha: .5);
}
}
// 协议
.agreement {
padding-top: 5vh;
font-size: $title-size-sm;
color: $text-gray-m;
view {
color: $main-color;
display: inline-block;
padding: 0 10rpx;
}
}
}
</style> </style>

View File

@@ -11,7 +11,7 @@
<scroll-view class="role-figure-scroll" scroll-x="true" > <scroll-view class="role-figure-scroll" scroll-x="true" >
<view <view
class="role-figure-item" class="role-figure-item"
v-for="(item, index) in figure" v-for="(item, index) in (sex === 1 ? male: female)"
:class="storageId === item.storage_id ? 'active': ''" :class="storageId === item.storage_id ? 'active': ''"
:key="index" :key="index"
@click="storageId = item.storage_id" @click="storageId = item.storage_id"
@@ -34,7 +34,8 @@
export default { export default {
data() { data() {
return { return {
figure : [], male : [],
female : [],
nickname : '', nickname : '',
sex : 1, sex : 1,
storageId : '', storageId : '',
@@ -43,14 +44,16 @@
}, },
watch: { watch: {
sex(newVale){ sex(newVale){
this.storageId = this.figure[0].storage_id this.storageId = (this.sex === 1 ? this.male[0].storage_id : this.female[0].storage_id)
} }
}, },
created() { created() {
userFigure().then(res => { userFigure().then(res => {
this.figure = res this.female = res.female
this.storageId = res[0].storage_id this.male = res.male
this.storageId = res.male[0].storage_id
}).catch(err => { }).catch(err => {
console.log(err)
uni.showToast({ uni.showToast({
title: err.status_code + ':' + err.message, title: err.status_code + ':' + err.message,
icon : 'none' icon : 'none'
@@ -69,7 +72,7 @@
storage_id : this.storageId storage_id : this.storageId
}).then(res => { }).then(res => {
this.$store.commit('setIsNew', 1) this.$store.commit('setIsNew', 1)
this.$Router.pushTab({name: 'Life'}) this.$Router.back()
}).catch(err => { }).catch(err => {
this.disabled = false this.disabled = false
uni.showToast({ uni.showToast({

View File

@@ -51,6 +51,7 @@
<view class="goods-box"> <view class="goods-box">
<oct-goods <oct-goods
:lists="goodsArr" :lists="goodsArr"
priceType="DT"
color="#e6576b" color="#e6576b"
@onGoods="$Router.push({ name: 'StoreGoods', params: {id: $event.goods_id}})" @onGoods="$Router.push({ name: 'StoreGoods', params: {id: $event.goods_id}})"
/> />

View File

@@ -22,9 +22,9 @@
</view> </view>
</view> </view>
<view class="chainAddress" v-if="userInfo.chain_address"> <view class="chainAddress" v-if="userInfo.chain_address">
<u-icon labelPos="left" @click="copy(userInfo.chain_address)" labelSize="14" <!-- <u-icon labelPos="left" @click="copy(userInfo.chain_address)" labelSize="14"
labelColor="#fff" :label="userInfo.chain_address.substr(0, 20)+'...'" space="10" labelColor="#fff" :label="userInfo.chain_address.substr(0, 20)+'...'" space="10"
:name="require('@/static/imgs/copy.png')" size="16" /> :name="require('@/static/imgs/copy.png')" size="16" /> -->
</view> </view>
</block> </block>
<block v-else> <block v-else>

View File

@@ -53,6 +53,13 @@ class userAuth {
} }
// 预登录 // 预登录
Login() { Login() {
router.push({
name: 'Auth'
})
return
// 移出一键登录
//#ifdef H5 //#ifdef H5
router.push({ router.push({
name: 'Auth' name: 'Auth'

View File

@@ -21,6 +21,20 @@ const router = createRouter({
//全局路由前置守卫 //全局路由前置守卫
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
if(to.name === 'Auth' && store.getters.getToken != '' && uni.getStorageSync('token') != ''){
if(store.getters.getIsNew === 0 && uni.getStorageSync('isnew') === 0){
next({
name: 'Role',
NAVTYPE: 'replace'
})
return
}
next({
name: 'Life',
NAVTYPE: 'pushTab'
})
return
}
next(); next();
}); });

BIN
static/login/auth_bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

View File

@@ -10,32 +10,33 @@ import Vuex from 'vuex'
Vue.use(Vuex) 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 isnew: uni.getStorageSync('isNew') || 0
}, },
getters: { getters: {
getToken: state => { getToken: state => {
return state.token return state.token
}, },
getAddress: state => { getAddress: state => {
return state.address return state.address
}, },
getRefresh: state => { getIsNew: state => {
return state.refresh return state.isnew
} }
}, },
mutations: { mutations: {
setToken(state, tokenString) { setToken(state, tokenString) {
state.token = tokenString state.token = tokenString
uni.setStorageSync('token', tokenString) uni.setStorageSync('token', tokenString)
}, },
setAddress(state, value) { setAddress(state, value) {
state.address = value state.address = value
}, },
setRefresh(state, value) { setIsNew(state, isNew) {
state.refresh = value state.isnew = isNew
} uni.setStorageSync('isnew', isNew)
} }
}
}) })

View File

@@ -1,189 +0,0 @@
import im from "@/utils/im/index.js"
import {
contactModel
} from '@/utils/im/models.js'
export default {
state: {
contacts: {},
myInfo: {}
},
getters: {
contacts(state) {
return state.contacts
},
contactInfo: (state) => (targetId) => {
if (state.contacts[targetId]) {
const info = state.contacts[targetId]
return {
name: info.remark ? info.remark : info.name,
hash: info.hash,
portraitUrl: info.localAvatar ? info.localAvatar : require('@/static/user/cover.png')
}
} else {
return {
name: '',
hash: '',
portraitUrl: require('@/static/user/cover.png')
}
}
},
// 联系人是否存在
contactIsExist: (state) => (targetId) => {
return Boolean(state.contacts[targetId])
},
sender(state) {
return state.myInfo
}
},
mutations: {
updateContactInfo(state, contactInfo) {
Vue.set(state.contacts, contactInfo.targetId, contactInfo)
},
// 设置我的资料
setSenderInfo(state, contactInfo) {
state.myInfo = {
userId: contactInfo.targetId,
name: contactInfo.name,
portraitUrl: contactInfo.portraitUrl
}
},
setContactRemark(state, contactInfo) {
Vue.set(state.contacts, contactInfo.targetId, contactInfo)
}
},
actions: {
setContactRemark({
commit
}, {
targetId,
remark
}) {
contactModel.find('targetId="' + targetId + '"', (err, result) => {
if (!err && result.length > 0) {
result[0].remark = remark
contactModel.update('targetId="' + targetId + '"', result[0], (err, res) => {
commit('setContactRemark', result[0])
})
}
})
},
setSenderInfo({
commit,
dispatch
}, contactInfo) {
contactInfo.type = 0 // type 更改为0标记是我自己
dispatch('updateContact', contactInfo)
commit('setSenderInfo', contactInfo)
},
// 载入好友信息
launchContact({
commit
}, data) {
commit('updateContactInfo', data)
},
// 更新好友信息这个时候要校验hash值了
updateContact({
commit,
dispatch
}, contactInfo) {
contactModel.find('targetId="' + contactInfo.targetId + '"', (err, result) => {
if (result.length == 0) {
// 没有数据,直接新增一条
dispatch('initContact', contactInfo)
} else if (contactInfo.hash != result[0].hash) {
if (contactInfo.portraitUrl && contactInfo.portraitUrl != result[0].portraitUrl) {
saveAvatar(contactInfo, (savedFilePath) => {
const info = {
targetId: contactInfo.targetId,
name: contactInfo.name,
hash: contactInfo.hash,
type: contactInfo.type,
portraitUrl: contactInfo.portraitUrl,
localAvatar: savedFilePath
}
contactModel.update('targetId="' + contactInfo.targetId + '"', info, (err,
res) => {
console.log('UPDATE AVATAR, ERR', err, info)
})
commit('updateContactInfo', info)
})
} else {
const info = {
targetId: contactInfo.targetId,
name: contactInfo.name,
hash: contactInfo.hash,
type: contactInfo.type,
portraitUrl: contactInfo.portraitUrl,
localAvatar: result[0].localAvatar
}
contactModel.update('targetId="' + contactInfo.targetId + '"', info, (err, res) => {
console.log('UPDATE NAME, ERR', err, info);
})
commit('updateContactInfo', info)
}
} else {
console.log('updateContact, 无操作')
}
})
},
// 初始化好友信息
initContact({
commit
}, contactInfo) {
// 将好友信息保存到vuex的内存中方便立即使用
commit('updateContactInfo', contactInfo)
// 用户头像,是否需要下载到本地
if (contactInfo.portraitUrl) {
saveAvatar(contactInfo, (savedFilePath) => {
const info = {
targetId: contactInfo.targetId,
name: contactInfo.name,
hash: contactInfo.hash,
type: contactInfo.type,
portraitUrl: contactInfo.portraitUrl,
localAvatar: savedFilePath
}
contactModel.insert(info, (err, res) => {
console.error('保存头像', err, res)
})
// 保存头像后,更新信息
commit('updateContactInfo', info)
})
} else {
// 直接将信息,写入数据库
const info = {
targetId: contactInfo.targetId,
name: contactInfo.name,
hash: contactInfo.hash,
type: contactInfo.type,
portraitUrl: contactInfo.portraitUrl,
localAvatar: ''
}
contactModel.insert(info, (err, res) => {
console.error('没保存头像', err, res)
})
}
}
}
}
const saveAvatar = (contactInfo, callback) => {
uni.downloadFile({
url: contactInfo.portraitUrl,
success: ({
tempFilePath
}) => {
uni.saveFile({
tempFilePath: tempFilePath,
success: ({
savedFilePath
}) => {
callback(savedFilePath)
}
})
},
fail: (err) => {}
})
}

View File

@@ -1,8 +1,8 @@
var isReady=false;var onReadyCallbacks=[]; var isReady=false;var onReadyCallbacks=[];
var isServiceReady=false;var onServiceReadyCallbacks=[]; var isServiceReady=false;var onServiceReadyCallbacks=[];
var __uniConfig = {"pages":["pages/life/life","pages/store/index","pages/user/index","pages/setting/setting","pages/auth/auth","pages/auth/role","pages/store/goods","pages/store/buy","pages/order/index","pages/order/details","pages/address/index","pages/address/edit","pages/pay/pay","pages/store/list","pages/store/meals","pages/sign/index","pages/notice/index","pages/notice/list","pages/notice/details","pages/wallet/add","pages/wallet/create","pages/wallet/mnemonic","pages/wallet/validation","pages/wallet/property","pages/wallet/privatekey","pages/wallet/resetPassword","pages/store/search"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"ZH健康","navigationBarBackgroundColor":"#F3F6FB","backgroundColorTop":"#F3F6FB","backgroundColorBottom":"#F3F6FB"},"tabBar":{"borderStyle":"white","selectedColor":"#34CE98","list":[{"iconPath":"static/tabBar/tabBar_02.png","selectedIconPath":"static/tabBar/tabBar_show_02.png","pagePath":"pages/life/life","text":"共力人生"},{"iconPath":"static/tabBar/tabBar_02.png","selectedIconPath":"static/tabBar/tabBar_show_02.png","pagePath":"pages/store/index","text":"DT商城"},{"iconPath":"static/tabBar/tabBar_03.png","selectedIconPath":"static/tabBar/tabBar_show_03.png","pagePath":"pages/user/index","text":"我的"}]},"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"ZH-HEALTH","compilerVersion":"3.4.7","entryPagePath":"pages/life/life","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}}; var __uniConfig = {"pages":["pages/auth/auth","pages/auth/role","pages/life/life","pages/store/index","pages/user/index","pages/setting/setting","pages/store/goods","pages/store/buy","pages/order/index","pages/order/details","pages/address/index","pages/address/edit","pages/pay/pay","pages/store/list","pages/store/meals","pages/sign/index","pages/notice/index","pages/notice/list","pages/notice/details","pages/wallet/add","pages/wallet/create","pages/wallet/mnemonic","pages/wallet/validation","pages/wallet/property","pages/wallet/privatekey","pages/wallet/resetPassword","pages/store/search"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"ZH健康","navigationBarBackgroundColor":"#F3F6FB","backgroundColorTop":"#F3F6FB","backgroundColorBottom":"#F3F6FB"},"tabBar":{"borderStyle":"white","selectedColor":"#34CE98","list":[{"iconPath":"static/tabBar/tabBar_02.png","selectedIconPath":"static/tabBar/tabBar_show_02.png","pagePath":"pages/life/life","text":"共力人生"},{"iconPath":"static/tabBar/tabBar_02.png","selectedIconPath":"static/tabBar/tabBar_show_02.png","pagePath":"pages/store/index","text":"DT商城"},{"iconPath":"static/tabBar/tabBar_03.png","selectedIconPath":"static/tabBar/tabBar_show_03.png","pagePath":"pages/user/index","text":"我的"}]},"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"ZH-HEALTH","compilerVersion":"3.4.7","entryPagePath":"pages/auth/auth","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/life/life","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"共力人生","navigationStyle":"custom"}},{"path":"/pages/store/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"DT商城","enablePullDownRefresh":true,"titleNView":{"backgroundColor":"#FFFFFF","buttons":[{"float":"right","text":"","fontSrc":"/static/iconfont.ttf","color":"#000","fontSize":"20px"}]}}},{"path":"/pages/user/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"我的","navigationStyle":"custom"}},{"path":"/pages/setting/setting","meta":{},"window":{"navigationBarTitleText":"设置中心","navigationBarBackgroundColor":"#34CE98","navigationBarTextStyle":"white"}},{"path":"/pages/auth/auth","meta":{},"window":{"navigationBarTitleText":"登录","navigationStyle":"custom"}},{"path":"/pages/auth/role","meta":{},"window":{"navigationBarTitleText":"角色创建","navigationBarBackgroundColor":"#FFF","titleNView":{"buttons":[{"text":"退出登录","fontSize":"14","width":"80px","color":"#fdbc01"}]}}},{"path":"/pages/store/goods","meta":{},"window":{"navigationStyle":"custom","navigationBarTitleText":"详情","titleNView":{"backgroundColor":"#FFFFFF","type":"transparent"}}},{"path":"/pages/store/buy","meta":{},"window":{"navigationBarTitleText":"确认订单","enablePullDownRefresh":false}},{"path":"/pages/order/index","meta":{},"window":{"navigationBarTitleText":"订单","navigationBarBackgroundColor":"#FFFFFF","enablePullDownRefresh":false}},{"path":"/pages/order/details","meta":{},"window":{"navigationBarTitleText":"订单详情","enablePullDownRefresh":false}},{"path":"/pages/address/index","meta":{},"window":{"navigationBarTitleText":"收货地址"}},{"path":"/pages/address/edit","meta":{},"window":{"navigationBarTitleText":"编辑","enablePullDownRefresh":false}},{"path":"/pages/pay/pay","meta":{},"window":{"navigationBarTitleText":"收银台","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/store/list","meta":{},"window":{"navigationBarTitleText":"商品","navigationBarBackgroundColor":"#FFFFFF","enablePullDownRefresh":true}},{"path":"/pages/store/meals","meta":{},"window":{"navigationBarTitleText":"套餐","navigationBarBackgroundColor":"#FFFFFF","enablePullDownRefresh":true}},{"path":"/pages/sign/index","meta":{},"window":{"navigationBarTitleText":"每日打卡","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/notice/index","meta":{},"window":{"navigationBarTitleText":"消息","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/notice/list","meta":{},"window":{"navigationBarTitleText":"消息","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/notice/details","meta":{},"window":{"navigationBarTitleText":"消息","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/wallet/add","meta":{},"window":{"navigationBarTitleText":"创建钱包","navigationBarBackgroundColor":"#FFFFFF","enablePullDownRefresh":false}},{"path":"/pages/wallet/create","meta":{},"window":{"navigationBarTitleText":"设置密码","navigationBarBackgroundColor":"#FFFFFF","enablePullDownRefresh":false}},{"path":"/pages/wallet/mnemonic","meta":{},"window":{"navigationBarTitleText":"导出助记词","navigationBarBackgroundColor":"#FFFFFF","enablePullDownRefresh":false}},{"path":"/pages/wallet/validation","meta":{},"window":{"navigationBarTitleText":"验证助记词","navigationBarBackgroundColor":"#FFFFFF","enablePullDownRefresh":false}},{"path":"/pages/wallet/property","meta":{},"window":{"navigationBarTitleText":"ZH钱包","navigationBarTextStyle":"white","titleNView":{"backgroundImage":"linear-gradient(to right, #34ce98, #22aa98)","type":"transparent","buttons":[{"float":"right","text":"","fontSrc":"/static/iconfont.ttf","color":"#FFF","fontSize":"20px","background":"rgba(0,0,0,0)"}],"backButton":{"background":"rgba(0,0,0,0)"}}}},{"path":"/pages/wallet/privatekey","meta":{},"window":{"navigationBarTitleText":"钱包私钥","navigationBarBackgroundColor":"#FFFFFF","enablePullDownRefresh":false}},{"path":"/pages/wallet/resetPassword","meta":{},"window":{"navigationBarTitleText":"修改钱包密码","navigationBarBackgroundColor":"#FFFFFF","enablePullDownRefresh":false}},{"path":"/pages/store/search","meta":{},"window":{"navigationBarTitleText":"搜索","navigationBarBackgroundColor":"#FFFFFF"}}]; var __uniRoutes = [{"path":"/pages/auth/auth","meta":{"isQuit":true},"window":{"navigationBarTitleText":"登录","navigationStyle":"custom"}},{"path":"/pages/auth/role","meta":{},"window":{"navigationBarTitleText":"角色创建","navigationBarBackgroundColor":"#FFF","titleNView":{"buttons":[{"text":"退出登录","fontSize":"14","width":"80px","color":"#fdbc01"}]}}},{"path":"/pages/life/life","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"共力人生","navigationStyle":"custom"}},{"path":"/pages/store/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"DT商城","enablePullDownRefresh":true,"titleNView":{"backgroundColor":"#FFFFFF","buttons":[{"float":"right","text":"","fontSrc":"/static/iconfont.ttf","color":"#000","fontSize":"20px"}]}}},{"path":"/pages/user/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"我的","navigationStyle":"custom"}},{"path":"/pages/setting/setting","meta":{},"window":{"navigationBarTitleText":"设置中心","navigationBarBackgroundColor":"#34CE98","navigationBarTextStyle":"white"}},{"path":"/pages/store/goods","meta":{},"window":{"navigationStyle":"custom","navigationBarTitleText":"详情","titleNView":{"backgroundColor":"#FFFFFF","type":"transparent"}}},{"path":"/pages/store/buy","meta":{},"window":{"navigationBarTitleText":"确认订单","enablePullDownRefresh":false}},{"path":"/pages/order/index","meta":{},"window":{"navigationBarTitleText":"订单","navigationBarBackgroundColor":"#FFFFFF","enablePullDownRefresh":false}},{"path":"/pages/order/details","meta":{},"window":{"navigationBarTitleText":"订单详情","enablePullDownRefresh":false}},{"path":"/pages/address/index","meta":{},"window":{"navigationBarTitleText":"收货地址"}},{"path":"/pages/address/edit","meta":{},"window":{"navigationBarTitleText":"编辑","enablePullDownRefresh":false}},{"path":"/pages/pay/pay","meta":{},"window":{"navigationBarTitleText":"收银台","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/store/list","meta":{},"window":{"navigationBarTitleText":"商品","navigationBarBackgroundColor":"#FFFFFF","enablePullDownRefresh":true}},{"path":"/pages/store/meals","meta":{},"window":{"navigationBarTitleText":"套餐","navigationBarBackgroundColor":"#FFFFFF","enablePullDownRefresh":true}},{"path":"/pages/sign/index","meta":{},"window":{"navigationBarTitleText":"每日打卡","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/notice/index","meta":{},"window":{"navigationBarTitleText":"消息","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/notice/list","meta":{},"window":{"navigationBarTitleText":"消息","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/notice/details","meta":{},"window":{"navigationBarTitleText":"消息","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/wallet/add","meta":{},"window":{"navigationBarTitleText":"创建钱包","navigationBarBackgroundColor":"#FFFFFF","enablePullDownRefresh":false}},{"path":"/pages/wallet/create","meta":{},"window":{"navigationBarTitleText":"设置密码","navigationBarBackgroundColor":"#FFFFFF","enablePullDownRefresh":false}},{"path":"/pages/wallet/mnemonic","meta":{},"window":{"navigationBarTitleText":"导出助记词","navigationBarBackgroundColor":"#FFFFFF","enablePullDownRefresh":false}},{"path":"/pages/wallet/validation","meta":{},"window":{"navigationBarTitleText":"验证助记词","navigationBarBackgroundColor":"#FFFFFF","enablePullDownRefresh":false}},{"path":"/pages/wallet/property","meta":{},"window":{"navigationBarTitleText":"ZH钱包","navigationBarTextStyle":"white","titleNView":{"backgroundImage":"linear-gradient(to right, #34ce98, #22aa98)","type":"transparent","buttons":[{"float":"right","text":"","fontSrc":"/static/iconfont.ttf","color":"#FFF","fontSize":"20px","background":"rgba(0,0,0,0)"}],"backButton":{"background":"rgba(0,0,0,0)"}}}},{"path":"/pages/wallet/privatekey","meta":{},"window":{"navigationBarTitleText":"钱包私钥","navigationBarBackgroundColor":"#FFFFFF","enablePullDownRefresh":false}},{"path":"/pages/wallet/resetPassword","meta":{},"window":{"navigationBarTitleText":"修改钱包密码","navigationBarBackgroundColor":"#FFFFFF","enablePullDownRefresh":false}},{"path":"/pages/store/search","meta":{},"window":{"navigationBarTitleText":"搜索","navigationBarBackgroundColor":"#FFFFFF"}}];
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}}); __uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}}); __uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}}); service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB