...
 
Commits (7)
    https://gitcode.net/landtiancai/mix-mall__dian_shang_xiang_mu_mo_ban/-/commit/85c73ad5e5349b87e2762a56bb8ed967288297fd Merge branch 'ydh' into 'master' 2022-07-09T16:49:03+08:00 北漂燕郊杨哥 admin@topit.cn ydh See merge request <a href="/landtiancai/mix-mall__dian_shang_xiang_mu_mo_ban/-/merge_requests/38" data-original="landtiancai/mix-mall__dian_shang_xiang_mu_mo_ban!38" data-link="false" data-link-reference="false" data-project="124928" data-merge-request="53624" data-project-path="landtiancai/mix-mall__dian_shang_xiang_mu_mo_ban" data-iid="38" data-mr-title="ydh" data-reference-type="merge_request" data-container="body" data-placement="top" title="" class="gfm gfm-merge_request">!38</a> https://gitcode.net/landtiancai/mix-mall__dian_shang_xiang_mu_mo_ban/-/commit/8fd440eb554dafcca2d03ca092bd6ba34a44ef67 Merge branch 'ydh' into 'master' 2022-07-11T00:20:57+08:00 北漂燕郊杨哥 admin@topit.cn ydh See merge request <a href="/landtiancai/mix-mall__dian_shang_xiang_mu_mo_ban/-/merge_requests/39" data-original="landtiancai/mix-mall__dian_shang_xiang_mu_mo_ban!39" data-link="false" data-link-reference="false" data-project="124928" data-merge-request="53836" data-project-path="landtiancai/mix-mall__dian_shang_xiang_mu_mo_ban" data-iid="39" data-mr-title="ydh" data-reference-type="merge_request" data-container="body" data-placement="top" title="" class="gfm gfm-merge_request">!39</a> https://gitcode.net/landtiancai/mix-mall__dian_shang_xiang_mu_mo_ban/-/commit/1d17e18ca805af4bc0a09b440bdfa7ca87ecfd60 用户信息h5端修改 2022-07-11T12:06:20+08:00 hey bei7ing@163.com https://gitcode.net/landtiancai/mix-mall__dian_shang_xiang_mu_mo_ban/-/commit/dff5083262c03ca980dda31f4baf6fd1b8ce38ed h5复制功能 2022-07-11T12:11:12+08:00 hey bei7ing@163.com https://gitcode.net/landtiancai/mix-mall__dian_shang_xiang_mu_mo_ban/-/commit/f8d20aa58fbc785d876c99af8a9e359e6ad2f956 登录调整 2022-07-13T17:55:55+08:00 hey bei7ing@163.com https://gitcode.net/landtiancai/mix-mall__dian_shang_xiang_mu_mo_ban/-/commit/93b338375eae974b437d206258c3569e01931dea Merge branch 'ydh' into 'master' 2022-07-14T07:26:52+08:00 北漂燕郊杨哥 admin@topit.cn ydh See merge request <a href="/landtiancai/mix-mall__dian_shang_xiang_mu_mo_ban/-/merge_requests/40" data-original="landtiancai/mix-mall__dian_shang_xiang_mu_mo_ban!40" data-link="false" data-link-reference="false" data-project="124928" data-merge-request="54028" data-project-path="landtiancai/mix-mall__dian_shang_xiang_mu_mo_ban" data-iid="40" data-mr-title="ydh" data-reference-type="merge_request" data-container="body" data-placement="top" title="" class="gfm gfm-merge_request">!40</a> https://gitcode.net/landtiancai/mix-mall__dian_shang_xiang_mu_mo_ban/-/commit/718e26cb77bcb16de8d8b994c8ebb10ad2886962 ydh 2022-09-28T13:45:39+08:00 ydh yangdaohui@wdmcake.com
