Browse Source

待打包

master
“linchaomei” 3 years ago
parent
commit
c7575a3f5b
  1. 83
      App.vue
  2. 11
      api/index.js
  3. 21
      api/request.js
  4. 301
      common/common.scss
  5. 286
      manifest.json
  6. BIN
      nativeplugins/JG-JCore/android/libs/arm64-v8a/libjcore260.so
  7. BIN
      nativeplugins/JG-JCore/android/libs/armeabi-v7a/libjcore260.so
  8. BIN
      nativeplugins/JG-JCore/android/libs/armeabi/libjcore260.so
  9. BIN
      nativeplugins/JG-JCore/android/libs/jcore-android-2.6.0.jar
  10. BIN
      nativeplugins/JG-JCore/android/libs/mips/libjcore260.so
  11. BIN
      nativeplugins/JG-JCore/android/libs/mips64/libjcore260.so
  12. BIN
      nativeplugins/JG-JCore/android/libs/x86/libjcore260.so
  13. BIN
      nativeplugins/JG-JCore/android/libs/x86_64/libjcore260.so
  14. BIN
      nativeplugins/JG-JCore/android/uniplugin_jcore-release.aar
  15. 17
      nativeplugins/JG-JCore/ios/UniPluginJCore.framework/Headers/JCoreModule.h
  16. BIN
      nativeplugins/JG-JCore/ios/UniPluginJCore.framework/Info.plist
  17. BIN
      nativeplugins/JG-JCore/ios/UniPluginJCore.framework/UniPluginJCore
  18. BIN
      nativeplugins/JG-JCore/ios/UniPluginJCore.framework/_CodeSignature/CodeDirectory
  19. BIN
      nativeplugins/JG-JCore/ios/UniPluginJCore.framework/_CodeSignature/CodeRequirements
  20. BIN
      nativeplugins/JG-JCore/ios/UniPluginJCore.framework/_CodeSignature/CodeRequirements-1
  21. 117
      nativeplugins/JG-JCore/ios/UniPluginJCore.framework/_CodeSignature/CodeResources
  22. BIN
      nativeplugins/JG-JCore/ios/UniPluginJCore.framework/_CodeSignature/CodeSignature
  23. BIN
      nativeplugins/JG-JCore/ios/jcore-ios-2.4.0.a
  24. 58
      nativeplugins/JG-JCore/package.json
  25. BIN
      nativeplugins/JG-JPush/android/com.heytap.msp-push-2.1.0.aar
  26. BIN
      nativeplugins/JG-JPush/android/libs/MiPush_SDK_Client_3_8_5.jar
  27. BIN
      nativeplugins/JG-JPush/android/libs/jpush-android-3.9.1.jar
  28. BIN
      nativeplugins/JG-JPush/android/libs/jpush-android-plugin-meizu-v3.9.1.jar
  29. BIN
      nativeplugins/JG-JPush/android/libs/jpush-android-plugin-oppo-v3.9.1.jar
  30. BIN
      nativeplugins/JG-JPush/android/libs/jpush-android-plugin-vivo-v3.9.1.jar
  31. BIN
      nativeplugins/JG-JPush/android/libs/jpush-android-plugin-xiaomi-v3.9.1.jar
  32. BIN
      nativeplugins/JG-JPush/android/libs/meizu-push-4.0.2.jar
  33. BIN
      nativeplugins/JG-JPush/android/libs/push_sdk_v3.0.0.jar
  34. BIN
      nativeplugins/JG-JPush/android/uniplugin_jpush-release.aar
  35. 798
      nativeplugins/JG-JPush/ios/JPUSHService.h
  36. 17
      nativeplugins/JG-JPush/ios/UniPluginJPush.framework/Headers/JPushModule.h
  37. BIN
      nativeplugins/JG-JPush/ios/UniPluginJPush.framework/Info.plist
  38. BIN
      nativeplugins/JG-JPush/ios/UniPluginJPush.framework/UniPluginJPush
  39. BIN
      nativeplugins/JG-JPush/ios/UniPluginJPush.framework/_CodeSignature/CodeDirectory
  40. BIN
      nativeplugins/JG-JPush/ios/UniPluginJPush.framework/_CodeSignature/CodeRequirements
  41. BIN
      nativeplugins/JG-JPush/ios/UniPluginJPush.framework/_CodeSignature/CodeRequirements-1
  42. 117
      nativeplugins/JG-JPush/ios/UniPluginJPush.framework/_CodeSignature/CodeResources
  43. BIN
      nativeplugins/JG-JPush/ios/UniPluginJPush.framework/_CodeSignature/CodeSignature
  44. BIN
      nativeplugins/JG-JPush/ios/jpush-ios-3.4.0.a
  45. 138
      nativeplugins/JG-JPush/package.json
  46. 19
      pages.json
  47. 120
      pages/account/addAddress.vue
  48. 10
      pages/account/address.vue
  49. 25
      pages/account/changeImg.vue
  50. 89
      pages/account/demo1.vue
  51. 119
      pages/account/favorites.vue
  52. 137
      pages/account/index.vue
  53. 125
      pages/account/message.vue
  54. 18
      pages/account/myOrders.vue
  55. 77
      pages/account/myReview.vue
  56. 4
      pages/account/pointsDetails.vue
  57. 2
      pages/account/settings.vue
  58. 623
      pages/account/wishlist.vue
  59. 81
      pages/category/index.vue
  60. 48
      pages/category/productList.vue
  61. 54
      pages/index/address.vue
  62. 10
      pages/index/flashSale.vue
  63. 683
      pages/index/index.vue
  64. 2
      pages/index/index2.vue
  65. 2
      pages/index/pickUpCentre.vue
  66. 4
      pages/login/changePwd.vue
  67. 49
      pages/login/index.vue
  68. 28
      pages/login/verifyEmail.vue
  69. 204
      pages/order/confirmation.vue
  70. 6
      pages/order/details.vue
  71. 52
      pages/productDetails/goodsReview.vue
  72. 202
      pages/productDetails/index.vue
  73. 330
      pages/productDetails/review.vue
  74. 535
      pages/shippingCart/index.vue
  75. 20
      pages/specialTitle/index.vue
  76. 8
      pages/specialTitle/index2.vue
  77. BIN
      static/img/min.png
  78. 97
      tarbar/index.vue
  79. 149
      tarbar/tarbar.vue
  80. 7
      uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue

83
App.vue

@ -1,6 +1,6 @@
<script>
import {defaultRequest,defaultRequest4} from 'api/index.js'
var jpushModule = uni.requireNativePlugin("JG-JPush");
export default {
data(){
return {
@ -9,20 +9,75 @@
},
onLaunch: function() {
// console.log('App Launch')
uni.onTabBarMidButtonTap(()=>{
console.log("点击了")
//
//
uni.navigateTo({
url:"../index/index2",
animationType:'slide-in-bottom'
})
})
uni.hideTabBar()
// uni.onTabBarMidButtonTap(()=>{
// console.log("")
// //
// //
// uni.navigateTo({
// url:"../index/index2",
// animationType:'slide-in-bottom'
// })
// })
plus.screen.lockOrientation("portrait-primary");
setTimeout(() => {
plus.navigator.closeSplashscreen();
}, 2400);
},
//#ifdef APP-PLUS
jpushModule.setLoggerEnable(true);
jpushModule.initJPushService()
jpushModule.addConnectEventListener(result=>{
let connectEnable = result.connectEnable
console.log("jpush连接", connectEnable)
})
//
jpushModule.setAlias({
'alias': uni.getStorageSync('userId'),
'sequence': 1
})
//
jpushModule.addTagAliasListener(result => {
let code = result.code
let sequence = result.sequence
let tags = result.tags
let tag = result.tag
let tagEnable = result.tagEnable
let alias = result.alias
console.log(alias, '别名')
})
//
jpushModule.addNotificationListener(result => {
let notificationEventType = result.notificationEventType
let messageID = result.messageID
let title = result.title
let content = result.content
let extras = result.extras
console.log("通知", result)
//
if (notificationEventType == 'notificationOpened') {
uni.navigateTo({
url: ''
})
}
})
jpushModule.getRegistrationID(result => {
console.log("注册ID", result.registerID)
if (result.registerID) {
uni.setStorageSync("register_id", result.registerID)
}
})
jpushModule.addCustomMessageListener(result => {
let messageID = result.messageID
let content = result.content
let extras = result.extras
console.log("自定义消息", result)
})
//#endif
},
onShow: function() {
console.log('App Show')
},
@ -34,6 +89,10 @@
</script>
<style lang="scss">
/*每个页面公共css */
@import "@/common/common.scss";
page{
overflow-x: hidden;
}
</style>

11
api/index.js

@ -62,16 +62,15 @@ export const defaultRequest4 =query=>{
isLoad:false
})
}
//上传图片
export const defaultRequest5 =(query,img)=>{
export const defaultRequest5 =(query,comments)=>{
return httpRequest({
url:'mapi/api_v2011.php?appcode=DOPE+',
method:'post',
data:query,
afile:img,
errMsg:true,
isCookies:false,
isEncryption:false,
isLoad:true
isCookies:true,
isEncryption:true,
isLoad:true,
comments:comments
})
}

21
api/request.js

@ -12,7 +12,7 @@ const httpRequest = (params) => {
const json_data={
appcode:'DOPE+' ,//应用编码
appchannel:'FXXXXHUAWEI' ,//应用发布渠道
appchannel:'DOPEGOOGLE' ,//应用发布渠道
appver: '1.0.0',//应用版本
appname:'cnic_buyer' ,//应用名称
manufacturer:'HUAWEI' ,//设备生产商
@ -26,9 +26,11 @@ const httpRequest = (params) => {
let key=params.key
if(params.isEncryption){
// console.info(JSON.parse(JSON.stringify(data.consignee)))
key=encryption(JSON.parse(JSON.stringify(data[params.key])))
// console.info(consignee)
key=encryption(JSON.parse(JSON.stringify(data[params.key])))
// console.info(key)
data=encryption(data)
// console.log(data)
data[params.key]=key
}else{
data=encryption(data)
@ -40,9 +42,9 @@ const httpRequest = (params) => {
// console.info(encrypt_by_des(JSON.stringify(data),'6780f04cf2e211ec86a8005056c00008'))
// data=Base64.encode(encryptDes(JSON.stringify(data),'6780f04cf2e211ec86a8005056c00008'));
data=encryptDes(JSON.stringify(data),'6780f04cf2e211ec86a8005056c00008');
// console.info(data)
// console.info(data)
// 解密
// let data2 =JSON.parse(decodeURIComponent (decryptDes(Base64.decode(data),'6780f04cf2e211ec86a8005056c00008'))) ;
let data2 =JSON.parse(decryptDes(data,"6780f04cf2e211ec86a8005056c00008"))
// console.info(data2)
let data1={data:data}
@ -96,9 +98,14 @@ const httpRequest = (params) => {
const encryption=(data)=>{
for(let key in data){
let item= data[key]
data[key]=encodeURIComponent(item)
if(key ==='comments'){
data[key]=encryptDes(JSON.stringify(data[key]),'6780f04cf2e211ec86a8005056c00008');
data[key]=JSON.parse(decryptDes(data[key],"6780f04cf2e211ec86a8005056c00008"))
}else{
data[key]=encodeURIComponent(item)
}
}
return data
}
export default httpRequest;
export default httpRequest;

301
common/common.scss

@ -4,24 +4,92 @@
height: 50rpx;
// background-color: #000000;
}
.img_border{
border-radius: 10rpx !important;
}
.tarbar{
height: 100rpx;
width: 100vw;
padding-top: 10rpx;
padding-bottom: 10rpx;
background-color: #fff;
bottom: 0;
z-index: 129;
font-size: 22rpx;
text-align: center;
position: fixed;
display: flex;
color:#707070;
justify-content: space-around;
.tarbar_img image{
height: 50rpx;
width: 50rpx;
// background-color: #fff;
}
.img_m image{
height: 120rpx;
width: 120rpx;
margin-top: -30rpx;
}
}
.padding-top{
padding-top: 110rpx !important;
// margin-top: 40rpx;
}
.margin_botoom{
padding-bottom: 200rpx;
}
.addCard{
font-size: 26rpx !important;
line-height: 34rpx;
}
.hotmaxW{
// height:300rpx !important;
padding:60rpx 60rpx !important;
transition: margin-right 2s .5s;
transform:scale(1.2);
padding-top:10rpx;
margin: 0 auto;
transform:scale(1,1);
transition: all .5s ease-in-out;
}
.spike1_item_bottom-sro{
margin-top: 14rpx !important;
// margin-left: 60rpx !important;
}
.hotmaxW :hover {
transform:scale(1.2);
}
.hotmaxmin{
padding:40rpx 40rpx !important;
transition: margin-right 2s .5s;
transform:scale(0.8);
transform:scale(0.8,0.8);
position: relative;
transition: all .5s ease-in-out;
// background-color: #666666;
opacity: 0.6 !important;
// padding-left:10rpx;
// padding-right:10rpx;
// position: fixed;
}
// .hotmaxmin :after{
// position: absolute;
// content: '';
// // padding:40rpx 40rpx !important;
// // transition: margin-right 2s .5s;
// box-shadow: 0 0 50rpx 30rpx #fff inset !important;
// }
.box_show{
width: 100%;
margin-left: 4rpx;
border-radius: 10rpx;
image{
width: 100%;
height: 100%;
border-radius: 10rpx;
}
box-shadow: 0 0 50rpx 30rpx #fff inset;
}
.empty_item{
@ -120,7 +188,7 @@
display: flex;
align-items: center;
color: #666666;
font-size: 24rpx;
font-size: 28rpx;
margin-bottom: 30.67rpx;
image{
@ -128,7 +196,7 @@
height: 32rpx;
}
.address_title_name{
font-size: 28rpx;
font-size: 32rpx;
color: black;
font-weight: bold;
margin-left: 24rpx;
@ -138,8 +206,8 @@
.address_content{
padding-left: 56rpx;
color: #666666;
font-size: 24rpx;
font-weight: bold;
font-size: 28rpx;
// font-weight: bold;
}
}
@ -166,9 +234,9 @@
}
.reviews_item_title{
display: flex;
// align-items: center;
// justify-content: space-around;
align-items: center;
// justify-content: space-around;
// justify-content: space-between;
.reviews_item_img{
height: 60rpx;
width: 60rpx;
@ -199,7 +267,7 @@
// margin-left: 10rpx;
line-height: 50rpx;
text-align: center;
text-align: left;
display: flex;
overflow: hidden;
@ -216,6 +284,7 @@
.reviews_title_user_name{
max-width: 300rpx;
overflow: hidden;
text-align: left;
margin-left: 13.37rpx;
margin-right: 13.37rpx;
}
@ -226,7 +295,7 @@
font-weight: 400;
color: #909090;
margin-top: 8rpx;
margin-left: 50rpx;
margin-left: 108rpx;
}
}
@ -248,19 +317,29 @@
.reviews_item_image{
display: flex;
align-items: center;
flex-wrap: wrap;
margin-bottom: 20rpx;
.reviews_image_content{
width: 233.33rpx;
height: 233.33rpx;
width: 200.33rpx;
height: 200.33rpx;
margin-bottom: 10rpx;
margin-left: 16.67rpx;
background-color: #999999;
margin-right: 16rpx;
border-radius: 5rpx;
// background-color: #999999;
background-size: 100% !important;
image{
height: 100%;
width: 100%;
border-radius: 5rpx;
}
&:first-child{
margin-left: 0;
// &:first-child{
// margin-left: 0;
// }
.comment_video{
width: 200.33rpx;
height: 200.33rpx;
border-radius: 10rpx;
}
}
}
@ -284,9 +363,7 @@
right: 26rpx;
}
}
.img_border{
border-radius: 10rpx;
}
// 谈判细节
.order_popup{
position: fixed;
@ -410,7 +487,7 @@
}
.wishlist_body{
padding-top:60rpx;
// margin-top: 40rpx;
// margin-top: 40rpx;
position: relative;
height: 100%;
width: 100%;
@ -420,8 +497,10 @@
}
.wishlist{
padding: 0 26.67rpx;
padding: 0 2.67rpx 40rpx 10rpx;
display: flex;
// padding-top: 40rpx;
// justify-content: space-between;
flex-wrap: wrap;
@ -443,10 +522,11 @@
margin-bottom: 25.33rpx;
background-color: #999999;
position: relative;
border-radius: 10rpx;
.wishlist_item_img_goods{
width: 100%;
height: 100%;
border-radius: 10rpx;
}
.select{
position: absolute;
@ -459,7 +539,7 @@
.wishlist_item_bottom{
display: flex;
align-items: center;
padding-left: 22.67rpx;
padding-right: 18.67rpx;
justify-content: space-between;
.wishlist_item_bottom_icon{
@ -474,12 +554,13 @@
position: fixed;
bottom: 0;
width: 100%;
border-top: 1px solid #F5F6FA;
background-color: #fff;
// border-top: 1px solid #F5F6FA;
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
color:#000;
.wishlist_foot_left{
font-size: 36rpx;
font-weight: 400;
@ -504,13 +585,14 @@
width: 100%;
height: 100%;
background-color: #C0C0C0;
color: #FFFFFF;
color: #fff;
border: none;
border-radius: 0;
}
.wishlist_foot_right_button{
background-color: black !important;
background-color: #000 !important;
color:#fff !important;
}
}
@ -598,6 +680,9 @@
}
}
// 优惠卷
// .coupons_item:nth-child(1){
// margin-top: 81rpx;
// }
.coupons_item{
display: flex;
background-color: #FEF6F4;
@ -605,6 +690,7 @@
color: #F66C46;
margin-top: 11rpx;
margin-bottom: 25.33rpx;
.coupons_item_left{
width: 216.67rpx;
height: 100%;
@ -803,7 +889,8 @@
// 商品展示
.good_info{
padding: 40rpx 0;
padding-top: 40rpx;
padding-bottom: 40rpx;
font-size: 22.67rpx;
color: #666666;
font-weight: bold;
@ -881,4 +968,144 @@
}
}
}
}
}
.addCard{
z-index: 999;
position: fixed;
bottom: 0;
left: 0;
background-color: white;
padding-left: 29.33rpx;
padding-right: 29.33rpx;
box-sizing: border-box;
padding-top: 77.67rpx;
color:#000;
width: 100%;
// font-size: 30.67rpx;
font-weight: 400;
padding-bottom: 44.67rpx;
.addCard_close{
width: 21.33rpx;
height: 21.33rpx;
position: absolute;
right: 24.67rpx;
top: 18.67rpx;
}
.spike1{
margin-top: 0;
margin-bottom: 20rpx;
padding-bottom: 0;
border-bottom: none;
.addCard_scroll{
width: 286.67rpx;
height: 286.67rpx;
margin-left: 10.67rpx;
&:first-child{
margin-left: 0;
}
&:last-child{
margin-right: 15rpx;
}
}
}
.addCard_body{
padding-right: 31.33rpx;
max-height: 60vh;
min-height: 400rpx;
.addCard_price{
font-size: 44rpx;
font-weight: bold;
margin-top: 17.33rpx;
margin-bottom: 51.33rpx;
}
.color_select{
display: flex;
color: #666666;
flex-wrap: wrap;
margin-bottom: 59.33rpx;
.color_select_item{
margin-top: 22rpx;
position: relative;
background-color: #F9F7FA;
border-radius: 6.67rpx;
margin-right: 12.67rpx;
width: 134.67rpx;
image{
width: 134.67rpx;
height: 133.33rpx;
border-radius: 6.67rpx 6.67rpx 0 0;
}
.color_select_item_zoom{
width: 20.33rpx;
height: 20.33rpx;
// background-color: rgba(0, 0, 0, 0.3);
display: flex;
align-items: center;
justify-content: center;
position: absolute;
right: 12.67rpx;
top: 9.33rpx;
z-index: 99;
image{
width: 100%;
height: 100%;
}
}
.color_select_item_bottom{
padding: 10rpx 0rpx;
font-size: 24rpx;
text-align: center;
}
}
.active_color{
color: #fff;;
background-color: #000;
border: 1px solid #000000;
}
}
.variations_select_size{
margin-left: 0;
margin-top: 26.67rpx;
margin-bottom: 40.67rpx;
.select_size_item{
background-size: cover;
margin-bottom: 16.67rpx !important;
&:nth-child(4n+4){
margin-right: 0;
}
}
}
}
}
.quantity{
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 43.33rpx;
.uni-numbox{
border: 1px solid #999999;
border-radius: 14rpx;
height: 42.67rpx;
/deep/ .uni-numbox__minus{
border-radius: 14rpx;
}
/deep/.uni-numbox__plus{
border-radius: 14rpx;
}
/deep/.uni-numbox__value{
border-left: 1px solid #999999;
border-right: 1px solid #999999;
height: 100%;
width: 63.33rpx;
font-size: 21.33rpx;
}
}
}

286
manifest.json

@ -1,15 +1,26 @@
{
"name" : "DopePlus",
"appid" : "__UNI__A6CF3EA",
// "appid" : "__UNI__7D4CA0F",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"versionCode" : 100,
"transformPx" : false,
// "targetSdkVersion" : 31,
"channel_list" : [
{
"id" : "DOPEGOOGLE",
"name" : "DOPEGOOGLE"
}
],
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"compatible" : {
"ignoreVersion" : true
},
// "splashscreen" : {
// "alwaysShowBeforeRender" : false,
// "waiting" : false,
@ -31,7 +42,8 @@
"modules" : {
"Payment" : {},
"VideoPlayer" : {},
"Push" : {}
"Contacts" : {},
"Speech" : {}
},
/* */
"distribute" : {
@ -48,19 +60,24 @@
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"autoSdkPermissions" : true,
"minSdkVersion" : 21
"minSdkVersion" : 21,
"targetSdkVersion" : 31,
"abiFilters" : [ "armeabi-v7a", "arm64-v8a" ]
},
/* ios */
"ios" : {
"dSYMs" : false
"dSYMs" : false,
"idfa" : false
},
/* SDK */
"sdkConfigs" : {
@ -75,7 +92,8 @@
"returnURL_android" : "uni.unicoe0831://paypalpay"
}
},
"push" : {}
"push" : {},
"speech" : {}
},
"splashscreen" : {
"androidStyle" : "default",
@ -122,6 +140,134 @@
}
}
}
},
"nativePlugins" : {
"JG-JCore" : {
"JPUSH_APPKEY_IOS" : "",
"JPUSH_CHANNEL_IOS" : "",
"JPUSH_APPKEY_ANDROID" : "f7c642155be0cdfa97fb3d75",
"JPUSH_CHANNEL_ANDROID" : "f7c642155be0cdfa97fb3d75",
"__plugin_info__" : {
"name" : "JG-JCore",
"description" : "极光推送JCore插件",
"platforms" : "Android,iOS",
"url" : "",
"android_package_name" : "com.lilbeat.dopeplus",
"ios_bundle_id" : "com.lilbeat.dopeplus",
"isCloud" : false,
"bought" : -1,
"pid" : "",
"parameters" : {
"JPUSH_APPKEY_IOS" : {
"des" : "[iOS]极光portal配置应用信息时分配的AppKey",
"key" : "f7c642155be0cdfa97fb3d75",
"value" : ""
},
"JPUSH_CHANNEL_IOS" : {
"des" : "[iOS]用于统计分发渠道,不需要可填默认值developer-default",
"key" : "JCore:CHANNEL",
"value" : ""
},
"JPUSH_APPKEY_ANDROID" : {
"des" : "[Android]极光portal配置应用信息时分配的AppKey",
"key" : "f7c642155be0cdfa97fb3d75",
"value" : ""
},
"JPUSH_CHANNEL_ANDROID" : {
"des" : "[Android]用于统计分发渠道,不需要可填默认值developer-default",
"key" : "JPUSH_CHANNEL",
"value" : ""
}
}
}
},
"JG-JPush" : {
"JPUSH_ISPRODUCTION_IOS" : "",
"JPUSH_ADVERTISINGID_IOS" : "",
"JPUSH_DEFAULTINITJPUSH_IOS" : "",
"JPUSH_OPPO_APPKEY" : "",
"JPUSH_OPPO_APPID" : "",
"JPUSH_OPPO_APPSECRET" : "",
"JPUSH_VIVO_APPKEY" : "",
"JPUSH_VIVO_APPID" : "",
"JPUSH_MEIZU_APPKEY" : "",
"JPUSH_MEIZU_APPID" : "",
"JPUSH_XIAOMI_APPKEY" : "",
"JPUSH_XIAOMI_APPID" : "",
"__plugin_info__" : {
"name" : "JG-JPush",
"description" : "极光推送Hbuilder插件",
"platforms" : "Android,iOS",
"url" : "",
"android_package_name" : "com.lilbeat.dopeplus",
"ios_bundle_id" : "com.lilbeat.dopeplus",
"isCloud" : false,
"bought" : -1,
"pid" : "",
"parameters" : {
"JPUSH_ISPRODUCTION_IOS" : {
"des" : "[iOS]是否是生产环境,是填true,不是填false或者不填",
"key" : "JPush:ISPRODUCTION",
"value" : ""
},
"JPUSH_ADVERTISINGID_IOS" : {
"des" : "[iOS]广告标识符(IDFA)如果不需要使用IDFA,可不填",
"key" : "JPush:ADVERTISINGID",
"value" : ""
},
"JPUSH_DEFAULTINITJPUSH_IOS" : {
"des" : "[iOS]是否默认初始化,是填true,不是填false或者不填",
"key" : "JPush:DEFAULTINITJPUSH",
"value" : ""
},
"JPUSH_OPPO_APPKEY" : {
"des" : "厂商OPPO-appkey,示例:OP-12345678",
"key" : "OPPO_APPKEY",
"value" : ""
},
"JPUSH_OPPO_APPID" : {
"des" : "厂商OPPO-appId,示例:OP-12345678",
"key" : "OPPO_APPID",
"value" : ""
},
"JPUSH_OPPO_APPSECRET" : {
"des" : "厂商OPPO-appSecret,示例:OP-12345678",
"key" : "OPPO_APPSECRET",
"value" : ""
},
"JPUSH_VIVO_APPKEY" : {
"des" : "厂商VIVO-appkey,示例:12345678",
"key" : "com.vivo.push.api_key",
"value" : ""
},
"JPUSH_VIVO_APPID" : {
"des" : "厂商VIVO-appId,示例:12345678",
"key" : "com.vivo.push.app_id",
"value" : ""
},
"JPUSH_MEIZU_APPKEY" : {
"des" : "厂商MEIZU-appKey,示例:MZ-12345678",
"key" : "MEIZU_APPKEY",
"value" : ""
},
"JPUSH_MEIZU_APPID" : {
"des" : "厂商MEIZU-appId,示例:MZ-12345678",
"key" : "MEIZU_APPID",
"value" : ""
},
"JPUSH_XIAOMI_APPKEY" : {
"des" : "厂商XIAOMI-appKey,示例:MI-12345678",
"key" : "XIAOMI_APPKEY",
"value" : ""
},
"JPUSH_XIAOMI_APPID" : {
"des" : "厂商XIAOMI-appId,示例:MI-12345678",
"key" : "XIAOMI_APPID",
"value" : ""
}
}
}
}
}
},
/* */
@ -148,3 +294,133 @@
},
"vueVersion" : "2"
}
// "nativePlugins" : {
// "JG-JCore" : {
// "JPUSH_APPKEY_IOS" : "",
// "JPUSH_CHANNEL_IOS" : "",
// "JPUSH_APPKEY_ANDROID" : "f7c642155be0cdfa97fb3d75",
// "JPUSH_CHANNEL_ANDROID" : "f7c642155be0cdfa97fb3d75",
// "__plugin_info__" : {
// "name" : "JG-JCore",
// "description" : "极光推送JCore插件",
// "platforms" : "Android,iOS",
// "url" : "",
// "android_package_name" : "com.lilbeat.dopeplus",
// "ios_bundle_id" : "com.lilbeat.dopeplus",
// "isCloud" : false,
// "bought" : -1,
// "pid" : "",
// "parameters" : {
// "JPUSH_APPKEY_IOS" : {
// "des" : "[iOS]极光portal配置应用信息时分配的AppKey",
// "key" : "f7c642155be0cdfa97fb3d75",
// "value" : ""
// },
// "JPUSH_CHANNEL_IOS" : {
// "des" : "[iOS]用于统计分发渠道,不需要可填默认值developer-default",
// "key" : "JCore:CHANNEL",
// "value" : ""
// },
// "JPUSH_APPKEY_ANDROID" : {
// "des" : "[Android]极光portal配置应用信息时分配的AppKey",
// "key" : "f7c642155be0cdfa97fb3d75",
// "value" : ""
// },
// "JPUSH_CHANNEL_ANDROID" : {
// "des" : "[Android]用于统计分发渠道,不需要可填默认值developer-default",
// "key" : "JPUSH_CHANNEL",
// "value" : ""
// }
// }
// }
// },
// "JG-JPush" : {
// "JPUSH_ISPRODUCTION_IOS" : "",
// "JPUSH_ADVERTISINGID_IOS" : "",
// "JPUSH_DEFAULTINITJPUSH_IOS" : "",
// "JPUSH_OPPO_APPKEY" : "",
// "JPUSH_OPPO_APPID" : "",
// "JPUSH_OPPO_APPSECRET" : "",
// "JPUSH_VIVO_APPKEY" : "",
// "JPUSH_VIVO_APPID" : "",
// "JPUSH_MEIZU_APPKEY" : "",
// "JPUSH_MEIZU_APPID" : "",
// "JPUSH_XIAOMI_APPKEY" : "",
// "JPUSH_XIAOMI_APPID" : "",
// "__plugin_info__" : {
// "name" : "JG-JPush",
// "description" : "极光推送Hbuilder插件",
// "platforms" : "Android,iOS",
// "url" : "",
// "android_package_name" : "com.lilbeat.dopeplus",
// "ios_bundle_id" : "com.lilbeat.dopeplus",
// "isCloud" : false,
// "bought" : -1,
// "pid" : "",
// "parameters" : {
// "JPUSH_ISPRODUCTION_IOS" : {
// "des" : "[iOS]是否是生产环境,是填true,不是填false或者不填",
// "key" : "JPush:ISPRODUCTION",
// "value" : ""
// },
// "JPUSH_ADVERTISINGID_IOS" : {
// "des" : "[iOS]广告标识符(IDFA)如果不需要使用IDFA,可不填",
// "key" : "JPush:ADVERTISINGID",
// "value" : ""
// },
// "JPUSH_DEFAULTINITJPUSH_IOS" : {
// "des" : "[iOS]是否默认初始化,是填true,不是填false或者不填",
// "key" : "JPush:DEFAULTINITJPUSH",
// "value" : ""
// },
// "JPUSH_OPPO_APPKEY" : {
// "des" : "厂商OPPO-appkey,示例:OP-12345678",
// "key" : "OPPO_APPKEY",
// "value" : ""
// },
// "JPUSH_OPPO_APPID" : {
// "des" : "厂商OPPO-appId,示例:OP-12345678",
// "key" : "OPPO_APPID",
// "value" : ""
// },
// "JPUSH_OPPO_APPSECRET" : {
// "des" : "厂商OPPO-appSecret,示例:OP-12345678",
// "key" : "OPPO_APPSECRET",
// "value" : ""
// },
// "JPUSH_VIVO_APPKEY" : {
// "des" : "厂商VIVO-appkey,示例:12345678",
// "key" : "com.vivo.push.api_key",
// "value" : ""
// },
// "JPUSH_VIVO_APPID" : {
// "des" : "厂商VIVO-appId,示例:12345678",
// "key" : "com.vivo.push.app_id",
// "value" : ""
// },
// "JPUSH_MEIZU_APPKEY" : {
// "des" : "厂商MEIZU-appKey,示例:MZ-12345678",
// "key" : "MEIZU_APPKEY",
// "value" : ""
// },
// "JPUSH_MEIZU_APPID" : {
// "des" : "厂商MEIZU-appId,示例:MZ-12345678",
// "key" : "MEIZU_APPID",
// "value" : ""
// },
// "JPUSH_XIAOMI_APPKEY" : {
// "des" : "厂商XIAOMI-appKey,示例:MI-12345678",
// "key" : "XIAOMI_APPKEY",
// "value" : ""
// },
// "JPUSH_XIAOMI_APPID" : {
// "des" : "厂商XIAOMI-appId,示例:MI-12345678",
// "key" : "XIAOMI_APPID",
// "value" : ""
// }
// }
// }
// }
// }
/* *//* */

BIN
nativeplugins/JG-JCore/android/libs/arm64-v8a/libjcore260.so

Binary file not shown.

BIN
nativeplugins/JG-JCore/android/libs/armeabi-v7a/libjcore260.so

Binary file not shown.

BIN
nativeplugins/JG-JCore/android/libs/armeabi/libjcore260.so

Binary file not shown.

BIN
nativeplugins/JG-JCore/android/libs/jcore-android-2.6.0.jar

Binary file not shown.

BIN
nativeplugins/JG-JCore/android/libs/mips/libjcore260.so

Binary file not shown.

BIN
nativeplugins/JG-JCore/android/libs/mips64/libjcore260.so

Binary file not shown.

BIN
nativeplugins/JG-JCore/android/libs/x86/libjcore260.so

Binary file not shown.

BIN
nativeplugins/JG-JCore/android/libs/x86_64/libjcore260.so

Binary file not shown.

BIN
nativeplugins/JG-JCore/android/uniplugin_jcore-release.aar

Binary file not shown.

17
nativeplugins/JG-JCore/ios/UniPluginJCore.framework/Headers/JCoreModule.h

@ -0,0 +1,17 @@
//
// JCoreModule.h
// UniPluginJCore
//
// Created by huangshuni on 2021/1/21.
//
#import <Foundation/Foundation.h>
#import "DCUniModule.h"
NS_ASSUME_NONNULL_BEGIN
@interface JCoreModule : DCUniModule
@end
NS_ASSUME_NONNULL_END

BIN
nativeplugins/JG-JCore/ios/UniPluginJCore.framework/Info.plist

Binary file not shown.

BIN
nativeplugins/JG-JCore/ios/UniPluginJCore.framework/UniPluginJCore

Binary file not shown.

BIN
nativeplugins/JG-JCore/ios/UniPluginJCore.framework/_CodeSignature/CodeDirectory

Binary file not shown.

BIN
nativeplugins/JG-JCore/ios/UniPluginJCore.framework/_CodeSignature/CodeRequirements

Binary file not shown.

BIN
nativeplugins/JG-JCore/ios/UniPluginJCore.framework/_CodeSignature/CodeRequirements-1

Binary file not shown.

117
nativeplugins/JG-JCore/ios/UniPluginJCore.framework/_CodeSignature/CodeResources

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Headers/JCoreModule.h</key>
<data>
4aMcBALZuuQeh2JQjJqqvSkc2mA=
</data>
<key>Info.plist</key>
<data>
b4VTqlvap+6I3sPb0nhWD5ZHha4=
</data>
</dict>
<key>files2</key>
<dict>
<key>Headers/JCoreModule.h</key>
<dict>
<key>hash</key>
<data>
4aMcBALZuuQeh2JQjJqqvSkc2mA=
</data>
<key>hash2</key>
<data>
h/0w2CaU3JBhKI3Pp4EiSWqLf/ZY1Ju+5+tBAdowZ5k=
</data>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>

BIN
nativeplugins/JG-JCore/ios/UniPluginJCore.framework/_CodeSignature/CodeSignature

Binary file not shown.

BIN
nativeplugins/JG-JCore/ios/jcore-ios-2.4.0.a

Binary file not shown.

58
nativeplugins/JG-JCore/package.json

@ -0,0 +1,58 @@
{
"name": "JG-JCore",
"id": "JG-JCore",
"version": "1.0.1",
"description": "极光推送JCore插件",
"_dp_type":"nativeplugin",
"_dp_nativeplugin":{
"ios": {
"plugins": [
{
"type": "module",
"name": "JG-JCore",
"class": "JCoreModule"
}
],
"integrateType": "framework",
"deploymentTarget": "9.0",
"parameters": {
"JPUSH_APPKEY_IOS": {
"des": "[iOS]极光portal配置应用信息时分配的AppKey",
"key": "JCore:APP_KEY"
},
"JPUSH_CHANNEL_IOS": {
"des": "[iOS]用于统计分发渠道,不需要可填默认值developer-default",
"key": "JCore:CHANNEL"
}
}
},
"android": {
"plugins": [
{
"type": "module",
"name": "JG-JCore",
"class": "cn.jiguang.uniplugin_jcore.JCoreModule"
}
],
"integrateType": "aar",
"minSdkVersion": "19",
"permissions": [
],
"abis": [
"armeabi-v7a",
"arm64-v8a",
"x86"
],
"parameters": {
"JPUSH_APPKEY_ANDROID": {
"des": "[Android]极光portal配置应用信息时分配的AppKey",
"key": "JPUSH_APPKEY"
},
"JPUSH_CHANNEL_ANDROID":{
"des": "[Android]用于统计分发渠道,不需要可填默认值developer-default",
"key": "JPUSH_CHANNEL"
}
}
}
}
}

BIN
nativeplugins/JG-JPush/android/com.heytap.msp-push-2.1.0.aar

Binary file not shown.

BIN
nativeplugins/JG-JPush/android/libs/MiPush_SDK_Client_3_8_5.jar

Binary file not shown.

BIN
nativeplugins/JG-JPush/android/libs/jpush-android-3.9.1.jar

Binary file not shown.

BIN
nativeplugins/JG-JPush/android/libs/jpush-android-plugin-meizu-v3.9.1.jar

Binary file not shown.

BIN
nativeplugins/JG-JPush/android/libs/jpush-android-plugin-oppo-v3.9.1.jar

Binary file not shown.

BIN
nativeplugins/JG-JPush/android/libs/jpush-android-plugin-vivo-v3.9.1.jar

Binary file not shown.

BIN
nativeplugins/JG-JPush/android/libs/jpush-android-plugin-xiaomi-v3.9.1.jar

Binary file not shown.

BIN
nativeplugins/JG-JPush/android/libs/meizu-push-4.0.2.jar

Binary file not shown.

BIN
nativeplugins/JG-JPush/android/libs/push_sdk_v3.0.0.jar

Binary file not shown.

BIN
nativeplugins/JG-JPush/android/uniplugin_jpush-release.aar

Binary file not shown.

798
nativeplugins/JG-JPush/ios/JPUSHService.h

@ -0,0 +1,798 @@
/*
* | | | | \ \ / / | | | | / _______|
* | |____| | \ \/ / | |____| | / /
* | |____| | \ / | |____| | | | _____
* | | | | / \ | | | | | | |____ |
* | | | | / /\ \ | | | | \ \______| |
* | | | | /_/ \_\ | | | | \_________|
*
* Copyright (c) 2011 ~ 2017 Shenzhen HXHG. All rights reserved.
*/
#define JPUSH_VERSION_NUMBER 3.4.0
#import <Foundation/Foundation.h>
@class CLRegion;
@class UILocalNotification;
@class CLLocation;
@class UNNotificationCategory;
@class UNNotificationSettings;
@class UNNotificationRequest;
@class UNNotification;
@protocol JPUSHRegisterDelegate;
@protocol JPUSHGeofenceDelegate;
@protocol JPushInMessageDelegate;
typedef void (^JPUSHTagsOperationCompletion)(NSInteger iResCode, NSSet *iTags, NSInteger seq);
typedef void (^JPUSHTagValidOperationCompletion)(NSInteger iResCode, NSSet *iTags, NSInteger seq, BOOL isBind);
typedef void (^JPUSHAliasOperationCompletion)(NSInteger iResCode, NSString *iAlias, NSInteger seq);
typedef void (^JPUSHInMssageCompletion)(NSInteger iResCode);
extern NSString *const kJPFNetworkIsConnectingNotification; // 正在连接中
extern NSString *const kJPFNetworkDidSetupNotification; // 建立连接
extern NSString *const kJPFNetworkDidCloseNotification; // 关闭连接
extern NSString *const kJPFNetworkDidRegisterNotification; // 注册成功
extern NSString *const kJPFNetworkFailedRegisterNotification; //注册失败
extern NSString *const kJPFNetworkDidLoginNotification; // 登录成功
extern NSString *const kJPFNetworkDidReceiveMessageNotification; // 收到消息(非APNS)
extern NSString *const kJPFServiceErrorNotification; // 错误提示
typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) {
JPAuthorizationOptionNone = 0, // the application may not present any UI upon a notification being received
JPAuthorizationOptionBadge = (1 << 0), // the application may badge its icon upon a notification being received
JPAuthorizationOptionSound = (1 << 1), // the application may play a sound upon a notification being received
JPAuthorizationOptionAlert = (1 << 2), // the application may display an alert upon a notification being received
JPAuthorizationOptionCarPlay = (1 << 3), // The ability to display notifications in a CarPlay environment.
JPAuthorizationOptionCriticalAlert NS_AVAILABLE_IOS(12.0) = (1 << 4) , //The ability to play sounds for critical alerts.
JPAuthorizationOptionProvidesAppNotificationSettings NS_AVAILABLE_IOS(12.0) = (1 << 5) , //An option indicating the system should display a button for in-app notification settings.
JPAuthorizationOptionProvisional NS_AVAILABLE_IOS(12.0) = (1 << 6) , //The ability to post noninterrupting notifications provisionally to the Notification Center.
JPAuthorizationOptionAnnouncement NS_AVAILABLE_IOS(13.0) = (1 << 7) , //The ability for Siri to automatically read out messages over AirPods.
};
typedef NS_ENUM(NSUInteger, JPAuthorizationStatus) {
JPAuthorizationNotDetermined = 0, // The user has not yet made a choice regarding whether the application may post user notifications.
JPAuthorizationStatusDenied, // The application is not authorized to post user notifications.
JPAuthorizationStatusAuthorized, // The application is authorized to post user notifications.
JPAuthorizationStatusProvisional NS_AVAILABLE_IOS(12.0), // The application is authorized to post non-interruptive user notifications.
};
typedef NS_ENUM(NSInteger,JPushInMessageContentType){
JPushAdContentType = 1, //广告类型的inMessage
JPushNotiContentType = 2, //通知类型的inMessage
};
/*!
*
*/
@interface JPUSHRegisterEntity : NSObject
/*!
*
* badge,sound,alert
*/
@property (nonatomic, assign) NSInteger types;
/*!
*
* iOS10 UNNotificationCategory
* iOS8-iOS9 UIUserNotificationCategory
*/
@property (nonatomic, strong) NSSet *categories;
@end
/*!
*
*/
@interface JPushNotificationIdentifier : NSObject<NSCopying, NSCoding>
@property (nonatomic, copy) NSArray<NSString *> *identifiers; // 推送的标识数组
@property (nonatomic, copy) UILocalNotification *notificationObj NS_DEPRECATED_IOS(4_0, 10_0); // iOS10以下可以传UILocalNotification对象数据,iOS10以上无效
@property (nonatomic, assign) BOOL delivered NS_AVAILABLE_IOS(10_0); // 在通知中心显示的或待推送的标志,默认为NO,YES表示在通知中心显示的,NO表示待推送的
@property (nonatomic, copy) void (^findCompletionHandler)(NSArray *results); // 用于查询回调,调用[findNotification:]方法前必须设置,results为返回相应对象数组,iOS10以下返回UILocalNotification对象数组;iOS10以上根据delivered传入值返回UNNotification或UNNotificationRequest对象数组(delivered传入YES,则返回UNNotification对象数组,否则返回UNNotificationRequest对象数组)
@end
/*!
*
* iOS10以上有效
*/
@interface JPushNotificationSound : NSObject <NSCopying, NSCoding>
@property (nonatomic, copy) NSString *soundName; //普通通知铃声
@property (nonatomic, copy) NSString *criticalSoundName NS_AVAILABLE_IOS(12.0); //警告通知铃声
@property (nonatomic, assign) float criticalSoundVolume NS_AVAILABLE_IOS(12.0); //警告通知铃声音量,有效值在0~1之间,默认为1
@end
/*!
*
*/
@interface JPushNotificationContent : NSObject<NSCopying, NSCoding>
@property (nonatomic, copy) NSString *title; // 推送标题
@property (nonatomic, copy) NSString *subtitle; // 推送副标题
@property (nonatomic, copy) NSString *body; // 推送内容
@property (nonatomic, copy) NSNumber *badge; // 角标的数字。如果不需要改变角标传@(-1)
@property (nonatomic, copy) NSString *action NS_DEPRECATED_IOS(8_0, 10_0); // 弹框的按钮显示的内容(IOS 8默认为"打开", 其他默认为"启动",iOS10以上无效)
@property (nonatomic, copy) NSString *categoryIdentifier; // 行为分类标识
@property (nonatomic, copy) NSDictionary *userInfo; // 本地推送时可以设置userInfo来增加附加信息,远程推送时设置的payload推送内容作为此userInfo
@property (nonatomic, copy) NSString *sound; // 声音名称,不设置则为默认声音
@property (nonatomic, copy) JPushNotificationSound *soundSetting NS_AVAILABLE_IOS(10.0); //推送声音实体
@property (nonatomic, copy) NSArray *attachments NS_AVAILABLE_IOS(10_0); // 附件,iOS10以上有效,需要传入UNNotificationAttachment对象数组类型
@property (nonatomic, copy) NSString *threadIdentifier NS_AVAILABLE_IOS(10_0); // 线程或与推送请求相关对话的标识,iOS10以上有效,可用来对推送进行分组
@property (nonatomic, copy) NSString *launchImageName NS_AVAILABLE_IOS(10_0); // 启动图片名,iOS10以上有效,从推送启动时将会用到
@property (nonatomic, copy) NSString *summaryArgument NS_AVAILABLE_IOS(12.0); //插入到通知摘要中的部分参数。iOS12以上有效。
@property (nonatomic, assign) NSUInteger summaryArgumentCount NS_AVAILABLE_IOS(12.0); //插入到通知摘要中的项目数。iOS12以上有效。
@property (nonatomic, copy) NSString *targetContentIdentifier NS_AVAILABLE_IOS(13.0); // An identifier for the content of the notification used by the system to customize the scene to be activated when tapping on a notification.
@end
/*!
*
* dateComponentstimeIntervalregion在iOS10以上可选择其中一个参数传入有效值IIIIII使其中一种触发方式生效fireDate为iOS10以下根据时间触发时须传入的参数
*/
@interface JPushNotificationTrigger : NSObject<NSCopying, NSCoding>
@property (nonatomic, assign) BOOL repeat; // 设置是否重复,默认为NO
@property (nonatomic, copy) NSDate *fireDate NS_DEPRECATED_IOS(2_0, 10_0); // 用来设置触发推送的时间,iOS10以上无效
@property (nonatomic, copy) CLRegion *region NS_AVAILABLE_IOS(8_0); // 用来设置触发推送的位置,iOS8以上有效,iOS10以上优先级为I,应用需要有允许使用定位的授权
@property (nonatomic, copy) NSDateComponents *dateComponents NS_AVAILABLE_IOS(10_0); // 用来设置触发推送的日期时间,iOS10以上有效,优先级为II
@property (nonatomic, assign) NSTimeInterval timeInterval NS_AVAILABLE_IOS(10_0); // 用来设置触发推送的时间,iOS10以上有效,优先级为III
@end
/*!
*
*/
@interface JPushNotificationRequest : NSObject<NSCopying, NSCoding>
@property (nonatomic, copy) NSString *requestIdentifier; // 推送请求标识
@property (nonatomic, copy) JPushNotificationContent *content; // 设置推送的具体内容
@property (nonatomic, copy) JPushNotificationTrigger *trigger; // 设置推送的触发方式
@property (nonatomic, copy) void (^completionHandler)(id result); // 注册或更新推送成功回调,iOS10以上成功则result为UNNotificationRequest对象,失败则result为nil;iOS10以下成功result为UILocalNotification对象,失败则result为nil
@end
/*!
* JPush
*/
@interface JPUSHService : NSObject
///----------------------------------------------------
/// @name Setup 启动相关
///----------------------------------------------------
/*!
* @abstract SDK
*
* @param launchingOption .
* @param appKey JPush ,. JPush .
* @param channel . .
* @param isProduction . , NO; , YES.
* App profile provision的配置.
*
* @discussion SDK启动必须的参数, SDK.
* App , JPush SDK .
*/
+ (void)setupWithOption:(NSDictionary *)launchingOption
appKey:(NSString *)appKey
channel:(NSString *)channel
apsForProduction:(BOOL)isProduction;
/*!
* @abstract SDK
*
* @param launchingOption .
* @param appKey JPush ,. JPush .
* @param channel . .
* @param isProduction . , NO; , YES.
* App profile provision的配置.
* @param advertisingId 广IDFA 使IDFAnil.
*
* @discussion SDK启动必须的参数, SDK.
* App , JPush SDK .
*/
+ (void)setupWithOption:(NSDictionary *)launchingOption
appKey:(NSString *)appKey
channel:(NSString *)channel
apsForProduction:(BOOL)isProduction
advertisingIdentifier:(NSString *)advertisingId;
///----------------------------------------------------
/// @name APNs about 通知相关
///----------------------------------------------------
/*!
* @abstract
*
* @param types
* @param categories
*
*/
+ (void)registerForRemoteNotificationTypes:(NSUInteger)types
categories:(NSSet *)categories;
/*!
* @abstract iOS10
*
* @param config
* @param delegate
*
*/
+ (void)registerForRemoteNotificationConfig:(JPUSHRegisterEntity *)config delegate:(id<JPUSHRegisterDelegate>)delegate;
+ (void)registerDeviceToken:(NSData *)deviceToken;
/*!
* @abstract APNs
*/
+ (void)handleRemoteNotification:(NSDictionary *)remoteInfo;
/*!
* @abstract Token
*
* @param voipToken 使Voip Token
*/
+ (void)registerVoipToken:(NSData *)voipToken;
/*!
* @abstract Voip
*
* @param remoteInfo Voip
*/
+ (void)handleVoipNotification:(NSDictionary *)remoteInfo;
/*!
* @abstract
* @param completion status值返回JPAuthorizationStatus
*/
+ (void)requestNotificationAuthorization:(void (^)(JPAuthorizationStatus status))completion;
/*!
* @abstract iOS8及以上有效
*/
+ (void)openSettingsForNotification:(void (^)(BOOL success))completionHandler NS_AVAILABLE_IOS(8_0);
/*!
* Tags操作接口
* ////
* https://docs.jiguang.cn/jpush/client/iOS/ios_api/)
*/
/**
tags
@param tags tags集合
@param completion
@param seq
*/
+ (void)addTags:(NSSet<NSString *> *)tags
completion:(JPUSHTagsOperationCompletion)completion
seq:(NSInteger)seq;
/**
tags
tags
@param tags tags集合
@param completion
@param seq
*/
+ (void)setTags:(NSSet<NSString *> *)tags
completion:(JPUSHTagsOperationCompletion)completion
seq:(NSInteger)seq;
/**
tags
@param tags tags集合
@param completion
@param seq
*/
+ (void)deleteTags:(NSSet<NSString *> *)tags
completion:(JPUSHTagsOperationCompletion)completion
seq:(NSInteger)seq;
/**
tags
@param completion
@param seq
*/
+ (void)cleanTags:(JPUSHTagsOperationCompletion)completion
seq:(NSInteger)seq;
/**
tags
@param completion
@param seq
*/
+ (void)getAllTags:(JPUSHTagsOperationCompletion)completion
seq:(NSInteger)seq;
/**
tag是否绑定
@param completion
@param seq
*/
+ (void)validTag:(NSString *)tag
completion:(JPUSHTagValidOperationCompletion)completion
seq:(NSInteger)seq;
/**
Alias
@param alias alias
@param completion
@param seq
*/
+ (void)setAlias:(NSString *)alias
completion:(JPUSHAliasOperationCompletion)completion
seq:(NSInteger)seq;
/**
alias
@param completion
@param seq
*/
+ (void)deleteAlias:(JPUSHAliasOperationCompletion)completion
seq:(NSInteger)seq;
/**
alias
@param completion
@param seq
*/
+ (void)getAlias:(JPUSHAliasOperationCompletion)completion
seq:(NSInteger)seq;
/*!
* @abstract tags
*
* @discussion tags , tags.
* tags . SDK .
*/
+ (NSSet *)filterValidTags:(NSSet *)tags;
///----------------------------------------------------
/// @name Stats 统计功能
///----------------------------------------------------
/*!
* @abstract
*
* @param pageName
* @discussion JCore 1.1.8 使 JAnalytics
*/
+ (void)startLogPageView:(NSString *)pageName __attribute__((deprecated("JCore 1.1.8 版本已过期")));
/*!
* @abstract
*
* @param pageName
* @discussion JCore 1.1.8 使 JAnalytics
*/
+ (void)stopLogPageView:(NSString *)pageName __attribute__((deprecated("JCore 1.1.8 版本已过期")));
/*!
* @abstract
*
* @param pageName
* @param seconds
* @discussion JCore 1.1.8 使 JAnalytics
*/
+ (void)beginLogPageView:(NSString *)pageName duration:(int)seconds __attribute__((deprecated("JCore 1.1.8 版本已过期")));
/*!
* @abstract Crash日志收集
*
* @discussion .
*/
+ (void)crashLogON;
/*!
* @abstract
*
* @param latitude .
* @param longitude .
*
*/
+ (void)setLatitude:(double)latitude longitude:(double)longitude;
/*!
* @abstract
*
* @param location CLLocation *
*
* @discussion CoreLocation.framework #import <CoreLocation/CoreLocation.h>
*/
+ (void)setLocation:(CLLocation *)location;
/**
10 iOS系统默认地理围栏最大个数为20
@param count count
*/
+ (void)setGeofenecMaxCount:(NSInteger)count;
/**
@param delegate
@param launchOptions app启动完成是收到的字段参数
*/
+ (void)registerLbsGeofenceDelegate:(id<JPUSHGeofenceDelegate>)delegate withLaunchOptions:(NSDictionary *)launchOptions;
/**
@param geofenceId id
*/
+ (void)removeGeofenceWithIdentifier:(NSString *)geofenceId;
///----------------------------------------------------
/// @name Local Notification 本地通知
///----------------------------------------------------
/*!
* @abstract (iOS10iOS10以下版本)
*
* JPush 2.1.9
* @param request JPushNotificationRequest类型request.requestIdentifier即更新已有的推送iOS10以上有效request.completionHandler返回
* @discussion 使
*
*/
+ (void)addNotification:(JPushNotificationRequest *)request;
/*!
* @abstract (iOS10iOS10以下版本)
*
* JPush 2.1.9
* @param identifier JPushNotificationIdentifier类型iOS10以上identifier设置为nilidentifier.delivered和identifier.identifiers来移除相应在通知中心显示推送或待推送请求identifier.identifiers如果设置为nil或空数组则移除相应标志下所有在通知中心显示推送或待推送请求iOS10以下identifier设置为nilidentifier.delivered属性无效identifier.notificationObj传入特定推送对象来移除此推送
* @discussion 使
*
*/
+ (void)removeNotification:(JPushNotificationIdentifier *)identifier;
/*!
* @abstract (iOS10iOS10以下版本)
*
* JPush 2.1.9
* @param identifier JPushNotificationIdentifier类型iOS10以上可以通过设置identifier.delivered和identifier.identifiers来查找相应在通知中心显示推送或待推送请求identifier.identifiers如果设置为nil或空数组则返回相应标志下所有在通知中心显示推送或待推送请求iOS10以下identifier.delivered属性无效identifier.identifiers如果设置nil或空数组则返回所有未触发的推送identifier.findCompletionHandler回调才能得到查找结果(NSArray *results)
* @discussion 使
*
*/
+ (void)findNotification:(JPushNotificationIdentifier *)identifier;
/*!
* @abstract 64
*
* @param fireDate
* @param alertBody
* @param badge -1
* @param alertAction IOS 8"打开", "启动"
* @param notificationKey
* @param userInfo
* @param soundName nil为默认声音
*
* @discussion 64 [addNotification:]
*/
+ (UILocalNotification *)setLocalNotification:(NSDate *)fireDate
alertBody:(NSString *)alertBody
badge:(int)badge
alertAction:(NSString *)alertAction
identifierKey:(NSString *)notificationKey
userInfo:(NSDictionary *)userInfo
soundName:(NSString *)soundName __attribute__((deprecated("JPush 2.1.9 版本已过期")));
/*!
* @abstract ( iOS8 )
*
* IOS8新参数
* @param region
* @param regionTriggersOnce
* @param category
* @discussion [addNotification:]
*/
+ (UILocalNotification *)setLocalNotification:(NSDate *)fireDate
alertBody:(NSString *)alertBody
badge:(int)badge
alertAction:(NSString *)alertAction
identifierKey:(NSString *)notificationKey
userInfo:(NSDictionary *)userInfo
soundName:(NSString *)soundName
region:(CLRegion *)region
regionTriggersOnce:(BOOL)regionTriggersOnce
category:(NSString *)category NS_AVAILABLE_IOS(8_0) __attribute__((deprecated("JPush 2.1.9 版本已过期")));
/*!
* @abstract
*
* @param notification
* @param notificationKey
*
* @discussion App在前台运行时不会进行弹窗--iOS10以下还可继续使用iOS10以上在[UNUserNotificationCenterDelegate willPresentNotification:withCompletionHandler:]completionHandler(UNNotificationPresentationOptionSound | UNNotificationPresentationOptionAlert);
*/
+ (void)showLocalNotificationAtFront:(UILocalNotification *)notification
identifierKey:(NSString *)notificationKey __attribute__((deprecated("JPush 2.1.9 版本已过期")));
/*!
* @abstract
*
* @param notificationKey
* @discussion [removeNotification:]
*/
+ (void)deleteLocalNotificationWithIdentifierKey:(NSString *)notificationKey __attribute__((deprecated("JPush 2.1.9 版本已过期")));
/*!
* @abstract
* @discussion [removeNotification:]
*/
+ (void)deleteLocalNotification:(UILocalNotification *)localNotification __attribute__((deprecated("JPush 2.1.9 版本已过期")));
/*!
* @abstract
*
* @param notificationKey
* @return , [array count]0
* @discussion [findNotification:]
*/
+ (NSArray *)findLocalNotificationWithIdentifier:(NSString *)notificationKey __attribute__((deprecated("JPush 2.1.9 版本已过期")));
/*!
* @abstract
* @discussion [removeNotification:]
*/
+ (void)clearAllLocalNotifications __attribute__((deprecated("JPush 2.1.9 版本已过期")));
///----------------------------------------------------
/// @name Server badge 服务器端 badge 功能
///----------------------------------------------------
/*!
* @abstract ()
*
* @param value . ()
*
* @discussion .
* UIApplication:setApplicationIconBadgeNumber .
*
* JPush .
* , APNs , , .
*
* JPush :
*
* - API () badge ;
* - API APNs (),
* 使 "+1" , badge () +1 badge ;
*/
+ (BOOL)setBadge:(NSInteger)value;
/*!
* @abstract (0)
*
* @discussion [setBadge:0] .
* [JPUSHService setBadge:] .
*/
+ (void)resetBadge;
///----------------------------------------------------
/// @name Other Feature 其他功能
///----------------------------------------------------
/*!
* @abstract ()
*
* @param mobileNumber .
* @param completion error为空error带有错误码及错误信息
*
* @discussion completion异步返回completion设置为nil不处理结果信息
*
*/
+ (void)setMobileNumber:(NSString *)mobileNumber completion:(void (^)(NSError *error))completion;
///----------------------------------------------------
/// @name Logs and others 日志与其他
///----------------------------------------------------
/*!
* @abstract JPush标识此设备的 registrationID
*
* @discussion SDK注册成功后, registrationID .
*
* JPush registrationID .
* , registrationID , , .
* registrationIDCompletionHandler:registrationID的方法block中获取registrationID,resCode为返回码,resCode返回1011,registrationID返回nil.
* JPush .
*/
+ (NSString *)registrationID;
+ (void)registrationIDCompletionHandler:(void(^)(int resCode,NSString *registrationID))completionHandler;
/*!
* @abstract Debug
*
* @discussion JMessage iOS Android .
* : Verbose, Debug, Info, Warning, Error.
* , Android .
*
* SDK : Info. , .
*
* SDK启动后调用本接口: Debug, .
*/
+ (void)setDebugMode;
/*!
* @abstract
*
* @discussion , [JPUSHService setDebugMode]
*
* , Warning, Error . , , .
*
* , , .
*/
+ (void)setLogOFF;
/*!
* @abstract SDK地理位置权限开关
*
* @discussion SDK地理围栏的相关功能将受到影响
*
*/
+ (void)setLocationEanable:(BOOL)isEanble;
/*!
* @abstract
*
* @discussion JPushInMessageDelegate的代理对象
*
*/
+ (void)setInMessageDelegate:(id<JPushInMessageDelegate>)inMessageDelegate;
/*!
* @abstract
*
* @discussion
*
*/
+ (void)pullInMessageCompletion:(JPUSHInMssageCompletion)completion;
///----------------------------------------------------
///********************下列方法已过期********************
///**************请使用新版tag/alias操作接口**************
///----------------------------------------------------
/// @name Tag alias setting 设置别名与标签
///----------------------------------------------------
/*!
*
* ()nilhttps://docs.jiguang.cn/jpush/client/iOS/ios_api/)
* setTags:alias:fetchCompletionHandle:block里面处理设置结果即可.
* WARN: 使block时需要注意循环引用问题
*/
+ (void) setTags:(NSSet *)tags
alias:(NSString *)alias
callbackSelector:(SEL)cbSelector
target:(id)theTarget __attribute__((deprecated("JPush 2.1.1 版本已过期")));
+ (void) setTags:(NSSet *)tags
alias:(NSString *)alias
callbackSelector:(SEL)cbSelector
object:(id)theTarget __attribute__((deprecated("JPush 3.0.6 版本已过期")));
+ (void) setTags:(NSSet *)tags
callbackSelector:(SEL)cbSelector
object:(id)theTarget __attribute__((deprecated("JPush 3.0.6 版本已过期")));
+ (void)setTags:(NSSet *)tags
alias:(NSString *)alias
fetchCompletionHandle:(void (^)(int iResCode, NSSet *iTags, NSString *iAlias))completionHandler __attribute__((deprecated("JPush 3.0.6 版本已过期")));
+ (void) setTags:(NSSet *)tags
aliasInbackground:(NSString *)alias __attribute__((deprecated("JPush 3.0.6 版本已过期")));
+ (void)setAlias:(NSString *)alias
callbackSelector:(SEL)cbSelector
object:(id)theTarget __attribute__((deprecated("JPush 3.0.6 版本已过期")));
@end
@class UNUserNotificationCenter;
@class UNNotificationResponse;
@protocol JPUSHRegisterDelegate <NSObject>
/*
* @brief handle UserNotifications.framework [willPresentNotification:withCompletionHandler:]
* @param center [UNUserNotificationCenter currentNotificationCenter]
* @param notification
* @param completionHandler callback中的options 使UNNotificationPresentationOptions
*/
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(NSInteger options))completionHandler;
/*
* @brief handle UserNotifications.framework [didReceiveNotificationResponse:withCompletionHandler:]
* @param center [UNUserNotificationCenter currentNotificationCenter]
* @param response
* @param completionHandler
*/
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)(void))completionHandler;
/*
* @brief handle UserNotifications.framework [openSettingsForNotification:]
* @param center [UNUserNotificationCenter currentNotificationCenter]
* @param notification
*/
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center openSettingsForNotification:(UNNotification *)notification NS_AVAILABLE_IOS(12.0);
/**
*
* @param status JPAuthorizationStatus
* @param info
*/
- (void)jpushNotificationAuthorization:(JPAuthorizationStatus)status withInfo:(NSDictionary *)info;
@end
@protocol JPUSHGeofenceDelegate <NSObject>
/**
@param geofenceId id
@param userInfo
@param error
*/
- (void)jpushGeofenceIdentifer:(NSString *)geofenceId didEnterRegion:(NSDictionary *)userInfo error:(NSError *)error;
/**
@param geofenceId id
@param userInfo
@param error
*/
- (void)jpushGeofenceIdentifer:(NSString *)geofenceId didExitRegion:(NSDictionary *)userInfo error:(NSError *)error;
@end
@protocol JPushInMessageDelegate <NSObject>
@optional
/**
*,
*/
- (BOOL)jPushInMessageIsAllowedInMessagePop;
/**
*
*/
- (void)jPushInMessageAlreadyPop __attribute__((deprecated("JPush 3.4.0 版本已过期")));;
/**
*
*/
- (void)jPushInMessageAlreadyDisappear;
/**
inMessage展示的回调
@param messageType inMessage
@param content 广
*/
- (void)jPushInMessageAlreadyPopInMessageType:(JPushInMessageContentType)messageType Content:(NSDictionary *)content;
/**
inMessage点击的回调
@param messageType inMessage
@param content 广
*/
- (void)jpushInMessagedidClickInMessageType:(JPushInMessageContentType)messageType Content:(NSDictionary *)content;
@end

17
nativeplugins/JG-JPush/ios/UniPluginJPush.framework/Headers/JPushModule.h

@ -0,0 +1,17 @@
//
// JPushModule.h
// UniPluginJPush
//
// Created by huangshuni on 2021/1/12.
//
#import <Foundation/Foundation.h>
#import "DCUniModule.h"
NS_ASSUME_NONNULL_BEGIN
@interface JPushModule : DCUniModule
@end
NS_ASSUME_NONNULL_END

BIN
nativeplugins/JG-JPush/ios/UniPluginJPush.framework/Info.plist

Binary file not shown.

BIN
nativeplugins/JG-JPush/ios/UniPluginJPush.framework/UniPluginJPush

Binary file not shown.

BIN
nativeplugins/JG-JPush/ios/UniPluginJPush.framework/_CodeSignature/CodeDirectory

Binary file not shown.

BIN
nativeplugins/JG-JPush/ios/UniPluginJPush.framework/_CodeSignature/CodeRequirements

Binary file not shown.

BIN
nativeplugins/JG-JPush/ios/UniPluginJPush.framework/_CodeSignature/CodeRequirements-1

Binary file not shown.

117
nativeplugins/JG-JPush/ios/UniPluginJPush.framework/_CodeSignature/CodeResources

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Headers/JPushModule.h</key>
<data>
hAItQbWWuw4mOOySo6FeWH3MYsA=
</data>
<key>Info.plist</key>
<data>
mdxdKDpLHqtEZTfNMy6MBCyizi8=
</data>
</dict>
<key>files2</key>
<dict>
<key>Headers/JPushModule.h</key>
<dict>
<key>hash</key>
<data>
hAItQbWWuw4mOOySo6FeWH3MYsA=
</data>
<key>hash2</key>
<data>
LHaZ7SfsmEBYhVCf3bEBp8fHG5II1obOplOf4kj6EZQ=
</data>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>

BIN
nativeplugins/JG-JPush/ios/UniPluginJPush.framework/_CodeSignature/CodeSignature

Binary file not shown.

BIN
nativeplugins/JG-JPush/ios/jpush-ios-3.4.0.a

Binary file not shown.

138
nativeplugins/JG-JPush/package.json

@ -0,0 +1,138 @@
{
"name": "JG-JPush",
"id": "JG-JPush",
"version": "1.0.3",
"description": "极光推送Hbuilder插件",
"_dp_type":"nativeplugin",
"_dp_nativeplugin":{
"ios": {
"plugins": [{
"type": "module",
"name": "JG-JPush",
"class": "JPushModule"
}],
"hooksClass": "JPushProxy",
"integrateType": "framework",
"deploymentTarget": "9.0",
"frameworks": [
"CFNetwork.framework",
"CoreFoundation.framework",
"CoreTelephony.framework",
"SystemConfiguration.framework",
"CoreGraphics.framework",
"Foundation.framework",
"UIKit.framework",
"Security.framework",
"libz.tbd",
"AdSupport.framework",
"UserNotifications.framework",
"libresolv.tbd",
"WebKit.framework",
"AppTrackingTransparency.framework",
"StoreKit.framework"
],
"resources": [
],
"capabilities": {
"entitlements": {
"aps-environment":"development"
}
},
"privacies": [
"NSLocationAlwaysAndWhenInUseUsageDescription",
"NSLocationAlwaysUsageDescription",
"NSLocationWhenInUseUsageDescription"
],
"parameters": {
"JPUSH_ISPRODUCTION_IOS": {
"des": "[iOS]是否是生产环境,是填true,不是填false或者不填",
"key": "JPush:ISPRODUCTION"
},
"JPUSH_ADVERTISINGID_IOS": {
"des": "[iOS]广告标识符(IDFA)如果不需要使用IDFA,可不填",
"key": "JPush:ADVERTISINGID"
},
"JPUSH_DEFAULTINITJPUSH_IOS": {
"des": "[iOS]是否默认初始化,是填true,不是填false或者不填",
"key": "JPush:DEFAULTINITJPUSH"
}
}
},
"android": {
"plugins": [
{
"type": "module",
"name": "JG-JPush",
"class": "cn.jiguang.uniplugin_jpush.JPushModule"
}
],
"integrateType": "aar",
"minSdkVersion": "19",
"permissions": [
"${applicationId}.permission.JPUSH_MESSAGE",
"android.permission.RECEIVE_USER_PRESENT",
"android.permission.INTERNET",
"android.permission.READ_PHONE_STATE",
"android.permission.WRITE_EXTERNAL_STORAGE",
"android.permission.READ_EXTERNAL_STORAGE",
"android.permission.WRITE_SETTINGS",
"android.permission.MOUNT_UNMOUNT_FILESYSTEMS",
"android.permission.ACCESS_NETWORK_STATE",
"android.permission.ACCESS_WIFI_STATE",
"com.huawei.android.launcher.permission.CHANGE_BADGE",
"android.permission.VIBRATE",
"android.permission.SYSTEM_ALERT_WINDOW",
"android.permission.ACCESS_COARSE_LOCATION",
"android.permission.CHANGE_WIFI_STATE",
"android.permission.ACCESS_FINE_LOCATION",
"android.permission.ACCESS_BACKGROUND_LOCATION",
"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS",
"android.permission.CHANGE_NETWORK_STATE",
"android.permission.GET_TASKS",
"android.permission.QUERY_ALL_PACKAGES",
"${applicationId}.permission.MIPUSH_RECEIVE",
"com.coloros.mcs.permission.RECIEVE_MCS_MESSAGE",
"com.heytap.mcs.permission.RECIEVE_MCS_MESSAGE"
],
"parameters": {
"JPUSH_OPPO_APPKEY": {
"des": "厂商OPPO-appkey,示例:OP-12345678",
"key": "OPPO_APPKEY"
},
"JPUSH_OPPO_APPID":{
"des": "厂商OPPO-appId,示例:OP-12345678",
"key": "OPPO_APPID"
},
"JPUSH_OPPO_APPSECRET":{
"des": "厂商OPPO-appSecret,示例:OP-12345678",
"key": "OPPO_APPSECRET"
},
"JPUSH_VIVO_APPKEY":{
"des": "厂商VIVO-appkey,示例:12345678",
"key": "com.vivo.push.api_key"
},
"JPUSH_VIVO_APPID":{
"des": "厂商VIVO-appId,示例:12345678",
"key": "com.vivo.push.app_id"
},
"JPUSH_MEIZU_APPKEY":{
"des": "厂商MEIZU-appKey,示例:MZ-12345678",
"key": "MEIZU_APPKEY"
},
"JPUSH_MEIZU_APPID":{
"des": "厂商MEIZU-appId,示例:MZ-12345678",
"key": "MEIZU_APPID"
},
"JPUSH_XIAOMI_APPKEY":{
"des": "厂商XIAOMI-appKey,示例:MI-12345678",
"key": "XIAOMI_APPKEY"
},
"JPUSH_XIAOMI_APPID":{
"des": "厂商XIAOMI-appId,示例:MI-12345678",
"key": "XIAOMI_APPID"
}
}
}
}
}

19
pages.json

