Browse Source

网络修复

master
zhengshuiqi 4 years ago
parent
commit
c12d36d83d
  1. 22
      App.vue
  2. 44
      common/common.scss
  3. 2
      manifest.json
  4. 38
      package-lock.json
  5. 21
      pages/account/addAddress.vue
  6. 21
      pages/account/address.vue
  7. 23
      pages/account/changeImg.vue
  8. 23
      pages/account/deleteCount.vue
  9. 23
      pages/account/deleteOk.vue
  10. 21
      pages/account/demo1.vue
  11. 21
      pages/account/favorites.vue
  12. 21
      pages/account/index.vue
  13. 21
      pages/account/message.vue
  14. 23
      pages/account/myCoupons.vue
  15. 21
      pages/account/myOrders.vue
  16. 311
      pages/account/myProfile.vue
  17. 21
      pages/account/myReview.vue
  18. 21
      pages/account/pointsDetails.vue
  19. 226
      pages/account/settings.vue
  20. 21
      pages/account/wishlist.vue
  21. 21
      pages/category/index.vue
  22. 22
      pages/category/productList.vue
  23. 21
      pages/index/address.vue
  24. 21
      pages/index/first.vue
  25. 21
      pages/index/flashSale.vue
  26. 2
      pages/index/index.vue
  27. 21
      pages/index/index2.vue
  28. 20
      pages/index/pickUpCentre.vue
  29. 21
      pages/index/search.vue
  30. 21
      pages/login/changePwd.vue
  31. 29
      pages/login/index.vue
  32. 21
      pages/login/verifyEmail.vue
  33. 25
      pages/order/additems.vue
  34. 21
      pages/order/confirmation.vue
  35. 21
      pages/order/details.vue
  36. 21
      pages/order/logisticsDetails.vue
  37. 21
      pages/order/paySuccess.vue
  38. 21
      pages/order/paypalWebview.vue
  39. 21
      pages/order/refund.vue
  40. 23
      pages/order/refundDetails.vue
  41. 25
      pages/productDetails/goodsReview.vue
  42. 35
      pages/productDetails/index.vue
  43. 26
      pages/productDetails/review.vue
  44. 26
      pages/shippingCart/index.vue
  45. 103
      pages/specialTitle/index.vue
  46. 25
      pages/specialTitle/index2.vue
  47. 18
      uni.scss

22
App.vue

@ -8,13 +8,15 @@
data() { data() {
return { return {
globalData:{ globalData:{
error:'',//
userinfo:'',
}, },
backButtonPress: 0, backButtonPress: 0,
} }
}, },
onLaunch: function() { onLaunch: function() {
uni.hideTabBar() uni.hideTabBar()
setTimeout(() => { setTimeout(() => {
}, 2400); }, 2400);
@ -74,27 +76,25 @@
onShow: function() { onShow: function() {
console.log('App Show')
console.log('App Show') console.log('App Show')
console.log('11111') console.log('11111')
console.log(this.$store.state.hasNEt); console.log(this.$store.state.hasNet);
let that = this; const that = this;
uni.onNetworkStatusChange(function(res) { uni.onNetworkStatusChange(function(res) {
console.log(res); console.log(res);
if (res.isConnected) { if (res.isConnected) {
that.$store.commit("changeNetStatus", true); that.$store.commit("changeNetStatus", true);
uni.showToast({ // uni.showToast({
title: "有网络", // title: "Please connect to the network",
icon: "none", // icon: "none",
duration: 200000 // })
})
console.log('有网络'); console.log('有网络');
} else { } else {
that.$store.commit("changeNetStatus", false); that.$store.commit("changeNetStatus", false);
uni.showToast({ uni.showToast({
title:"无网络", title:"Please connect to the network",
icon: "none", icon: "none",
duration: 200000 duration: 2000
}) })
console.log('无网络'); console.log('无网络');
} }

44
common/common.scss

@ -1167,26 +1167,26 @@
} }
} }
} }
.uni-page-refresh { // .uni-page-refresh {
background: #000 !important; // background: #000 !important;
color: #630102 !important; // color: #630102 !important;
} // }
.uni-page-refresh__spinner { // .uni-page-refresh__spinner {
color: #630102 !important; // color: #630102 !important;
} // }
.uni-page-refresh__path { // .uni-page-refresh__path {
color: #630102 !important; // color: #630102 !important;
stroke: rgb(99, 1, 2); // stroke: rgb(99, 1, 2);
} // }
.uni-toast .uni-sample-toast { // .uni-toast .uni-sample-toast {
color: #630102 !important; // color: #630102 !important;
} // }
/deep/ .uni-toast .uni-simple-toast__text { // /deep/ .uni-toast .uni-simple-toast__text {
background-color: #000 !important; // background-color: #000 !important;
color: #630102 !important; // color: #630102 !important;
} // }
uni-toast .uni-simple-toast__text { // uni-toast .uni-simple-toast__text {
background-color: #000 !important; // background-color: #000 !important;
color: #630102 !important; // color: #630102 !important;
} // }

2
manifest.json

@ -3,7 +3,7 @@
"appid" : "__UNI__9088064", "appid" : "__UNI__9088064",
// "appid" : "__UNI__7D4CA0F", // "appid" : "__UNI__7D4CA0F",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.1.0",
"versionCode" : 100, "versionCode" : 100,
"transformPx" : false, "transformPx" : false,
// "targetSdkVersion" : 31, // "targetSdkVersion" : 31,

38
package-lock.json

@ -1,6 +1,42 @@
{ {
"name": "PLUS",
"lockfileVersion": 2,
"requires": true, "requires": true,
"lockfileVersion": 1, "packages": {
"": {
"dependencies": {
"base-64": "^1.0.0",
"crypto-js": "^4.1.1",
"vuex": "^4.0.2"
}
},
"node_modules/@vue/devtools-api": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.2.1.tgz",
"integrity": "sha512-OEgAMeQXvCoJ+1x8WyQuVZzFo0wcyCmUR3baRVLmKBo1LmYZWMlRiXlux5jd0fqVJu6PfDbOrZItVqUEzLobeQ=="
},
"node_modules/base-64": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz",
"integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg=="
},
"node_modules/crypto-js": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz",
"integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw=="
},
"node_modules/vuex": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-4.0.2.tgz",
"integrity": "sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==",
"dependencies": {
"@vue/devtools-api": "^6.0.0-beta.11"
},
"peerDependencies": {
"vue": "^3.0.2"
}
}
},
"dependencies": { "dependencies": {
"@vue/devtools-api": { "@vue/devtools-api": {
"version": "6.2.1", "version": "6.2.1",

21
pages/account/addAddress.vue

@ -475,6 +475,27 @@
} }
}, },
onLoad(e) { onLoad(e) {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.getCountry() this.getCountry()
if(e.type==1){ if(e.type==1){

21
pages/account/address.vue

@ -113,6 +113,27 @@
this.getList() this.getList()
}, },
onLoad(e) { onLoad(e) {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
if(e.type==1){ if(e.type==1){
this.type=1 this.type=1
} }

23
pages/account/changeImg.vue

@ -57,7 +57,28 @@
} }
}, },
onLoad() { onLoad() {
this.getimglist() let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.getimglist()
}, },
onShow() { onShow() {

23
pages/account/deleteCount.vue

@ -36,6 +36,29 @@
} }
} }
}, },
onLaunch() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
},
methods:{ methods:{
getuserinfo(){ getuserinfo(){
let data={_action:'getinfo'} let data={_action:'getinfo'}

23
pages/account/deleteOk.vue

@ -20,6 +20,29 @@
} }
}, },
onLaunch() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
},
methods:{ methods:{
back(){ back(){

21
pages/account/demo1.vue

@ -120,6 +120,27 @@
uni.showTabBar() uni.showTabBar()
}, },
onLoad() { onLoad() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.getList() this.getList()
}, },

21
pages/account/favorites.vue

@ -212,6 +212,27 @@
} }
}, },
onLoad() { onLoad() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.getList() this.getList()
} }
} }