......@@ -85,8 +85,9 @@
'paytype':that.payType
}, res => {
console.log("pay client:" +that.$api.req.client)
console.log(res)
if (res.status == 0) {
if(paytype ==1){
if(that.paytype ==1){
if(that.$api.req.client=="WECHAT"){
var data = res.data
that.paydata = res.data;
......@@ -97,9 +98,10 @@
}
}
if(paytype ==2){
if(that.paytype ==2){
console.log("pay type:" +that.paytype)
if(that.$api.req.client=="H5"){
location.href = res.payurl;
location.href = res.data.payurl;
}
}
......@@ -110,7 +112,7 @@
showCancel: false,
success: function(res) {
uni.redirectTo({
url: '../order/order?status=1'
url: '../order/order?state=1'
})
}
})
......
......@@ -5,14 +5,19 @@
<image class="m-pic" src="/static/set-nickname.png"></image>
<text class="cell-tit">&nbsp;&nbsp;&nbsp;&nbsp;</text>
</view>
<text class="cell-more">{{userInfo.nickname}}</text>
<text class="cell-more">{{userInfo.nickname?userInfo.nickname:'游客'}}</text>
</view>
<view class="list-cell m-t" @click="alterHeade()">
<view class="m-items">
<image class="m-pic" src="/static/set-head.png"></image>
<text class="cell-tit">&nbsp;&nbsp;&nbsp;&nbsp;</text>
</view>
<!-- #ifdef MP-WEIXIN-->
<image class="m-head" :src="userInfo.portrait"></image>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<image class="m-head" :src="userInfo.cover_image?userInfo.cover_image:'/static/missing-face.png'"></image>
<!-- #endif -->
</view>
<view class="list-cell m-t" @click="navTo('/pages/setPhone/setPhone')">
<view class="m-items">
......@@ -101,8 +106,11 @@
content: '确定要退出登录么',
success: (e) => {
if (e.confirm) {
this.$api.req.userLogout({}, res => {
that.navTo('/pages/index/index');
this.$api.req.userLogout({}, res => {
uni.clearStorageSync();
uni.switchTab({
url: '/pages/index/index'
});
});
}
}
......
......@@ -3,7 +3,13 @@
<view class="user-section">
<view class="user-info-box">
<view class="portrait-box">
<!-- #ifdef MP-WEIXIN-->
<image class="portrait" :src="userInfo.portrait"></image>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<image class="portrait" :src="userInfo.cover_image?userInfo.cover_image:'/static/missing-face.png'">
</image>
<!-- #endif -->
</view>
<view class="info-box">
<text class="username">{{userInfo.nickname}}</text>
......@@ -12,14 +18,16 @@
</view>
<view class="info-desc" v-if="userInfo.walletaddress!==''">
<view class="desc">区块链地址:{{userInfo.walletaddress}}</view>
<image src="/static/menu-copy.png" @click="copyConnection(userInfo.walletaddress)" align="right" class="menu-copy"></image>
<image src="/static/menu-copy.png" @click="copyConnection(userInfo.walletaddress)" align="right"
class="menu-copy"></image>
</view>
<!-- <view class="menuCode">
<image class="code" src="/static/menu-code.png"></image>
</view> -->
</view>
<view class="cover-container" @touchstart="coverTouchstart" @touchmove="coverTouchmove" @touchend="coverTouchend">
<view class="cover-container" @touchstart="coverTouchstart" @touchmove="coverTouchmove"
@touchend="coverTouchend">
<view class="history-section icon">
<view class="view-item" @click="navTo('/pages/order/order?state=0')">
<view class="item">
......@@ -99,9 +107,9 @@
},
onLoad() {
// this.getUerInfo();
},
onShow(){
this.getUerInfo();
},
onShow() {
this.getUerInfo();
},
// #ifndef MP
onNavigationBarButtonTap(e) {
......@@ -128,7 +136,16 @@
getUerInfo() {
let that = this;
this.$api.req.getUserInfo({}, res => {
if (res.data.isLogin) that.userInfo = res.data.userInfo;
if (res.data.isLogin) {
that.userInfo = res.data.userInfo;
} else {
Object.assign(that.userInfo, {
nickname: "游客",
portrait: "/static/missing-face.png",
phone: "欢迎您!",
walletaddress: ""
});
}
});
},
......
......@@ -6,52 +6,80 @@ Vue.mixin({
userInfo: {
nickname: "游客",
portrait: "/static/missing-face.png",
phone: "欢迎您!",
walletaddress:""
phone: "欢迎您!",
walletaddress: ""
},
}
},
methods: {
methods: {
//跳转
navTo(url) {
uni.navigateTo({
url
});
},
},
//返回带刷新
back() {
uni.$emit('refreshData');
uni.navigateBack({
delta: 1
})
},
// 复制功能
copyConnection(getData) {
var _this = this;
// #ifndef H5
uni.getClipboardData({
success: function(res) {
console.log(res.data);
}
})
uni.setClipboardData({
data: getData,
success: function() {
uni.showToast({
icon: 'success',
title: "复制成功",
duration: 2000,
});
}
})
// #endif
},
// 数字前面补零
seqid00000(num, length) {
for (var len = (num + "").length; len < length; len = num.length) {
num = "0" + num;
}
return num;
},
// 复制功能
copyConnection(getData) {
var _this = this;
// #ifndef H5
uni.getClipboardData({
success: function(res) {
console.log(res.data);
}
})
uni.setClipboardData({
data: getData,
success: function() {
uni.showToast({
icon: 'success',
title: "复制成功",
duration: 2000,
});
}
})
// #endif
//#ifdef H5
const result = this.h5Copy(getData)
if (result === false) {
uni.showToast({
title: '不支持',
})
} else {
uni.showToast({
title: '复制成功',
icon: 'none'
})
}
// #endif
},
// 数字前面补零
seqid00000(num, length) {
for (var len = (num + "").length; len < length; len = num.length) {
num = "0" + num;
}
return num;
},
h5Copy(content) {
if (!document.queryCommandSupported('copy')) {
// 不支持
return false
}
let textarea = document.createElement("textarea")
textarea.value = content
textarea.readOnly = "readOnly"
document.body.appendChild(textarea)
textarea.select() // 选择对象
textarea.setSelectionRange(0, content.length) //核心
let result = document.execCommand("copy") // 执行浏览器复制命令
textarea.remove()
return result
}
}
});