@ -37,7 +37,8 @@
{
"path": "pages/index/address",
"style": {
"navigationStyle":"custom"
"navigationStyle":"custom",
"navigationBarTextStyle":"black"
}
},
{
@ -102,8 +103,13 @@
{
"path" : "pages/account/changeImg",
"style" :{
"navigationStyle":"custom",
"enablePullDownRefresh": false
"app-plus":{
"titleNView":false //
},
"navigationBarBackgroundColor":"white",
"navigationStyle":"custom",
"navigationBarTextStyle":"#000000"
}
},
@ -275,7 +281,7 @@
"path": "pages/category/productList",
"style": {
"titleNView":false,
"enablePullDownRefresh":true,
// "enablePullDownRefresh":true,
// "navigationBarTextStyle":"white",
"navigationBarBackgroundColor": "#000000"
}
@ -324,7 +330,8 @@
{
"path": "pages/productDetails/review",
"style": {
"titleNView":false
"titleNView":false,
"enablePullDownRefresh":true
}
},
{
@ -354,6 +361,7 @@
}
],
"globalStyle": {
"navigationBarBackgroundColor": "#000000",
"navigationBarTextStyle": "white",
@ -387,6 +395,7 @@
"selectedIconPath": "static/img/Category1.png",
"text": "Category"
},
{
"pagePath": "pages/shippingCart/index",
"iconPath": "static/img/Cart.png",

120
pages/account/addAddress.vue

@ -1,19 +1,17 @@
<template>
<view>
<view class="address_serch">
<!-- <view class="address_serch">
<input type="text" placeholder="ADDRESS FINDER:Search by postcode">
</view>
<view class="address_info">
</view> -->
<view class="address_info" >
<view class="address_info_item address_info_item1">
<view class="info_item_title" >
<view class="info_item_title"@click="bindPickerChange" >
<picker @change="bindPickerChange" :value="index" :range="countryList" range-key="region_name" class="info_item_title_pick">
<text>*Country/Region</text>
<view class="info_item_title_span">{{countryText}}</view>
</picker>
<image src="../../static/img/right1.png" mode=""></image>
</view>
</view>
@ -172,7 +170,8 @@
province:'',
city:'',
address:'',
listAll:[]
listAll:[],
isaddress:true,
}
},
methods:{
@ -280,15 +279,27 @@
}
},
//
getCountry(){
getCountry(){
let data={_action:'getregions',parent_region_id:0}
defaultRequest2(data).then(res=>{
// uni.showLoading({
// title:'loading'
// })
// setTimeout(()=>{
// uni.hideLoading()
// },5000)
defaultRequest2(data).then(res=>{
let list =[]
let listAll = []
// console.info(res)
console.info(res)
// // console.log(this.countryText)
if(res.error==0){
this.countryList=res.data
uni.setStorageSync('countryText',this.countryList)
this.isaddress = false
uni.hideLoading()
if(this.countryText){
res.data.map( item =>{
if(item.region_name == this.countryText){
@ -317,8 +328,13 @@
},
//
bindPickerChange(e){
this.isSelect = true
this.cityList = []
this.provinceList = []
console.log(e)
// uni.showLoading({
// title:''
// })
// this.isSelect = true
if(this.index!=e.detail.value){
this.provinceText=''
this.cityText=''
@ -328,35 +344,58 @@
let list =[]
let listAll = []
this.index=e.detail.value
console.log(this.countryList)
this.query.consignee.country=this.countryList[this.index].region_id
this.countryText=this.countryList[this.index].region_name
// if(this.countryList.length >0){
// this.isSelect = true
// console.log(this.countryList.length)
// }
if(this.countryText){
this.isSelect = true
let strlist
this.countryList.map( item =>{
console.log(item)
if(item.region_name == this.countryText){
item.regions.map(item2 =>{
list.push({
region_name:item2.region_name,
region_id:item2.region_id
})
if(item2.regions){
strlist = item2.regions
}
listAll.push({
name:item2.region_name,
list:item2.regions
list:strlist
})
if(item2.region_name == this.provinceText){
this.cityList = item2.regions
if(this.cityList[0].region_name!=undefined)
this.cityList = strlist
this.provinceList = list
// this.provinceText = list[0].region_name
this.listAll = listAll
if(this.cityList)
{
this.cityText = this.cityList[0].region_name
this.cityText = strlist[0].region_name
this.isSelect1 = true
}else{
this.isSelect1 = false
}
}
if(this.provinceList){
this.provinceText = list[0].region_name
this.isSelect = true
}
})
}
})
// console.log(listAll)
this.provinceList = list
console.log(this.provinceList )
this.listAll = listAll
}
@ -365,7 +404,7 @@
},
//
bindPickerChange1(e){
this.isSelect1 = true
this.provinceIndex=e.detail.value
console.log(this.provinceList)
this.provinceText=this.provinceList[this.provinceIndex].region_name
@ -376,6 +415,7 @@
{
this.cityText = this.cityList[0].region_name
this.query.consignee.city=this.cityList[0].region_id
this.isSelect1 = true
}
else{
this.isSelect1 = false
@ -402,6 +442,7 @@
this.query.consignee.province=this.provinceList[this.provinceIndex].region_id
console.log(this.query.consignee.province)
// this.provinceText=this.provinceList[this.provinceIndex].region_name
},
//
@ -413,11 +454,19 @@
}
},
onShow() {
this.getCountry()
created() {
let str = uni.getStorageSync('countryList')
console.log(str.length)
if(str.length >0 ){
this.countryList = uni.getStorageSync('countryList')
}
else{
this.getCountry()
}
},
onLoad(e) {
onLoad(e) {
this.getCountry()
if(e.type==1){
e.data=JSON.parse(e.data)
console.info(e.data)
@ -439,7 +488,7 @@
}
}
this.getCountry()
}
}
</script>
@ -450,7 +499,11 @@
}
</style>
<style lang="scss" scoped>
/deep/.uni-input-input{
font-size: 29rpx !important;
font-weight: bold;
padding-top: 10rpx !important;
}
.address_serch{
background-color: white;
padding: 26.67rpx 24rpx;
@ -478,7 +531,8 @@
padding: 0 26.67rpx;
margin-top: 14.67rpx;
.address_info_item{
padding-top: 42.67rpx;
padding-top: 30.67rpx;
padding-bottom: 30.67rpx;
border-bottom: 1px solid #E2E2E2;
&:last-child{
border-bottom: none;
@ -490,14 +544,16 @@
justify-content: space-between;
align-items: center;
font-weight: bold;
margin-bottom: 10rpx;
margin-bottom: 14rpx;
.info_item_title_pick{
width: 100%;
}
.info_item_title_span{
font-size: 26rpx;
color: black;
margin-top: 15.33rpx;
text-align: start;
margin-top: 12.33rpx;
}
image{
width: 25.33rpx;
@ -512,8 +568,8 @@
}
}
.address_info_item1{
padding-top: 32.67rpx;
padding-bottom: 27.33rpx;
// padding-top: 32.67rpx;
// padding-bottom: 17.33rpx;
}
}
.address_switch{

10
pages/account/address.vue

@ -7,7 +7,7 @@
<text>{{item.mobile}}</text>
</view>
<view class="address_info_content">
<view class="info_content_left">
<view class="info_content_left" style="width: 60%;">
<view>{{item.sign_building}} </view>
<text>{{item.country_name}} {{item.province_name}} {{item.city_name}} {{item.address}} {{item.mobile}}</text>
</view>
@ -137,8 +137,8 @@
box-sizing: border-box;
button{
color: white;
height: 80rpx;
line-height: 80rpx;
height: 84rpx;
line-height: 84rpx;
background-color: black;
font-size: 26.67rpx;
font-weight: bold;
@ -150,7 +150,7 @@
width: 100%;
background-color: white;
padding-top: 32rpx;
font-size: 24rpx;
font-size: 26rpx;
color: #666666;
font-weight: bold;
@ -164,7 +164,7 @@
align-items: center;
margin-bottom: 37.33rpx;
.info_title_span{
font-size: 28rpx;
font-size: 32rpx;
color: black;
margin-right: 38.67rpx;
}

25
pages/account/changeImg.vue

@ -4,10 +4,10 @@
<uni-section type="line"
style="margin-bottom: 3px;">
<view class="box-bg">
<uni-nav-bar border="false" title="image" >
<uni-nav-bar border="false" title="image" backgroundColor="#000" color="#fff" :border="false">
<block slot="left">
<!-- <view ><uni-icons type="back" size="30"></uni-icons></view> -->
<view class="icon-all"><image class="imgsize"src='../../static/icon/left.png' @click="back()"/></view>
<view class="icon-all"><image class="imgsize"src='../../static/img/left_white.png' @click="back()"/></view>
</block>
<block slot="right">
@ -58,6 +58,10 @@
},
onLoad() {
this.getimglist()
},
onShow() {
plus.navigator.setStatusBarStyle("dark");
},
methods: {
getimglist(){
@ -107,13 +111,20 @@
}
}
</script>
<style>
page{
height: 100%;
width: 100%;
background-color: #000 !important;
}
</style>
<style>
.foot{
height:120rpx;
width: 100vw;
top:0;
padding:50rpx 0 0 0;
background-color: #fff;
background-color: #000;
position: fixed;
}
.fixed{
@ -129,13 +140,13 @@
flex-wrap: wrap;
margin:10rpx 4vw 10rpx 2vw;
padding: 100rpx 0;
background-color: #fff;
background-color: #000;
}
.text-bg{
background-color: black;
color: aliceblue;
background-color: #fff;
color: #000;
padding: 6rpx 10rpx;
border-radius: 15rpx;
}

89
pages/account/demo1.vue

@ -49,6 +49,16 @@
</view>
</scroll-view>
</view>
<view class="tarbar">
<view @click="change(index)" v-for="(item,index) in tarbar" :key="item.name" :class="index==2?'img_m':'tarbar_img'">
<image :src="item.src"></image>
<view>{{ item.name}}</view>
</view>
<!-- <view class="tarbar_img"@click="change(1)"><image src="../../static/img/Category.png"></image><view>Category</view></view>
<view class="img_m" @click="change(2)"><image src="../../static/img/add.png"></image></view>
<view class="tarbar_img"@click="change(3)"><image src="../../static/img/Cart.png"></image><view>Cart</view></view>
<view class="tarbar_img"@click="change(4)"><image src="../../static/img/Account.png"></image><view>Account</view></view> -->
</view>
</view>
</template>
<script>
@ -70,7 +80,36 @@
categoryList:'1234567’',
sum:0,
backButtonPress:0,
homeIndex: 0
homeIndex: 0,
tarbar:[
{
src:'../../static/icon/home3.png',
name:'Home'
},
{
src:'../../static/img/Category.png',
name:'Category'
},
{
src:'../../static/icon/home3.png',
name:''
},
{
src:'../../static/img/Cart.png',
name:'Cart'
},
{
src:'../../static/img/Account.png',
name:'Account'
},
],
list:[
{src:'../../static/icon/home4.png',url:'../index/index'},
{src:'../../static/img/Category1.png',url:'..//category/index'},
{src:'',url:'../index/index2'},
{src:'../../static/img/cart1.png',url:'..//shippingCart/index'},
{src:'../../static/img/Account1.png',url:'../account/index'}
]
}
},
onShow() {
@ -101,7 +140,24 @@
// },
methods: {
change(e){
this.index = e
let tarbar = this.tarbar
for(let i =0; i<this.tarbar.length;i++){
if(e==i){
this.tarbar[e].src = this.list[e].src
}else{
this.tarbar = tarbar
this.tarbar[i].src = tarbar[i].src
}
}
// uni.switchTab({
// url:this.list[e].url
// })
},
change2(e){
this.tarbar[e].src = this.list[e].src
},
//
async swichMenu(index) {
@ -230,7 +286,8 @@
}
}, 10)
}
}
},
}
</script>
@ -243,6 +300,32 @@
display: flex;
flex-direction: column;
}
.tarbar{
height: 100rpx;
width: 100vw;
padding-top: 10rpx;
padding-bottom: 10rpx;
background-color: #fff;
bottom: 0;
font-size: 24rpx;
text-align: center;
position: fixed;
display: flex;
color:#707070;
justify-content: space-around;
.tarbar_img image{
height: 50rpx;
width: 50rpx;
// background-color: #fff;
}
.img_m image{
height: 80rpx;
width: 80rpx;
margin-top: -20rpx;
}
}
.search{
width: 100%;
background-color:#000;

119
pages/account/favorites.vue

@ -1,13 +1,15 @@
<template>
<view class="wishlist_body">
<view class="status_bar"></view>
<view class="status_bar">
<uni-nav-bar left-icon="left" :rightText="isDelete?'Done':'Delete'" title="Footprint" :fixed="true" :border="false"
color="#fff" backgroundColor="#000" @clickLeft="back" @clickRight="$refs.alertDialog.open()"/>
</view>
<view class="wishlist">
<view class="wishlist_item" v-for="(item,index) in goodsList" :key="index" @click="goDetails(item)">
<view class="wishlist_item" v-for="(item,index) in goodsList" :key="index" >
<view class="wishlist_item_img">
<image :src="item.goods_img" mode="" class="wishlist_item_img_goods"></image>
<image src="../../static/img/select.png" mode="" class="select" v-show="isDelete"></image>
<image :src="item.goods_img" mode="" class="wishlist_item_img_goods" @click="isDelete?deleteTap(item.id,index): goDetails(item)"></image>
<!-- <image src="../../static/img/select.png" mode="" class="select" v-show="isDelete&& item.id!=deletelist[index].id" ></image>
<image src="../../static/img/select1.png" mode="" class="select" v-show="isDelete&& item.id==deletelist[index].id||All" ></image> -->
</view>
<view class="wishlist_item_bottom">
<text>US${{item.promote_price?item.promote_price:item.shop_price}}</text>
@ -23,19 +25,21 @@
<view>No browsing record!</view>
<view><button @click="gotoindex()">Go to see</button></view>
</view>
<view class="wishlist_foot" v-show="isDelete">
<!-- <view class="wishlist_foot" v-show="isDelete">
<view class="wishlist_foot_left">
<image src="../../static/img/select2.png" mode=""></image>
<image src="../../static/img/select2.png" mode="" v-if="!All" @click="All=true"></image>
<image src="../../static/img/select1.png" mode="" v-else @click="All=false"></image>
<text>All</text>
</view>
<view class="wishlist_foot_right">
<button>DELETE</button>
<button :class="(isdelete||All)?'wishlist_foot_right_button':''" @click="$refs.alertDialog.open()">DELETE</button>
</view>
</view>
</view> -->
<uni-popup ref="alertDialog" type="dialog" v-if="goodsList">
<uni-popup-dialog type="error" cancelText="Close" confirmText="Clear" title="Tips" content="Whether to clear browsing history?"
@confirm="clearFavorites" ></uni-popup-dialog>
</uni-popup>
<view class="bootom_last" v-if="bootom == 1">-THE END-</view>
</view>
</template>
@ -45,10 +49,18 @@
data() {
return {
isDelete:false,
goodsList:[]
goodsList:[],
isdelete:0,
All:false,
deletelist:[],
bootom:0,
}
},
methods:{
onReachBottom(e){
console.log('end')
this.bootom = 1
},
goDetails(id){
uni.navigateTo({
@ -62,6 +74,7 @@
},
//
clearFavorites(){
let data={_action:'cleargoodsbrowsehistory'}
defaultRequest2(data).then(res=>{
console.info(res)
@ -73,7 +86,9 @@
this.getList()
}
})
},
//
addLike(id){
let data={_action:'setfaviouritegoods',goods_id:id}
@ -114,6 +129,66 @@
}
})
},
deleteTap(id,index){
console.log(id)
this.isdelete = id
let i = index
let list = ({
id:this.goodsList[i].id,
index:i
})
console.log(list.id)
let tag = 1
const _list = JSON.stringify(list)
const _delete = JSON.stringify(this.deletelist)
console.log( _list, _delete)
console.log(_delete.includes(_list))
for(let i =0;i<this.deletelist.length;i++){
if(this.deletelist[i].id == list.id){
this.deletelist[i].id =''
this.deletelist[i].index =''
tag = 0
}
}
if(tag!=0){
// this.deletelist.push(list)
this.deletelist[index].id = list.id
this.deletelist[index].index = list.index
console.log(this.deletelist)
uni.setStorage({
key: 'deletelist',
data: JSON.stringify(this.deletelist)
});
}
let list2 =[]
this.deletelist.map( item =>{
if(item.id!=''){
console.log(111)
list2.push(item)
}
})
console.log(list2)
if(list2.length>0&&list2.length !== this.goodsList.length){
// this.Select_one = 1
this.isdelete = 1
this.isAll = false
}
else if(list2.length == this.goodsList.length){
this.isAll = true
}else if(list2.length == 0){
this.isAll = false
// this.Select_one = 0
this.isdelete = ''
this.deletelist[index].id = ''
list2 =[]
}
},
back(){
uni.navigateBack()
},
@ -123,6 +198,12 @@
console.info(res)
if(res.error==0){
this.goodsList=res.data
this.goodsList.map( item =>{
this.deletelist.push({
index:'',
id:''
})
})
}
})
}
@ -140,11 +221,24 @@
}
</style>
<style lang="scss" scoped>
.bootom_last{
height: 200rpx;
width: 100%;
color: #fff;
background-color: #000;
font-size: 25rpx;
padding-bottom:40rpx;
line-height: 200rpx;
text-align: center;
}
.status_bar{
height: 50rpx;
height: 100rpx;
top:0;
padding-top: 50rpx;
width: 100%;
z-index: 999;
position: fixed;
background-color: #000000;
}
@ -152,6 +246,9 @@
font-size: 32rpx;
font-weight: bold;
}
.wishlist{
margin-top: 70rpx;
}
.wishlist_item_bottom{
width: 220rpx;
box-sizing: border-box;

137
pages/account/index.vue

@ -2,10 +2,10 @@
<view>
<!-- <view class="status_bar"></view> -->
<view class="one" v-show ="isTop">
<image src="../../static/img/left_white.png" mode="" @click="back()"></image>
<image src="../../static/img/left_white.png" mode="" @click="backTo"></image>
<image src="/static/img/dope plus_white.png" mode="" class="index_logo"></image>
</view>
<view class="account_info " :style="{background:`url(${userbg})`}">
<view class="account_info padding_account" :style="{background:`url(${userbg})`}">
<image src="../../static/icon/nologin2.png" mode="" class="header_img" v-show="!user_info.isLogin||!user_info.user_head"></image>
<image :src="user_info.user_head" mode="" class="header_img" v-show="user_info.isLogin&&user_info.user_head" @click="seeImg()"></image>
<!-- <image :src="user_info.user_head?user_info.user_head:user_info.headicons[5]" mode="" class="header_img" v-if="user_info.isLogin"></image> -->
@ -40,7 +40,7 @@
</view>
</view>
<view class="order">
<view class="order allpadding">
<navigator url="/pages/account/myOrders?scroll_active=0" class="order_title">My Orders<view class="icon_right"><image mode="" src="../../static/img/right.png"></image></view></navigator>
<view class="order_info">
<navigator :url="noLogin==0?'/pages/account/myOrders?scroll_active=1':'../login/index'" class="order_info_item">
@ -63,8 +63,8 @@
</view>
<view class="order">
<view class="order_title">My Service</view>
<view class="order_info" >
<view class="order_title allpadding">My Service</view>
<view class="order_info allpadding" >
<view v-for="(item,index) in indexDate.blocks" :key="item.block_title" @click="gotopage(item.block_title,item.block_link)" class="order_info_item" >
<image :src="item.block_pic" class="info_img" mode=""></image>
<text>{{ item.block_title }}</text>
@ -102,10 +102,10 @@
</navigator> -->
</view>
<scroll-view scroll-x="true"><image :src="item.block_pic" v-for="(item,index) in Imglist" :key="item.block_pic"class="mine_banner" mode="" @click="imgto(item)"></image></scroll-view>
<template v-if="catList.length!=0">
<view class="order_title">Recommend</view>
<scroll-view class="spike1" scroll-x="true" :show-scrollbar="false">
<scroll-view scroll-x="true"><image :src="item.block_pic" v-for="(item,index) in Imglist" :key="item.block_pic"class="mine_banner allpadding" mode="" @click="imgto(item)"></image></scroll-view>
<view v-if="catList.length!=0" style="background-color: #f4f3f8; padding: 0 23.33rpx;" >
<view class="order_title" style="padding-top: 20rpx;">Recommend</view>
<scroll-view class="spike1 margin_botoom" style="background-color: #f4f3f8;" scroll-x="true" :show-scrollbar="false">
<view class="spike1_item" v-for="(item,index) in catList" :key="index" @click="goDetails(item.id)">
<view class="spike1_item_img">
<image :src="item.thumb" mode=""></image>
@ -116,11 +116,16 @@
</view>
</view>
</scroll-view>
</template>
</view>
</view>
<view class="tarbar">
<view @click="change(index)" v-for="(item,index) in tarbar" :key="item.name" :class="index==2?'img_m':'tarbar_img'":style="{color:index==4?'#000':''}">
<image :src="item.src"></image>
<view>{{ item.name}}</view>
</view>
</view>
</view>
</template>
@ -150,6 +155,33 @@
indexDate:[],
userbg:'../../static/img/userbg.png',
isTop:false,
tarbar:[
{
src:'../../static/icon/home3.png',
name:'Home',
url:'../index/index'
},
{
src:'../../static/img/Category.png',
name:'Category',
url:'../category/index'
},
{
src:'../../static/img/min.png',
url:'../index/index2',
name:''
},
{
src:'../../static/img/Cart.png',
name:'Cart',
url:'../shippingCart/index'
},
{
src:'../../static/img/Account1.png',
name:'Account',
url:'../account/index'
},
],
}
},
onBackPress(options) {
@ -233,14 +265,39 @@
}
},
change(e){
this.index = e
let tarbar = this.tarbar
if(e!==2){
uni.switchTab({
url:this.tarbar[e].url
})
}else{
uni.navigateTo({
url:this.tarbar[e].url
})
}
},
getList(){
this.isLogin = uni.getStorageSync('isLogin')
let data={_action:'getuserbonus'}
defaultRequest(data).then(res=>{
console.info(res)
})
// tarbar
let data2={_action:'getpagedata',pagecode:'HOMESALEICON '}
defaultRequest(data2).then(res => {
console.log(res)
let url
if(res.error == 0){
if(res.data.page_code == 'HOMESALEICON'){
let src = 'https://www.dopeplus.com/images/mapp_customized/202210/1665653173499940520.png'
if(src==res.data.zones[0].blocks[0].block_pic){
this.tarbar[2].src = '../../static/img/min.png'
}else{
src=res.data.zones[0].blocks[0].block_pic
uni.setStorageSync('midButton',src)
}
}
}
});
defaultRequest({
_action:'getusersummarydata'
}).then(res =>{
@ -348,13 +405,14 @@
})
}
},
back(){
backTo(){
uni.navigateBack({
delta:1
})
},
onPageScroll(res) {
console.log(res.scrollTop)
// console.log(res.scrollTop)
if(res.scrollTop>40){
this.isTop=true
}else if(res.scrollTop<40){
@ -364,7 +422,9 @@
},
},
onLoad(e) {
uni.hideTabBar()
this.isLogin = uni.getStorageSync('isLogin')
// this.tarbar[2].src = uni.getStorageSync('midButton')
if(this.isLogin==0){
this.user_info =' '
}else{
@ -380,6 +440,8 @@
},
onShow() {
uni.hideTabBar()
// uni.showTabBar()
this.isLogin = uni.getStorageSync('isLogin')
uni.startPullDownRefresh()
},
@ -405,11 +467,17 @@
height: 50rpx !important;
margin-left: 22%;
}
.account_info{
background-color: #000000;
.padding_account{
padding: 0 50rpx;
padding-top: 97rpx;
padding-bottom: 40rpx;
}
.allpadding{
padding: 0 23.33rpx;
}
.account_info{
background-color: #000000 !important;
border-bottom: 13.33rpx #F7F7F7 solid;
display: flex;
// width: 100%;
@ -477,15 +545,16 @@
}
}
.order{
padding: 0 23.33rpx;
// padding: 0 23.33rpx;
padding-top: 37.33rpx;
padding-bottom: 43.33rpx;
border-bottom: 13.33rpx #F7F7F7 solid;
// background-color: #f6f5fa;
.order_title{
font-size: 26.67rpx;
font-weight: bold;
display: flex;
justify-content: space-between;
.icon_right{
height: 25rpx;
@ -501,6 +570,7 @@
width: 100%;
// padding: 0 35.33rpx;
display: flex;
background-color: #fff;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
@ -531,7 +601,7 @@
.spike1{
white-space: nowrap;
width: 100%;
margin-top: 46.67rpx;
margin-top: 26rpx;
::-webkit-scrollbar {
width: 0;
height: 0;
@ -540,7 +610,7 @@
.spike1_item{
color: #191919;
font-size: 24.67rpx;
font-size: 26.67rpx;
margin-right: 16.67rpx;
// width: 286.67rpx;
display: inline-block;
@ -554,6 +624,7 @@
// border-left: #efefef solid 1rpx;
border-top-left-radius: 10rpx !important;
border-top-right-radius: 10rpx !important;
// border-bottom: #fafafa 1rpx solid !important;
background-color: #999999;
image{
width: 100%;
@ -581,27 +652,29 @@
}
.spike1_item_bottom1{
height: 120rpx;
padding-left: 20.77rpx;
padding-top: 6.33rpx;
// width: 246.67rpx;
padding-left: 20rpx;
padding-right: 20rpx;
padding-top: 10.33rpx;
padding-bottom: 6.33rpx;
font-weight: bold;
text-align: left;
color: #000000;
border-bottom-left-radius: 10rpx;
border-bottom-right-radius: 10rpx;
background-color: #ececec;
background-color: #fff;
.spike1_item_text{
color: #000000;
font-size: 16rpx;
font-size: 24rpx;
font-weight: 400;
margin-bottom: 2.67rpx;
white-space: break-spaces;
overflow:hidden;
line-height: 40rpx;
height: 80rpx;
line-height: 32rpx;
height: 68rpx;
white-space: wrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
// -o-text-overflow:ellipsis;
}
}

125
pages/account/message.vue

@ -8,13 +8,17 @@
</view>
<view class="body">
<view class="msg_item" v-for="(item,index) in list.blocks" :key="item.block_title" @click="gotopage(item)">
<view class="msg_time">{{item.block_avaiable_from | Mes}}</view>
<view class="msg_title">{{item.block_title}}</view>
<!-- <text class="y_red" v-show="item.block_id"></text> -->
<!-- <view class="msg_content">{{item.}}</view> -->
<view class="msg_img" v-if="item.block_pic"><image :src="item.block_pic" class="imagesize"></image></view>
<view class="msg_title">{{item.block_title}}</view>
</view>
<view class="msg_item" v-for="(item,index) in app_Mes" :key ="item.id">
<view class="msg_item" v-for="(item,index) in app_Mes" :key ="item.id"@click="gotopage(item)">
<view class="msg_time">{{ item.add_time | Mes}}</view>
<text class="y_red" v-show="item.unread == 1"></text>
<view class="msg_title">{{ item.mtitle }}</view>
<view class="msg_content">
</view>
@ -39,6 +43,7 @@
data() {
return {
list:[],
//
myMes:{
_action:'getmessagelist',
type:1,
@ -46,8 +51,9 @@
label:'',
title:'',
page_index:1,
page_size:10
page_size:100
},
//
myMes1:{
_action:'getmessagelist',
type:0,
@ -55,9 +61,10 @@
label:'',
title:'',
page_index:1,
page_size:10
page_size:100
},
app_Mes:[]
app_Mes:[],
}
},
filters:{
@ -86,7 +93,7 @@
let data ={ _action:'getpagedata',pagecode:'006-PERSONALCENTERPAGE'
}
let a=0, b =0
defaultRequest(data).then(res =>{
let list = res.data.zones
@ -94,49 +101,75 @@
list.map(item =>{
if(item.zone_code =='XIAOXI'){
this.list = item
console.log(this.list)
}
})
console.log(this.list.blocks.length)
a = this.list.blocks.length
let str = this.list.blocks[0].block_avaiable_from
})
defaultRequest(this.myMes).then(res =>{
console.log(res)
let i = 0
if(res.error ==0){
this.app_Mes = res.data.message_list
b = this.app_Mes.length
console.log(this.app_Mes.length)
this.app_Mes.map( item =>{
// console.log(item)
if(item.unread == 1){
i++
}
})
console.log(i)
}
let sum = parseInt(a) + parseInt(b)
console.log(sum)
})
defaultRequest(this.myMes1).then(res =>{
console.log(res)
// console.log(res)
if(res.error == 0){
res.data.message_list.map( item =>
{
this.app_Mes.push(item)
})
this.app_Mes = res.data.message_list
console.log(this.app_Mes)
}
})
},
gotopage(item){
console.log(item.block_link)
const i = item.block_link.indexOf('?')
const src = item.block_link.substring(i)
if(item.block_link.includes('goodslist')){
uni.navigateTo({
url:'../category/productList'+src
})
}else{
uni.navigateTo({
url:'../productDetails/index'+src
})
let data ={
_action:'readmessage',
message_id:''
}
console.log(item)
if(item.id){
data.message_id = item.id
}
// else{
// data.message_id = item.block_id
// }
defaultRequest(data).then(res =>{
if(res.error == 0){
uni.showToast({
title:'Read',
icon:'none'
})
console.log(res)
this.getMes()
}
})
if(item.block_link){
if(item.block_link.includes('goodslist')){
const i = item.block_link.indexOf('?')
const src = item.block_link.substring(i)
uni.navigateTo({
url:'../category/productList'+src
})
}else{
uni.navigateTo({
url:'../productDetails/index'+src
})
}
}
},
back(){
uni.navigateBack()
@ -148,30 +181,47 @@
}
}
</script>
<style>
page{
height: 100vh;
background-color: #f6f5fa !important;
}
</style>
<style lang="scss" scoped>
.uni-navbar{
font-size: 32rpx;
font-weight: bold;
}
.y_red{
font-size: 19rpx;
color: #940000;;
}
.body{
// border-top: 13.33rpx #F7F7F7 solid;
padding: 50.67rpx 26.67rpx;
}
.msg_item{
padding-top: 42.67rpx;
padding-top: 17rpx;
padding-bottom: 28rpx;
padding-left: 10rpx;
padding-right: 10rpx;
background-color:#fff ;
// border-bottom: 1px solid #E2E2E2;
margin-bottom: 30rpx;
&:first-child{
margin-top: 122.67rpx;
}
.msg_time{
font-size: 25.33rpx;
font-weight: 400;
text-align: center;
margin-bottom: 41.33rpx;
// margin-top: 51.33rpx;
}
.msg_title{
font-size: 28rpx;
margin-bottom: 20rpx;
margin-top: 20rpx;
margin-left: 10rpx;
}
.msg_content{
color: #555555;
@ -180,8 +230,8 @@
}
.msg_img{
margin-top: 37.33rpx;
margin-top: 27.33rpx;
border-radius: 10rpx;
width: 100%;
height: 281.33rpx;
background-color: #ffdcd3 ;
@ -195,5 +245,6 @@
.imagesize{
width: 100%;
height: 100%;
border-radius: 10rpx;
}
</style>

18
pages/account/myOrders.vue

@ -491,10 +491,10 @@
<image src="../../static/img/close1.png" mode="" @click="isShow=false"></image>
</view>
<view class="order_popup_commodity" >
<view class="good_info" v-for="(item,index) in goods_list " :key="index" @click.stop="goGoodsDetails(item.goods_id)">
<view class="good_info padding_left " v-for="(item,index) in goods_list " :key="index" @click.stop="goGoodsDetails(item.goods_id)">
<view class="good_info_left ">
<view class="good_info_image" >
<image :src="item.goods_img" mode=""></image>
<view class="good_info_image img_border" >
<image :src="item.goods_img" mode="" class="img_border"></image>
</view>
<view class="left_info">
<view class="info_name">{{item.goods_name}}</view>
@ -733,7 +733,9 @@
.body{
padding-top: 100rpx;
}
.padding_left{
padding-left: 20rpx;
}
.order_nav{
padding:0 38.67rpx ;
border-bottom: 13.33rpx #F7F7F7 solid;
@ -798,9 +800,10 @@
.order_content{
padding-left: 32rpx;
padding-right: 26.67rpx;
// background-color: #B22234;
margin-top: -30rpx;
.good_info{
padding: 30.67rpx 0;
padding-top: 60rpx;
display: flex;
align-items: center;
justify-content: space-between;
@ -816,10 +819,13 @@
width: 133.33rpx;
height: 133.33rpx;
background-color: #999999;
margin-right: 8rpx;
border-radius: 10rpx !important;
image{
width: 100%;
height: 100%;
border-radius: 10rpx;
}
}
.left_info{

77
pages/account/myReview.vue

@ -1,24 +1,36 @@
<template>
<view class="body">
<!-- <view class="reviews_item" v-for="(item,index) in 2" :key="index">
<view class="reviews_item" v-for="(item,index) in List" :key="index">
<view class="reviews_item_title">
<view class="reviews_title_user">
<text>e***8</text>
<uni-rate size="18" :disabled="true" disabledColor="red" :value="4" active-color="red" :is-fill="false"/>
<text>{{ item.user_name}}</text>
<uni-rate size="18" :disabled="true" disabledColor="#8e1b2a" :value="4" active-color="#8e1b2a" :is-fill="false"/>
</view>
<view class="reviews_title_time">07/03/2022</view>
<view class="reviews_title_time">{{ item.add_time}}</view>
</view>
<view class="reviews_item_color">Color:Multicolor</view>
<view class="reviews_item_content">So unique! Cant wait to wear these.</view>
<!-- <view class="reviews_item_color">Color:Multicolor</view> -->
<view class="reviews_item_content">{{ item.content}}</view>
<view class="reviews_item_image">
<view class="reviews_image_content" v-for="(item,index) in 3" :key="index"></view>
<view class="reviews_image_content" v-for="(item1,index1) in item.attachments" :key="item1.afile">
<video :src="item1.afile" v-if="item1.afile.includes('mp4')"
:autoplay="false"
:muted="true"
:id="item1.afile"
:poster="item1.afile"
object-fit="contain"
@play="play(item1.afile)"
@fullscreenchange="fullscreenchange(item1.afile)"
@timeupdate="timeupdate"
class="comment_video"></video>
<image :src="item1.afile" mode="" @click="clickimg(item,index1)"></image>
</view>
</view>
<view class="more">
<image src="../../static/img/more.png" mode="" @click="isShwo=true"></image>
<view class="more_delete" v-show="isShwo">delete</view>
</view>
</view> -->
</view>
<view class="empty_item" v-if="!List">
<view class="empty_item_img">
<image src = "../../static/img/comment.png" mode=""></image>
@ -46,29 +58,68 @@
page_size:10,
},
list:[]
List:[],
is_play:true,
videoContext:''
}
},
methods:{
getList(){
let query ={
_action:'getmycomment',
_action:'getmycomments',
page_index:1,
page_size:20,
page_size:100,
}
console.log(query)
defaultRequest(query).then(res =>{
console.log(res)
if(res.error ==0){
this.List = res.data
}
})
}
},
clickimg(item,index){
console.log(item)
let list = []
item.attachments.map(i =>{
if(!i.afile.includes('mp4')){
list.push(i.afile)
}else{
console.log(11)
}
})
wx.previewImage({
urls:list, //http
current: index,
indicator:'number',
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
timeupdate(e){
// console.log(e)
},
play(e) {
console.log(e)
console.log(e)
this.videoContext = uni.createVideoContext(e, this)
this.videoContext.requestFullScreen()
},
//退
fullscreenchange(e) {
console.log(e)
},
},
onLoad(e) {
this.query.goods_id=e.goods_id
this.getList()
},
// onShow() {
// this.getList()
// }

4
pages/account/pointsDetails.vue

@ -2,14 +2,14 @@
<view>
<view>
<uni-nav-bar left-icon="left" right-icon="info"title="Points Details"
color="#fff" backgroundColor="#000000" @clickRight="goto()" @clickLeft="back"
color="#fff" backgroundColor="#000000" @clickRight="goto()" @clickLeft="back" :fixed="true"
:border="false" :statusBar="true" />
</view>
<view class="points">
<view class="points_item" v-for="(item,index) in list" :key="item.log_id">
<view class="points_item_title">
<text>{{ item.change_desc }}</text>
<text class="item_title_price">+US${{ item.user_money }}</text>
<text class="item_title_price">{{ item.user_money }}</text>
</view>
<text>{{ item.change_time }}</text>
</view>

2
pages/account/settings.vue

@ -55,7 +55,7 @@
defaultRequest2(data).then(res=>{
console.info(res)
if(res.error==0){
uni.clearStorageSync()
// uni.clearStorageSync()
uni.setStorageSync('isLogin',0)
uni.setStorageSync('user_info',' ')
// uni.reLaunch({

623
pages/account/wishlist.vue

@ -1,11 +1,12 @@
<template>
<view class="wishlist_body">
<view class="status_bar"></view>
<view class="wishlist_body margin-top-40">
<view class="status_bar">
<uni-nav-bar left-icon="left" :rightText="isDelete?'Done':'Delete'" :fixed="true" :border="false"
title="Wishlist" color="#fff" backgroundColor="#000000" @clickLeft="back" @clickRight="clickRight()"/>
<view class="wishlist">
</view>
<view class="wishlist padding-top-40">
<view class="wishlist_item" v-for="(item,index) in goodsList" :key="item.goods_id" >
<view class="wishlist_item_img"@click="isDelete?selectGoods(item.goods_id,index): goDetails(item.goods_id)">
<view class="wishlist_item_img "@click="isDelete?selectGoods(item.goods_id,index): goDetails(item.goods_id)">
<image :src="item.goods_img" mode="" class="wishlist_item_img_goods"></image>
<image src="../../static/img/select1.png" @click="deleteTap(item)" mode=" " class="select" v-if="isDelete && item.goods_id==deletelist[index].id || isAll"></image>
<image src="../../static/img/select.png" mode="" class="select" v-else-if=" isDelete &&item.goods_id!=deletelist[index].id"></image>
@ -13,7 +14,8 @@
</view>
<view class="wishlist_item_bottom">
<text>US${{item.promote_price?item.promote_price:item.shop_price}}</text>
<image src="../../static/img/delete2.png" mode="" class="wishlist_item_bottom_icon" @click="removeL(item)"></image>
<image src="../../static/icon/cat_white.png" mode="" class="wishlist_item_bottom_icon" @click="isCart=true,getDate(item)"></image>
<!-- <image src="../../static/img/delete.png" mode="" class="wishlist_item_bottom_icon" @click="removeL(item)"> --></image>
</view>
</view>
</view>
@ -33,13 +35,67 @@
<text>All</text>
</view>
<view class="wishlist_foot_right">
<button :disabled=" !goods_id" @click="$refs.alertDialog.open()" :class="(goods_id)?'wishlist_foot_right_button':''">DELETE</button>
<button :disabled=" !goods_id" @click="$refs.alertDialog.open()" :class="(goods_id)?'wishlist_foot_right_button':''">DELETE</button>
</view>
</view>
<uni-popup ref="alertDialog" type="dialog">
<uni-popup-dialog type="error" cancelText="Close" confirmText="Sure" title="Tips" content="Cancel the collection of this product?"
@confirm="removeLike()" ></uni-popup-dialog>
</uni-popup>
<view class="addCard" v-show="isCart">
<image src="/static/img/close1.png" mode="" class="addCard_close" @click="isCart=false"></image>
<scroll-view class="spike1 " scroll-x="true" :show-scrollbar="false">
<image :src="item.img_url" mode="" class="addCard_scroll img_border" v-for="(item,index) in goodsDate.gallery_list" :key="index" @click="clickImg(index)"></image>
</scroll-view>
<scroll-view class="addCard_body"scroll-y="true">
<view >{{goodsDate.goods_name}} </view>
<view class="addCard_price">US${{goodsDate.is_promote==0? shop_price :goodsDate.promote_price}}</view>
<view v-for="(item,index) in goods_attr_list" :key="item.attr_id">
<view >{{item.name}}</view>
<view class="color_select variations_select_size">
<!-- <view class="select_size_item"
v-for="(item1,index1) in item.goods_attrs"
:key="item1.goods_attr_id"
:class="goods_attr_list[index].goods_attr_id==item1.goods_attr_id?'active_color':''"
@click="selectAttr(item.attr_id,item1.goods_attr_id,index)">
{{item1.attr_value}}
</view> -->
<view class="color_select_item" v-for="(item1,index1) in item.list" :key="item1.attr_value"
:class="goods_attr_list[index].goods_attr_id==item1.goods_attr_id?'active_color':''" @click="selectAttr(item.attr_id,item1.goods_attr_id,index1,item1.attr_price)">
<view class="color_select_item_zoom">
<image src="/static/icon/big2.png" @click="clickImg(index1)" mode=""v-if="item1.attr_img!=''"></image>
</view>
<image :src="item1.attr_img" mode="" v-if="item1.attr_img!=''" ></image>
<view class="color_select_item_bottom" v-if="item1.attr_img!=''">{{ item1.attr_value}}</view>
<view class="color_select_item_bottom" v-if="!item1.attr_img">{{ item1.attr_value}}</view>
</view>
</view>
</view>
<!-- <view >Size</view>
<view class="variations_select_size">
<view class="select_size_item">34</view>
<view class="select_size_item">35</view>
<view class="select_size_item">36</view>
<view class="select_size_item">37</view>
<view class="select_size_item">38</view>
<view class="select_size_item">M</view>
<view class="select_size_item">L</view>
</view> -->
<view class="quantity">
<text>Quantity</text>
<uni-number-box background="#FFFFFF" v-model="cartQuery.goods_number" :min="1"></uni-number-box>
</view>
</scroll-view>
<!-- <view class="quantity">
<text>Quantity</text>
<uni-number-box background="#FFFFFF" v-model="cartQuery.goods_number" :min="1"></uni-number-box>
</view> -->
<button @click="addCart">ADD TO CART</button>
</view>
<view class="bootom_last" v-if="bootom == 1">-THE END-</view>
</view>
</template>
@ -52,12 +108,53 @@
goodsList:[],
goods_id:'',
isAll:false,
isCart:false,
Src:'../../static/img/select.png',
deletelist:[],
Select_one:0
Select_one:0,
goodsDate:{
comment_summary:[
{comment_summary:'',commentlabel: ""}
],
gallery_list:[
{content:''}
],
},
commonlist:[],
//
goods_attr_list:[],
//
catQuery:{
_action:'getgoods',
cat:'',
page_index:1,
page_size:10
},
shop_price:0,
Is_attr:0,//
//
cartQuery:{
_action:'addtocart',
goods_id:'',
goods_parent_id:0,
goods_number:1,
goods_attr_id:'',
goods_is_package:0
},
query:{
_action:'getgoodsdetail',
goods_id:''
},
info: [],
bootom:0,
}
},
methods:{
onReachBottom(e){
console.log(111)
this.bootom = 1
},
selectGoods(id,index){
if(id==this.goods_id){
this.goods_id=''
@ -138,6 +235,11 @@
this.goods_id = item.goods_id
},
goPage(){
uni.switchTab({
url:'../index/index'
})
},
isAllTap(){
this.isAll = !this.isAll
if(this.isAll == false){
@ -259,7 +361,233 @@
this.isDelete=!this.isDelete
}
}
},
//
getDate(item){
this.isCart = true
console.log(item)
this.goodsDate = []
this.goods_attr_list = []
this.cartQuery.goods_id = item.goods_id
this.query.goods_id= item.goods_id
defaultRequest2(this.query).then(res=>{
if(res.error==0){
console.log(res.data)
this.goodsDate=res.data
console.log(this.goodsDate.attr_list)
//
// if(this.goodsDate.comment_list)
// {
// if(this.goodsDate.comment_list.length<2){
// this.commonlist.push(this.goodsDate.comment_list[0])
// }else if(this.goodsDate.comment_list.length == 0){
// this.commonlist = []
// }
// else{
// for(let i =0;i<2;i++){
// this.commonlist.push(this.goodsDate.comment_list[i])
// }
// }
// }
// console.log(this.commonlist)
this.shop_price = this.goodsDate.shop_price
this.goodsDate.gallery_list.map(item=>{
item.content=''
this.info.push(item.img_url)
// this.Attr_list = this.goodsDate.attr_list[0].goods_attrs
})
this.Is_attr = this.goodsDate.attr_list.length
if(this.Is_attr>0){
console.log(this.goodsDate.attr_list)
console.log(this.Is_attr)
let Size_list
let Attr_list
this.goodsDate.attr_list.map(item=>{
console.log(item)
// if(item.attr_name){
// this.sizenum=item.goods_attrs.length
// }
// if(item.attr_name=="Color"){
// this.colorNum=item.goods_attrs.length
// console.log(this.colorNum)
// Attr_list = item.goods_attrs
// let i = 0
// Attr_list.map( item =>{
// this.Attr_list +=item.attr_value + ''
// i++
// })
// this.Attr_list= this.Attr_list.substring(0, this.Attr_list.length-1)
// console.log(i)
// this.max = i
// }
// else if(item.attr_name=="Size"){
// Size_list = item.goods_attrs
// console.log(this.sizenum)
// Size_list.map( item =>{
// this.Size_list +=item.attr_value + ' '
// })
// this.Size_list= this.Size_list.substring(0, this.Size_list.length-1)
// }
let data={name:item.attr_name,goods_attr_id:'',attr_id:item.attr_id,list:item.goods_attrs}
this.goods_attr_list.push(data)
console.log(this.goods_attr_list)
let list = []
this.goods_attr_list.map( item =>{
item.list.map(item1 =>{
if(!item1.attr_img){
this.tag = 1
}
})
})
})
}else{
this.goods_attr_list=[]
this.Is_attr = 0
}
// this.catQuery.cat=res.data.cat_id
}
})
},
//
selectAttr(attr_id,goods_attr_id,index1,attr_price){
this.current = index1
let sum = this.goodsDate.shop_price
if(attr_price){
sum = parseInt(sum) + parseInt(attr_price)
console.log(sum)
}
this.shop_price = sum
let data={attr_id:attr_id,goods_attr_id:goods_attr_id}
if(this.goods_attr_list.length==0){
this.goods_attr_list.push(data)
}else{
//
let isNew=false
for(let i in this.goods_attr_list){
let item=this.goods_attr_list[i]
if(item.attr_id==attr_id){
if(item.goods_attr_id==goods_attr_id){
this.goods_attr_list[i].goods_attr_id=''
}else{
this.goods_attr_list[i].goods_attr_id=goods_attr_id
}
isNew=false
break
}else{
isNew=true
}
}
if(isNew){
this.goods_attr_list.splice(index,0,data)
}
}
},
//
addCart(){
if(this.Is_attr>0){
let goods_attr_id=''
this.goods_attr_list.map(item=>{
if(item.goods_attr_id!=''){
goods_attr_id+=item.goods_attr_id+','
}
})
let isall = 1
this.goods_attr_list.map(item =>{
//console.log(item.goods_attr_id)
if(item.goods_attr_id==''){
isall = 0
}
})
if(isall == 0){
uni.showToast({
title:'Please select the product specification',
icon:'none'
})
return
}
this.cartQuery.goods_attr_id=goods_attr_id.substring(0,goods_attr_id.lastIndexOf(','));
}
console.log(this.cartQuery)
defaultRequest2(this.cartQuery).then(res=>{
console.log(res)
if(res.error==0){
this.isCart = false
this.cartQuery.goods_attr_id = ''
if(res.data[0].success){
setTimeout( ()=>{
uni.showToast({
title:'Successfully added',
icon:'none'
})
},500)
}
this.getCartNum()
}
})
},
//
clickImg(index,e) {
// console.log(e.length)
let list = []
if(e){
if(typeof(e) ==='object')
{
for(let i in e ){
console.log(e[i].afile)
list.push(e[i].afile)
console.log(list)
}}
else{
e.map( item =>
{
list.push(item.attr_img)
})
}
wx.previewImage({
urls: list, //httpurl
current: index, // http
indicator:'number',
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
}
else{
wx.previewImage({
urls: this.info, //httpurl
current: index, // http
indicator:'number',
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
}
},
},
onLoad() {
this.getList()
@ -290,12 +618,26 @@
}
</style>
<style lang="scss" scoped>
.padding-top-40{
padding-top: 40rpx;
}
.margin-top-40{
margin-top: 40rpx;
}
.status_bar {
// height: var(--status-bar-height);
width: 100%;
height: 50rpx;
background-color: #000000;
height: 90rpx;
position: fixed;
top:0;
padding-top: 66rpx;
background-color: #000;
z-index: 999;
}
.img_radis{
border-radius: 10rpx !important;
}
.uni-navbar{
font-size: 32rpx;
@ -336,4 +678,263 @@
border-radius: 20rpx !important;
}
}
.addCard{
z-index: 999;
position: fixed;
bottom: 0;
left: 0;
background-color: white;
padding-left: 29.33rpx;
padding-right: 29.33rpx;
box-sizing: border-box;
padding-top: 77.67rpx;
color:#000;
width: 100%;
// font-size: 30.67rpx;
font-weight: 400;
padding-bottom: 44.67rpx;
.addCard_close{
width: 21.33rpx;
height: 21.33rpx;
position: absolute;
right: 24.67rpx;
top: 18.67rpx;
}
.spike1{
margin-top: 0;
margin-bottom: 20rpx;
padding-bottom: 0;
border-bottom: none;
.addCard_scroll{
width: 286.67rpx;
height: 286.67rpx;
margin-left: 10.67rpx;
&:first-child{
margin-left: 0;
}
&:last-child{
margin-right: 15rpx;
}
}
}
.addCard_body{
padding-right: 31.33rpx;
max-height: 60vh;
min-height: 400rpx;
.addCard_price{
font-size: 44rpx;
font-weight: bold;
margin-top: 17.33rpx;
margin-bottom: 51.33rpx;
}
.color_select{
display: flex;
color: #666666;
flex-wrap: wrap;
margin-bottom: 59.33rpx;
.color_select_item{
margin-top: 22rpx;
position: relative;
background-color: #F9F7FA;
border-radius: 6.67rpx;
margin-right: 12.67rpx;
width: 134.67rpx;
image{
width: 134.67rpx;
height: 133.33rpx;
border-radius: 6.67rpx 6.67rpx 0 0;
}
.color_select_item_zoom{
width: 20.33rpx;
height: 20.33rpx;
// background-color: rgba(0, 0, 0, 0.3);
display: flex;
align-items: center;
justify-content: center;
position: absolute;
right: 12.67rpx;
top: 9.33rpx;
z-index: 99;
image{
width: 100%;
height: 100%;
}
}
.color_select_item_bottom{
padding: 10rpx 0rpx;
font-size: 24rpx;
text-align: center;
}
}
.active_color{
color: #fff;;
background-color: #000;
border: 1px solid #000000;
}
}
.variations_select_size{
margin-left: 0;
margin-top: 26.67rpx;
margin-bottom: 40.67rpx;
.select_size_item{
background-size: cover;
margin-bottom: 16.67rpx !important;
&:nth-child(4n+4){
margin-right: 0;
}
}
}
}
}
.quantity{
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 43.33rpx;
.uni-numbox{
border: 1px solid #999999;
border-radius: 14rpx;
height: 42.67rpx;
/deep/ .uni-numbox__minus{
border-radius: 14rpx;
}
/deep/.uni-numbox__plus{
border-radius: 14rpx;
}
/deep/.uni-numbox__value{
border-left: 1px solid #999999;
border-right: 1px solid #999999;
height: 100%;
width: 63.33rpx;
font-size: 21.33rpx;
}
}
}
button{
width: 100%;
height: 73.33rpx;
line-height: 73.33rpx;
background-color: #191919;
color: white;
font-weight: bold;
font-size: 26.67rpx;
}
.spike1{
white-space: nowrap;
width: 100%;
margin-top: 36.67rpx;
padding-bottom: 34rpx;
// border-bottom: 1px solid #E2E2E2;
::-webkit-scrollbar {
width: 0;
height: 0;
// background-color: transparent;
}
.spike1_item{
width: 480rpx;
background-color: #1b1b1b;
padding: 27.33rpx 37.67rpx;
margin-right: 19.33rpx;
font-size: 20rpx;
border-radius: 10rpx;
// border:1rpx solid #ccc;
display: inline-block;
// color: #737373;
color: #fff;
&:last-child{
margin-right: 0;
}
view{
margin-bottom: 10rpx;
}
.text_bold_200{
font-size: 24rpx;
font-weight: 50;
}
.spike1_item_title{
// font-weight: bold;
font-size: 28rpx;
.text_black{
color: black;
display: inline-block;
margin-left: 10rpx;
}
.text_red{
color: #B22234;
display: inline-block;
margin-left: 10rpx;
}
}
}
.spike1_item1{
// color: #191919;
color: #fff;
font-size: 29.33rpx;
margin-right: 16.67rpx;
width: 200rpx;
display: inline-block;
font-weight: bold;
.spike1_item_img{
width: 200rpx;
height: 200rpx;
background-color: #999999;
}
.spike1_item_bottom{
padding-left: 9.33rpx;
margin-top: 22.67rpx;
.spike1_item_text{
// color: #9D9D9D;
color: #fff;
font-size: 21.33rpx;
text-decoration: line-through;
}
.spike1_item_text1{
// color: #9D9D9D;
color: #fff;
font-size: 21.33rpx;
}
}
.spike1_item_bottom1{
padding-left: 9.33rpx;
margin-top: 19.33rpx;
font-weight: bold;
.spike1_item_text{
// color: #000000;
color: #fff;
font-size: 16rpx;
font-weight: 400;
margin-bottom: 20.67rpx;
white-space: break-spaces;
}
}
}
.spike1_item:last-child{
margin-right: 0;
}
}
.bootom_last{
height: 200rpx;
width: 100%;
color: #fff;
background-color: #000;
font-size: 25rpx;
padding-bottom:40rpx;
line-height: 200rpx;
text-align: center;
}
</style>

81
pages/category/index.vue

@ -50,6 +50,12 @@
</view>
</scroll-view>
</view>
<view class="tarbar">
<view @click="change(index)" v-for="(item,index) in tarbar" :key="item.name" :class="index==2?'img_m':'tarbar_img'":style="{color:index==1?'#000':''}">
<image :src="item.src"></image>
<view>{{ item.name}}</view>
</view>
</view>
</view>
</template>
<script>
@ -71,19 +77,56 @@
categoryList:[],
sum:0,
backButtonPress:0,
homeIndex: 0
homeIndex: 0,
tarbar:[
{
src:'../../static/icon/home3.png',
name:'Home',
url:'../index/index'
},
{
src:'../../static/img/Category1.png',
name:'Category',
url:'../category/index'
},
{
src:'../../static/img/min.png',
name:'',
url:'../index/index2'
},
{
src:'../../static/img/Cart.png',
name:'Cart',
url:'../shippingCart/index'
},
{
src:'../../static/img/Account.png',
name:'Account',
url:'../account/index'
},
],
list2:[
{src:'../../static/icon/home4.png'},
{src:'../../static/img/Category1.png'},
{src:''},
{src:'../../static/img/cart1.png'},
{src:'../../static/img/Account1.png'}
],
}
},
onShow() {
// this.tarbar[2].src = uni.getStorageSync('midButton')
this.sum =0
this.getList()
this.getCartNum()
uni.hideTabBar()
uni.showTabBar()
},
onLoad() {
this.getList()
this.getCartNum()
uni.hideTabBar()
},
onReady() {
this.getMenuItemTop()
@ -102,7 +145,20 @@
},
methods: {
change(e){
this.index = e
let tarbar = this.tarbar
uni.hideTabBar()
if(e!==2){
uni.switchTab({
url:this.tarbar[e].url
})
}else{
uni.navigateTo({
url:this.tarbar[e].url
})
}
},
//
async swichMenu(index) {
@ -147,6 +203,25 @@
this.categoryIndex=res.data[0].cat_id
}
})
// tarbar
let data2={_action:'getpagedata',pagecode:'HOMESALEICON '}
defaultRequest(data2).then(res => {
console.log(res)
let url
if(res.error == 0){
if(res.data.page_code == 'HOMESALEICON'){
let src = 'https://www.dopeplus.com/images/mapp_customized/202210/1665653173499940520.png'
if(src==res.data.zones[0].blocks[0].block_pic){
this.tarbar[2].src = '../../static/img/min.png'
}else{
src=res.data.zones[0].blocks[0].block_pic
uni.setStorageSync('midButton',src)
}
}
}
});
},
//
getElRect(elClass, dataVal) {

48
pages/category/productList.vue

@ -4,7 +4,8 @@
<block slot="left">
<view class="nav_left">
<image src="../../static/img/left_white.png" mode="" @click="back"></image>
<image src="../../static/img/seach.png" mode="" @click="goPage()"></image>
<!-- <image src="../../static/img/left_white.png" mode="" @click="back"></image> -->
<!-- <image src="../../static/img/seach.png" mode="" @click="goPage()"></image> -->
</view>
</block>
@ -23,8 +24,8 @@
<view class="pets_nav_item" @click="selectNav(1)">
<text :class="query.order_type==3 ?'active_text' :query.order_type==4 ?'active_text':''">Sales</text>
<view class="pets_nav_item_right">
<image src="../../static/img/top_white.png" mode="" class="pets_nav_arrow"></image>
<image src="/static/img/bottom1_white.png" mode="" class="pets_nav_arrow"></image>
<image src="../../static/img/top_white.png" mode="" class="pets_nav_arrow" @click="getList(3,4)"></image>
<image src="/static/img/bottom1_white.png" mode="" class="pets_nav_arrow"@click="getList(3,3)"></image>
</view>
</view>
<view class="pets_nav_item" @click="selectNav(2)">
@ -40,8 +41,8 @@
<image src="/static/img/ptes_nav1_white.png" mode="" v-show="pets_index==1" @click="pets_index=0"></image>
</view>
</view>
<view class="body">
<view class="product" v-show="pets_index==1">
<view class="body" >
<view class="product" v-show="pets_index==0">
<view class="product_item" v-for="(item,index) in list" :key="index" @click="goDetails(item,1)">
<image class="product_item_image" :src="item.goods_img"></image>
<view class="product_item_right">
@ -61,7 +62,7 @@
</view>
</view>
<view class="product1" v-show="pets_index==0">
<view class="product1" v-show="pets_index==1">
<custom-waterfalls-flow ref="waterfallsFlowRef" :value="list" imageKey="goods_img" @wapperClick="goDetails" @imageClick="goDetails">
<template v-slot:default="item" >
<view class="product1_item">
@ -136,7 +137,8 @@
order_type:0,
page_index:1,
page_size:20,
brand:''
brand:'',
type:''
},
cartBtn:false,
list:[],
@ -436,8 +438,10 @@
}
this.getList(0)
},
getList(type){
getList(type,e){
if(type==3){
this.query.order_type = e
}
console.log(this.query)
defaultRequest(this.query).then(res=>{
console.info(res)
@ -482,6 +486,10 @@
// this.isReachBottom = false
this.tag =e.tag
}
if(e.type){
this.query.type = e.type
}
this.isLogin = uni.getStorageSync('isLogin')
const a = parseInt(e.typethree)
this.Pet = e.title
@ -508,7 +516,7 @@
},
//
onReachBottom(){
console.log(111)
if(!this.isReachBottom)return
// if(this.tag == 0){
@ -518,12 +526,15 @@
},
onPullDownRefresh(){
uni.stopPullDownRefresh()
}
}
</script>
<style>
page{
height: 100vh;
}
</style>
<style lang="scss" scoped>
.uni-navbar{
font-size: 32rpx;
@ -570,7 +581,7 @@
top: 0;
margin-top: 135rpx;
/* #ifdef H5 */
margin-top: 25rpx;
margin-top: 95rpx;
/* #endif */
width: 100%;
box-sizing: border-box;
@ -620,6 +631,12 @@
padding: 0 26.67rpx;
padding-top: 60rpx;
background-color: #000000;
// height:90%;
// overflow:scroll;
// overflow-y:scroll;
// padding-bottom: 10px;
// margin-bottom: 10px !important;
}
.product1{
@ -669,7 +686,7 @@
image{
width: 40.67rpx;
height: 40.67rpx;
background-color: #000;
// background-color: #000;
}
}
@ -781,6 +798,7 @@
.addCard_scroll{
width: 286.67rpx;
height: 286.67rpx;
border-radius: 10rpx;
margin-left: 10.67rpx;
&:first-child{
margin-left: 0;

54
pages/index/address.vue

@ -3,18 +3,21 @@
<view class="body">
<view class="font">
<uni-icons type="arrow-left" size="30" @click="back"></uni-icons>
<text style="margin-left: 30rpx;color: #0b0b0b;">Ship to</text>
<text style="margin-left: 30%;color: #0b0b0b;">Ship to</text>
</view>
<text class="color_b">Popular Countries/Regions</text>
<!-- <view class="text_pop">Popular Countries/Regions</view>
<view class="address" v-for="(item2,index2) in popularlist" :key="item2.name" >
<text>{{ item2.name}}</text>
<radio class="Radio"v-model="item2.name" :checked="current==item2.name"@click="Active(item2,index2)"></radio>
</view>
<view v-for ="(item,index) in list " :key="index">
<text class="color_red">{{ item.title}}</text>
<view class="address" v-for="(item1,index1) in item.sur_name" :key="item1.name" >
<text>{{ item1.name}}</text>
<radio class="Radio"v-model="item1.name" :checked="current==item1.name"@click="Active(item1,index1)"></radio>
</view> -->
<view class="address1"></view>
<view style="padding-top: 40rpx;">
<view v-for ="(item,index) in list " :key="index" >
<text class="color_red">{{ item.title}}</text>
<view class="address" v-for="(item1,index1) in item.sur_name" :key="item1.name" >
<text>{{ item1.name}}</text>
<radio class="Radio"v-model="item1.name" :checked="current==item1.name"@click="Active(item1,index1)"></radio>
</view>
</view>
</view>
</view>
@ -62,8 +65,14 @@ async onLoad() {
}
defaultRequest(data).then( res => {
console.log(res,'p')
uni.showLoading({
title:''
})
if(res.error==0){
this.citys = res.data
setTimeout(() =>{
uni.hideLoading()
},2000)
}
let citys =[]
for(let i of this.citys){
@ -126,23 +135,39 @@ async onLoad() {
</script>
<style>
page{
height: 100vh;
background-color: #fff;
}
.body{
margin: 80rpx 0 5rpx 5rpx;
margin: 0 10rpx 10rpx 10rpx;
background-color: #fff;
padding: 0 10rpx;
}
.font{
display: flex;
height: 50rpx;
line-height: 50rpx;
position: fixed;
background-color: #fff;
height: 100rpx;
width: 100%;
z-index: 999;
padding-top: 50rpx;
text-align: center;
margin: 30rpx 0;
top:0;
font-size: 20px;
font-weight: bold;
}
.address1{
height: 50rpx;
margin-top: 20rpx;
align-items: center;
background-color: #fff;
margin-bottom: 50rpx;
}
.address{
margin-top: 6rpx;
height: 20rpx;
align-items: center;
background-color: #fff;
@ -150,7 +175,10 @@ async onLoad() {
.color_red{
color: #ff5f15;
}
.color_b{
.text_pop{
padding-top: 140rpx;
height:50rpx;
/* background-color: #ff5f15; */
color: #6b6b6b;
}
</style>

10
pages/index/flashSale.vue

@ -191,12 +191,19 @@
uni.navigateBack()
},
Cart(e){
this.isCart = true
uni.showLoading({
title:'loading'
})
this.goodsDate =[]
this.gallery_list = []
this.goods_attr_list =[]
this.query.goods_id = e.id
this.cartQuery.goods_id = e.id
defaultRequest(this.query).then(res=>{
if(res.error==0){
uni.hideLoading()
this.isCart = true
console.log(res)
this.goodsDate=res.data
this.shop_price = this.goodsDate.shop_price
@ -475,6 +482,7 @@
.addCard_scroll{
width: 286.67rpx;
height: 286.67rpx;
border-radius: 10rpx;
margin-left: 10.67rpx;
&:first-child{
margin-left: 0;

683
pages/index/index.vue

File diff suppressed because it is too large

2
pages/index/index2.vue

@ -7,7 +7,7 @@
<block slot="left">
<view class="nav_left">
<image src="../../static/img/left_white.png" mode="" @click="back()"></image>
<image src="../../static/img/seach.png" mode="" @click="goPage()"></image>
<!-- <image src="../../static/img/seach.png" mode="" @click="goPage()"></image> -->
</view>
</block>

2
pages/index/pickUpCentre.vue

@ -51,7 +51,7 @@
if(res.error==0){
uni.showToast({
icon:'none',
title:res.message
title:'ok!'
})
}
this.getList()

4
pages/login/changePwd.vue

@ -28,6 +28,10 @@
submit(){
defaultRequest(this.query).then(res=>{
console.info(res)
uni.showToast({
title:res.message,
icon:'none'
})
if(res.error==0){
uni.showToast({
title:res.message,

49
pages/login/index.vue

@ -18,7 +18,7 @@
<image :src="eye" mode ="" class="see login_see" @click="seePwd"></image>
</view>
<view class="tips" v-show="loginErr"><image src="../../static/img/att.png" mode=""></image>{{errMsg}}</view>
<view class="tips" v-show="loginErr"><image src="../../static/img/att.png" mode=""></image>ooo{{errMsg}}</view>
<view class="forgot" @click="forgotPwd">Forgot your Password?</view>
<button class="login_submit" :disabled="isLogin" @click="login()" >SIGN IN</button>
<!-- <view class="agreement">
@ -176,13 +176,32 @@
// this.loginErr=true
// return
// }
uni.showLoading({
title:'Logining',
})
console.log(this.loginDate)
defaultRequest1(this.loginDate).then(res=>{
console.info(res)
if(res.error==0){
this.loginErr=false
res.data.isLogin=true
setTimeout( () =>{
uni.hideLoading()
uni.showToast({
title:'Login successful',
icon:'none'
})
},1000)
let list ={
email:res.data.email,
cartlist:[]
}
let list2 = []
list2.push(list)
uni.setStorageSync('cartlist',list2)
uni.setStorageSync('isLogin',1)
uni.setStorageSync('user_info',res.data)
uni.switchTab({
@ -223,14 +242,25 @@
return
}
this.regDate.password2=this.regDate.password1
uni.showLoading({
title:'Register now~',
})
defaultRequest1(this.regDate).then(res=>{
console.info(res)
if(res.error==0){
uni.hideLoading()
this.regErr=false
uni.showToast({
title:'Successful registration, please verify your email address!',
icon:'success',
})
this.loginDate.password = this.regDate.password1
this.loginDate.username = this.regDate.username
this.login()
setTimeout( ()=>{
// Successful registration, please verify your email address!
uni.showToast({
title:'logining in~',
icon:'none'
})
},1000)
}else{
this.regErr=true
this.errMsg=res.message
@ -282,7 +312,12 @@
}
}
</script>
<style>
page{
height: 100vh;
background-color: black;
}
</style>
<style lang="scss" scoped>
.one1{
display: flex;

28
pages/login/verifyEmail.vue

@ -6,13 +6,13 @@
</view>
<input type="text" class="login_input" placeholder="Enter code" v-model="resetcode" @input="verificationLogin">
<view class="tips" v-show="isErr">The code is incorrect.</view>
<button class="login_submit" :disabled="isLogin" @click="goPage">CONTINUE</button>
<view class="verify_text" @click="sendresetcode">Resend code</view>
<button class="login_submit" @click="goPage">CONTINUE</button>
<view class="verify_text" @click="sendresetcode,isShow = true">Resend code</view>
</view>
<view class="mask" v-show="isShow" @click="isShow=false"></view>
<view class="verify_popup" v-show="isShow">
<view class="verify_popup_close">
<image src="../../static/img/close.png" mode=""></image>
<image src="../../static/img/close.png" mode="" @click="isShow=false"></image>
</view>
<view class="verify_popup_title">Send!</view>
<view class="verify_popup_msg">we send a new verification code to {{query.username}}</view>
@ -28,7 +28,7 @@
export default {
data() {
return {
isShow:true,
isShow:false,
isErr:false,
isLogin:true,
username:'',
@ -44,21 +44,31 @@
methods:{
goPage(){
console.info(this.username)
uni.navigateTo({
url:'changePwd?resetcode='+this.resetcode+'&username='+this.username
})
if(!this.resetcode){
uni.showToast({
icon:'none',
title:'Please fill in the verification code'
})
}
else{
uni.navigateTo({
url:'changePwd?resetcode='+this.resetcode+'&username='+this.username
})
}
},
sendresetcode(){
console.log(this.query)
defaultRequest(this.query).then(res=>{
console.log(res)
if(res.error==0){
uni.showToast({
title:res.message,
icon:'none'
})
}
})
},
//

204
pages/order/confirmation.vue

@ -27,8 +27,8 @@
<image src="../../static/img/right.png" class="address_more"></image>
</view>
</view>
<view class="info_image">
<image class="info_image_item" :src="item.goods_thumb" v-for="(item,index) in goods_list" :key="index"/>
<view class="info_image img_border">
<image class="info_image_item img_border" :src="item.goods_thumb" v-for="(item,index) in goods_list" :key="index"/>
</view>
</view>
@ -58,7 +58,8 @@
<view class="discount_item" @click="openMore(1)">
<text>Coupons</text>
<view class="discount_item_right">
<text v-show="bonus>0">-US${{bonus}}</text>
<text v-if="bonus>0 ||bonus!=0">-US${{bonus}}</text>
<text v-if="isusebonus == 0">No available</text>
<image src="../../static/img/right.png" mode="" class="address_more"></image>
</view>
</view>
@ -90,7 +91,7 @@
</view>
<view class="total">
<text>Total: US${{total.amount}}</text>
<text >Total: US${{total.amount}}</text>
<button @click="place()">PLACE ORDER</button>
</view>
@ -180,12 +181,15 @@
</view>
<view class="mask" @click="isCoupons=false,isPoints= false,popup_index=-1" v-show="(isCoupons && list)||isPoints ||popup_index==0"></view>
<view class="coupons" v-show="isCoupons">
<view class="order_popup_title">
<view class="order_popup_title" >
<text>Coupons</text>
<image src="../../static/img/close1.png" mode="" @click="isCoupons=false"></image>
</view>
</view>
<!-- <scroll-view scroll-y="true" style="min-height:400rpx;max-height:600rpx" > -->
<view class="coupons_item" v-for="(item,index) in list " :key="item.bonus_id">
<view class="margin_top">
<view class="coupons_item " v-for="(item,index) in list " :key="item.bonus_id">
<view class="coupons_item_left">
<view class="item_left_prcie">${{item.type_money}}</view>
<text class="item_left_span">Min.spend</text>
@ -209,12 +213,13 @@
</view>
</view>
</view>
</view>
<!-- </scroll-view> -->
</view>
<!-- point -->
<scroll-view class="coupons" v-show="isPoints" scroll-y="true">
<view class="order_popup_title">
<text>Points (total:</text><text style="color:darkred">{{ count}} </text>)
<text>Points (total:</text><text style="color:darkred">{{ count}} </text>)
<image src="../../static/img/close1.png" mode="" @click="isPoints=false"></image>
</view>
<view class="order_popup_points" >
@ -236,10 +241,10 @@
<text>Items</text>
<image src="../../static/img/close1.png" mode="" @click="popup_index=-1"></image>
</view>
<view class="good_info" v-for="(item,index) in goods_list " :key="index">
<view class="good_info_left ">
<view class="good_info_image" >
<image :src="item.goods_thumb" mode=""></image>
<view class="good_info " v-for="(item,index) in goods_list " :key="index" :class="index ==0?'padding-top':''">
<view class="good_info_left">
<view class="good_info_image img_border" >
<image :src="item.goods_thumb" mode="" class="img_border"></image>
</view>
<view class="left_info">
<view class="info_name">{{item.goods_name}}</view>
@ -269,9 +274,10 @@
isCoupons:false,
popup_good:-1,
isPoints:false,
isusebonus:1,
query:{
_action:'cartcheckout',
is_new:0,
is_new:1,
direct_shopping:0,
consignee:''
},
@ -362,7 +368,7 @@
// ////console.log(this.total.bonus)
// uni.setStorageSync('Total',this.total)
// this.order=res.data.order
// ////console.log(this.use)
// //使
// this.usemethod()
// // this.Thepoint()
@ -370,14 +376,14 @@
// }
// })
this.total.amount = (parseFloat(total.amount) - parseFloat(this.bonus)).toFixed(2)
uni.setStorageSync('Total',this.total)
this.Thepoint()
this.total.amount = (parseFloat(total.amount) - parseFloat(this.bonus)).toFixed(2)-(parseFloat(this.Points).toFixed(2))
console.log(this.total.amount)
}
else{
this.bonus = 0
this.total = uni.getStorageSync('total')
this.Thepoint()
// this.Thepoint()
}
// this.isCoupons = false
},
@ -435,24 +441,21 @@
},
Thepoint(){
//使 使
////////console.log(this.total)
// if(this.bonus !=0){
// }
if(this.use && (this.current!=-1||this.bonus!==0)){
if(this.use && (this.current!=-1||this.bonus!=0)){
this.total.bonus = this.bonus
this.total = uni.getStorageSync('Total')
this.total = uni.getStorageSync('total')
//
if(parseFloat(this.count) > this.total.amount){
let i = (parseFloat(this.count) - this.total.amount - parseFloat(this.total.bonus)).toFixed(2)
// this.Points = (this.total.amount - parseFloat(this.total.bonus)).toFixed(2)
this.Points = this.total.amount
//////console.log(this.Points)
this.total.amount = 0
this.Points = this.total.amount - this.bonus
this.total.amount = 0
}
else if(parseFloat(this.count) < this.total.amount){
let i = (this.total.amount -parseFloat(this.count)).toFixed(2)
// this.total.amount = i
this.Points = this.count
this.total.amount = (this.total.amount - parseFloat(this.Points)).toFixed(2)
}
@ -464,6 +467,7 @@
}
// 使
else if(!this.use&& this.current==-1){
this.Points = 0
this.bonus = 0
this.total = uni.getStorageSync('total')
}
@ -520,60 +524,57 @@
//
cartselectshipping(id){
let data={_action:'cartselectshipping',shipping_id:id,consignee:this.address}
// let data={_action:'cartselectshipping',shipping_id:id,consignee:this.address}
let data={_action:'cartselectshipping',shipping_id:id,consignee:{country:'4191'}}
defaultRequest3(data,'consignee').then(res=>{
////console.info(data)
console.log(data)
console.info(res)
if(res.error==0){
this.tag = 1
this.total=res.data.total
//console.log(this.total)
this.totalnum = this.total.amount
console.log(typeof(this.totalnum))
// console.log(typeof(this.totalnum))
uni.setStorageSync('total',(res.data.total))
let ss = uni.getStorageSync('total')
this.order=res.data.order
// console.log(res.data)
this.orderId=res.data.order.shipping_id
// this.usemethod()
this.Thepoint()
}
})
},
getList(){
defaultRequest3(this.query,'consignee').then(res=>{
////////console.log(this.query)
//console.info(res)
getList(query,e){
defaultRequest3(query,'consignee').then(res=>{
console.log(query)
console.info(res)
if(res.error==0){
this.orderDate=res.data
this.address=res.data.consignee
if(e==1){
this.address=res.data.consignee
}
this.goods_list=res.data.goods_list
this.total = res.data.total
//console.info(this.goods_list)
this.shipping_list=res.data.shipping_list
this.orderId = this.shipping_list[0].shipping_id
if(e==2){
this.shipping_list=res.data.shipping_list
console.info(res.data.shipping_list)
this.orderId = this.shipping_list[0].shipping_id
}
//console.info(res.data)
////console.log(this.shipping_list[0].shipping_id)
this.cartselectshipping(this.orderId)
if(res.data.bonus_list){
this.bonus_list=res.data.bonus_list
}
// this.total=res.data.total
// this.totalnum = this.total.amount
// uni.setStorageSync('total',(res.data.total))
// let ss = uni.getStorageSync('total')
////console.log(res.data.total)
this.order=res.data.order
}
})
//
let data={_action:'getuserbonus'}
var time = new Date();
// var today = time.getFullYear()
// var month
// if(time.getMonth() +1 <10){
// month = '0'+(time.getMonth() +1).toString()
// }
// var date = time.getDate()
// var timecurrent = today.toString() + month.toString() + date.toString()
var today = time.toLocaleString()
console.log(time.toLocaleString())
defaultRequest2(data).then(res=>{
@ -593,25 +594,36 @@
list.push(item)
this.list = list
if(parseFloat(item.min_goods_amount) <this.totalnum){
list2.push(item)
// this.total.amount = sum
// this.Thepoint()
// this.useCoupons(2,list2[0])
// this.total.amount = this.total.amount
}
// console.log(hb_time > new Date(Date.parse(today)))
})
this.bonus = list2[0].type_money
if(list2.length>0){
let max = 0
for(let i = 0;i<list2.length; i++){
if(max < list2[i].type_money){
max = list2[i].type_money
}
}
this.bonus = max
this.isusebonus = 1
}
else if(list2.length == 0){
this.isusebonus = 0
}
this.bonus_id = list2[0].bonus_id
let sum = (parseFloat(this.total.amount) - parseFloat(this.bonus).toFixed(2)).toFixed(2)
console.log(sum)
this.total.amount = sum
if( sum>0 || sum == 0){
this.total.amount = sum
}
// uni.setStorageSync('Total',this.total)
uni.setStorageSync('totalsum',sum)
// uni.setStorageSync('totalsum',sum)
console.log(this.list)
}
@ -690,6 +702,18 @@
onLoad(e) {
// this.current = 0
this.query=JSON.parse(e.query)
console.log(this.query)
this.getList(this.query,1)
let query2 = {
_action:'cartcheckout',
is_new:1,
direct_shopping:0,
consignee:{
country:'4191'
}
}
this.cartselectshipping(11)
this.getList(query2,2)
// if(e.orderId){
// this.orderId = e.orderId
// this.order.shipping_id = e.orderId
@ -702,19 +726,23 @@
this.tag =1
}
////console.log(e.orderId)
this.getList()
this.cartselectshipping(11)
// this.getList(query2)
},
onShow(e) {
this.getList()
// this.query=JSON.parse(e.query)
console.log(e)
this.getList(this.query,1)
// this.getList(this.query,1)
uni.$once('query' ,(query)=>{
////////console.info(query)
if(query.type=='address'){
this.query.consignee=query.consignee
this.query.is_new=0
this.query.consignee = query.consignee
this.query.is_new=0
////////console.log(this.query)
this.getList()
this.getList(this.query,1)
}
});
},
@ -911,24 +939,34 @@
position: fixed;
bottom: 0;
left: 0;
// min-height: 200rpx;
// max-height: 600rpx;
max-height: 50vh;
overflow-y: scroll;
background-color: white;
padding-left: 29.33rpx;
padding-right: 29.33rpx;
box-sizing: border-box;
padding-top: 20.67rpx;
// padding-top: 20.67rpx;
width: 100%;
font-size: 30.67rpx;
font-weight: 400;
padding-bottom: 17.67rpx;
.margin_top{
margin-top: 80rpx;
}
.order_popup_title{
position: relative;
position: fixed;
width: 100%;
z-index: 999;
line-height: 50rpx;
margin-bottom: 100rpx;
text-align: center;
background-color: #fff;
font-size: 32rpx;
font-weight: bold;
border-bottom: 1px solid #E2E2E2;
// border-bottom: 1px solid #E2E2E2;
display: flex;
color:#000;
padding-top: 14rpx;
align-items: center;
justify-content: center;
// padding-top: 44.67rpx;
@ -937,8 +975,10 @@
image{
width: 21.33rpx;
height: 21.33rpx;
position: absolute;
right: 26rpx;
padding-right: 30rpx;
// position: absolute;
// right: 26rpx;
}
}
.select_cop{
@ -951,11 +991,12 @@
}
}
.order_popup_points{
padding-bottom: 63.33rpx;
padding-bottom: 40rpx;
padding-left: 47.33rpx;
padding-top: 34.67rpx;
padding-top: 47rpx;
font-size: 28rpx;
text-align: center;
.points_item{
display: flex;
align-items: center;
@ -963,6 +1004,9 @@
&:last-child{
margin-bottom: 0;
}
&:first-child{
margin-top: 60rpx;
}
image{
width: 29.33rpx;

6
pages/order/details.vue

@ -82,8 +82,8 @@
<view class="order_popup_commodity">
<view class="good_info" v-for="(item,index) in goods_list " :key="index" @click="goDetails(item.goods_id)">
<view class="good_info_left ">
<view class="good_info_image" >
<image :src="item.goods_thumb" mode=""></image>
<view class="good_info_image" style="border-radius: 10rpx;">
<image :src="item.goods_thumb" mode="" style="border-radius: 10rpx;"></image>
</view>
<view class="left_info">
<view class="info_name">{{item.goods_name}}</view>
@ -174,7 +174,7 @@
</view>
<view class="details_footer" v-if="details_index!=1">
<button class="white" v-if="details_index==4 || details_index==2 || details_index==3" @click="goLogistics">LOGISTICS</button>
<button class="white" v-if=" details_index==2||details_index==3" @click="goLogistics">LOGISTICS</button>
<button class="white" v-if="details_index==4 || details_index==3" @click.stop="openTips(1)">DELETE ORDER</button>
<button class="black" v-if="details_index==3 && goodsDate.comment_status_code==0" @click="goComment()">COMMENT</button>

52
pages/productDetails/goodsReview.vue

@ -18,8 +18,20 @@
<view class="reviews_item_content">{{item.content}}</view>
<view class="reviews_item_image">
<view class="reviews_image_content" v-for="(item1,index1) in item.attachments" :key="item1.afile">
<!-- <text> {{ item1.afile}}</text> -->
<image mode=" " :src="item1.afile"></image>
<!-- <text> {{ item1.afile}}</text>
-->
<video :src="item1.afile" v-if="item1.afile.includes('mp4')"
:autoplay="false"
:muted="true"
controls
:show-mute-btn="true"
:id="item1.afile"
object-fit="contain"
:poster="item1.afile"
@play="play(item1.afile)"
class="comment_video"></video>
<image mode=" " :src="item1.afile" @click="clickImg(index1,item.attachments)"></image>
</view>
</view>
</view>
@ -39,8 +51,9 @@
_action:'getgoodscomment',
goods_id:'',
page_index:1,
page_size:10,
commentlabel:''
page_size:100,
commentlabel:'',
videoContext:''
},
list:[]
}
@ -60,14 +73,41 @@
methods:{
getList(){
defaultRequest(this.query).then(res=>{
console.info(res)
console.info(res.data,'list')
if(res.error==0){
if(res.data)this.list=res.data
}
})
}
},
play(src) {
plus.screen.lockOrientation('portrait');
console.log(111)
// this.is_play = item.is_play
if(!this.is_play){
this.videoContext = uni.createVideoContext(src, this)
this.videoContext.requestFullScreen()
}
},
clickImg(index,e) {
let list = []
for(let i in e ){
console.log(e[i].afile)
list.push(e[i].afile)
console.log(list)
}
wx.previewImage({
urls: list, //httpurl
current: index, // http
indicator:'number',
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
}
},
onLoad(e) {
plus.screen.lockOrientation('portrait') //
this.query.goods_id=e.goods_id
this.getList()
}

202
pages/productDetails/index.vue

@ -127,7 +127,8 @@
<view class="select_size_item" v-if="item1.attr_img"
:style="{background:`url(${item1.attr_img})`}" @click="clickImg(index1,item.list)">
</view>
<view class="select_size_item1" v-if="item1.attr_img">{{ item1.attr_value }}</view>
<view class="select_size_item1" v-if="item1.attr_img && tag!=0">{{ item1.attr_value }}</view>
<view class="select_size_item2" v-if="tag==0">{{ item1.attr_value }}</view>
</view>
<!-- <view class="select_size_item">35</view>
<view class="select_size_item">M</view>
@ -144,7 +145,7 @@
<view class="transport">
<!-- <view class="goods_title">Shipping to {{addressDate.country_name || 'United States'}}</view> -->
<view class="goods_title title_Mtop">
<view class="goods_title title_Mtop" v-if="shipping_list">
<view class="goods_title_left">
<image src="/static/img/transport.png" mode=""></image>
<text>Delivery</text>
@ -154,10 +155,10 @@
<view class="spike1_item" v-for="(item,index) in shipping_list" :key="item.shipping_name" >
<view class="spike1_item_title">
<view >
{{ item.shipping_name}}: <text class="text_white">US${{ item.free_money}}</text>
{{ item.shipping_name}}: <text class="text_white">US${{ item.shipping_fee}}</text>
</view>
<view >
free on orders <text class="text_white">US${{ item.shipping_fee}}</text>
free on orders <text class="text_white">US${{ item.free_money}}</text>
</view>
<view class="text_bold_200" >Estimated to be deliverd on </view>
<view class="text_bold_200" >{{ item.shipping_desc }}</view>
@ -204,7 +205,7 @@
<!-- <scroll-view scroll-y="true" class="descriptionDetails" > -->
<scroll-view scroll-y="true" class="text1">
<view class="text1_item" v-if="Attr_list" :style="{height:max>7?160+'rpx':''}">
<view class="text1_item" v-if="Attr_list" :style="{height:max>7?max/7*130+'rpx':''}">
<view class="text1_left"><text>Color</text> </view>
<view class="text1_right" ><text>{{ Attr_list }}</text></view>
</view>
@ -216,13 +217,13 @@
<view class="text1_left" ><text>Gender</text> </view>
<view class="text1_right"><text>{{ goodsDate.brand_name}}</text></view>
</view>
<view class="text1_item" v-if="goodsDate.goods_weight">
<!-- <view class="text1_item" v-if="goodsDate.goods_weight">
<view class="text1_left" ><text>Weight</text> </view>
<view class="text1_right"><text>{{ goodsDate.goods_weight}}</text></view>
</view>
</view> -->
<view class="text1_item" v-for="(item,index) in goodsDate.property_list" :key="item.attr_name">
<view class="text1_left"><text>{{ item.attr_name }}</text> </view>
<view class="text1_right" v-for="(item1,index1) in item.goods_attrs" :key="item1.attr_value">{{ item1.attr_value}}</view>
<view class="text1_left"><text>{{ item.attr_name }}</text></view>
<view class="text1_right" v-for="(item1,index1) in item.goods_attrs" :key="item1.attr_value"><text>{{ item1.attr_value}}</text></view>
</view>
<view class="text1_item" v-if="Size_list">
<view class="text1_left"><text>Length</text> </view>
@ -278,7 +279,7 @@
<view class="reviews_item_image">
<view class="reviews_image_content" v-for="(item1,index1) in item.attachments" :key="item1.afile">
<!-- <text> {{ item1.afile}}</text> -->
<image mode=" " :src="item1.afile" v-if="item1.afile"></image>
<image mode=" " :src="item1.afile" v-if="item1.afile" @click="clickImg(index1,item.attachments)"></image>
</view>
</view>
</view>
@ -293,7 +294,7 @@
<!-- <image :src="goodsDate.goods_img" mode=""></image> -->
</view>
</template>
<view class="recommend recommend1" v-if="goodsDate.category_list">
<!-- <view class="recommend recommend1" v-if="goodsDate.category_list">
<view class="recommend_title">Other options</view>
<scroll-view class="spike1 " scroll-x="true" :show-scrollbar="false">
<view class="spike1_item1" v-for="(item,index) in 8" :key="index" >
@ -303,19 +304,21 @@
</view>
</view>
</scroll-view>
</view>
</view> -->
<view class="productImage_image1">
<image :src="goodsDate.goods_thumb" mode=""></image>
</view>
<view class="recommend">
<view class="recommend_title">You might also like</view>
<view class="recommend_content">
<view class="recommend_content_item" v-for="(item,index) in catList " :key="index" @click="goDetails(item.id)">
<view class="recommend_content_item" v-for="(item,index) in catList ">
<view class="recommend_content_item_image">
<image :src="item.thumb" mode=""></image>
<image :src="item.thumb" mode="" :key="index" @click="goDetails(item.id)"></image>
</view>
<view class="recommend_content_name"><text>{{item.short_name}}</text></view>
<view class="recommend_content_item_pric">US${{item.is_promote==0? item.shop_price :item.promote_price}}</view>
<view class="recommend_content_item_pric">US${{item.is_promote==0? item.shop_price :item.promote_price}}
<view ><image src="../../static/icon/cat_white.png"@click="recommendTap(item)"></image></view>
</view>
</view>
</view>
</view>
@ -326,7 +329,7 @@
<text>US${{goodsDate.is_promote==0? goodsDate.shop_price *cartQuery.goods_number:goodsDate.promote_price *cartQuery.goods_number}}</text>
</view>
<view class="footer_right">
<button @click="isCart=true">ADD TO CART</button>
<button @click="isCart=true,getDate(ID)">ADD TO CART</button>
</view>
</view>
<view class="mask" @click="isCart=false,isSecurity=false,isAttr=false&&Attr_list,Isshare=false" v-show="isCart || isSecurity || isAttr ||Isshare"></view>
@ -371,6 +374,7 @@
<image :src="item1.attr_img" mode="" v-if="item1.attr_img!=''" ></image>
<view class="color_select_item_bottom" v-if="item1.attr_img!=''">{{ item1.attr_value}}</view>
<view class="color_select_item_bottom" v-if="!item1.attr_img">{{ item1.attr_value}}</view>
</view>
</view>
</view>
@ -411,10 +415,12 @@
</view>
</view>
<view class="bootom_last" v-if="bootom == 1">-THE END-</view>
</view>
</template>
<script>
import {defaultRequest,defaultRequest2,defaultRequest4} from '../../api/index.js'
export default {
data() {
@ -426,6 +432,7 @@
isSecurity:false,
sum:0,
bootom:0,
ID:'',
query:{
_action:'getgoodsdetail',
goods_id:''
@ -552,10 +559,27 @@
onReachBottom(){
console.log(111)
this.bootom = 1
},
recommendTap(item){
console.log(item)
this.goodsDate =[]
uni.showLoading({
title:'loading',
})
this.getDate(item.id)
this.goods_attr_list =[]
setTimeout(() =>{
uni.hideLoading()
this.isCart = true
},1500)
// this.query.goods_id = item.id
},
isVideo()
{
//console.log('//////')
{
this.video = true
},
@ -633,6 +657,7 @@
this.cartQuery.goods_attr_id=goods_attr_id.substring(0,goods_attr_id.lastIndexOf(','));
}
console.log(this.cartQuery)
if(this.isLogin == 1){
defaultRequest2(this.cartQuery).then(res=>{
if(res.error==0){
@ -660,14 +685,27 @@
},
//
clickImg(index,e) {
console.log(e)
let list = []
if(e){
let list = []
console.log(e)
e.map( item =>{
list.push(item.attr_img)
})
if(typeof(e) ==='object')
{
for(let i in e ){
console.log(e[i].afile)
list.push(e[i].afile)
console.log(list)
}}
else{
e.map( item =>
{
list.push(item.attr_img)
})
}
wx.previewImage({
urls: list, //httpurl
current: index, // http
@ -829,7 +867,7 @@
defaultRequest(this.Ship).then( res => {
if(res.error == 0){
this.shipping_list = res.shipping_list
console.log(this.shipping_list,'1122')
console.log(this.shipping_list)
}
})
@ -837,12 +875,15 @@
})
},
//
getDate(){
getDate(id,e){
this.info =[]
this.goods_attr_list =[]
this.query.goods_id = id
defaultRequest(this.query).then(res=>{
if(res.error==0){
console.log(res.data,'222')
console.log(res.data)
this.goodsDate=res.data
if(this.goodsDate.comment_list)
if(this.goodsDate.comment_list&&e==1)
{
if(this.goodsDate.comment_list.length<2){
this.commonlist.push(this.goodsDate.comment_list[0])
@ -859,6 +900,7 @@
console.log(this.commonlist,'11')
this.shop_price = this.goodsDate.shop_price
this.goodsDate.gallery_list.map(item=>{
item.content=''
this.info.push(item.img_url)
@ -911,9 +953,8 @@
this.goods_attr_list.map( item =>{
item.list.map(item1 =>{
if(!item1.attr_img){
this.tag = 1
if(item1.attr_img){
this.tag ++
}
})
@ -974,7 +1015,7 @@
}
});
},
// 2
// 2
downloadImg(){
uni.downloadFile({
url:this.goodsDate.goods_thumb,
@ -983,16 +1024,21 @@
console.log(res);
   uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success: function() {
success: function(res2) {
console.log(res2)
uni.showToast({
title: 'saved!',
icon: 'none'
})
})
},
    });
     });
}
}
});
},
//3
Sendmes(){
@ -1017,22 +1063,22 @@
this.query.goods_id=e.goodid
this.cartQuery.goods_id=e.goodid
this.ID = e.goodid
//console.log(this.query.goods_id)
this.Ship.goods_id = this.query.goods_id
//console.log(this.Ship.goods_id)
this.getSecuritty()
this.getCartNum()
this.getDate()
this.getDate(e.goodid,1)
this.user_info=uni.getStorageSync('user_info')
if(this.user_info.isLogin){
this.setFavorites()
this.getDefaultAddress()
}
else{
this.getShip()
}
if(e.e==2){
this.isCart = true
}
@ -1183,8 +1229,8 @@
color: #999999;
// color: #fff;
&:last-child{
margin-bottom: 0;
padding-bottom: 22.67rpx;
margin-bottom: 62.67rpx;
// padding-bottom: 52.67rpx;
}
.securityDetails_item_title{
position: relative;
@ -1212,7 +1258,7 @@
display: flex;
flex-wrap: wrap;
.select_size_item{
// background-color: red;
background-color: #1b1b1b;
width: 97.67rpx;
height: 97.67rpx;
display: flex;
@ -1226,7 +1272,29 @@
font-size: 24rpx;
margin-right: 18.67rpx;
// border: 1px solid #F8F8F8;
padding: 0 5rpx;
padding: 1rpx 5rpx;
margin-bottom: 16.67rpx;
// &:nth-child(-n+2){
// margin-bottom: 16.67rpx;
// }
}
.select_size_item2{
background-color: #1b1b1b;
width: 97.67rpx;
height: 37.67rpx;
display: flex;
background-size: 100% !important;
background-repeat: no-repeat;
align-items: center;
justify-content: center;
border-radius: 12.67rpx;
// color: #666666;
color: #fff;
font-size: 24rpx;
margin-right: 18.67rpx;
// border: 1px solid #F8F8F8;
padding: 1rpx 5rpx;
margin-bottom: 16.67rpx;
// &:nth-child(-n+2){
@ -1673,35 +1741,41 @@
// width: 500rpx;
flex: 1;
background-color: #F7F7F7;
height: $nav-height;
border-radius: 15px;
padding: 0 15px;
// height: $nav-height;
height: 60rpx;
border-radius: 20px;
padding: 0 12px;
flex-wrap: nowrap;
margin: 7px 0;
line-height: $nav-height;
line-height: 60rpx;
}
.input-uni-icon {
line-height: $nav-height;
height: 30rpx;
// line-height: $nav-height;
height: 25rpx;
width: 30rpx;
padding-top: 6.37rpx;
padding-top: 5.37rpx;
image{
height: 100%;
width: 100%;
margin: 0 auto;
}
}
.nav-bar-input {
height: $nav-height;
line-height: $nav-height;
line-height:$nav-height;
/* #ifdef APP-PLUS-NVUE */
width: 370rpx;
/* #endif */
padding: 0 5px;
padding-left:10rpx;
// padding: 2rpx 5px;
// padding-bottom: 8rpx;
font-size: 12px;
background-color: #F7F7F7;
// background-color: #F7F7F7;
font-weight: 500;
}
/deep/.uni-navbar--border{
@ -1710,6 +1784,7 @@
}
.nav_right{
padding-right: 30rpx;
padding-top: 10rpx;
image{
width: 44rpx;
height: 44rpx;
@ -2106,6 +2181,20 @@
}
.recommend_content_name,.recommend_content_item_pric{
padding-left: 20rpx;
padding-right: 20rpx;
}
.recommend_content_item_pric{
display: flex;
justify-content: space-between;
image{
height: 40rpx;
width: 40rpx;
}
}
.recommend_content_name{
font-size: 13px;
height: 52rpx;
line-height: 52rpx;
}
.bootom_last{
height: 200rpx;
@ -2115,4 +2204,7 @@
line-height: 200rpx;
text-align: center;
}
/deep/.nav_left .uni-image .data-v-af9236d6{
background-size: 0% !important;
}
</style>

330
pages/productDetails/review.vue

@ -7,7 +7,7 @@
</view>
</block>
</uni-nav-bar>
<view class="body" v-for="(item,index) in orderDate.order_goods " :key="index">
<view class="body" v-for="(item,index) in orderDate " :key="index">
<view class="order_popup_commodity">
<view class="good_info" >
<view class="good_info_left ">
@ -38,32 +38,38 @@
<textarea placeholder="Write reviews" v-else v-model="query1.comments[index].comment"></textarea>
</view>
<view class="reason_upload">
<view class="reason_upload_item" @click="UploadVideo">
<view class="reason_upload_item" @click="UploadVideo(index)">
<!-- <view class="reason_upload_item1 margin_left" @click="deleteImg(VideoId)" v-model="VideoId" v-if="VideoSrc"></view> -->
<image src="/static/img/vedio.png" class="upload_item_camera1" mode=""v-if="!VideoSrc"></image>
<video :src="VideoSrc" class="upload_item_camera2" mode=""
id="videoId"
<image src="/static/img/vedio.png" class="upload_item_camera1" mode=""v-if="!item.src"></image>
<video :src="item.src" class="upload_item_image" mode=""
:id="item.src"
v-model="item.video_id"
controls
:autoplay="false"
object-fit="contain"
@play="play"
@fullscreenchange="fullscreenchange"
:poster="item.src"
@play="play(item,index)"
@fullscreenchange="fullscreenchange(item)"
@timeupdate="timeupdate"
v-else>
</video>
<view v-if="!VideoSrc">Upload the video</view>
<view v-if="!item.src">Upload the video</view>
</view>
<view class="reason_upload_item" @click="Upimg()">
<view class="reason_upload_item " v-for="(item1,index1) in item.imglist" :key="index1">
<view class="reason_upload_item1" @click="deleteImg(0,item1.id,item,index,item1,index1)" v-model="item1.id"></view>
<image :src="item1.url" class="upload_item_image" mode="" @click="clickIMg(item1.url)"></image>
</view>
<view class="reason_upload_item" @click="Upimg(index)">
<image src="/static/img/camera.png" class="upload_item_camera" mode="" ></image>
<!-- <image :src="imgSrc" class="upload_item_camera" mode="" v-else></image> -->
<view>Upload pictures</view>
</view>
<view class="reason_upload_item " v-for="(item,index) in imglist" :key="index">
<view class="reason_upload_item1" @click="deleteImg(item.id,0)" v-model="item.id"></view>
<image :src="item.url" class="upload_item_image" mode="" ></image>
</view>
</view>
</view>
<view class="reason_upload_tips">Upload JPG, PNG format, within 3M</view>
<view class="reason_upload_tips"></view>
<view class="reason_upload_tipV" @click="deleteImg(VideoId,1)" v-model="VideoId" v-if="VideoSrc">Delete Video</view>
<view class="reason_upload_tipV" @click="deleteImg(1,item.video_id,item,index)" v-if="item.src">Delete Video</view>
<!-- <view style="height: 100rpx;width: 100rpx;">
<image :src="imgSrc" class="upload_item_image" style="height: 100%;width: 100%;"mode="" ></image>
</view> -->
@ -74,7 +80,7 @@
</template>
<script>
import {defaultRequest,defaultRequest2,defaultRequest3,defaultRequest5} from '../../api/index.js'
import {defaultRequest,defaultRequest2,defaultRequest3} from '../../api/index.js'
import { encryptDes, decryptDes ,encrypt_by_des } from '@/utils/des.js'
import Base64 from 'base-64';
import cryptoJS from "crypto-js"
@ -82,7 +88,7 @@
export default {
data() {
return {
orderDate:{},
orderDate:[],
// 0 1
reviewType:0,
query:{
@ -107,7 +113,21 @@
imglist:[],
videoPlay: false,
videoUrl: '',
ids:[]
upvlist:[],
ids:'',
is_play:true,//
videoContext:'',
json_data:{
appcode:'DOPE+' ,//
appchannel:'FXXXXHUAWEI' ,//
appver: '1.0.0',//
appname:'cnic_buyer' ,//
manufacturer:'HUAWEI' ,//
phonebrand:'HORNOR' ,//
phonetype:'X30' ,//
phoneos:'ANDROID',//
}
}
},
@ -115,41 +135,68 @@
//
play(index) {
let videoContext = uni.createVideoContext('videoId', this)
videoContext.requestFullScreen()
play(item,index) {
this.VideoId = item.src
console.log(111)
// this.is_play = item.is_play
this.videoContext = uni.createVideoContext(item.src, this)
this.videoContext.requestFullScreen()
},
//退
fullscreenchange(e) {
if (!e.detail.fullScreen) {
uni.createVideoContext('videoId', this).pause();
}
fullscreenchange(item) {
// if (!e.detail.fullScreen) {
// uni.createVideoContext(item.src, this).pause();
// }
},
//退
fullscreenchange (e){
if(!e.detail.fullScreen){
this.videoContext.stop()
}
//
timeupdate(e){
console.log(e)
console.log(this.VideoId)
// if(e.detail.currentTime > 0){
// this.is_play = false
// // console.log(this.is_play)
// uni.createVideoContext(this.VideoId, this).pause();
// }
},
reviewSub(){
this.ids = this.ids.substring(0,this.ids.lastIndexOf(','))
this.query.attachments = this.ids
let data
this.query1.comments.map(item =>{
item.attachments = item.attachments.substring(0,item.attachments.lastIndexOf(','))
})
// this.query1.comments = JSON.stringify(this.query1.comments)
// this.query1 = JSON.parse(this.query1)
if(this.reviewType==0){
this.commentordergoods()
}else{
this.query1.comments.attachments = this.ids
// data=this.query1
this.commentordergoods1()
}
console.info(data)
defaultRequest(this.query).then( res =>{
console.log(res)
})
// defaultRequest(this.query).then( res =>{
// console.log(res)
// if(res.error==0){
// uni.showToast({
// icon:'none',
// title:'Comment successful!'
// })
// setTimeout(function(){
// uni.navigateBack()
// },2000)
// }
// })
},
//
commentordergoods(){
defaultRequest2(this.query).then(res=>{
console.info(res)
console.log(this.query)
if(res.error==0){
uni.showToast({
icon:'none',
@ -163,8 +210,26 @@
},
//
commentordergoods1(){
defaultRequest2(this.query1,'comments').then(res=>{
// let str = Object.assign(this.json_data,this.query1)
// console.log(str)
// let data = encryptDes(JSON.stringify(str),'6780f04cf2e211ec86a8005056c00008');
// let str2 = decryptDes(data,'6780f04cf2e211ec86a8005056c00008')
// console.log(str2)
// uni.request({
// url:'https://lilbeattranapismits.dopeplus.com/mapi/api_v2011.php?appcode=DOPE+',
// method:'POST',
// data:data,
// success(res) {
// let res2= decryptDes(res.data,'6780f04cf2e211ec86a8005056c00008');
// console.log(JSON.parse(res2))
// },
// })
defaultRequest2(this.query1).then(res=>{
console.info(res)
console.log(this.query1)
// let str = encryptDes(JSON.stringify(this.query1),'6780f04cf2e211ec86a8005056c00008');
// console.log(str)
if(res.error==0){
uni.showToast({
icon:'none',
@ -176,12 +241,25 @@
}
})
},
clickIMg(url){
console.log(url)
let list = []
list.push(url)
wx.previewImage({
urls:list, //http
current: url,
indicator:'number',
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
back(){
uni.navigateBack()
},
//
UploadVideo(){
UploadVideo(index){
var that = this
const json_data={
appcode:'DOPE+' ,//
@ -214,28 +292,28 @@
let data=decryptDes(uploadFileRes.data,'6780f04cf2e211ec86a8005056c00008');
console.log(JSON.parse(data));
let lists = JSON.parse(data)
// this.video = lists.data
that.VideoId = lists.data.attachment_id
that.VideoSrc = lists.data.attachment_url
// setTimeout( () =>{
// uni.showLoading({
// title:'',
// icon:'none'
// })
// },2000)
// console.log(this.VideoSrc,'000')
that.ids.push(lists.data.attachment_id)
console.log(that.orderDate)
that.orderDate[index].src = lists.data.attachment_url
that.orderDate[index].video_id = lists.data.attachment_id
that.orderDate[index].is_play = true
console.log(that.orderDate)
uni.setStorageSync('orderDate',that.orderDate)
that.ids += lists.data.attachment_id +','
console.log(that.ids)
// this.imglist = lists.data
// that.imglist = this.imglist.push(lists.data)
// console.log(that.imglist)
uni.startPullDownRefresh()
that.query1.comments[index].attachments +=(lists.data.attachment_id) +','
uni.setStorageSync('ids',that.ids)
}
});
}
})
},
//
Upimg(){
Upimg(index){
var that = this
let url
uni.chooseImage({
@ -247,6 +325,7 @@
console.log(JSON.stringify(res.tempFilePaths));
const tempFilePaths = res.tempFilePaths
console.log(res.tempFiles[0])
uni.getImageInfo({
src: res.tempFilePaths[0],
success: (path) => {
@ -275,19 +354,7 @@
//
let data = encryptDes(JSON.stringify(json_data),'6780f04cf2e211ec86a8005056c00008');
let file = encryptDes(JSON.stringify(res.tempFiles[0]),'6780f04cf2e211ec86a8005056c00008')
// let str = {
// _action: 'uploadcommentfile',
// atype:1,
// }
// let afile ={
// afile:res.tempFilePaths[0]
// }
// let _action = encryptDes(JSON.stringify(str),'6780f04cf2e211ec86a8005056c00008');
// let afile1 = encryptDes(JSON.stringify(afile),'6780f04cf2e211ec86a8005056c00008');
// defaultRequest5(str,url).then(res =>{
// console.log(res)
// })
uni.uploadFile({
url:'https://lilbeattranapismits.dopeplus.com/mapi/api_v2011.php?appcode=DOPE+',
filePath: tempFilePaths[0],
@ -300,17 +367,29 @@
let data=decryptDes(uploadFileRes.data,'6780f04cf2e211ec86a8005056c00008');
console.log(JSON.parse(data));
let lists = JSON.parse(data)
that.imglist.push({
let imglist = []
// that.imglist.push({
// id:lists.data.attachment_id,
// url:lists.data.attachment_url
// })
// that.imgSrc = lists.data.attachment_url
// this.imglist = this.imglist.push(lists.data)
that.orderDate[index].imglist.push({
id:lists.data.attachment_id,
url:lists.data.attachment_url
})
that.imgSrc = lists.data.attachment_url
// this.imglist = this.imglist.push(lists.data)
console.log(that.imglist )
that.ids.push(lists.data.attachment_id)
console.log(that.orderDate)
uni.setStorageSync('orderDate',that.orderDate)
uni.setStorageSync('orderDate',that.orderDate)
uni.startPullDownRefresh()
// that.ids.push(lists.data.attachment_id)
that.ids += lists.data.attachment_id +','
console.log(that.query1)
console.log(that.ids)
that.query1.comments[index].attachments +=(lists.data.attachment_id) +','
console.log(that.query1)
}
});
@ -321,37 +400,76 @@
console.log(this.imglist)
},
//
deleteImg(Id,e){
let id = Id
console.log(id)
for(let i =0;i < this.imglist.length ; i++){
if(this.imglist[i].id == id){
this.imglist.splice(i,1)
}
}
for(let i =0;i < this.ids.length ; i++){
if(this.ids[i] == id){
this.ids.splice(i,1)
}
}
if(e==1){
this.VideoSrc = ''
this.VideoId = ''
}
deleteImg(e,id,item,index,item1,index1){
if(e==0){
let id = item.id
console.log(item)
item.imglist.map(i =>{
if(i.id == item1.id){
console.log(111)
item.imglist.splice(index1,1)
console.log(item.imglist)
this.orderDate[index].imglist = item.imglist
uni.setStorageSync('orderDate',this.orderDate)
}
})
}else{
this.orderDate[index].src =''
this.orderDate[index].video_id =''
uni.setStorageSync('orderDate',this.orderDate)
}
this.orderDate = uni.getStorageSync('orderDate')
console.log(this.orderDate)
console.log(this.ids)
console.log(this.imglist)
console.log(this.VideoSrc)
// this.ids.map(i =>{
// if(i==id){
// this.ids=this.ids.slice(id)
// }
// })
this.ids = this.ids.replace(id+',','')
console.log(this.ids)
//
this.query1.comments.map( i =>{
const id_index2 = i.attachments.indexOf(id)
i.attachments = i.attachments.replace(id+',','')
this.query1.comments[index].attachments = i.attachments
console.log(i.attachments)
console.log(typeof(i.attachments))
})
console.log(this.query1)
}
},
onLoad(e) {
let datas=JSON.parse(e.data)
console.log(datas)
// let orderDate = uni.getStorageSync('orderDate')
// this.ids = uni.getStorageSync('ids')
// if(orderDate){
// this.orderDate = orderDate
// }else{
// this.orderDate=datas.order_goods
// }
this.query.order_id = datas.order_id
this.query.order_sn = datas.order_sn
this.query.goods_id = datas.order_goods[0].goods_id
this.query.rec_id = datas.order_goods[0].grec_id
this.orderDate=datas
this.orderDate=datas.order_goods
this.orderDate.map(item =>{
if(!item.imglist){
item.imglist = []
}
item.src =''
item.video_id =''
})
if(datas.order_goods.length>1){
this.reviewType=1
this.query1.order_id=datas.order_id
@ -362,8 +480,12 @@
goods_id:item.goods_id,
comment:'',
comment_rank:'',
commentlabels:item.goods_attr.replace(/\s\n/g,' ')
commentlabels:item.goods_attr.replace(/\s\n/g,' '),
attachments:''
}
this.upvlist.push({
src:''
})
this.query1.comments.push(data)
})
}else{
@ -373,7 +495,17 @@
this.query.goods_id=datas.order_goods[0].goods_id
this.commentlabels=datas.order_goods[0].goods_attr.replace(/\s\n/g,' ')
}
console.log(this.query1)
},
onPullDownRefresh(){
if(this.ids.length>0){
this.orderDate = uni.getStorageSync('orderDate')
}
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
},
filters:{
goodsAttr(e){
return e.replace(/\s\n/g,';');
@ -414,15 +546,18 @@
}
.reason_upload{
display: flex;
z-index:10;
background-color: #fff;
flex-wrap: wrap;
margin-bottom: 34.67rpx;
.reason_upload_item{
border: 1px dashed #D2D2D2;
background-size: 100%;
background-size: 100% !important;
border-radius: 15rpx;
width: 156rpx;
height: 156rpx;
margin-top:5rpx;
z-index:19;
display: flex;
justify-content: center;
align-items: center;
@ -452,24 +587,28 @@
.upload_item_camera2{
width: 156rpx;
height: 156rpx;
z-index:10 !important;
background-color: #ccc;
}
.upload_item_image{
// background-color: aqua;
width: 100%;
height: 100%;
border-radius: 15rpx;
z-index:20 !important;
}
}
.reason_upload_item1{
position: relative;
&::after{
content: "";
z-index:25;
width: 30.67rpx;
height: 30.67rpx;
position: absolute;
margin-left: 65rpx;
top: -12rpx;
z-index: 999;
background-image: url("@/static/img/close3.png");
background-size: 100% 100%;
}
@ -483,6 +622,8 @@
color: #666666;
}
.reason_upload_tipV{
margin-top: 20rpx;
margin-bottom: 20rpx;
font-size: 24rpx;
color: #8c0000;
}
@ -510,6 +651,7 @@
}
.body{
border-top: 14.67rpx #F6F5FA solid;
padding-bottom: 40rpx;
}
.order_popup_commodity{
padding: 0 33.33rpx;

535
pages/shippingCart/index.vue

@ -18,13 +18,19 @@
<template v-else>
<view class="cart_info" v-if="money>0">
<image src="/static/img/Shipped.png" mode=""></image>
<view class="cart_title_content">Buy <text style="color:darkred">US${{ money }}</text>more to enjoy FREE STANDARD SHIPPING!</view>
<view class="cart_title_content">Buy <text style="color:darkred;margin-left: 10rpx;margin-right: 10rpx;font-weight: 500;">US${{ money }}</text>more to enjoy FREE STANDARD SHIPPING!</view>
<view class="cart_title_right" @click="gotAdd()">Add</view>
</view>
<view class="cart_info" v-if="money == 0">
<image src="/static/img/Shipped.png" mode=""></image>
<view class="title_left">FREE SHIPPING</view>
</view>
<!-- <view class="cart_info" v-if="money == -1">
<navigator url="../account/address">
<image src="/static/img/Shipped.png" mode=""></image>
<view class="title_left">PLEASE ADD AN ADDRESS</view>
</navigator>
</view> -->
<view class="cart">
<view class="cart_content">
<view class="good_info" v-for="(gitem,index) in inlist" :key="gitem.rec_id">
@ -140,13 +146,15 @@
<view class="recommend_title">RECOMMEND</view>
<view class="recommend_content">
<view class="recommend_content_item" v-for="(item,index) in catList " :key="index"
@click="goDetails(item.id)">
<view class="recommend_content_item_image">
>
<view class="recommend_content_item_image" @click="goDetails(item.id)">
<image :src="item.thumb" mode=""></image>
</view>
<view class="recommend_content_item_image_name">{{item.short_name}}</view>
<view class="recommend_content_item_pric">
US${{item.is_promote==0? item.shop_price :item.promote_price}}</view>
US${{item.is_promote==0? item.shop_price :item.promote_price}}
<view><image src="../../static/img/cart2.png" @click="getitem(item)"></image></view>
</view>
</view>
</view>
</view>
@ -169,9 +177,9 @@
</uni-popup>
<!-- 规格弹出层 -->
<view class="mask" @click="isCahnge=false" v-show="isCahnge"></view>
<view v-show="isCahnge" class="addCard">
<image src="/static/img/close1.png" mode="" class="addCard_close" @click="isCahnge=false,goods_attr_list = []"></image>
<view class="mask" @click="isChange=false" v-show="isChange"></view>
<view v-show="isChange" class="addCard">
<image src="/static/img/close1.png" mode="" class="addCard_close" @click="Close()"></image>
<!-- <view class="change_img"><image :src="Attr_img" mode=""></image></view> -->
<scroll-view class="spike1" scroll-x="true" >
<image :src="item.img_url" mode="" @click="clickImg(gallery_list,index)" class="addCard_scroll" v-for="(item,index) in gallery_list" ></image>
@ -181,10 +189,23 @@
<view class="addCard_price">US${{goodsDate.is_promote==0? shop_price :goodsDate.promote_price}}</view>
<view v-for="(item,index) in goods_attr_list" :key="item.attr_id">
<view >{{item.name}}</view>
<view class="color_select variations_select_size">
<view class="color_select variations_select_size" v-if="Change == 1 ">
<view class="color_select_item" v-for="(item1,index1) in item.list" :key="item1.attr_value"
:class="str_select[index].goods_attr_id==item1.goods_attr_id?'active_color':''"
@click="selectAttr(item.attr_id,item1.goods_attr_id,index1,item1.attr_price)">
@click="selectAttr(index,item.attr_id,item1.goods_attr_id,index1,item1.attr_price)">
<view class="color_select_item_zoom" v-if="item1.attr_img!=''">
<image src="/static/icon/big2.png" mode="" @click="clickImg(item.list,index1)"></image>
</view>
<image :src="item1.attr_img" mode="" v-if="item1.attr_img!=''"></image>
<view class="color_select_item_bottom" v-if="item1.attr_img!=''">{{ item1.attr_value}}</view>
<view class="color_select_item_bottom" v-if="!item1.attr_img">{{ item1.attr_value}}</view>
</view>
</view>
<view class="color_select variations_select_size" v-if="Change == 0">
<view class="color_select_item" v-for="(item1,index1) in item.list" :key="item1.attr_value"
:class="goods_attr_list[index].goods_attr_id==item1.goods_attr_id?'active_color':''"
@click="selectAttr2(item.attr_id,item1.goods_attr_id,index1,item1.attr_price)">
<view class="color_select_item_zoom" v-if="item1.attr_img!=''">
<image src="/static/icon/big2.png" mode="" @click="clickImg(item.list,index1)"></image>
</view>
@ -200,11 +221,17 @@
<text>Quantity</text>
<uni-number-box background="#fff" v-model="num" :min="1"></uni-number-box>
</view>
<button @click ="AddtoCart">ADD TO CART</button>
<button @click="AddtoCart">ADD TO CART</button>
</view>
<view class="bootom_last1" v-if="bootom == 1">-THE END-</view>
</view>
<view class="tarbar">
<view @click="change(index)" v-for="(item,index) in tarbar" :key="item.name" :class="index==2?'img_m':'tarbar_img'" :style="{color:index==3?'#000':''}">
<image :src="item.src"></image>
<view>{{ item.name}}</view>
</view>
</view>
</view>
</template>
<script>
@ -219,9 +246,10 @@
return {
isEmpty: false,
bootom:0,
isCahnge: false,
isChange: false,
backButtonPress: 0,
//
Change:0,
total: {
goods_price: 0,
goods_count: 0
@ -244,7 +272,7 @@
addQuery:{
_action:'addtocart',
goods_id:'',
goods_parent_id:'',
goods_parent_id:0,
goods_number:'',
goods_attr_id:'',
goods_is_package:0
@ -271,13 +299,43 @@
str_select:[],
query:{
_action:'cartcheckout',
is_new:0,
is_new:1,
direct_shopping:0,
consignee:''
consignee:{
country:'4191'
}
},
orderId:0,
shop_price:0,
bootom:0,
Is_attr:0,//
isLogin:-1,
tarbar:[
{
src:'../../static/icon/home3.png',
name:'Home',
url:'../index/index'
},
{
src:'../../static/img/Category.png',
name:'Category',
url:'../category/index'
},
{
src:'../../static/img/min.png',
name:''
},
{
src:'../../static/img/cart1.png',
name:'Cart',
url:'../shippingCart/index'
},
{
src:'../../static/img/Account.png',
name:'Account',
url:'../account/index'
},
],
}
},
onBackPress(options) {
@ -299,14 +357,60 @@
url: '/pages/productDetails/index?goodid=' + id
})
},
change(e){
this.index = e
let tarbar = this.tarbar
if(e == 2){
uni.navigateTo({
url:'../index/index2'
})
}else{
uni.switchTab({
url:this.tarbar[e].url
})
}
},
onReachBottom(e){
this.bootom = 1
},
Close(){
this.isChange=false,
this.goods_attr_list = []
this.goodsDate=[]
this.gallery_list=[]
//
},
//
getitem(item){
this.Change = 0
//console.log(item)
let data = {
_action: 'getgoodsdetail',
goods_id: item.id
}
this.gallery_list = []
this.goods_attr_list = []
this.addQuery.goods_id = item.id
this.addQuery.goods_number = this.num
this.goodsDate = []
this.getgoodData(data)
uni.showLoading({
title:'loading',
})
setTimeout( () =>{
uni.hideLoading()
this.isChange = true
},1500)
uni.hideTabBar()
},
//
getCatList(type) {
defaultRequest4(this.catQuery).then(res => {
console.info(res)
//console.info(res)
if (res.error == 0) {
if (res.data) {
if (type == 0) {
@ -348,7 +452,7 @@
goods_number: e
}
defaultRequest4(data).then(res => {
console.info(res)
//console.info(res)
if (res.error == 0) {
this.getList()
this.getorder()
@ -384,7 +488,7 @@
},
//
deleteCart() {
console.log(this.inlist, '/////')
////console.log(this.inlist, '/////')
if (this.inlist.length == 0) return
//
this.deleteQuery.rec_id = ''
@ -529,14 +633,14 @@
}
this.goods_list = []
defaultRequest(data).then(res => {
console.info(res)
defaultRequest4(data).then(res => {
//console.info(res)
if (res.error == 0) {
this.total = res.data.total
this.all_allno = res.data.all_allno
console.log(this.inlist)
////console.log(this.inlist)
if (res.data.goods_list) {
res.data.goods_list.map(item => {
item.goods_attr = item.goods_attr.replace(/\s\n/g, ';');
@ -545,10 +649,50 @@
}
let goodlist = this.goods_list
this.test(goodlist)
let user = uni.getStorageSync('user_info')
let list2 = uni.getStorageSync('cartlist')
//console.log('11',list2)
if(goodlist.length>0 ){
list2.map( item =>{
if(item.email == user.email){
item.cartlist = goodlist
uni.setStorageSync('cartlist',list2)
console.log(list2)
}
})
}else{
this.inlist = uni.getStorageSync('cartlist')
}
}
})
// tarbar
let data2={_action:'getpagedata',pagecode:'HOMESALEICON '}
defaultRequest(data2).then(res => {
//console.log(res)
let url
if(res.error == 0){
if(res.data.page_code == 'HOMESALEICON'){
let src = 'https://www.dopeplus.com/images/mapp_customized/202210/1665653173499940520.png'
if(src==res.data.zones[0].blocks[0].block_pic){
this.tarbar[2].src = '../../static/img/min.png'
}else{
src=res.data.zones[0].blocks[0].block_pic
uni.setStorageSync('midButton',src)
}
}
}
});
},
@ -579,12 +723,12 @@
}
})
} else {
// console.log(this.outlist,'')
// ////console.log(this.outlist,'')
this.outlist.map(item => {
rec_ids.push(item.rec_id)
})
rec_ids.map(item => {
console.log(item)
////console.log(item)
})
let res = await Promise.all(rec_ids.map(async (item) => {
//
@ -593,7 +737,7 @@
rec_id: item
})
}));
console.log(res)
////console.log(res)
if (res[0].error == 0) {
setTimeout( () =>{
uni.showToast({
@ -614,46 +758,58 @@
},
gotAdd() {
let data = {
_action: 'getpagedata',
pagecode: 'CART'
let data1 = {
_action:'getgoods',
type:'hot'
}
defaultRequest(data).then(res => {
if (res.error == 0) {
let list = res.data.zones
let url = ''
list.map(item => {
if (item.zone_name == 'Add Items') {
let listdata = item.blocks
url = listdata[0].block_link
}
})
const i = url.indexOf('?')
const src = url.substring(i)
if (url.includes('goodslist')) {
uni.navigateTo({
url: '../category/productList' + src
uni.navigateTo({
url: '../category/productList?type=' + 'hot'+'&title='+'hot'
})
}
}
})
// let data = {
// _action: 'getpagedata',
// pagecode: 'CART'
// }
// defaultRequest(data).then(res => {
// if (res.error == 0) {
// let list = res.data.zones
// let url = ''
// list.map(item => {
// if (item.zone_name == 'Add Items') {
// let listdata = item.blocks
// url = listdata[0].block_link
// }
// })
// const i = url.indexOf('?')
// const src = url.substring(i)
// //console.log(src)
// if (url.includes('goodslist')) {
// uni.navigateTo({
// url: '../category/productList' + src
// })
// }
// }
// })
},
getorder(){
defaultRequest3(this.query,'consignee').then(res =>{
console.log(res)
//console.log(res)
//console.log(this.query)
if(res.error ==0){
console.log(res)
console.log(this.total.goods_price)
////console.log(res)
////console.log(this.total.goods_price)
// if(res.data.shipping_list == undefined){
// this.money = -1
// }
this.orderId = res.data.shipping_list[0].shipping_id
if(parseInt(res.data.shipping_list[0].free_money)> parseFloat(this.total.goods_price)){
this.money = parseInt(res.data.shipping_list[0].free_money) - parseFloat(this.total.goods_price)
this.money = parseFloat(this.money).toFixed(2)
console.log(this.money)
////console.log(this.money)
}else{
this.money = 0
}
@ -662,7 +818,10 @@
},
//
ChangeAttr(item) {
console.log(item)
////console.log(item)
this.isChange = true
uni.hideTabBar()
this.Change = 1
this.goodsDate =[]
this.gallery_list = []
this.deleteQuery.rec_id = item.rec_id
@ -680,19 +839,22 @@
this.Attr_img = item.goods_thumb
this.num = item.goods_number
let str_select = item.goods_attr_id.split(',')
console.log(str_select)
////console.log(str_select)
str_select.map(item =>{
this.str_select.push({
goods_attr_id:item
})
})
console.log(this.str_select)
this.isCahnge = true
////console.log(this.str_select)
let data = {
_action: 'getgoodsdetail',
goods_id: item.goods_id
}
this.getgoodData(data)
},
getgoodData(data){
defaultRequest(data).then( res =>{
if(res.error==0){
this.goodsDate = res.data
@ -704,24 +866,31 @@
this.colorNum=item.goods_attrs.length
}
let data={name:item.attr_name,goods_attr_id:'',attr_id:item.attr_id,list:item.goods_attrs}
this.goods_attr_list.push(data)
this.goods_attr_list.push(data)
this.Is_attr =1
//console.log(this.goods_attr_list,'pp')
})
}else if (this.goodsDate.attr_list==undefined){
this.goods_attr_list =[] //
this.Is_attr = 0
console.log(this.goods_attr_list)
//console.log(this.goods_attr_list)
}
}
})
},
//
selectAttr(attr_id,goods_attr_id,index,attr_price){
selectAttr(index,attr_id,goods_attr_id,index1,attr_price){
this.current = index
if(this.Change == 0){
this.goods_attr_list[index].goods_attr_id = goods_attr_id
}
//console.log(this.goods_attr_list)
//console.log(goods_attr_id)
let sum = this.goodsDate.shop_price
if(attr_price){
sum = parseInt(sum) + parseInt(attr_price)
console.log(sum)
////console.log(sum)
}
this.shop_price = sum
@ -738,7 +907,7 @@
this.str_select[i].goods_attr_id=''
}else{
this.str_select[i].goods_attr_id=goods_attr_id
console.log(this.str_select)
////console.log(this.str_select)
}
isNew=false
@ -752,46 +921,155 @@
}
}
},
selectAttr2(attr_id,goods_attr_id,index1,attr_price){
this.current = index1
this.addQuery.goods_number = this.num
let sum = this.goodsDate.shop_price
if(attr_price){
sum = parseInt(sum) + parseInt(attr_price)
//console.log(sum)
}
this.shop_price = sum
let data={attr_id:attr_id,goods_attr_id:goods_attr_id}
if(this.goods_attr_list.length==0){
this.goods_attr_list.push(data)
}else{
//
let isNew=false
for(let i in this.goods_attr_list){
let item=this.goods_attr_list[i]
if(item.attr_id==attr_id){
if(item.goods_attr_id==goods_attr_id){
this.goods_attr_list[i].goods_attr_id=''
}else{
this.goods_attr_list[i].goods_attr_id=goods_attr_id
}
isNew=false
break
}else{
isNew=true
}
}
if(isNew){
this.goods_attr_list.splice(index,0,data)
}
}
//console.log(this.goods_attr_list)
// let list =[]
// this.goods_attr_list.map( item =>{
// if(item.goods_attr_id!=''&&!this.addQuery.goods_attr_id.includes(item.goods_attr_id)){
// this.addQuery.goods_attr_id+=item.goods_attr_id+','
// }
// })
// this.cartQuery.goods_attr_id=goods_attr_id.substring(0,goods_attr_id.lastIndexOf(','));
// //console.log(this.addQuery.goods_attr_id)
},
//1 2 3
AddtoCart(){
console.log(this.deleteQuery)
console.log(this.addQuery)
this.addQuery.goods_attr_id =''
////console.log(this.deleteQuery)
//console.log(this.addQuery)
this.addQuery.goods_number = this.num
console.log(this.str_select)
if(this.Change == 1){
this.addQuery.goods_attr_id =''
this.str_select.map(item=>{
if(item.goods_attr_id!=''){
this.addQuery.goods_attr_id+=item.goods_attr_id+','
}
})
console.log(this.addQuery)
////console.log(this.addQuery)
let tag = 0
defaultRequest4(this.deleteQuery).then(res =>{
console.log(res)
////console.log(res)
if(res.error==0){
tag = 1
// setTimeout(() =>{
defaultRequest4(this.addQuery).then(res =>{
if(res.error ==0){
this.getList()
this.getorder()
this.isCahnge = false
this.isChange = false
}
})
// },3000)
}
})
// if(tag ==1){
// defaultRequest(this.addQuery).then(res =>{
// if(res.error ==0){
// this.getList()
// }
// })
// }
}else{
// this.isChange = false
this.addCart()
}
},
//
addCart(){
//console.log(this.goods_attr_list)
//console.log(this.Is_attr)
let goods_attr_id=''
if(this.Is_attr>0){
this.goods_attr_list.map(item=>{
if(item.goods_attr_id!=''){
goods_attr_id+=item.goods_attr_id+','
}
})
let isall = 1
this.goods_attr_list.map(item =>{
////console.log(item.goods_attr_id)
if(item.goods_attr_id==''){
isall = 0
}
})
if(isall == 0){
uni.showToast({
title:'Please select the product specification',
icon:'none'
})
return
}
// this.cartQuery.goods_attr_id=goods_attr_id.substring(0,goods_attr_id.lastIndexOf(','));
}
//console.log(goods_attr_id)
this.addQuery.goods_attr_id=goods_attr_id.substring(0,goods_attr_id.lastIndexOf(','));
//console.log(this.addQuery)
if(this.isLogin == 1){
defaultRequest2(this.addQuery).then(res=>{
//console.log(res)
if(res.error==0){
this.addQuery.goods_attr_id = ''
if(res.data[0].success){
this.isChange = false
//
setTimeout( ()=>{
uni.showToast({
title:'Successfully added',
icon:'none'
})
},500)
}
this.getList()
this.getCartNum()
this.getCatList()
}
})
}
else if (this.isLogin == 0){
uni.navigateTo({
url:'../login/index'
})
}
},
//
clickImg(list,index) {
console.log(list)
////console.log(list)
let imglist = []
list.map( item =>{
@ -817,16 +1095,63 @@
},
},
onLoad() {
uni.startPullDownRefresh()
onLoad() {
this.isLogin = uni.getStorageSync('isLogin')
console.log(this.isLogin)
let user = uni.getStorageSync('user_info')
console.log(user)
let list = uni.getStorageSync('cartlist')
console.log(list)
// uni.startPullDownRefresh()
uni.hideTabBar()
this.getList()
this.getCatList(0)
this.getAddress()
this.getorder()
},
onShow() {
async onShow() {
this.isLogin = uni.getStorageSync('isLogin')
console.log(this.isLogin)
// uni.startPullDownRefresh()
let user = uni.getStorageSync('user_info')
console.log(user)
let list = uni.getStorageSync('cartlist')
console.log(this.inlist)
let tag = 0
// list.map(i =>{
// if(i.email == user.email){
// tag = 1
// this.inlist = i.cartlist
// }
// });
// if(this.goods_list.length == 0 &&tag ==1){
// let res = await Promise.all(this.inlist.map(async (item) => {
// //
// return await defaultRequest({
// _action:'addtocart',
// goods_id:item.goods_id,
// goods_parent_id:0,
// goods_number:item.goods_number,
// goods_attr_id:item.goods_attr_id,
// goods_is_package:0
// })
// }))
// console.log(res)
// if(res&&res[0].error == 0){
// uni.startPullDownRefresh()
// this.getList()
// }
// }
// this.tarbar[2].src = uni.getStorageSync('midButton')
this.getList()
this.getorder()
@ -841,9 +1166,9 @@
}, 2000);
},
onHide() {
uni.showTabBar()
},
// onHide() {
// //
// },
//
onReachBottom() {
if (!this.isReachBottom) return
@ -869,12 +1194,12 @@
}
.bootom_last1{
height: 200rpx;
height: 300rpx;
width: 100%;
color: #000;
// background-color: #fff;
font-size: 25rpx;
line-height: 200rpx;
line-height: 300rpx;
text-align: center;
}
.recommend_content{
@ -904,11 +1229,19 @@
font-size: 36rpx;
padding-left: 20rpx;
padding-top: 18rpx;
padding-right:20rpx;
display: flex;
justify-content: space-between;
image{
height: 36rpx;
width: 36rpx;
}
}
.recommend_content_item_image_name{
color:#cfcfcf;
padding: 8rpx 20rpx;
word-wrap: wrap;
@ -986,7 +1319,8 @@
display: flex;
align-items: center;
justify-content: space-between;
padding: 36.67rpx 32rpx;
padding: 20.67rpx 0 36rpx 32rpx;
padding-right: 32rpx;
font-size: 24rpx;
font-weight: 400;
// border-bottom: #737373 1rpx dashed;
@ -997,6 +1331,7 @@
.cart_title_content {
width: 510.67rpx;
margin-top: 18rpx;
text-align: left;
line-height: 50rpx;
@ -1005,6 +1340,7 @@
width: 620rpx;
line-height: 50rpx;
height: 50rpx;
margin-top: 20rpx;
text-align: left;
// background-color: #B22234;
float: left !important;
@ -1012,18 +1348,22 @@
}
.cart_title_right {
width: 100rpx;
text-align: left;
text-align: right;
font-size: 26rpx;
font-weight: bold;
}
}
.cart {
background-color: #fafafa;
background-color: #fff;
margin: 0 18rpx;
padding: 42rpx 12.67rpx;
margin-top: 16.67rpx;
padding-left: 18rpx;
padding-right: 24rpx;
padding-top: 5rpx;
padding-bottom: 40rpx;
margin-top: 10.67rpx;
.cart_title {
padding-left: 12.67rpx;
@ -1099,9 +1439,9 @@
line-height: 40rpx;
padding: 5.37rpx;
.image-v{
height: 20rpx;
width: 20rpx;
height: 15rpx;
width: 15rpx;
margin-left:6rpx ;
float: right;
margin-bottom: 20rpx;
image{
@ -1134,6 +1474,7 @@
.cart_select {
width: 34.67rpx;
height: 34.67rpx;
margin-right: 6rpx;
}
.info_name {
@ -1163,11 +1504,11 @@
padding-right: 19.33rpx;
background-color: white;
position: fixed;
bottom: 0;
bottom: 115rpx;
width: 100%;
box-sizing: border-box;
border-top: 2px solid #F6F5FA;
z-index: 100;
z-index: 120;
display: flex;
align-items: center;
justify-content: space-between;
@ -1235,6 +1576,7 @@
border-radius: 50%;
z-index: 99;
font-weight: 700;
// justify-content: space-between;
}
@ -1246,6 +1588,7 @@
position: fixed;
bottom: 0;
left: 0;
background-color: white;
padding-left: 29.33rpx;
padding-right: 29.33rpx;

20
pages/specialTitle/index.vue

@ -8,36 +8,34 @@
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="(item1,index1) in item.blocks " :key="item1.block_pic">
<view class="ONEPIC" v-if="item.zone_code=='ONEPIC' && item.zone_status=='NORMAL'" :style="{height:(item.zone_code=='ONEPIC')?item.zone_column+'rpx':'200rpx'}">
<view class="ONEPIC" v-if="item.zone_code=='ONEPIC' && item.zone_status=='NORMAL'" :style="{height:(item.zone_code=='ONEPIC')?item.zone_column+'rpx':''}">
<!-- class="discount page_padding" -->
<image :src="item1.block_pic" mode="" @click="imgTo(item1)" ></image>
</view>
<view class="TWOPIC" v-if="item.zone_code =='TWOPIC'">
<image :src="item1.block_pic"></image>
</view>
<!-- TWOPIC -->
<view class="TWOPIC" :style="{height:(item.zone_code=='TWOPIC')?item.zone_column+'rpx':'200rpx'}" v-if="item.zone_code=='TWOPIC' && item.zone_status=='NORMAL'">
<view class="TWOPIC" :style="{height:(item.zone_code=='TWOPIC'&& item.zone_status=='NORMAL')?item.zone_column+'rpx':''}" v-if="item.zone_code=='TWOPIC' && item.zone_status=='NORMAL'">
<image :src="item1.block_pic" @click="imgTo(item1)"mode="" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image>
</view>
<!-- THREEPIC -->
<view class="THREEPIC":style="{height:(item.zone_code=='THREEPIC')?item.zone_column+'rpx':'200rpx'}" v-if="item.zone_code=='THREEPIC' && item.zone_status=='NORMAL'">
<view class="THREEPIC":style="{height:(item.zone_code=='THREEPIC'&& item.zone_status=='NORMAL')?item.zone_column+'rpx':''}" v-if="item.zone_code=='THREEPIC' && item.zone_status=='NORMAL'">
<image :src="item1.block_pic" @click="imgTo(item1)" mode="" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image>
</view>
<!-- FOURPIC -->
<view class="FOURPIC":style="{height:(item.zone_code=='FOURPIC')?item.zone_column+'rpx':'200rpx'}" v-if="item.zone_code=='FOURPIC' && item.zone_status=='NORMAL'">
<view class="FOURPIC":style="{height:(item.zone_code=='FOURPIC'&& item.zone_status=='NORMAL')?item.zone_column+'rpx':''}" v-if="item.zone_code=='FOURPIC' && item.zone_status=='NORMAL'">
<image :src="item1.block_pic" mode="" @click="imgTo(item1)" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image>
</view>
<!-- FIVEPIC -->
<view class="FIVEPIC" :style="{height:(item.zone_code=='FIVEPIC')?item.zone_column+'rpx':'200rpx'}" v-if="item.zone_code=='FIVEPIC' && item.zone_status=='NORMAL'">
<view class="FIVEPIC" :style="{height:(item.zone_code=='FIVEPIC'&& item.zone_status=='NORMAL')?item.zone_column+'rpx':''}" v-if="item.zone_code=='FIVEPIC' && item.zone_status=='NORMAL'">
<image :src="item1.block_pic" mode="" @click="imgTo(item1)" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image>
</view>
<!-- SIXPIC -->
<view class="SIXPIC":style="{height:(item.zone_code=='SIXPIC')?item.zone_column+'rpx':'200rpx'}" v-if="item.zone_code=='SIXPIC' && item.zone_status=='NORMAL'">
<view class="SIXPIC":style="{height:(item.zone_code=='SIXPIC'&& item.zone_status=='NORMAL')?item.zone_column+'rpx':''}" v-if="item.zone_code=='SIXPIC' && item.zone_status=='NORMAL'">
<image :src="item1.block_pic" mode="" @click="imgTo(item1)" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image>
</view>
</view>
</view>
</view>
<!-- </view> -->
</template>
<script>
import {defaultRequest,defaultRequest4} from '../../api/index.js'
@ -69,7 +67,7 @@
this.list= res.data.zones
console.log(this.list)
this.list.map( item =>{
console.log(item,'item')
console.log(item,item.zone_code,item.blocks.length)
})
}
})
@ -160,7 +158,7 @@
}
.FOURPIC{
width: 100%;
width: 100%;
display: flex;
justify-content: space-between;
image{

8
pages/specialTitle/index2.vue

@ -4,15 +4,13 @@
<image src="../../static/img/left_white.png" mode="" @click="back()"></image>
<view class="one_text">{{ title }}</view>
</view>
<!-- <uni-nav-bar left-icon="left" @clickLeft="back()" backgroundColor="#000" color="#fff" :title="title" :fixed="true" />
<view v-for="(item,index) in list " :key="item.zone_id"> -->
<!-- <uni-nav-bar left-icon="left" @clickLeft="back()" backgroundColor="#000" color="#fff" :title="title" :fixed="true" /> -->
<view v-for="(item,index) in list " :key="item.zone_id" style="padding-top: 150rpx;">
<view v-for="(item1,index1) in item.blocks " :key="item1.block_pic">
<view class="ONEPIC" v-if="item.zone_code=='ONEPIC' && item.zone_status=='NORMAL'" :style="{height:(item.zone_code=='ONEPIC')?item.zone_column+'rpx':'200rpx'}">
<!-- class="discount page_padding" -->
<image :src="item1.block_pic" mode="" @click="imgTo(item1)" ></image>
</view>
<view class="TWOPIC" v-if="item.zone_code =='TWOPIC'">
<image :src="item1.block_pic"></image>
</view>
<!-- TWOPIC -->
<view class="TWOPIC" :style="{height:(item.zone_code=='TWOPIC')?item.zone_column+'rpx':'200rpx'}" v-if="item.zone_code=='TWOPIC' && item.zone_status=='NORMAL'">
@ -36,7 +34,7 @@
</view>
</view>
</view>
</view>
</template>
<script>
import {defaultRequest,defaultRequest4} from '../../api/index.js'

BIN
static/img/min.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

97
tarbar/index.vue

@ -0,0 +1,97 @@
<template>
<view class="tarbar">
<view @click="change(index)" v-for="(item,index) in tarbar" :key="item.name" :class="index==2?'img_m':'tarbar_img'">
<image :src="item.src"></image>
<view>{{ item.name}}</view>
</view>
<!-- <view class="tarbar_img"@click="change(1)"><image src="../../static/img/Category.png"></image><view>Category</view></view>
<view class="img_m" @click="change(2)"><image src="../../static/img/add.png"></image></view>
<view class="tarbar_img"@click="change(3)"><image src="../../static/img/Cart.png"></image><view>Cart</view></view>
<view class="tarbar_img"@click="change(4)"><image src="../../static/img/Account.png"></image><view>Account</view></view> -->
</view>
</template>
<script>
export default {
name:'tarbar',
data(){
return{
list:[
{src:'../../static/icon/home4.png'},
{src:'../../static/img/Category1.png'},
{src:''},
{src:'../../static/img/cart1.png'},
{src:'../../static/img/Account1.png'}
],
tarbar:[
{
src:'../../static/icon/home3.png',
name:'Home'
},
{
src:'../../static/img/Category.png',
name:'Category'
},
{
src:'../../static/icon/home3.png',
name:''
},
{
src:'../../static/img/Cart.png',
name:'Cart'
},
{
src:'../../static/img/Account.png',
name:'Account'
},
],
}
},
methods:{
change(e){
this.index = e
let tarbar = this.tarbar
for(let i =0; i<this.tarbar.length;i++){
if(e==i){
this.tarbar[e].src = this.list[e].src
}else{
this.tarbar = tarbar
this.tarbar[i].src = tarbar[i].src
}
}
// uni.switchTab({
// url:this.list[e].url
// })
},
}
}
</script>
<style>
.tarbar{
height: 100rpx;
width: 100vw;
padding-top: 10rpx;
padding-bottom: 10rpx;
background-color: #fff;
bottom: 0;
font-size: 24rpx;
text-align: center;
position: fixed;
display: flex;
color:#707070;
justify-content: space-around;
.tarbar_img image{
height: 50rpx;
width: 50rpx;
// background-color: #fff;
}
.img_m image{
height: 80rpx;
width: 80rpx;
margin-top: -20rpx;
}
}
</style>

149
tarbar/tarbar.vue

@ -0,0 +1,149 @@
<template>
<view class="tarbar">
<view
class=".tarbar-list"
:style="{
background: tabBar.backgroundColor,
color: tabBar.color,
'border-top': tabBar.position == 'bottom' ? '1rpx solid ' + tabBar.borderStyle : 0,
'border-bottom': tabBar.position == 'top' ? '1rpx solid ' + tabBar.borderStyle : 0
}"
>
<view class="tarbar-list-ul">
<view class="tarbar-list-li" :class="index == 2 ? 'tarbar-list-li-center' : ''" v-for="(item, index) in tabBar.list" :key="index" @click.top="setSelected(index)">
<block v-if="index != 2">
<view class="tarbar-list-li-icon"><image :src="selected == index ? item.selectedIconPath : item.iconPath" mode=""></image></view>
<view class="tarbar-list-li-name">{{ item.text }}</view>
</block>
<block v-else>
<view class="tarbar-list-li-icon"><image :src="item.selectedIconPath" mode=""></image></view>
</block>
</view>
</view>
</view>
<block v-if="isShowMask"><release-popup @close-mask="closeMask"></release-popup></block>
</view>
</template>
<script>
import releasePopup from './release-popup.vue';
export default {
components: {
'release-popup': releasePopup
},
props: ['selected'],
data() {
return {
tabBar: {
color: '#ccc',
selectedColor: '#E84351',
borderStyle: '#ccc',
backgroundColor: '#fff',
position: 'bottom',
list: [
{
pagePath: '/pages/index/index',
iconPath: '/static/tarbar/home1.png',
selectedIconPath: '/static/tarbar/home2.png',
text: '首页'
},
{
pagePath: '/pages/foodie/foodie',
iconPath: '/static/tarbar/foodie1.png',
selectedIconPath: '/static/tarbar/foodie2.png',
text: '吃什么'
},
{
pagePath: '',
iconPath: '',
selectedIconPath: '/static/tarbar/release.png'
},
{
pagePath: '/pages/discover/discover',
iconPath: '/static/tarbar/discover1.png',
selectedIconPath: '/static/tarbar/discover2.png',
text: '发现'
},
{
pagePath: '/pages/personal/personal',
iconPath: '/static/tarbar/personal1.png',
selectedIconPath: '/static/tarbar/personal2.png',
text: '我的'
}
]
},
oldSelected: 0, // 访; 2
isShowMask: false
};
},
onLoad() {},
methods: {
setSelected(index) {
console.log(index);
if (index != 2) {
uni.switchTab({
url: this.tabBar.list[index].pagePath
});
} else {
this.isShowMask = true;
}
this.$forceUpdate();
},
closeMask() {
this.isShowMask = false;
}
}
};
</script>
<style>
.tarbar {
width: 100%;
z-index: 9999;
position: fixed;
}
.tarbar-list {
width: 100%;
height: 120upx;
background: #4d586f;
position: fixed;
left: 0;
bottom: 0;
}
.tarbar-list-ul {
width: 100%;
height: 100%;
padding: 20upx 50upx;
display: flex;
justify-content: space-between;
box-sizing: border-box;
}
.tarbar-list-li {
width: 80upx;
height: 80upx;
}
.tarbar-list-li-icon {
width: 50upx;
height: 50upx;
margin: 0 auto;
}
.tarbar-list-li-icon image {
width: 50upx;
height: 50upx;
}
.tarbar-list-li-name {
width: 100%;
text-align: center;
line-height: 30upx;
font-size: 20upx;
height: 30upx;
}
.tarbar-list-li-center {
width: 100upx;
}
.tarbar-list-li-center .tarbar-list-li-icon,
.tarbar-list-li-center .tarbar-list-li-icon image {
width: 90upx;
height: 60upx;
}
</style>

7
uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue

@ -240,6 +240,9 @@
/* #endif */
padding: 0 10px;
flex-direction: row;
padding-top: 10rpx;
// padding-bottom: 20rpx;
height: $nav-height;
font-size: 12px;
}
@ -264,8 +267,8 @@
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
width: 120rpx;
justify-content: flex-start;
width: 40rpx !important;
// justify-content: flex-start;
align-items: center;
}

Loading…
Cancel
Save