21
pages/account/index.vue

@ -452,6 +452,27 @@
}, },
}, },
onLoad(e) { onLoad(e) {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
uni.hideTabBar() uni.hideTabBar()
this.isLogin = uni.getStorageSync('isLogin') this.isLogin = uni.getStorageSync('isLogin')
// this.tarbar[2].src = uni.getStorageSync('midButton') // this.tarbar[2].src = uni.getStorageSync('midButton')

21
pages/account/message.vue

@ -219,6 +219,27 @@
} }
}, },
onLoad() { onLoad() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
// this.getList() // this.getList()
this.getMes() this.getMes()
} }

23
pages/account/myCoupons.vue

@ -39,6 +39,29 @@
list:[] list:[]
} }
}, },
onLaunch() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
},
methods:{ methods:{
getList(){ getList(){
let data={_action:'getuserbonus'} let data={_action:'getuserbonus'}

21
pages/account/myOrders.vue

@ -793,6 +793,27 @@
this.getList() this.getList()
}, },
onLoad(e) { onLoad(e) {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.scrollChange(0) this.scrollChange(0)
this.scroll_active = e.scroll_active this.scroll_active = e.scroll_active
this.scrollChange(e.index) this.scrollChange(e.index)

311
pages/account/myProfile.vue

@ -1,16 +1,16 @@
<template> <template>
<view> <view>
<view class="profile_item profile_item1" @click="gotochange"> <view class="profile_item profile_item1" @click="gotochange">
<text>Photo</text> <text>Photo</text>
<view class="profile_item_right"> <view class="profile_item_right">
<image src="../../static/img/logo.png" mode="" class="head_img" v-show="!user_info.isLogin"></image> <image src="../../static/img/logo.png" mode="" class="head_img" v-show="!user_info.isLogin"></image>
<image :src="user_info.user_head" mode="" class="head_img" ></image> <image :src="user_info.user_head" mode="" class="head_img"></image>
<image src="../../static/img/right1.png" alt="" class="right_img"></image> <image src="../../static/img/right1.png" alt="" class="right_img"></image>
</view> </view>
</view> </view>
<view class="profile_item "> <view class="profile_item ">
<!-- <view class="profile_item " @click="$refs.inputDialog.open()"> --> <!-- <view class="profile_item " @click="$refs.inputDialog.open()"> -->
<text>Name</text> <text>Name</text>
<view class="profile_item_right"> <view class="profile_item_right">
<text>{{user_info.nickname}}</text> <text>{{user_info.nickname}}</text>
@ -18,16 +18,18 @@
<!-- <image v-show="" src="../../static/img/right1.png" alt="" class="right_img"></image> --> <!-- <image v-show="" src="../../static/img/right1.png" alt="" class="right_img"></image> -->
</view> </view>
</view> </view>
<view class="profile_item "> <view class="profile_item " @click="ss">
<!-- <view class="profile_item " @click="$refs.inputDialog.open()"> -->
<text>Email</text> <text>Email</text>
<view @click="goEmail" class="profile_item_right"> <view class="profile_item_right">
<image src="../../static/img/gantan.png" alt="" class="right_img1" v-if="user_info.is_validated==0"></image> <image src="../../static/img/gantan.png" alt="" class="right_img1" v-if="user_info.is_validated==0">
</image>
<image src="../../static/img/qr.png" alt="" class="right_img1" v-if="user_info.is_validated!=0"></image> <image src="../../static/img/qr.png" alt="" class="right_img1" v-if="user_info.is_validated!=0"></image>
<text>{{user_info.is_validated==0?'Unverified':''+user_info.email}}</text> <text>{{user_info.is_validated==0?'Unverified':''+user_info.email}}</text>
<image src="../../static/img/right1.png" alt="" class="right_img"></image> <image src="../../static/img/right1.png" alt="" class="right_img"></image>
</view> </view>
</view> </view>
<navigator :url="'/pages/login/verifyEmail?type=0&email='+user_info.email" > <navigator :url="'/pages/login/verifyEmail?type=0&email='+user_info.email">
<view class="profile_item "> <view class="profile_item ">
<text>Change Password</text> <text>Change Password</text>
<view class="profile_item_right"> <view class="profile_item_right">
@ -35,7 +37,7 @@
</view> </view>
</view> </view>
</navigator> </navigator>
<view class="profile_item" @click="gotoaddress"> <view class="profile_item" @click="gotoaddress">
<text>Ship to</text> <text>Ship to</text>
<view class="profile_item_right"> <view class="profile_item_right">
<!-- <text>{{addressDate.country_name || 'United States'}}</text> --> <!-- <text>{{addressDate.country_name || 'United States'}}</text> -->
@ -43,7 +45,7 @@
<image src="../../static/img/right1.png" alt="" class="right_img"></image> <image src="../../static/img/right1.png" alt="" class="right_img"></image>
</view> </view>
</view> </view>
<navigator url="/pages/account/deleteCount" > <navigator url="/pages/account/deleteCount">
<view class="profile_item "> <view class="profile_item ">
<text>Delete account</text> <text>Delete account</text>
<view class="profile_item_right"> <view class="profile_item_right">
@ -51,108 +53,243 @@
</view> </view>
</view> </view>
</navigator> </navigator>
<uni-popup ref="inputDialog" type="dialog"> <uni-popup ref="inputDialog" type="dialog" :mask-click="false">
<uni-popup-dialog ref="inputClose" mode="input" title="Edit Name" cancelText="Cancel" confirmText="OK" <view style=" position: absolute;top: 45%;left: 50%;transform: translate(-50%, -50%);color: #909399;">{{query.email}}</view>
placeholder="please enter your name" @confirm="dialogInputConfirm"></uni-popup-dialog> <uni-popup-dialog ref="inputClose" title="Email verification" cancelText="Cancel"
confirmText="Verify" :before-close="true" @close="close"
@confirm="dialogInputConfirm">
</uni-popup-dialog>
<view class="get" style="position: absolute;right: 21px;bottom: 12px;" @tap="getCheckNum()">
<text>{{!codeTime?'':codeTime+'s'}}</text>
</view>
</uni-popup> </uni-popup>
</view> </view>
</template> </template>
<script> <script>
import {defaultRequest,defaultRequest2} from '../../api/index.js' import {
defaultRequest,
defaultRequest2
} from '../../api/index.js'
export default { export default {
data() { data() {
return { return {
user_info:{ value: '',
isLogin:false, codeTime:0,
second: 60,
showText: true,
user_info: {
isLogin: false,
}, },
query:{ query: {
_action:'updateinfo', _action: 'updateinfo',
nickname:'', nickname: '',
user_head:'' user_head: '',
email: ''
}, },
addressDate:{}, query2: {
country:'' _action: 'sendmessagesforvalidation',
username: '',
// password: '',
},
addressDate: {},
country: ''
} }
}, },
methods:{ methods: {
ss() {
if (this.user_info.is_validated == 0) {
this.$refs.inputDialog.open()
} else {
}
},
getCheckNum() {
},
inputpassword(e) {
console.log(e);
this.$refs.inputDialog.open()
},
close() {
this.$refs.inputDialog.close()
},
change(e) {
this.show = e.show
},
// //
gotochange(){ gotochange() {
uni.navigateTo({ uni.navigateTo({
url:'./changeImg' url: './changeImg'
}) })
}, },
getaddress(){ getaddress() {
let data ={ let data = {
_action:'getregions',parent_region_id:0 _action: 'getregions',
parent_region_id: 0
} }
defaultRequest(data).then( res =>{ defaultRequest(data).then(res => {
console.log(JSON.parse(res),'p') console.log(JSON.parse(res), 'p')
}) })
}, },
// //
getDefaultAddress(){ getDefaultAddress() {
let data={_action:'getdefaultconsignee'} let data = {
defaultRequest2(data).then(res=>{ _action: 'getdefaultconsignee'
}
defaultRequest2(data).then(res => {
console.info(res) console.info(res)
if(res.error==0){ if (res.error == 0) {
this.addressDate=res.data this.addressDate = res.data
} }
}) })
}, },
getUserInfo(){ getUserInfo() {
let data={_action:'getinfo'} let data = {
defaultRequest2(data).then(res=>{ _action: 'getinfo'
console.info(res,'pph') }
if(res.error==0){ defaultRequest2(data).then(res => {
res.data.isLogin=true // console.info(res, 'pph')
this.user_info=res.data if (res.error == 0) {
uni.setStorageSync('user_info',this.user_info) res.data.isLogin = true
this.user_info = res.data
uni.setStorageSync('user_info', this.user_info)
// this.user_info=uni.getStorageSync('user_info') // this.user_info=uni.getStorageSync('user_info')
} } else {
else{ this.user_info = uni.getStorageSync('user_info')
this.user_info=uni.getStorageSync('user_info')
} }
}) })
}, },
dialogInputConfirm(val){ //
this.query.nickname=val dialogInputConfirm(e) {
this.query.user_head = this.user_info.user_head uni.showToast({
defaultRequest2(this.query).then(res=>{ title: 'We have sent you an email with a link to verify your email address. Please click on it to verify your account.',
console.info(res,'///') icon: "none"
if(res.error==0){ })
uni.showToast({ //
title:'OK', if (this.codeTime > 0) {
icon:'none' uni.showToast({
}) title: 'Please wait',
icon: "none"
});
return;
} else {
this.codeTime = 60
let timer = setInterval(() => {
this.codeTime--;
if (this.codeTime < 1) {
clearInterval(timer);
this.codeTime = 0
}
}, 1000)
}
//
console.log('===========',e)
console.log('===========', this.user_info.nickname)
this.query2.password = e
this.query2.username = this.user_info.nickname
// setTimeout(() => {
// //
// uni.showToast({
// title: this.second,
// duration: 600,
// icon: "none"
// })
// }, 2000)
// val = this.query.email
// this.query.user_head = this.user_info.user_head
if (this.query2.username !== '') {
this.query2.username = ''
// uni.showToast({
// title: '',
// icon: 'none'
// })
}else {
// uni.showToast({
// title: '',
// icon: 'none'
// })
}
console.log('this.query2', this.query2)
defaultRequest2(this.query2).then(res => {
console.info(res, '///')
if (res.error == 0) {
// this.query2.username = ''
// uni.showToast({
// title: res.message,
// icon: 'none'
// })
this.getUserInfo() this.getUserInfo()
} else {
// console.log(1111111);
// uni.showToast({
// title: res.message,
// icon: 'none',
// duration: 6666
// })
} }
}) })
}, },
gotoaddress(){ gotoaddress() {
uni.navigateTo({ uni.navigateTo({
url:'../index/address' url: '../index/address'
}) })
}, },
goEmail() { goEmail() {
uni.navigateTo({ // uni.navigateTo({
url:'../login/verifyEmail' // url:'../login/verifyEmail'
}) // })
} }
}, },
onLoad(e) { onLoad(e) {
console.log(e,'address') console.log('====', e)
this.country=uni.getStorageSync('country') let that = this;
console.log(this.country) let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
console.log(e, 'address')
this.country = uni.getStorageSync('country')
console.log(this.country)
console.info(e)
this.type = e.type
if (e.type != 0) {
this.query.email = e.password
this.query.username = e.email
} else {
}
this.username = e.email
this.sendresetcode()
}, },
onShow() { onShow() {
this.user_info=uni.getStorageSync('user_info') this.user_info = uni.getStorageSync('user_info')
console.log(this.user_info,'ppppp') console.log(this.user_info, 'ppppp')
console.log(this.user_info.email);
this.query.email = this.user_info.email.substring(0, 3) + '****' + this.user_info.email.substring(7);
console.log(this.query.email);
this.getUserInfo() this.getUserInfo()
this.getDefaultAddress() this.getDefaultAddress()
} }
@ -160,15 +297,13 @@
</script> </script>
<style> <style>
page{ page {
border-top: 13.33rpx #F7F7F7 solid; border-top: 13.33rpx #F7F7F7 solid;
padding-left: 26.67rpx; padding-left: 26.67rpx;
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.profile_item {
.profile_item{
width: 97%; width: 97%;
display: flex; display: flex;
margin-right: 3%; margin-right: 3%;
@ -176,36 +311,40 @@
justify-content: space-between; justify-content: space-between;
font-size: 24rpx; font-size: 24rpx;
font-weight: bold; font-weight: bold;
padding: 40rpx 0rpx; padding: 40rpx 0rpx;
padding-right: 30.33rpx; padding-right: 30.33rpx;
border-bottom: 1.33rpx #ECECEC solid; border-bottom: 1.33rpx #ECECEC solid;
box-sizing: border-box; box-sizing: border-box;
.profile_item_right{ .profile_item_right {
display: flex; display: flex;
align-items: center; align-items: center;
.head_img{
.head_img {
width: 112rpx; width: 112rpx;
height: 112rpx; height: 112rpx;
border-radius: 50%; border-radius: 50%;
} }
.right_img{
.right_img {
width: 18.67rpx; width: 18.67rpx;
height: 18.67rpx; height: 18.67rpx;
margin-left: 20rpx; margin-left: 20rpx;
} }
.right_img1{
.right_img1 {
width: 25.33rpx; width: 25.33rpx;
height: 25.33rpx; height: 25.33rpx;
margin-right: 9.33rpx; margin-right: 9.33rpx;
} }
} }
} }
.profile_item1{
.profile_item1 {
padding: 17.33rpx 0rpx; padding: 17.33rpx 0rpx;
padding-right: 33.33rpx; padding-right: 33.33rpx;
} }
</style> </style>

21
pages/account/myReview.vue

@ -116,6 +116,27 @@
}, },
}, },
onLoad(e) { onLoad(e) {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.query.goods_id=e.goods_id this.query.goods_id=e.goods_id
this.getList() this.getList()
}, },

21
pages/account/pointsDetails.vue

@ -65,6 +65,27 @@
} }
}, },
onLoad() { onLoad() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.getUserinfo() this.getUserinfo()
defaultRequest(this.query).then( res => { defaultRequest(this.query).then( res => {
console.log(res,'p') console.log(res,'p')

226
pages/account/settings.vue

@ -8,15 +8,15 @@
<text>Language</text> <text>Language</text>
<image src="../../static/img/right1.png" mode="" class="right_img"></image> <image src="../../static/img/right1.png" mode="" class="right_img"></image>
</view> --> </view> -->
<view class="profile_item "@click="gotopage(1)"> <view class="profile_item " @click="gotopage(1)">
<text>My account</text> <text>My account</text>
<image src="../../static/img/right1.png" mode="" class="right_img"></image> <image src="../../static/img/right1.png" mode="" class="right_img"></image>
</view> </view>
<view class="profile_item "@click="gotopage(2)"> <view class="profile_item " @click="gotopage(2)">
<text>Privacy policy</text> <text>Privacy policy</text>
<image src="../../static/img/right1.png" mode="" class="right_img"></image> <image src="../../static/img/right1.png" mode="" class="right_img"></image>
</view> </view>
<view class="profile_item "@click="gotopage(3)"> <view class="profile_item " @click="gotopage(3)">
<text>Legal</text> <text>Legal</text>
<image src="../../static/img/right1.png" mode="" class="right_img"></image> <image src="../../static/img/right1.png" mode="" class="right_img"></image>
</view> </view>
@ -25,23 +25,57 @@
</view> </view>
<view class="edition"> <view class="edition">
<view class="edition_title">DOPE PLUS</view> <view class="edition_title">DOPE PLUS</view>
<text>Version {{appver}}</text> <text @click="bb">Version {{appver}}</text>
</view> </view>
<!-- Download -->
<uni-popup ref="inputDialog" type="dialog" :mask-click="false">
<uni-popup-dialog ref="inputClose" title="Updated version" cancelText="Cancel" confirmText="Download"
@confirm="dialogInputConfirm">
<view>
{{titleDow}}
</view>
<a style="position: absolute;right: 0px;bottom: 0%;width: 50%;height: 44px;z-index: 111;"></a>
</uni-popup-dialog>
</uni-popup>
</view> </view>
</template> </template>
<script> <script>
import {defaultRequest2} from '../../api/index.js' import {
defaultRequest2
} from '../../api/index.js'
export default { export default {
data() { data() {
return { return {
appver:'', appver: '',
ver_url: '',
titleDow: ''
} }
}, },
methods:{ onShow() {
signOut(){ this.getAppnum()
let data={_action:'logout'} },
methods: {
close() {
this.$refs.inputDialog.close()
},
bb() {
console.log();
this.$refs.inputDialog.open()
let data = {
_action: 'getnewversion'
}
defaultRequest2(data).then(res => {
console.log(res)
this.titleDow = res.data.ver_text
})
},
signOut() {
let data = {
_action: 'logout'
}
uni.showModal({ uni.showModal({
title: 'Confirm SING OUT?', title: 'Confirm SING OUT?',
cancelText: "cancel", // cancelText: "cancel", //
@ -50,89 +84,133 @@
// confirmColor:'#ccc', // confirmColor:'#ccc',
// cancelColor: '#000', // cancelColor: '#000',
success: (res) => { success: (res) => {
if(res.confirm) { if (res.confirm) {
console.log('comfirm') console.log('comfirm')
defaultRequest2(data).then(res=>{ defaultRequest2(data).then(res => {
console.info(res) console.info(res)
if(res.error==0){ if (res.error == 0) {
// uni.clearStorageSync() // uni.clearStorageSync()
uni.setStorageSync('isLogin',0) uni.setStorageSync('isLogin', 0)
uni.setStorageSync('user_info',' ') uni.setStorageSync('user_info', ' ')
// uni.reLaunch({ // uni.reLaunch({
// url:'../login/index' // url:'../login/index'
// }) // })
uni.navigateTo({ uni.navigateTo({
url:'../login/index' url: '../login/index'
}) })
} }
}) })
} else { } else {
console.log('cancel') console.log('cancel')
} }
} }
}) })
}, },
gotopage(a){ gotopage(a) {
if(a==1){ if (a == 1) {
uni.navigateTo({ uni.navigateTo({
url:'./myProfile' url: './myProfile'
}) })
}else if(a==2) { } else if (a == 2) {
var urlStr = encodeURI("https://en.meixx.com/help/privacy.html") var urlStr = encodeURI("https://en.meixx.com/help/privacy.html")
// plus.runtime.openURL(urlStr); // plus.runtime.openURL(urlStr);
uni.navigateTo({ uni.navigateTo({
url:'../order/paypalWebview?src='+urlStr url: '../order/paypalWebview?src=' + urlStr
}) })
} } else {
else{
var urlStr2 = encodeURI("https://dopeplus.com/help/Terms.html") var urlStr2 = encodeURI("https://dopeplus.com/help/Terms.html")
// plus.runtime.openURL(urlStr); // plus.runtime.openURL(urlStr);
uni.navigateTo({ uni.navigateTo({
url:'../order/paypalWebview?src='+urlStr2 url: '../order/paypalWebview?src=' + urlStr2
}) })
} }
}, },
getAppnum(){
// Download
dialogInputConfirm(e) {
let data = {
_action: 'getnewversion'
}
defaultRequest2(data).then(res => {
console.log(res)
this.ver_url = res.data.ver_url
console.log(this.ver_url);
plus.runtime.openURL(this.ver_url)
})
},
getAppnum() {
let data = { let data = {
_action:'getnewversion' // _action: 'getnewversion',
_action: 'getnewversion',
} }
defaultRequest2(data).then(res =>{ defaultRequest2(data).then(res => {
const that = this
console.log(res) console.log(res)
if(res.error == 0){ res.data = that.ver_url
let v = uni.getStorageSync('appdata') if (res.error == 0) {
console.log(v) let e = uni.getStorageSync('appdata')
if(!res.data.ver_name){ console.log(e)
this.appver = v.appver if (!res.data.ver_name) {
}else{ e.appver = '1.1.0'
this.appver = res.data.ver_name that.appver = e.appver
uni.setStorageSync('appver', e.appver)
uni.getStorageSync('appver', e.appver)
that.appver = e.appver
console.log(that.appver);
} else {
that.appver = res.data.ver_name
console.log(that.appver);
} }
uni.setStorage({
key: that.appver,
success: function() {
console.log("存储成功+++++++++++++++++++++++++++++")
}
})
} }
}) })
} },
}, },
onLoad() { onLoad() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.getAppnum() this.getAppnum()
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
page{ page {
border-top: 14.67rpx #F7F7F7 solid; border-top: 14.67rpx #F7F7F7 solid;
padding-left: 26.67rpx; padding-left: 26.67rpx;
box-sizing: border-box; box-sizing: border-box;
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
page{ page {}
} .profile_item {
.profile_item{
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
@ -143,23 +221,25 @@
padding-right: 33.33rpx; padding-right: 33.33rpx;
border-bottom: 1.33rpx #ECECEC solid; border-bottom: 1.33rpx #ECECEC solid;
box-sizing: border-box; box-sizing: border-box;
.right_img{ .right_img {
width: 18.67rpx; width: 18.67rpx;
height: 18.67rpx; height: 18.67rpx;
margin-left: 20rpx; margin-left: 20rpx;
} }
} }
.profile_item:last-child{
.profile_item:last-child {
border-bottom: none; border-bottom: none;
} }
.set_button{
.set_button {
width: 686.67rpx; width: 686.67rpx;
height: 73.33rpx; height: 73.33rpx;
margin-top: 133.33rpx; margin-top: 133.33rpx;
button{ button {
background-color: #191919; background-color: #191919;
font-size: 26.67rpx; font-size: 26.67rpx;
color: white; color: white;
@ -169,7 +249,8 @@
border-radius: 0; border-radius: 0;
} }
} }
.edition{
.edition {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
@ -178,9 +259,10 @@
text-align: center; text-align: center;
font-weight: bold; font-weight: bold;
margin-bottom: 112rpx; margin-bottom: 112rpx;
.edition_title{
.edition_title {
font-size: 25.33rpx; font-size: 25.33rpx;
margin-bottom: 16rpx; margin-bottom: 16rpx;
} }
} }
</style> </style>

21
pages/account/wishlist.vue

@ -597,6 +597,27 @@
}, },
}, },
onLoad() { onLoad() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.getList() this.getList()
// uni.startPullDownRefresh() // uni.startPullDownRefresh()
// uni.clearStorage() // uni.clearStorage()

21
pages/category/index.vue

@ -124,6 +124,27 @@
}, },
onLoad() { onLoad() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.getList() this.getList()
this.getCartNum() this.getCartNum()
uni.hideTabBar() uni.hideTabBar()

22
pages/category/productList.vue

@ -514,7 +514,27 @@
} }
}, },
onLoad(e) { onLoad(e) {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
console.log(e) console.log(e)
if (e.first) { if (e.first) {
this.first = e.first this.first = e.first

21
pages/index/address.vue

@ -55,6 +55,27 @@
} }
}, },
async onLoad() { async onLoad() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
await this.getaddress() await this.getaddress()
}, },

21
pages/index/first.vue

@ -35,6 +35,27 @@
}, },
onLoad() { onLoad() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.getMes() this.getMes()
// this.getCountdownTime() // this.getCountdownTime()
// #ifdef APP-PLUS // #ifdef APP-PLUS

21
pages/index/flashSale.vue

@ -356,6 +356,27 @@
}, },
onLoad() { onLoad() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.getList() this.getList()
this.isLogin = uni.getStorageSync('isLogin') this.isLogin = uni.getStorageSync('isLogin')

2
pages/index/index.vue

@ -241,7 +241,7 @@
} }
}) })
s++; s++;
}, 5000); }, 4000);
}, },
mounted() { mounted() {

21
pages/index/index2.vue

@ -316,6 +316,27 @@
}, },
onLoad() { onLoad() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.getIndex() this.getIndex()
// console.info(this.curEndTime) // console.info(this.curEndTime)
this.getList() this.getList()

20
pages/index/pickUpCentre.vue

@ -96,6 +96,26 @@
} }
}, },
onLoad() { onLoad() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.getList() this.getList()
} }
} }

