Commit 329b0412 by LJM

js

parent 7b1b12c6
...@@ -94,4 +94,70 @@ ...@@ -94,4 +94,70 @@
} }
} }
} }
.btn {
position: fixed;
bottom: 0;
left: 0;
right: 0;
width: 100%;
height: 100rpx;
z-index: 9;
background: #ffffff;
box-shadow: 0px -4rpx 20rpx 0px rgba(198, 199, 204, 0.1);
border-radius: 10rpx 10rpx 0px 0px;
padding: 0 24rpx;
.btn1 {
width: 100%;
height: 68rpx;
background: #1969f9;
border-radius: 10rpx;
.iconfont {
font-size: 44rpx;
color: #ffffff;
}
.text {
margin-left: 12rpx;
font-size: 28rpx;
color: #ffffff;
}
}
}
.form-box {
border-radius: 10rpx;
background: #ffffff;
padding: 0 24rpx;
.input-box {
border-bottom: 1px solid #d8d8d8;
&:last-child {
border-bottom: none;
}
.tt {
width: 155rpx;
font-size: 26rpx;
color: #484b59;
}
.uni-input {
height: 100%;
font-size: 26rpx;
&::-webkit-input-placeholder {
color: #919399;
}
}
&.input {
height: 88rpx;
}
}
}
}
.no-data {
image {
width: 356rpx;
height: 356rpx;
}
.tt {
margin-top: 32rpx;
font-size: 28rpx;
color: #292b33;
}
} }
import App from './App' import App from './App'
import { request,setCookie,getCookie } from '@/util/util.js' import { request, setCookie, getCookie } from '@/util/util.js'
import filters from '@/filters' import filters from '@/filters'
import router from '@/router/index.js' import router from '@/router/index.js'
import { RouterMount } from 'uni-simple-router' import { RouterMount } from 'uni-simple-router'
...@@ -13,12 +13,6 @@ Vue.prototype.request = request ...@@ -13,12 +13,6 @@ Vue.prototype.request = request
App.mpType = 'app' App.mpType = 'app'
//过滤器遍历 //过滤器遍历
Object.keys(filters).forEach(key => Vue.filter(key, filters[key])); Object.keys(filters).forEach(key => Vue.filter(key, filters[key]));
...@@ -27,58 +21,57 @@ Vue.use(directive); ...@@ -27,58 +21,57 @@ Vue.use(directive);
//生成临时Yo4teW_gid和Yo4teW_csrf //生成临时Yo4teW_gid和Yo4teW_csrf
let time1s = parseInt(new Date().getTime() / 1000); let time = parseInt(new Date().getTime() / 1000);
let gid_= w_md5.hex_md5_32(w_md5.hex_md5_32(String(time1s)+Math.random())+"usersign") let gid_ = w_md5.hex_md5_32(w_md5.hex_md5_32(String(time) + Math.random()) + "usersign")
let csrf_= w_md5.hex_md5_32(w_md5.hex_md5_32(String(time1s)+Math.random())+"csrf") let csrf_ = w_md5.hex_md5_32(w_md5.hex_md5_32(String(time) + Math.random()) + "csrf")
if(!getCookie("Yo4teW_gid")){ if (!getCookie("Yo4teW_gid")) {
setCookie('Yo4teW_gid', gid_, 7); setCookie('Yo4teW_gid', gid_, 15);
} }
if(!getCookie("Yo4teW_csrf")){ if (!getCookie("Yo4teW_csrf")) {
setCookie('Yo4teW_csrf', csrf_, 7); setCookie('Yo4teW_csrf', csrf_, 15);
} }
try { try {
function isPromise(obj) { function isPromise(obj) {
return ( return (
!!obj && !!obj &&
(typeof obj === "object" || typeof obj === "function") && (typeof obj === "object" || typeof obj === "function") &&
typeof obj.then === "function" typeof obj.then === "function"
); );
} }
// 统一 vue2 API Promise 化返回格式与 vue3 保持一致 // 统一 vue2 API Promise 化返回格式与 vue3 保持一致
uni.addInterceptor({ uni.addInterceptor({
returnValue(res) { returnValue(res) {
if (!isPromise(res)) { if (!isPromise(res)) {
return res; return res;
} }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
res.then((res) => { res.then((res) => {
if (res[0]) { if (res[0]) {
reject(res[0]); reject(res[0]);
} else { } else {
resolve(res[1]); resolve(res[1]);
} }
}); });
}); });
}, },
}); });
} catch (error) { } } catch (error) {}
const app = new Vue({ const app = new Vue({
...App ...App
}) })
//v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式 //v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式
// #ifdef H5 // #ifdef H5
RouterMount(app,'#app'); RouterMount(app, '#app');
// #endif // #endif
// #ifndef H5 // #ifndef H5
app.$mount()//为了兼容小程序及app端必须这样写才有效果 app.$mount() //为了兼容小程序及app端必须这样写才有效果
// #endif // #endif
// #endif // #endif
...@@ -86,9 +79,9 @@ const app = new Vue({ ...@@ -86,9 +79,9 @@ const app = new Vue({
// #ifdef VUE3 // #ifdef VUE3
import { createSSRApp } from 'vue' import { createSSRApp } from 'vue'
export function createApp() { export function createApp() {
const app = createSSRApp(App) const app = createSSRApp(App)
return { return {
app app
} }
} }
// #endif // #endif
\ No newline at end of file
...@@ -76,6 +76,18 @@ ...@@ -76,6 +76,18 @@
"style": { "style": {
"navigationBarTitleText": "收货地址" "navigationBarTitleText": "收货地址"
} }
},
{
"path": "pages/mine/userAddressAdd",
"style": {
"navigationBarTitleText": "新增地址"
}
},
{
"path": "pages/mine/userAddressEdit",
"style": {
"navigationBarTitleText": "编辑地址"
}
} }
], ],
"globalStyle": { "globalStyle": {
......
...@@ -57,6 +57,16 @@ ...@@ -57,6 +57,16 @@
</view> </view>
</view> </view>
</view> </view>
<view class="no-data column rowCenter verCenter">
<image src="../../static/nodate.png"></image>
<text class="tt">暂无收货地址</text>
</view>
<view class="btn row verCenter">
<view class="btn1 row rowCenter verCenter">
<text class="iconfont icon-tj"></text>
<text class="text">新增地址</text>
</view>
</view>
</view> </view>
</template> </template>
......
...@@ -5,9 +5,9 @@ import Router from 'uni-simple-router' ...@@ -5,9 +5,9 @@ import Router from 'uni-simple-router'
Vue.use(Router) Vue.use(Router)
//初始化 //初始化
const router = new Router({ const router = new Router({
h5:{ h5: {
loading: false, loading: false,
}, },
APP: { APP: {
animation: { animation: {
animationType: 'pop-in', animationType: 'pop-in',
...@@ -105,6 +105,20 @@ const router = new Router({ ...@@ -105,6 +105,20 @@ const router = new Router({
meta: { meta: {
title: '收货地址' title: '收货地址'
} }
},
{
path: '/pages/mine/userAddressAdd',
aliasPath: '/userAddressAdd',
meta: {
title: '新增地址'
}
},
{
path: '/pages/mine/userAddressEdit',
aliasPath: '/userAddressEdit',
meta: {
title: '编辑地址'
}
} }
] ]
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment