Browse Source

修复01

master
“linchaomei” 3 years ago
parent
commit
b2ef575308
  1. 26
      App.vue
  2. 13
      api/index.js
  3. 14
      api/request.js
  4. 85
      common/common.scss
  5. 2
      common/scss/order.scss
  6. 3
      config.js
  7. 196
      js_sdk/mmmm-image-tools/index.js
  8. 11
      js_sdk/mmmm-image-tools/package.json
  9. 21
      manifest.json
  10. 82
      pages.json
  11. 14
      pages/account/addAddress.vue
  12. 2
      pages/account/address.vue
  13. 387
      pages/account/demo1.vue
  14. 7
      pages/account/favorites.vue
  15. 18
      pages/account/index.vue
  16. 6
      pages/account/message.vue
  17. 22
      pages/account/myCoupons.vue
  18. 2
      pages/account/myOrders.vue
  19. 26
      pages/account/pointsDetails.vue
  20. 8
      pages/account/wishlist.vue
  21. 4
      pages/category/index.vue
  22. 183
      pages/category/productList.vue
  23. 192
      pages/index/first.vue
  24. 79
      pages/index/flashSale.vue
  25. 543
      pages/index/index.vue
  26. 14
      pages/index/index2.vue
  27. 51
      pages/index/pickUpCentre.vue
  28. 5
      pages/index/search.vue
  29. 19
      pages/login/index.vue
  30. 5
      pages/order/confirmation.vue
  31. 2
      pages/order/details.vue
  32. 24
      pages/order/logisticsDetails.vue
  33. 37
      pages/productDetails/goodsReview.vue
  34. 244
      pages/productDetails/index.vue
  35. 96
      pages/productDetails/review.vue
  36. 97
      pages/shippingCart/index.vue
  37. 9
      pages/specialTitle/index.vue
  38. BIN
      static/icon/cat_white.png
  39. BIN
      static/icon/like_red.png
  40. BIN
      static/icon/right_white.png
  41. BIN
      static/icon/share_white.png
  42. BIN
      static/img/bottom1_white.png
  43. BIN
      static/img/delete_white.png
  44. BIN
      static/img/pets_nav_white.png
  45. BIN
      static/img/ptes_nav1_white.png
  46. BIN
      static/img/top_white.png

26
App.vue

@ -8,14 +8,9 @@
},
onLaunch: function() {
// console.log('App Launch')
uni.onTabBarMidButtonTap(()=>{
uni.showTabBar()
uni.navigateTo({
url:'/pages/index/index2'
})
})
setTimeout(() => {
plus.navigator.closeSplashscreen();
}, 5000);
},
onShow: function() {
console.log('App Show')
@ -23,20 +18,7 @@
onHide: function() {
// console.log('App Hide')
},
methods:{
onBack() {
this.backButtonPress++;
if (this.backButtonPress > 1) {
plus.runtime.quit();
} else {
plus.nativeUI.toast('Click again to exit');
}
setTimeout(function() {
this.backButtonPress = 0;
}, 1000);
return true;
},
}
}
</script>

13
api/index.js

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

14
api/request.js

@ -5,9 +5,9 @@ import cryptoJS from "crypto-js"
const httpRequest = (params) => {
if(params.isLoad){
uni.showLoading({
// title: "努力加载中..."
});
// uni.showLoading({
// title: "Loading..."
// });
}
const json_data={
@ -63,9 +63,13 @@ const httpRequest = (params) => {
// console.info(res)
uni.hideLoading();
// 进行解密
res.data=JSON.parse(decryptDes(res.data,'6780f04cf2e211ec86a8005056c00008'))
// let list = res.data
// res.data=JSON.parse(decryptDes(res.data,"6780f04cf2e211ec86a8005056c00008"))
res.data=JSON.parse(decryptDes(res.data,"6780f04cf2e211ec86a8005056c00008"))
// res.data=Base64.decode(decryptDes(res.data,'6780f04cf2e211ec86a8005056c00008'));
// console.info(res.data)
// console.info(list)
// res.data = list
if(res.data.error!=0 && params.errMsg){
// uni.showToast({
// // title: res.data.message,

85
common/common.scss

@ -1,9 +1,13 @@
.status_bar {
height: var(--status-bar-height);
// height: var(--status-bar-height);
width: 100%;
height: 50rpx;
// background-color: #000000;
}
.uni-bg-black{
background-color: #000000;
}
//地址信息
.address{
padding-top: 33.33rpx;
@ -60,24 +64,65 @@
// 评价
.reviews_item{
padding: 34rpx 0;
border-bottom: 1px solid #E2E2E2;
border-bottom: 0.1rpx solid #3b3b3b;
opacity: 0.7;
&:last-child{
border-bottom: none;
}
.reviews_item_title{
display: flex;
align-items: center;
justify-content: space-between;
// align-items: center;
// justify-content: space-around;
.reviews_item_img{
height: 100rpx;
width: 100rpx;
// border-radius: 50%;
// margin-right: 2rpx;
image{
height: 100%;
width: 100%;
border-radius: 50%;
}
}
.reviews_title_one{
height: 100rpx;
width: 66vw;
}
.reviews_title_color{
font-size: 28rpx;
color:#fff;
height: 50rpx;
line-height: 50rpx;
padding-left: 15.37rpx;
}
.reviews_title_user{
font-size: 32rpx;
display: flex;
align-items: center;
color: #3D3D3D;
height:50rpx;
width: 50vw;
// margin-left: 10rpx;
line-height: 50rpx;
text-align: center;
display: flex;
overflow: hidden;
align-items: start;
// color: #ccc;
// background-color: #4F92F1;
padding:0;
text{
display: inline-block;
margin-right: 2rpx;
text-align: center;
overflow: hidden;
}
.reviews_title_user_name{
max-width: 300rpx;
overflow: hidden;
margin-left: 13.37rpx;
margin-right: 13.37rpx;
}
}
@ -85,6 +130,9 @@
font-size: 24rpx;
font-weight: 400;
color: #909090;
margin-top: 8rpx;
margin-left: 50rpx;
}
}
.reviews_item_color{
@ -107,7 +155,12 @@
width: 233.33rpx;
height: 233.33rpx;
margin-left: 16.67rpx;
background-color: #999999;
// background-color: #999999;
background-size: 100% !important;
image{
height: 100%;
width: 100%;
}
&:first-child{
margin-left: 0;
}
@ -125,6 +178,7 @@
.order_popup_title{
position: relative;
color:#000;
font-size: 32rpx;
font-weight: bold;
border-bottom: 1px solid #E2E2E2;
@ -366,13 +420,18 @@
.recommend_content_item{
width: 340rpx;
margin-bottom: 46.67rpx;
margin-bottom: 16.67rpx;
.recommend_content_name{
height: 80rpx;
line-height: 40rpx;
overflow: hidden;
font-size: 25rpx;
}
.recommend_content_item_image{
width: 100%;
height:340rpx ;
background-color: #999999;
margin-bottom: 37.33rpx;
margin-bottom: 11.33rpx;
.recommend_content_item_image_name{
overflow: hidden;
@ -387,7 +446,7 @@
.recommend_content_item_pric{
font-size: 32rpx;
font-weight: bold;
margin-top: 34rpx;
margin-top: 6rpx;
}
}
}

2
common/scss/order.scss

@ -13,7 +13,7 @@
color: white;
font-size: 18.67rpx;
font-weight: bold;
border-top: 14.67rpx #F6F5FA solid;
// border-top: 14.67rpx #F6F5FA solid;
.shipped_right_text{
width: 497.33rpx;

3
config.js

@ -1,4 +1,5 @@
var weburl='en.meixx.com';
// var weburl='en.meixx.com';
var weburl = 'lilbeattranapismits.dopeplus.com';
export default {
apiUri: 'https://'+weburl+'/',
imgUri: 'http://'+weburl+'/',

196
js_sdk/mmmm-image-tools/index.js

@ -0,0 +1,196 @@
function getLocalFilePath(path) {
if (path.indexOf('_www') === 0 || path.indexOf('_doc') === 0 || path.indexOf('_documents') === 0 || path.indexOf('_downloads') === 0) {
return path
}
if (path.indexOf('file://') === 0) {
return path
}
if (path.indexOf('/storage/emulated/0/') === 0) {
return path
}
if (path.indexOf('/') === 0) {
var localFilePath = plus.io.convertAbsoluteFileSystem(path)
if (localFilePath !== path) {
return localFilePath
} else {
path = path.substr(1)
}
}
return '_www/' + path
}
function dataUrlToBase64(str) {
var array = str.split(',')
return array[array.length - 1]
}
var index = 0
function getNewFileId() {
return Date.now() + String(index++)
}
function biggerThan(v1, v2) {
var v1Array = v1.split('.')
var v2Array = v2.split('.')
var update = false
for (var index = 0; index < v2Array.length; index++) {
var diff = v1Array[index] - v2Array[index]
if (diff !== 0) {
update = diff > 0
break
}
}
return update
}
export function pathToBase64(path) {
return new Promise(function(resolve, reject) {
if (typeof window === 'object' && 'document' in window) {
if (typeof FileReader === 'function') {
var xhr = new XMLHttpRequest()
xhr.open('GET', path, true)
xhr.responseType = 'blob'
xhr.onload = function() {
if (this.status === 200) {
let fileReader = new FileReader()
fileReader.onload = function(e) {
resolve(e.target.result)
}
fileReader.onerror = reject
fileReader.readAsDataURL(this.response)
}
}
xhr.onerror = reject
xhr.send()
return
}
var canvas = document.createElement('canvas')
var c2x = canvas.getContext('2d')
var img = new Image
img.onload = function() {
canvas.width = img.width
canvas.height = img.height
c2x.drawImage(img, 0, 0)
resolve(canvas.toDataURL())
canvas.height = canvas.width = 0
}
img.onerror = reject
img.src = path
return
}
if (typeof plus === 'object') {
plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), function(entry) {
entry.file(function(file) {
var fileReader = new plus.io.FileReader()
fileReader.onload = function(data) {
resolve(data.target.result)
}
fileReader.onerror = function(error) {
reject(error)
}
fileReader.readAsDataURL(file)
}, function(error) {
reject(error)
})
}, function(error) {
reject(error)
})
return
}
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
wx.getFileSystemManager().readFile({
filePath: path,
encoding: 'base64',
success: function(res) {
resolve('data:image/png;base64,' + res.data)
},
fail: function(error) {
reject(error)
}
})
return
}
reject(new Error('not support'))
})
}
export function base64ToPath(base64) {
return new Promise(function(resolve, reject) {
if (typeof window === 'object' && 'document' in window) {
base64 = base64.split(',')
var type = base64[0].match(/:(.*?);/)[1]
var str = atob(base64[1])
var n = str.length
var array = new Uint8Array(n)
while (n--) {
array[n] = str.charCodeAt(n)
}
return resolve((window.URL || window.webkitURL).createObjectURL(new Blob([array], { type: type })))
}
var extName = base64.split(',')[0].match(/data\:\S+\/(\S+);/)
if (extName) {
extName = extName[1]
} else {
reject(new Error('base64 error'))
}
var fileName = getNewFileId() + '.' + extName
if (typeof plus === 'object') {
var basePath = '_doc'
var dirPath = 'uniapp_temp'
var filePath = basePath + '/' + dirPath + '/' + fileName
if (!biggerThan(plus.os.name === 'Android' ? '1.9.9.80627' : '1.9.9.80472', plus.runtime.innerVersion)) {
plus.io.resolveLocalFileSystemURL(basePath, function(entry) {
entry.getDirectory(dirPath, {
create: true,
exclusive: false,
}, function(entry) {
entry.getFile(fileName, {
create: true,
exclusive: false,
}, function(entry) {
entry.createWriter(function(writer) {
writer.onwrite = function() {
resolve(filePath)
}
writer.onerror = reject
writer.seek(0)
writer.writeAsBinary(dataUrlToBase64(base64))
}, reject)
}, reject)
}, reject)
}, reject)
return
}
var bitmap = new plus.nativeObj.Bitmap(fileName)
bitmap.loadBase64Data(base64, function() {
bitmap.save(filePath, {}, function() {
bitmap.clear()
resolve(filePath)
}, function(error) {
bitmap.clear()
reject(error)
})
}, function(error) {
bitmap.clear()
reject(error)
})
return
}
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
var filePath = wx.env.USER_DATA_PATH + '/' + fileName
wx.getFileSystemManager().writeFile({
filePath: filePath,
data: dataUrlToBase64(base64),
encoding: 'base64',
success: function() {
resolve(filePath)
},
fail: function(error) {
reject(error)
}
})
return
}
reject(new Error('not support'))
})
}

11
js_sdk/mmmm-image-tools/package.json

@ -0,0 +1,11 @@
{
"id": "mmmm-image-tools",
"name": "image-tools",
"version": "1.4.0",
"description": "图像转换工具,可用于图像和base64的转换",
"keywords": [
"base64",
"保存",
"图像"
]
}

21
manifest.json

@ -1,5 +1,5 @@
{
"name" : "DOPE PLUS",
"name" : "Dope Plus",
"appid" : "__UNI__A6CF3EA",
"description" : "",
"versionName" : "1.0.0",
@ -11,11 +11,22 @@
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"alwaysShowBeforeRender" : false,
"waiting" : false,
"autoclose" : true,
"delay" : 0
},
// "splashscreen" : {
// "alwaysShowBeforeRender" : false,
// "autoclose" : false,
// "waiting" : false,
// "delay" : 0
// },
"safearea" : {
"bottom" : {
"offset" : "none"
}
},
/* */
"modules" : {
"Payment" : {},
@ -67,6 +78,10 @@
},
"splashscreen" : {
"androidStyle" : "default",
"alwaysShowBeforeRender" : false,
"autoclose" : false,
"waiting" : false,
"delay" : 0,
"android" : {
"hdpi" : "unpackage/res/icons/dope2.png",
"xhdpi" : "unpackage/res/icons/dope2.png",

82
pages.json

@ -1,5 +1,19 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/first",
"style": {
"navigationStyle":"custom",
"app-plus": {
"safearea":{
"background" : "none",
"bottom":{
"offset":"none"
}
}
}
}
},
{
"path": "pages/index/index",
"style": {
@ -74,14 +88,14 @@
"path": "pages/account/myProfile",
"style": {
"navigationBarTitleText": "My Profile",
"navigationBarBackgroundColor":"#FFFFFF"
"navigationBarBackgroundColor":"#000000"
}
},
{
"path": "pages/account/settings",
"style": {
"navigationBarTitleText": "Settings",
"navigationBarBackgroundColor":"#FFFFFF"
"navigationBarBackgroundColor":"#000000"
}
},
{
@ -102,48 +116,55 @@
{
"path": "pages/account/favorites",
"style": {
"titleNView":false
"titleNView":false,
"navigationBarBackgroundColor":"#000000"
}
},
{
"path": "pages/account/message",
"style": {
"titleNView":false
"titleNView":false,
"navigationBarBackgroundColor":"#000000"
}
},
{
"path": "pages/account/new",
"style": {
"navigationBarTitleText": "nothing",
"navigationBarBackgroundColor":"#FFFFFF"
"navigationBarBackgroundColor":"#000000"
}
},
{
"path": "pages/login/index",
"style": {
"navigationBarTitleText": " ",
"navigationBarBackgroundColor":"#FFFFFF"
"navigationStyle":"custom",
"enablePullDownRefresh": false
// "navigationBarTitleText": " ",
// "navigationBarBackgroundColor":"#000000"
}
},
{
"path": "pages/login/verifyEmail",
"style": {
"navigationBarTitleText": "Verify Email Address",
"navigationBarBackgroundColor":"#FFFFFF"
"navigationBarBackgroundColor":"#000000"
}
},
{
"path": "pages/login/changePwd",
"style": {
"navigationBarTitleText": "Change Password",
"navigationBarBackgroundColor":"#FFFFFF"
"navigationBarBackgroundColor":"#000000"
}
},
{
"path": "pages/account/myOrders",
"style": {
"navigationBarTitleText": "My orders",
"navigationBarBackgroundColor":"#FFFFFF"
"navigationBarBackgroundColor":"#000000",
"navigationBarTextStyle": "white"
}
},
{
@ -158,14 +179,14 @@
"path": "pages/order/confirmation",
"style": {
"navigationBarTitleText": "Order Confirmation",
"navigationBarBackgroundColor":"#FFFFFF"
"navigationBarBackgroundColor":"#000000"
}
},
{
"path": "pages/order/paypalWebview",
"style": {
"navigationBarTitleText": " ",
"navigationBarBackgroundColor":"#FFFFFF"
"navigationBarBackgroundColor":"#000000"
}
},
{
@ -190,7 +211,7 @@
"path": "pages/order/paySuccess",
"style": {
"navigationBarTitleText": "Pay success",
"navigationBarBackgroundColor":"#FFFFFF",
"navigationBarBackgroundColor":"#000000",
"enablePullDownRefresh":true
}
},
@ -198,14 +219,14 @@
"path": "pages/account/address",
"style": {
"navigationBarTitleText": "Shipping Address",
"navigationBarBackgroundColor":"#FFFFFF"
"navigationBarBackgroundColor":"#000000"
}
},
{
"path": "pages/account/addAddress",
"style": {
"navigationBarTitleText": "Shipping Address",
"navigationBarBackgroundColor":"#FFFFFF"
"navigationBarBackgroundColor":"#000000"
}
},
{
@ -219,7 +240,7 @@
"path": "pages/order/details",
"style": {
"navigationBarTitleText": "Order details",
"navigationBarBackgroundColor":"#FFFFFF"
"navigationBarBackgroundColor":"#000000"
// "app-plus": {
// "titleNView": {
// "splitLine":{
@ -234,21 +255,21 @@
"path": "pages/order/logisticsDetails",
"style": {
"navigationBarTitleText": "Logistics details",
"navigationBarBackgroundColor":"#FFFFFF"
"navigationBarBackgroundColor":"#000000"
}
},
{
"path": "pages/order/refund",
"style": {
"navigationBarTitleText": "Refund",
"navigationBarBackgroundColor":"#FFFFFF"
"navigationBarBackgroundColor":"#000000"
}
},
{
"path": "pages/order/refundDetails",
"style": {
"navigationBarTitleText": "Refund Details",
"navigationBarBackgroundColor":"#FFFFFF"
"navigationBarBackgroundColor":"#000000"
}
},
{
@ -256,7 +277,8 @@
"style": {
"titleNView":false,
"enablePullDownRefresh":true,
"navigationBarTextStyle":"white"
// "navigationBarTextStyle":"white",
"navigationBarBackgroundColor": "#000000"
}
@ -280,22 +302,24 @@
{
"path": "pages/productDetails/goodsReview",
"style": {
"navigationBarTitleText":"Review",
"navigationBarBackgroundColor":"#FFFFFF"
"navigationBarTitleText":"Review"
}
},
{
"path": "pages/account/myReview",
"style": {
"navigationBarTitleText": "My Review",
"navigationBarBackgroundColor":"#FFFFFF"
"navigationBarBackgroundColor":"#000000",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/account/demo1",
"style": {
"navigationBarTitleText": "My demo",
"navigationBarBackgroundColor":"#FFFFFF"
"navigationBarBackgroundColor":"#000000"
}
},
{
@ -307,7 +331,9 @@
{
"path": "pages/index/flashSale",
"style": {
"titleNView":false
"titleNView":false,
"navigationBarBackgroundColor":"#000000",
"navigationBarTextStyle": "white"
}
}
,{
@ -321,8 +347,8 @@
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#000000",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "DOPE PLUS"
},
@ -357,7 +383,7 @@
"pagePath": "pages/shippingCart/index",
"iconPath": "static/img/Cart.png",
"selectedIconPath": "static/img/cart1.png",
"navigationBarTextStyle": "black",
"navigationBarTextStyle": "#000000",
"text": "Cart"
},
{

14
pages/account/addAddress.vue

@ -214,6 +214,10 @@
})
return
}
else{
this.query.consignee.city_name = this.city
this.query.consignee.city = " 0 "
}
this.query.consignee.address=this.cityText+this.address
}else{
if(this.query.consignee.city==0){
@ -221,6 +225,7 @@
icon:'none',
title:'Please Select City/Town'
})
return
}
}
@ -250,6 +255,7 @@
})
return
}
this.query.consignee.address = this.address
console.info(this.query)
defaultRequest3(this.query,'consignee').then(res=>{
@ -279,8 +285,8 @@
defaultRequest2(data).then(res=>{
let list =[]
let listAll = []
console.info(res)
// console.log(this.countryText)
// console.info(res)
// // console.log(this.countryText)
if(res.error==0){
this.countryList=res.data
if(this.countryText){
@ -373,6 +379,8 @@
}
else{
this.isSelect1 = false
// this.query.consignee.city = 1
// this.query.consignee.city_name = this.city
}
}
})
@ -409,7 +417,7 @@
if(e.type==1){
e.data=JSON.parse(e.data)
// console.info(e.data)
console.info(e.data)
this.query.consignee=e.data
this.address = this.query.consignee.address
if(e.data.default_address_id==e.data.address_id){

2
pages/account/address.vue

@ -92,7 +92,7 @@
getList(){
let data={_action:'getconsignees'}
defaultRequest2(data).then(res=>{
// console.info(res)
console.info(res)
if(res.error==0){
this.list=res.data
}

387
pages/account/demo1.vue

@ -9,4 +9,391 @@
</script>
<style>
</style><template>
<view>
<uni-nav-bar :statusBar="true" left-icon="left" title="Review" color="#000000" :fixed="true" @clickLeft="back">
<block slot="right">
<view class="nav_right">
<button @click="reviewSub">Submit</button>
</view>
</block>
</uni-nav-bar>
<view class="body" >
<view class="order_popup_commodity">
<view class="good_info" >
<view class="good_info_left ">
<view class="good_info_image">
<image ></image>
</view>
<view class="left_info">
<view class="info_name">9</view>
<view class="left_info_bottom">
<view class="info_lable">
<text>{{}}</text>
<!-- <image src="/static/img/bottom.png" mode=""></image> -->
</view>
</view>
</view>
</view>
</view>
</view>
<view class="review">
<view class="review_title">
<text>Score</text>
<uni-rate size="22" disabledColor="#B22234" v-model="query.comment_rank" active-color="#B22234" :is-fill="false" class="rate" v-if="reviewType==0"/>
<uni-rate size="22" disabledColor="#B22234" v-model="query1.comments[index].comment_rank" active-color="#B22234" :is-fill="false" class="rate" v-else/>
</view>
<view class="review_content">
<image src="../../static/img/write.png" mode=""></image>
<textarea placeholder="Write reviews" v-if="reviewType==0" v-model="query.comment"></textarea>
<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">
<image src="/static/img/vedio.png" class="upload_item_camera1" mode=""v-if="!VideoSrc"></image>
<image :src="VideoSrc" class="upload_item_camera" mode="" v-else></image>
<view>Upload the video</view>
</view>
<view class="reason_upload_item" @click="upload()">
<!-- <image src="/static/img/camera.png" class="upload_item_camera" mode="" v-if="!imgSrc"></image>
<image :src="imgSrc" class="upload_item_camera" mode="" v-else></image>
<view>Upload pictures</view> -->
<text ref="input" class="upFile" @click="upload()"></text>
</view>
<view class="reason_upload_item reason_upload_item1">
<!-- <image :src="" class="upload_item_image" mode=""></image> -->
</view>
</view>
<view class="reason_upload_tips">Upload JPG, PNG format, within 3M</view>
</view>
</view>
</view>
</template>
<script module="test" lang="renderjs" >
export default {
mounted() {
// ...
},
methods: {
upload(){
console.log(1111)
var input = document.createElement('input');
input.type = 'file';
input.accept='image/*';
this.$refs.input.$el.appendChild(input);
input.onchange = (event) => {
this.fileName = event.path[0].files[0].name;
}
$('input').click();
},
}
}
</script>
<script >
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"
import { pathToBase64 } from '@/js_sdk/mmmm-image-tools/index.js'
export default {
data() {
return {
orderDate:{},
// 0 1
reviewType:0,
query:{
_action:'commentordergoods',
order_id:'',
order_sn:'',
rec_id:'',
goods_id:'',
comment:'',
comment_rank:'',
commentlabels:''
},
query1:{
_action:'commentorder',
order_id:'',
order_sn:'',
comments:[]
},
VideoSrc:'',
imgSrc:''
}
},
methods:{
//
reviewSub(){
let data
if(this.reviewType==0){
this.commentordergoods()
}else{
// data=this.query1
this.commentordergoods1()
}
console.info(data)
},
//
commentordergoods(){
defaultRequest2(this.query).then(res=>{
console.info(res)
if(res.error==0){
uni.showToast({
icon:'none',
title:'Comment successful!'
})
setTimeout(function(){
uni.navigateBack()
},2000)
}
})
},
//
commentordergoods1(){
defaultRequest2(this.query1,'comments').then(res=>{
console.info(res)
if(res.error==0){
uni.showToast({
icon:'none',
title:'Comment successful!'
})
setTimeout(function(){
uni.navigateBack()
},2000)
}
})
},
back(){
uni.navigateBack()
},
//
UploadVideo(){
var that = this
uni.chooseVideo({
sourceType: ['camera', 'album'],
success: function (res) {
console.log(res)
that.VideoSrc = res.tempFilePath;
}
})
},
//
Upimg(){
let url
uni.chooseImage({
count: 3, //9
sizeType: ['original', 'compressed'], //
sourceType: ['album'], //
success: function (res) {
console.info(res)
console.log(JSON.stringify(res.tempFilePaths));
const tempFilePaths = res.tempFiles[0]
console.log(res)
let data ={
_action:'uploadcommentfile',
atype: 1,
afile:res.tempFiles
}
console.log(data)
defaultRequest(data).then(res =>{
console.log(res)
})
console.log(data)
defaultRequest(data).then(res =>{
console.log(res)
})
// uni.uploadFile({
// url:'https://v2.alapi.cn/api/image',
// filePath: res.tempFilePaths[0],
// name:'file',
// success: (uploadFileRes) => {
// var that = this
// // uploadFileRes.data = decryptDes(uploadFileRes.data,"6780f04cf2e211ec86a8005056c00008")
// console.log(uploadFileRes)
// }
// })
uni.getImageInfo({
src: res.tempFilePaths[0],
success: (path) => {
pathToBase64(path.path).then(base64 => {
console.log(base64); // base64
url = base64
})
.catch(error => {
console.error(error)
})
}
})
// uni.request({
// url:'https://v2.alapi.cn/api/image',
// method:'POST',
// data:{
// image:url
// },
// success(res) {
// console.log(res)
// }
// })
}
});
}
},
onLoad(e) {
let datas=JSON.parse(e.data)
this.orderDate=datas
if(datas.order_goods.length>1){
this.reviewType=1
this.query1.order_id=datas.order_id
this.query1.order_sn=datas.order_sn
datas.order_goods.map(item=>{
let data={
rec_id:item.rec_id,
goods_id:item.goods_id,
comment:'',
comment_rank:'',
commentlabels:item.goods_attr.replace(/\s\n/g,' ')
}
this.query1.comments.push(data)
})
}else{
this.query.order_id=datas.order_id
this.query.order_sn=datas.order_sn
this.query.rec_id=datas.order_goods[0].rec_id
this.query.goods_id=datas.order_goods[0].goods_id
this.commentlabels=datas.order_goods[0].goods_attr.replace(/\s\n/g,' ')
}
},
filters:{
goodsAttr(e){
return e.replace(/\s\n/g,';');
}
}
}
</script>
<style lang="scss" scoped>
.review{
padding: 0 26rpx;
padding-top: 35.33rpx;
.review_title{
display: flex;
align-items: center;
font-weight: bold;
font-size: 32rpx;
margin-bottom: 44rpx;
.rate{
margin-left: 24.67rpx;
}
}
.review_content{
display: flex;
image{
width: 29.33rpx;
height: 29.33rpx;
}
textarea{
font-size: 28rpx;
font-weight: 400;
width: 100%;
height: 113.33rpx;
margin-left: 4rpx;
}
}
.reason_upload{
display: flex;
flex-wrap: wrap;
margin-bottom: 34.67rpx;
.reason_upload_item{
border: 1px dashed #D2D2D2;
border-radius: 15rpx;
width: 156rpx;
height: 156rpx;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
font-size: 12rpx;
color: #BFBCBC;
margin-right: 23.33rpx;
&:nth-child(3n+3){
margin-right: 0;
}
.upload_item_camera{
width: 72rpx;
height: 54.67rpx;
margin-bottom: 14rpx;
}
.upload_item_camera1{
width: 72rpx;
height: 72rpx;
// margin-bottom: 14rpx;
}
.upload_item_image{
width: 100%;
height: 100%;
border-radius: 15rpx;
}
}
.reason_upload_item1{
position: relative;
&::after{
content: "";
width: 30.67rpx;
height: 30.67rpx;
position: absolute;
right: -12rpx;
top: -12rpx;
z-index: 99;
background-image: url("@/static/img/close3.png");
background-size: 100% 100%;
}
}
}
.reason_upload_tips{
font-size: 20rpx;
color: #666666;
}
}
.uni-navbar{
font-size: 32rpx;
font-weight: bold;
}
.nav_right{
button{
width: 116.67rpx;
height: 48rpx;
background-color: black;
margin: 0;
line-height: 48rpx;
border-radius: 24rpx;
font-size: 24rpx;
font-weight: bold;
color: white;
padding-left: 0;
padding-right: 0;
}
}
.body{
border-top: 14.67rpx #F6F5FA solid;
}
.order_popup_commodity{
padding: 0 33.33rpx;
border-bottom: 14.67rpx #F6F5FA solid;
}
</style>

7
pages/account/favorites.vue

@ -1,7 +1,7 @@
<template>
<view class="wishlist_body">
<view class="status_bar"></view>
<uni-nav-bar left-icon="left" :rightText="isDelete?'Done':'Delete'" title="Favorites" color="#000000" @clickLeft="back" @clickRight="$refs.alertDialog.open()"/>
<uni-nav-bar left-icon="left" :rightText="isDelete?'Done':'Delete'" title="Favorites" color="#fff" backgroundColor="#000000" @clickLeft="back" @clickRight="$refs.alertDialog.open()"/>
<view class="wishlist">
<view class="wishlist_item" v-for="(item,index) in goodsList" :key="index" @click="goDetails(item)">
<view class="wishlist_item_img">
@ -123,6 +123,11 @@
<style lang="scss" scoped>
page{
}
.status_bar{
height: 50rpx;
width: 100%;
background-color: #000000;
}
.uni-navbar{
font-size: 32rpx;

18
pages/account/index.vue

@ -217,16 +217,16 @@
defaultRequest(data).then(res=>{
console.info(res,)
if(res.error==0&&this.isLogin == 1){
this.hb_num=res.data.length
}
})
defaultRequest({
_action:'getusersummarydata'
}).then(res =>{
console.log(res)
if(res.error ==0){
this.count = res.data.user_info.rank_points
this.hb_num = res.data.user_bonus_list.length
console.log(this.hb_num)
}
})
},
@ -255,7 +255,7 @@
//
getCatList(type){
defaultRequest4(this.catQuery).then(res=>{
console.info(res)
// console.info(res)
if(res.error==0){
if(res.data){
this.catList=res.data
@ -286,7 +286,6 @@
res.data.isLogin=true
// this.user_info=res.data
this.noLogin = 0
this.hb_num = 0
uni.setStorageSync('user_info',res.data)
this.user_info=uni.getStorageSync('user_info')
console.log(this.user_info)
@ -331,6 +330,7 @@
uni.startPullDownRefresh()
},
onPullDownRefresh() {
this.getList()
this.isLogin = uni.getStorageSync('isLogin')
console.log(this.isLogin)
if(this.isLogin==0){
@ -349,7 +349,7 @@
.account_info{
padding: 0 50rpx;
padding-top: 66rpx;
padding-top: 97rpx;
padding-bottom: 40rpx;
border-bottom: 13.33rpx #F7F7F7 solid;
display: flex;
@ -363,8 +363,8 @@
width: 144rpx;
height: 144rpx;
border-radius: 50%;
margin-bottom: 36.67rpx;
background-color: #F7F7F7;
margin-bottom: 9.67rpx;
background-color: #000000;
}
.info_name{
font-size: 36rpx;

6
pages/account/message.vue

@ -1,7 +1,7 @@
<template>
<view>
<uni-nav-bar left-icon="left" :statusBar="true" title="Message"
color="#000000" @clickLeft="back" :border="false"/>
color="#fff" backgroundColor="#000000" @clickLeft="back" :border="false"/>
<view class="body">
<view class="msg_item" v-for="(item,index) in list.blocks" :key="item.block_title" @click="gotopage(item)">
@ -133,13 +133,13 @@
font-weight: bold;
}
.body{
border-top: 13.33rpx #F7F7F7 solid;
// border-top: 13.33rpx #F7F7F7 solid;
padding:0 26.67rpx;
}
.msg_item{
padding-top: 42.67rpx;
padding-bottom: 28rpx;
border-bottom: 1px solid #E2E2E2;
// border-bottom: 1px solid #E2E2E2;
.msg_time{
font-size: 25.33rpx;

22
pages/account/myCoupons.vue

@ -1,6 +1,6 @@
<template>
<view>
<uni-nav-bar left-icon="left" :statusBar="true" title="My Coupons" color="#000000" rightIcon="info" @clickLeft="back" @clickRight="goPage" :border="false"/>
<uni-nav-bar left-icon="left" :statusBar="true" title="My Coupons" color="#fff" backgroundColor="#000000" rightIcon="info" @clickLeft="back" @clickRight="goPage" :border="false"/>
<view class="body">
<view class="coupons_item" v-for="(item,index) in list " :key="item.bonus_id">
<view class="coupons_item_left">
@ -14,7 +14,7 @@
<text>The tide zone is available</text>
<view class="coupons_right_info_time">{{item.use_start_date}} - {{item.use_end_date}}</view>
</view>
<button>Use Now</button>
<button @click="goPage(1)">Use Now</button>
</view>
</view>
</view>
@ -42,10 +42,18 @@
back(){
uni.navigateBack()
},
goPage(){
uni.navigateTo({
url:"/pages/index/pickUpCentre"
})
goPage(e){
if(e==1){
uni.switchTab({
url:'../index/index'
})
}
else{
uni.navigateTo({
url:"/pages/index/pickUpCentre"
})
}
}
},
onShow() {
@ -60,7 +68,7 @@
font-weight: bold;
}
.body{
border-top: 14.67rpx #F7F7F7 solid;
// border-top: 14.67rpx #F7F7F7 solid;
padding:0 26rpx;
padding-top: 31.33rpx;
}

2
pages/account/myOrders.vue

@ -283,7 +283,7 @@
<view class="left_info">
<view class="info_name">{{item1.goods_name}}</view>
<view class="left_info_bottom">
<view class="info_lable">
<view class="info_lable" v-if="item1.goods_attr">
<text>{{item1.goods_attr |goodsAttr}}</text>
<!-- <image src="/static/img/bottom.png" mode=""></image> -->
</view>

26
pages/account/pointsDetails.vue

@ -1,13 +1,13 @@
<template>
<view>
<uni-nav-bar left-icon="left" right-icon="info"title="Points Details" color="#000000" @clickRight="goto()" @clickLeft="back" :border="false" :statusBar="true" />
<uni-nav-bar left-icon="left" right-icon="info"title="Points Details" color="#fff" backgroundColor="#000000" @clickRight="goto()" @clickLeft="back" :border="false" :statusBar="true" />
<view class="points">
<view class="points_item" v-for="(item,index) in 10" :key="index">
<view class="points_item" v-for="(item,index) in list" :key="item.log_id">
<view class="points_item_title">
<text>Order return</text>
<text class="item_title_price">+US$314.00</text>
<text>{{ item.change_desc }}</text>
<text class="item_title_price">+US${{ item.user_money }}</text>
</view>
<text>21/04/2022 15:42:31</text>
<text>{{ item.change_time }}</text>
</view>
</view>
</view>
@ -20,7 +20,8 @@
return {
query:{
_action:'getpagedata',pagecode:'006-PERSONALCENTERPAGE'
}
},
list:[]
}
},
methods:{
@ -29,14 +30,17 @@
},
getUserinfo(){
let data ={
_action:'getuseraccountlog',page_index:'1',page_size:'20'
_action:'getuseraccountlog',page_index:1,page_size:20
}
defaultRequest(data).then( res =>{
console.log( res,'pppp')
console.log( res)
if(res.error == 0){
this.list = res.data.accountlog_list
}
})
},
goto(){
console.log('///////')
uni.navigateTo({
url:'../specialTitle/index?id='+'POINTSRULE'
})
@ -55,7 +59,7 @@
.uni-navbar{
font-size: 32rpx;
font-weight: bold;
border-bottom: 14.67rpx #F6F5FA solid;
// border-bottom: 14.67rpx #F6F5FA solid;
}
.points{
padding: 0 25.33rpx;
@ -65,7 +69,7 @@
color: #999999;
font-size: 24rpx;
font-weight: 400;
border-bottom: 1px solid #E2E2E2;
// border-bottom: 1px solid #E2E2E2;
.points_item_title{
font-size: 28rpx;
display: flex;

8
pages/account/wishlist.vue

@ -1,7 +1,7 @@
<template>
<view class="wishlist_body">
<view class="status_bar"></view>
<uni-nav-bar left-icon="left" :rightText="isDelete?'Done':'Delete'" title="Wishlist" color="#000000" @clickLeft="back" @clickRight="clickRight()"/>
<uni-nav-bar left-icon="left" :rightText="isDelete?'Done':'Delete'" title="Wishlist" color="#fff" backgroundColor="#000000" @clickLeft="back" @clickRight="clickRight()"/>
<view class="wishlist">
<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)">
@ -277,6 +277,12 @@
<style lang="scss" scoped>
page{
}
.status_bar {
// height: var(--status-bar-height);
width: 100%;
height: 50rpx;
background-color: #000000;
}
.uni-navbar{
font-size: 32rpx;

4
pages/category/index.vue

@ -272,7 +272,7 @@
position: fixed;
top: 0;
z-index: 99;
border-bottom: 1px solid #F5F6FA;
// border-bottom: 1px solid #F5F6FA;
.search1{
display: flex;
@ -320,7 +320,7 @@
height: 100%;
display: flex;
overflow: hidden;
margin-top: 185rpx;
margin-top: 166rpx;
}
.category_left{
height: 100%;

183
pages/category/productList.vue

@ -1,5 +1,5 @@
<template>
<view>
<view class="black_bg">
<uni-nav-bar :statusBar="true" :title="Pet" color="#fff" backgroundColor="#000" :border="false" :fixed="true">
<block slot="left">
<view class="nav_left">
@ -18,23 +18,26 @@
</view>
</block>
</uni-nav-bar>
<view class="pets_nav">
<view class="pets_nav" :style="{display:isCart?'none':''}">
<text :class="query.order_type==0?'active_text':''" @click="selectNav(0)">Synthesis</text>
<view class="pets_nav_item" @click="selectNav(1)">
<text :class="query.order_type==3 ?'active_text' :query.order_type==4 ?'active_text':''">Sales</text>
<image src="/static/img/bottom1.png" mode="" class="pets_nav_arrow"></image>
<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>
</view>
</view>
<view class="pets_nav_item" @click="selectNav(2)">
<text :class="query.order_type==1 ?'active_text':query.order_type==2 ?'active_text':''">Price</text>
<view class="pets_nav_item_right">
<image src="../../static/img/top.png" mode="" class="pets_nav_arrow"></image>
<image src="/static/img/bottom1.png" mode="" class="pets_nav_arrow"></image>
<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>
</view>
</view>
<view class="pets_nav_image">
<image src="/static/img/pets_nav.png" mode="" v-show="pets_index==0" @click="pets_index=1,$refs.waterfallsFlowRef.refresh()"></image>
<image src="/static/img/pets_nav1.png" mode="" v-show="pets_index==1" @click="pets_index=0"></image>
<image src="/static/img/pets_nav_white.png" mode="" v-show="pets_index==0" @click="pets_index=1,$refs.waterfallsFlowRef.refresh()"></image>
<image src="/static/img/ptes_nav1_white.png" mode="" v-show="pets_index==1" @click="pets_index=0"></image>
</view>
</view>
<view class="body">
@ -49,9 +52,9 @@
<view class="item_right_price">
<text>US${{item.shop_price}}</text>
<view class="right_price_operation">
<image src="../../static/img/like.png" mode="" v-show="item.is_attention==0" @click.stop="addLike(item.id)"></image>
<image src="../../static/img/like1.png" mode="" v-show="item.is_attention==1" @click.stop="removeLike(item.id)"></image>
<image src="../../static/img/cart2.png" mode=""@click.stop="gotoCart(item)"></image>
<image src="../../static/img/like_white.png" mode="" v-show="item.is_attention==0" @click.stop="addLike(item.id)"></image>
<image src="../../static/icon/like_red.png" mode="" v-show="item.is_attention==1" @click.stop="removeLike(item.id)"></image>
<image src="../../static/icon/cat_white.png" mode=""@click.stop="gotoCart(item)"></image>
</view>
</view>
</view>
@ -65,7 +68,7 @@
<view class="item_text">{{item.short_name}}</view>
<view class="desc">
<text>US${{item.shop_price}}</text>
<image src="../../static/img/cart2.png" mode="" @click.stop="gotoCart(item)"></image>
<image src="../../static/icon/cat_white.png" mode="" @click.stop="gotoCart(item)"></image>
</view>
<view class="lable" v-if="item.tags!=''">{{item.tags}}</view>
</view>
@ -76,7 +79,7 @@
<view class="addCard" v-show="isCart">
<image src="/static/img/close1.png" mode="" class="addCard_close" @click="isCart=false,goods_attr_list =[]"></image>
<scroll-view class="spike1 " scroll-x="true" :show-scrollbar="false">
<image :src="item.img_url" mode="" class="addCard_scroll" v-for="(item,index) in gallery_list" ></image>
<image :src="item.img_url" mode="" class="addCard_scroll" v-for="(item,index) in gallery_list" @click="clickImg(index,gallery_list)"></image>
</scroll-view>
<scroll-view class="addCard_body" scroll-y="true">
<view >{{ goodsDate.goods_name}}</view>
@ -88,9 +91,9 @@
: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" v-if="item1.attr_img!=''">
<image src="/static/icon/big2.png" mode=""></image>
<image src="/static/icon/big2.png" mode="" @click="clickImg(index1,item.list)"></image>
</view>
<image :src="item1.attr_img" mode="" v-if="item1.attr_img!=''"></image>
<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>
@ -99,12 +102,15 @@
</view>
<view class="quantity">
<text>Quantity</text>
<uni-number-box background="#fff" v-model="cartQuery.goods_number" :min="1"></uni-number-box>
</view>
</scroll-view>
<view class="quantity">
<!-- <view class="quantity">
<text>Quantity</text>
<uni-number-box background="#fff" v-model="cartQuery.goods_number" :min="1"></uni-number-box>
</view>
</view> -->
<button @click="addCart">ADD TO CART</button>
</view>
@ -128,7 +134,8 @@
_action:'getgoods',
order_type:0,
page_index:1,
page_size:10
page_size:20,
brand:''
},
cartBtn:false,
list:[],
@ -159,6 +166,7 @@
isLogin:-1,
current:0,
shop_price:0,
tag:0,
}
},
methods:{
@ -368,6 +376,28 @@
},
back(){
uni.navigateBack()
},
//
clickImg(index,list) {
let lists =[]
list.map( item =>{
if(item.img_url){
lists.push(item.img_url)
}
if(item.attr_img){
lists.push(item.attr_img)
}
})
wx.previewImage({
urls: lists, //httpurl
current: index, // http
indicator:'number',
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
goDetails(item,e){
console.info(item)
@ -398,7 +428,7 @@
},
getList(type){
console.log(this.query,'指令')
console.log(this.query)
defaultRequest(this.query).then(res=>{
console.info(res)
@ -406,17 +436,23 @@
if(res.data){
if(type==0){
this.list=res.data
this.$refs.waterfallsFlowRef.refresh();
this.$refs.waterfallsFlowRef.refresh();
}else{
this.list=this.list.concat(res.data)
console.log(1112)
}
}else{
uni.hideLoading();
console.log(1111)
this.isReachBottom=false
uni.showToast({
title: 'No more data yet',
icon:'none'
})
setTimeout(() => {
uni.showToast({
title: 'No more data yet',
icon:'none',
duration: 3000
})
},1000)
this.query.page_index--
}
}
@ -426,19 +462,28 @@
},
onLoad(e) {
console.log(e)
if(e.gid){
this.query.gid = e.gid
}
if(e.tag == 1){
// this.isReachBottom = false
this.tag =e.tag
}
this.isLogin = uni.getStorageSync('isLogin')
const a = parseInt(e.typethree)
this.Pet = e.title
if(e.type ==0||e.goodslist ==1){
this.query.cat= a
}
else{
if(e.keyword){
this.query.keyword=e.keyword
this.Pet = e.keyword
}
if(e.brandid){
this.query.brand = e.brandid
}
this.getCartNum()
this.getList(0)
@ -453,8 +498,12 @@
onReachBottom(){
if(!this.isReachBottom)return
this.query.page_index++
this.getList(1)
// if(this.tag == 0){
this.query.page_index++
this.getList(1)
// }
},
onPullDownRefresh(){
@ -468,6 +517,12 @@
font-size: 32rpx;
font-weight: bold;
}
.black_bg{
height: 100vh;
width: 100%;
background-color: #000000;
}
.nav_left{
image{
width: 36rpx;
@ -490,12 +545,16 @@
align-items: center;
justify-content: space-between;
font-size: 26.67rpx;
color: #666666;
// color: #666666;
font-weight: 600;
// border-top: 1px solid #F5F6FA;
border-bottom: 1px solid #F5F6FA;
// border-bottom: 1px solid #F5F6FA;
position: fixed;
background-color: white;
// background-color: white;
background-color: #000000;
color: #fff;
background: rgba(0, 0, 0,0.6);
// opacity: 0.6;
top: 0;
margin-top: 135rpx;
/* #ifdef H5 */
@ -503,9 +562,9 @@
/* #endif */
width: 100%;
box-sizing: border-box;
z-index: 99;
z-index: 90;
.active_text{
color: #000000;
color: #fff;
}
.pets_nav_item{
display: flex;
@ -547,26 +606,29 @@
}
.body{
padding: 0 26.67rpx;
padding-top: 90rpx;
padding-top: 60rpx;
background-color: rgb(0, 0, 0);
}
.product1{
padding-top: 26.67rpx;
background-color: #000000;
/deep/.column-value{
border-radius: 0 !important;
margin-bottom: 40rpx !important;
margin-bottom: 20rpx !important;
}
.product1_item{
font-size: 29.33rpx;
font-size: 22.33rpx;
font-weight: 400;
padding-top: 32rpx;
color: #000000;
padding-top: 20rpx;
background-color: #000000;
color: #fff;
.desc{
margin-top: 28.67rpx;
margin-top: 12.67rpx;
display: flex;
font-size: 32rpx;
color: #191919;
font-size: 27rpx;
color: #fff;
align-items: center;
justify-content: space-between;
font-weight: 500;
@ -578,7 +640,7 @@
}
.lable{
padding: 11.33rpx 18rpx;
background-color: #FCF6F7;
// background-color: #FCF6F7;
border-radius: 8rpx;
color: #B22234;
font-size: 20rpx;
@ -593,9 +655,9 @@
.product_item{
display: flex;
align-items: center;
font-size: 26.67rpx;
font-size: 24.67rpx;
font-weight: 400;
margin-bottom: 34.67rpx;
margin-bottom: 24.67rpx;
.product_item_image{
width: 213.33rpx;
height: 213.33rpx;
@ -604,8 +666,9 @@
}
.product_item_right{
width: 440rpx;
height: 213.33rpx;
// height: 213.33rpx;
display: flex;
color:white;
// background-color: #B22234;
flex-direction: column;
justify-content: space-between;
@ -628,7 +691,7 @@
}
.item_right_price{
display: flex;
color: #191919;
color: #fff;
font-size: 32rpx;
align-items: center;
justify-content: space-between;
@ -691,7 +754,7 @@
}
.addCard_body{
padding-right: 31.33rpx;
max-height: 600rpx;
max-height: 60vh;
min-height: 400rpx;
.addCard_price{
font-size: 44rpx;
@ -699,8 +762,7 @@
margin-top: 27.33rpx;
margin-bottom: 51.33rpx;
}
.color_select{
.color_select{
display: flex;
font-size: 16.67rpx;
color: #666666;
@ -892,18 +954,24 @@
display: flex;
flex-wrap: wrap;
.select_size_item{
background-color: #F8F8F8;
min-width: 121.33rpx;
height: 54.67rpx;
background-color: red;
width: 97.67rpx;
height: 97.67rpx;
background-size: 100% 100% center center;
display: flex;
align-items: center;
justify-content: center;
border-radius: 12.67rpx;
color: #666666;
image{
height: 100%;
width: 100%;
}
// border-radius: 12.67rpx;
// color: #666666;
color:white;
font-size: 24rpx;
margin-right: 18.67rpx;
border: 1px solid #F8F8F8;
padding: 0 10rpx;
// border: 1px solid #F8F8F8;
// padding: 0 10rpx;
margin-bottom: 16.67rpx;
// &:nth-child(-n+2){
@ -913,6 +981,7 @@
}
.item_text{
height: 80rpx;
font-size: 26rpx;
line-height: 40rpx;
overflow: hidden;
text-overflow: ellipsis;
@ -925,7 +994,7 @@
width: 100%;
height: 100%;
background-color: black;
opacity: 0.5;
z-index: 998;
top: 0;
left: 0;

192
pages/index/first.vue

@ -0,0 +1,192 @@
<template>
<view class="body">
<!-- 启动页广告 -->
<view class="open_bg">
<view class="open_text"><text @click="gotopage(1)">{{ countdownTime2 }}s skip</text></view>
<swiper class ="open_bgimg" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
:duration="duration">
<swiper-item v-for="(item,index) in open_img" :key="item.block_pic">
<image :src="item.block_pic" mode="" @click="imgTopage(item.block_link)" style="width: 100%;height: 100%;"></image>
</swiper-item>
</swiper>
<!-- <image :src="open_img" style="width: 100%;height: 100%;z-index: -1;" @click="imgTo(open_img)"></image> -->
</view>
</view>
</template>
<script>
import {defaultRequest,defaultRequest4} from '../../api/index.js'
export default {
data(){
return {
open_img:[],
indicatorDots: true,
autoplay: true,
interval: 2000,
duration: 500,
countdownTime2:5,
heightOne:0,
heightTwo:0,
}
},
onLoad() {
this.getMes()
// this.getCountdownTime()
// #ifdef APP-PLUS
plus.navigator.setFullscreen(true);
// #endif
},
// created(){
// this.getCountdownTime()
// },
methods:{
getMes(){
let data={_action:'getpagedata',pagecode:'001-STARTPAGE'}
// setTimeout( () =>{
defaultRequest(data).then( res =>{
console.log('1',res)
let img
let url
if(res.error == 0){
res.data.zones.map( item =>{
if(item.zone_code == "KAIPIN"){
img = item.blocks
url = item.blocks[0].block_link
this.open_img = img
if(this.open_img.length > 0){
setTimeout( () =>{
this.getCountdownTime()
},500)
}
}
})
console.log(this.open_img)
this.popUrl = url
}
})
// },5000)
},
//5
getCountdownTime() {
uni.hideTabBar();
uni.setTabBarStyle({
backgroundColor: "#ccc",
borderStyle: "black",
// selectedColor: "#999",
// color: "#999",
});
let timer2 = setInterval(() => {
// uni.hideTabBar();
this.countdownTime2--;
if (this.countdownTime2 < 1) {
clearInterval(timer2)
this.countdownTime2 = 0
}
if(this.countdownTime2 ==0){
uni.switchTab({
url:'./index'
})
uni.showTabBar()
}
}, 1000)
},
gotopage(e){
if(e==1){
uni.switchTab({
url:'./index'
})
}
},
imgTopage(item){
console.log(111)
console.log(item,'item')
const i = item.indexOf('?')
const str = item.substring(i)
if(item.includes('goodid')){
uni.navigateTo({
url:'../productDetails/index'+str+'&img=1'
})
}
else if(item.includes('goodslist')){
uni.navigateTo({
url:'../category/productList'+ str
})
}
},
}
}
</script>
<style lang="scss" scoped>
.body{
background-color: #000;
}
.open_bg{
height: 100vh;
width: 100%;
top:0;
color: white;
z-index: -1;
bottom: var(--window-bottom,0);
background-size:100% 100%;
background: center center no-repeat;
// image{
// height: 100%;
// width: 100%;
// }
.open_text{
right:0;
top:50rpx;
height: 50rpx;
width: 120rpx;
font-size: 28rpx;
margin-right: 10rpx;
margin-top: 10rpx;
background-color:#ececec;
background-color:rgba(0,0,0,0.5);
line-height: 50rpx;
opacity: 0.5;
text-align: center;
position: absolute;
z-index:99;
border-radius: 5rpx;
}
.open_bgimg{
margin: 0;
padding: 0;
top:0;
height: 100%;
width: 100%;
position: relative;
color:white;
image{
height: 100%;
width: 100%;
}
// padding-bottom: constant(safe-area-inset-bottom);
// padding-bottom: calc(30rpx + env(safe-area-inset-bottom));
}
}
</style>

79
pages/index/flashSale.vue

@ -1,7 +1,7 @@
<template>
<view>
<uni-nav-bar left-icon="left" :statusBar="true" title="Flash Sale"
color="#000000" @clickLeft="back" @clickRight="isDelete=!isDelete" :border="false"/>
color="#fff" backgroundColor="#000000" @clickLeft="back" @clickRight="isDelete=!isDelete" :border="false"/>
<view class="body">
<view class="countDown">
@ -10,7 +10,7 @@
color="#FFFFFF" background-color="#1B1B1B" class="countDown_assembly" />
</view>
<view class="tips">
Chic selects commodities from time to time to carry
DopePlus selects commodities from time to time to carry
out special price activities.
</view>
<view class="tips1">The quantity of special price commodities is limited and will be sold out</view>
@ -36,7 +36,7 @@
<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 mode="" class="addCard_scroll" :src="item.img_url" v-for="(item,index) in gallery_list" :key="index" ></image>
<image mode="" class="addCard_scroll" :src="item.img_url" @click="clickImg(index,gallery_list)" v-for="(item,index) in gallery_list" :key="index" ></image>
</scroll-view>
<scroll-view class="addCard_body" scroll-y="true">
<view >{{ goodsDate.goods_name}}</view>
@ -55,7 +55,7 @@
: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" v-if="item1.attr_img!=''">
<image src="/static/icon/big2.png" mode=""></image>
<image src="/static/icon/big2.png" mode="" @click="clickImg(index1,item.list)"></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>
@ -64,11 +64,15 @@
</view>
</view>
<view class="quantity">
<text>Quantity</text>
<uni-number-box background="#fff" v-model="cartQuery.goods_number" :min="1"></uni-number-box>
</view>
</scroll-view>
<view class="quantity">
<!-- <view class="quantity">
<text>Quantity</text>
<uni-number-box background="#fff" v-model="cartQuery.goods_number" :min="1"></uni-number-box>
</view>
</view> -->
<button @click="addCart">ADD TO CART</button>
</view>
</view>
@ -300,8 +304,39 @@
}
},
//
clickImg(index,list) {
let lists =[]
list.map( item =>{
if(item.img_url){
lists.push(item.img_url)
}
if(item.attr_img){
lists.push(item.attr_img)
}
})
wx.previewImage({
urls: lists, //httpurl
current: index, // http
indicator:'number',
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
},
onPageScroll(e) {
// console.log( e.scrollTop)
// if(e.scrollTop>8){
// plus.navigator.setStatusBarStyle("light");
// }else{
// plus.navigator.setStatusBarStyle("dark");
// }
},
onLoad() {
this.getList()
@ -320,6 +355,7 @@
border-top: 13.33rpx #F7F7F7 solid;
padding:0 26rpx;
padding-top: 34rpx;
height: 100vh;
}
.recommend{
padding: 0;
@ -420,11 +456,11 @@
.addCard_body{
padding-right: 31.33rpx;
min-height: 400rpx;
max-height: 600rpx;
max-height: 60vh;
.addCard_price{
font-size: 44rpx;
font-weight: 500;
margin-top: 27.33rpx;
margin-top: 24.33rpx;
margin-bottom: 51.33rpx;
}
.color_select{
@ -497,13 +533,13 @@
align-items: center;
justify-content: space-between;
margin-bottom: 43.33rpx;
margin-left: 10rpx;
// margin-left: 10rpx;
.uni-numbox{
border: 1px solid #999999;
border-radius: 14rpx;
height: 42.67rpx;
margin-right: 17rpx;
margin-right: 33rpx;
/deep/ .uni-numbox__minus{
border-radius: 14rpx;
}
@ -520,8 +556,9 @@
}
}
button{
width: 98%;
margin: 0 1%;
width: 95%;
margin-left: 2rpx;
// margin-right: 18rpx;
height: 73.33rpx;
line-height: 73.33rpx;
background-color: #191919;
@ -621,17 +658,25 @@
display: flex;
flex-wrap: wrap;
.select_size_item{
background-color: #F8F8F8;
min-width: 121.33rpx;
height: 54.67rpx;
height: 97rpx;
width: 97rpx;
background-size: 100% 100%;
background-size:cover;
image{
height: 100%;
width: 100%;
}
// background-color: #F8F8F8;
// min-width: 121.33rpx;
// height: 54.67rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 12.67rpx;
color: #666666;
// color: #666666;
font-size: 24rpx;
margin-right: 18.67rpx;
border: 1px solid #F8F8F8;
// border: 1px solid #F8F8F8;
padding: 0 10rpx;
margin-bottom: 16.67rpx;

543
pages/index/index.vue

File diff suppressed because it is too large

14
pages/index/index2.vue

@ -3,11 +3,11 @@
<view class="body" >
<!-- 头部导航栏 -->
<uni-nav-bar :statusBar="true" :title="Pet" color="#000000" :border="false" :fixed="true">
<uni-nav-bar :statusBar="true" :title="Pet" color="#fff" backgroundColor="#000000" :border="false" :fixed="true">
<block slot="left">
<view class="nav_left">
<image src="../../static/img/left.png" mode="" @click="back()"></image>
<image src="../../static/img/seach1.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>
@ -15,7 +15,7 @@
<view class="nav_right">
<navigator url="/pages/shippingCart/index" open-type="switchTab">
<uni-badge :text="sum" type="error" absolute="rightTop">
<image src="../../static/img/shop_cart.png" mode=""></image>
<image src="../../static/img/shop_cart1.png" mode=""></image>
</uni-badge>
</navigator>
</view>
@ -730,7 +730,7 @@
// }
.navigation{
/* display: flex; */
background-color:#161616;
background-color:#000000;
position: fixed;
top: 0;
z-index: 99;
@ -739,6 +739,7 @@
width: 100%;
.navigation_title{
display: flex;
background-color: #000000;
padding: 30rpx 0;
align-items: center;
@ -845,6 +846,9 @@
.uni-bg-blue{
background-color: blue;
}
.uni-bg-black{
background-color: #000000;
}
}
}
.grid_swiper {

51
pages/index/pickUpCentre.vue

@ -1,6 +1,6 @@
<template>
<view>
<uni-nav-bar left-icon="left" :statusBar="true" title="CouPons" color="#000000" @clickLeft="back" :border="false">
<uni-nav-bar left-icon="left" :statusBar="true" title="CouPons" color="#fff" backgroundColor="#000000" @clickLeft="back" :border="false">
<!-- <block slot="right">
<view class="head_coupons">
<image src="../../static/img/coupons.png" mode=""></image>
@ -23,6 +23,7 @@
<view class="coupons_right_info_time">{{item.send_start_date}} - {{item.send_end_date}}</view>
</view>
<button v-if="item.is_obtained==0" @click="obtainbonus(item.type_id)">Receive</button>
<button v-if="item.is_obtained!=0" @click="gotopage()">Use Now</button>
<image src="../../static/img/coupons_bg.png" mode="" class="coupons_item_right_bg" v-if="item.is_obtained==1"></image>
</view>
</view>
@ -40,17 +41,28 @@
},
methods:{
obtainbonus(id){
let tag = 0
tag = uni.getStorageSync('isLogin')
console.log(tag)
let data={_action:'obtainbonus',type_id:id}
defaultRequest2(data).then(res=>{
console.info(res)
if(res.error==0){
uni.showToast({
icon:'none',
title:res.message
})
}
this.getList()
})
if(tag == 1){
defaultRequest2(data).then(res=>{
console.info(res)
if(res.error==0){
uni.showToast({
icon:'none',
title:res.message
})
}
this.getList()
})
}
else{
uni.navigateTo({
url:'../login/index'
})
}
},
getList(){
let data={_action:'getbonuslist'}
@ -64,6 +76,23 @@
back(){
uni.navigateBack()
},
gotopage(){
let tag = 0
console.log(1111)
tag = uni.getStorageSync('isLogin')
console.log(tag)
if(tag == 1){
uni.switchTab({
url:'./index'
})
}
else{
uni.navigateTo({
url:'../login/index'
})
}
}
},
onLoad() {
this.getList()

5
pages/index/search.vue

@ -128,12 +128,17 @@
// defaultRequest(data).then(res=>{
// console.log(res,'ke')
// })
console.log(this.catQuery)
uni.navigateTo({
url:'../category/productList?keyword='+this.searchValue+'&type=1'
})
},
tapSearch(i){
this.searchValue = i
console.log(this.catQuery)
uni.navigateTo({
url:'../category/productList?keyword='+this.searchValue+'&type=1'
})
},
//
empty() {

19
pages/login/index.vue

@ -13,13 +13,13 @@
<view class="tips" v-show="loginErr">{{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">
<!-- <view class="agreement">
<image src="../../static/img/select2.png" mode="" class="agreement_image" @click="loginSelect=!loginSelect,loginErr=false" v-show="!loginSelect"></image>
<image src="../../static/img/select1.png" mode="" class="agreement_image" @click="loginSelect=!loginSelect" v-show="loginSelect"></image>
<view class="agreement_right">
by continuong, you agree to be <text class="text" @click="gotonewpage(1)"> terms of use </text> and <text class="text"@click="gotonewpage"> privacy policy</text>.
</view>
</view>
</view> -->
</view>
<view class="login" v-show="current==1">
@ -136,18 +136,19 @@
},
//
configuration(){
let data={_action:'getpagedata',pagecode:'PAGE-LOGIN'}
let data={_action:'getpagedata',pagecode:'006-PERSONALCENTERPAG'}
defaultRequest1(data).then(res=>{
console.info(res)
})
},
//
login(){
if(!this.loginSelect){
this.errMsg='Please read and tick the terms of service and privacy policy first.'
this.loginErr=true
return
}
// if(!this.loginSelect){
// this.errMsg='Please read and tick the terms of service and privacy policy first.'
// this.loginErr=true
// return
// }
console.log(this.loginDate)
defaultRequest1(this.loginDate).then(res=>{
console.info(res)
@ -256,7 +257,7 @@
<style lang="scss" scoped>
.login_body{
padding-top: 145.33rpx;
padding-top: 305.33rpx;
}
.see{
height: 30rpx;

5
pages/order/confirmation.vue

@ -309,8 +309,8 @@
postscript:'',
bonus:this.order.bonus,
surplus:this.order.surplus,
// shipping_id:this.orderId,
shipping_id:this.order.shipping_id,
// shipping_id:this.orderId,
shipping_id:this.order.shipping_id,
directshopping:0,
}
defaultRequest3(data,'consignee').then(res=>{
@ -401,6 +401,7 @@
this.query=JSON.parse(e.query)
this.orderId = e.orderId
this.order.shipping_id = e.orderId
if(this.orderId){
this.tag =1
}

2
pages/order/details.vue

@ -96,7 +96,7 @@
</view>
<view class="info_price">
<text>US${{item.subtotal}}</text>
<button v-if="details_index!=0 && details_index!=4">RREFUND</button>
<!-- <button v-if="details_index!=0 && details_index!=4">RREFUND</button> -->
</view>
</view>
</view>

24
pages/order/logisticsDetails.vue

@ -1,15 +1,16 @@
<template>
<view>
<view v-for="(item,index) in list.goods" :key="item.goods_img">
<view class="logistics_info">
<view class="logistics_info_image">
<image :src="list.logo" mode=""></image>
<image :src="item.goods_img" mode=""></image>
</view>
<view class="logistics_info_right">
<view class="info_right_title">{{list.isreceived==1?'Signed for':'In Transit'}}</view>
<text>{{list.expname}}</text>
<view class="info_right_num">
<text>Order number : {{list.mailno}}</text>
<view class="copy">Copy</view>
<text>Tracking number : {{item.invoice_no}}</text>
<view class="copy" @click ="Copy(item.invoice_no)">Copy</view>
</view>
</view>
</view>
@ -19,6 +20,7 @@
<view class="logistics_step_time">{{item.time}}</view>
</view>
</view>
</view>
</view>
</template>
@ -42,8 +44,20 @@
console.info(res)
if(res.error==0){
this.list=res.data[0]
console.info(this.list)
}
})
},
Copy(no){
uni.setClipboardData({
data:no,//
success:()=>{//
uni.showToast({//
title:'succeeded',
icon:'none'
})
}
});
}
},
onLoad(e) {
@ -66,6 +80,10 @@
width: 133.33rpx;
height: 133.33rpx;
background-color: #999999;
image{
height: 100%;
width: 100%;
}
}
.logistics_info_right{

37
pages/productDetails/goodsReview.vue

@ -3,17 +3,25 @@
<template v-if="list.length!=0">
<view class="reviews_item" v-for="(item,index) in list" :key="index">
<view class="reviews_item_title">
<view class="reviews_title_user">
<text>{{item.user_name}}</text>
<uni-rate size="18" :disabled="true" disabledColor="red" :value="item.comment_rank" active-color="red" :is-fill="false"/>
<view class="reviews_item_img"><image mode="" :src="item.avatar_img_small"></image></view>
<view class="reviews_item_one">
<view class="reviews_title_user">
<view class="reviews_title_user_name">{{item.user_name}}</view>
<uni-rate style="margin-left: 2rpx;margin-top: 10rpx;"size="18" :disabled="true" disabledColor="#B22234" :value="item.comment_rank" active-color="#B22234" :is-fill="false"/>
</view>
<view class="reviews_title_color">Color:###</view>
</view>
<view class="reviews_title_time">{{item.add_time}}</view>
<view class="reviews_title_time">{{item.add_time | date}}</view>
</view>
<view class="reviews_item_color">{{item.commentlabels}}</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> -->
<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>
</view>
</view>
</view>
</template>
<view class="noreview" v-else>No comment for the time being</view>
@ -37,6 +45,18 @@
list:[]
}
},
filters:{
date(e){
let str = e
str=str.substring(0,10);
const year = str.substring(0,4)
let date = str.substring(5,10)
date = date.replace('-','/')
let time = date + '/'+year
return time
}
},
methods:{
getList(){
defaultRequest(this.query).then(res=>{
@ -94,4 +114,7 @@
background-color: white;
opacity: 0;
}
.reviews_item{
border-bottom: #f0f0f0 1rpx solid;
}
</style>

244
pages/productDetails/index.vue

@ -1,5 +1,5 @@
<template>
<view>
<view class="body">
<uni-nav-bar backgroundColor="#000000" :statusBar="true" left-icon="left" color="#fff" :leftWidth="navWidth" :rightWidth="navWidth" :fixed="true" @clickLeft="back">
<view class="input-view">
<!-- <uni-icons class="input-uni-icon" type="search" size="18" color="#999" /> -->
@ -33,7 +33,7 @@
<swiper-item :touchable="true" v-if="goodsDate.goods_video">
<view class="swiper-item uni-bg-black" :style="{ background: 'url(' + goodsDate.gallery_list[0].img_url + ')' }">
<video v-if="video" :autoplay="true" :enable-progress-gesture="true" :mobilenet-hint-type="1" class="video_play"
:http-cache="true" @pause="VideoPuse()"
:http-cache="true" @pause="VideoPuse()" object-fit="contain" :direction="0"
:src=" goodsDate.goods_video" :show-mute-btn="true"
@touchstart="touchStart" @touchend="touchEnd" >
</video>
@ -86,9 +86,9 @@
<text>US${{goodsDate.is_promote==0? goodsDate.shop_price :goodsDate.promote_price}}</text>
<view class="info_price_right">
<image src="/static/img/like.png" mode="" v-show="goodsDate.is_attention==0" @click="addLike(goodsDate.id)"></image>
<image src="../../static/img/like1.png" mode="" v-show="goodsDate.is_attention==1" @click="removeLike(goodsDate.id)"></image>
<image src="../../static/img/share.png" mode=""@click="Isshare=true"></image>
<image src="/static/img/like_white.png" mode="" v-show="goodsDate.is_attention==0" @click="addLike(goodsDate.id)"></image>
<image src="../../static/icon/like_red.png" mode="" v-show="goodsDate.is_attention==1" @click="removeLike(goodsDate.id)"></image>
<image src="../../static/icon/share_white.png" mode=""@click="Isshare=true"></image>
</view>
</view>
<view>{{goodsDate.goods_name}} </view>
@ -103,17 +103,21 @@
<text>{{colorNum}}color</text>
</view>
<view >
<view v-for="(item,index) in goodsDate.attr_list" :key="index" class="variations_select">
<!-- <view v-for="(item,index) in goodsDate.attr_list" :key="index" class="variations_select"> -->
<!-- <view class="variations_select_varieties" >
<view class="select_varieties_image" v-for="(item,index) in 3" :key="index"></view>
</view> -->
<view class="variations_select_size">
<view class="select_size_item" v-for="(item1,index1) in item.goods_attrs" :key="index1">{{item1.attr_value}}</view>
<view class="select_size_item" v-for="(item,index ) in goodsDate.gallery_list" :key="item.img_url"
:style="{background:`url(${item.img_url})`}" @click="clickImg(index)">
<!-- <image :src="item.img_url" mode="" @click="clickImg(index)"></image> -->
</view>
<!-- <view class="select_size_item">35</view>
<view class="select_size_item">M</view>
<view class="select_size_item">L</view> -->
</view>
</view>
<!-- </view> -->
</view>
</view>
@ -133,13 +137,13 @@
<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_black">US${{ item.free_money}}</text>
{{ item.shipping_name}}: <text class="text_red">US${{ item.free_money}}</text>
</view>
<view >
free on orders <text class="text_red">US${{ item.shipping_fee}}</text>
</view>
<view >Estimated to be deliverd on </view>
<view >{{ item.shipping_desc }}</view>
<view class="text_bold_200" >Estimated to be deliverd on </view>
<view class="text_bold_200" >{{ item.shipping_desc }}</view>
</view>
</view>
</scroll-view>
@ -150,7 +154,7 @@
<text>Shipping security</text>
</view>
<view class="goods_title_right">
<image src="../../static/img/right.png" mode=""></image>
<image src="../../static/icon/right_white.png" mode=""></image>
</view>
</view>
@ -158,7 +162,7 @@
<!-- <ul>
<li>{{item.block_title}} </li>
</ul> -->
<view class="icon" v-for="(item,index) in listtext" :key="item.block_title"><text style="color:#4b4b4b;font-size: 28rpx;margin:0 9rpx 0 9rpx;"></text>{{item.block_title}}</view>
<view class="icon" v-for="(item,index) in listtext" :key="item.block_title"><text style="color:#fff;font-size: 28rpx;margin:0 9rpx 0 9rpx;"></text>{{item.block_title}}</view>
</view>
</view>
<view class="description goods_title" @click="isAttr=true">
@ -168,14 +172,14 @@
<view class="goods_title_right">
<!-- <view>#Iron #Pearls,Flowers #Fashionable</view> -->
<view>{{goodsDate.tags}}</view>
<image src="../../static/img/right.png" mode="" ></image>
<image src="../../static/icon/right_white.png" mode="" ></image>
</view>
</view>
</view>
<view class="order_popup" v-show="isAttr">
<view class="order_popup_title">
<text>Details</text>
<text>Description</text>
<image src="../../static/img/close1.png" mode="" @click="isAttr=false"></image>
</view>
@ -183,19 +187,27 @@
<!-- <scroll-view scroll-y="true" class="descriptionDetails" > -->
<scroll-view scroll-y="true" class="text1">
<view class="text1_item" :style="{height:max>7?160+'rpx':''}">
<view class="text1_item" v-if="Attr_list" :style="{height:max>7?160+'rpx':''}">
<view class="text1_left"><text>Color</text> </view>
<view class="text1_right" ><text>{{ Attr_list }}</text></view>
</view>
<view class="text1_item" >
<view class="text1_left" ><text>Power Suppy</text> </view>
<!-- <view class="text1_item" >
<view class="text1_left" ><text>Material</text> </view>
<view class="text1_right"><text>No</text></view>
</view> -->
<view class="text1_item" v-if="goodsDate.brand_name">
<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_left" ><text>Weight</text> </view>
<view class="text1_right"><text>{{ goodsDate.goods_weight}}</text></view>
</view>
<view class="text1_item">
<view class="text1_left"><text>Type</text> </view>
<view class="text1_right" v-if="goodsDate.cat_name" >{{ goodsDate.cat_name}}</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>
<view class="text1_item">
<view class="text1_item" v-if="Size_list">
<view class="text1_left"><text>Length</text> </view>
<view class="text1_right" v-if="Size_list " >{{Size_list }}</view>
</view>
@ -219,13 +231,13 @@
<text>Reviews({{goodsDate.comment_summary[0].commentcount}})</text>
</view>
<view class="goods_title_right">
<image src="../../static/img/right.png" mode=""></image>
<image src="../../static/icon/right_white.png" mode=""></image>
</view>
</view>
<view class="allReviews">
<text>{{goodsDate.comment_summary[0].commentcount==0?'0.0':'4.0'}}</text>
<uni-rate size="25" :disabled="true" disabledColor="#B22234" :value="goodsDate.comment_summary[0].commentcount==0?'0':'4'" active-color="red" :is-fill="false"/>
<uni-rate size="25" :disabled="true" disabledColor="#B22234" color="#B22234" :value="goodsDate.comment_summary[0].commentcount==0?'0':'4'" active-color="red" :is-fill="false"/>
</view>
<template v-if="goodsDate.comment_summary[0].commentcount==0">
<view class="reviews_no">No comment yet</view>
@ -233,17 +245,25 @@
<template v-else>
<view class="reviews_item" v-for="(item,index) in commonlist" :key="index">
<view class="reviews_item_title">
<view class="reviews_title_user">
<text>{{item.user_name}}</text>
<uni-rate style="margin-left: 16rpx;"size="18" :disabled="true" disabledColor="#B22234" :value="item.comment_rank" active-color="#B22234" :is-fill="false"/>
<view class="reviews_item_img"><image mode="" :src="item.avatar_img_small"></image></view>
<view class="reviews_item_one">
<view class="reviews_title_user">
<view class="reviews_title_user_name">{{item.user_name}}</view>
<uni-rate style="margin-left: 2rpx;margin-top: 10rpx;"size="18" :disabled="true" disabledColor="#B22234" :value="item.comment_rank" active-color="#B22234" :is-fill="false"/>
</view>
<!-- <view class="reviews_title_color">Color:###</view> -->
</view>
<view class="reviews_title_time">{{item.add_time | date}}</view>
</view>
<view class="reviews_item_color">{{item.commentlabels}}</view>
<view class="reviews_item_content">{{item.content}}</view>
<!-- <view class="reviews_item_image">
<view class="reviews_image_content" v-for="(item,index) in 2" :key="index"></view>
</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>
</view>
</view>
</view>
</template>
</view>
@ -277,7 +297,7 @@
<view class="recommend_content_item_image">
<image :src="item.thumb" mode=""></image>
</view>
<text>{{item.short_name}}</text>
<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>
</view>
@ -329,9 +349,9 @@
<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" mode=""v-if="item1.attr_img!=''"></image>
<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>
<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>
@ -348,12 +368,15 @@
<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">
<!-- <view class="quantity">
<text>Quantity</text>
<uni-number-box background="#FFFFFF" v-model="cartQuery.goods_number" :min="1"></uni-number-box>
</view>
</view> -->
<button @click="addCart">ADD TO CART</button>
</view>
<!-- 分享 -->
@ -363,7 +386,7 @@
<image src="../../static/img/close1.png" mode="" @click="Isshare=false"></image>
</view>
<view class="share_icon">
<view class="icon_item"><image src="../../static/img/facebook1.png" mode=""></image>Facebook</view>
<view class="icon_item"><image src="../../static/img/facebook1.png" mode=""></image><view>Facebook</view></view>
<view class="icon_item" @click="Copylink()"><image src="../../static/img/copyLink.png" mode="">Copy Link</view>
<view class="icon_item" @click="Sendmes()"><image src="../../static/img/Mes.png" mode="">Send SMS</view>
<view class="icon_item" @click="downloadImg()"><image src="../../static/img/down.png" mode="">Download</view>
@ -762,7 +785,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,'1122')
}
})
@ -788,7 +811,7 @@
}
console.log(this.commonlist)
console.log(this.commonlist,'11')
this.shop_price = this.goodsDate.shop_price
this.goodsDate.gallery_list.map(item=>{
item.content=''
@ -939,7 +962,7 @@
if(e.e==2){
this.isCart = true
}
console.info(this.shipping_list)
},
onShow(){
this.getCartNum()
@ -972,6 +995,10 @@
}
</style>
<style lang="scss" scoped>
.body{
background-color: #000;
color:white;
}
.bg_b{
background-color: #000000;
}
@ -1002,18 +1029,21 @@
.text1{
width: 100%;
max-height:360rpx;
min-height: 320rpx;
max-height:500rpx;
min-height: 200rpx;
padding-left: 4.67rpx;
padding-top: 30.67rpx;
padding-bottom: 30.67rpx;
padding-right: 10rpx;
// padding-right: 45.33rpx;
// line-height: 50rpx;
// text-align: start;
// font-size: 25rpx;
// color: #999999;
color: #999999;
&:last-child{
margin-bottom: 17.37rpx;
}
.text1_item{
display: flex;
width: 100%;
@ -1029,7 +1059,8 @@
width:200rpx;
// background-color:red;
height: 50rpx;
color:#999;
color:#999;
font-size:28rpx;
line-height: 50rpx;
text-align: start;
@ -1038,7 +1069,8 @@
}
.text1_right{
width:400rpx;
color:#000;
color:#000;
font-size:28rpx;
// background-color:green;
line-height:50rpx;
@ -1065,23 +1097,25 @@
.securityDetails{
padding-top: 50.67rpx;
padding-top: 20.67rpx;
// padding-bottom: 120rpx;
padding-left: 54.67rpx;
padding-right: 45.33rpx;
.securityDetails_item{
margin-bottom: 52rpx;
margin-bottom: 22rpx;
font-size: 24.67rpx;
font-weight: 400;
color: #999999;
color: #999999;
// color: #fff;
&:last-child{
margin-bottom: 0;
padding-bottom: 50.67rpx;
padding-bottom: 22.67rpx;
}
.securityDetails_item_title{
position: relative;
color: #333333;
// color: #333333;
// color: #fff;
font-size: 30rpx;
font-weight: 500;
margin-bottom: 10.33rpx;
@ -1104,18 +1138,21 @@
display: flex;
flex-wrap: wrap;
.select_size_item{
background-color: #F8F8F8;
min-width: 121.33rpx;
height: 54.67rpx;
// background-color: red;
width: 97.67rpx;
height: 97.67rpx;
display: flex;
background-size: 100% !important;
background-repeat: no-repeat;
align-items: center;
justify-content: center;
border-radius: 12.67rpx;
color: #666666;
// color: #666666;
color: #fff;
font-size: 24rpx;
margin-right: 18.67rpx;
border: 1px solid #F8F8F8;
padding: 0 10rpx;
// border: 1px solid #F8F8F8;
padding: 0 5rpx;
margin-bottom: 16.67rpx;
// &:nth-child(-n+2){
@ -1133,6 +1170,7 @@
padding-right: 29.33rpx;
box-sizing: border-box;
padding-top: 77.67rpx;
color:#000;
width: 100%;
// font-size: 30.67rpx;
font-weight: 400;
@ -1164,12 +1202,12 @@
}
.addCard_body{
padding-right: 31.33rpx;
max-height: 700rpx;
max-height: 60vh;
min-height: 400rpx;
.addCard_price{
font-size: 44rpx;
font-weight: 500;
margin-top: 27.33rpx;
margin-top: 17.33rpx;
margin-bottom: 51.33rpx;
}
.color_select{
@ -1217,7 +1255,7 @@
.active_color{
color: #B22234;;
background-color: white;
border: 1px solid #000000;
// border: 1px solid #000000;
}
}
.variations_select_size{
@ -1225,6 +1263,7 @@
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;
@ -1266,7 +1305,7 @@
height: 73.33rpx;
line-height: 73.33rpx;
background-color: #191919;
color: white;
color: white;
font-weight: bold;
font-size: 26.67rpx;
}
@ -1275,26 +1314,32 @@
width: 100%;
margin-top: 36.67rpx;
padding-bottom: 34rpx;
border-bottom: 1px solid #E2E2E2;
// border-bottom: 1px solid #E2E2E2;
::-webkit-scrollbar {
width: 0;
height: 0;
background-color: transparent;
// background-color: transparent;
}
.spike1_item{
width: 410rpx;
background-color: #F6F6F6;
padding: 21.33rpx 24.67rpx;
width: 480rpx;
background-color: #343434;
padding: 27.33rpx 37.67rpx;
margin-right: 19.33rpx;
font-size: 20rpx;
// border:1rpx solid #ccc;
display: inline-block;
color: #737373;
// 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;
@ -1311,7 +1356,8 @@
}
}
.spike1_item1{
color: #191919;
// color: #191919;
color: #fff;
font-size: 29.33rpx;
margin-right: 16.67rpx;
width: 200rpx;
@ -1328,12 +1374,14 @@
margin-top: 22.67rpx;
.spike1_item_text{
color: #9D9D9D;
// color: #9D9D9D;
color: #fff;
font-size: 21.33rpx;
text-decoration: line-through;
}
.spike1_item_text1{
color: #9D9D9D;
// color: #9D9D9D;
color: #fff;
font-size: 21.33rpx;
}
}
@ -1343,7 +1391,8 @@
font-weight: bold;
.spike1_item_text{
color: #000000;
// color: #000000;
color: #fff;
font-size: 16rpx;
font-weight: 400;
margin-bottom: 20.67rpx;
@ -1374,7 +1423,8 @@
}
}
.goods_title_right{
color: #737373;
// color: #737373;
color: #fff;
display: flex;
align-items: center;
font-size: 24rpx;
@ -1568,8 +1618,8 @@
.goods_info{
padding: 0 26.67rpx;
padding-top: 60.67rpx;
padding-bottom: 35.33rpx;
border-bottom: #F7F7F7 13.33rpx solid;
padding-bottom: 15.33rpx;
// border-bottom: #F7F7F7 13.33rpx solid;
font-size: 30.67rpx;
font-weight: 400;
@ -1600,7 +1650,7 @@
align-items: center;
font-size: 24rpx;
padding-bottom: 33.33rpx;
border-bottom: 1px solid #E2E2E2;
// border-bottom: 1px solid #E2E2E2;
margin-bottom: 35.33rpx;
.evaluate_text{
font-weight: 500;
@ -1632,7 +1682,7 @@
width: 126.67rpx;
height: 126.67rpx;
margin-right: 9.33rpx;
background-color: #999999;
// background-color: #999999;
&:last-child{
margin-right: 0;
@ -1687,7 +1737,7 @@
.transport{
padding: 0 26.67rpx;
padding-top: 37.33rpx;
border-bottom: #F7F7F7 13.33rpx solid;
// border-bottom: #F7F7F7 13.33rpx solid;
.title_Mtop{
margin-top: 25.33rpx;
@ -1696,7 +1746,7 @@
.security{
padding-top: 36rpx;
padding-bottom: 32.67rpx;
border-bottom: 1px solid #E2E2E2;
// border-bottom: 1px solid #E2E2E2;
.security_content{
@ -1742,12 +1792,12 @@
}
}
.reviews{
border-bottom: #F7F7F7 13.33rpx solid;
// border-bottom: #F7F7F7 13.33rpx solid;
padding: 0 26.67rpx;
padding-top: 36rpx;
.allReviews{
background-color: #F7F7F7;
background-color: #FFF;
display: flex;
align-items: center;
padding-left: 26.67rpx;
@ -1756,7 +1806,7 @@
font-weight: 800;
margin-top: 32.67rpx;
height: 118.67rpx;
color:black;
text{
display: inline-block;
margin-right: 42rpx;
@ -1773,8 +1823,10 @@
.productImage_image{
width: 100%;
min-height: 788rpx;
margin-bottom: 62rpx;
// background-color: #999999;
margin-bottom: 0 !important;
margin-top: 20rpx;
// margin-bottom: 62rpx;
background-color: #fff;
image{
width: 100%;
@ -1800,7 +1852,8 @@
}
}
.footer{
padding: 42rpx 0;
padding-top:11rpx;
padding-bottom: 37rpx;
padding-left: 27.33rpx;
padding-right: 19.33rpx;
background-color: white;
@ -1818,6 +1871,7 @@
font-weight: bold;
display: flex;
align-items: center;
color:#000;
}
.footer_right{
display: flex;
@ -1844,7 +1898,7 @@
display: flex;
align-items: center;
font-size: 32rpx;
color: white;
color: #fff;
padding-left: 29.33rpx;
padding-right: 22rpx;
justify-content: space-between;
@ -1882,21 +1936,22 @@
padding-left: 29.33rpx;
padding-right: 29.33rpx;
box-sizing: border-box;
padding-top: 37.67rpx;
padding-top: 77.67rpx;
width: 100%;
font-size: 30.67rpx;
font-weight: 400;
padding-bottom: 44.67rpx;
padding-bottom: 74.67rpx;
.order_popup_title{
position: relative;
font-size: 32rpx;
font-weight: bold;
border-bottom: 1px solid #E2E2E2;
display: flex;
color:#000;
align-items: center;
justify-content: center;
// padding-top: 44.67rpx;
padding-bottom: 30.67rpx;
padding-bottom: 50.67rpx;
text-align: center;
image{
width: 21.33rpx;
@ -1915,16 +1970,21 @@
font-size: 20rpx;
line-height: 40rpx;
text-align: center;
.icon_one{
width: 100rpx;
height: 150rpx;
}
.icon_item{
width: 100rpx;
height: 100rpx;
height: 150rpx;
margin-top: 20rpx;
color:#000;
margin-left: 20.37rpx;
margin-right: 20.36rpx;
// background-color: #B22234;
background-color: #fff;
image{
width: 100%;
height: 100%;
width: 100rpx;
height: 100rpx;
}
}
}

96
pages/productDetails/review.vue

@ -29,8 +29,8 @@
<view class="review">
<view class="review_title">
<text>Score</text>
<uni-rate size="22" disabledColor="red" v-model="query.comment_rank" active-color="red" :is-fill="false" class="rate" v-if="reviewType==0"/>
<uni-rate size="22" disabledColor="red" v-model="query1.comments[index].comment_rank" active-color="red" :is-fill="false" class="rate" v-else/>
<uni-rate size="22" disabledColor="#B22234" v-model="query.comment_rank" active-color="#B22234" :is-fill="false" class="rate" v-if="reviewType==0"/>
<uni-rate size="22" disabledColor="#B22234" v-model="query1.comments[index].comment_rank" active-color="#B22234" :is-fill="false" class="rate" v-else/>
</view>
<view class="review_content">
<image src="../../static/img/write.png" mode=""></image>
@ -43,10 +43,13 @@
<image :src="VideoSrc" class="upload_item_camera" mode="" v-else></image>
<view>Upload the video</view>
</view>
<view class="reason_upload_item" @click="Upimg" >
<view class="reason_upload_item" @click="Upimg()">
<image src="/static/img/camera.png" class="upload_item_camera" mode="" v-if="!imgSrc"></image>
<image :src="imgSrc" class="upload_item_camera" mode="" v-else></image>
<view>Upload pictures</view>
<!-- <view>Upload pictures</view>
</view>
<view class="reason_upload_item reason_upload_item1">
@ -62,7 +65,11 @@
</template>
<script>
import {defaultRequest2,defaultRequest3} from '../../api/index.js'
import {defaultRequest,defaultRequest2,defaultRequest3,defaultRequest5} from '../../api/index.js'
import { encryptDes, decryptDes ,encrypt_by_des } from '@/utils/des.js'
import Base64 from 'base-64';
import cryptoJS from "crypto-js"
import { pathToBase64 } from '@/js_sdk/mmmm-image-tools/index.js'
export default {
data() {
return {
@ -147,14 +154,91 @@
})
},
// upload(){
// console.log(1111)
// var input = documente.createElement('input');
// input.type = 'file';
// input.accept='image/*';
// this.$refs.input.$el.appendChild(input);
// input.onchange = (event) => {
// this.fileName = event.path[0].files[0].name;
// }
// $('input').click();
// },
//
Upimg(){
var that = this
let url
uni.chooseImage({
count: 6, //9
count: 3, //9
sizeType: ['original', 'compressed'], //
sourceType: ['album'], //
success: function (res) {
console.info(res)
console.log(JSON.stringify(res.tempFilePaths));
const tempFilePaths = res.tempFilePaths
console.log(res.tempFiles[0])
uni.getImageInfo({
src: res.tempFilePaths[0],
success: (path) => {
pathToBase64(path.path).then(base64 => {
// console.log(base64); // base64
url = base64
})
.catch(error => {
console.error(error)
})
}})
const json_data={
appcode:'DOPE+' ,//
appchannel:'FXXXXHUAWEI' ,//
appver: '1.0.0',//
appname:'cnic_buyer' ,//
manufacturer:'HUAWEI' ,//
phonebrand:'HORNOR' ,//
phonetype:'X30' ,//
phoneos:'ANDROID',//
_action:'uploadcommentfile',//
atype: 1,//
// afile:res.tempFiles[0]
}
//
let data = encryptDes(JSON.stringify(json_data),'6780f04cf2e211ec86a8005056c00008');
let file = encryptDes(JSON.stringify(res.tempFiles[0]),'6780f04cf2e211ec86a8005056c00008');
// let afile = {
// afile:file
// }
// console.log(afile)
// defaultRequest5(data,afile).then(res =>{
// console.log(res)
// })
// let str = {
// _action: 'uploadcommentfile',
// atype:1,
// }
// let _action = encryptDes(JSON.stringify('uploadcommentfile'),'6780f04cf2e211ec86a8005056c00008');
// let type = encryptDes(JSON.stringify(1),'6780f04cf2e211ec86a8005056c00008');
uni.uploadFile({
url: 'https://en.meixx.com/mapi/api_v2011.php',
filePath: tempFilePaths[0],
name: 'afile',
formData:{
'data':data
},
success: (uploadFileRes) => {
console.log(uploadFileRes);
let data=decryptDes(uploadFileRes.data,'6780f04cf2e211ec86a8005056c00008');
console.log(data);
}
});
}
});
}

97
pages/shippingCart/index.vue

@ -1,9 +1,9 @@
<template>
<view>
<uni-nav-bar :statusBar="true" left-icon="left" title=" Cart" color="#000000" :fixed="true" @clickLeft="back">
<view class="body">
<uni-nav-bar :statusBar="true" left-icon="left" title=" Cart" color="#fff" backgroundColor="#000" :fixed="true" @clickLeft="back">
<block slot="right">
<view class="nav_right">
<image src="../../static/img/delete1.png" mode="" @click="deleteCart"></image>
<image src="../../static/img/delete_white.png" mode="" @click="deleteCart"></image>
</view>
</block>
</uni-nav-bar>
@ -16,11 +16,15 @@
</view>
<template v-else>
<view class="cart_info">
<view class="cart_info" v-if="money>0">
<image src="/static/img/Shipped.png" mode=""></image>
<view class="cart_title_content">Buy <text v-if="money==0||money>0" style="color:darkred">US${{ money }}</text>more to enjoy FREE STANDARD SHIPPING!</view>
<view class="cart_title_content">Buy <text style="color:darkred">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">
<view class="cart_content">
<view class="good_info" v-for="(gitem,index) in inlist" :key="gitem.rec_id">
@ -36,9 +40,12 @@
<view class="info_name">{{gitem.goods_name}}</view>
<view class="left_info_bottom" v-if="gitem.goods_attr">
<view class="info_lable">
<text>{{gitem.goods_attr}}</text>
<view class="info_lable_text">{{gitem.goods_attr}}</view>
<!-- <image src="/static/img/bottom.png" mode="" @click="ChangeAttr(gitem)"></image> -->
<view class="image-v"><image src="/static/img/bottom.png" mode="" @click="ChangeAttr(gitem)"></image></view>
</view>
<view class="image-v"><image src="/static/img/bottom.png" mode="" @click="ChangeAttr(gitem)"></image></view>
</view>
<view class="left_info_bottom2" v-if="!gitem.goods_attr"></view>
<view class="info_price">
@ -167,7 +174,7 @@
<image src="/static/img/close1.png" mode="" class="addCard_close" @click="isCahnge=false,goods_attr_list = []"></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="" class="addCard_scroll" v-for="(item,index) in gallery_list" ></image>
<image :src="item.img_url" mode="" @click="clickImg(gallery_list,index)" class="addCard_scroll" v-for="(item,index) in gallery_list" ></image>
</scroll-view>
<scroll-view class="addCard_body" scroll-y="true">
<view >{{ goodsDate.goods_name}}</view>
@ -179,7 +186,7 @@
: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)">
<view class="color_select_item_zoom" v-if="item1.attr_img!=''">
<image src="/static/icon/big2.png" mode=""></image>
<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>
@ -775,7 +782,33 @@
// }
// })
// }
}
},
//
clickImg(list,index) {
console.log(list)
let imglist = []
list.map( item =>{
if(item.img_url){
imglist.push(item.img_url)
}
else{
imglist.push(item.attr_img)
}
})
wx.previewImage({
urls: imglist, //httpurl
current: index, // http
indicator:'number',
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
},
onLoad() {
@ -819,7 +852,7 @@
</script>
<style>
page {
background-color: #F6F5FA;
/* background-color: #000; */
padding-bottom: 150rpx;
}
</style>
@ -905,9 +938,22 @@
.cart_title_content {
width: 510.67rpx;
text-align: left;
line-height: 50rpx;
}
.title_left{
width: 620rpx;
line-height: 50rpx;
height: 50rpx;
text-align: left;
// background-color: #B22234;
float: left !important;
padding: 0 !important;
}
.cart_title_right {
width: 100rpx;
text-align: left;
font-size: 26rpx;
font-weight: bold;
}
@ -981,10 +1027,10 @@
.left_info_bottom {
color: #C4C4C4;
width: 250rpx;
max-width: 280rpx;
display: flex;
padding: 0 3rpx 10rpx;
border: 1px solid #C4C4C4;
padding: 0 3rpx 10rpx 10rpx;
// border: 1px solid #C4C4C4;
border-radius:25rpx;
margin-right: 10rpx;
height: 30rpx;
@ -995,22 +1041,27 @@
.image-v{
height: 20rpx;
width: 20rpx;
margin-right: 10rpx;
float: right;
margin-bottom: 20rpx;
image{
height: 100%;
width: 100%;
margin-right: 6rpx;
}
}
.info_lable {
width: 200rpx;
display: flex;
height: 40rpx;
// max-width: 200rpx;
// background-color: #B22234;
padding-left: 10rpx;
border: 1px solid #C4C4C4;
overflow: hidden;
border: none !important;
// border: none !important;
.info_lable_text {
margin-right: -3rpx;
}
}
}
@ -1047,7 +1098,7 @@
}
.footer {
padding: 42rpx 0;
padding: 21rpx 0;
padding-left: 27.33rpx;
padding-right: 19.33rpx;
background-color: white;
@ -1171,7 +1222,7 @@
}
.addCard_body{
padding-right: 31.33rpx;
max-height: 600rpx;
max-height: 60vh;
min-height: 400rpx;
.addCard_price{
font-size: 44rpx;

9
pages/specialTitle/index.vue

@ -1,6 +1,7 @@
<template>
<view class="body">
<uni-nav-bar left-icon="left" @clickLeft="back()" :title="title" />
<view class="one"></view>
<uni-nav-bar left-icon="left" @clickLeft="back()" backgroundColor="#000" color="#fff" :title="title" />
<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'}">
@ -134,6 +135,10 @@
}
}
.body{
padding-top: 50.33rpx;
.one{
height: 50rpx;
width: 100%;
background-color: #000;
}
}
</style>

BIN
static/icon/cat_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
static/icon/like_red.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
static/icon/right_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
static/icon/share_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
static/img/bottom1_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

BIN
static/img/delete_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/img/pets_nav_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 977 B

BIN
static/img/ptes_nav1_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
static/img/top_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Loading…
Cancel
Save