21
pages/index/search.vue

@ -161,6 +161,27 @@
}, },
async onLoad() { async onLoad() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.getIndex() this.getIndex()
// this.getCatList() // this.getCatList()
let list = await uni.getStorage({ let list = await uni.getStorage({

21
pages/login/changePwd.vue

@ -58,6 +58,27 @@
}, },
}, },
onLoad(e) { onLoad(e) {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
console.info(e) console.info(e)
this.query.username=e.username this.query.username=e.username
this.query.resetcode=e.resetcode this.query.resetcode=e.resetcode

29
pages/login/index.vue

@ -68,6 +68,7 @@
<script> <script>
import {defaultRequest1,defaultRequest} from '../../api/index.js' import {defaultRequest1,defaultRequest} from '../../api/index.js'
const app = getApp()
export default { export default {
data() { data() {
return { return {
@ -183,7 +184,8 @@
}) })
console.log(this.loginDate) console.log(this.loginDate)
defaultRequest1(this.loginDate).then(res=>{ defaultRequest1(this.loginDate).then(res=>{
console.info(res) app.globalData.error = res.error
console.log('======================',res.error)
if(res.error==0){ if(res.error==0){
this.loginErr=false this.loginErr=false
@ -210,8 +212,8 @@
delta:1 delta:1
}) })
// uni.switchTab({ // uni.switchTab({
// delta: 1 // delta: 1
// // url:'../index/index' // url:'../index/index'
// }) // })
}else{ }else{
if(res.data){ if(res.data){
@ -317,6 +319,27 @@
}, },
onLoad() { onLoad() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.configuration() this.configuration()
} }

21
pages/login/verifyEmail.vue

@ -93,6 +93,27 @@
// } // }
}, },
onLoad(e) { onLoad(e) {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
console.info(e) console.info(e)
this.type=e.type this.type=e.type
if(e.type!=0){ if(e.type!=0){

25
pages/order/additems.vue

@ -81,6 +81,31 @@
uni.showTabBar() uni.showTabBar()
}, },
onLoad() { onLoad() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
// uni.showToast({
// icon: 'none',
// title: 'Please connect to the network',
// duration: 3000,
// })
}
}
})
s++;
}, 1000);
this.getList() this.getList()
this.getCartNum() this.getCartNum()
}, },

