diff --git a/package-lock.json b/package-lock.json
index 7cc770d..cf2f3c9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -6,6 +6,11 @@
"version": "2.30.1",
"resolved": "https://registry.npmmirror.com/moment/-/moment-2.30.1.tgz",
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how=="
+ },
+ "ydui-district": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmmirror.com/ydui-district/-/ydui-district-1.1.0.tgz",
+ "integrity": "sha512-MBhvfaR5Gkn6MUmEnrH1A7IFB5igALuDgtIF+gz3dRwNwW9+KOmih7z+xZFfGluMsEbWaT7C3lWOckYsLZQnFg=="
}
}
}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..387a7fc
--- /dev/null
+++ b/package.json
@@ -0,0 +1,20 @@
+{
+ "name": "changshu_wechat",
+ "version": "1.0.0",
+ "description": "",
+ "main": "main.js",
+ "dependencies": {
+ "moment": "^2.30.1",
+ "ydui-district": "^1.1.0"
+ },
+ "devDependencies": {},
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "http://123.60.98.226:3000/chenkainan/changshu_WeChat.git"
+ },
+ "author": "",
+ "license": "ISC"
+}
diff --git a/pages.json b/pages.json
index f92468b..a70d0b4 100644
--- a/pages.json
+++ b/pages.json
@@ -96,6 +96,18 @@
"navigationBarTitleText": "常用信息"
}
},
+ {
+ "path": "user/myContactsAdd",
+ "style": {
+ "navigationBarTitleText": "常用联系人"
+ }
+ },
+ {
+ "path": "user/myAddressAdd",
+ "style": {
+ "navigationBarTitleText": "收货地址"
+ }
+ },
{
"path": "user/privacy",
"style": {
diff --git a/subPackages/user/changeNickname.vue b/subPackages/user/changeNickname.vue
index d37e3ad..9be936c 100644
--- a/subPackages/user/changeNickname.vue
+++ b/subPackages/user/changeNickname.vue
@@ -1,10 +1,10 @@
- 姓名:
-
+
+
- 保存修改
+ 保存
@@ -16,6 +16,12 @@
nickname: ""
}
},
+ onLoad(options) {
+ if (options.nickname) {
+ this.nickname = options.nickname
+ }
+ },
+
methods: {
save: function() {
if (!this.nickname) {
@@ -29,7 +35,7 @@
nickname: this.nickname
}, '/api/user/profile').then(res => {
console.log(res)
- if (res.code == 1) {
+ if (res.code == 1 || res.code==200) {
uni.showModal({
title: '提示',
content: '保存成功!',
@@ -55,10 +61,11 @@
display: flex;
padding: 10rpx 30rpx;
align-items: center;
- background: white;
- margin-bottom: 100rpx;
+ /* background: white; */
+ margin: 60rpx 30rpx;
font-size: 30rpx;
height: 70rpx;
+ border-bottom: 1px solid #D8D8D8;
}
.nickname-box span {
@@ -80,7 +87,7 @@
text-align: center;
width: 333rpx;
height: 80rpx;
- background: linear-gradient(90deg, #9EE4FE, #7FD491);
+ background: #00AEA0;
border-radius: 40rpx;
color: #FFFFFF;
}
diff --git a/subPackages/user/myAddressAdd.vue b/subPackages/user/myAddressAdd.vue
index 88333ef..5a1999c 100644
--- a/subPackages/user/myAddressAdd.vue
+++ b/subPackages/user/myAddressAdd.vue
@@ -27,7 +27,7 @@
设为默认:
-
+
@@ -90,7 +90,7 @@
getSeldCityList() {
let that = this
that.Post({}, '/api/areas/getAll').then(res => {
- if (res.code === 1) {
+ if (res.code === 1 || res.code==200) {
var data = res.data;
var result = {};
for (var i = 0; i < data.length; i++) {
@@ -280,7 +280,7 @@
detail_addr: this.detailAddr,
id: this.id || null
},'/api/user/' + (this.id > 0 ? 'edit' : 'add') + 'Consignee').then(res => {
- if(res.code == 1){
+ if(res.code == 1 || res.code == 200){
uni.setStorageSync('addressNow',JSON.stringify(res.data))
uni.showModal({
title: '提示',
@@ -373,11 +373,11 @@
.list-item-post {
display: flex;
- color: #000;
+ color: white;
font-size: 36rpx;
width: 697rpx;
height: 73rpx;
- background: linear-gradient(90deg, #9EE4FE, #7FD491);
+ background: #00AEA0;
border-radius: 37rpx;
justify-content: center;
align-items: center;
diff --git a/subPackages/user/myContactsAdd.vue b/subPackages/user/myContactsAdd.vue
index ae9ff16..c4d5cc6 100644
--- a/subPackages/user/myContactsAdd.vue
+++ b/subPackages/user/myContactsAdd.vue
@@ -6,13 +6,14 @@
-
+
+ 身份证号:
@@ -68,7 +69,7 @@
this.Post({
id: this.id
}, '/api/user/contactDetail').then(res => {
- if (res.code === 1) {
+ if (res.code === 1 || res.code == 200) {
res = res.data
if (res && res.id > 0) {
this.username = res.name
@@ -167,7 +168,7 @@
tel: this.mobile,
document_type: this.document_type
}, this.type=='edit'?'/api/user/editContact':'/api/user/addContact').then(res => {
- if (res.code == 1) {
+ if (res.code == 1 || res.code == 200) {
uni.showModal({
title: '提示',
content: '成功',
@@ -232,14 +233,14 @@
.btn {
width: 697rpx;
height: 80rpx;
- background: linear-gradient(90deg, #9EE4FE, #7FD491);
+ background: #00AEA0;
+ color: white;
border-radius: 40rpx;
text-align: center;
line-height: 80rpx;
font-size: 36rpx;
font-family: PingFang SC;
font-weight: 500;
- color: black;
position: absolute;
bottom: 53rpx;
left: 27rpx;
diff --git a/subPackages/user/profile.vue b/subPackages/user/profile.vue
index b5a8997..2341572 100644
--- a/subPackages/user/profile.vue
+++ b/subPackages/user/profile.vue
@@ -8,18 +8,13 @@
style="width: 80rpx;height: 80rpx;border-radius: 50%;">
-
+
姓名
{{nickname}}
性别
-
-
-
-
+ {{gender == 1 ? '男' : (gender == 2 ? '女' : '保密')}}
手机号
@@ -31,8 +26,20 @@
{{birthday}}
+
保存
+
+
+
+
+
@@ -55,6 +62,10 @@
{
value: '2',
text: '女'
+ },
+ {
+ value: '0',
+ text: '保密'
}
],
today: null,
@@ -183,8 +194,9 @@
day = day > 9 ? day : '0' + day;
return `${year}/${month}/${day}`;
},
- changesex(value) {
- this.gender = value.detail.value
+ changesex(index) {
+ this.gender = this.sexes[index].value
+ this.$refs.popup.close()
},
submit() {
uni.showModal({
@@ -220,7 +232,7 @@
}
-
diff --git a/subPackages/user/travelerList.vue b/subPackages/user/travelerList.vue
index 0e980ce..591f878 100644
--- a/subPackages/user/travelerList.vue
+++ b/subPackages/user/travelerList.vue
@@ -32,7 +32,7 @@
-
@@ -149,7 +149,7 @@
id: item.id,
is_default: 1
}, "/api/user/editContact").then(res => {
- if (res.code == 1) {
+ if (res.code == 1 || res.code == 200) {
this.travelList.forEach(i => i.is_default = 0)
item.is_default = !item.is_default
}
@@ -197,7 +197,7 @@
.active-bar{
width: 100%;
height: 11rpx;
- background: #71B580;
+ background: #00AEA0;
}
}