21
pages/order/confirmation.vue

@ -760,6 +760,27 @@
} }
}, },
onLoad(e) { onLoad(e) {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
// this.current = 0 // this.current = 0
this.query = JSON.parse(e.query) this.query = JSON.parse(e.query)
console.log(this.query) console.log(this.query)

21
pages/order/details.vue

@ -454,6 +454,27 @@
} }
}, },
onLoad(e) { onLoad(e) {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
console.info(e) console.info(e)
this.details_index = e.details_index this.details_index = e.details_index
this.query.order_id = e.id this.query.order_id = e.id

21
pages/order/logisticsDetails.vue

@ -62,6 +62,27 @@
} }
}, },
onLoad(e) { onLoad(e) {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.query.order_id=e.order_id this.query.order_id=e.order_id
this.getList() this.getList()
} }

21
pages/order/paySuccess.vue

@ -91,6 +91,27 @@
} }
}, },
onLoad(e) { onLoad(e) {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.id=e.order_id this.id=e.order_id
this.will_get_integral=e.will_get_integral || 0 this.will_get_integral=e.will_get_integral || 0
this.type=e.type this.type=e.type

21
pages/order/paypalWebview.vue

@ -17,6 +17,27 @@
} }
}, },
onLoad(e) { onLoad(e) {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.src = e.src this.src = e.src
}, },
methods:{ methods:{

21
pages/order/refund.vue

@ -89,6 +89,27 @@
}, },
onLoad(e) { onLoad(e) {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
this.orderDate=JSON.parse(e.data) this.orderDate=JSON.parse(e.data)
console.info(this.orderDate) console.info(this.orderDate)
} }

23
pages/order/refundDetails.vue

@ -187,6 +187,29 @@
}, },
methods:{ methods:{
},
onLaunch() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
}
}
})
s++;
}, 1000);
} }
} }
</script> </script>

25
pages/productDetails/goodsReview.vue

@ -107,6 +107,31 @@
} }
}, },
onLoad(e) { onLoad(e) {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
// uni.showToast({
// icon: 'none',
// title: 'Please connect to the network',
// duration: 3000,
// })
}
}
})
s++;
}, 1000);
plus.screen.lockOrientation('portrait') // plus.screen.lockOrientation('portrait') //
this.query.goods_id=e.goods_id this.query.goods_id=e.goods_id
this.getList() this.getList()

35
pages/productDetails/index.vue

@ -466,6 +466,7 @@
defaultRequest2, defaultRequest2,
defaultRequest4 defaultRequest4
} from '../../api/index.js' } from '../../api/index.js'
const app = getApp()
export default { export default {
data() { data() {
return { return {
@ -521,7 +522,7 @@
}, },
Is_attr: 0, // Is_attr: 0, //
listtext: [], listtext: [],
isLogin: -1, isLogin: 1,
isAttr: false, isAttr: false,
Attr_list: '', Attr_list: '',
video: false, video: false,
@ -555,7 +556,6 @@
} }
}, },
computed: { computed: {
// //
curEndTime() { curEndTime() {
@ -1119,8 +1119,34 @@
} }
}, },
onLoad(e) { onLoad(e) {
let that = this;
let s = 0;
// this.isLogin = app.globalData.error
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
// uni.showToast({
// icon: 'none',
// title: 'Please connect to the network',
// duration: 3000,
// })
}
}
})
s++;
}, 1000);
// let goods = JSON.parse(e) // let goods = JSON.parse(e)
this.isLogin = uni.getStorageSync('isLogin')
if (e.first) { if (e.first) {
this.first = e.first this.first = e.first
} }
@ -1151,6 +1177,9 @@
}, },
onShow() { onShow() {
this.getCartNum(); this.getCartNum();
this.isLogin = uni.getStorageSync('isLogin')
let aaa = uni.getStorageSync('isLogin')
console.log('aaa',aaa)
}, },
// //
onReachBottom() { onReachBottom() {

26
pages/productDetails/review.vue

@ -446,7 +446,31 @@
} }
}, },
onLoad(e) { onLoad(e) {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
// uni.showToast({
// icon: 'none',
// title: 'Please connect to the network',
// duration: 3000,
// })
}
}
})
s++;
}, 1000);
let datas=JSON.parse(e.data) let datas=JSON.parse(e.data)
console.log(datas) console.log(datas)
// let orderDate = uni.getStorageSync('orderDate') // let orderDate = uni.getStorageSync('orderDate')

26
pages/shippingCart/index.vue

@ -1109,6 +1109,31 @@
}, },
onLoad() { onLoad() {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
// uni.showToast({
// icon: 'none',
// title: 'Please connect to the network',
// duration: 3000,
// })
}
}
})
s++;
}, 1000);
this.isLogin = uni.getStorageSync('isLogin') this.isLogin = uni.getStorageSync('isLogin')
console.log(this.isLogin) console.log(this.isLogin)
let user = uni.getStorageSync('user_info') let user = uni.getStorageSync('user_info')
@ -1122,7 +1147,6 @@
this.getCatList(0) this.getCatList(0)
this.getAddress() this.getAddress()
this.getorder() this.getorder()
this.lib()
}, },
async onShow() { async onShow() {

103
pages/specialTitle/index.vue

@ -8,12 +8,13 @@
color="#fff" :title="title" :fixed="true" :border="false" :top="100 +rpx"/> --> color="#fff" :title="title" :fixed="true" :border="false" :top="100 +rpx"/> -->
<view v-for="(item,index) in list " :key="item.zone_id"> <view v-for="(item,index) in list " :key="item.zone_id">
<view v-for="(item1,index1) in item.blocks " :key="item1.block_pic"> <view v-for="(item1,index1) in item.blocks " :key="item1.block_pic">
<view style="position: relative;" class="ONEPIC" v-if="item.zone_code=='ONEPIC' && item.zone_status=='NORMAL'" <view style="position: relative;" class="ONEPIC"
v-if="item.zone_code=='ONEPIC' && item.zone_status=='NORMAL'"
:style="{height:(item.zone_code=='ONEPIC')?item.zone_column+'rpx':''}"> :style="{height:(item.zone_code=='ONEPIC')?item.zone_column+'rpx':''}">
<!-- class="discount page_padding" --> <!-- class="discount page_padding" -->
<image :src="item1.block_pic" mode="" @click="imgTo(item1)"> <image :src="item1.block_pic" mode="" @click="imgTo(item1)">
<a v-if="item1.block_title = 1" style="display: block;width: 100%;height: 100%;top: 0;position: absolute;" :href="item1.block_link"></a> <!-- <a v-if="item1.block_title = 0" style="display: block;width: 100%;height: 100%;top: 0;position: absolute;" :href="item1.block_link"></a> -->
<a v-if="item1.block_title = 0" style="display: block;width: 100%;height: 100%;top: 0;position: absolute;" :href="item1.block_link"></a> <a v-if="item1.block_title3 = 0" style="display: block;width: 100%;height: 100%;top: 0;position: absolute;"></a>
<!-- <view> <!-- <view>
<web-view v-if="item1.block_title = 1" :webview-styles="webviewStyles" <web-view v-if="item1.block_title = 1" :webview-styles="webviewStyles"
style="display: block;width: 100%;height: 100%;top: 0;position: absolute;" :src="item1.block_link"></web-view> style="display: block;width: 100%;height: 100%;top: 0;position: absolute;" :src="item1.block_link"></web-view>
@ -39,7 +40,7 @@
<image :src="item1.block_pic" @click="imgTo(item1)" mode="" v-for="(item1,index1) in item.blocks" <image :src="item1.block_pic" @click="imgTo(item1)" mode="" v-for="(item1,index1) in item.blocks"
:key="item1.block_id"></image> :key="item1.block_id"></image>
</view> </view>
<!-- FOURPIC --> <!-- FOURPIC -->
<view class="FOURPIC" <view class="FOURPIC"
:style="{height:(item.zone_code=='FOURPIC'&& item.zone_status=='NORMAL')?item.zone_column+'rpx':''}" :style="{height:(item.zone_code=='FOURPIC'&& item.zone_status=='NORMAL')?item.zone_column+'rpx':''}"
v-if="item.zone_code=='FOURPIC' && item.zone_status=='NORMAL'"> v-if="item.zone_code=='FOURPIC' && item.zone_status=='NORMAL'">
@ -86,13 +87,38 @@
} }
}, },
onLoad(e) { onLoad(e) {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
// uni.showToast({
// icon: 'none',
// title: 'Please connect to the network',
// duration: 3000,
// })
}
}
})
s++;
}, 1000);
console.log(e) console.log(e)
this.title = e.title this.title = e.title
this.data.pagecode = e.id this.data.pagecode = e.id
this.getpage() this.getpage()
}, },
methods: { methods: {
getpage() { getpage() {
let imglist let imglist
defaultRequest(this.data).then(res => { defaultRequest(this.data).then(res => {
@ -113,37 +139,44 @@
}) })
}, },
imgTo(item) { imgTo(item) {
console.log(item, 'item数据?')
// console.log(item.block_link) // console.log(item.blocks[0].block_link);
console.log(item.block_link);
console.log(item, 'item数据?')
if (item.block_title3 = 1) {
plus.runtime.openURL(item.block_link)
}
// console.log(item.block_link.includes('dope.youhui')) // console.log(item.block_link.includes('dope.youhui'))
let goodid // let goodid
if (item.goodid) { // if (item.goodid) {
uni.navigateTo({ // uni.navigateTo({
// url: '../productDetails/index?goodid=' + item.goodid // // url: '../productDetails/index?goodid=' + item.goodid
url: './paypalWebview?src' + item.goodid // url: './paypalWebview?src' + item.goodid
}) // })
} else if (item.block_link) { // } else if (item.block_link) {
const i = item.block_link.indexOf('?') // const i = item.block_link.indexOf('?')
goodid = item.block_link.substring(i); // goodid = item.block_link.substring(i);
////console.log(item.block_link) // ////console.log(item.block_link)
if (item.block_link.includes('goodslist')) { // if (item.block_link.includes('goodslist')) {
uni.navigateTo({ // uni.navigateTo({
url: '../category/productList' + goodid + '&tag=1' // url: '../category/productList' + goodid + '&tag=1'
}) // })
} else if (item.block_link.includes('goodid')) { // } else if (item.block_link.includes('goodid')) {
uni.navigateTo({ // uni.navigateTo({
url: '../productDetails/index' + goodid + '&img=1' // url: '../productDetails/index' + goodid + '&img=1'
}) // })
} else if (item.block_link.includes('dope.youhui')) { // } else if (item.block_link.includes('dope.youhui')) {
uni.navigateTo({ // uni.navigateTo({
url: './pickUpCentre' // url: './pickUpCentre'
}) // })
} else if (item.block_link.includes('dope.adspecial')) { // } else if (item.block_link.includes('dope.adspecial')) {
uni.navigateTo({ // uni.navigateTo({
url: '../specialTitle/index2' + goodid // url: '../specialTitle/index2' + goodid
}) // })
} // }
} // }
}, },
} }

25
pages/specialTitle/index2.vue

@ -50,6 +50,31 @@
} }
}, },
onLoad(e) { onLoad(e) {
let that = this;
let s = 0;
let time = setInterval(() => {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType, s);
if (res.networkType == 'none') {
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
} else if (res.networkType !== 'none') {
that.typee = 2;
clearInterval(time);
uni.showToast({
icon: 'none',
title: 'Please connect to the network',
duration: 3000,
})
}
}
})
s++;
}, 1000);
console.log(e) console.log(e)
this.title = e.title this.title = e.title
this.data.pagecode = e.id this.data.pagecode = e.id

18
uni.scss

@ -74,12 +74,12 @@ $uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:26px; $uni-font-size-subtitle:26px;
$uni-color-paragraph: #3F536E; // 文章段落颜色 $uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:15px; $uni-font-size-paragraph:15px;
uni-toast .uni-simple-toast__text { // uni-toast .uni-simple-toast__text {
background-color: #000 !important; // background-color: #000 !important;
color: #630102 !important; // color: #630102 !important;
} // }
uni-toast .uni-sample-toast { // uni-toast .uni-sample-toast {
background-color: #000 !important; // background-color: #000 !important;
color: #630102 !important; // color: #630102 !important;
border-radius: 5px; // border-radius: 5px;
} // }
Loading…
Cancel
Save